I am trying to create a dynamic framework for an iOS application. Thanks to the new version of Xcode (6), we can select the Cocoa Touch Framework when we create a new project, and we no longer need to add an aggregated goal, run the script and do it like that. I have no problem creating the framework. But when I try to use it in an iOS application, I get some architecture issues.
ld: warning: ignoring file /Library/Frameworks/MyFramework.framework/MyFramework, file was built for x86_64 which is not the architecture being linked (arm64): /Library/Frameworks/MyFramework.framework/MyFramework Undefined symbols for architecture arm64: "_OBJC_CLASS_$_MyFrameworkWebService", referenced from: objc-class-ref in AppDelegate.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) ld: warning: ignoring file /Library/Frameworks/MyFramework.framework/MyFramework, file was built for x86_64 which is not the architecture being linked (armv7): /Library/Frameworks/MyFramework.framework/MyFramework Undefined symbols for architecture armv7: "_OBJC_CLASS_$_MyFrameworkWebService", referenced from: objc-class-ref in AppDelegate.o ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Well, I tried to change the settings of the project and the target of the framework (Architecture and Create only valid architecture and Virtual architectures). I did the same for the iOS app project, but nothing works. I think I didn’t understand something.
For example, when I create a framework only for i386 (iOS Simulator), check with the command line "xcrun lipo-info MyFramework", I have a problem that
ld: warning: ignoring file /Library/Frameworks/MyFramework.framework/MyFramework, the file was created for x86_64, which is not related to architecture (i386) ...
If someone can help me get a framework that works for all iOS architectures, including simulators.
cocoa ios8 xcode6
François Delaplace Jun 04 '14 at 1:57 a.m. 2014-06-04 13:57
source share