Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Safari/iOS #16

Open
2 tasks done
netoneko opened this issue Aug 10, 2019 · 0 comments
Open
2 tasks done

Add support for Safari/iOS #16

netoneko opened this issue Aug 10, 2019 · 0 comments

Comments

@netoneko
Copy link
Contributor

netoneko commented Aug 10, 2019

Things missing so far:

Easiest way to enable iOS support is to include the following snippet:

<script src="https://peterolson.github.io/BigInteger.js/BigInteger.min.js"></script>
<script>
	if (navigator.userAgent.match(/iPhone/) || navigator.userAgent.match(/iPad/)) {
		function BigInt(value) {
			if ((typeof value) === "string" && value.slice(0, 2) === "0x") {
				return bigInt(value.slice(2), 16);
			}
			return bigInt(value);
		}
	}
</script>

It includes the BigInt polyfill and a compatibility layer that allows our SDK to utilize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant