Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying to run ChartsDemo on iOS Simulator (image not found) #2035

Closed
tedhogan-zz opened this issue Jan 4, 2017 · 7 comments
Closed

Comments

@tedhogan-zz
Copy link

Hi,

When I try to run the ChartsDemo on the iOS Simulator using Xcode 8.1, I get the following crash and error:

dyld: Library not loaded: @rpath/RealmSwift.framework/RealmSwift
Referenced from: /Users/username/Library/Developer/Xcode/DerivedData/ChartsDemo-fmyrryaldqtgmlfcymgmkxrlbxbx/Build/Products/Debug-iphonesimulator/ChartsRealm.framework/ChartsRealm
Reason: image not found

I've run carthage checkout in the main directory to pull in Realm. All of the targets build fine. Does anyone know what I could be forgetting? Thanks.

@xibo55
Copy link

xibo55 commented Jan 5, 2017

Same problem here +1

@xibo55
Copy link

xibo55 commented Jan 5, 2017

I have been able to work around this problem on simulator, by copying the missing RealmSwift framework files from ~/Carthage/Build/iOS/ directory. You will see 2 files in there. I am not sure so I just copied both of these files into the compile-time directory and put them along with other frameworks, in your case that destination directory would be:

/Users/username/Library/Developer/Xcode/DerivedData/ChartsDemo-fmyrryaldqtgmlfcymgmkxrlbxbx/Build/Products/Debug-iphonesimulator/

Compile and it runs good for me on simulator. Hope this helps.

@liuxuan30
Copy link
Member

Weird.. but you can try as @xibo55 said, or maybe a rebuild

@jpegjames
Copy link

@xibo55 and @liuxuan30: I'm still getting the same issue. I've tried to manually move the RealmSwift framework as well clearing and rebuilding and I can't get it to compile.

@yimingtang
Copy link

I think the project didn't use Carthage correctly.

Here are docs of Carthage and Realm. They show the right way to integrate Realm.

To me, the quick fix is:

  • Add Realm.framework and RealmSwift.framework to ChartsRealm.
  • Add a Run Script phase to ChartsRealm to copy the two frameworks.

@liuxuan30
Copy link
Member

I never met this issue before, just let carthage handles every thing and it built fine... adding @danielgindi or @petester42 to help

@pmairoldi
Copy link
Collaborator

if I'm understanding correctly you want ChartsRealm to copy its dependencies? From my experience with Carthage this isn't really a thing. Usually you have to add the framework you want plus all of its dependencies to you app.

I'd have to look at a bunch of other frameworks to see what is the norm but if copying the dependencies is something that makes people's lives easier then I'm all for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants