I have used this great plugin in my unity app. It is working great on android devices. But on ios devices it is working on some and not on some.
Idea is that I think it is not working on ios 11.
Here is my website code:
<script>
$(document).ready(function () {
$(“#home”).click(function () {
if (isIOS()) {
appendIframeWithURL(‘inappbrowserbridge://’ + “Go Home”);
} else if (isAndroid()){
UnityInAppBrowser.sendMessageFromJS(“Go Home”);
}
});
});
</script>
<script type=”text/javascript”>
function appendIframeWithURL(url) {
var iframe = document.createElement(“IFRAME”);
iframe.setAttribute(“src”, url);
document.documentElement.appendChild(iframe);
iframe.parentNode.removeChild(iframe);
iframe = null;
}
var userAgent = navigator.userAgent || navigator.vendor || window.opera;
function isIOS() {
if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {
return true;
} else {
return false;
}
}
function isAndroid() {
return (/android/i.test(userAgent));
}
</script>