Home/Without a Mac/How do I set up iOS certificates and code signing for .NET MAUI without a Mac?

How do I set up iOS certificates and code signing for .NET MAUI without a Mac?

Updated · airankrush

The short answer

Short answer: App IDs and provisioning profiles are created on the Apple Developer website, which works from Windows. Signing itself is done by tools on the Mac, so the distribution certificate's private key must be in that Mac's keychain. The least-effort route is to generate the certificate request on the remote Mac itself.

Which steps require macOS

Which step cannot leave macOS

  • The signing itself. dotnet publish calls Apple's signing tools on the Mac, which sign the app with the certificate and private key in the keychain.
  • In Microsoft's documentation, Visual Studio on Windows can create a distribution certificate and download provisioning profiles under "Tools > Options > Xamarin > Apple Accounts". The same documentation notes that the private key and certificate are only exported to the Mac build host's keychain when the IDE is already paired to a Mac. So this route depends on Pair to Mac being able to connect.

What you can do on Windows first

  • Register the App ID and create the provisioning profile (which needs a certificate first) in the Apple Developer account.
  • Confirm ApplicationId in the .csproj. The documentation states it is the app's Bundle Identifier, and changing it automatically updates the matching value in Info.plist.

Microsoft's documentation carries a warning about losing the certificate and key: the consequence is revoking the existing certificate and recreating the provisioning profiles. A rented machine is reclaimed after the rental ends, so deal with this ahead of time. See the last step.

How to do it on a remote Mac

  1. Generate the certificate request in the remote Mac's keychain

    On the remote Mac, open Keychain Access and generate a CSR file following Apple's Create a certificate signing request instructions. At that point the private key is already stored in this Mac's login keychain. The menu location changes between macOS versions, so follow Apple's documentation.

  2. Create and install the distribution certificate

    On the certificates page of the developer account, create a new certificate and choose the type used for App Store distribution (the MAUI docs call it iOS Distribution; the newer name is Apple Distribution). Upload the CSR you just made, download the resulting certificate file, and double-click it on the remote Mac to install. This step fails if your account's role in the team does not have enough permission.

  3. Register the App ID and keep capabilities matching on both sides

    An explicit App ID maps to a single app and is required when you use capabilities such as Apple Pay or Game Center. A wildcard ID suits multiple apps that enable no app-specific capabilities. The Bundle ID must match ApplicationId exactly.

    The MAUI documentation stresses that every capability the app uses has to be both ticked on the App ID page and written into the project's Entitlements.plist. Doing only one side causes problems at signing time or at runtime.

  4. Create an App Store provisioning profile

    On the Profiles page, create a new profile, choose the App Store type, then select the App ID you just registered and the distribution certificate. Give it a name and write it down, because this name goes into CodesignProvision later. Download the profile to the remote Mac and install it. The storage directory has changed across Xcode versions, so follow the MAUI publishing docs and Apple's documentation.

  5. Look up the full signing identity name and put it in the project

    Run security find-identity -v -p codesigning in Terminal. The whole string in the output that looks like Apple Distribution: Name (Team ID) is the value for CodesignKey. Then:

    • CodesignKey: the full name you just looked up.
    • CodesignProvision: the name of the provisioning profile.
    • CodesignEntitlements: if you use capabilities, the path to Entitlements.plist.

    You can put these in a conditional property group in the .csproj, or pass them with -p: at dotnet publish time. The advantage of the conditional property group is that Debug builds do not pick up distribution signing.

  6. Export a p12 backup

    In Keychain Access, export the certificate together with its private key as a .p12, set an export password, and save it to your own storage. Sign out of your Apple Account before the rental ends. Once the machine is reclaimed, the private key in its keychain is not kept. With the p12 you can import it on another Mac and keep using the same certificate.

FAQ

The build says no signing identity was found. What do I check first?

Run security find-identity -v -p codesigning on the remote Mac first. If the distribution certificate is not listed, most likely only the certificate file was installed and the private key is not on this machine (for example, the CSR was generated on a different computer). The fix is to export a p12 from the original machine and import it, or to go through the CSR flow again on this Mac.

Does MAUI have automatic signing?

Visual Studio's project properties offer an Automatic Provisioning scheme, which the documentation mostly covers in the context of device debugging and Hot Restart. The command-line publishing docs use explicit CodesignKey and CodesignProvision. This page follows the latter because it can be reproduced as-is in Terminal on a remote Mac.

Are there other signing-related checks before submitting to the App Store?

Apple requires the app bundle to include a privacy manifest file declaring data collection and the reasons for using certain APIs. Missing declarations can get the app rejected. For how to do it in MAUI, see Microsoft's Apple privacy manifest documentation.

What should I watch for when signing in to my developer account on a rented machine?

You can sign in with your own Apple Account, and we recommend a dedicated account. Find My Mac must stay off, and you should sign out before the rental ends. Two-factor verification codes go to your own devices, so stay near them while you work. More in can I sign in to my own developer account.

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

Back to home · All no-Mac guides