dyld: Library not loaded: #rpath/libswiftCore.dylib - Error in Xcode 7 - ios

I was working on Xcode 7 beta with Swift in a Mac mini (running Yosemite) Due to poor performance i installed Yosemite on my PC (like Hackintosh). And i copied the "xcode 7 beta.app" from 'applications' folder to my new pc's Yosemite.
Note: This question is already asked in stack overflow. But none of the solutions worked for me.
When i try to run the app in to my iPad i got an error like this. But no problem while running in emulator
dyld: Library not loaded: #rpath/libswiftCore.dylib
Referenced from: /var/mobile/Containers/Bundle/Application/80F87502-B264-4BF3-8200-4B9A69C99189/Hi Gijo.app/Hi Gijo
Reason: no suitable image found. Did find:
/private/var/mobile/Containers/Bundle/Application/80F87502-B264-4BF3-8200-4B9A69C99189/Hi Gijo.app/Frameworks/libswiftCore.dylib: mmap() errno=1 validating first page of '/private/var/mobile/Containers/Bundle/Application/80F87502-B264-4BF3-8200-4B9A69C99189/Hi Gijo.app/Frameworks/libswiftCore.dylib'
(lldb)
I searched a lot and find to method to fix it. But none of them worked for me.
'Embedded content contains swift code' = Yes.
adding '#executable_path/Frameworks' to runpath.
Can someone pls tell me how can i fix this? Will reinstalling Yosemite/Xcode fix this? (I only have the .app file of xcode) Is there any other solution?

The issue is solved. I downloaded the new xcode 7 gm speed .dmg file from apple beta developers and installed. Now everything works fine

Related

dyld: Library not loaded: Reason: image not found

I know there is plenty of topics on this issue, to be honest, I think I have read all of them in the past 3 days, but none of them help me to solve my issue.
I have to build an iOS app implementing a custom framework, build by my own.
When I want to run my app on a real device, here is what I get (XXX is replaced for confidentiality of course) :
dyld: Library not loaded: #rpath/libswiftCore.dylib
Referenced from: /private/var/containers/Bundle/Application/0FCB15D6-B961-47A6-96A1-2CA896634277/XXX.app/Frameworks/XXX.framework/XXX
Reason: image not found
Following all topics, I tried to put the framework in the embedded binaries and stuff, but nothing worked...
If someone has another idea...I'll take it !
I finally found a solution.
The framework was build with an older version of xCode (8.2), so I downgraded my project in xCode 8.2, and the issue vanished...not sure this is the best way to resolve it, but it works.

dylib missing on iOS application

I am trying to port a program made using OpenCV 2.4 (not 3) from OSX to iOS 7 (not 8, or 9)
I followed their tutorial, that worked until it complained of jpeg linking errors, I pasted the errors on google, and found on their issue tracker a solution, and a link to the jpeg library, I downloaded it, did all the steps correctly, and now it compiles and runs, but crashes on startup and complains with the following error:
dyld: Library not loaded: /opt/libjpeg-turbo/lib/libjpeg.62.dylib
Reason: image not found
I have no idea how to fix it
Go to your Project -> Target -> General -> Linked Frameworks and Libraries and try changing the status of the libjpeg.a library you linked to "Optional" instead of "Required".
I was having the same exact issue and changing the status fixed the crash for me. Not sure why.

xcode gm ios 8 gm swift today extension crash in simulator and device: Library not loaded: #rpath/libswiftCore.dylib

I get this error when I run my Today extension for iOS:
dyld: Library not loaded: #rpath/libswiftCore.dylib
Referenced from: /Users/andy/Library/Developer/CoreSimulator/Devices/724FF0C3-6622-4D12-865A-90244C8C63C1/data/Containers/Bundle/Application/30D8974B-ED1A-4F3A-8958-E9B7AA8901A9/App.app/PlugIns/Today.appex/Today
Reason: image not found
I've restarted, uninstalled, installed xcode, rebooted my machine, created a fresh Today extension and I still got this error :-/
Same problem on simulator and on device..
Do you have any idea?
Build settings -> "Embeded content contains Swift Code" -> YES seems to do the trick.
Thanks #dlinsin on twitter
If still not working check this too:
https://stackoverflow.com/a/25247890/2184338
mine is:
edit:
if still still not:
Check "runpath search paths"
Check Linked Frameworks (I only have NotificationCenter.framework in
my case)
Product->clean
Restart xcode
Restart machine
Check provisioning and signature
I also met this problem, but Build settings -> "Embeded content contains Swift Code" -> YES invalid

dyld: Library not loaded: #rpath/libswift_stdlib_core.dylib when running on iPhone

Update 2: This is an old question involving the developer beta of iOS 8 and Xcode. The problem was that the Swift standard library wasn't included in the iPhone 4s iOS 8 beta. The issue has been resolved in the release.
Update: I've been getting fed up with the errors and crashes that come along with beta software, so I decided to reset my phone to iOS 7.1.1 and now the error is gone... I have no idea what is going on, but I'm going to assume its a bug since iOS 8 is still in beta. I will file a bug report with Apple and hope it gets resolved with the next seed.
As many other people before me, I am receiving the following error message when running a swift-based app on my iPhone (4S running iOS 8.0 beta 1):
dyld: Library not loaded: #rpath/libswift_stdlib_core.dylib
Referenced from: /private/var/mobile/Containers/Bundle/Application/
CDC7263B-9F18-4369-87CC-F36DB5163B99/TESTPROJECT.app/TESTPROJECT
Reason: no suitable image found. Did find:
/private/var/mobile/Containers/Bundle/Application/
CDC7263B-9F18-4369-87CC-F36DB5163B99/TESTPROJECT.app/Frameworks/
libswift_stdlib_core.dylib: mmap() error 1 at address=0x00206000,
size=0x00128000 segment=__TEXT in Segment::map() mapping
/private/var/mobile/Containers/Bundle/Application/
CDC7263B-9F18-4369-87CC-F36DB5163B99/TESTPROJECT.app/Frameworks/
libswift_stdlib_core.dylib
When running on the iOS simulator (iPhone 4S), I get the following (many times):
SetAppThreadPriority: setpriority failed with error 45
- This is a new single view application project generated from the built-in templates with Xcode 6 beta, with none of my own code. (Also happens with an empty application)
- I have already tried the solution found here (restarting Xcode)
I can't seem to find any other way of moving/accessing the required swift library.
For me, quitting and relaunching Xcode made this go away.
I ran into the same problem and I think it maybe because the app has to be configured to dynamically load certain frameworks. In any case changing the "Runpath Search Paths" build setting to "#executable_path/Frameworks" seemed to fix the problem.
I'm guessing that Xcode sets this automatically for new projects but older projects may need to be fixed manually. In my older project it was blank.
I hit this problem in simulator. I tried some settings listed here http://ikevin.tw/?p=174.
In summary, Defines Module -> Yes, Embedded Content Contains Swift Code -> Yes, Product Module Name -> [My product name].
These changes managed to get me to launch and run.
The trick is that afterwards, I reverted the changes to see which of them actually made a difference. After reverting all of them, the app still launched. So it's completely unclear what actually caused the app to end up launching.
I'm guessing your iPhone 4S is lower than iOS 6. We also did regression tests on iPhone 4S's on iOS 6 and 7 but they were all fine. Devices on iOS 5 and 5.1 had the same error as you have though.
I had this issue using an Ad Hoc (or enterprise) mobileprovision with a production certificate. Switching to a development certificate and mobileprovision solved the issue.
99% of the time when you get an error like this when upgrading the beta, it's the cache in ~/Library/Caches/com.apple.dt.Xcode* directories. Delete these and rebuild.
I had the same issue on an exploratory project. When I tried to build on a device I got the error. All I had to do was set the 'Provisioning Profile' in 'Code Signing' and everything worked.

dyld isuess (Library not loaded)

I have this message when I build my project:
dyld: Library not loaded:
#rpath/iPhoneSimulatorRemoteClient.framework/Versions/A/iPhoneSimulatorRemoteClient
Referenced from: /Users/dev01/mobile/ios/Test/test/testTests/FoneMonkey/bin/iphonesim
Reason: image not found
This is dynamic link error and as I understand correct this error came because image not found. is this correct?
What steps should be taken to resolve errors?
I have found this link and as I understad this error came because I use xcode 4.3. Now I have try this on 4.2 and everething work good.
But I not have any idea how to run it on XCode 4.3
Maybe you have this problem after adding new library and you linked it in actual framework path, if you drag this library in embeded framework path then problem will solve. Another variant is that in build scheme you have enabled memory managment malloc, if you turn it off problem will be solved.
Check your SDK project settings (i.e. when passing from SDK 6.x to 7.x) maybe one of library was not compiled for architecture and project target. And the paths. Clean DerivedData and delete app from simulator (if it is there).
If you still need the Sdk just copy it from Xcode 4.6.(3) both for device and simulator and see if this solve your problem.

Resources