Is there a way in pure C (not Objective-C, and certainly not Swift) way to detect if an iOS app is running on a Mac? I'm aware of iOSAppOnMac
, but AFAICT I'd need to write Objective-C code to use it. My application is quite old and large, with portions going back to the 1980s, so the burden of moving on the anything that can't be accessible directly from C is quite high.
Detect if iOS app is running on Apple Silicon Mac using pure C
Sorry, dude, get with the times. If it's not published or public, it's private, and there'd be no info available on what you're asking.
You should use iOSAppOnMac
for this.
Given that there’s no way to create an iOS app without using some Objective-C, your build system must be able to handle that somehow. If you need to access to this value in a part of your app where calling Objective-C is inconvenient, create your own abstraction for it. That is, write some Objective-C code that exports a C function that your C code can call. Or even use a global variable, as this isn’t going to change during the lifetime of your process.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"