Deployment
How to migrate an app to other account?
Migration steps
Step 1: Verify that the app can be transferred
Step 2: Back up all app information
Because app is removed from account after transfer, you should back up all information about the app before you transfer it.
Step 3: Do the app transfer
This has to be done by account holder. When doing the transfer, input the following target data:
- Damstra Account Holder’s Apple ID: abcd@abcd.com
- Damstra Team ID: XXXXXXXXXX
Step 4: Accept the app transfer
This has to be done by Account Holder. Enter new metadata
- Support URL
- Marketing URL
- Privacy policy URL
- CCATS (a new CCATS form is required for apps that use export compliance)
- App Review contact information
- App Store contact information
Same as App Review contact information
Step 5: Fix Firebase push notification
Because Team ID is changed, it’s necessary to update push notification configuration
- AppStore
- Generate new APNS key for push notification if not exist
- Open app Id and config dev/prod push notification certificates for app Ids
- Generate dev & production profile (necessary?)
- Firebase
- Delete app Id, team Id in app Information
- Delete old p8 file, upload new p8 file, make sure team Id is auto inputted back
- Download current app from AppStore, notification should work
Ref: https://round.fun/2020/08/01/mobile-app-how-to-configure-push-notification-with-firebase/
Notes
- App is still able to be built with old Certificate and Provisioning Profile
Fix issues
Never ever use iCloud in an app.
It’s not worth it! Using iCloud Entitlements makes your app untransferable and therefore unsaleable FOREVER.
You may see this warning after first upload from Apple
Dear Developer, ... ITMS-90076: Potential Loss of Keychain Access - The previous version of software has an application-identifier value of ['AAAAAA.*'] and the new version of software being submitted has an application-identifier of ['BBBBBB.*']. This will result in a loss of keychain access. After you’ve corrected the issues, you can upload a new binary to App Store Connect. ...
This warning happens when submitting app the first time after an app transfer.
Although Bundle Id is still the same, the app Id prefix which is team Id has been changed to new team Id.
As long as your app doesn’t use any keychain service, it should be fine.
https://developer.apple.com/documentation/security/keychain_services
A_ONE_TIME_LOSS_IN_KEYCHAIN_DATA_WILL_OCCUR_IF_YOU_SWITCH_YOUR_APP_ID_PREFIX
https://developer.apple.com/library/archive/qa/qa1726/_index.html
Keychain sharing
- Keychain sharing continues to work only until the app is updated
- Keychain needs to be rebuilt when submitting an update
How many build certificates may an iOS app have?
Cerificate types
Identifiers
An app must have a unique App Id or Bundle Id
Certificates
- There are 2 types of certificates
- Development
- Distribution
- You must create a Signing Request “.certSigningRequest” file from you Mac in order to create a certificate
Profiles
- There are 2 types of profiles
- Development
- App Store
- You need to assign following items to a profile
- App ID
- Certificate
- Installable iOS devices
What need to build an iOS app?
Certificate
- This is the assigned certificate when creating Profile
- Certificate needs to be converted to .p12 file with a protected password
- Export .p12
- Download certificate, make sure download certificate created by your XCode
(You can’t export p12 without corresponding private key)
- Download certificate, make sure download certificate created by your XCode
Profile
Created provisioning profile file
How to generate push notification certificates?
Refer to this post:
Build commands
- Verify that the correct version of xcodebuild command line toolchain is running
/usr/bin/xcodebuild --version
- Clean workspace
/usr/bin/xcodebuild -sdk iphoneos -workspace ./[project_name].xcworkspace -scheme [scheme_name] clean
- Archive
/usr/bin/xcodebuild -workspace ./[project_name].xcworkspace -scheme [scheme_name] archive -sdk iphoneos -archivePath ../output/build/archive/[scheme_name]
Errors when building on AppCenter
error: “XXXXX” requires a provisioning profile. Select a provisioning profile in the Signing & Capabilities editor.
Check if you have specified any provisioning profile in User Define or not. If YES delete them.
can’t double click and add .p12 into Keychain Access due to security restriction
If so, you can use cmd to install .p12
security import "xxxxxxx.p12" ~/Library/Keychains/login.keychain-db
Leave a Reply