xcode 未找到架构 arm64 的 IOSurface 框架
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/44450673/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Framework not found IOSurface for architecture arm64
提问by Randall Wang
This error is very weird.Everything is just fine yesterday.I install the Xcode 9 beta, and then I use Xcode 8 to run my app on iPhone 6p, iOS 9.3.2(I can do this yesterday, and I can still run the app on the simulator)then I get this error.
这个错误很奇怪。昨天一切都很好。我安装了 Xcode 9 beta,然后我使用 Xcode 8 在 iPhone 6p、iOS 9.3.2 上运行我的应用程序(我昨天可以这样做,我仍然可以运行模拟器上的应用程序)然后我收到这个错误。
I Googled the error, it seems like no one runs into this error before.
我在谷歌上搜索了这个错误,之前似乎没有人遇到过这个错误。
Here is the error log:
这是错误日志:
Ld /Users/tianchi/Library/Developer/Xcode/DerivedData/GlobalDomain-dxjnqhelcuqfqkgiqyycgpwmzail/Build/Products/Debug-iphoneos/Global\ Domain.app/Global\ Domain normal arm64 cd /Users/tianchi/Desktop/ios/trunk export IPHONEOS_DEPLOYMENT_TARGET=8.0 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 arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk -L/Users/tianchi/Library/Developer/Xcode/DerivedData/GlobalDomain-dxjnqhelcuqfqkgiqyycgpwmzail/Build/Products/Debug-iphoneos -L/Users/tianchi/Desktop/ios/trunk/GlobalDomain -L/Users/tianchi/Desktop/ios/trunk/GlobalDomain/GDCommon/GDWeChatPay -L/Users/tianchi/Desktop/ios/trunk/GlobalDomain/GDCommon/ShareSDK/Support/PlatformSDK/WeChatSDK -L/Users/tianchi/Desktop/ios/trunk/GlobalDomain/GDCommon -L/Users/tianchi/Desktop/ios/trunk -F/Users/tianchi/Library/Developer/Xcode/DerivedData/GlobalDomain-dxjnqhelcuqfqkgiqyycgpwmzail/Build/Products/Debug-iphoneos -F/Users/tianchi/Desktop/ios/trunk/GlobalDomain/GDCommon/ShareSDK -F/Users/tianchi/Desktop/ios/trunk/GlobalDomain/GDCommon/ShareSDK/Support/Optional -F/Users/tianchi/Desktop/ios/trunk/GlobalDomain/GDCommon/ShareSDK/Support/PlatformSDK/QQSDK -F/Users/tianchi/Desktop/ios/trunk/GlobalDomain/GDCommon/ShareSDK/Support/Required -F/Users/tianchi/Desktop/ios/trunk/GlobalDomain/GDCommon/MobileAnalytics -F/Users/tianchi/Desktop/ios/trunk/GlobalDomain/GDCommon/GDAlipaySDK -F/Users/tianchi/Desktop/ios/trunk/GlobalDomain/GDCommon/TencentIM -F/Users/tianchi/Desktop/ios/trunk/GlobalDomain/GDCommon/UMeng -F/Users/tianchi/Desktop/ios/trunk/GlobalDomain/GDCommon/ShareSDK/Support/PlatformConnector -F/Users/tianchi/Desktop/ios/trunk/GlobalDomain/GDCommon -filelist /Users/tianchi/Library/Developer/Xcode/DerivedData/GlobalDomain-dxjnqhelcuqfqkgiqyycgpwmzail/Build/Intermediates/GlobalDomain.build/Debug-iphoneos/Global\ Domain.build/Objects-normal/arm64/Global\ Domain.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -miphoneos-version-min=8.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/tianchi/Library/Developer/Xcode/DerivedData/GlobalDomain-dxjnqhelcuqfqkgiqyycgpwmzail/Build/Intermediates/GlobalDomain.build/Debug-iphoneos/Global\ Domain.build/Objects-normal/arm64/Global\ Domain_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fobjc-arc -fobjc-link-runtime -ObjC -lAFNetworking -lCYLTabBarController -lFMDB -lIQKeyboardManager -lMBProgressHUD -lMJRefresh -lMasonry -lsqlite3 -framework CoreGraphics -framework Foundation -framework MobileCoreServices -framework Security -framework SystemConfiguration -framework UIKit -framework StoreKit -framework Security -lz -framework CoreTelephony -framework Crashlytics -framework SystemConfiguration -framework QuartzCore -framework CoreLocation -framework AdSupport -framework UMMobClick -lGDTMobSDK -lsqlite3 -framework JavaScriptCore -lstdc++ -framework TencentOpenAPI -licucore -lresolv -framework UserNotifications -framework UIKit -framework MOBFoundation -framework Foundation -framework CoreGraphics -framework CoreFoundation -framework CFNetwork -framework IMCore -framework ImSDK -framework IMSDKBugly -framework ShareSDKUI /Users/tianchi/Desktop/ios/trunk/GlobalDomain/GDCommon/jpush-ios-2.2.0.a -framework QALHttpSDK -framework WechatConnector -framework ShareSDK -framework QALSDK -framework QQConnector -framework TLSSDK -framework CoreMotion -framework CoreText -framework ShareSDKConnector -framework MessageUI -framework ImageIO -lWeChatSDK -framework Fabric -framework AlipaySDK -lWeChatSDK -framework ShareSDKExtension -lc++ -lPods -Xlinker -dependency_info -Xlinker /Users/tianchi/Library/Developer/Xcode/DerivedData/GlobalDomain-dxjnqhelcuqfqkgiqyycgpwmzail/Build/Intermediates/GlobalDomain.build/Debug-iphoneos/Global\ Domain.build/Objects-normal/arm64/Global\ Domain_dependency_info.dat -o /Users/tianchi/Library/Developer/Xcode/DerivedData/GlobalDomain-dxjnqhelcuqfqkgiqyycgpwmzail/Build/Products/Debug-iphoneos/Global\ Domain.app/Global\ Domain
ld: framework not found IOSurface for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
ld /Users/tianchi/Library/Developer/Xcode/DerivedData/GlobalDomain-dxjnqhelcuqfqkgiqyycgpwmzail/Build/Products/Debug-iphoneos/Global\ Domain.app/Global\ Domain normal arm64 cd /Users/tianchi/Desktop/ios/trunk export IPHONEMENTOS_D =8.0 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 arm64 -isysroot /Applications/Xcode.app /Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3。sdk -L/Users/tianchi/Library/Developer/Xcode/DerivedData/GlobalDomain-dxjnqhelcuqfqkgiqyycgpwmzail/Build/Products/Debug-iphoneos -L/Users/tianchi/Desktop/ios/trunk/GlobalDomain -L/Users/tianchi/Desktop/ ios/trunk/GlobalDomain/GDCommon/GDWeChatPay -L/Users/tianchi/Desktop/ios/trunk/GlobalDomain/GDCommon/ShareSDK/Support/PlatformSDK/WeChatSDK -L/Users/tianchi/Desktop/ios/trunk/GlobalDomain/GDCommon - L/Users/tianchi/Desktop/ios/trunk -F/Users/tianchi/Library/Developer/Xcode/DerivedData/GlobalDomain-dxjnqhelcuqfqkgiqyycgpwmzail/Build/Products/Debug-iphoneos -F/Users/tianchi/Desktop/ios/trunk/ GlobalDomain/GDCommon/ShareSDK -F/Users/tianchi/Desktop/ios/trunk/GlobalDomain/GDCommon/ShareSDK/Support/Optional -F/Users/tianchi/Desktop/ios/trunk/GlobalDomain/GDCommon/ShareSDK/Support/PlatformSDK/ QQSDK-F/Users/tianchi/Desktop/ios/trunk/GlobalDomain/GDCommon/ShareSDK/Support/Required -F/Users/tianchi/Desktop/ios/trunk/GlobalDomain/GDCommon/MobileAnalytics -F/Users/tianchi/Desktop/ios /trunk/GlobalDomain/GDCommon/GDalipaySDK -F/Users/tianchi/Desktop/ios/trunk/GlobalDomain/GDCommon/TencentIM -F/Users/tianchi/Desktop/ios/trunk/GlobalDomain/GDCommon/UMeng -F/Users/tianchi /Desktop/ios/trunk/GlobalDomain/GDCommon/ShareSDK/Support/PlatformConnector -F/Users/tianchi/Desktop/ios/trunk/GlobalDomain/GDCommon -filelist /Users/tianchi/Library/Developer/Xcode/DerivedData/GlobalDomain-dxjnqhelcuqfqkgiqyzailyc /Build/Intermediates/GlobalDomain.build/Debug-iphoneos/Global\ Domain.build/Objects-normal/arm64/Global\ Domain.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -miphoneos-version-min=8。0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/tianchi/Library/Developer/Xcode/DerivedData/GlobalDomain-dxjnqhelcuqfqkgiqyycgpwmzail/Build/Intermediates/GlobalDomain.build/Debug-iphoneos/Global\normal.build/64s-全局\域_lto。o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fobjc-arc -fobjc-link-runtime -ObjC -lAFNetworking -lCYLTabBarController -lFMDB -lIQKeyboardManager -lMBProgressHUD -lMJRefresh -lMasonry -lsqlite3 -framework CoreGraphics -MobileFrameworkCoreService Foundation framework SystemConfiguration -framework UIKit -framework StoreKit -framework Security -lz -framework CoreTelephony -framework Crashlytics -framework SystemConfiguration -framework QuartzCore -framework CoreLocation -framework AdSupport -framework UMMobClick -lGDTMobSDK -lsqlite3 -framework JavaScriptCore -lstdc++ -frameworkTencentOpenAPI -solvlicucore -framework UserNotifications -framework UIKit -framework MOBFoundation -framework Foundation -framework CoreGraphics -framework CoreFoundation -framework CFNetwork -framework IMCore -frameworkImSDK -framework IMSDKBugly -framework ShareSDKUI /Users/tianchi/Desktop/ios/trunk/GlobalDomain/GDCommon/jpush-ios-2.2.0.a -framework QALHttpSDK -framework WechatConnector -framework ShareSDK -framework QALSDK -framework QQConnector -framework TLSSDK - framework CoreMotion -framework CoreText -framework ShareSDKConnector -framework MessageUI -framework ImageIO -lWeChatSDK -framework Fabric -framework AlipaySDK -lWeChatSDK -framework ShareSDKExtension -lc++ -lPods -Xlinker -dependency_info -Xlinker /Users/tianchi/Library/Developer/Xcode/DerivedData/ GlobalDomain-dxjnqhelcuqfqkgiqyycgpwmzail/Build/Intermediates/GlobalDomain.build/Debug-iphoneos/Global\ Domain.build/Objects-normal/arm64/Global\ Domain_dependency_info。dat -o /Users/tianchi/Library/Developer/Xcode/DerivedData/GlobalDomain-dxjnqhelcuqfqkgiqyycgpwmzail/Build/Products/Debug-iphoneos/Global\ Domain.app/Global\ Domain
ld:未找到架构 arm64 clang 的 IOSurface 框架:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)
回答by Luis E. Prado
Right click on your new Xcode9-Beta.app and select Show Package Contents
右键单击新的Xcode9-Beta.app 并选择Show Package Contents
Then navigate to:
然后导航到:
Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/
Then go to this same folder in the package contents of your Xcode8.appand paste the required framework(s) there.
然后转到Xcode8.app包内容中的同一个文件夹并将所需的框架粘贴到那里。
回答by Sven Driemecker
After installing the Xcode9 Beta, you did very likely change your default Xcode with xcode-select -s ...
. That made the framework not found IOSurface for architecture arm64
error pop up when building with Xcode8.3.3 for me.
安装 Xcode9 Beta 后,您很可能将默认 Xcode 更改为xcode-select -s ...
. 这使framework not found IOSurface for architecture arm64
我在使用 Xcode8.3.3 构建时弹出错误。
To fix this, I simply executed:
为了解决这个问题,我简单地执行了:
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer/
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer/
with /Applications/Xcode.app
being the Xcode8.x version.
与/Applications/Xcode.app
Xcode8.x 版本。
回答by leolobato
Most likely you have previously built this project using Xcode 9 (beta, GM or the final release) and re-opened this same project on Xcode 8 and are now trying to build it again.
很可能您之前使用 Xcode 9(测试版、GM 或最终版本)构建了这个项目,并在 Xcode 8 上重新打开了这个相同的项目,现在正在尝试再次构建它。
If you "Clean your build folder" (hold option and click on the Product menu on Xcode), you should be ready to do a fresh build on Xcode 8, without copying any frameworks from Xcode 9.
如果您“清理构建文件夹”(按住选项并单击 Xcode 上的“产品”菜单),您应该准备好在 Xcode 8 上进行全新构建,而无需从 Xcode 9 复制任何框架。
At least this worked for me.
至少这对我有用。
回答by iHTCboy
maybe reason CLANG_MODULES_AUTOLINK
link framework or static libraries, in Build Settings
中 Link Frameworks Automatically
default Yes
to No
。
可能是CLANG_MODULES_AUTOLINK
链接框架或静态库的原因,在Build Settings
中Link Frameworks Automatically
默认Yes
为No
。
回答by xuzepei
I encountered similar issue by installing two versions of Xcode. My solution is reopening the project with lower version Xcode, then remove and add the relative frameworks.
我在安装两个版本的 Xcode 时遇到了类似的问题。我的解决方案是使用较低版本的Xcode重新打开项目,然后删除并添加相关框架。
回答by bingo
i fix it,you must use Xcode8 build you use framework,because Xcode9 don't have this framework
我修复了它,你必须使用 Xcode8 构建你使用框架,因为 Xcode9 没有这个框架