How to test whether iOS app runs on an M1 mac?

My iOS-app shows a map and may be the user's location. At some point it will request the "always" location permission. On iOS all is well. The app also runs pretty neat on M1 macs so far, except for the part where it wants to request that permission. I also think it never asked me for the "Permission when in use" on the M1.

However, after the user granted the always-permission on iOS, he'll be shown the screen of the GPS tracker. Since recording GPS tracks doesn't make much sense on M1, I'd like to show the user that screen, but disable the start button.

So how do I test for M1?

P.S. I'd not ask such a dumb question, if I didn't get this error: (including these strange quotes)

„POI Toolbox“ kann nicht installiert werden

Domain: IDEInstallLocalMacService
Code: 1
Failure Reason: Versuche es später noch einmal.
Recovery Suggestion: Failed to finalize LSBundleWrapper mutator instance for {...BUNDLE_ID...}

--

System Information

macOS Version 11.4 (Build 20F71)
Xcode 12.5.1 (18212) (Build 12E507)
Timestamp: 2021-06-28T12:31:13+02:00

The "failure reason" doesn't say anything helpful. It means "Try again later."

Replies

So how do I test for M1?

There’s some good info on this front in the iOS Apps on Mac group of the Apple Silicon docs. Specifically, Running Your iOS Apps on macOS says:

The isiOSAppOnMac property of ProcessInfo tells you whether your iOS app is running on macOS or iOS, but checking that property should always be your last choice. It’s better to run the same code on both platforms.

Apropos that last point, I’ve added two ‘location’ tags to your question in the hope that someone who has more location expertise can help you with your underlying location issue.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

  • That was helpful. Thank you!

Add a Comment