@byhealth/native-app-jssdk
Advanced tools
Comparing version 2.2.0-beta.1 to 2.2.0-beta.2
@@ -36,3 +36,3 @@ "use strict"; | ||
nativeBridge_1.default('getAPPVersion', createCallback_1.default(resolve)); | ||
setTimeout(function () { return reject(unsupported('getAPPVersion')); }, 1000); | ||
setTimeout(function () { return reject(unsupported('getAPPVersion')); }, 500); | ||
}); | ||
@@ -39,0 +39,0 @@ } |
@@ -12,3 +12,3 @@ "use strict"; | ||
*/ | ||
var global = (typeof window === 'undefined' ? {} : window); | ||
var global = typeof window === 'undefined' ? {} : window; | ||
/** | ||
@@ -59,6 +59,6 @@ * UserAgent | ||
} | ||
if (typeof nativeJSBridge[api] === 'function') { | ||
if (isAndroid && typeof nativeJSBridge[api] === 'function') { | ||
nativeJSBridge[api].apply(nativeJSBridge, args); | ||
} | ||
else { | ||
else if (isIOS) { | ||
var frame_1 = document.createElement('iframe'); | ||
@@ -65,0 +65,0 @@ frame_1.src = "" + nativeProtocol + api + "/" + args.map(function (x) { return encodeURIComponent(x); }).join('/'); |
@@ -22,3 +22,3 @@ /* | ||
nativeBridge('getAPPVersion', createCallback(resolve)); | ||
setTimeout(function () { return reject(unsupported('getAPPVersion')); }, 1000); | ||
setTimeout(function () { return reject(unsupported('getAPPVersion')); }, 500); | ||
}); | ||
@@ -25,0 +25,0 @@ } |
@@ -10,3 +10,3 @@ /* | ||
*/ | ||
var global = (typeof window === 'undefined' ? {} : window); | ||
var global = typeof window === 'undefined' ? {} : window; | ||
/** | ||
@@ -54,6 +54,6 @@ * UserAgent | ||
} | ||
if (typeof nativeJSBridge[api] === 'function') { | ||
if (isAndroid && typeof nativeJSBridge[api] === 'function') { | ||
nativeJSBridge[api].apply(nativeJSBridge, args); | ||
} | ||
else { | ||
else if (isIOS) { | ||
var frame_1 = document.createElement('iframe'); | ||
@@ -60,0 +60,0 @@ frame_1.src = "" + nativeProtocol + api + "/" + args.map(function (x) { return encodeURIComponent(x); }).join('/'); |
{ | ||
"name": "@byhealth/native-app-jssdk", | ||
"version": "2.2.0-beta.1", | ||
"version": "2.2.0-beta.2", | ||
"description": "By-Health Native App Jssdk.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
84662