Home/Without a Mac/How do I handle iOS certificates and signing for Expo without a Mac?

How do I handle iOS certificates and signing for Expo without a Mac?

Updated · airankrush

The short answer

This step usually needs no Mac: sign in to your Apple Developer account while running eas build, and EAS CLI can create the distribution certificate and provisioning profile, all from Windows or Linux. macOS comes in if you insist on generating and keeping the p12 yourself, or if you switch to archiving and signing in Xcode on the machine.

Which steps require macOS

The default, no Mac needed

Expo's app credentials documentation divides iOS credentials into three kinds: distribution certificate, provisioning profile and push notification key, all belonging to your Apple Developer account. When EAS manages them, the build command creates them at the prompts and stores them on Expo's servers, and later builds reuse them.

Approaches that may involve macOS

  • Keeping the credentials yourself: the local credentials documentation asks you to supply a p12 distribution certificate, its password and a provisioning profile. The documentation only says these can be generated in the Apple Developer portal and does not explain how to export a p12; in Apple's usual flow, the certificate request and the p12 export are done in Keychain Access on a Mac.
  • Skipping EAS and archiving in Xcode: Xcode does the signing, so a Mac is required.

If you have no concerns about the certificate being stored on a third party's servers, the default is enough and there is no reason to rent a machine for signing.

How to do it on a remote Mac

  1. The default: let the build command create the credentials

    On your own computer run:

    eas build --platform ios

    Sign in to your Apple Developer account at the prompt (it will ask for a two-factor code) and choose to let EAS generate the distribution certificate and provisioning profile. The preconditions are that ios.bundleIdentifier is already set in app.json and the account is enrolled in the Apple Developer Program.

  2. View and replace credentials

    eas credentials

    This lets you view, replace and remove each app's credentials. Note the warning in the official documentation: removing with this command only deletes them from Expo's servers; the certificate still exists on Apple's side, and deleting it for good is done in the Apple Developer portal. An account can hold only a limited number of distribution certificates, a limit teams tend to hit when several people each generate their own.

  3. Understand capability syncing, a behaviour specific to Expo

    When you run eas build, EAS automatically aligns the capability switches for this app in the Apple Developer portal with the contents of ios.entitlements in your app config: what is absent from the config gets turned off, what is present gets turned on. If you enabled a capability by hand in the developer portal and found it turned off, this is most likely why. Use npx expo config --type introspect to see the entitlements that finally take effect; if you do not want this behaviour, set EXPO_NO_CAPABILITY_SYNC=1 as described in the official explanation.

  4. To keep them yourself: write credentials.json

    Create credentials.json in the top-level project directory:

    {
      "ios": {
        "provisioningProfilePath": "ios/certs/profile.mobileprovision",
        "distributionCertificate": {
          "path": "ios/certs/dist.p12",
          "password": "certificate password"
        }
      }
    }

    Then add "credentialsSource": "local" to the relevant build profile in eas.json; the default value is "remote". The official documentation reminds you to add the directory holding the certificates to .gitignore.

  5. If you need to generate the p12 yourself, do it on the remote Mac

    This is where a Mac may come in handy in the signing process: create a certificate request in Keychain Access, use it to request a distribution certificate in the Apple Developer portal, download and import it into the keychain, then export it together with the private key as a p12. Menu names are as given in Apple's developer documentation. Copy the exported p12 and the provisioning profile back to your own computer; after that, builds no longer need this Mac.

  6. Clean up your traces on the remote Mac afterwards

    Once the p12 is exported and confirmed working, delete the certificate and private key from the remote Mac's keychain and sign out of any Apple account you signed in to. The machine is reclaimed when the rental ends, and the private key should not exist only there.

FAQ

Does revoking the distribution certificate affect apps already on the store?

According to the Expo documentation, deleting a distribution certificate has no effect on apps already on the App Store. Uploading a new app or an update, however, needs a new certificate, and provisioning profiles that depend on the old one must be regenerated.

What happens if the push key is revoked?

The documentation says push notifications for apps that depend on it stop until a new key is uploaded; switching to a new key does not change users' push tokens.

How do I write local credentials for a project with extensions, such as a notification extension?

The official documentation says a multi-target project needs a separate certificate and provisioning profile set per target name; the local credentials documentation defines the structure.

Is it worth renting a Mac just for signing?

Generally not. Only when you must generate and keep the private key yourself and cannot borrow a Mac anywhere do you need one for a short while. Rental terms and pricing are on the plans page.

Pricing and availability: see the plans page · Help center (中文) · Refund policy (中文) · Telegram Contact support

Back to home · All no-Mac guides