diff --git a/apps/documenteditor/mobile/src/index_dev.html b/apps/documenteditor/mobile/src/index_dev.html index e6206d4cb5..34e64efc6e 100644 --- a/apps/documenteditor/mobile/src/index_dev.html +++ b/apps/documenteditor/mobile/src/index_dev.html @@ -33,6 +33,18 @@ // Framework7 doesn't set Device.android flag when navigator.platform == 'Win32', change it for debug navigator.__defineGetter__('platform', () => 'Win32Debug'); + if ( !isAndroid ) { + const ua = navigator.userAgent; + const iPad = ua.match(/(iPad).*OS\s([\d_]+)/); + const iPhone = !iPad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/); + + if ( !iPad && !iPhone ) { + Object.defineProperty(navigator, 'userAgent', { + get: function () { return `iPad; CPU OS 11_0 ${ua}`; } + }); + } + } + const getUrlParams = () => { let e, a = /\+/g, // Regex for replacing addition symbol with a space diff --git a/apps/presentationeditor/mobile/src/index_dev.html b/apps/presentationeditor/mobile/src/index_dev.html index 4342a52b61..cb2743791c 100644 --- a/apps/presentationeditor/mobile/src/index_dev.html +++ b/apps/presentationeditor/mobile/src/index_dev.html @@ -33,6 +33,18 @@ // Framework7 doesn't set Device.android flag when navigator.platform == 'Win32', change it for debug navigator.__defineGetter__('platform', () => 'Win32Debug'); + if ( !isAndroid ) { + const ua = navigator.userAgent; + const iPad = ua.match(/(iPad).*OS\s([\d_]+)/); + const iPhone = !iPad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/); + + if ( !iPad && !iPhone ) { + Object.defineProperty(navigator, 'userAgent', { + get: function () { return `iPad; CPU OS 11_0 ${ua}`; } + }); + } + } + const getUrlParams = () => { let e, a = /\+/g, // Regex for replacing addition symbol with a space diff --git a/apps/spreadsheeteditor/mobile/src/index_dev.html b/apps/spreadsheeteditor/mobile/src/index_dev.html index 8b053439c2..4494d3717d 100644 --- a/apps/spreadsheeteditor/mobile/src/index_dev.html +++ b/apps/spreadsheeteditor/mobile/src/index_dev.html @@ -33,6 +33,18 @@ // Framework7 doesn't set Device.android flag when navigator.platform == 'Win32', change it for debug navigator.__defineGetter__('platform', () => 'Win32Debug'); + if ( !isAndroid ) { + const ua = navigator.userAgent; + const iPad = ua.match(/(iPad).*OS\s([\d_]+)/); + const iPhone = !iPad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/); + + if ( !iPad && !iPhone ) { + Object.defineProperty(navigator, 'userAgent', { + get: function () { return `iPad; CPU OS 11_0 ${ua}`; } + }); + } + } + const getUrlParams = () => { let e, a = /\+/g, // Regex for replacing addition symbol with a space