Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Code signing with multiple developers

So I am working with a few other developers on an iOS app that has push notifications enabled. We have a provisioning profile that supports push and we each have our own developer certificates with which to sign the code. All standard stuff from what I understand.

The problem we are running into is that Xcode requires to you pick a dev cert in the Project and/or Target setting (under Code Signing Identity) when you want to run the app on a phone. If I pick my dev cert and check that change into git, then it won't work on anyone else's development environment because they don't have my cert in their keychain. So everybody is constantly changing the project file so it works with their cert.

Is there no way around this? I realize there is the automatic profile selection option, but that doesn't work with push notifications. If you try that you get the error

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 push token.

Surely this has been solved. How does this work?

like image 797
d512 Avatar asked Aug 24 '12 16:08

d512


Video Answer


1 Answers

Make a separate build configuration for each developer and push that once, then have each developer create his own scheme that uses their build settings. Schemes don't go into project folder and will not be messed around with by git.

Here is a step-by-step guide:

  1. Create a copy of your "debug" build configuration, name it as you want: duplicate debug configuration

  2. Set your desired code signing settings for your new configuration: set code signing

  3. (at this point you can commit/push your changes, following steps will not affect project file) Create a new scheme, name it as you want:
    create new scheme

  4. Select your build configuration for "Test" (and/or any other cases, just add new configurations for them): select your configurations

  5. Make millions.

like image 79
Filip Radelic Avatar answered Nov 15 '22 08:11

Filip Radelic



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!