You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.
The Apple CNA is a version of Safari with some functionality stripped out which the OS pops open when it detects that the user is in a 'captive network'. In working with the Apple CNA on both iOS and OSX we discovered that platform.js has irregular behavior on the OSX CNA.
The specific navigator.userAgent string on the device CNA we are testing is: Mozilla/5.0 (Macintosh; Intel Mac OSX 10_13) AppleWebKit/604.1.38 (KHTML, like Gecko)
Some of the parsing works, but description and name are not assigned correctly (description is identical to the userAgent string, name is null). In glancing at the platform.js source code I don't know how to fix this, as the userAgent string in this situation doesn't seem to specify enough about the context (shame on Apple).
Things work better on the iOS CNA where description and name convey that the user is on Safari on an iPhone. Example iOS CNA userAgent: Mozilla/5.0 (iPhone; CPY iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Mobile/14G60 Looks like line 643 is catching that we are on iPhone and assuming we must be on something like Safari. else if (/^iP/.test(product)) { ... }
Perhaps something similar could be done checking os.family for 'OS X' and assuming Safari if no better match.
The text was updated successfully, but these errors were encountered:
The Apple CNA is a version of Safari with some functionality stripped out which the OS pops open when it detects that the user is in a 'captive network'. In working with the Apple CNA on both iOS and OSX we discovered that platform.js has irregular behavior on the OSX CNA.
The specific navigator.userAgent string on the device CNA we are testing is:
Mozilla/5.0 (Macintosh; Intel Mac OSX 10_13) AppleWebKit/604.1.38 (KHTML, like Gecko)
Some of the parsing works, but description and name are not assigned correctly (description is identical to the userAgent string, name is null). In glancing at the platform.js source code I don't know how to fix this, as the userAgent string in this situation doesn't seem to specify enough about the context (shame on Apple).
Things work better on the iOS CNA where description and name convey that the user is on Safari on an iPhone. Example iOS CNA userAgent:
Mozilla/5.0 (iPhone; CPY iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Mobile/14G60
Looks like line 643 is catching that we are on iPhone and assuming we must be on something like Safari.else if (/^iP/.test(product)) { ... }
Perhaps something similar could be done checking os.family for 'OS X' and assuming Safari if no better match.
The text was updated successfully, but these errors were encountered: