diff --git a/src/ua-parser.js b/src/ua-parser.js index a3e6f51..4c43c5c 100755 --- a/src/ua-parser.js +++ b/src/ua-parser.js @@ -769,6 +769,8 @@ ], [VENDOR, [TYPE, EMBEDDED]], [ /(aeobc)\b/i // Echo Dot ], [MODEL, [VENDOR, AMAZON], [TYPE, EMBEDDED]], [ + /(homepod).+mac os/i // Apple HomePod + ], [MODEL, [VENDOR, APPLE], [TYPE, EMBEDDED]], [ /windows iot/i ], [[TYPE, EMBEDDED]], [ @@ -827,7 +829,7 @@ ], [[VERSION, strMapper, windowsVersionMap], [NAME, 'Windows']], [ // iOS/macOS - /ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i, // iOS + /[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i, // iOS /(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i, /cfnetwork\/.+darwin/i ], [[VERSION, /_/g, '.'], [NAME, 'iOS']], [ diff --git a/test/device-test.json b/test/device-test.json index a17ec75..0a8afb6 100644 --- a/test/device-test.json +++ b/test/device-test.json @@ -1844,6 +1844,15 @@ "type": "undefined" } }, + { + "desc": "Apple HomePod", + "ua": "AppleCoreMedia/1.0.0.15D61 (HomePod; U; CPU OS 11_2_5 like Mac OS X; en_us)", + "expect": { + "vendor": "Apple", + "model": "HomePod", + "type": "embedded" + } + }, { "desc": "Apple Watch", "ua": "atc/1.0 watchOS/7.3.3 model/Watch4,2 hwp/t8006 build/18S830 (6; dt:191)", diff --git a/test/os-test.json b/test/os-test.json index 0240914..9f120bc 100644 --- a/test/os-test.json +++ b/test/os-test.json @@ -818,6 +818,15 @@ "version" : "16.4.1" } }, + { + "desc": "Apple HomePod", + "ua": "AppleCoreMedia/1.0.0.15D61 (HomePod; U; CPU OS 11_2_5 like Mac OS X; en_us)", + "expect" : + { + "name" : "iOS", + "version" : "11.2.5" + } + }, { "desc" : "watchOS", "ua" : "server-bag [Watch OS,8.4,19S546,Watch3,4]",