Skip to content

Instantly share code, notes, and snippets.

View taher435's full-sized avatar
👨‍💻

Taher Dhilawala taher435

👨‍💻
View GitHub Profile
@taher435
taher435 / isInsideSFSafariViewController.ts
Last active September 11, 2024 11:19 — forked from aeharding/isInsideSFSafariViewController.ts
Check if page is running in SFSafariViewController vs the Safari app
function isInsideSFSafariViewController(): boolean {
// Only iOS
if (!isIOS()) return false;
const iosVersion = getIosVersion();
// Can't use this hack in iOS < 15
if (!iosVersion || iosVersion[0] < 15) return false;
// In SFSafariViewController, this is a valid font.