Home/Without a Mac/How do I set up iOS certificates and signing for Capacitor without a Mac?

How do I set up iOS certificates and signing for Capacitor without a Mac?

Updated · airankrush

The short answer

Short answer: certificates, App IDs and provisioning profiles can be created in a browser on Windows. Applying them to the project means either setting them on Xcode's signing page or passing them to xcodebuild through cap build, and both of those happen on a Mac.

Which steps require macOS

What must be done on macOS

  • Selecting the Team and adding capabilities for the App target in Xcode. Capacitor's docs explain that capabilities are not configured in Info.plist. They are added on Xcode's Signing & Capabilities page with "+ Capability".
  • The actual signing. The signing parameters of npx cap build ios are ultimately handed to xcodebuild.

What you can prepare on Windows

  • Register the Bundle ID in the developer account. It has to match appId in capacitor.config. The docs describe appId as the unique identifier of the packaged app, called the Bundle ID on iOS.
  • Write the values manual signing needs into ios.buildOptions in capacitor.config (see step 4) and commit them to the repository.
  • Add permission usage descriptions in ios/App/App/Info.plist. The docs explain that iOS does not need permissions declared explicitly the way Android does. Instead you write usage descriptions in Info.plist, and the system shows them to the user when requesting authorization. This file is plain text and can be edited on any operating system.

How to do it on a remote Mac

  1. Open the project and check the Bundle Identifier

    On the remote Mac, run npx cap open ios. Select the App target under the App project and confirm the Bundle Identifier matches in three places: here, appId in capacitor.config, and the ID registered in the developer account. For a native project that has already been generated, the value in Xcode is the one that counts. Projects where appId was changed later especially need this check.

  2. Automatic signing: just pick the Team

    Sign in to your developer account under Xcode → Settings → Accounts (the two-factor verification code goes to your own devices), go back to Signing & Capabilities, select the Team, and leave "Automatically manage signing" checked. Xcode creates and updates the certificates and provisioning profiles. At this point npx cap build ios works with defaults: the documented default for signingStyle is automatic.

  3. Add capabilities and keep the developer account in step

    Capabilities such as push notifications and associated domains are added in Signing & Capabilities with "+ Capability". With automatic signing, Xcode updates the App ID to match. With manual signing, you have to tick the same capabilities on the App ID in the developer account yourself and regenerate the provisioning profile.

  4. Manual signing: put it in config or pass it as flags

    Use manual signing when a team manages certificates centrally. ios.buildOptions in capacitor.config supports:

    • signingStyle: manual.
    • signingCertificate: the certificate name, SHA-1 hash or an automatic selector.
    • provisioningProfile: the name or UUID of the provisioning profile.
    • exportMethod: default app-store-connect.

    The matching command-line flags are --xcode-signing-style, --xcode-signing-certificate and --xcode-provisioning-profile, and the team is specified with --xcode-team-id. You can look up the certificate name in Terminal with security find-identity -v -p codesigning.

  5. If you renamed the target, update two places

    The docs say the App directory cannot be renamed, but the target can be renamed in Xcode. After renaming there are two things to do: in CocoaPods projects, change the target name in ios/App/Podfile to match; and add scheme to the ios object in capacitor.config, otherwise the CLI keeps looking for the default App.

  6. Back up the certificate's private key

    The private key of a certificate generated by automatic signing lives in the remote Mac's keychain. The machine is reclaimed after the rental ends, so before then export a .p12 from Keychain Access, keep it yourself, and sign out of your Apple Account.

FAQ

I changed appId in capacitor.config. Why did the build's Bundle ID not change?

Once the native project has been generated, the Bundle ID is stored in the Xcode project. Change it to match in the App target's settings, or regenerate the iOS platform, provided you are sure the native project has not been edited by hand.

Manual signing says the provisioning profile does not include a capability

That means the App ID's capabilities and the capabilities added in the project do not match. Tick the capability on the App ID in the developer account, regenerate and download the provisioning profile, and build again.

Can I use a certificate a colleague already has?

Yes. Have them export a .p12 with the private key from their keychain, import it on the remote Mac, and then specify the certificate and provisioning profile with manual signing as in step 4. Do not send the export password in plain text over a chat tool.

Can you see what I am doing here?

We do not record the screen or the content of your business data, and we do not proactively access what is on the device. The machine does carry necessary connection, operation and security monitoring, so it is not an environment with no monitoring at all. Details are in the help center.

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

Back to home · All no-Mac guides