R Tyler McLaughlin
R Tyler McLaughlin

Reputation: 95

Xcode 8.3 "The specified keychain is not a valid keychain file."

While many similar posts exist, I believe this bug is a novel one, probably Xcode 8 or Mac OS Sierra specific.

I'm trying to upload and test my app on my iPhone 6 Plus (running iOS 10.3). In Xcode 8.3, when I click the play button to build my app, I get the error "The specified keychain is not a valid keychain file."

Trying to trace the source of the error, I navigated to the General/Signing settings for the .xcodeproj. Here, the box Automatically Manage Signing is checked. Under this box, the same keychain error is written in red text. Clicking Try again revokes my certificates, and attempts to create new certificates, but the error appears again.

When I use an iPhone device simulator in Xcode 8.3, everything works great and I do not get this error.

I followed this post but I do not have an issue with permissions in ~/Library/Keychains.
Further, since I am using Mac OS X 10.12 Sierra, there is no First Aid tool in the Keychain Access app with the Sierra upgrade. After following the Keychain Access dropdown menu sequence "Request a Certificate" > "Request a Certificate from a Certificate Authority", I check Save to Disk and click continue, and once again I get the error "The specified keychain is not a valid keychain file".

This is a subtly different error message than xcode 8.3 error: The specified item could not be found in the keychain.

Thanks for looking in to this!

Upvotes: 1

Views: 1580

Answers (1)

R Tyler McLaughlin
R Tyler McLaughlin

Reputation: 95

A reinstall of Xcode fixed the bug!

First I completely uninstalled Xcode this way, restarted, then reinstalled Xcode through the app store.

Installing my app on my iPhone was easy, I just had to follow the instructions in Xcode after attempting to build my app with my iPhone selected as the device. It was as simple as logging in with my apple ID and changing com.apple.assistant to something unique like 'com.myFirstApp.isAwesome'

Upvotes: 0

Related Questions