File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
TeadsDemoApp/Controllers/webViewController/webViewHelper/Ressources Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 161
161
**************************/
162
162
163
163
var getPlatformType = function ( ) {
164
+ const hasTouchPoints = ! ! ( navigator . maxTouchPoints && navigator . maxTouchPoints > 0 )
165
+ const userAgent = navigator . userAgent . toLowerCase ( )
164
166
return tryOrLog ( function ( ) {
165
- if ( / a n d r o i d / i. test ( navigator . userAgent . toLowerCase ( ) ) ) {
167
+ if ( / a n d r o i d / i. test ( userAgent ) ) {
166
168
return ANDROID_OS ;
167
- } else if ( / i p h o n e | i p a d | i p o d / i. test ( navigator . userAgent . toLowerCase ( ) ) ) {
169
+ } else if ( / i p h o n e | i p a d | i p o d / i. test ( userAgent ) || ( / m a c \s + o s / i . test ( userAgent ) && hasTouchPoints ) ) {
168
170
return IOS_OS ;
169
171
} else return UNKNOWN_OS ;
170
172
} , 'getPlatformType' )
299
301
}
300
302
// START !
301
303
sendJsLibReady ( ) ;
302
- } ) ( ) ;
304
+ } ) ( ) ;
You can’t perform that action at this time.
0 commit comments