dyld: Library not loaded: @rpath/libswiftCore.dylib
Asked Answered
C

59

468

I am trying to run a Swift app on my iPhone 4s. It works fine on the simulator, and my friend can successfully run it on his iPhone 4s. I have iOS 8 and the official release of Xcode 6.

I have tried

  • Restarting Xcode, iPhone, computer
  • Cleaning & rebuilding
  • Revoking and creating new certificate/provision profile
  • Runpath Search Paths is $(inherited) @executable_path/Frameworks
  • Embedded Content Contains Swift Code is 'Yes'
  • Code Signing Identity is developer

Below is the error in entirety

dyld: Library not loaded: @rpath/libswiftCore.dylib
  Referenced from: /private/var/mobile/Containers/Bundle/Application/LONGSERIALNUMBER/AppName.app/AppName
  Reason: no suitable image found.  Did find:
    /private/var/mobile/Containers/Bundle/Application/LONGSERIALNUMBER/AppName.app/Frameworks/libswiftCore.dylib: mmap() error 1 at
address=0x008A1000, size=0x001A4000 segment=__TEXT in Segment::map() mapping
/private/var/mobile/Containers/Bundle/Application/LONGSERIALNUMBER/APPLICATION_NAME/Frameworks/libswiftCore.dylib
Cutin answered 24/9, 2014 at 18:40 Comment(4)
possible duplicate of dyld: Library not loaded: @rpath/libswift_stdlib_core.dylibKier
clean and rebuild worked for meGammon
Solution is here. The same topicBalm
1 I have been facing the same problem... It got fixed by adding: In you podfile: use_modular_headers! instead of use_frameworks! Good luck! I hope this works for you!Wivestad
R
582

For me none of the previous solutions worked. We discovered that there is an "Always Embed Swift Standard Libraries" flag in the Build Settings that needs to be set to YES. It was NO by default!

Build Settings > Always Embed Swift Standard Libraries

After setting this, clean the project before building again.

For keen readers some explanation The most important part is:

set the Embedded Content Contains Swift Code (EMBEDDED_CONTENT_CONTAINS_SWIFT) build setting to YES in your app as shown in Figure 2. This build setting, which specifies whether a target's product has embedded content with Swift code, tells Xcode to embed Swift standard libraries in your app when set to YES.

enter image description here

The flag was formerly called Embedded Content Contains Swift Code

Returnable answered 15/11, 2014 at 18:28 Comment(6)
@wisenomad If it keeps working after removing the setting, that's because Xcode doesn't remove files when it does an installation. So if you uninstall the app from your device, then reinstall, you will resurface the bug. So you should not turn the setting back to NO, as that will break installation for people other than yourself.Tintinnabulum
Do a clean after you do this.Priorate
It's called Always Embed Swift Standard Libraries now.Miocene
Be aware! - this is needed ONLY when your project does not use Swift code and have embedded libraries written in Swift.God
I did this and now get a different error "Thread 1: signal SIGABRT" Don't know if that's better or worse. Still works on emulator only.Margarine
In my case my Deployment Target was 10.0, I changed it to 13.0 and my issue was resolved. So my suggestion is also to check your deployment target as well.Glossa
M
144

Surprisingly enough, all i did was "Clean" my project (shift+cmd+K) and it worked. Did seem to be related to the certificate though.

Marrowbone answered 31/12, 2015 at 7:31 Comment(0)
D
103

I started getting this error when I removed:

@executable_path/Frameworks

from Runpath Search Paths in my build settings. Replacing it fixed everything up again (thank goodness for source control!)

I don't know how it got there, but it appears to be needed for a binary to find its embedded Swift runtime.

Devindevina answered 11/12, 2014 at 22:8 Comment(1)
For me, as of Xcode 8b5, it was actually @loader_path/../Frameworks for macOS unit tests and @loader_path/Frameworks for iOS unit tests that needed to be added.Laywoman
C
70

For the device, you also need to add the dynamic framework to the Embedded binaries section in the General tab of the project.
enter image description here

Cotenant answered 25/9, 2014 at 16:51 Comment(3)
I'm trying to add the Google Maps Framework. Correspondingly AVFoundation, CoreData, CoreLocation, CoreText, GLKit, ImageIO, OpenGLES, QuartzCore, SystemConfiguration. In addition: libc++.dylib, libicucore.dylib, libz.dylib. I don't have an 'Embedded frameworks' tab. What do you recommend I try?Cutin
The answer is very vague.Lilylilyan
To expound: If what you're seeing in the error message is the name of a framework (e.g., a custom Cocoa Touch Framework that you made), don't just add the .framework in the Target Dependencies in Build Phases. You also need to add it to Embedded Binaries in the General tab. This answer fixed it for me.Sibie
B
69

In Xcode 8 the option for Embedded Content Contains Swift Code option is no longer available.

It has been renamed to "Always Embed Swift Standard Libraries = YES"

enter image description here

Barger answered 22/11, 2016 at 8:3 Comment(0)
B
69

Xcode 13 here (13.1 with react-native).

Created a clean react-native project and saw /usr/lib/swift as an entry in Runpath Search Paths.

enter image description here

After adding that, my project finally ran without crashing!

Nothing helped from what was suggested before.

Baeyer answered 5/11, 2021 at 11:16 Comment(0)
S
29

I think it's a bug when certificates are generated directly from Xcode. To resolve (at least in Xcode 6.1 / 6A1052d):

  1. go to the Apple Developer website where certificates are managed: https://developer.apple.com/account/ios/certificate/certificateList.action
  2. select your certificate(s) (which should show "Managed by Xcode" under "Status") and "Revoke" it
  3. follow instructions here to manually generate a new certificate: https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html#//apple_ref/doc/uid/TP40012582-CH31-SW32
  4. go to Xcode > Preferences > Accounts > [your Apple ID] > double-click your team name > hit refresh button to update certificates and provisioning profiles
Sweptwing answered 5/12, 2014 at 23:16 Comment(3)
Worked for me only when deleting and creating only in XCode, developer.apple.com's "Certificates, Identifiers & Profiles" tool created new bad certs.Yearling
Forgive my ignorance... What does this Answer have to do with the Question that was asked? It looks like you answered a different question. Or more correctly, you responded to @user3056783 deleted answer which was just an "I'm having this problem too comment".Larimer
That "refresh" button is now renamed to "Download All" ... :)Spinode
C
28

I was having this issue with running my Swift tests (but not my app). It turns out that the test needed to have more than @executable_path/Frameworks in it's Runpath Search Paths build setting for the test target. Setting the Runpath Search Paths to the following worked a charm for me:

$(inherited)
@executable_path/Frameworks
@loader_path/Frameworks
Concavoconvex answered 29/7, 2015 at 22:15 Comment(0)
S
25

OK, sharing here another cause of this error. It took me a few hours to sort this out.

In my case the trust policy of my certificate in Keychain Access was Always Trust, changing it back to defaults solved the problem.

In order to open the certificate settings window double click the certificate in the Keychain Access list of certificates.

enter image description here enter image description here

Slight answered 15/5, 2015 at 5:39 Comment(0)
Z
23

This issue occurs again in Xcode 10.2. You must download and install the following package from Apple. It provides Swift 5 Runtime Support for Command Line Tools.

https://support.apple.com/kb/DL1998?locale=en_US

Zealous answered 8/4, 2019 at 11:26 Comment(0)
T
20

You have to set the Runpath Search Paths to @executable_path/Frameworks as showed in the following screenshot of Build Settings:

enter image description here

If you have any embedded frameworks made in Swift, than you can set to YES the Build Options Embedded Content Contains Swift Code.

Tuttle answered 19/1, 2016 at 17:31 Comment(2)
I made a command line tool that uses some dylibs that are to be delivered along with the tool in a local directory (and not in /usr/lib or something like that). otool -L for these dylibs told me that they were already using @rpath/... for their own path. Now, by setting the Runpath Search Path to the path of that folder, I can run my tool and it'll find the dylibs that are stored in a folder next to it.Tenney
When trying to add a Swift module into a React Native project, it was instead failing to find @rpath/libswiftAppKit.dylib. An issue lead me to learn that I had to add the searchpath: @executable_path/../Frameworks/ based on these instructions. Whether this applies only to my project structure, I can't say. Of note, I did not have to clean DerivedData for this setting to take effect!Metternich
K
16

I think Apple has already summarized it under Swift app crashes when trying to reference Swift library libswiftCore.dylib

Cited from Technical Q&A QA1886:

Swift app crashes when trying to reference Swift library libswiftCore.dylib.

Q: What can I do about the libswiftCore.dylib loading error in my device's console that happens when I try to run my Swift language app?

A: To correct this problem, you will need to sign your app using code signing certificates with the Subject Organizational Unit (OU) set to your Team ID. All Enterprise and standard iOS developer certificates that are created after iOS 8 was released have the new Team ID field in the proper place to allow Swift language apps to run.

Usually this error appears in the device's console log with a message similar to one of the following:

[....] [deny-mmap] mapped file has no team identifier and is not a platform binary:
/private/var/mobile/Containers/Bundle/Application/5D8FB2F7-1083-4564-94B2-0CB7DC75C9D1/YourAppNameHere.app/Frameworks/libswiftCore.dylib

Dyld Error Message:
  Library not loaded: @rpath/libswiftCore.dylib

Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x0000000120021088
Triggered by Thread: 0

Referenced from: /private/var/mobile/Containers/Bundle/Application/C3DCD586-2A40-4C7C-AA2B-64EDAE8339E2/TestApp.app/TestApp
Reason: no suitable image found. Did find:
/private/var/mobile/Containers/Bundle/Application/C3DCD586-2A40-4C7C-AA2B-64EDAE8339E2/TestApp.app/Frameworks/libswiftCore.dylib: mmap() error 1 at address=0x1001D8000, size=0x00194000 segment=__TEXT in Segment::map() mapping /private/var/mobile/Containers/Bundle/Application/C3DCD586-2A40-4C7C-AA2B-64EDAE8339E2/TestApp.app/Frameworks/libswiftCore.dylib
Dyld Version: 353.5

The new certificates are needed when building an archive and packaging your app. Even if you have one of the new certificates, just resigning an existing swift app archive won’t work. If it was built with a pre-iOS 8 certificate, you will need to build another archive.

Important: Please use caution if you need to revoke and setup up a new Enterprise Distribution certificate. If you are an in-house Enterprise developer you will need to be careful that you do not revoke a distribution certificate that was used to sign an app any one of your Enterprise employees is still using as any apps that were signed with that enterprise distribution certificate will stop working immediately. The above only applies to Enterprise Distribution certificates. Development certs are safe to revoke for enterprise/standard iOS developers.

As the AirSign guys state the problem roots from the missing OU attribute in the subject field of the In-House certificate.

Subject: UID=269J2W3P2L, CN=iPhone Distribution: Company Name, OU=269J2W3P2L, O=Company Name, C=FR

I have an enterprise development certificate, creating a new one solved the issue.

Kally answered 28/7, 2015 at 9:57 Comment(1)
After spending many many hours trying to understand why my new CI setup was not able to properly publish a beta app (enterprise account, indeed), I figured out that in the export options, compileBitcode MUST be true.Aldebaran
G
10

Let's project P is importing custom library L, then you must add L into

P -> Build Phases -> Embed Frameworks -> +. That works for me.

enter image description here

Gascony answered 19/4, 2016 at 5:17 Comment(0)
G
9

The most easy and easy to ignored way : clean and rebuild.

This solved the issue after tried the answers above and did not worked.

Gynecium answered 3/7, 2018 at 3:11 Comment(0)
B
8

This error message can also be caused when upgrading Xcode (and subsequently to a new version of Swift) and your project uses a framework built/compiled with an older/previous version of Swift.

In this case rebuilding the framework and re-adding it will fix the problem.

Berseem answered 28/9, 2017 at 7:12 Comment(0)
R
7

I was having the same problem after moving to a new mac, and after hours, trying all the suggested answers in the questions, none of this worked for me.

The solution for me was installing this missing certificate. http://developer.apple.com/certificationauthority/AppleWWDRCA.cer

Found the answer here. https://mcmap.net/q/16312/-this-certificate-was-signed-by-an-unknown-authority

Robbi answered 15/10, 2015 at 16:25 Comment(0)
P
7

I had the same issue for Xcode 13+ when I create a release build. Had to waste my time on troubleshooting this issue. Finally I was able to fix the issue with following step.

I added a new entry for Release in Runpath Search Paths in Build Settings -> Linking.

/usr/lib/swift

enter image description here

After adding that, I could run my app without crashing!

Propertius answered 19/9, 2022 at 8:1 Comment(0)
B
6

Change Copy Pods Resources for the target from:

"${SRCROOT}/Pods/Target Support Files/Pods-Wishlist/Pods-Wishlist-resources.sh"

to:

"${SRCROOT}/Pods/Target Support Files/Pods-Wishlist/Pods-Wishlist-frameworks.sh"
Burnejones answered 25/11, 2015 at 7:58 Comment(3)
It seems to work with the exception being running 'pod install' overwrites the change.Anole
Works for me, but would be great to include an explanation of why this works.Faggot
to avoid it getting overwritten, change its name - the next pod install will generate it new Copy Pods Resource stepMicrobarograph
G
6

I solved by deleting the derived data and this time it worked correctly. Tried with Xcode 7.3.1GM

Grandmother answered 24/4, 2016 at 13:58 Comment(0)
P
6

We had a unity project that creates an xcode project that includes libraries that use swift.

We tried each and every reasonable suggestion on this thread.

Nothing worked. Code runs fine on new devices, and crashes on iOS<=12

It seems that swift is so smart, that even if you set it to "ALWAYS_EMBED_SWIFT_LIBRAIES"="YES" it does not include the swift libraries.

What actually solved the problem for us is to include a dummy swift file in the project. The file must contain calls to dispatch, foundation libraries.

Apparently this hints mighty-xcode to force include the libraries, but this time for real.

Here is the dummy file we added that made it work:

import Dispatch
import Foundation


class ForceSwiftInclusion {

   init() {

    // Force dispatch library.
    DispatchQueue.main.async {
      print("something")
    }

    // Force foundation library.
    let uuid = UUID().uuidString
    print("\(uuid)")

   }
}

For unity, also add project.AddBuildProperty(target, "SWIFT_VERSION", "Swift 5"); to your post processing for creating the xcode project.

Phail answered 21/5, 2020 at 13:29 Comment(1)
you sure about the "Swift 5" isn't it "5.0" instead ?Ceylon
C
5

After having tried out everything, I finally found out, that the build seems not always include every detail again and again. Maybe for speeding up the process... In order to ensure WHOLE packaging before running on a device, make a Clean first: Shift-Cmd-K. Then build with: Cmd-B. After that run it on your device. Easy. Kind regards to all you nice guys in that place!

Cutup answered 11/11, 2015 at 13:20 Comment(0)
M
4

In my case, it was just the name of my target :

I renamed it like this : MyApp.something and the same issue appeared. But I saw in the build Settings window, my product module name has been changed like this MyApp-something. So, I removed the dot in my target name (MyAppSomething) and the issue was gone.

Marlenemarler answered 21/4, 2015 at 3:35 Comment(0)
M
4

For me, having tried everything with no success, what worked was to remove @executable_path/Frameworks from the Packaging section (don't know how it came to be in there in the first place)

enter image description here

Maracanda answered 21/8, 2015 at 12:0 Comment(1)
This seems to have broken my project.Lied
D
4

What worked for me in Xcode 11 was going to General -> Frameworks, Libraries, and Embedded Content and changing the "Embed" option for the framework in question to "Embed & Sign"

Embed and Sign option

Dasie answered 1/6, 2020 at 19:39 Comment(0)
A
3

None of the solutions worked for me. Restarting the phone fixed it. Strange but it worked.

Athene answered 2/12, 2015 at 0:52 Comment(0)
L
3

none of these solutions seemed to work but when I changed the permission of the world Wide Developer cert to Use System defaults then it worked. I have included the steps and screenshots in the link below

I would encourage you to log the ticket in apple bug report as mentioned here as Apple really should solve this massive error: https://mcmap.net/q/16313/-os-x-framework-library-not-loaded-39-image-not-found-39

Lied answered 30/12, 2016 at 19:4 Comment(0)
I
2

Xcode 7.2, iOS 9.2 on one device, 9.0 on other. Both had the error. No idea what changed that caused it, but the solutions above for the WWDR were correct for me. Install that cert and problem solved.

https://forums.developer.apple.com/message/43547 https://forums.developer.apple.com/message/84846

Inkwell answered 30/12, 2015 at 3:54 Comment(1)
Apologies. Download the WWDR certificate and then open it to install into your keychain. Certificate is here: developer.apple.com/certificationauthority/AppleWWDRCA.cerInkwell
K
2

There are lot's of answers there but might be my answer will help some one.

I am having same issue, My app works fine on Simulator but on Device got crashed as I Lunches app and gives error as above. I have tried all answers and solutions . In My Case , My Project I am having multiple targets .I have created duplicate target B from target A. Target B works fine while target A got crashed. I am using different Image assets for each target. After searching and doing google I have found something which might help to someone.

App stop crashing when I change name of Launch images assets for both apps . e.g Target A Launch Image asset name LaunchImage A . Target B Lunch Image asset name LaunchImage B and assigned properly in General Tab of each target . My Apps works fine.

Kasher answered 17/1, 2017 at 11:46 Comment(0)
P
2

For me building a MacOS command line Swift app that depended on 3rd party Swift libs (e.g. SQLite) none of the above solutions seemed to work. What did work was directly adding the following path to my Runpath Search Paths in the Build Settings:

/Applications/Xcode.app/Contents//Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/

Doing that did give a warning at runtime saying that Xcode had found 2 versions of libswiftCore - which makes sense. Except that not including that line resulted in Xcode not finding any versions of libswiftCore.

Anyway, that'll do for me even if it doesn't seem right - my app is just a utility that I'm not intending to distribute and at least it runs now!

Purtenance answered 1/9, 2018 at 10:2 Comment(0)
C
1

I have multiple version of Xcode installed at the same time. The framework was built with a newer version of Xcode. The app that I tried to compile was with an older version of Xcode. When I cleaned and compiled both the framework and the app with the same version of Xcode then things worked.

Cheroot answered 26/4, 2016 at 8:10 Comment(0)
J
1

I started getting this similar error for testing adding S3 file using AWS services. Below was the error. dyld: Library not loaded: @rpath/AWSAutoScaling.framework/AWSAutoScaling

I searched a lot and above solutions are also not helpful for me. Below link helped me to solve this issue.

https://forums.developer.apple.com/thread/21292

Which says to fix this issue by re-downloading the WWDR (Apple Worldwide Developer Relations Certification Authority).

Jennet answered 22/8, 2016 at 7:40 Comment(0)
M
1

I am on Xcode 8.3.2. For me the issue was the AppleWWDRCA certificate was in both system and login keychain. Removed both and then added to just login keychain, now it runs fine again. 2 days lost 😭

Mcculloch answered 5/5, 2017 at 0:36 Comment(1)
Can you spare just a little more detailed answer? Where do you find it (the certificate) - I guess what you wrote stands for Apple Worldwide Developer something... but what's the full name? how to re-add it after you completely removed it from all key-chains? Where do you find this certificate?Bruce
C
1

I'm using Xcode 8.3.3 and Xcode 9.2. The solution for me was to switch my default Xcode from 8 to 9 using Xcode Select:

$ xcode-select --print-path

$ sudo xcode-select -switch /Applications/Xcode-9.2.app

Edit: Actually what seemed to help here was that Xcode 9.2 used the derived data from Xcode 8.3.3. Not a solution but at least it allows me to move forward with my work.

Consequence answered 24/1, 2018 at 17:6 Comment(0)
G
1

If you're getting an error like this:

The bundle "YourFrameworkTests" couldn't be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle. (dlopen_preflight(/some/path/.../YourFrameworkTests.xctest/YourFrameworkTests): Library not loaded: @rpath/SomeOther.framework/SomeOther Referenced from: /some/path/...)

and use CocoaPods in your framework, then try to edit the Podfile and remove inherit! :search_paths from the Test target, and run pod install again.

For more details, see https://github.com/CocoaPods/CocoaPods/issues/8868.

Gallegos answered 9/8, 2019 at 3:30 Comment(0)
G
1

I ran into this issue while I was trying to run unit-tests on a private pod.

I did everything everyone suggested. Nothing worked.

All I had to do was to run my unit-tests on a different simulator.

I didn't try resetting the contents and settings of my simulator, maybe that would have worked as well ¯_(ツ)_/¯

Gybe answered 26/11, 2019 at 15:1 Comment(0)
B
1

For Xcode 12.x, what worked for me is go to General > Frameworks, Libraries, and Embedded Content. Then, choose Embed & Sign all Agora frameworks. (it was defaulted to Do Not Embed.

enter image description here

Boni answered 4/3, 2021 at 7:20 Comment(0)
C
1

For me none of above solutions worked.

I managed to get rid of the issue by creating an empty swift file inside my project. After that do a clean build and everything just worked!

Hope this helps others.

Tested on iOS 15 & React Native 0.66

Cerate answered 9/12, 2021 at 6:1 Comment(0)
L
1

I tried to read through all the answers. (Maybe missed some) But here is my solution. Might be helpful to someone. I just created a swift file (void.swift) in my project. When I added this file, it asked me to create a bridge. I said yes. That's all! It started working. Background: My project is written in obj c. And I added FBSDK pods to my project. After that, I started getting this error.

Loam answered 4/4, 2022 at 23:45 Comment(0)
S
0

To add on to the Enterprise distribution cert solution: you can open Keychain and inspect the cert. If there is any red text saying the trust chain can't be verified or it being revoked, it WILL NOT WORK! On my computer, our distribution cert was showing as revoked even though the web portal showed it as still valid. We got a new distribution cert, which was green (valid) in Keychain, and this solved the issue.

Studnia answered 6/10, 2015 at 18:37 Comment(0)
W
0

The above solutions did not work for me. I fix the issue by the following steps:

  1. I had to go to the phone (Settings > Profile) and delete the profiles that were in the phone(including all the apps associated with those profile/provisions).
  2. After that, make sure that you download the apple provisions in xcode. Go to xcode settings > account and sign in into your apple developer account.
Wiring answered 15/11, 2015 at 19:22 Comment(0)
S
0

I'm using Xcode 7.2. If you tried all of above and the error still occurs, try deleting the old certificate from Keychain Access! It's such a pain to finally fix this.

Selfaddressed answered 12/1, 2016 at 23:15 Comment(0)
M
0

In my case,

I have set @executable_path/Frameworks

But I have to also set "Framework search paths"

$(PROJECT_DIR)/Frameworks

change as recursive

Which works for me.

Mcculloch answered 13/1, 2016 at 12:5 Comment(0)
P
0

When Xcode asks you to reset certs, you reset it. And the app can be run on actual device without crash with that error messages. Once this problem is fixed in one swift project. Other swift projects with this problem are fixed also.

I have struggled for these about half a day and I found that reset certs again and again in provisioning portal doesn't help.

Penelopa answered 23/2, 2016 at 7:27 Comment(0)
A
0

In my case, one of my testing targets was working but the other one was not. It was giving the above error with a missing library or whatever. I compared the settings for both of the testing targets and found that one was missing the configuration for "Test Host", so I copied that from the working test target and it fixed my broken test target!

enter image description here

Ascertain answered 13/5, 2016 at 17:20 Comment(0)
Z
0

From the post of https://github.com/CocoaPods/cocoapods-integration-specs/pull/24/files, that mean swift.dylib need sign but failed. I failed even create a new swift project with cocoapod support.

Zuckerman answered 16/6, 2016 at 9:14 Comment(0)
C
0

If your project has cocoapods and different schemes, try running pod update, that fixed it for me.

Coracorabel answered 15/7, 2016 at 21:37 Comment(0)
A
0

Shortly speaking, have you tried to check "Enable Bitcode=NO". It works for me.

In my case, my project was written in Object-C and includes one 3rd party framework written in swift. I can run my APP on both simulator and real device in developer mode. However, once I achieved the APP with Ad-hoc provision profile and installed this ipa OTA on real device, it crashed. Not even mention upload to store. Hope this information can help.

Albacore answered 17/8, 2016 at 14:10 Comment(0)
K
0

I have the same issue, and the issue is like this:

dyld: Library not loaded: @rpath/Result.framework/Result Referenced from: /private/var/mobile/Containers/Bundle/Application/74AD1FE2-7095-47D2-B059-520863050EE2/ReactiveCocoaTest.app/Frameworks/ReactiveCocoa.framework/ReactiveCocoa Reason: image not found

My solution is below:

In the TARGET -> Build Setting -> Other Linker Flag -> delete the ReactiveCocoa framework. If is xxx.framework, you know, you should delete the xxx.

delete the ReactiveCocoa

delete the ReactiveCocoa

Kovno answered 12/12, 2016 at 11:2 Comment(0)
O
0

I tested all of the above solutions but nothing solved the problem. I was using Xcode 10.2 and macOS 10.14.3. first i installed swift 5 runtime support for command line tools but nothing changed second i updated OS to 10.14.4 and nothing changed third i updated Xcode to 11.2.1 and the problem solved (do not user Xcode 11.2. it has archiving issue and deprecated)

Orola answered 11/11, 2019 at 6:30 Comment(0)
C
0

Got the same issues after two years. I think this post explains the reason I got (But may be not the reason in this question). Use subscribed developer account or static libraries could help. Like remove use_frameworks! in your Podfile .

Clambake answered 24/2, 2020 at 4:7 Comment(0)
S
0

In my case, This is a bug of the early version iOS13.

https://forums.developer.apple.com/thread/128435

kambala

Mar 25, 2020 12:41 AM

FYI this is fixed in 13.4 release

Starinsky answered 1/5, 2020 at 9:44 Comment(0)
P
0

I am having same issue

There are lot's of answers there but might be my answer will help some one.

// MARK: - Core Data stack

 lazy var persistentContainer: NSPersistentContainer = {
            /*
             The persistent container for the application. This implementation
             creates and returns a container, having loaded the store for the
             application to it. This property is optional since there are legitimate
             error conditions that could cause the creation of the store to fail.
            */
            let mom = NSManagedObjectModel.mergedModel(from: [Bundle(for: Self.self)])!
            
            let container = NSPersistentContainer(name: "Test", managedObjectModel: mom)
            container.loadPersistentStores(completionHandler: { (storeDescription, error) in
                if let error = error as NSError? {
                    // Replace this implementation with code to handle the error appropriately.
                    // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
                     
                    /*
                     Typical reasons for an error here include:
                     * The parent directory does not exist, cannot be created, or disallows writing.
                     * The persistent store is not accessible, due to permissions or data protection when the device is locked.
                     * The device is out of space.
                     * The store could not be migrated to the current model version.
                     Check the error message to determine what the actual problem was.
                     */
                    fatalError("Unresolved error \(error), \(error.userInfo)")
                }
            })
            return container
        }()
Pleach answered 9/3, 2021 at 13:14 Comment(0)
C
0

Me also got the exact same error in Xcode 13, iOS 12 mobile.

Here my project deployment info is 12.0, but my framework deployment info in iOS 15.0.

I have changed my Framework deployment info into 12.0.

Conclusion:

Which means framework and project supported versions issue. We need to fix the framework minimum support version after creating the framework.

Copenhaver answered 12/11, 2021 at 7:45 Comment(0)
M
0

Nothing worked for me, then i did these steps below:

  1. I removed the flipper usage from podfile. It looked like this for me:

    use_flipper!({ 'Flipper-Folly' => '2.5.3', 'Flipper' => '0.87.0', 'Flipper-RSocket' => '1.3.1' })

  2. I added a swift file in my project to create a bridging header.

Monostich answered 11/1, 2022 at 13:37 Comment(0)
C
0

In addition to previous answers (setting Runpath Search Paths) my solution was in increasing iOS Deployment Target from 11.0 to 12.4.

Countrywoman answered 8/4, 2023 at 5:25 Comment(0)
O
0

In my case, I was trying to resolve an issue that is happening in iOS 14. So I downloaded iOS 14.0 for my simulator in Xcode settings. In that case, I encountered the same problem as the author mentioned.

No matter how many times I applied the suggested answers, it didn't work for me.

Then I simply downloaded iOS 14.1 version and deployed my code with it. Problem solved!

The good news is that our app was behaving the same with iOS 14.1 so that we could reproduce the issue and fix the bug.

Onset answered 15/8, 2023 at 20:28 Comment(0)
E
-1

Following these steps worked for me:

  • Click on your project name (very top of the navigator)
  • Click on your project name again, (not on target)
  • Click the tab Build Settings
  • Search for Runpath Search Paths

  • Change its value to $(inherited) flag (remove @executable_path/Frameworks).

Elfland answered 11/11, 2015 at 9:56 Comment(0)
B
-1

For me solution is here below Disable the "Embed Asset Packs in Product Bundle" and this issue will be gone

enter image description here

Beryl answered 27/12, 2017 at 7:15 Comment(0)
H
-1

For me, I forget add two lines of code below to target 'Runner' do in Podfile

target 'Runner' do
   use_frameworks!
   use_modular_headers!
end

Add these codes solved, wish to help you!

Heterolecithal answered 8/10, 2022 at 3:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.