How do I produce an iOS Release Build that my client can sign on their end?

前端 未结 10 715
你的背包
你的背包 2020-12-12 09:17

My scenario

I wrote an iOS app for a client. The project is almost over and now it\'s time for them to put it in the App Store. I\'ve been sending t

10条回答
  •  伪装坚强ぢ
    2020-12-12 10:10

    Ok, found a way to do it without sharing provisioning profiles or certificates.

    The idea is to insert a "run script" build phase to trick XCode into signing an App it didn't compile, so you can send a compiled (unsigned) App to the client, and then their XCode signs that App with their cert and profile.

    How to do it:

    Step 1: Make XCode generate an unsigned Release .app (I'll call this "App A"). See "To Disable Code Signing" here: https://stackoverflow.com/a/10171462/375486

    Step 2: Create a new XCode iOS project and remove from it all build phases you can, so it creates an empty .app file (I'll call this "App B")

    Step 3: Add a "run script" build phase to Project B which copies the contents of "App A" into "App B". In my case I used this:

    cp -r A.app/* "$CODESIGNING_FOLDER_PATH"
    

    Step 4: Send the "B" XCode project to the client, with all the necessary files.

    Step 5: The client builds the B project. Under the hood, XCode will run the "run script" command, then sign the resulting app, and the client gets a perfectly signed App.

    And that's it :)

提交回复
热议问题