breautek commented on issue #1113: URL: https://github.com/apache/cordova-ios/issues/1113#issuecomment-1598796795
> App won't build on the simulator but works fine on the device > After adding the below setting for a run on the simulator will cause the issue: > Xcode -> Target Project -> Build Setting -> Excluded Architectures > "arm64" > Xcode -> Pod Target -> Build Setting -> Excluded Architectures > "arm64" M1 **IS** an Arm64 architecture chip. If you're excluding arm64 for simulator, then naturally the simulator won't be able to run on M1 macs natively. I'm not understanding the rationale is for excluding architectures. Nik asked this question above and no one has actually gave him an answer. When building for a physical device, ARM64 should be the only architecture because that is the only chip available on modern devices. For simulators, there are two possible architectures that the simulator may run on: 1) x86_64 (Intel macs), and 2) ARM64 (M-chip macs). You'll going to want to at least build for your current architecture, which is the default setting. If you're a library author providing native frameworks, you'll probably want to build both an x86_64 framework and a arm64 framework for your simulator variant build and package them into a xcframework bundle along with your iOS arm64 build. If you're having trouble running your app on a simulator with M1, it is possible that you have a plugin that is shipping native frameworks that lacks an arm64 build. There are plenty of old frameworks out there that predates M1 macs (even today) so they don't have an arm64 build bundled in their framework for the simulator. The cordova-plugin-googlemaps plugin is one example of this (they are still using Google Maps SDK v3 for iOS, when [v7.3.0](https://developers.google.com/maps/documentation/ios-sdk/release-notes#January_12_2023) is required for m1 support). I'm closing this issue because this doesn't appear to describe a bug with Cordova, rather it appears to be a case of misunderstanding XCode configuration and raising an issue due to misconfiguration of native settings. If you have any questions, then I'd recommend asking for support at our [GitHub Discussions](https://github.com/apache/cordova/discussions). If you believe there is still a bug with Cordova framework on M1 macs, then I'd recommend first making sure it can be reproduced in a minimal reproduction app, preferably in the hello world template app to clearly demonstrate the issue (rather than an issue of third-party code). If that can be done, then please do raise a new issue. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
