Crash when running x86 build in CarPlay simulator on Apple Silicon

I'm having issues running a CarPlay app in the simulator on an M1 Mac. I have to build the app for x86 (EXCLUDED_ARCHS=arm64) because one of its dependencies doesn't have arm64 simulator support. The app builds and runs well enough on the iPhone simulator, but as soon as I open CarPlay the app has problems.

The app is still based on CPApplicationDelegate. It builds and simulates fine on an Intel Mac. On an M1 Mac, it builds and simulates on the iPhone sim, but right after attaching the CarPlay sim, it throws an exception "Application does not implement CarPlay template application lifecycle methods in its scene delegate."

In case the error actually was due to the use of CPApplicationTemplate, I updated the app the use SceneDelegate. It gets a bit further, but I'm unable to set any CP templates -- trying to set a template results in an exception like "Exception setting template: Unsupported object <CPMapTemplate: 0x6000001fa340>.... Allowed classes: (null)"

I also tried Apple's CoastalRoads app. When building for arm64 on an M1, the app works as it should. When building an x86 sim build (using EXCLUDED_ARCHS=arm64), the app gives the "Application does not implement CarPlay template..." exception.

Has anyone else seen this issue? Is it a known problem when running x64 simulator builds on an M1 Mac?

Replies

Xcode isn't supported under Rosetta, and that includes the iOS 15 simulators.

I have to build the app for x86 (EXCLUDED_ARCHS=arm64) because one of its dependencies doesn't have arm64 simulator support.

This is your starting point — work with the vendor to get an updated dependency so that you can then remove the Excluded Architecture setting and run the simulators natively on Apple silicon.

  • I'm not explicitly running Xcode or the simulator under Rosetta. Xcode is launching the build using the x86 simulator (SimLaunchHost.x86). I agree, the ideal solution is for the vendor to update the module, but since the x86 simulator exists, I wondered if there were some trick to getting the CarPlay display working properly with it.

  • Unfortunately, the only way I got my app to run properly was to bring back the intel mac.

Add a Comment

I just wanted to thank you, I couldn't figure out why the CarPlay Simulator didn't work on M1 Macs. I had added EXCLUDED_ARCHS=arm64 due to the Google Places SDKs lack of arm64 support and didn't think any more of it. Thankfully there is now a beta of Google Places SDK that now supports M1, so I could remove arm64 from EXCLUDED_ARCHS and get it working. I hope your dependancy gets updated soon!