From 5112b4e4f39566a09c53011904153ef7eafc4128 Mon Sep 17 00:00:00 2001 From: Parthav Miyani <68559470+parthavmiyani@users.noreply.github.com> Date: Sat, 26 Mar 2022 14:00:54 +0530 Subject: [PATCH 1/3] iPad Pro support added --- lib/public/script.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/public/script.js b/lib/public/script.js index 80dcaa3..4b5c63c 100644 --- a/lib/public/script.js +++ b/lib/public/script.js @@ -5,7 +5,8 @@ function deepLink(options) { var androidPackageName = options.android_package_name; var playStoreLink = 'https://market.android.com/details?id=' + androidPackageName; - var ua = window.navigator.userAgent; + var navigator = window.navigator; + var ua = navigator.userAgent; // split the first :// from the url string var split = url.split(/:\/\/(.+)/); @@ -32,7 +33,13 @@ function deepLink(options) { return /Android/i.test(ua); }, ios: function () { - return /iPhone|iPad|iPod/i.test(ua); + if (/iPad|iPhone|iPod/.test(ua)) { + return true; + } else { + return navigator.maxTouchPoints && + navigator.maxTouchPoints > 2 && + /Macintosh/.test(ua); + } }, }; From 8930df1723ed85bf3032ccc2bdba5efb07bb56f0 Mon Sep 17 00:00:00 2001 From: Parthav Miyani <68559470+parthavmiyani@users.noreply.github.com> Date: Sat, 26 Mar 2022 14:25:34 +0530 Subject: [PATCH 2/3] added new version support for safari --- lib/public/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/public/script.js b/lib/public/script.js index 4b5c63c..6448a0f 100644 --- a/lib/public/script.js +++ b/lib/public/script.js @@ -82,7 +82,7 @@ function deepLink(options) { // chrome and safari on ios >= 9 don't allow the iframe approach if ( ua.match(/CriOS/) || - (ua.match(/Safari/) && ua.match(/Version\/(9|10|11|12)/)) + (ua.match(/Safari/) && ua.match(/Version\/(9|10|11|12|13|14|15)/)) ) { launchWekitApproach(urls.deepLink, urls.iosStoreLink || urls.fallback); } else { From f0ffc2a0571401fe81b1468f4a9de608d9c2d1bc Mon Sep 17 00:00:00 2001 From: Parthav Miyani <68559470+parthavmiyani@users.noreply.github.com> Date: Sat, 26 Mar 2022 14:26:25 +0530 Subject: [PATCH 3/3] increased fallback redirection time for slow loading apps --- lib/public/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/public/script.js b/lib/public/script.js index 6448a0f..8601ee7 100644 --- a/lib/public/script.js +++ b/lib/public/script.js @@ -56,7 +56,7 @@ function deepLink(options) { document.location = url; setTimeout(function () { document.location = fallback; - }, 250); + }, 2500); } function launchIframeApproach(url, fallback) {