## TL;DR
Read the first IL2CPP error in the Xcode build log, which names the managed assembly, stripping level or unsupported construct behind the failure, then fix that cause: raise or lower managed stripping, add a link.xml preservation entry, update the Unity or Xcode version pairing, or remove the offending plugin code. IL2CPP failures look generic at the lane level but are specific in the log; never treat the summary line as the diagnosis.

```text
Unity iOS release build failed with IL2CPP error during Xcode archive
```

## Use this when
- A Unity-generated Xcode project fails archiving with an IL2CPP error.
- The failure started after a Unity upgrade, a new plugin, or a stripping change.
- The same project builds for Android without the error.

## Not for this skill when
- The error is a plain Swift or Objective-C compile error in generated code. Fix it as a native compile issue.
- IL2CPP conversion succeeds but signing fails. That is a signing problem after conversion, with its own skill.

## Steps
1. Build the generated Xcode project and capture the full IL2CPP output, finding the first error line and the assembly it names. Verify: the first error and named assembly are recorded
2. Check the Unity and Xcode version pairing against Unitys documented support for that release, since mismatched pairs are a top cause. Verify: the versions are a supported pair, or the mismatch is the finding
3. If the error involves stripping or missing types at conversion, set managed stripping to a lower level for iOS and rebuild to test the theory. Verify: the build progresses past IL2CPP with the lower stripping level, or fails identically ruling stripping out
4. Add or correct link.xml entries for assemblies the log says were stripped or failed to resolve. Verify: link.xml covers the named assemblies
5. Remove or update any native plugin the log implicates, checking its iOS folder for stale architectures including simulator slices in a device build. Verify: plugins in the project are current and device-only where required
6. Regenerate the Xcode project from Unity with the fixes and archive again. Verify: the archive completes and produces the IPA
7. Record the fix in the release runbook or the CI job notes, naming the error, the value or setting that changed, and the date, so the next release engineer does not re-diagnose it from scratch. Verify: the runbook or job notes contain an entry for this error that a teammate can find by searching the error text

## Why it happens
IL2CPP converts managed code to C++ before Xcode compiles it, adding a failure layer native projects never see. Version skew between Unity and Xcode, aggressive managed stripping, and plugins with stale binaries all surface in that layer with dense logs. The discipline is identical to native builds: first real error, named artefact, targeted fix.

In practice this failure is rarely a one-off. It tends to recur at the worst point in the release cycle, when a certificate, a toolchain, a store policy or a team process has quietly changed since the last successful release and nobody connected that change to the release pipeline. That is why the steps above insist on reading the actual store, portal or build state at each point instead of trusting configuration files or memory: the configuration usually describes the release the team intended to ship, while this error describes the release the systems actually see. Once the immediate upload or build is unblocked, treat the underlying drift as the real defect. Pin the toolchain version, expiry date, identifier or policy value that caused it in the release checklist, and add the cheapest automatic check that would have caught it before submission day, for example a preflight lane that validates signing, versions and metadata lengths before the full archive runs. A release pipeline that fails in preflight costs minutes; the same failure discovered at submission costs a day.

## Variants and edge cases
### IL2CPP error Xcode archive Unity fix
Direct phrasing; start from the first log error. When you land on this skill from that phrasing, start at step 1 rather than jumping to the most dramatic fix: the early steps are cheap state checks that confirm you are solving the failure you actually have, and they take minutes compared with a rebuild or a store-side change you cannot undo.
### Unity iOS build failed il2cpp did not run properly
Console phrasing from the Unity editor side of the same failure. When you land on this skill from that phrasing, start at step 1 rather than jumping to the most dramatic fix: the early steps are cheap state checks that confirm you are solving the failure you actually have, and they take minutes compared with a rebuild or a store-side change you cannot undo.
### Edge case: Burst and scripting backends
Burst compiler issues masquerade as IL2CPP failures. Check whether disabling Burst for a test build changes the error. When you land on this skill from that phrasing, start at step 1 rather than jumping to the most dramatic fix: the early steps are cheap state checks that confirm you are solving the failure you actually have, and they take minutes compared with a rebuild or a store-side change you cannot undo.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_2BiiUBQ-nrxaWbQS8mN43A
