- 我有一個IOS應用程序在swift中工作正常。
- 我已將Facebook SDK集成到我的應用程序中,並且常用測試正常工作。我可以在我的iPad和模擬器上運行應用程序
- 我在構建應用程序期間首先發生鏈接錯誤。我通過將FacebookSDK框架的路徑添加到「構建設置」中的「框架搜索路徑」來解決此問題。
- 我的框架將被添加到項目鏈接:
鏈接器錯誤當歸檔ios應用程序與集成facebook SDK
到目前爲止好,但: 當歸檔應用程序在蘋果商店提交我得到一個鏈接錯誤。我已經清理了這個項目並重建了其中的工作。此外分析應用程序工作。只有存檔纔會拋出錯誤:
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)
任何提示?如何分析?
UPDATE
我還添加了作爲Bolts.framework像其他3個框架。該應用程序仍然可以在模擬器和設備上運行,但歸檔仍然會導致錯誤,但是不同:
clang: error: unable to execute command: Segmentation fault: 11
clang: error: linker command failed due to signal (use -v to see invocation)
有幫助嗎?
更新2
我想我解決了這個問題。我在構建設置中將「啓用位碼」修改爲「否」。但我不知道這種變化會產生什麼影響。 有誰知道?
您是否嘗試過刪除您的項目的派生數據? –