<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: iPhone/iPad &#8211; Get User-Agent for UIWebView</title>
	<atom:link href="http://blog.sallarp.com/iphone-ipad-get-user-agent-for-uiwebview/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sallarp.com/iphone-ipad-get-user-agent-for-uiwebview/</link>
	<description>Code, Code, Revolution!</description>
	<lastBuildDate>Sat, 17 Dec 2011 11:50:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
	<item>
		<title>By: Björn Sållarp</title>
		<link>http://blog.sallarp.com/iphone-ipad-get-user-agent-for-uiwebview/comment-page-1/#comment-43495</link>
		<dc:creator>Björn Sållarp</dc:creator>
		<pubDate>Wed, 16 Nov 2011 18:03:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sallarp.com/?p=1003#comment-43495</guid>
		<description>@Trott

In most cases you should definitely set your own user agent. However, sometimes you want to impersonate the real Safari browser user agent and avoid hard-coding the user agent into the app. Though, I have noticed that since writing this blog post the UIWebView will not always return the user agent of Safari. In some iOS versions they have differed slightly.

// Björn</description>
		<content:encoded><![CDATA[<p>@Trott</p>
<p>In most cases you should definitely set your own user agent. However, sometimes you want to impersonate the real Safari browser user agent and avoid hard-coding the user agent into the app. Though, I have noticed that since writing this blog post the UIWebView will not always return the user agent of Safari. In some iOS versions they have differed slightly.</p>
<p>// Björn</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Trott</title>
		<link>http://blog.sallarp.com/iphone-ipad-get-user-agent-for-uiwebview/comment-page-1/#comment-43490</link>
		<dc:creator>Trott</dc:creator>
		<pubDate>Wed, 16 Nov 2011 17:53:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sallarp.com/?p=1003#comment-43490</guid>
		<description>This is great; thanks for sharing it!

I tried this and it hung for me when using URLWithString:@&quot;www.google.com&quot;.  I changed it to a complete URL (URLWithString:@&quot;http://www.example.com/&quot; and all was well.  

@Greg Combs: Your one-liner will work great if you don&#039;t mind getting the user agent after the fact.  Björn&#039;s technique is useful though if you want to retrieve the user agent ahead of time so you can, for example, tack on your own app&#039;s identifier (which, I believe, is valid and correct behavior).</description>
		<content:encoded><![CDATA[<p>This is great; thanks for sharing it!</p>
<p>I tried this and it hung for me when using URLWithString:@&#8221;www.google.com&#8221;.  I changed it to a complete URL (URLWithString:@&#8221;http://www.example.com/&#8221; and all was well.  </p>
<p>@Greg Combs: Your one-liner will work great if you don&#8217;t mind getting the user agent after the fact.  Björn&#8217;s technique is useful though if you want to retrieve the user agent ahead of time so you can, for example, tack on your own app&#8217;s identifier (which, I believe, is valid and correct behavior).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: UIWebView user-agent weirdness and how to change user-agent value programmatically &#124; blog.sallarp.com</title>
		<link>http://blog.sallarp.com/iphone-ipad-get-user-agent-for-uiwebview/comment-page-1/#comment-16184</link>
		<dc:creator>UIWebView user-agent weirdness and how to change user-agent value programmatically &#124; blog.sallarp.com</dc:creator>
		<pubDate>Sun, 05 Dec 2010 20:48:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sallarp.com/?p=1003#comment-16184</guid>
		<description>[...] change between requests the authenticated session will terminate. That&#8217;s why I wrote about how to extract the user-agent string from UIWebView earlier. In &#8220;Mitt Saldo&#8221; i make authentication requests using ASIHttpRequest and for [...]</description>
		<content:encoded><![CDATA[<p>[...] change between requests the authenticated session will terminate. That&#8217;s why I wrote about how to extract the user-agent string from UIWebView earlier. In &#8220;Mitt Saldo&#8221; i make authentication requests using ASIHttpRequest and for [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Combs</title>
		<link>http://blog.sallarp.com/iphone-ipad-get-user-agent-for-uiwebview/comment-page-1/#comment-13690</link>
		<dc:creator>Greg Combs</dc:creator>
		<pubDate>Sat, 25 Sep 2010 18:47:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sallarp.com/?p=1003#comment-13690</guid>
		<description>I should add that I store that string in the delegate once per startup, then I send it to my analytics tracker, (in my case Localytics) as a tagged event ... that way I can update my served web pages back home.</description>
		<content:encoded><![CDATA[<p>I should add that I store that string in the delegate once per startup, then I send it to my analytics tracker, (in my case Localytics) as a tagged event &#8230; that way I can update my served web pages back home.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Combs</title>
		<link>http://blog.sallarp.com/iphone-ipad-get-user-agent-for-uiwebview/comment-page-1/#comment-13689</link>
		<dc:creator>Greg Combs</dc:creator>
		<pubDate>Sat, 25 Sep 2010 18:43:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sallarp.com/?p=1003#comment-13689</guid>
		<description>I just drop this in my webview delegate, in webViewDidFinishLoad:

NSString *userAgent = [self.m_webView.request valueForHTTPHeaderField:@&quot;User-Agent&quot;];</description>
		<content:encoded><![CDATA[<p>I just drop this in my webview delegate, in webViewDidFinishLoad:</p>
<p>NSString *userAgent = [self.m_webView.request valueForHTTPHeaderField:@"User-Agent"];</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: iPhone/iPad &#8211; Wait for asynchronous tasks to complete &#124; blog.sallarp.com</title>
		<link>http://blog.sallarp.com/iphone-ipad-get-user-agent-for-uiwebview/comment-page-1/#comment-12487</link>
		<dc:creator>iPhone/iPad &#8211; Wait for asynchronous tasks to complete &#124; blog.sallarp.com</dc:creator>
		<pubDate>Tue, 27 Jul 2010 09:36:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sallarp.com/?p=1003#comment-12487</guid>
		<description>[...] a rare case but sometimes you need to do this. I used this techinque in my previous post on how to extract the user-agent string from a UIWebView. Check it out for a more complete [...]</description>
		<content:encoded><![CDATA[<p>[...] a rare case but sometimes you need to do this. I used this techinque in my previous post on how to extract the user-agent string from a UIWebView. Check it out for a more complete [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching 2/12 queries in 0.023 seconds using disk
Object Caching 315/319 objects using disk

Served from: blog.sallarp.com @ 2012-02-05 05:26:02 -->
