Failed to generate release build of cordova ios app

后端 未结 4 1319
北恋
北恋 2021-01-03 04:30

I am using phonegap CLI 3.1 and XCode5. I am trying to generate the build for release mode through Phonegap CLI and Xcrun. I don\'t want to use Phonegap Build to upload the

4条回答
  •  情歌与酒
    2021-01-03 05:07

    Meanwhile I found: Fact is, that - when cordova exits and returns to shell - cordova related activities are NOT completed yet!

    It takes a while after the cordova exit, for the 'platforms/ios/AppName/_CodeSignature/CodeResources' file to show up. This file obviously is essential for the 'codesign' which is started by xcrun command to succeed.

    So I do in my script (which i call 'buildit.sh')

    #!/bin/bash
    [...]
    cordova build ios --release
    signaturefile="platforms/ios/build/device/$appname/_CodeSignature/CodeResources"
    echo DEBUG:signatur file is $signaturefile
    
    while [ ! -f $signaturefile ]
    do
      echo waiting
      sleep 1
    done
    xcrun ...
    

    Then the whole build/packaging process in one script succeeds.

    However: Running the script from my ContinuousIntegration server Jenkins, I observe that this criteria may be essential, but not enough. From the CI I still get a

    /usr/bin/codesign --verify -vvvv [...] Program /usr/bin/codesign returned 1 : [...] code object is not signed at all

    error!??

    EDIT (05.12.2013): This is due to the fact that the Jenkins service couldn't access the keychain. E.g. doing in the Jenkins job an unlock of the keychain prior running the build script sorts it. (May not be the most elegant solution, but at least it prooves the problem not to be in the scripting :)

提交回复
热议问题