RuntimeReferenceImageLibrary for Tracking Images seems empty in ios build

In the unity editor everything works fine but in the ios build I created with Unity Build Automation I get the following error:

InvalidOperationException: The number of images in the XRReferenceImageLibrary named ‘ReferenceImageLibrary’ (9) does nat match the number of images in the native reference image data (0). The XRReferenceImageLibrary may need to be re-exported for iOS.

Other people have similar problems, but for example the solution provided in this topic here seam not to apply:

It says that the image-filenames may be to long for windows.
BUT the build is done via Build Automation on Mac and there I have no control over paths. And my image filenames are “one.png” and “two.png” since the error also occurs, when I use the images from the AR foundation samples.

And I didn’t find a lot of other information.
What format should those images be in? Maybe something is wrong there
What is that “native reference image data” mentioned in the error? Can I somehow make sure that the images are in there? I tried putting them in Resources or Streaming Assets, which made no difference (Form Streaming assets I even could not drag them in to the ImageLibrary asset).

The images are also referenced in the scene, but this also did not help.

Has anyone a solution or an how to for tracking images in ios builds made with unity build automation?

The only thing i’m aware of is that you must build on a mac for iOS platforms which you said you were doing. I would try to manually build it and see if you still have the issue to know if its something with your build pipeline. Otherwise I would encourage you to report a bug Unity QA: Building quality with passion

I recommend that you try doing this in Unity batch mode in your local environment before you get Unity Build Automation involved. This error typically indicates that either you are not running the Unity Editor for Mac, or you haven’t passed iOS as the Editor’s active build target in your command line arguments when running in batch mode.

There may be more information in the build logs to help you get to the source of the issue. ie, com.unity.xr.arkit/Editor/ARKitBuildProcessor.cs at master · needle-mirror/com.unity.xr.arkit · GitHub

I am using Build automation because I have no mac to build on.