Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Framework not found IOSurface for architecture arm64

Tags:

xcode

ios

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.

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)

like image 363
Randall Wang Avatar asked Jun 09 '17 06:06

Randall Wang


3 Answers

Right click on your new Xcode9-Beta.app and select 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.app and paste the required framework(s) there.

like image 57
Luis E. Prado Avatar answered Nov 18 '22 13:11

Luis E. Prado


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.

To fix this, I simply executed:

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer/

with /Applications/Xcode.app being the Xcode8.x version.

like image 4
Sven Driemecker Avatar answered Nov 18 '22 11:11

Sven Driemecker


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.

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.

At least this worked for me.

like image 3
leolobato Avatar answered Nov 18 '22 11:11

leolobato