From d09ef507a9a6756252fec837e775cb95d000c965 Mon Sep 17 00:00:00 2001 From: James Ross Date: Sat, 3 Nov 2018 20:53:50 +0000 Subject: [PATCH 1/2] Add support for Apple Watch Series 4 --- idevice.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/idevice.js b/idevice.js index baa6729..835b74a 100644 --- a/idevice.js +++ b/idevice.js @@ -140,5 +140,11 @@ var iDevice = (function() { } } + if(cpu == 'S4') { + if (s == '320x568'){ + return "Apple Watch Series 4" + } + } + return 'Unidentified ' + cpu + ' ' + s + '@' + dpr })(); From 5a484589b2f08548d1c4c7d4f5b16109dc865983 Mon Sep 17 00:00:00 2001 From: James Ross Date: Sat, 3 Nov 2018 22:59:00 +0000 Subject: [PATCH 2/2] Add Apple Watch Series 4 test --- tests.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests.js b/tests.js index c960000..d5ab553 100644 --- a/tests.js +++ b/tests.js @@ -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)