Skip to content
Latchkey

MAUI "A RuntimeIdentifier is required for iOS/Mac Catalyst" in CI

Building a MAUI iOS or Mac Catalyst app to a runnable bundle needs a RuntimeIdentifier (such as ios-arm64 or maccatalyst-x64). Without it, the build stops because it cannot decide the target architecture.

What this error means

A MAUI build fails reporting that a RuntimeIdentifier is required to build the iOS or Mac Catalyst target, often when invoking build instead of publish without a RID.

dotnet
error : A RuntimeIdentifier is required to build and run this application for ios.
Specify a RuntimeIdentifier, for example -p:RuntimeIdentifier=ios-arm64.

Common causes

No RID specified for the device build

iOS and Mac Catalyst app bundles are RID-specific; without -p:RuntimeIdentifier, the build cannot target an architecture.

Using build where publish with a RID is expected

Producing a distributable bundle is a publish-with-RID operation; a plain build of the platform head can miss the RID.

How to fix it

Pass an explicit RuntimeIdentifier

  1. Choose the RID for the target (ios-arm64, maccatalyst-arm64, etc.).
  2. Pass it on the command line or in the project.
  3. Use publish to produce the app bundle.
Terminal
dotnet publish -f net8.0-ios -c Release -p:RuntimeIdentifier=ios-arm64

Set a default RID in the project head

Declare a RID for the platform target so CI does not need to pass it each time.

MauiApp.csproj
<RuntimeIdentifier Condition="'$(TargetFramework)'=='net8.0-ios'">ios-arm64</RuntimeIdentifier>

How to prevent it

  • Provide a RID for iOS and Mac Catalyst device builds.
  • Use publish (not build) to produce distributable bundles.
  • Keep RIDs in the project so CI invocations stay simple.

Frequently asked questions

What causes ""RuntimeIdentifier ... required""?
iOS and Mac Catalyst app bundles are RID-specific; without -p:RuntimeIdentifier, the build cannot target an architecture.
How do I fix "RuntimeIdentifier ... required"?
Pass an explicit RuntimeIdentifier

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card