Xcode Does Not Found Symbols For A… | Apple Developer Forums
Maybe your like
- Apple Developer
- Apple Developer
- Sign in
- Create account
Xcode (11.3.1) is having issues to found x86_64 architecture symbols while using XCFrameworks. The problem is that the architecture is inside the XCFramework, but first let me show you how the framework was created.
To generate the XCFramework I made two Archives:
- For iOS:xcodebuild archive -scheme MyPod -target MyPod -destination="iOS" -archivePath build/ios.xcarchive -derivedDataPath /tmp/iphoneos -sdk iphoneos SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES
- For iOS Simulator:xcodebuild archive -scheme MyPod -target MyPod -destination="iOS Simulator" -archivePath build/iossimulator.xcarchive -derivedDataPath /tmp/iphoneos -sdk iphonesimulator SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES
Then I generated the XCFramework:
xcodebuild -create-xcframework -framework ./build/ios.xcarchive/Products/Library/Frameworks/MyPod.framework -framework ./build/iossimulator.xcarchive/Products/Library/Frameworks/MyPod.framework -output xcframework/MyPod.xcframeworkHere is the XCFramework created where we can see the two architectures: XCFramework preview
Once it was created, I distributed it by Cocoapods (1.9.0.beta.3). So my .podspec looks like:
s.subspec "Vendored" do |framework| framework.vendored_framework = 'xcframework/MyPod.xcframework' endThen I consumed it in another project, and when compiling, it fails because it can't find the architecture for the simulator (on devices it works)
The log I got is the following:
ld: warning: ignoring file /Path/To/MyProject/Pods/MyPod/xcframework/MyPod.xcframework/ios-armv7_arm64/MyPod.framework/MyPod, missing required architecture x86_64 in file /Path/To/MyProject/Pods/MyPod/xcframework/MyPod.xcframework/ios-armv7_arm64/MyPod.framework/MyPod (2 slices) Undefined symbols for architecture x86_64: "_OBJC_CLASS_$MyPod", referenced from: objc-class-ref in SomeClass.o ld: symbol(s) not found for architecture x86_64It looks like xcodebuild always go to the
ios-armv7_arm64 folder instead the ios-i386_x86_64-simulator one, any ideas?Thank you!
Answered by DTS Engineer in 405839022The destination arguments should be -destination "generic/platform=iOS" and -destination "generic/platform=iOS Simulator". Here is the documentation with this info. Also, test integrating the XCFramework into another project without involving CocoaPods to determine if they are contributing to this issue.
Boost Copy to clipboard Share this post Copied to Clipboard Replies 3 Boosts 0 Views 12k Participants 3 DTS Engineer OP Apple Feb ’20 Accepted AnswerThe destination arguments should be -destination "generic/platform=iOS" and -destination "generic/platform=iOS Simulator". Here is the documentation with this info. Also, test integrating the XCFramework into another project without involving CocoaPods to determine if they are contributing to this issue.
0 comments 1 Copy to clipboard Share this post Copied to Clipboard Load more Add comment LFuryk OP Feb ’20Thank you for the answer!
I tried again without using Cocoapods y it works!
0 comments 0 Copy to clipboard Share this post Copied to Clipboard Load more Add comment Onkar OP Dec ’20 I am facing similar issue with XCode 12.2 for my custom framework. I tried by specifying -destination. Still result is same.Generated XCFramework don't have x86_64 architecture symbols. 0 comments 1 Copy to clipboard Share this post Copied to Clipboard Load more Add comment Xcode does not found symbols for architecture x86_64 using XCFrameworks First post date Last post date QTag » Architecture X86_64
-
X86-64 - Wikipedia
-
X86-64 – Wikipedia Tiếng Việt
-
Undefined Symbols For Architecture X86_64: · Issue #4238 - GitHub
-
React Native Ios - Undefined Symbols For Architecture X86_64
-
Building For IOS Simulator-x86_64 … | Apple Developer Forums
-
Lambda Instruction Set Architectures - AWS Documentation
-
[Swift] Getting Duplicate Symbols For Architecture X86_64 Error - Realm
-
"duplicate Symbols For Architecture X86_64" Error When Building With ...
-
Troubleshooting: KMP And Undefined Symbols For Architecture ...
-
How To Fix It: Undefined Symbols For Architecture X86_64:
-
Leverage Multi-CPU Architecture Support - Docker Documentation
-
Support 64-bit Architectures - Android Developers
-
[SOLVED]Undefined Symbols For Architecture X86_64? But Only For ...