Signing iOS apps locally
Follow your company policies and ensure that you do not expose your iOS certificates and provisioning profiles in third-party platforms, by signing your iOS apps locally.
For example, your company's internal audit policies might prevent your from uploading the iOS code signing certificates and provisioning profiles to Pega Platform. In such situations, generate an unsigned iOS app bundle in Pega Platform and then sign it on your local macOS computer.- Place the zipped
xcarchive
bundle, the.p12
file with the certificate, and the.mobileprovision
file in the same folder. - Open the Terminal application, and then navigate to the folder with your files.
- Extract the zipped
xcarchive
bundle. - If the bundle already contains a code signature folder, remove the existing code signature.
- Copy your provisioning profile to the extracted
xcarchive
folder. - Provide the App ID entitlements that are required for signing the app:
- Create a new text file.
- Insert the following template in the file, and then replace the
TEAM_ID and BUNDLE_ID
placeholders with values that match your App ID configuration:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>application-identifier</key> <string>TEAM_ID.BUNDLE_ID</string> <key>aps-environment</key> <string>production</string> <key>com.apple.developer.team-identifier</key> <string>TEAM_ID</string> <key>get-task-allow</key> <false/> </dict> </plist>
- Save the file as
entitlements.plist
in the folder with your other files.
- At the command prompt, import your certificate from the
.p12
file to the Keychain application. - At the password prompt, enter your password certificate.
- Optional: To review the signing identity, enter the following command:
security find-identity
- Sign the code of your app.
- Open the
xcarchive
file in Xcode. - In Xcode, ensure that your archive is highlighted, and then click Distribute App.
- Complete the app signing and export flow:
- Select the preferred method of distribution, and then click Next.
- Select the distribution options for your app, and then click Next.
- Select the certificate and provisioning profile that you want to use, and then click Next.
- Review the summary of the app signing flow, and then click Export.
- Choose the folder in which you want to save your iOS App Store Package file, and then click Export.
Previous topic Creating an unsigned iOS certificate set Next topic Building mobile apps