Prepare iOS Publication
Prerequisites
- Apple Developer account
- Bundle identifier for the application
- Provisioning profile for the AppStore bound to the bundle identifier mentioned above
- Xcode
Process
- Set the following Capabilities for the Bundle identifier in the Apple Developer Portal:
- Associated Domains is used for deep linking / mobile-only feature.
- Data Protection: Protected Until First User Authentication indicates the level of protection the iOS should utilize for files stored by the Access App.
- Push Notifications indicates a push notification feature.
- Download the provisioning profile from the Apple Developer Account. Name it
embedded.mobileprovision
. - Copy the provisioning profile into the provided
.xcarchive
file:
Include provisioning profile / prepare for application signing
cp embedded.mobileprovision AccessApp.xcarchive/Products/Applications/Access.app/
- Create the
.entitlements
file for the code signing.
Use the example in the next code block, but replace the following placeholders:
Placeholder | Description |
---|---|
<TEAM_ID> | Your team ID. |
<BUNDLE_ID> | Application bundle identifier. |
<DEEP_LINK_DOMAIN> | Domain where the AASA file is served. If the AASA file is served here: http://test.com/.well-known/apple-app-site-association , the <DEEP_LINK_DOMAIN> is test.com . |
Application entitlements and capabilities:
<?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>aps-environment</key>
<string>production</string>
<key>application-identifier</key>
<string><TEAM_ID>.<BUNDLE_ID></string>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:<DEEP_LINK_DOMAIN></string>
</array>
<key>com.apple.developer.default-data-protection</key>
<string>NSFileProtectionCompleteUntilFirstUserAuthentication</string>
<key>com.apple.developer.team-identifier</key>
<string><TEAM_ID></string>
<key>get-task-allow</key>
<false/>
</dict>
</plist>
- Sign the
.xcarchive
by executing the following command. For the Team name and Team ID, see the membership details in the Developer portal:
Application signing
codesign --entitlements AccessApp.entitlements -f -s "Apple Distribution: <Team name> (<Team ID>)" AccessApp.xcarchive/Products/Applications/Access.app
- Open
.xcarchive
in Xcode. - In the appearing window, select Distribute App on the right side.
- Select App Store Connect as the method of distribution.
- Select destination as Upload.
- Choose the App Store Connect distribution options.
- Choose the signing options, select the certificate and App Store profile.
- Verify that the
aps-environment
capability is listed before uploading to App Store Connect. - Click the Upload button to upload your configuration.
Problem solving
Change release version MARKETING_VERSION
of an .xcarchive
You cannot change a version already published in App Store.
To bypass the issue using the already delivered .xcarchive
package, you can manually change the marketing version as follows:
- Right-click on the
.xcarchive
file, and select Show Package Contents. - Find and open the
Info.plist
in the root folder with Xcode. - Change the value of the
CFBundleShortVersionString
property to the right marketing version. - Find the
.app
in theProducts/Applications/
folder. - Right-click on the
.app
file, and select Show Package Contents. - Find and open the
Info.plist
in the.app
folder with Xcode. - Change the value of the
CFBundleShortVersionString
property to the right marketing version. - Find the
.app.dSYM
in thedSYMs
folder. - Right-click on the
.app.dSYM
file, and select Show Package Contents. - Find and open the
Info.plist
in the.app.dSYM/Contents
folder with Xcode. - Change the value of the
CFBundleShortVersionString
property to the right marketing version. - Open the
.xcarchive
in the Xcode Organizer by double-click on it. - Check the version one last time.