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

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

Related

Error while compiling the project with an Xcode 9.3

I have a problem when I try to compile my project on real device. It says build succeeded and then I get the error below.
dyld: Library not loaded: #rpath/Agrume.framework/Agrume Referenced
from:
/var/containers/Bundle/Application/E3ABC8B5-A3C0-4FE3-B395-6A171C9E0EF6/myapp.app/myapp
Reason: image not found (lldb)
I tried to add the framework in the settings Build Phases/Build settings but it doesn't work.
You are probably not embedding the framework in your application.
Look at the General settings for your application target. There should be a section called "embedded binaries". Add your linked framework to that, and it should be OK. Here's an example:
I had the same issue and it was only fixed by rebuilding the used framework with newer swift version (4.0.3 -> 4.1). I had to download the library source and make a build myself.

Xcode Library included but not found?

I'm working with Wikitude AR and on running their out-of-the-box example I'm running into an error.
Error:
dyld`dyld_fatal_error:
-> 0x12008d088 <+0>: brk #0x3
Output:
dyld: Library not loaded: #rpath/WikitudeNativeSDK.framework/WikitudeNativeSDK
Referenced from: /var/containers/Bundle/Application/F826D5F6-554F-4CFA-B3DA-D3522636E93A/unityexample.app/unityexample
Reason: image not found
Here's a screen of the included library: I've also tried re-adding it
So why is this framework not found?
Already tried: library linked but Xcode says "file not found."
Xcode 7.3.1 | OS X 10.11.4
Solution
In newer versions of Xcode / iOS you need to do the additional step of adding the framework as an Embedded Binary
https://stackoverflow.com/a/28469804/332578
Can you please try enabling the following:
If that doesn't work then best will to go through the example app supplied by the framework provider or check the documentation page aginan. It seems they have lot of dependancy frameworks to be added for it to work:
http://www.wikitude.com/developer/documentation/ios
This may work:
Delete the framework by right click show in finder
Do a clean build Cmd+Shift+K
Then create a new build.
Which XCode version are you using?

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

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

Xcode is crashing when launching app with CoreSpotlight (9.0+) on iOS 8.3

I'm working on integrating CoreSpotlight framework functionality with the app and try to run it on iOS 8.3 device. Every time I've got:
dyld: Library not loaded: /System/Library/Frameworks/CoreSpotlight.framework/CoreSpotlight
Referenced from: /private/var/mobile/Containers/Bundle/Application/F9714BAD-1386-42A7-9B5F-5C06607AF6CE/Quotes.app/Quotes
Reason: image not found
I have marked CoreSpotlight as Optional.
Every target (App + Tests) has set Link Frameworks Automatically to NO and also main project has this flag set the same.
I don't see where is the problem and why this is still not working.
Thank you in advance!
I ran into the same problem, but resolved it this way:
under "Linked Frameworks and Library", added CoreSpotlight, and
marked it as Optional
Clean build folder (Alt+Shift+Command+K)
Build and run on iOS8 device
Works for me (Xcode7 Beta4)

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