felixwcf
felixwcf

Reputation: 2107

Jenkins iOS Submit app Crashlytics failed (with Xcode Integration plug-in)

Jenkins grab my source from git and compile and generate a build is working fine. But when I run the Crashlytics command in Execute Shell to submit the build to Crashlytics Beta, it failed.

Error I received:

2016-06-02 13:52:05.232 submit Crashlytics: Crashlytics.framework/submit  
1.3.5 (17)

2016-06-02 13:52:07.405 submit Crashlytics: Unable to package source due to 
error: Error Domain=CLSIPABuilderErrorDomain Code=-6 "(null)" UserInfo= 
{UnderlyingError=Error Domain=CLSCodeSignerErrorDomain Code=-2 "(null)" 
UserInfo={arguments=(
"--sign",
B0DC1AA9228E7CB89E7ACE1576AEF3B1EC166012,
"--all-architectures",
"--force",
"--entitlements",

"/var/folders/k5/656qxxbs6854_mdjb53j2gp80000gn/T/com.crashlytics.ipas/991D8904-72CA-4B9C-A9D7-377F9D8420FF/Payload/entitlements.xml",
"/var/folders/k5/656qxxbs6854_mdjb53j2gp80000gn/T/com.crashlytics.ipas/991D8904-72CA-4B9C-A9D7-377F9D8420FF/Payload/elevenstreet.app"
), environment={
"CODESIGN_ALLOCATE" = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate";
}, status=1, stderr=B0DC1AA9228E7CB89E7ACE1576AEF3B1EC166012: no identity found
, command=/usr/bin/codesign, stdout=}, SourcePath=/var/folders/k5/656qxxbs6854_mdjb53j2gp80000gn/T/com.crashlytics.ipas/991D8904-72CA-4B9C-A9D7-377F9D8420FF}
2016-06-02 13:52:07.452 submit Crashlytics: Failed to prepare the binary for release

Build step 'Execute shell' marked build as failure
Archiving artifacts
Finished: FAILURE

Shell code is from its doc.

Not sure where it goes wrong. Please help.

Upvotes: 0

Views: 1575

Answers (1)

felixwcf
felixwcf

Reputation: 2107

Without changing anything on Keychain and distribution cert, and settings on Jenkins and Xcode Integration plugins, delete the existing Jenkins project and make a new one and re-assign all the settings and everything works.

Things to take note:

  • Make sure to have latest version of Crashlytics and Fabrics frameworks.

  • Make sure distribution cert in in your Keychain.

  • In Jenkins, in Xcode Integration plugin, under Code signing & OS X keychain options, make sure your Code Signing Identity is your certificate name (exactly the name of your distribution cert), and you can left Embedded Profile blank for it to point to the default location.

  • Tick Unlock Keychain option, and it will expand its panel. Make sure the path of Keychain is correct. Default is /Users/jenkins/Library/Keychains/.keychain, and the password. Default password would be your password that you use to sign in into your computer.

  • And Lastly, the Crashlytics command:

    ${WORKSPACE}/Pods/Crashlytics/Crashlytics.framework/submit <API Key> <Build Secret Key> -ipaPath ${WORKSPACE}/ipa-dir/<project_name>-${BUILD_ID}.ipa -emails <your_email>  -notifications YES
    

Upvotes: 1

Related Questions