We currently get the machine identifier in our iOS app so that we can use the type of device when communicating with our customers (i.e, you last logged in on your iPhone 12, your password was changed on the iPad Air, etc). To do this, we call sysctl with the parameters CTL_HW, HW_MACHINE for name. This returns us back a string in the format iPhone12,5 (iPhone 11 Pro Max). When running on an Apple Silicon mac, this call always returns iPad8,6, which corresponds to the iPad Pro 12.9 3rd gen. Is there anyway for us to get the actual machine type for the Mac itself instead? When running sysctl in a Mac app, we get the correct type. But it looks like for compatibility purposes, Apple has forced the type to an existing iOS device.
I am aware of ProcessInfo.processInfo.isiOSAppOnMac which can be used to at least identify if we're running on a Mac or not. But is there another call we can make that will give us the machine type for the Mac itself?
While I'm asking, are there any calls that we can make to tell us the version of macOS we are running on when running an iOS app on macOS?
I am aware of ProcessInfo.processInfo.isiOSAppOnMac which can be used to at least identify if we're running on a Mac or not. But is there another call we can make that will give us the machine type for the Mac itself?
While I'm asking, are there any calls that we can make to tell us the version of macOS we are running on when running an iOS app on macOS?