Skip to content
This repository has been archived by the owner on Apr 6, 2019. It is now read-only.

Add support for Apple Watch Series 4 #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions idevice.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,5 +140,11 @@ var iDevice = (function() {
}
}

if(cpu == 'S4') {
if (s == '320x568'){
return "Apple Watch Series 4"
}
}

return 'Unidentified ' + cpu + ' ' + s + '@' + dpr
})();
2 changes: 2 additions & 0 deletions tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ test('iPad Pro 12.9" (2018)', 'Apple A12X GPU', 1024, 1366, 2)
test('iPod Touch 5', 'PowerVR SGX 543', 320, 568, 2, 'Mozilla/5.0 (iPod touch; ...')
test('iPod Touch 6', 'Apple A8 GPU', 320, 568, 2, 'Mozilla/5.0 (iPod touch; ...')

test('Apple Watch Series 4', 'Apple S4 GPU', 320, 568, 2)

test(undefined, 'Some GPU', 320, 568, 2)
test('Unidentified A12 320x568@2', 'Apple A12 GPU', 320, 568, 2)
test('Unidentified A13 375x812@3', 'Apple A13 GPU', 375, 812, 3)
Expand Down