AppCode run iOS simulator "Library not loaded" - ios

I was trying AppCode 3.1. I had a iOS 8.1 project with XCode 6.1.1 with one one linked framework. The framework is SwifteriOS.framework build with Carthage (https://github.com/Carthage/Carthage) like this:
github "mattdonnelly/Swifter" == 1.4.1
Everything in XCode works fine, but when I tried to start the project in simulator with AppCode, the console gives me:
/Users/daiwei/Library/Caches/appCode31/DerivedData/Avetuc-36d98cf8/Build/Products/Debug-iphonesimulator/Avetuc.app
Simulator session started with process 17951
Debugger attached to process 17951
dyld: Library not loaded: #rpath/SwifteriOS.framework/SwifteriOS
Referenced from: /Users/daiwei/Library/Developer/CoreSimulator/Devices/C325D5F4-DDCF-41C5-9F7D-6CC17F175DA4/data/Containers/Bundle/Application/AB30E0FB-7A0F-4914-B6EB-B02B26CB5741/Avetuc.app/Avetuc
Reason: image not found
Exception: EXC_BREAKPOINT (code=EXC_I386_BPT, subcode=0x0))
I can see the simulator launching and showing the launch screen of the app. But app just crash with above message.

image not found usually refers to the framework's binary not being loaded, usually because it's not actually ever copied over to the app's binary.
It could be that Xcode is properly copying over the framework for you, while AppCode doesn't have the instructions to do so. Make sure to follow the Run Script phase instructions (https://github.com/Carthage/Carthage#if-youre-building-for-ios) so that you know for sure that the frameworks will make it over. Also, ensure that the library shows up in "Linked Frameworks and Libraries" as well.

Related

Xcode and Unity missing library 'lGoogleUtilities'

I am working on an App that is made with Unity and I have to build it in Xcode to get it in the App store.
Now I'm running into a problem here. I am getting this error:
library not found for -lGoogleUtilities
However, when I build the app in debug mode and test it on my iPad, there aren't any troubles. But when I try to build it for TestFlight (Toolbar -> Product -> Archive) that error occurs.
I've followed this tutorial to get it working in debug mode (because I had that error there too before)
https://youtu.be/YHHj1bZUbsc (from 6:20).
I am using the 'Google Admob', 'CloudOnce' and 'Play Services Resolver' plugins for Unity. In the debug version the error (before I fixed it in the debug version), was caused by 'Google Admob'. I feel like I am missing a framework or something in the release build.
Alright, so after another few hours of trying and searching I found out that I was actually opening the wrong file, you would think .xcodeproj would be the correct extension, but actually you have to open the .xcodeworkspace file. It compiled for me.

Carthage image not found Xcode 7 Carthage 0.8.0

Currently I'm using Carthage Dependency manager, and Everything works fine. Until I Run the code on my simulator. I get the following error message.
dyld: Library not loaded: #rpath/OAuthSwift.framework/OAuthSwift
Referenced from: /Users/eddwinpaz/Library/Developer/CoreSimulator/Devices/117C3ED9-5B0A-4FCD-B231-5E9BC0ADF821/data/Containers/Bundle/Application/1FC4FA99-7479-44D1-BB71-1A52404BDB4C/App.app/App
Reason: image not found
(lldb)
I've followed the steps on the following tutorial.
http://www.raywenderlich.com/109330/carthage-tutorial-getting-started
I must also mention that I installed manually the Carthage.pgk of Carthage and then removed it and install it via Brew.
There is something I'm forgetting to do?
There can be multiple causes. One cause can be that the framework is being linked with the framework but the framework is not being embedded in the app bundle. The compiler will happily link it for you but the dynamic loader will not find the framework’s image (i.e., binary) at launch.
To resolve this issue, select the project in the Project Navigator, select the app target in the list of targets, select the “Build Phases” tab, and add the framework in the “Embed Frameworks” list. If the framework is already in the list, the problem lies elsewhere.

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)

CocoaPods won't install on device?

So I recently started using CocoaPods and I've gotten a few installed and running without any problems. It works perfectly in the simulator, and if I compile the app to a device through xcode it works fine as well. But when I export the app as an .IPA and install the app on a device my app crashes. The device log states that a library couldn't be loaded. I tried removing the library it could not load, and it proceeded by not being able to load the next library so it seems that the .IPA does not include the CocoaPods at all. I would provide you with my settings in the project file but I don't even know where to start looking or what info to provide you with since I'm very new to CocoaPods.
Here is the error message:
Dyld Error Message:
Library not loaded: #rpath/Charts.framework/Charts
Referenced from: /private/var/mobile/Containers/Bundle/Application/50931ADA-7E77-42C4-BFKA-0EB4A71BCF63/myApp.app/MyApp
Reason: no suitable image found.
Too clarify: It all works fine except when I export the app as an .IPA, so I believe the project hierarchy is correct and the pods are installed correctly. I would bet that there is some sort of project setting that prevents it from being exported?
Edit #1: It works when I export the .IPA without using an Enterprise account, so the issue is somehow connected to the Enterprise account. I read somewhere that the new Cocoa Touch Framework was a bit buggy and couldn't be used with the Enterprise deployment, is CocoaPods using Cocoa Touch Framework? Anyone else have any other suggestions?

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