Skip to content

Instantly share code, notes, and snippets.

@mrgenixus
Created May 17, 2023 19:33
Show Gist options
  • Save mrgenixus/451dc6f08f0803bc38f9d18ee2ce7831 to your computer and use it in GitHub Desktop.
Save mrgenixus/451dc6f08f0803bc38f9d18ee2ce7831 to your computer and use it in GitHub Desktop.
Apple Signing

The Apple Signing setup process (including Visual Studio Code)

For Development

Signing

App Developer Account

Your apple id must be registered as an app developer on the account. In order to give your user access to profiles and certificates, your account must have the developer-level credential, at a minimum. This will allow you to create a development certificate on your machine and upload it as well as download any relevant profiles

Device registration

Your test device (or personal device) must be registered with apple as a test device for the app. Online, you or the app manager will have to enter your device's serial number (or UDID) into the appropriate fiel when creating a new device

The certificate

You can create up to 3 apple distribution certificates (at a time) by uploading a CSR. Each person distributing an app will need this certificate and CSR. However, for development, any number of certificates can be created. In Xcode, after you add your apple id to XCode, you can create a certificate for that device. You can also obtain a development certificate from another developer on the project and install it in your keychain. If you create a new certificate, it MUST be added to the development profile in order for the profile to be usable for code signing

Development Profile

Once you have a device and a certificate, you can create (or edit and existing) Development Profile. If there is a valid profile already, edit it and ensure that it includes the certificate you created on your maching and your device.

Anyone using that profile may need to download a new copy of it, in any case YOU will, because you will need the version that includes your certificate and device

Building

The Wildcard profile

Normally, YOUR apple developer account has a wildcard signing profile, you should be able to build for development to any of your devices with that profile and your main account.

Using the development certificate and profile

You can use the certificate and profile you created above to build toyour registered devices. You will get hard-to-understand errors trying to build to arbitrary devices and if your profile is updated to include a new device, the profile must be downloaded again. Likewise, if a certificate is added to the profile, you may need to download that as well.

For Production

Signing

Apple Developer Account

Your apple id can still sign for production and distribution without the app manager level, but you will be unable to transfer the file to apple without it. An app manager can upload an .ipa file for you using the "Transporter" app available in the app store, but, in general, it is better to have this permission yourself.

Device registration

Your device does not need to be part of the distribution profile

The Certificate

A Pre-shared certificate should be generated using a Certificate Signing Request. Only 3 Apple distribution certificates are allowed per account, so if one is lost, it should be replaced. When the certificate changes, saved data for your app may be lost by end users as changing the signing certificate can change unique ID information for your app.

The Distribution Profile

A distribution profile should be associate with the certificate you created. With distribution profiles, no devices need be selected.

Building

You will need to build for a generic device. If the generic device does not appear, Select 'Release|iPhone' from the list and you should see it. Then you can archive for distribution. Again, if you don't have the app manager permission, another account with the permission can upload the app using "transporter" from the app store.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment