uiwebview - iOS8 Simulator user agent -
uiwebview - iOS8 Simulator user agent -
while investigating why have bug on ios8 webview discovered webview's user-agent is:
mozilla/5.0 (iphone; cpu iphone os 10_9_5 mac os x) applewebkit/600.1.4 (khtml, gecko) mobile/12a365 (2072607680)
whereas since i'm running ios8, rather should be:
mozilla/5.0 (iphone; cpu iphone os 8_0_2 mac os x) applewebkit/600.1.4 (khtml, gecko) mobile/12a405kalturanativecordovaplayer (350612576)
of course of study there's no iphone running version 10.10 yet, xcode6 somehow picking version mac os x. ios < ios8 simulators, works fine.
so have solution me how find if it's ios8 simulator or not
for javascript method:
isios8 = function(){ homecoming ( /os 8_/.test( useragent ) || /version\/8/.test( useragent ) ) && isios(); };
this issue fixed in ios 8.3 simulator runtime. version , newer versions not suffer issue more.
i suggest "iphone os" , "applewebkit/600.1.4" substrings if need determine you're running on ios 8, should not approaching problem way. instead, you're improve off making determination based on capabilities rather version numbers.
uiwebview ios8 ios-simulator
Comments
Post a Comment