Xcode 6.1 error while building IPA

前端 未结 7 684
再見小時候
再見小時候 2020-11-29 15:53

Just upgraded to Xcode 6.1 today, and guess what: Now I\'m having trouble submitting builds using the TestFlight desktop app. Here\'s the error I\'m getting while the app st

7条回答
  •  日久生厌
    2020-11-29 16:25

    The answer from Alistra work for me but I doesn't want to change a script which is not mine (a future Xcode release might change this file and the correction will be lost).

     diff PackageApplication PackageApplicationFixed 155,157c155,156
    <-     my @codesign_args = ("/usr/bin/codesign", "--force", "--preserve-metadata=identifier,entitlements,resource-rules",
    <-                          "--sign", $opt{sign},
    <-                          "--resource-rules=$destApp/ResourceRules.plist");
    ---
    ->     my @codesign_args = ("/usr/bin/codesign", "--force", "--preserve-metadata=identifier,entitlements",
    ->                          "--sign", $opt{sign});
    

    I think answer from Vladimir Grigorov is the best if you have an archive using :

    xcodebuild -exportArchive -archivePath [path to archive] -exportPath [path to output directory] -exportOptionsPlist [path to options.plist file]
    

    In my case, I doesn't have the archive, because I modify the application after build it and I need to change the Bundle Id and signing certificate.

    The solution I found is to call codesign myself before used PackageApplication and ask PackageApplication to not sign. Like this :

    replace :
    
     /usr/bin/xcrun -sdk iphoneos PackageApplication -v "" -o "" --sign "" --embed ""
    
    by :
    
    /bin/cp -rpfv "" "/embedded.mobileprovision"
    /usr/bin/codesign -v -vvvv -f -s "" --entitlements="" ""
    /usr/bin/xcrun -sdk iphoneos PackageApplication -v "" -o ""
    

    Don't forget to embedded the .mobileprovision file using to sign with cp.

提交回复
热议问题