export function isIosDevice() { const sampleTouchDevices = ['iphone', 'ipad', 'ipod']; const matchString = sampleTouchDevices.map((device: string) => `(${device})`).join('|'); const regex = new RegExp(matchString, 'gi'); return typeof navigator !== 'undefined' && !!regex.test(navigator.userAgent); }