<?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/"
	>

<channel>
	<title>Julian Rex &#187; iphone</title>
	<atom:link href="http://rexy.co.uk/tag/iphone/feed/" rel="self" type="application/rss+xml" />
	<link>http://rexy.co.uk</link>
	<description>iPhone Game Developer</description>
	<lastBuildDate>Thu, 10 Dec 2009 04:31:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Unit testing on the iPhone and the Simulator</title>
		<link>http://rexy.co.uk/2009/06/unit-testing-on-the-iphone-and-the-simulator/</link>
		<comments>http://rexy.co.uk/2009/06/unit-testing-on-the-iphone-and-the-simulator/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 03:03:51 +0000</pubDate>
		<dc:creator>Julian</dc:creator>
				<category><![CDATA[iphone]]></category>
		<category><![CDATA[iphonedev]]></category>
		<category><![CDATA[simulator]]></category>
		<category><![CDATA[unit testing]]></category>

		<guid isPermaLink="false">http://rexy.co.uk/?p=92</guid>
		<description><![CDATA[A recent post over on Acorn Heroes, &#8220;Unit Testing and linking Static Libraries with XCode&#8221;, has got me thinking: I went through a similar process a few months ago, when I was integrating UnitTest++ into my build environment. I use external makefiles to build static C++ libraries and the associated tests, and although the standard [...]]]></description>
			<content:encoded><![CDATA[<p>A recent post over on Acorn Heroes, <a href="http://acornheroes.com/?p=152">&#8220;Unit Testing and linking Static Libraries with XCode&#8221;</a>, has got me thinking: I went through a similar process a few months ago, when I was integrating <a href="http://gamesfromwithin.com/?p=51">UnitTest++</a> into my build environment. I use external makefiles to build static C++ libraries and the associated tests, and although the standard approach works well for the simulator, I still haven&#8217;t found a decent solution for the running on the iPhone itself (<a href="#iphone">read more below</a>).</p>
<h2><a name="simulator"></a>Unit testing on the iPhone Simulator</h2>
<p><strong></strong>Although this is a solved issue (using the &#8220;<a href="http://code.google.com/p/google-toolbox-for-mac/wiki/iPhoneUnitTesting">google-toolbox-for-mac</a>&#8221; approach), it still runs UI-less, which most of the time is fine. Approaches such as using <a href="http://www.mulle-kybernetik.com/software/OCMock/">OCMock</a> <a href="http://www.codingventures.com/2009/04/xcode-templates-for-iphone-static-libraries-with-unit-testing/">look</a> <a title="Nice article about iPhone testing with OCMock" href="http://iamthewalr.us/blog/2008/11/10/ocmock-and-the-iphone/">great</a>, but at the time I wanted to see if I could get unit testing running on the simulator <em>with the UI. </em></p>
<p>Using a combination of tools like <a href="http://www.fernlightning.com/doku.php?id=software:fseventer:start">fseventer</a> (which observes filesystem changes) and <a href="http://www.clarkwoodsoftware.com/peekaboo/">Peek-a-Boo</a> (which observes processes), I set about documenting the application startup process (on the simulator). From this, I cobbled together a script which I&#8217;d hope would do the trick&#8230; but unfortunately not <img src='http://rexy.co.uk/wordpress/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> . But I think it must be close!</p>
<p>I&#8217;ve put the salient points of the script at <a href="#script">the end of the post</a>, in case someone else has a solution.</p>
<h2><a name="iphone"></a>Unit testing on the iPhone</h2>
<p>Running tests from the command line (built via makefile) on the device is what I&#8217;d really like to find an answer to, but I haven&#8217;t really got very far with this <img src='http://rexy.co.uk/wordpress/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>The strongest candidate at the moment may well be a combination of <a title="CMake - Cross Platform Make" href="http://www.cmake.org">CMake</a> to generate an XCode project file, and then using Applescript to launch the app, <a href="http://stackoverflow.com/questions/995424/xcode-test-automation-for-iphone">as others are discussing here</a>. Unfortunately the command-line tool xcodebuild doesn&#8217;t appear to have an option to launch applications.</p>
<p>Do you know of any alternatives?</p>
<p>For running test sub-projects (not built from the command line) the article <a href="http://developer.apple.com/iphone/library/documentation/Xcode/Conceptual/iphone_development/135-Unit_Testing_Applications/unit_testing_applications.html">Unit Testing Applications</a> on the Apple developer site is definitely worth reading, especially the section &#8220;Setting up Application Testing&#8221;, but again doesn&#8217;t help in my situation.</p>
<hr />
<h2><a name="script"></a>&#8220;Script&#8221; for running unit tests on the iPhone Simulator</h2>
<p>Finally, here are the snippets of the script I talked about earlier. I haven&#8217;t had time to revisit this since the release of OS 3.0, but if anyone else has tried anything similar I&#8217;d be very interested in hearing about it.  As I mentioned above, <strong>this script doesn&#8217;t work</strong>, so is only here for reference!</p>
<pre># Start the simulator, but wait...
"/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app/Contents/MacOS/iPhone Simulator" -SessionOnLaunch NO &amp;

# Get the pid of the simulator, we'll need that in a moment
pid=`ps wwax | egrep -i '[i]Phone Simulator' | awk '{ print $1 }'`</pre>
<p>Now I found I had to set the usual environment variables, as per the standard approach, namely, DYLD_ROOT_PATH, DYLD_FRAMEWORK_PATH, IPHONE_SIMULATOR_ROOT and CFFIXED_USER_HOME.</p>
<pre># Start the simulator bridge
"/Developer/Platforms/iPhoneSimulator./Developer/Applications/iPhone Simulator.app/Contents/MacOS/SimulatorBridge" $pid &amp;

# Had to unset some environment variables for the following commands to work.
unset DYLD_FRAMEWORK_PATH</pre>
<p>The following is where it gets a bit odd. I noticed a sequence of launchd, installd and securityd (which may need to be run as another user, possibly _securityd).</p>
<pre>#launchd - not sure what this is doing perhaps handling the following sequence.

# Run installd with a timeout of 30 seconds
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/usr/libexec/installd -t 30 &amp;

# Run securityd - think this is something to do with entitlements
#/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/usr/libexec/securityd

# Now start SpringBoard
"/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/CoreServices/SpringBoard.app/SpringBoard" \
    -SBDisableAutoDim YES \
    -SBAutoLockTime -1 \
    -SBAutoDimTime -1 \
    -SBDontLockAfterCrash YES \
    -SBDidShowReorderText YES \
    -SBFakeBars YES \
    -SBDontAnimateAppleDown YES \
    -SBEnableDoubleHeightToggling YES &amp;

# Now start the app, which you'll find in some auto-generated folder in
"/Users/.../Library/Application Support/iPhone Simulator/User/Applications/.../test.app/test"</pre>
<p>There&#8217;s not a huge point in chasing a solution to this broken script, as the UI-less testing works so well. But, have you tried anything like this at all? It strikes me that the jail-breaking crowd may know more.</p>
]]></content:encoded>
			<wfw:commentRss>http://rexy.co.uk/2009/06/unit-testing-on-the-iphone-and-the-simulator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone 3GS, Cortex A8 and the PowerVR SGX</title>
		<link>http://rexy.co.uk/2009/06/iphone-3gs-cortex-a8-and-the-powervr-sgx/</link>
		<comments>http://rexy.co.uk/2009/06/iphone-3gs-cortex-a8-and-the-powervr-sgx/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 19:35:45 +0000</pubDate>
		<dc:creator>Julian</dc:creator>
				<category><![CDATA[iphone]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[Cortex A8]]></category>
		<category><![CDATA[NEON]]></category>
		<category><![CDATA[PowerVR]]></category>

		<guid isPermaLink="false">http://rexy.co.uk/?p=88</guid>
		<description><![CDATA[Just a quick note about the new iPhone 3GS. Recently Noel Llopis tweeted about an AnandTech article, which contains more detailed info about the iPhone 3GS and its hardware  (see page 2 for the juicy details).
It&#8217;s not clear if the information comes from a tear-down, but it matches a lot of other information out [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick note about the new iPhone 3GS. Recently <a href="http://www.snappytouch.com/">Noel Llopis</a> <a href="http://twitter.com/snappytouch/statuses/2105936384">tweeted</a> about an <a href="http://www.anandtech.com/gadgets/showdoc.aspx?i=3579&#038;p=1">AnandTech article</a>, which contains more detailed info about the iPhone 3GS and its hardware  (see page 2 for the juicy details).</p>
<p>It&#8217;s not clear if the information comes from a tear-down, but it matches a lot of other information out there in the wild. So while this hasn&#8217;t been confirmed, I&#8217;m happy to assume that the info is good. </p>
<p>The Cortex A8 is an ARMv7 chip, where the chip in the existing iPhones is an ARMv6. The PowerVR MBX, gets replaced by a PowerVR SGX with programmable shaders. </p>
<p>These specs represent a big leap in performance <a href="http://rexy.co.uk/2008/10/iphone-arm-references/">compared with the previous generations</a>; NEON represents improvements for SIMD operations, in terms of speed and usage, and OpenGLES 2.0 will give improved graphical performance and fidelity: Sony needs to come up with a PSP2 soon, as this new iPhone has some serious oomph.</p>
]]></content:encoded>
			<wfw:commentRss>http://rexy.co.uk/2009/06/iphone-3gs-cortex-a8-and-the-powervr-sgx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Phaze for iPhone and iPod Touch blast off!</title>
		<link>http://rexy.co.uk/2009/06/phaze-for-iphone-and-ipod-touch-blast-off/</link>
		<comments>http://rexy.co.uk/2009/06/phaze-for-iphone-and-ipod-touch-blast-off/#comments</comments>
		<pubDate>Sun, 07 Jun 2009 19:19:36 +0000</pubDate>
		<dc:creator>Julian</dc:creator>
				<category><![CDATA[games]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[ipod touch]]></category>
		<category><![CDATA[phaze]]></category>

		<guid isPermaLink="false">http://rexy.co.uk/?p=79</guid>
		<description><![CDATA[
So, Phaze, the iPhone and iPod Touch game I&#8217;ve been working on with Andy Wilton of Pazzazz Games, has recently been launched!
It&#8217;s a futuristic racer with a number of unlockable tracks and ships, weapons and progression through a number of different worlds and levels.


You can grab it from the App Store right now   [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.astraware.com/iphone/phaze"><img class="aligncenter" src="/images/phaze/phazelogo.png" alt="Phaze logo" width="480" height="100" /></a></p>
<p style="text-align: left;">So, Phaze, the iPhone and iPod Touch game I&#8217;ve been working on with Andy Wilton of <a href="http://www.pazzazzgames.com/">Pazzazz Games</a>, has recently been launched!</p>
<p style="text-align: left;">It&#8217;s a futuristic racer with a number of unlockable tracks and ships, weapons and progression through a number of different worlds and levels.</p>
<p style="text-align: center;"><a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=317439506&amp;mt=8"><img class="aligncenter" title="Whizzing round Tau Ceti" src="/images/phaze/phaze1.png" alt="Phaze screenshot" width="480" height="320" /></a></p>
<p><center><object width="480" height="295"><param name="movie" value="http://www.youtube.com/v/0ndV6Ej51LM&#038;hl=en&#038;fs=1&#038;rel=0&#038;color1=0x3a3a3a&#038;color2=0x999999"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/0ndV6Ej51LM&#038;hl=en&#038;fs=1&#038;rel=0&#038;color1=0x3a3a3a&#038;color2=0x999999" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="295"></embed></object></center></p>
<p>You can grab it from the App Store right now <img src='http://rexy.co.uk/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Or <a href="http://www.astraware.com/iphone/phaze">read more about it</a> at the Astraware website.</p>
<p style="text-align: center;"><a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=317439506&amp;mt=8"></a></p>
<p><a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=317439506&amp;mt=8"></a></p>
<p style="text-align: center;"><a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=317439506&amp;mt=8"><img class="aligncenter" title="Link to Phaze on the App Store" src="/images/phaze/appstore-button.gif" alt="Link to Phaze on the App Store" width="158" height="52" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://rexy.co.uk/2009/06/phaze-for-iphone-and-ipod-touch-blast-off/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Now available in the US!</title>
		<link>http://rexy.co.uk/2009/03/now-available-in-us/</link>
		<comments>http://rexy.co.uk/2009/03/now-available-in-us/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 18:57:58 +0000</pubDate>
		<dc:creator>Julian</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[moving]]></category>
		<category><![CDATA[relocation]]></category>

		<guid isPermaLink="false">http://rexy.co.uk/?p=65</guid>
		<description><![CDATA[I&#8217;ve recently moved to the US. If you&#8217;re looking for an iPhone, console and C++ developer in the North Shore/Boston, MA area drop me a line.
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently moved to the US. If you&#8217;re looking for an iPhone, console and C++ developer in the North Shore/Boston, MA area <a href="/contact">drop me a line</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://rexy.co.uk/2009/03/now-available-in-us/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A twist of iLime</title>
		<link>http://rexy.co.uk/2009/01/a-twist-of-ilime/</link>
		<comments>http://rexy.co.uk/2009/01/a-twist-of-ilime/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 17:41:55 +0000</pubDate>
		<dc:creator>Julian</dc:creator>
				<category><![CDATA[iphone]]></category>
		<category><![CDATA[ad hoc]]></category>
		<category><![CDATA[iLime]]></category>

		<guid isPermaLink="false">http://rexy.co.uk/wordpress/?p=19</guid>
		<description><![CDATA[
For the last few days, I&#8217;ve been working on iLime, a &#8220;virtual cocktail&#8221;, for the guys over at Lime. It runs on the iPhone and iPod Touch, and is currently available by &#8220;Ad Hoc&#8221; distribution. We hope to have it available on the iTunes store soon!
Enjoy!
]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter" src="/images/iLimeScreenshot.png" alt="iLime screenshot" width="320" height="480" /></p>
<p>For the last few days, I&#8217;ve been working on iLime, a &#8220;virtual cocktail&#8221;, for the guys over at <a href="http://www.atwistoflime.co.uk">Lime</a>. It runs on the iPhone and iPod Touch, and is currently available by &#8220;Ad Hoc&#8221; distribution. We hope to have it available on the iTunes store soon!</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://rexy.co.uk/2009/01/a-twist-of-ilime/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone ARM references</title>
		<link>http://rexy.co.uk/2008/10/iphone-arm-references/</link>
		<comments>http://rexy.co.uk/2008/10/iphone-arm-references/#comments</comments>
		<pubDate>Tue, 28 Oct 2008 14:44:11 +0000</pubDate>
		<dc:creator>Julian</dc:creator>
				<category><![CDATA[iphone]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[vfp]]></category>

		<guid isPermaLink="false">http://rexy.co.uk/wordpress/?p=8</guid>
		<description><![CDATA[June 2009: The recently announced iPhone 3GS has a different set of hardware, and the original post does not apply to this new device. The chip is suspected to be the ARM Cortex-A8, based on ARMv7 (compare with ARMv6 below). Looking at the specs it appears to have a NEON unit, which should be good [...]]]></description>
			<content:encoded><![CDATA[<p class="updated">June 2009: The recently announced iPhone 3GS has a different set of hardware, and the original post does not apply to this new device. The chip is suspected to be the ARM Cortex-A8, based on ARMv7 (compare with ARMv6 below). <a href="http://www.arm.com/products/CPUs/ARM_Cortex-A8.html">Looking at the specs</a> it appears to have a NEON unit, which should be good news for games developers.</p>
<p>Well over a year ago Engadget <a href="http://www.engadget.com/2007/07/01/iphone-processor-found-620mhz-arm/">posted a description</a> of the (suspected) processor in the iPhone  - <a href="http://www.arm.com/products/CPUs/ARM1176.html">ARM1176JZF</a> (ARM11 family, implementing the ARMv6 instruction set). It has a VFP11 vector coprocessor for SIMD operations. It <a href="http://www.arm.com/products/CPUs/architecture.html">does not support NEON</a> as some have suggested.</p>
<p style="text-align: center;">
<a href="http://www.arm.com/products/CPUs/ARM1176.html"><img class="aligncenter" src="/images/4038.jpg" alt="" width="200" height="239" /></a>
</p>
<p>In my attempt to figure out how to access the SIMD operations for matrix and vector math, I&#8217;ve found these reference PDFs that might be of use to others:</p>
<ul>
<li>The <a href="http://www.arm.com/miscPDFs/14128.pdf">ARM Architecture Reference Manual</a></li>
<li>The <a href="http://infocenter.arm.com/help/topic/com.arm.doc.ddi0301g/DDI0301G_arm1176jzfs_r0p7_trm.pdf">ARM1176JZF-S Technical Reference Manual</a></li>
<li>The <a href="http://infocenter.arm.com/help/topic/com.arm.doc.qrc0007d/QRC0007_VFP.pdf">Vector Floating Point Instruction Set Quick Reference Card</a></li>
</ul>
<p>There&#8217;s also a (pay-for) article on the IEEE Xplore website, called <a href="http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?arnumber=1291935">&#8220;Accelerating floating-point 3D graphics for vector microprocessors&#8221;</a>, which talks specifically about ARM VFP processors.</p>
<p>It may also be worth keeping an eye on <a href="http://code.google.com/p/vfpmathlibrary/">this math library</a>, which forms part of the <a href="http://oolongengine.com/">Oolong Engine</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://rexy.co.uk/2008/10/iphone-arm-references/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
