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
Apptarget 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 iosare ultimately handed to xcodebuild.
What you can prepare on Windows
- Register the Bundle ID in the developer account. It has to match
appIdincapacitor.config. The docs describeappIdas the unique identifier of the packaged app, called the Bundle ID on iOS. - Write the values manual signing needs into
ios.buildOptionsincapacitor.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
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,appIdincapacitor.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 whereappIdwas changed later especially need this check.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 iosworks with defaults: the documented default forsigningStyleisautomatic.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.
Manual signing: put it in config or pass it as flags
Use manual signing when a team manages certificates centrally.
ios.buildOptionsincapacitor.configsupports:signingStyle:manual.signingCertificate: the certificate name, SHA-1 hash or an automatic selector.provisioningProfile: the name or UUID of the provisioning profile.exportMethod: defaultapp-store-connect.
The matching command-line flags are
--xcode-signing-style,--xcode-signing-certificateand--xcode-provisioning-profile, and the team is specified with--xcode-team-id. You can look up the certificate name in Terminal withsecurity find-identity -v -p codesigning.If you renamed the target, update two places
The docs say the
Appdirectory 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 inios/App/Podfileto match; and addschemeto theiosobject incapacitor.config, otherwise the CLI keeps looking for the defaultApp.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
.p12from 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.
Related
- How do I build an iOS ipa for a Capacitor or Ionic app without a Mac?
- How do I debug a Capacitor app on the iOS simulator or a real device without a Mac?
- Can I sign in with my own Apple Developer account on a rented Mac?
- How do I sign an iOS app and upload it to the App Store from a remote Mac?
- How do I debug a .NET MAUI iOS app on the simulator or a device without a Mac?
Pricing and availability: see the plans page · Help center (中文) · Refund policy (中文) · Telegram Contact support