diff --git a/all_test.go b/all_test.go index cc36e47..a884694 100644 --- a/all_test.go +++ b/all_test.go @@ -466,6 +466,11 @@ var uastrings = []struct { ua: "Mozilla/5.0 (Linux; Android 4.2.1; Galaxy Nexus Build/JOP40D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19", expected: "Mozilla:5.0 Platform:Linux OS:Android 4.2.1 Browser:Chrome-18.0.1025.166 Engine:AppleWebKit-535.19 Bot:false Mobile:true", }, + { + title: "Chrome for iOS", + ua: "Mozilla/5.0 (iPhone; CPU iPhone OS 11_3_1 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) CriOS/67.0.3396.87 Mobile/15E302 Safari/604.1", + expected: "Mozilla:5.0 Platform:iPhone OS:CPU iPhone OS 11_3_1 like Mac OS X Browser:Chrome-67.0.3396.87 Engine:AppleWebKit-604.1.34 Bot:false Mobile:true", + }, { title: "WebkitNoPlatform", ua: "Mozilla/5.0 (en-us) AppleWebKit/525.13 (KHTML, like Gecko; Google Web Preview) Version/3.1 Safari/525.13", diff --git a/browser.go b/browser.go index c6a1d24..0758466 100644 --- a/browser.go +++ b/browser.go @@ -73,6 +73,8 @@ func (p *UserAgent) detectBrowser(sections []section) { p.browser.Name = "Chrome" } else if sections[sectionIndex].name == "Chromium" { p.browser.Name = "Chromium" + } else if sections[sectionIndex].name == "CriOS" { + p.browser.Name = "Chrome" } else { p.browser.Name = "Safari" }