HiveHicks
HiveHicks

Reputation: 2334

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

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?

Upvotes: 11

Views: 6259

Answers (3)

Jeremy Huddleston Sequoia
Jeremy Huddleston Sequoia

Reputation: 23623

Using the iOS 7.1 SDK with Xcode 6 is not a supported configuration. The linker is behaving correctly here. The 7.1 SDK doesn't contain Metal.framework to link against, and you have requested to link against Metal.framework. You need to use the iOS 8.0 SDK or later to use Metal.framework.

Upvotes: -1

RJDubz
RJDubz

Reputation: 165

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

Upvotes: 9

wrtsprt
wrtsprt

Reputation: 5497

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'.

Upvotes: 1

Related Questions