ipados
Tell iPadOS from macOS on the web
I’m using this test client side: if (navigator.userAgent.match(/Mac/) && navigator.maxTouchPoints && navigator.maxTouchPoints > 2) { …must be iPad OS… Since there’s no official touch screen for Mac, it seems pretty safe. The actual value of maxTouchPoints on the iPad is 5, BTW.
iOS/iPadOS safari push api support
iOS don’t support the W3C Spec web push notifications yet. But there is a Safari specific API for web notifications. Refer to this answer on multiple options you have. https://stackoverflow.com/a/49803408/1057093 Update: Corrected the Answer in the above link to clarify proprietary solution is only for OS X – Safari and no solution for iOS Safari … Read more
How can I check whether dark mode is enabled in iOS/iPadOS?
For iOS 13, you can use this property to check if current style is dark mode or not: if #available(iOS 13.0, *) { if UITraitCollection.current.userInterfaceStyle == .dark { print(“Dark mode”) } else { print(“Light mode”) } }