gpt4 book ai didi

ios - 使用集成 facebook SDK 归档 ios 应用程序时出现链接器错误

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

  • 我有一个 swift 的 IOS 应用程序,运行良好。
  • 我已将 Facebook SDK 集成到我的应用程序中,并且常见测试运行良好。我可以在 iPad 和模拟器中运行该应用
  • 我在构建应用程序期间遇到了第一个链接错误。我通过将 FacebookSDK 框架的路径添加到“build设置”中的“框架搜索路径”解决了这个问题。
  • 我的框架已添加到项目中以进行链接:

enter image description here

到目前为止一切顺利,但是:当存档应用程序以在苹果商店提交时,我收到链接器错误。我已经清理了该项目并重建了它的工作原理。还分析了该应用程序的工作原理。只有归档才会抛出错误:

Ld /Users/user/Library/Developer/Xcode/DerivedData/myapp-ezoabbyxtblpfughttvlaqtuxxeb/Build/Intermediates/ArchiveIntermediates/WORLDHISTORY_ATLAS/IntermediateBuildFilesPath/myapp.build/Release-iphoneos/WHatl.build/Objects-normal/armv7/WHatl normal armv7
cd /Users/user/Desktop/Prototypes
export IPHONEOS_DEPLOYMENT_TARGET=8.1
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/user/Library/Developer/Xcode/DerivedData/myapp-ezoabbyxtblpfughttvlaqtuxxeb/Build/Intermediates/ArchiveIntermediates/WORLDHISTORY_ATLAS/BuildProductsPath/Release-iphoneos -F/Users/user/Library/Developer/Xcode/DerivedData/myapp-ezoabbyxtblpfughttvlaqtuxxeb/Build/Intermediates/ArchiveIntermediates/WORLDHISTORY_ATLAS/BuildProductsPath/Release-iphoneos -F/Users/user/Documents/FacebookSDKs-iOS-4 -filelist /Users/user/Library/Developer/Xcode/DerivedData/myapp-ezoabbyxtblpfughttvlaqtuxxeb/Build/Intermediates/ArchiveIntermediates/WORLDHISTORY_ATLAS/IntermediateBuildFilesPath/myapp.build/Release-iphoneos/WHatl.build/Objects-normal/armv7/WHatl.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -miphoneos-version-min=8.1 -dead_strip -fembed-bitcode -Xlinker -bitcode_verify -Xlinker -bitcode_hide_symbols -Xlinker -bitcode_symbol_map -Xlinker /Users/user/Library/Developer/Xcode/DerivedData/myapp-ezoabbyxtblpfughttvlaqtuxxeb/Build/Intermediates/ArchiveIntermediates/WORLDHISTORY_ATLAS/BuildProductsPath/Release-iphoneos -fobjc-arc -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -Xlinker -add_ast_path -Xlinker /Users/user/Library/Developer/Xcode/DerivedData/myapp-ezoabbyxtblpfughttvlaqtuxxeb/Build/Intermediates/ArchiveIntermediates/WORLDHISTORY_ATLAS/IntermediateBuildFilesPath/myapp.build/Release-iphoneos/WHatl.build/Objects-normal/armv7/WHatl.swiftmodule -lz -framework FBSDKCoreKit -framework FBSDKShareKit -framework FBSDKLoginKit -lsqlite3 -Xlinker -dependency_info -Xlinker /Users/user/Library/Developer/Xcode/DerivedData/myapp-ezoabbyxtblpfughttvlaqtuxxeb/Build/Intermediates/ArchiveIntermediates/WORLDHISTORY_ATLAS/IntermediateBuildFilesPath/myapp.build/Release-iphoneos/WHatl.build/Objects-normal/armv7/WHatl_dependency_info.dat -o /Users/user/Library/Developer/Xcode/DerivedData/myapp-ezoabbyxtblpfughttvlaqtuxxeb/Build/Intermediates/ArchiveIntermediates/WORLDHISTORY_ATLAS/IntermediateBuildFilesPath/myapp.build/Release-iphoneos/WHatl.build/Objects-normal/armv7/WHatl

ld: warning: Auto-Linking supplied '/Users/user/Documents/FacebookSDKs-iOS-4/Bolts.framework/Bolts', framework linker option at /Users/user/Documents/FacebookSDKs-iOS-4/Bolts.framework/Bolts is not a dylib
clang: error: unable to execute command: Segmentation fault: 11
clang: error: linker command failed due to signal (use -v to see invocation)

有什么提示吗?如何分析?

更新

像其他 3 个框架一样,我还添加了 Bolts.framework。该应用程序仍然可以在模拟器和设备上构建和运行,但存档仍然会抛出错误,但错误不同:

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

有什么帮助吗?

更新2

我想我已经解决了这个问题。我在build设置中将“启用位码”修改为“否”。但我不知道这个变化会产生什么影响。有人知道吗?

最佳答案

尝试以下步骤:选择 Xcode -> 转到窗口选项 -> 选择项目 -> 删除派生数据 -> 退出 Xcode -> 再次运行应用程序 -> 存档应用程序

关于ios - 使用集成 facebook SDK 归档 ios 应用程序时出现链接器错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37772334/

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