SailingSteve opened a new pull request, #133:
URL: https://github.com/apache/cordova-plugin-device/pull/133

   # Platforms affected
   iOS 14 and up
   
   
   
   ### Motivation and Context
   When running on iOS14, on a Mac that has an Apple Silicon processor (ARM64 
instead of Intel), this change allows you to determine this condition using 
cordova-plugin-device.
   
   This minor change exposes the iOS `isiOSAppOnMac` variable, which is the 
definitive way to detect that the Cordova iOS app is running on the Mac desktop 
on a non-Intel processor.
   
   On Cordova apps running on the Apple Silicon desktop, the hardware menu 
(wifi, clock, cell strength, battery) goes away, and other container changes 
need to be compensated for, so access to this variable is essential.  This 
plugin seems like the best place to expose this variable.
   
   ### Description
   in the iOS NSProcessInfo under iOS 14+, a new system variable has been 
defined, this change exposes that variable.
   
       [NSProcessInfo processInfo].isiOSAppOnMac
   
   
   ### Testing
   This change works on iOS 14 on macOS Big Sur Version 11.0 Beta 8 (20A5374i) 
running on an Apple A12Z processor.
   The change causes no problem (returns false) on macOS Catalina Version 
10.15.6 running on an Intel processor inside an iOS simulator (SE 2nd Gen, 8 
Plus 13.3, 11 Pro 14.0, 11 13.3, iPadPro 9.7" 14.0, iPadPro 12" 4th gen 14.0), 
and on a physical 
   iPhone Xs Max running iOS 13.7.
   Also no problem on an Android simulator for a Galaxy Tab S5e, and a Galaxy 
S9+ at API 30, and a Moto G5 plus (Android 8.1.10) physical phone.
   
   
   
   ### Checklist
   
   - [ ] I've run the tests to see all new and existing tests pass
   - [ ] I added automated test coverage as appropriate for this change
   - [x] Commit is prefixed with `(platform)` if this change only applies to 
one platform (e.g. `(android)`)
   - [ ] If this Pull Request resolves an issue, I linked to the issue in the 
text above (and used the correct [keyword to close issues using 
keywords](https://help.github.com/articles/closing-issues-using-keywords/))
   - [x] I've updated the documentation if necessary
   


-- 
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: issues-unsubscr...@cordova.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to