You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/10/19 02:14:18 UTC
[GitHub] [cordova-plugin-device] erisu edited a comment on pull request #133: (iOS)(Mac Apple Silicon) Detect Cordova running on a Mac desktop with Apple Silicon
erisu edited a comment on pull request #133:
URL: https://github.com/apache/cordova-plugin-device/pull/133#issuecomment-711471219
I personally don't see what is the need of this new property. I feel that using both the `device.model` and `device.platform` should be enough to identify what is running on what device.
To recap from the documents printed in the README of this repo,
`device.platform` should return either `iOS` or `Mac OS X`. But since we are talking about building an iOS app with the Cordova iOS platform, `iOS` will always be returned. This value is hardcoded.
`device.model` should return one of the following two cases:
```
// iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1
// OSX: returns "x86_64"
```
From the Cordova iOS related source code, I am expecting to see either a simulator's model identifier or the hardware machine which is one of the two items above. When I did a quick test of the source code on a macOS, `x86_64` is returned.
Basically, for an iOS app on a macOS, I am expecting to see the `iOS` platform on a `x86_64` model. I suspect on a Apple Silicon, it would say instead `iOS` platform on an `ARM64`.
I personally think this might be enough, but can anyone explain why it might not be?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org