When building an iPhone application using Unity, you might encounter the need to set up Xcode signing for your project as part of a development team. This process allows multiple developers to collaborate on the project while maintaining a secure build environment.
Here’s a step-by-step guide to help you get started:
**Step 1: Set Up Your Development Team in Apple Developer Portal**
First, ensure that your development team is registered and set up in the Apple Developer Portal. Each team member needs an individual account with proper access privileges (Admin or App Store Connect) for managing certificates, provisioning profiles, and other relevant settings.
**Step 2: Create a Certificate Signing Request (CSR)**
The CSR is used to create Apple Production and Development certificates. Each team member should generate their own unique CSR from their keychain access on their local machine.
You can follow these steps to create a CSR:
- Open Keychain Access application on your Mac.
- Select the "Certificates" category, then click "Keychain List" in the top menu.
- Choose "Certificate Assistant," and then "Create a Certificate Request."
- Fill out the form with your email address, save file location, and passphrase (make sure everyone uses the same passphrase for consistency).
- Save the CSR file and distribute it to your team members.
**Step 3: Create Team Provisioning Profiles**
Once you have generated the CSRs, log in to the Apple Developer Portal with your Admin account. Go to "Certificates, Identifiers & Profiles," then click on "Provisioning Profiles" and create a new provisioning profile for your project. Select the required certificates (the ones corresponding to the CSRs), add the necessary App IDs, and save the profile. Repeat this process for each team member’s certificate.
**Step 4: Configure Unity Project Settings**
Now that you have all the necessary files, configure your Unity project settings to use the new provisioning profiles. Open the Unity project in Xcode by selecting "Open in Xcode" from the File dropdown menu.
- Go to the "Project Navigator," select your project, then open the "Signing & Capabilities" tab.
- Click on the "iOS Team Provisioning Profile" dropdown and select the appropriate provisioning profile for your project.
- Repeat this process for any connected schemes (if applicable) in your project.
**Step 5: Summary**
Setting up Xcode signing for an Unity-iPhone project with a development team involves creating certificates, provisioning profiles, and configuring the project settings accordingly. Following these steps will enable your team to collaborate on the project while maintaining a secure build environment. Remember that everyone must use the same passphrase when generating CSRs to avoid any inconsistencies during the build process.