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

cannot compile ios charts because of Ream environment missing. #733

Closed
shawn-kb opened this issue Feb 2, 2016 · 9 comments
Closed

cannot compile ios charts because of Ream environment missing. #733

shawn-kb opened this issue Feb 2, 2016 · 9 comments

Comments

@shawn-kb
Copy link

shawn-kb commented Feb 2, 2016

greetings. I am trying to build my app with ios charts. Everything seems to import ok, i get code completion when i am writing. but when i tried to build, i get this error.

ld: framework not found Realm for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

i know that it's written here that I don't have to use Realm, but removing the Realm directory and checking it as "optional" did not help at all.

i am using xcode 7.2

thanks for any tips

@liuxuan30
Copy link
Member

As README said, you have to remove all the Realm related stuff if you don't need it.
Apparently Realm is still in your project setting, so try find it out.
ld: framework not found Realm for architecture x86_64 is the clue, you have to remove it from framework

@shawn-kb
Copy link
Author

shawn-kb commented Feb 3, 2016

ok, thanks much

@dpuleri
Copy link

dpuleri commented Feb 11, 2016

How did you solve this? I'm having the same problem after I add the Charts dependency via cocoapods.

@danielgindi
Copy link
Collaborator

Realm is now separate framework, so if you want to import it - you need ChartsRealm, otherwise everything should work smoothly. This is a change in v2.2.2 to make things easier.

@danielgindi
Copy link
Collaborator

Just make sure you are working with 2.2.2 or later

@dpuleri
Copy link

dpuleri commented Feb 11, 2016

I hate to be a noob. But I'm using 2.2.1 since that's what came in via the cocoapod and I also am only using Charts functionality, not Realm.

However, I'm getting this sort of output from the linker whenever I try to compile:


Ld /Users/daniel/Library/Developer/Xcode/DerivedData/AppName-bwzdpvjkoxmrmadrvjwvntlhxqmx/Build/Products/Debug-iphonesimulator/AppName.app/AppName normal x86_64
    cd /Users/daniel/Dropbox/iOS/AppName
    export IPHONEOS_DEPLOYMENT_TARGET=9.2
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk -L/Users/daniel/Library/Developer/Xcode/DerivedData/AppName-bwzdpvjkoxmrmadrvjwvntlhxqmx/Build/Products/Debug-iphonesimulator -F/Users/daniel/Library/Developer/Xcode/DerivedData/AppName-bwzdpvjkoxmrmadrvjwvntlhxqmx/Build/Products/Debug-iphonesimulator -filelist /Users/daniel/Library/Developer/Xcode/DerivedData/AppName-bwzdpvjkoxmrmadrvjwvntlhxqmx/Build/Intermediates/AppName.build/Debug-iphonesimulator/AppName.build/Objects-normal/x86_64/AppName.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=9.2 -Xlinker -objc_abi_version -Xlinker 2 -framework Charts -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -add_ast_path -Xlinker /Users/daniel/Library/Developer/Xcode/DerivedData/AppName-bwzdpvjkoxmrmadrvjwvntlhxqmx/Build/Intermediates/AppName.build/Debug-iphonesimulator/AppName.build/Objects-normal/x86_64/AppName.swiftmodule -Xlinker -dependency_info -Xlinker /Users/daniel/Library/Developer/Xcode/DerivedData/AppName-bwzdpvjkoxmrmadrvjwvntlhxqmx/Build/Intermediates/AppName.build/Debug-iphonesimulator/AppName.build/Objects-normal/x86_64/AppName_dependency_info.dat -o /Users/daniel/Library/Developer/Xcode/DerivedData/AppName-bwzdpvjkoxmrmadrvjwvntlhxqmx/Build/Products/Debug-iphonesimulator/AppName.app/AppName

ld: framework not found Realm for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I feel like it may be something obvious, but I'm just too inexperienced.

@danielgindi
Copy link
Collaborator

As I said, use 2.2.2 and your problems will be solved.

@dpuleri
Copy link

dpuleri commented Feb 11, 2016

I was looking through the issues and it seems that cocoapod 2.2.1 is the 2.2.2 branch in the main repo if I'm reading #725 correctly.

Anyways, my problem was a combination of not knowing how to use cocoapods in general and some weird setting issues. I would recommend future newbies like me this tutorial--main thing is that when you use pods you have to open your project from the .xcworkspace file instead of the .xcodeproj file. Also, this stackoverflow question helped me when I was getting errors about overriding project configs using the pods.

Thanks for the help though, Daniel!

@dpuleri
Copy link

dpuleri commented Feb 11, 2016

Oh another add, the reason I was getting the error from above was because I was using the 2.2.1 framework added manually and then switched to cocoa pods. But when I switched XCode still had a cache of my previous builds so I needed to delete that cache for it to build from scratch again. Another tip for troubleshooting...

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

4 participants