Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploying to the Crashlytics Beta service from an Xcode Bot

I'm trying to use the command line deployment method to upload an iOS beta to Crashlytics (Crashlytics.framework/submit) in a post archive step using an Xcode Bot on Xcode Server.

The problem is that Crashlytics doesn't appear to be able to sign the ipa file correctly.

According to their support i need to unlock the keychain. I have tried the following but the error persists:

  • security unlock-keychain -p the-password /Library/Keychains/System.keychain
  • Unlocking the keychain via the server GUI (Keychain Access)
  • Running security list-keychains only lists /Library/Keychains/System.keychain and the certificate and private key are imported and present in that keychain.

The error:

2015-02-04 10:43:06.247 submit Crashlytics: Crashlytics.framework/submit 1.3.1 (11)
2015-02-04 10:43:06.981 submit Crashlytics: Unable to find a certificate with a private key: Error Domain=CLSProvisioningProfileErrorDomain Code=-1 "The operation couldn�t be completed. (CLSProvisioningProfileErrorDomain error -1.)" UserInfo=0x10020e250 {Details=iPhone Distribution: ****** (*****), SourcePath=/var/folders/rk/758w2bp12sq1lh5q5mrj598h000087/T/upload/Payload/our.bundle.id/embedded.mobileprovision}
2015-02-04 10:43:07.002 submit Crashlytics: Failed to prepare the binary for release
Error uploading to Crashlytics

Maybe the issue has something to do with the Xcode Bot running as another user called _xsomething?

like image 434
Maciej Swic Avatar asked Oct 20 '22 17:10

Maciej Swic


1 Answers

I had the same issue. You should point to the login.keychain. Most cases you have your credentials (certificate and private key) in your login.keychain, NOT your System.keychain. Remember, a keychain is just a file encrypted with the credentials. You should tell to the post action run script (after Crashlytics/submit execution) which keychain should use. You can find more info on this thread: https://twittercommunity.com/t/problem-submitting-to-crashlytics-beta-from-xcode-server/31703

Cheers!

like image 134
Moises Rojas Avatar answered Oct 30 '22 18:10

Moises Rojas