xcodebuild how to sign app with command line?

前端 未结 1 1929
谎友^
谎友^ 2021-01-06 01:16

I am trying to export an ipa using the command line, I can\'t do that within Xcode because the app is made for a client and I am not a member of his team (I really hope Appl

相关标签:
1条回答
  • 2021-01-06 01:56

    It turns out that I was using the wrong commands; specifically this part is wrong:

    -PROVISIONING_PROFILE= xxxxxxx-8a61-4264-8fe9-0513bd7935e6 
    -CODE_SIGN_IDENTITY=iPhone Developer:xxxxx
    

    The correct one is this:

    -exportProvisioningProfile "Provisioning profile full name "
    

    Provisioning profile full name is the same name that appear in Xcode, not the UDID (I don't know why many people suggested that) also there is no need to specify the signing identity.

    Anyway, here is the full command line that is working for me now:

    xcodebuild -exportArchive -archivePath myArchive.xcarchive -exportPath myApp.ipa -exportFormat ipa -exportProvisioningProfile "Provisioning profile full name"
    

    NOTE:

    • I am running this command after copying the archive in a folder (desktop) then changing the terminal location to that folder (cd desktop) and then running the command
    • Also don't forget to change the provisioning profile based on your archive build configuration (release or debug), you can change that from the scheme setting to either make a debug or a release build.
    0 讨论(0)
提交回复
热议问题