Detect iPhone model (from 1st gen to XS Max)

1
2
const getiPhoneModel = () => {
// Create a canvas element which can be used to retrieve information about the GPU.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Based on Stack Overflow post, updated it to support XR, XS ans XS max.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.