iOS Simulator Error: UnityFramework Incompatible Platform

Hey everyone, I'm encountering an issue when trying to run my iOS application, which integrates a Unity project, on the iOS Simulator. I'm consistently getting a dlopen error 232 related to UnityFramework.framework. The full error message is: Error loading ...UnityFramework.framework/UnityFramework (232): dlopen(...UnityFramework.framework/UnityFramework, 0x0109): tried: '...UnityFramework.framework/UnityFramework' (mach-o file (...UnityFramework.framework/UnityFramework), but incompatible platform (have 'iOS', need 'iOS-sim'))

It seems like the UnityFramework.framework is built for a physical iOS device (ARM architecture), but the simulator requires a different architecture (x86_64 for Intel Macs or arm64 for Apple Silicon Macs). I've already tried:

  • Cleaning the build folder in Xcode.
  • Checking the "Frameworks, Libraries, and Embedded Content" settings in my target's General tab.

Could anyone provide guidance on how to properly configure my Unity build or Xcode project to ensure UnityFramework.framework includes the necessary simulator architectures? Any specific build settings in Unity or Xcode, or steps to re-export/re-integrate the framework, would be greatly appreciated! Thanks in advance for your help!

iOS Simulator Error: UnityFramework Incompatible Platform
 
 
Q