Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XCode 6 GM: linker error when building for device (Metal not found)

Tags:

xcode6

ios8

I'm trying to build my project in XCode 6 GM for device (base SDK version is 7.1), and I get linker error:

ld: framework not found Metal for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

The same project builds perfectly in XCode 5 without any changes in project settings. (Also, build in XCode 6 for simulator succeeds.)

I'm building with SDK 7.1, why is XCode 6 trying to link to Metal anyway?

like image 744
HiveHicks Avatar asked Sep 12 '14 09:09

HiveHicks


2 Answers

Having the same problem. I am able to build the app fine in Xcode 6 pointed to the simulator or a phone, but when archiving I get this error. I am using the iOS 7.1 SDK.

I am using cocoapods and found that I can fix the problem by either setting the 'Link Frameworks Automatically' to NO for the pods project, or by archiving while there is a device plugged in and the scheme is targeted to a device not just 'iOS Device.'

This is a problem caused by Xcode 6's default project build settings.

Edit: Here is another explanation of this solution: http://www.appsee.com/blog/dev/xcode-new-link-frameworks-automatically-fix-framework-not-found-metal-for-architecture-armv7

like image 52
RJDubz Avatar answered Nov 14 '22 17:11

RJDubz


I had the same problem in a code base building fine iOS 8.0 SDK (Xcode 6.0.1) and having this issue with iOS 7.1 SDK (though in Xcode 5.1.1). There seem to be a lot of different project having this problem. See here for more details.

What fixed the issue for me was going to my targets 'Build Phase'-settings, 'Link Binary with Libraries' and there removing and re-adding the CoreVideo.framework, 'Product > Clean', a finally the 'Product > Run'.

like image 1
wrtsprt Avatar answered Nov 14 '22 15:11

wrtsprt