<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Shazron&#039;s PhoneGap Blog</title>
	<atom:link href="http://shazronatadobe.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://shazronatadobe.wordpress.com</link>
	<description>at Adobe Systems Inc.</description>
	<lastBuildDate>Wed, 30 Nov 2011 00:49:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='shazronatadobe.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Shazron&#039;s PhoneGap Blog</title>
		<link>http://shazronatadobe.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://shazronatadobe.wordpress.com/osd.xml" title="Shazron&#039;s PhoneGap Blog" />
	<atom:link rel='hub' href='http://shazronatadobe.wordpress.com/?pushpress=hub'/>
		<item>
		<title>iOS PhoneGap &#8211; Splash screen control</title>
		<link>http://shazronatadobe.wordpress.com/2011/09/15/ios-phonegap-splash-screen-control/</link>
		<comments>http://shazronatadobe.wordpress.com/2011/09/15/ios-phonegap-splash-screen-control/#comments</comments>
		<pubDate>Thu, 15 Sep 2011 21:26:22 +0000</pubDate>
		<dc:creator>shazron</dc:creator>
				<category><![CDATA[phonegap]]></category>

		<guid isPermaLink="false">http://shazronatadobe.wordpress.com/?p=361</guid>
		<description><![CDATA[Unfortunately a splash screen is still needed to hide the white flash that is visible just before the UIWebView loads its content. Previously before PhoneGap 1.0, you had no control over this &#8211; sometimes your content just takes an extra time to load and you want to control the duration of the splash screen. There [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazronatadobe.wordpress.com&amp;blog=24879806&amp;post=361&amp;subd=shazronatadobe&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" style="border-color:initial;border-style:initial;border-width:0;" title="splash" src="http://shazronatadobe.files.wordpress.com/2011/09/splash.jpg?w=128&#038;h=128" alt="" width="128" height="128" />Unfortunately a splash screen is still needed to hide the white flash that is visible just before the UIWebView loads its content. Previously before PhoneGap 1.0, you had no control over this &#8211; sometimes your content just takes an extra time to load and you want to control the duration of the splash screen.</p>
<p>There are two steps to enable this, firstly &#8211; in PhoneGap.plist, change the value for &#8220;<strong>AutoHideSplashScreen</strong>&#8221; to false (by default it is true for legacy code). This will not hide the splash screen, and it will remain on screen indefinitely.</p>
<p>Next, in your code, you will have to explicitly hide the splash screen.</p>
<p>After the deviceready event has been fired, you can call this function anytime you are ready:</p>
<p><pre class="brush: jscript;">

navigator.splashscreen.hide();

</pre></p>
<p>If you want to just delay hiding the splash screen for 2 seconds for example, you can do this in your deviceready event handler:</p>
<p><pre class="brush: jscript;">

setTimeout(function() {
    navigator.splashscreen.hide();
}, 2000);
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shazronatadobe.wordpress.com/361/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shazronatadobe.wordpress.com/361/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shazronatadobe.wordpress.com/361/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shazronatadobe.wordpress.com/361/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shazronatadobe.wordpress.com/361/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shazronatadobe.wordpress.com/361/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shazronatadobe.wordpress.com/361/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shazronatadobe.wordpress.com/361/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shazronatadobe.wordpress.com/361/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shazronatadobe.wordpress.com/361/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shazronatadobe.wordpress.com/361/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shazronatadobe.wordpress.com/361/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shazronatadobe.wordpress.com/361/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shazronatadobe.wordpress.com/361/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazronatadobe.wordpress.com&amp;blog=24879806&amp;post=361&amp;subd=shazronatadobe&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shazronatadobe.wordpress.com/2011/09/15/ios-phonegap-splash-screen-control/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ec919aaff6f3bee375911e2f75121b72?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shazronatadobe</media:title>
		</media:content>

		<media:content url="http://shazronatadobe.files.wordpress.com/2011/09/splash.jpg" medium="image">
			<media:title type="html">splash</media:title>
		</media:content>
	</item>
		<item>
		<title>PhoneGap Xcode 4 Template (beta)</title>
		<link>http://shazronatadobe.wordpress.com/2011/05/05/phonegap-xcode-4-template/</link>
		<comments>http://shazronatadobe.wordpress.com/2011/05/05/phonegap-xcode-4-template/#comments</comments>
		<pubDate>Thu, 05 May 2011 23:57:23 +0000</pubDate>
		<dc:creator>shazron</dc:creator>
				<category><![CDATA[phonegap]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://blogs.nitobi.com/shazron/?p=256</guid>
		<description><![CDATA[UPDATE: PhoneGap 0.9.5.1 includes the Xcode 4 template now, download it from phonegap.com View the screencast below (best in full-screen, in HD). Also, you can read the wiki article. Xcode 4 template specs are undocumented and buggy. So, there are issues: We cannot automatically include the &#8220;www&#8221; folder in the template &#8211; the user has [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazronatadobe.wordpress.com&amp;blog=24879806&amp;post=256&amp;subd=shazronatadobe&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-229" style="border-color:initial;border-style:initial;border-width:0;" title="apple-xcode-icon" src="http://shazronatadobe.files.wordpress.com/2011/03/apple-xcode-icon.png?w=700" alt=""   /><strong>UPDATE: PhoneGap 0.9.5.1 includes the Xcode 4 template now, download it from <a href="http://phonegap.com">phonegap.com</a><br />
</strong>View the <a href="http://www.youtube.com/watch?v=R9zktJUN7AI">screencast</a> below (best in full-screen, in HD).<br />
Also, you can read the <a href="http://wiki.phonegap.com/w/page/39991939/Getting-Started-with-PhoneGap-iOS-using-Xcode-4-(Template-Version)#view=page">wiki article</a>.</p>
<p><strong>Xcode 4 template specs are undocumented and buggy. So, there are issues</strong>:</p>
<ul>
<ul>
<li>We cannot automatically include the &#8220;www&#8221; folder in the template &#8211; the user has to add it in manually (a quick drag and drop). I added in checks and warnings if users try to run the app without adding this in.</li>
<li>Some files, like .h and the -Info.plist file, are included in the &#8216;Copy Bundle Resources&#8217; build phase by the template. No biggie during run-time, but for those with OCD they will want to remove these from the Build Phase (if only to get rid of the warning).</li>
<li>Because Xcode 4 does not expand tildes (~), I cannot add a reference to the PhoneGap.framework in the user&#8217;s home folder, so I added it to a shared location /Users/Shared which has r+w permissions for everyone (the common folder /Library/Frameworks needs admin privileges). It was added here so users without admin privileges can still use PhoneGap.framework, and by extension, the Xcode 4 Template.</li>
</ul>
</ul>
<p><strong>RELEASE NOTES</strong></p>
<ul>
<ul>
<li>beta1 &#8211; Initial release</li>
<li>beta1.1 &#8211; Bug fix for <a href="https://github.com/phonegap/phonegap-iphone/issues/81">issue #81</a> (moved framework from /Users/Shared/Library to /Users/Shared/PhoneGap)</li>
<li>beta1.2 &#8211; Made /Users/Shared/PhoneGap writable to everyone</li>
<li>beta1.3 &#8211; Fixed Template not copying over the &#8216;www&#8217; directory from the framework location (happened only for users that only installed beta1.3 and didn&#8217;t migrate from an earlier beta version). This version was tested on a clean Mac OS X 10.7 Lion DP3 system running Xcode 4.1 DP5, and works great.</li>
<li>beta2 &#8211; (UPCOMING) add AppleScript in the project Run Script build phase to get Xcode to automatically add the &#8216;www&#8217; folder for you</li>
</ul>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shazronatadobe.wordpress.com/256/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shazronatadobe.wordpress.com/256/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shazronatadobe.wordpress.com/256/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shazronatadobe.wordpress.com/256/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shazronatadobe.wordpress.com/256/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shazronatadobe.wordpress.com/256/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shazronatadobe.wordpress.com/256/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shazronatadobe.wordpress.com/256/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shazronatadobe.wordpress.com/256/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shazronatadobe.wordpress.com/256/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shazronatadobe.wordpress.com/256/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shazronatadobe.wordpress.com/256/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shazronatadobe.wordpress.com/256/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shazronatadobe.wordpress.com/256/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazronatadobe.wordpress.com&amp;blog=24879806&amp;post=256&amp;subd=shazronatadobe&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shazronatadobe.wordpress.com/2011/05/05/phonegap-xcode-4-template/feed/</wfw:commentRss>
		<slash:comments>35</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ec919aaff6f3bee375911e2f75121b72?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shazronatadobe</media:title>
		</media:content>

		<media:content url="http://shazronatadobe.files.wordpress.com/2011/03/apple-xcode-icon.png" medium="image">
			<media:title type="html">apple-xcode-icon</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating a PhoneGap project from the command line (for Xcode 4)</title>
		<link>http://shazronatadobe.wordpress.com/2011/03/16/creating-a-phonegap-project-from-the-command-line-for-xcode-4/</link>
		<comments>http://shazronatadobe.wordpress.com/2011/03/16/creating-a-phonegap-project-from-the-command-line-for-xcode-4/#comments</comments>
		<pubDate>Wed, 16 Mar 2011 01:06:37 +0000</pubDate>
		<dc:creator>shazron</dc:creator>
				<category><![CDATA[phonegap]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://blogs.nitobi.com/shazron/?p=225</guid>
		<description><![CDATA[UPDATE: PhoneGap 0.9.5.1 includes the Xcode 4 template now, download it from phonegap.com Currently the PhoneGap installer for iOS does not create an Xcode 4 template. The issue is tracked here. I&#8217;ve created a shell script to create a PhoneGap project from the command line. You will still need PhoneGapLib installed &#8211; download the installer [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazronatadobe.wordpress.com&amp;blog=24879806&amp;post=225&amp;subd=shazronatadobe&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://shazronatadobe.files.wordpress.com/2011/03/apple-xcode-icon.png"><img class="alignleft size-full wp-image-229" style="border-color:initial;border-style:initial;border-width:0;" title="apple-xcode-icon" src="http://shazronatadobe.files.wordpress.com/2011/03/apple-xcode-icon.png?w=700" alt=""   /></a><strong>UPDATE: PhoneGap 0.9.5.1 includes the Xcode 4 template now, download it from <a href="http://phonegap.com">phonegap.com</a></strong></p>
<p>Currently the PhoneGap installer for iOS does not create an Xcode 4 template. The issue is tracked <a href="https://github.com/phonegap/phonegap-iphone/issues/42">here</a>.</p>
<p>I&#8217;ve created a shell script to create a PhoneGap project from the command line. You will still need PhoneGapLib installed &#8211; download the installer from <a href="http://phonegap.com/download">http://phonegap.com</a> and run it first.</p>
<p>Instructions are in the shell script itself (open it up in a text editor). <a href="https://raw.github.com/phonegap/phonegap-iphone/1.0.0/create_project.sh">View the script</a>, then File -&gt; Save As&#8230; to save it.</p>
<p>Cameron Perry has a <a href="http://iamcam.wordpress.com/2011/03/17/phonegap-xcode4/">good post about using PhoneGap with Xcode 4</a> that might solve some problems users might have.</p>
<p><strong>UPDATE:</strong><br />
Nitobi is providing a <a href="https://build.phonegap.com/generate">web service</a> to generate Xcode templates for PhoneGap-based projects.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shazronatadobe.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shazronatadobe.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shazronatadobe.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shazronatadobe.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shazronatadobe.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shazronatadobe.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shazronatadobe.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shazronatadobe.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shazronatadobe.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shazronatadobe.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shazronatadobe.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shazronatadobe.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shazronatadobe.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shazronatadobe.wordpress.com/225/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazronatadobe.wordpress.com&amp;blog=24879806&amp;post=225&amp;subd=shazronatadobe&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shazronatadobe.wordpress.com/2011/03/16/creating-a-phonegap-project-from-the-command-line-for-xcode-4/feed/</wfw:commentRss>
		<slash:comments>61</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ec919aaff6f3bee375911e2f75121b72?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shazronatadobe</media:title>
		</media:content>

		<media:content url="http://shazronatadobe.files.wordpress.com/2011/03/apple-xcode-icon.png" medium="image">
			<media:title type="html">apple-xcode-icon</media:title>
		</media:content>
	</item>
		<item>
		<title>Running your iPhone app in the Simulator without Xcode (with log support)</title>
		<link>http://shazronatadobe.wordpress.com/2011/02/23/running-your-iphone-app-in-the-simulator-without-xcode/</link>
		<comments>http://shazronatadobe.wordpress.com/2011/02/23/running-your-iphone-app-in-the-simulator-without-xcode/#comments</comments>
		<pubDate>Wed, 23 Feb 2011 22:16:41 +0000</pubDate>
		<dc:creator>shazron</dc:creator>
				<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://blogs.nitobi.com/shazron/?p=206</guid>
		<description><![CDATA[I started writing this shell script because Xcode 4 keeps crashing, so I ended up editing my code in TextMate, and had iTerm open so I can build, then deploy the app automatically in iPhone Simulator. The script takes three arguments, the first is the name of the project (here the limitation is that it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazronatadobe.wordpress.com&amp;blog=24879806&amp;post=206&amp;subd=shazronatadobe&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://shazronatadobe.files.wordpress.com/2011/02/no_xcode.png"><img class="alignleft size-full wp-image-214" style="border-color:initial;border-style:initial;border-width:0;" title="no_xcode" src="http://shazronatadobe.files.wordpress.com/2011/02/no_xcode.png?w=700" alt=""   /></a>I started writing this shell script because Xcode 4 keeps crashing, so I ended up editing my code in TextMate, and had iTerm open so I can build, then deploy the app automatically in iPhone Simulator.</p>
<p>The script takes three arguments, the first is the name of the project (here the limitation is that it has to be the name of the .xcodeproj and the .app name), and the second is the configuration (Debug/Release &#8211; defaults to Debug), and the third is an optional argument, the name of the log file that the log will be written to (defaults to stderror.log).</p>
<p>Also, you will need the latest code of <a href="https://github.com/fingertips/ios-sim">ios-sim</a>. I could have added a step to check whether you have it installed and download, build and install it for you, but maybe next time <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Make sure you download the latest source, and not one of the packages.</p>
<p>One you download it and build it, copy the ios-sim binary to somewhere in your path &#8211; /usr/bin is a good location.</p>
<p><a href="https://gist.github.com/1314458">Download</a> the script. It is WTFPL licensed. Run it without arguments to see the help text.</p>
<p>Run <code>chmod 755 sim-run.sh</code> on the script to give it exec privileges.</p>
<p>The script builds your project, launches the project in the iPhone Simulator, activates the iPhone Simulator (brings it to front), logs the output to a file, and also displays the contents of the logfile as it is written to. On each run, it writes to a fresh log file, and the previous log file is backed up.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shazronatadobe.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shazronatadobe.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shazronatadobe.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shazronatadobe.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shazronatadobe.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shazronatadobe.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shazronatadobe.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shazronatadobe.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shazronatadobe.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shazronatadobe.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shazronatadobe.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shazronatadobe.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shazronatadobe.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shazronatadobe.wordpress.com/206/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazronatadobe.wordpress.com&amp;blog=24879806&amp;post=206&amp;subd=shazronatadobe&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shazronatadobe.wordpress.com/2011/02/23/running-your-iphone-app-in-the-simulator-without-xcode/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ec919aaff6f3bee375911e2f75121b72?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shazronatadobe</media:title>
		</media:content>

		<media:content url="http://shazronatadobe.files.wordpress.com/2011/02/no_xcode.png" medium="image">
			<media:title type="html">no_xcode</media:title>
		</media:content>
	</item>
		<item>
		<title>Xcode shell build phase, reporting of errors</title>
		<link>http://shazronatadobe.wordpress.com/2010/12/04/xcode-shell-build-phase-reporting-of-errors/</link>
		<comments>http://shazronatadobe.wordpress.com/2010/12/04/xcode-shell-build-phase-reporting-of-errors/#comments</comments>
		<pubDate>Sat, 04 Dec 2010 02:00:05 +0000</pubDate>
		<dc:creator>shazron</dc:creator>
				<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://blogs.nitobi.com/shazron/?p=194</guid>
		<description><![CDATA[Found this useful information, regarding Xcode error reporting for shell build phases. For example, if we were to include JSLint in PhoneGap iPhone, we could format the errors this way below so code where the errors occur are easily editable: In shell build phases you can write to stderr using the following format: &#60;filename&#62;:&#60;linenumber&#62;: error [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazronatadobe.wordpress.com&amp;blog=24879806&amp;post=194&amp;subd=shazronatadobe&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://shazronatadobe.files.wordpress.com/2010/12/xcode1.png"><img class="alignleft size-full wp-image-199" style="border-color:initial;border-style:initial;border-width:0;" title="xcode" src="http://shazronatadobe.files.wordpress.com/2010/12/xcode1.png?w=700" alt=""   /></a>Found this useful information, regarding Xcode error reporting for shell build phases. For example, if we were to include <a href="http://www.jslint.com/">JSLint</a> in PhoneGap iPhone, we could format the errors this way below so code where the errors occur are easily editable:</p>
<blockquote><p>In shell build phases you can write to stderr using the following format:<br />
<strong>&lt;filename&gt;:&lt;linenumber&gt;: error | warn | note : &lt;message&gt;\n</strong><br />
It&#8217;s the same format gcc uses to show errors. The filename:linenumber part can be omitted. Depending on the mode (error, warn, note), Xcode will show your message with a red or yellow badge.<br />
If you include an absolute file path and a line number (if the error occurred in a file), double clicking the error in the build log lets Xcode open the file and jumps to the line, even if it is not part of the project. Very handy.</p></blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shazronatadobe.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shazronatadobe.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shazronatadobe.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shazronatadobe.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shazronatadobe.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shazronatadobe.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shazronatadobe.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shazronatadobe.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shazronatadobe.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shazronatadobe.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shazronatadobe.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shazronatadobe.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shazronatadobe.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shazronatadobe.wordpress.com/194/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazronatadobe.wordpress.com&amp;blog=24879806&amp;post=194&amp;subd=shazronatadobe&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shazronatadobe.wordpress.com/2010/12/04/xcode-shell-build-phase-reporting-of-errors/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ec919aaff6f3bee375911e2f75121b72?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shazronatadobe</media:title>
		</media:content>

		<media:content url="http://shazronatadobe.files.wordpress.com/2010/12/xcode1.png" medium="image">
			<media:title type="html">xcode</media:title>
		</media:content>
	</item>
		<item>
		<title>iOS Keychain Plugin for PhoneGap</title>
		<link>http://shazronatadobe.wordpress.com/2010/11/06/ios-keychain-plugin-for-phonegap/</link>
		<comments>http://shazronatadobe.wordpress.com/2010/11/06/ios-keychain-plugin-for-phonegap/#comments</comments>
		<pubDate>Sat, 06 Nov 2010 01:56:26 +0000</pubDate>
		<dc:creator>shazron</dc:creator>
				<category><![CDATA[phonegap]]></category>

		<guid isPermaLink="false">http://blogs.nitobi.com/shazron/?p=182</guid>
		<description><![CDATA[So what is the Keychain? It&#8217;s a framework to store data (particularly passwords) securely on Mac OS X and iOS. You really don&#8217;t want to store passwords and other sensitive information in HTML5 local or web storage. This is a PhoneGap plugin for iOS that provides access to the Keychain through Javascript. Based on  Buzz [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazronatadobe.wordpress.com&amp;blog=24879806&amp;post=182&amp;subd=shazronatadobe&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So what is the Keychain? It&#8217;s a framework to store data (particularly passwords) securely on Mac OS X and iOS. You really don&#8217;t want to store passwords and other sensitive information in HTML5 local or web storage. This is a PhoneGap plugin for iOS that provides access to the Keychain through Javascript. Based on  Buzz Andersen&#8217;s work &#8211; namely <a href="https://github.com/ldandersen/scifihifi-iphone/tree/master/security/">SFHFKeychainUtils</a></p>
<p>View the <a href="http://github.com/phonegap/phonegap-plugins/blob/master/iPhone/Keychain/README.md">README</a> and check out the sample app&#8217;s <a href="http://github.com/phonegap/phonegap-plugins/blob/master/iPhone/Keychain/KeychainPlugin-Host/www/index.html">index.html</a> for usage. Play around with the Get, Set, and Remove examples, should be self-explanatory.</p>
<p> </p>
<p><img style="display:block;margin-left:auto;margin-right:auto;" src="http://shazronatadobe.files.wordpress.com/2010/11/keychain1.jpg?w=320&#038;h=480" border="0" alt="keychain.jpg" width="320" height="480" /></p>
<p> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shazronatadobe.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shazronatadobe.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shazronatadobe.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shazronatadobe.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shazronatadobe.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shazronatadobe.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shazronatadobe.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shazronatadobe.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shazronatadobe.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shazronatadobe.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shazronatadobe.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shazronatadobe.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shazronatadobe.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shazronatadobe.wordpress.com/182/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazronatadobe.wordpress.com&amp;blog=24879806&amp;post=182&amp;subd=shazronatadobe&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shazronatadobe.wordpress.com/2010/11/06/ios-keychain-plugin-for-phonegap/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ec919aaff6f3bee375911e2f75121b72?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shazronatadobe</media:title>
		</media:content>

		<media:content url="http://shazronatadobe.files.wordpress.com/2010/11/keychain1.jpg" medium="image">
			<media:title type="html">keychain.jpg</media:title>
		</media:content>
	</item>
		<item>
		<title>PayPal Plugin for PhoneGap iPhone</title>
		<link>http://shazronatadobe.wordpress.com/2010/10/08/paypal-plugin-for-phonegap-iphone/</link>
		<comments>http://shazronatadobe.wordpress.com/2010/10/08/paypal-plugin-for-phonegap-iphone/#comments</comments>
		<pubDate>Fri, 08 Oct 2010 19:01:09 +0000</pubDate>
		<dc:creator>shazron</dc:creator>
				<category><![CDATA[phonegap]]></category>

		<guid isPermaLink="false">http://blogs.nitobi.com/shazron/?p=152</guid>
		<description><![CDATA[First release of the PayPal Plugin for PhoneGap iPhone. Right now it handles static payments only (no dynamic changes to include shipping etc). Thanks to Chris Booth of Signature Digital in the UK for sponsoring development and also allowing it to be released to the PhoneGap community. Nothing much to look at in the first [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazronatadobe.wordpress.com&amp;blog=24879806&amp;post=152&amp;subd=shazronatadobe&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>First release of the PayPal Plugin for PhoneGap iPhone. Right now it handles static payments only (no dynamic changes to include shipping etc). Thanks to Chris Booth of <a href="http://signaturedigital.co.uk/">Signature Digital</a> in the UK for sponsoring development and also allowing it to be released to the PhoneGap community.</p>
<p>Nothing much to look at in the first screenshot, but with CSS styling and using PayPal&#8217;s official web button images it can look better. View the <a href="http://github.com/shazron/phonegap-plugins/blob/master/iPhone/PayPalPlugin/README.md">README</a> and check out the sample app&#8217;s <a href="http://github.com/shazron/phonegap-plugins/blob/master/iPhone/PayPalPlugin/PayPalPlugin-Host/www/index.html">index.html</a> for usage. Triggering the &#8220;Pay&#8221; button will launch the native workflow in the second screenshot.</p>
<p><img style="float:left;" src="http://shazronatadobe.files.wordpress.com/2010/10/newimage1.jpg?w=320&#038;h=480" border="0" alt="NewImage.jpg" width="320" height="480" /></p>
<p><img style="float:left;" src="http://shazronatadobe.files.wordpress.com/2010/10/paypal_pg21.jpg?w=320&#038;h=480" border="0" alt="paypal_phonegap_plugin_2.jpg" width="320" height="480" /></p>
<p> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shazronatadobe.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shazronatadobe.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shazronatadobe.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shazronatadobe.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shazronatadobe.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shazronatadobe.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shazronatadobe.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shazronatadobe.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shazronatadobe.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shazronatadobe.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shazronatadobe.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shazronatadobe.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shazronatadobe.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shazronatadobe.wordpress.com/152/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazronatadobe.wordpress.com&amp;blog=24879806&amp;post=152&amp;subd=shazronatadobe&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shazronatadobe.wordpress.com/2010/10/08/paypal-plugin-for-phonegap-iphone/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ec919aaff6f3bee375911e2f75121b72?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shazronatadobe</media:title>
		</media:content>

		<media:content url="http://shazronatadobe.files.wordpress.com/2010/10/newimage1.jpg" medium="image">
			<media:title type="html">NewImage.jpg</media:title>
		</media:content>

		<media:content url="http://shazronatadobe.files.wordpress.com/2010/10/paypal_pg21.jpg" medium="image">
			<media:title type="html">paypal_phonegap_plugin_2.jpg</media:title>
		</media:content>
	</item>
		<item>
		<title>PhoneGap iAds Plugin</title>
		<link>http://shazronatadobe.wordpress.com/2010/07/12/phonegap-iads-plugin/</link>
		<comments>http://shazronatadobe.wordpress.com/2010/07/12/phonegap-iads-plugin/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 09:25:55 +0000</pubDate>
		<dc:creator>shazron</dc:creator>
				<category><![CDATA[phonegap]]></category>

		<guid isPermaLink="false">http://blogs.nitobi.com/shazron/?p=135</guid>
		<description><![CDATA[Hey its a new plugin for PhoneGap. I call it the &#8220;PhoneGap AdPlugin&#8221;, and even though it only supports iAds currently, there is potential for supporting the other ad networks as a backup to iAds. Make sure you read the RELEASE NOTES in the README for limitations. Get the source and view the README Below are [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazronatadobe.wordpress.com&amp;blog=24879806&amp;post=135&amp;subd=shazronatadobe&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hey its a new plugin for PhoneGap. I call it the &#8220;PhoneGap AdPlugin&#8221;, and even though it only supports iAds currently, there is potential for supporting the other ad networks as a backup to iAds. Make sure you read the RELEASE NOTES in the README for limitations.</p>
<p>Get the <a href="https://github.com/phonegap/phonegap-plugins/tree/master/iPhone/AdPlugin/">source</a> and view the <a href="https://github.com/phonegap/phonegap-plugins/blob/master/iPhone/AdPlugin/README.md">README</a></p>
<p>Below are screenshots from the test app included, called &#8216;iAdHost&#8217;</p>
<p><a href="http://shazronatadobe.files.wordpress.com/2010/07/iadtop1.jpg"><img class="alignleft size-full wp-image-138" style="border:1px solid black;" title="iadtop" src="http://shazronatadobe.files.wordpress.com/2010/07/iadtop1.jpg?w=700" alt=""   /></a><a href="http://shazronatadobe.files.wordpress.com/2010/07/iadbottom1.jpg"><img class="alignleft size-full wp-image-137" style="border:1px solid black;" title="iadbottom" src="http://shazronatadobe.files.wordpress.com/2010/07/iadbottom1.jpg?w=700" alt=""   /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shazronatadobe.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shazronatadobe.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shazronatadobe.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shazronatadobe.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shazronatadobe.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shazronatadobe.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shazronatadobe.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shazronatadobe.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shazronatadobe.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shazronatadobe.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shazronatadobe.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shazronatadobe.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shazronatadobe.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shazronatadobe.wordpress.com/135/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazronatadobe.wordpress.com&amp;blog=24879806&amp;post=135&amp;subd=shazronatadobe&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shazronatadobe.wordpress.com/2010/07/12/phonegap-iads-plugin/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ec919aaff6f3bee375911e2f75121b72?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shazronatadobe</media:title>
		</media:content>

		<media:content url="http://shazronatadobe.files.wordpress.com/2010/07/iadtop1.jpg" medium="image">
			<media:title type="html">iadtop</media:title>
		</media:content>

		<media:content url="http://shazronatadobe.files.wordpress.com/2010/07/iadbottom1.jpg" medium="image">
			<media:title type="html">iadbottom</media:title>
		</media:content>
	</item>
		<item>
		<title>PhoneGap Mobile Spec tests on iPhone</title>
		<link>http://shazronatadobe.wordpress.com/2009/11/24/phonegap-mobile-spec-tests-on-iphone/</link>
		<comments>http://shazronatadobe.wordpress.com/2009/11/24/phonegap-mobile-spec-tests-on-iphone/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 19:01:05 +0000</pubDate>
		<dc:creator>shazron</dc:creator>
				<category><![CDATA[phonegap]]></category>

		<guid isPermaLink="false">http://blogs.nitobi.com/shazron/?p=103</guid>
		<description><![CDATA[Fil who has been working on the Mobile Spec came over and we tested the mobile spec on the current (EDGE) version of iPhone PhoneGap, and the tests look pretty sweet (see video). It was pretty easy, I created a new Phonegap-based Application from the Xcode template, plopped in the contents of the Mobile Spec, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazronatadobe.wordpress.com&amp;blog=24879806&amp;post=103&amp;subd=shazronatadobe&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div style="float:left;margin-right:10px;">
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='420' height='315' src='http://www.youtube.com/embed/Vb1oU41mDS0?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent' frameborder='0'></iframe></span>
</div>
<p>
<a href="http://blogs.nitobi.com/fil/">Fil</a> who has been working on the <a href="http://github.com/filmaj/mobile-spec">Mobile Spec</a> came over and we tested the mobile spec on the current (EDGE) version of iPhone PhoneGap, and the tests look pretty sweet (see video).
</p>
<p>
It was pretty easy, I created a new Phonegap-based Application from the Xcode template, plopped in the contents of the Mobile Spec, and just ran the app in the iPhone Simulator. In this session, we see that iPhone PhoneGap passes 51 out of 64 tests, for a 79% pass rate.
</p>
<div style="clear:both;"></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shazronatadobe.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shazronatadobe.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shazronatadobe.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shazronatadobe.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shazronatadobe.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shazronatadobe.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shazronatadobe.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shazronatadobe.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shazronatadobe.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shazronatadobe.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shazronatadobe.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shazronatadobe.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shazronatadobe.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shazronatadobe.wordpress.com/103/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazronatadobe.wordpress.com&amp;blog=24879806&amp;post=103&amp;subd=shazronatadobe&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shazronatadobe.wordpress.com/2009/11/24/phonegap-mobile-spec-tests-on-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ec919aaff6f3bee375911e2f75121b72?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shazronatadobe</media:title>
		</media:content>
	</item>
		<item>
		<title>Contributing to iPhone PhoneGap &#8211; Part 1</title>
		<link>http://shazronatadobe.wordpress.com/2009/11/23/contributing-to-iphone-phonegap-part-1/</link>
		<comments>http://shazronatadobe.wordpress.com/2009/11/23/contributing-to-iphone-phonegap-part-1/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 17:42:15 +0000</pubDate>
		<dc:creator>shazron</dc:creator>
				<category><![CDATA[phonegap]]></category>

		<guid isPermaLink="false">http://blogs.nitobi.com/shazron/?p=57</guid>
		<description><![CDATA[[update: do not modify the core, instead create a plugin and add it into your app project. See PhoneGap Plugins for examples] There has been a major re-factoring of the iPhone PhoneGap codebase, to better enable users to get a current version of PhoneGap to use in their projects without mucking about in the core [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazronatadobe.wordpress.com&amp;blog=24879806&amp;post=57&amp;subd=shazronatadobe&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>[<strong>update</strong>: do not modify the core, instead create a plugin and add it into your app project. See <a href="http://github.com/phonegap/phonegap-plugins">PhoneGap Plugins</a> for examples]</p>
<p>There has been a major re-factoring of the iPhone PhoneGap codebase, to better enable users to get a current version of PhoneGap to use in their projects without mucking about in the core PhoneGap code.</p>
<p>You can view the code here: <a href="http://github.com/phonegap/phonegap-iphone">http://github.com/phonegap/phonegap-iphone</a></p>
<p>The README has more details, and I will elaborate on it more here, especially on how contributors can add to the code.</p>
<p>PhoneGapLib/javascripts/core This is where you will add/modify your javascript code for PhoneGap core. You can add more javascript files here, but make sure you update the &#8220;PhoneGapLib/Makefile&#8221; file to include the newly added javascript file. For adding the file in the Makefile, the pattern should be obvious.</p>
<p>PhoneGapLib/Classes This is where you will add/modify your Objective-C code for PhoneGap core. You can add more Objective-C files here, but make sure you add it to the PhoneGapLib Xcode project also.</p>
<p>PhoneGapLib/javascripts/phonegap.js This is dynamically generated, and is generated whenever PhoneGapLib is built. You can update this file by running &#8220;make&#8221; in the PhoneGapLib folder, but generally it should be called in your application that includes PhoneGapLib (which the PhoneGap-based Application Xcode template does).</p>
<p>I will walk you through how to add a new command, by adding Application Preferences support. Download the files here.</p>
<p><strong>Preferences.h</strong></p>
<p><pre class="brush: objc;">
 @interface Preferences : PhoneGapCommand {
 }

- (void) boolForKey:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options;
 // other functions here

@end
 </pre></p>
<p>Note that the class inherits from PhoneGapCommand. The class name you use here is important, since you will be referring to it in javascript.</p>
<p>To &#8216;expose&#8217; a function to javascript, it must have the signature from the example &#8216;boolForKey&#8217; method above (first argument is a NSMutableArray, the second argument is a NSMutableDictionary).</p>
<p>Let&#8217;s now look at the javascript command to access the function above.</p>
<p><strong>preferences.js</strong></p>
<p><pre class="brush: objc;">
function PreferencesManager() {
}

var g_Preferences = new PreferencesManager();
PreferencesManager.sharedPreferences = function() {
return g_Preferences;
}

PreferencesManager.prototype.boolForKey = function(key, callback) {
PhoneGap .exec(&quot;Preferences.boolForKey&quot;, key, GetFunctionName(callback));
}
</pre></p>
<p>The important line is the &#8220;PhoneGap.exec&#8221; line. The first argument to PhoneGap.exec is in the form of [className].[methodName] (refer to Preferences.h to see the corresponding function which should be obvious). The next arguments to PhoneGap.exec are two strings, which will be passed into the &#8220;boolForKey&#8221; method in the NSMutableArray which is the first argument. If an object (json object) is passed in as an argument to PhoneGap.exec, that data will be passed into the &#8220;boolForKey&#8221; method in the NSMutableDictionary which is the second argument.</p>
<p><strong>Preferences.m</strong></p>
<p><pre class="brush: objc;">
- (void) boolForKey:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options {
NSUInteger argc = [arguments count];
if (argc &amp;gt; 2) { // no key and/or callback - just return, no point in continuing
return;
}

NSString* key = [arguments objectAtIndex:0];
NSString* callback = [arguments objectAtIndex:1];
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];

BOOL value = [userDefaults boolForKey:key];
NSString* retVal = value ? @&quot;true&quot; : @&quot;false&quot;;
NSString* jsString = [[NSString alloc] initWithFormat:@&quot;%@('%@', %@);&quot;, callback, key, retVal];
[webView stringByEvaluatingJavaScriptFromString:jsString];
[jsString release];
}
</pre></p>
<p>In the command itself, you can parse the arguments and options, and do whatever you need to do for your command. You can optionally write javascript back, using the method above, or the helper:</p>
<p><pre class="brush: objc;"> [super writeJavascript:@&quot;alert('foo')&quot;] </pre></p>
<p>Don&#8217;t forget to add a Settings bundle file to your app as well.</p>
<p>Next: Adding your code to PhoneGapLib.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shazronatadobe.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shazronatadobe.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shazronatadobe.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shazronatadobe.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shazronatadobe.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shazronatadobe.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shazronatadobe.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shazronatadobe.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shazronatadobe.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shazronatadobe.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shazronatadobe.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shazronatadobe.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shazronatadobe.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shazronatadobe.wordpress.com/57/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazronatadobe.wordpress.com&amp;blog=24879806&amp;post=57&amp;subd=shazronatadobe&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shazronatadobe.wordpress.com/2009/11/23/contributing-to-iphone-phonegap-part-1/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ec919aaff6f3bee375911e2f75121b72?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shazronatadobe</media:title>
		</media:content>
	</item>
	</channel>
</rss>
