我正在使用以下命令使用bitcode为发布构建我的FAT框架:
xcodebuild -sdk iphoneos CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
xcodebuild -sdk iphonesimulator CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
lipo -create /path/to/iphone/framework /path/to/simulator/framework -output /path/to/universal/framework
我的构建标志是这样的:
但是当我使用bitcode将框架集成到一个不同的项目中时,使用:
将其归档xcodebuild -workspace /path/to/MyApp/app.xcworkspace -scheme app_scheme archive -archivePath /path/to/MyArchive/MyApp.xcarchive | xcpretty
我收到以下错误:
❌ ld: bitcode bundle could not be generated because '/path/to/my/app/Frameworks/MyFramework.framework/MyFramework' was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build for architecture armv7
❌ clang: error: linker command failed with exit code 1 (use -v to see invocation)
▸ Linking MyApp
❌ ld: bitcode bundle could not be generated because '/tmp/insert_viewer_build/build_1.46.0.2024_1491206455/Frameworks/InsertFramework.framework/InsertFramework' was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build for architecture arm64
❌ clang: error: linker command failed with exit code 1 (use -v to see invocation)