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 161161 **************************/
162162
163163 var getPlatformType = function ( ) {
164+ const hasTouchPoints = ! ! ( navigator . maxTouchPoints && navigator . maxTouchPoints > 0 )
165+ const userAgent = navigator . userAgent . toLowerCase ( )
164166 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 ) ) {
166168 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 ) ) {
168170 return IOS_OS ;
169171 } else return UNKNOWN_OS ;
170172 } , 'getPlatformType' )
299301 }
300302 // START !
301303 sendJsLibReady ( ) ;
302- } ) ( ) ;
304+ } ) ( ) ;
You can’t perform that action at this time.
0 commit comments