iOS Asset Bundles fail to load on Apple Vision Pro simulator

I am encountering an issue where iOS Asset Bundles fail to load on Apple Vision Pro hardware. The error message I’m receiving is as follows:

The file cannot be loaded because it was created for another build target that is not compatible with this platform.
Please make sure to build AssetBundles using the build target platform that it is used by.
File's Build target is: 9
Unknown error occurred while loading 'archive:/CAB-4f4cf5be917bbd0c1bdcac0e19ba458b/CAB-4f4cf5be917bbd0c1bdcac0e19ba458b'.
The AssetBundle 'Memory' can't be loaded because it was not built with the right version or build target.

Unity version: 2022.3.13f1
Xcode version: 15.2 beta (15C55500c)
macOS version: Ventura 13.6.1
Apple Vision Pro hardware and simulator: VisionOS_1_beta7_simulator_runtime
Using a MacBook Air with M2 chip.

Specific Questions:
Is there a known compatibility issue with iOS Asset Bundles on Apple Vision Pro hardware?

Could you please provide clarification on whether iOS apps are expected to run properly on Vision Pro hardware according to Apple’s documentation?

Are you building for visionOS out of Unity? If so, you will need to build your AssetBundles for the visionOS build target as well. If this is an iOS app (built out of Unity for the iOS build target) running on Vision Pro, I would not expect to see this issue.

I was unable to run the iOS app through Vision Pro Simulator. I could install the iOS build app on the simulator, but the app crashed right after I launched it within the simulator. Are there any settings I need to change to ensure the app launches successfully?

The simulator is not compatible with binaries built for a device, and vice versa, due to differences in Metal capabilities that are exposed on iOS/visionOS hardware and macOS. Unless your iOS app built was built for the Simulator SDK (for iOS), a crash is expected.

Are referring to Simulator SDK inside Unity settings?
Im sorry, i am building the app using Simulator SDK (for iOS). and the crash still occurs.
is there some differences between Simulator SDK (for iOS) and Simulator SDK (for visionOS)

Ah interesting. If the app is built for the Simulator SDK… honestly, I’m not sure. The simulator is somewhat fragile in some ways. Can you post a stack trace of the crash?

Im sorry but there are no stack traces logged when the app crashed.
I can only provide you with the steps to reproduce.

  1. Build an empty project using Unity 2022.3.16f1.
  2. Change ‘Target SDK’ from ‘Device SDK’ to ‘Simulator SDK’ inside Player Settings.
  3. Build to Xcode project (Using Xcode Beta 2).
  4. Verify that you can only build the project for iOS Simulator Device.
  5. In ‘Target Unity-iPhone,’ go to ‘Build Settings’ and change ‘Architecture’ from ‘x86_64’ to ‘Standard Architectures (arm64, x86_64).’
  6. Change Supported Platforms from ‘iphonesimulator’ to ‘visionOS.’
  7. Now you can build the iOS app for the visionOS simulator.
  8. Launch the app, and it will crash.

I believe it’s because the Build Settings inside UnityFramework still target ‘iphonesimulator.’
However, if I change the settings inside UnityFramework, a build error occurs, stating that ‘UIScreen is unavailable: not available on visionOS.’

Do you know how to fix the above problem?

Hmm – I’m not sure how this would work. Unity currently doesn’t actually support the Apple Silicon simulator for iOS (only x64 – the Unity Engine library that’s in the project in an iOS simulator configuration is x64). visionOS only supports the simulator on Apple Silicon. I’m surprised this even builds without error.

Are you saying that Unity can’t run an iOS build app on the VisionOS simulator?
Unity only supports x64.
On the other hand, the VisionOS simulator only runs on Apple Silicon, which I believe is arm64.
If so, is there any other way to make the iOS app run on the VisionOS simulator?

And, can the iOS app (*.ipa) run on the original VisionOS device?

Bump. We demand additional informations.