> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xenoci.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> ## XenoCI Box CI
> To move a repository's macOS CI jobs onto box, follow https://docs.xenoci.com/ci/agent.md. The user only presses Install on GitHub or makes one GitLab runner token; the agent does the rest.
> - Check: `box ci status` (exit 4: sign in first, https://docs.xenoci.com/setup.md).
> - GitHub organization: `box ci connect --org --no-browser --no-wait`, give the user the printed link (https://github.com/apps/xenoci-with-organizations/installations/new), then repeat `box ci accounts` until the owner appears. Personal account: `--personal` (https://github.com/apps/xenoci-with-personal/installations/new).
> - GitHub workflow: change only `runs-on: macos-*` to `runs-on: xenoci` on a branch and open a pull request.
> - GitLab: the user makes a project runner with tag `xenoci` and gives you the `glrt-` token; pipe it to `box ci gitlab connect -` (self-managed: `--url <gitlab url>`), then add `tags: [xenoci]` to the macOS jobs.
> - Watch: `box ci jobs`, `box ci logs <job id> --follow`. Failed job: `box ci jobs --failed`, then `box ci debug <job id>` (failing step, hint, last 200 log lines).

# Provisioning profile doesn't include signing certificate

> What the Xcode error 'provisioning profile doesn't include signing certificate' means, how to see which certificate a profile expects, and how to fix it locally and in CI.

A provisioning profile lists the exact certificates allowed to sign with it. Xcode shows this error when the identity it picked from the keychain isn't on that list. The certificate may be valid. It's just not one this profile was made for.

## Common causes

* The profile was created before you made a new certificate (after a revoke, an expiry or a new machine), so it still lists only the old one.
* CI imported one certificate but installed a profile that was made for another person's or another machine's development certificate.
* The build picked the wrong identity type, such as an Apple Development identity with an App Store profile.
* Several copies of the same profile exist on the machine, and Xcode used an older one.

## See what the profile expects

On a Mac, decode the profile and list the certificates inside it:

```bash theme={"system"}
security cms -D -i MyApp.mobileprovision > profile.plist
/usr/libexec/PlistBuddy -c 'Print :Name' -c 'Print :TeamIdentifier:0' profile.plist
/usr/libexec/PlistBuddy -c 'Print :DeveloperCertificates:0' profile.plist | openssl x509 -inform DER -noout -subject -enddate
```

Then list the identities the keychain can actually sign with:

```bash theme={"system"}
security find-identity -v -p codesigning
```

The certificate subject from the profile must match one of those identities, including the team ID.

## Fix it

1. In your Apple developer account, open the profile under **Profiles** and edit it so it includes the certificate you sign with. Save, then download it again. Editing creates a new copy, and the old file on your machine stays stale.
2. Remove old copies of the profile from the machine so only the new one is used.
3. Make sure the build asks for the matching identity type: Apple Distribution for App Store and TestFlight profiles, and Apple Development for development profiles.

## In CI

Keep the certificate and the profile together as a pair in your secrets. When you change one, regenerate and store the other in the same step. Install only that profile on the runner, and set the profile name or UUID explicitly when you sign manually, so the runner can't pick up something else. If the error started right after a "maximum number of certificates" cleanup, the profile still points at a certificate you revoked. See [Maximum number of certificates generated](https://docs.xenoci.com/guides/maximum-number-of-certificates.md).

## Where box fits

box keeps no certificates or profiles. `box build --device-build` returns an unsigned Release build for you to sign with your own pair. `box exec` runs your own archive or signing script on the Mac with files from your project folder, and returns what it writes to `$BOX_OUT`. See [Build](https://docs.xenoci.com/ios/build.md) and [Exec](https://docs.xenoci.com/ios/exec.md).

Related: [Upload an IPA without Xcode](https://docs.xenoci.com/guides/upload-ipa-without-xcode.md), [Ship an iOS app from Linux](https://docs.xenoci.com/guides/ship-ios-from-linux.md), [Xcode build not found](https://docs.xenoci.com/guides/xcodebuild-not-found.md).

[Start with \$10 of credit, good for 1 year](https://xenoci.com/?ref=docs-provisioning-profile-missing-certificate).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.