gpt4 book ai didi

ios - 使用 Facebook SDK 归档项目时 Xcode clang 段错误

转载 作者:行者123 更新时间:2023-11-30 13:28:55 25 4
gpt4 key购买 nike

我正在 Xcode 7.2 中构建 Swift 项目,我已成功为模拟器 (iOS 9.2) 和两个不同的版本构建它iOS 设备(iOS 9.3),但是当我尝试存档我的项目时,出现段错误。我几乎可以肯定 Facebook SDK(最新版本)有问题,因为当我删除 Facebook frameworks< 时,Xcode 成功创建了存档 以及与我的项目相关的所有 Facebook 代码。

起初,当我为 iOS 模拟器构建有关自动链接 Bolts.framework 的警告时,该模拟器由 FBSDKCoreKit 使用,我想这就是问题所在,我通过将 Bolts.framework 添加到 framework 目录中解决了这个问题,但 clang 一直出现段错误。

我需要的所有Facebook框架都由Xcode在“构建阶段”->“将二进制与库链接”和“常规”->“中正确链接链接的框架和库''框架搜索路径' 指向正确的方向。我通过 Bridging Header 将框架公开给 Swift

这是段错误:

Ld /Users/user1/Library/Developer/Xcode/DerivedData/[PROJECT_NAME-aghpdhmffnurkjfosupvbolgwxmn/Build/Intermediates/ArchiveIntermediates/[PROJECT NAME]/IntermediateBuildFilesPath/[PROJECT NAME].build/Release-iphoneos/[PROJECT NAME].build/Objects-normal/armv7/[PROJECT NAME] normal armv7
cd "/Users/user1/Desktop/[PROJECT NAME]"
export IPHONEOS_DEPLOYMENT_TARGET=9.2
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.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 armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk -L/Users/user1/Library/Developer/Xcode/DerivedData/[PROJECT_NAME]-aghpdhmffnurkjfosupvbolgwxmn/Build/Intermediates/ArchiveIntermediates/[PROJECT NAME]/BuildProductsPath/Release-iphoneos -F/Users/user1/Library/Developer/Xcode/DerivedData/[PROJECT_NAME]-aghpdhmffnurkjfosupvbolgwxmn/Build/Intermediates/ArchiveIntermediates/[PROJECT NAME]/BuildProductsPath/Release-iphoneos -F/Users/user1/path/to/facebook-sdks/FacebookSDKs-iOS-20160412 -filelist /Users/user1/Library/Developer/Xcode/DerivedData/[PROJECT_NAME]-aghpdhmffnurkjfosupvbolgwxmn/Build/Intermediates/ArchiveIntermediates/[PROJECT NAME]/IntermediateBuildFilesPath/[PROJECT NAME].build/Release-iphoneos/[PROJECT NAME].build/Objects-normal/armv7/[PROJECT NAME].LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -miphoneos-version-min=9.2 -dead_strip -fembed-bitcode -Xlinker -bitcode_verify -Xlinker -bitcode_hide_symbols -Xlinker -bitcode_symbol_map -Xlinker /Users/user1/Library/Developer/Xcode/DerivedData/[PROJECT_NAME]-aghpdhmffnurkjfosupvbolgwxmn/Build/Intermediates/ArchiveIntermediates/[PROJECT NAME]/BuildProductsPath/Release-iphoneos -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -Xlinker -add_ast_path -Xlinker /Users/user1/Library/Developer/Xcode/DerivedData/[PROJECT_NAME]-aghpdhmffnurkjfosupvbolgwxmn/Build/Intermediates/ArchiveIntermediates/[PROJECT NAME]/IntermediateBuildFilesPath/[PROJECT NAME].build/Release-iphoneos/[PROJECT NAME].build/Objects-normal/armv7/[PROJECT_NAME].swiftmodule -framework Bolts -framework FBSDKCoreKit -framework FBSDKShareKit -Xlinker -dependency_info -Xlinker /Users/user1/Library/Developer/Xcode/DerivedData/[PROJECT_NAME]-aghpdhmffnurkjfosupvbolgwxmn/Build/Intermediates/ArchiveIntermediates/[PROJECT NAME]/IntermediateBuildFilesPath/[PROJECT NAME].build/Release-iphoneos/[PROJECT NAME].build/Objects-normal/armv7/[PROJECT NAME]_dependency_info.dat -o /Users/user1/Library/Developer/Xcode/DerivedData/[PROJECT_NAME]-aghpdhmffnurkjfosupvbolgwxmn/Build/Intermediates/ArchiveIntermediates/[PROJECT NAME]/IntermediateBuildFilesPath/[PROJECT NAME].build/Release-iphoneos/[PROJECT NAME].build/Objects-normal/armv7/[PROJECT NAME]

clang: error: unable to execute command: Segmentation fault: 11
clang: error: linker command failed due to signal (use -v to see invocation)

有什么想法吗?

最佳答案

使用 Xcode 7.2 归档项目时,最新版本的 Facebook SDK 似乎无法工作。由于更新到 El CapitanXcode 7.3 对我来说不是一个选择,因此我必须下载 Facebook SDK 以前的版本才能使其正常工作。

关于ios - 使用 Facebook SDK 归档项目时 Xcode clang 段错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36806285/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com