0

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.

Justin Spahr-Summers
  • 16,893
  • 2
  • 61
  • 79
Daiwei
  • 40,666
  • 3
  • 38
  • 48

1 Answers1

1

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.

Eli Perkins
  • 68
  • 1
  • 6
  • Thanks, ur answer is very close. After I deleted all simulator files, project targets and temp dir of projects (from organizer), it just runs in AppCode. If u can explain some details in ur answer, I will make yours right. – Daiwei Jan 07 '15 at 05:42
  • @Daiwei You mentioned "After I deleted all simulator files, project targets and temp dir of projects (from organizer)" and things just worked. Did you also follow the steps I outlined as well (checking the Run Script phase and Linked Frameworks)? Just trying to clarify which steps worked for you to leave the best possible answer. – Eli Perkins Jan 07 '15 at 15:41
  • Sry, took me too long to response. I didn't check any Run Script. Purely just deleting things. I think "Xcode is properly copying over the framework" part is right, but once the framework is copied, somehow it doesn't check if the framework is available anymore. Same behavior for AppCode. – Daiwei Jan 14 '15 at 21:21