Signing code with multiple developers

So, I work with several other developers in the iOS app with push notifications enabled. We have a provisioning profile that supports push, and each of us has our own developer certificates with which you can sign the code. All the standard things from what I understand.

The problem we are facing is that Xcode requires you to select a developer certificate in the Project and / or Target settings (under the code signing ID) when you want to run the application on the phone. If I select the dev certificate and check what has changed on git, then it will not work on any other development environment, because they do not have my certificate in the keychain. Therefore, everyone constantly changes the project file, so he works with his certificate.

Is there no way around this? I understand that there is an option to automatically select a profile, but this does not work with push notifications. If you try, you will get an error message

Failed to obtain push notification token: Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string found for application" 

when the phone tries to register to receive its token.

Of course, this was decided. How it works?

+6
source share
1 answer

Create a separate assembly configuration for each developer and click it once, then each developer will create his own scheme that uses its own assembly settings. Schemas are not in the project folder and will not be confused with git.

Here is a step-by-step guide:

  • Create a copy of the "debug" build configuration, name it whatever you want: duplicate debug configuration

  • Set the necessary code signing options for the new configuration: set code signing

  • (at this moment you can commit / push your changes, the following steps will not affect the project file). Create a new schema, name it what you want:
    create new scheme

  • Select the assembly configuration for "Test" (and / or any other cases, just add new configurations for them): select your configurations

  • Make millions.

+8
source

Source: https://habr.com/ru/post/923691/


All Articles