<?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: To WebKit or not to WebKit within your iPhone app?</title>
	<atom:link href="http://drnicwilliams.com/2008/11/10/to-webkit-or-not-to-webkit-within-your-iphone-app/feed/" rel="self" type="application/rss+xml" />
	<link>http://drnicwilliams.com/2008/11/10/to-webkit-or-not-to-webkit-within-your-iphone-app/</link>
	<description>Ruby makes Rails, Javascript makes Ajax, Dr Nic makes Magic</description>
	<lastBuildDate>Wed, 17 Mar 2010 04:35:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: The Growth of iPhone Development &#171; Susan&#39;s Technology Blog</title>
		<link>http://drnicwilliams.com/2008/11/10/to-webkit-or-not-to-webkit-within-your-iphone-app/comment-page-1/#comment-190505</link>
		<dc:creator>The Growth of iPhone Development &#171; Susan&#39;s Technology Blog</dc:creator>
		<pubDate>Mon, 09 Nov 2009 03:06:31 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/?p=330#comment-190505</guid>
		<description>[...] http://drnicwilliams.com/2008/11/10/to-webkit-or-not-to-webkit-within-your-iphone-app/ [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://drnicwilliams.com/2008/11/10/to-webkit-or-not-to-webkit-within-your-iphone-app/" rel="nofollow">http://drnicwilliams.com/2008/11/10/to-webkit-or-not-to-webkit-within-your-iphone-app/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Optimizing the Web for the iPhone &#171; Adventures in Internet Technology</title>
		<link>http://drnicwilliams.com/2008/11/10/to-webkit-or-not-to-webkit-within-your-iphone-app/comment-page-1/#comment-190343</link>
		<dc:creator>Optimizing the Web for the iPhone &#171; Adventures in Internet Technology</dc:creator>
		<pubDate>Thu, 05 Nov 2009 19:29:04 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/?p=330#comment-190343</guid>
		<description>[...] course, there are lots of other things to consider, like whether or not to use WebKit. For information on the iUI, I came across this fantastic resource.  Finally, for information on [...]</description>
		<content:encoded><![CDATA[<p>[...] course, there are lots of other things to consider, like whether or not to use WebKit. For information on the iUI, I came across this fantastic resource.  Finally, for information on [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sasquatch Planet &#187; Blog Archive &#187; iFound &#8211; Tips for iPhone development</title>
		<link>http://drnicwilliams.com/2008/11/10/to-webkit-or-not-to-webkit-within-your-iphone-app/comment-page-1/#comment-190300</link>
		<dc:creator>Sasquatch Planet &#187; Blog Archive &#187; iFound &#8211; Tips for iPhone development</dc:creator>
		<pubDate>Thu, 05 Nov 2009 03:54:33 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/?p=330#comment-190300</guid>
		<description>[...] Webkit, the brower layout engine for Safari, is explored in this post, although it is directed at a more intermediate level of developers or, more specifically, [...]</description>
		<content:encoded><![CDATA[<p>[...] Webkit, the brower layout engine for Safari, is explored in this post, although it is directed at a more intermediate level of developers or, more specifically, [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gene tsai</title>
		<link>http://drnicwilliams.com/2008/11/10/to-webkit-or-not-to-webkit-within-your-iphone-app/comment-page-1/#comment-188354</link>
		<dc:creator>gene tsai</dc:creator>
		<pubDate>Wed, 30 Sep 2009 08:31:35 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/?p=330#comment-188354</guid>
		<description>one note about stringByEvaluatingJavascriptString bring asynchronous. this is NOT true, if you do it correctly.

somewhere in the comments, there is a guy calling a function via stringbyevaluatingjavascript string, then having the js in the page call a url scheme myscheme://{... json data ...} to return the data. 

I initially had the same problem, but I discovered that this works :

NSString *js =@{(function(){\
    var obj = doComplicatedThing();
    return JSON.encode(obj);
})();};
NSString * output = [webView stringByEvaluatingJavascriptString:js];

and output DOES contain the json return value!!

the trick here is that you need to wrap the js function in a closure 
&quot;(function(){return something})();&quot;</description>
		<content:encoded><![CDATA[<p>one note about stringByEvaluatingJavascriptString bring asynchronous. this is NOT true, if you do it correctly.</p>
<p>somewhere in the comments, there is a guy calling a function via stringbyevaluatingjavascript string, then having the js in the page call a url scheme myscheme://{&#8230; json data &#8230;} to return the data. </p>
<p>I initially had the same problem, but I discovered that this works :</p>
<p>NSString *js =@{(function(){\<br />
    var obj = doComplicatedThing();<br />
    return JSON.encode(obj);<br />
})();};<br />
NSString * output = [webView stringByEvaluatingJavascriptString:js];</p>
<p>and output DOES contain the json return value!!</p>
<p>the trick here is that you need to wrap the js function in a closure<br />
&#8220;(function(){return something})();&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tagz &#124; &#34;Dr Nic » To WebKit or not to WebKit within your iPhone app?&#34; &#124; Comments</title>
		<link>http://drnicwilliams.com/2008/11/10/to-webkit-or-not-to-webkit-within-your-iphone-app/comment-page-1/#comment-171820</link>
		<dc:creator>Tagz &#124; &#34;Dr Nic » To WebKit or not to WebKit within your iPhone app?&#34; &#124; Comments</dc:creator>
		<pubDate>Sat, 16 May 2009 17:10:44 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/?p=330#comment-171820</guid>
		<description>[...]               [upmod] [downmod]     Dr Nic » To WebKit or not to WebKit within your iPhone app?  (drnicwilliams.com)    1 points posted 6 months ago by jeethu  tags webkit development iphone [...]</description>
		<content:encoded><![CDATA[<p>[...]               [upmod] [downmod]     Dr Nic » To WebKit or not to WebKit within your iPhone app?  (drnicwilliams.com)    1 points posted 6 months ago by jeethu  tags webkit development iphone [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Recent Faves Tagged With "uikit" : MyNetFaves</title>
		<link>http://drnicwilliams.com/2008/11/10/to-webkit-or-not-to-webkit-within-your-iphone-app/comment-page-1/#comment-169326</link>
		<dc:creator>Recent Faves Tagged With "uikit" : MyNetFaves</dc:creator>
		<pubDate>Sun, 26 Apr 2009 18:35:41 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/?p=330#comment-169326</guid>
		<description>[...] 5 days ago      iPhone Development - First Impressions First saved by jeeves2001 &#124; 5 days ago      To WebKit or not to WebKit within your iPhone app? First saved by lazzyjeff &#124; 9 days ago      Clutter 0.7.0 Developers Release First saved by mycita &#124; [...]</description>
		<content:encoded><![CDATA[<p>[...] 5 days ago      iPhone Development &#8211; First Impressions First saved by jeeves2001 | 5 days ago      To WebKit or not to WebKit within your iPhone app? First saved by lazzyjeff | 9 days ago      Clutter 0.7.0 Developers Release First saved by mycita | [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JavaScript iPhone Apps &#124; Bookmarks</title>
		<link>http://drnicwilliams.com/2008/11/10/to-webkit-or-not-to-webkit-within-your-iphone-app/comment-page-1/#comment-168552</link>
		<dc:creator>JavaScript iPhone Apps &#124; Bookmarks</dc:creator>
		<pubDate>Mon, 20 Apr 2009 20:10:44 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/?p=330#comment-168552</guid>
		<description>[...] other day &#8220;Dr Nic&#8221; wrote up an article on how he had used a WebKit instance (along with HTML, CSS, and JavaScript) to render a portion of his iPhone [...]</description>
		<content:encoded><![CDATA[<p>[...] other day &#8220;Dr Nic&#8221; wrote up an article on how he had used a WebKit instance (along with HTML, CSS, and JavaScript) to render a portion of his iPhone [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amar Jadhav</title>
		<link>http://drnicwilliams.com/2008/11/10/to-webkit-or-not-to-webkit-within-your-iphone-app/comment-page-1/#comment-158718</link>
		<dc:creator>Amar Jadhav</dc:creator>
		<pubDate>Wed, 25 Feb 2009 05:40:49 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/?p=330#comment-158718</guid>
		<description>i am trying to implement shouldStartLoadWithRequest.
But i am not able to generate click event in iphone simulator. is there any specific way to generate this event in the simulator.
Please help.</description>
		<content:encoded><![CDATA[<p>i am trying to implement shouldStartLoadWithRequest.<br />
But i am not able to generate click event in iphone simulator. is there any specific way to generate this event in the simulator.<br />
Please help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dr Nic</title>
		<link>http://drnicwilliams.com/2008/11/10/to-webkit-or-not-to-webkit-within-your-iphone-app/comment-page-1/#comment-157111</link>
		<dc:creator>Dr Nic</dc:creator>
		<pubDate>Sun, 15 Feb 2009 22:39:00 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/?p=330#comment-157111</guid>
		<description>@andy - polling is probably it afaik</description>
		<content:encoded><![CDATA[<p>@andy &#8211; polling is probably it afaik</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy</title>
		<link>http://drnicwilliams.com/2008/11/10/to-webkit-or-not-to-webkit-within-your-iphone-app/comment-page-1/#comment-157083</link>
		<dc:creator>Andy</dc:creator>
		<pubDate>Sun, 15 Feb 2009 17:56:02 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/?p=330#comment-157083</guid>
		<description>I see, thank you!

I&#039;ve made progress on my project, but I&#039;m running into the non-blocking
aspect of the JS I&#039;m calling. Any tips on doing polling within ObjC, so I can
ask the uiwebview when its done, since apple doesnt offer the two way
bridge in cocoa touch?  The webViewDidFinishLoad delegate method doesnt
do me any good here, as the JS isnt finished yet when this method runs.
My cocoa-fu is still rather weak, so its probably a novice question.</description>
		<content:encoded><![CDATA[<p>I see, thank you!</p>
<p>I&#8217;ve made progress on my project, but I&#8217;m running into the non-blocking<br />
aspect of the JS I&#8217;m calling. Any tips on doing polling within ObjC, so I can<br />
ask the uiwebview when its done, since apple doesnt offer the two way<br />
bridge in cocoa touch?  The webViewDidFinishLoad delegate method doesnt<br />
do me any good here, as the JS isnt finished yet when this method runs.<br />
My cocoa-fu is still rather weak, so its probably a novice question.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
