Search Issue Tracker

By Design

Votes

3

Found in [Package]

6.3.0-pre.1

Issue ID

ARKB-97

Regression

No

[iOS] Xcode 26 build for iOS fails on "Assertion failed" when ARKit is added as a plug-in provider

Package: ARKit

-

How to reproduce:
1. Open the “Test Identity.zip“ project
2. Open the “SampleScene“
3. Build for iOS
4. Open the “Unity-iPhone.xcodeproj“ project in Xcode 26
5. Deploy to a device

Expected result: Xcode build does not fail
Actual result: Xcode iOS build fails with “Assertion failed: (it != _dylibToOrdinal.end()), function dylibToOrdinal, file OutputFile.cpp, line 5196.“ on UnityFramework

Reproducible with: 6.1.0-pre.3 (6000.0.59f1), 6.3.0-pre.1, 6.3.0-pre.2 (6000.0.59f1, 6000.2.6f1, 6000.3.0b4, 6000.4.0a1)
Not reproducible with: 6.1.0-pre.2 (6000.0.59f1)

Reproducible environment: macOS 26.0 (M1) + Xcode 26
Not reproducible environment: macOS 15.7 (M4 Max) + Xcode 16.2

Note: Only reproducible with Xcode 26

  1. Resolution Note:

    The "Assertion failed: (it != _dylibToOrdinal.end())" error is Xcode telling you that your project has so much code, it doesn't fit into the address space of the program. This appears to be increasingly common when building Unity apps with Xcode 26.

    The solution for this issue is to go to Project Settings > Player > IL2CPP Code Generation, and set this value to "Optimize for code size and build time". Hope this helps.

Comments (5)

  1. andyb-unity

    Oct 31, 2025 23:07

    Hi all, we can't edit the resolution notes above, but we are aware that they are incorrect for currently released versions of AR Foundation. Follow this Discussions post for the most up-to-date information about this case: https://discussions.unity.com/t/xcode-26-0-1-unity-6-0-ar-project-fails-with-linker-assertion-dylibtoordinal/1684912

  2. Jeremy_35

    Oct 22, 2025 10:52

    The fix does not work on our side: found in Unity 6.0.59f2.

  3. RPSAppDevs

    Oct 17, 2025 13:13

    Happened to us to, with a really small project.. it's got nothing to do with size (and have unity had a bump on the head? How can this be 'by design'??).

    This is because unity adds -ld64 to to project, which forces it to use an old linker (it's really an xcode 26 bug, but it has been doing that since beta and apple have shown no indication they're going to fix it).

    There is post process routine here - https://discussions.unity.com/t/xcode-26-0-1-unity-6-0-ar-project-fails-with-linker-assertion-dylibtoordinal/1684912/13 that fixes the problem by removing it, but apparently it doesn't necessarily play well with all plugins.

  4. laxon

    Oct 15, 2025 12:39

    This is an incorrect assessment. The issue persists. I have maybe three C# files in this project, the only thing added is the AR sdk from Unity themselves. Didn't happen in previous 6000.2 versions.

  5. Ramses-AzerionSports

    Oct 14, 2025 13:38

    "The solution for this issue is to go to Project Settings > Player > IL2CPP Code Generation, and set this value to "Optimize for code size and build time". Hope this helps."

    This does not help for us. We still get the same error..

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.