<?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>LB Technology Services Blog &#187; iphone</title>
	<atom:link href="http://www.lbtechservices.com/blog/category/iphone/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lbtechservices.com/blog</link>
	<description></description>
	<lastBuildDate>Fri, 04 Dec 2009 20:26:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>iPhone 3GS</title>
		<link>http://www.lbtechservices.com/blog/2009/09/08/iphone-3gs-2/</link>
		<comments>http://www.lbtechservices.com/blog/2009/09/08/iphone-3gs-2/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 13:00:28 +0000</pubDate>
		<dc:creator>lorenb</dc:creator>
				<category><![CDATA[business]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://www.lbtechservices.com/blog/?p=922</guid>
		<description><![CDATA[Finally got a iPhone 3GS. They have been sold out in Canada and some what hard to get up here. Got a friend to pick me one up in Hong Kong. As a bonus the phone is unlocked (it&#8217;s against the law in Hong Kong to sell carrier locked phones) so I can use it [...]]]></description>
			<content:encoded><![CDATA[<p>Finally got a <a href="http://www.apple.com/iphone/iphone-3gs/">iPhone 3GS</a>. They have been sold out in Canada and some what hard to get up here. Got a <a href="http://www.canadianwineguy.com/">friend</a> to pick me one up in <a href="https://www.cia.gov/library/publications/the-world-factbook/geos/hk.html">Hong Kong</a>. As a bonus the phone is unlocked (it&#8217;s against the law in Hong Kong to sell carrier locked phones) so I can use it on any GSM carrier.</p>
<p>I defintely noticed the speed increase on the 3GS compared to my old 3G. New camera is nicer. Haven&#8217;t tried the video out yet or the compass. </p>
<p>It&#8217;s a decent upgrade for sure. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.lbtechservices.com/blog/2009/09/08/iphone-3gs-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Snow Leopard Install</title>
		<link>http://www.lbtechservices.com/blog/2009/08/28/snow-leopard-install/</link>
		<comments>http://www.lbtechservices.com/blog/2009/08/28/snow-leopard-install/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 20:08:51 +0000</pubDate>
		<dc:creator>lorenb</dc:creator>
				<category><![CDATA[iphone]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.lbtechservices.com/blog/?p=911</guid>
		<description><![CDATA[Got my copy of Snow Leopard today. I&#8217;m in the process of installing it now on my Macbook. The install was straightforward as you can see from the screenshots below. I don&#8217;t expect any issues. 
Note there is an iPhone SDK available for Snow Leopard now (400MB download) at the iPhone Dev Center
]]></description>
			<content:encoded><![CDATA[<p>Got my copy of <a href="http://www.apple.com/macosx/">Snow Leopard</a> today. I&#8217;m in the process of installing it now on my Macbook. The install was straightforward as you can see from the screenshots below. I don&#8217;t expect any issues. </p>
<p>Note there is an iPhone SDK available for Snow Leopard now (400MB download) at the <a href="http://developer.apple.com/iphone/index.action">iPhone Dev Center</a></p>

<a href='http://www.lbtechservices.com/blog/2009/08/28/snow-leopard-install/osx-01/' title='osx-01'><img width="150" height="150" src="http://www.lbtechservices.com/blog/wp-content/uploads/2009/08/osx-01-150x150.png" class="attachment-thumbnail" alt="" title="osx-01" /></a>
<a href='http://www.lbtechservices.com/blog/2009/08/28/snow-leopard-install/osx-02/' title='osx-02'><img width="150" height="150" src="http://www.lbtechservices.com/blog/wp-content/uploads/2009/08/osx-02-150x150.png" class="attachment-thumbnail" alt="" title="osx-02" /></a>
<a href='http://www.lbtechservices.com/blog/2009/08/28/snow-leopard-install/osx-03/' title='osx-03'><img width="150" height="150" src="http://www.lbtechservices.com/blog/wp-content/uploads/2009/08/osx-03-150x150.png" class="attachment-thumbnail" alt="" title="osx-03" /></a>
<a href='http://www.lbtechservices.com/blog/2009/08/28/snow-leopard-install/osx-04/' title='osx-04'><img width="150" height="150" src="http://www.lbtechservices.com/blog/wp-content/uploads/2009/08/osx-04-150x150.png" class="attachment-thumbnail" alt="" title="osx-04" /></a>
<a href='http://www.lbtechservices.com/blog/2009/08/28/snow-leopard-install/osx-05/' title='osx-05'><img width="150" height="136" src="http://www.lbtechservices.com/blog/wp-content/uploads/2009/08/osx-05-150x136.png" class="attachment-thumbnail" alt="" title="osx-05" /></a>
<a href='http://www.lbtechservices.com/blog/2009/08/28/snow-leopard-install/osx-06/' title='osx-06'><img width="150" height="150" src="http://www.lbtechservices.com/blog/wp-content/uploads/2009/08/osx-06-150x150.png" class="attachment-thumbnail" alt="" title="osx-06" /></a>
<a href='http://www.lbtechservices.com/blog/2009/08/28/snow-leopard-install/osx-07/' title='osx-07'><img width="150" height="150" src="http://www.lbtechservices.com/blog/wp-content/uploads/2009/08/osx-07-150x150.png" class="attachment-thumbnail" alt="" title="osx-07" /></a>

]]></content:encoded>
			<wfw:commentRss>http://www.lbtechservices.com/blog/2009/08/28/snow-leopard-install/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MMATracker 2.4</title>
		<link>http://www.lbtechservices.com/blog/2009/08/13/mmatracker-2-4/</link>
		<comments>http://www.lbtechservices.com/blog/2009/08/13/mmatracker-2-4/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 17:33:24 +0000</pubDate>
		<dc:creator>lorenb</dc:creator>
				<category><![CDATA[business]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://www.lbtechservices.com/blog/?p=892</guid>
		<description><![CDATA[MMATracker v2.4 has been submitted to Apple. Changes in this release:

Fixed problems with MMAJunkie news feed
Show title/description for news articles
Replace WAMMA with Strikeforce in Champions view
Remove deprecated APIs

Note that MMATracker now requires OS 3.x so if you are still using 2.x now would be a good time to upgrade.
Screenshot of news view in portrait:

In landscape:

]]></description>
			<content:encoded><![CDATA[<p><a href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=290587059&#038;mt=8">MMATracker</a> v2.4 has been submitted to <a href="http://www.apple.com/">Apple</a>. Changes in this release:</p>
<ul>
<li>Fixed <a href="http://www.lbtechservices.com/blog/2009/08/13/ascii-vs-utf8/">problems with MMAJunkie news feed</a></li>
<li>Show title/description for news articles</li>
<li>Replace WAMMA with Strikeforce in Champions view</li>
<li>Remove deprecated APIs</li>
</ul>
<p>Note that MMATracker now requires OS 3.x so if you are still using 2.x now would be a good time to upgrade.</p>
<p>Screenshot of news view in portrait:</p>
<p><img src="http://www.lbtechservices.com/blog/wp-content/uploads/2009/08/mmatracker-2.4.jpg" alt="mmatracker-2.4" title="mmatracker-2.4" width="330" height="488" class="aligncenter size-full wp-image-893" /></p>
<p>In landscape:</p>
<p><img src="http://www.lbtechservices.com/blog/wp-content/uploads/2009/08/mma-tracker-2.4-land.jpg" alt="Landscape view" title="Landscape view" width="487" height="323" class="aligncenter size-full wp-image-900" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.lbtechservices.com/blog/2009/08/13/mmatracker-2-4/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ASCII vs UTF8</title>
		<link>http://www.lbtechservices.com/blog/2009/08/13/ascii-vs-utf8/</link>
		<comments>http://www.lbtechservices.com/blog/2009/08/13/ascii-vs-utf8/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 17:21:06 +0000</pubDate>
		<dc:creator>lorenb</dc:creator>
				<category><![CDATA[business]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://www.lbtechservices.com/blog/?p=889</guid>
		<description><![CDATA[We got some email from MMATracker users saying that the MMAJunkie RSS feed wasn&#8217;t working in the application any more.
The code that I was using:
NSURL *xmlURL = [NSURL URLWithString:URL];
NSError *err = nil;
NSString *xmlFeed = [[NSString alloc] initWithContentsOfURL:xmlURL encoding:NSUTF8StringEncoding error:&#38;err];
if (err) {
	// handle error
}

After some trial/error, I determined the problem was the encoding. It was ASCII [...]]]></description>
			<content:encoded><![CDATA[<p>We got some email from <a href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=290587059&#038;mt=8">MMATracker</a> users saying that the <a href="http://mmajunkie.com/">MMAJunkie</a> RSS feed wasn&#8217;t working in the application any more.</p>
<p>The code that I was using:</p>
<pre class="brush: cpp;">NSURL *xmlURL = [NSURL URLWithString:URL];
NSError *err = nil;
NSString *xmlFeed = [[NSString alloc] initWithContentsOfURL:xmlURL encoding:NSUTF8StringEncoding error:&amp;err];
if (err) {
	// handle error
}
</pre>
<p>After some trial/error, I determined the problem was the encoding. It was <a href="http://en.wikipedia.org/wiki/ASCII">ASCII</a> instead of <a href="http://en.wikipedia.org/wiki/UTF-8">UTF8</a>. The feed is coming from <a  href="http://www.feedburner.com/">Feedburner</a> which is owned by <a href="http://www.google.com">Google</a>. Seems odd they would stop using UTF8.</p>
<p>To fix this, I used the following code:</p>
<pre class="brush: cpp;">NSURL *xmlURL = [NSURL URLWithString:URL];

NSError *err = nil;
NSString *agentString = @&quot;MMATracker&quot;;

NSMutableURLRequest *req = [[NSMutableURLRequest alloc] initWithURL:xmlURL];
[req setValue:agentString forHTTPHeaderField:@&quot;User-Agent&quot;];

NSData *data = [NSURLConnection sendSynchronousRequest:req returningResponse:nil error:&amp;err];
NSString *xmlFeed = [[NSString alloc] initWithBytes:[data bytes] length:[data length] encoding:NSUTF8StringEncoding];
if (xmlFeed == nil) {
	xmlFeed = [[NSString alloc] initWithBytes:[data bytes] length:[data length] encoding:NSASCIIStringEncoding];
}

if (err) {
	// handle error
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.lbtechservices.com/blog/2009/08/13/ascii-vs-utf8/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Apple Review Times</title>
		<link>http://www.lbtechservices.com/blog/2009/08/11/apple-review-times/</link>
		<comments>http://www.lbtechservices.com/blog/2009/08/11/apple-review-times/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 15:42:39 +0000</pubDate>
		<dc:creator>lorenb</dc:creator>
				<category><![CDATA[business]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://www.lbtechservices.com/blog/?p=886</guid>
		<description><![CDATA[Still no word from Apple about the latest MMATracker release. Used to only take around 6/7 days to get an approval for app updates, but that seems to be rising.
I&#8217;ve talked to other developers and they have noticed the same thing. Perhaps Apple is having trouble keeping up with demand.
]]></description>
			<content:encoded><![CDATA[<p>Still no word from <a href="http://www.apple.com/">Apple</a> about the latest <a href="http://www.lbtechservices.com/blog/2009/08/03/mmatracker-2-3/">MMATracker</a> release. Used to only take around 6/7 days to get an approval for app updates, but that seems to be rising.</p>
<p>I&#8217;ve talked to other developers and they have noticed the same thing. Perhaps Apple is having trouble keeping up with demand.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lbtechservices.com/blog/2009/08/11/apple-review-times/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Porting from iPhone to Windows Mobile</title>
		<link>http://www.lbtechservices.com/blog/2009/08/05/porting-from-iphone-to-windows-mobile/</link>
		<comments>http://www.lbtechservices.com/blog/2009/08/05/porting-from-iphone-to-windows-mobile/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 14:29:01 +0000</pubDate>
		<dc:creator>lorenb</dc:creator>
				<category><![CDATA[iphone]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.lbtechservices.com/blog/?p=883</guid>
		<description><![CDATA[Saw a Microsoft case study on Porting the Amplitude Application from the iPhone to a Windows Mobile Device. I&#8217;ll have to read that in more detail later on.
]]></description>
			<content:encoded><![CDATA[<p>Saw a <a href="http://www.microsoft.com/">Microsoft</a> case study on <a href="http://msdn.microsoft.com/en-us/library/ee355030.aspx">Porting the Amplitude Application from the iPhone to a Windows Mobile Device</a>. I&#8217;ll have to read that in more detail later on.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lbtechservices.com/blog/2009/08/05/porting-from-iphone-to-windows-mobile/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>High Scores</title>
		<link>http://www.lbtechservices.com/blog/2009/08/05/high-scores/</link>
		<comments>http://www.lbtechservices.com/blog/2009/08/05/high-scores/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 12:52:39 +0000</pubDate>
		<dc:creator>lorenb</dc:creator>
				<category><![CDATA[game development]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://www.lbtechservices.com/blog/?p=877</guid>
		<description><![CDATA[I’ve been thinking about high scores and how that should be implemented in a game. If you are only concerned about local scores that can be done using NSUserDefaults or you could use a sqlite database. Those are fairly easy to implement.
Local scores though are limited in use. They are good if you want track [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve been thinking about high scores and how that should be implemented in a game. If you are only concerned about local scores that can be done using <a href=" http://www.artandstructure.com/softwaredev/hscores.php">NSUserDefaults</a> or you could use a <a href="http://www.sqlite.org/">sqlite</a> database. Those are fairly easy to implement.</p>
<p>Local scores though are limited in use. They are good if you want track your personal best effort in a given game. How many other people use your iPhone/iPod and would play a given game?  Probably not many; maybe none. </p>
<p>Global/Internet based scores are more interesting. I think it encourages people to play games more due to competition with other players. That can help word of mouth sales, if someone likes your game(s) and they get their friends to buy it and see who is the best. </p>
<p>The more people playing your games can create more opportunities to sell in app purchases. You can obtain better metrics of who is playing your games and how they are doing (Is it too easy? Too hard?  etc.),</p>
<p>Long term it’s not hard to see Apple putting something together like <a href="http://www.xbox.com/en-US/live">XBox Live</a> that developers could plug into for these purposes.</p>
<p>Today you are on your own. I did see one open source system called <a href="http://code.google.com/p/igetscores/">iGetScores</a>. The server side is written in PHP with a MySQL backend.  It uses <a href="http://oauth.net/core/1.0a">OAuth</a>. The client code is not small and you’d be adding around 40 files to your project. It seemed to be more complicated that it should be.</p>
<p>I wanted something simple and am looking to writing my own.The basic requirements would be to accept new high scores and to be able to get a list of them for a given game. From a security point of view, accepting data from random users into your database can be an issue. You need to consider people trying to use <a href="http://en.wikipedia.org/wiki/SQL_injection">SQL Injections</a> or denial of service attacks. You have to deal with people who might try to cheat and put in false scores.</p>
<p>I was thinking about having a <a href="http://en.wikipedia.org/wiki/Shared_secret">shared secret</a> where by the iPhone/iPod that wants to submit a score, encrypts the data with a shared secret and sends to server. The server then decrypts the data and inserts into the database after some validation. Depending on encryption used that might cause export issues for some countries.</p>
<p>You could use the UUID of the iPhone/iPod to keep track of submissions from people and use the date/time of the request to see if that person has submitted anything before. If someone tries to post multiple scores within a few minutes and you know your game would take at least X number of minutes to complete, you could throw that out as a fake.</p>
<p>I’m still thinking it through and I don’t have a full design yet. I’m still flushing things out. I’ll have more to say about this later and maybe some code too.</p>
<p>To be continued…</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lbtechservices.com/blog/2009/08/05/high-scores/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More on code sharing</title>
		<link>http://www.lbtechservices.com/blog/2009/08/04/more-on-code-sharing/</link>
		<comments>http://www.lbtechservices.com/blog/2009/08/04/more-on-code-sharing/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 12:16:30 +0000</pubDate>
		<dc:creator>lorenb</dc:creator>
				<category><![CDATA[game development]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://www.lbtechservices.com/blog/?p=863</guid>
		<description><![CDATA[I wrote the other day about Sharing code in iPhone applications which was about using static libraries. I ran into an interesting problem on the weekend where by my code was working on the simulator but not on real hardware.
In my static library I was using kissxml to parse a tile map from Tiled. The [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote the other day about <a href="http://www.lbtechservices.com/blog/2009/07/16/sharing-code-in-iphone-applications/">Sharing code in iPhone applications</a> which was about using static libraries. I ran into an interesting problem on the weekend where by my code was working on the simulator but not on real hardware.</p>
<p>In my static library I was using <a href="http://code.google.com/p/kissxml/">kissxml</a> to parse a tile map from <a href="http://mapeditor.org/">Tiled</a>. The TiledMap code was from the guys at <a href="http://www.71squared.co.uk/">71Squared</a>. </p>
<p>In the simulator things worked as expected. On an iPhone/iPod the program would always crash trying to parse the XML. The program was aborting because NSStringAdditions were not taking effect. The specific error was <b>[NSCFString xmlChar]: unrecognized selector sent to instance</b></p>
<p>If I had all the code in a single program it worked and as I mentiond there were no problems with library + app in the simulator. It was very odd and unfortunately I was unable to determine how to fix this.</p>
<p>As a workaround, I re-wrote the TiledMap class to use NSXMLParser instead of kissxml. It&#8217;s a bit slower than kissxml but at least it works in a static library on the simulator and devices. Only difference from original code is that it doesn&#8217;t support layer properties yet.</p>
<p>The original code from <a href="http://www.71squared.co.uk/">71Squared</a> was released under the <a href="http://www.opensource.org/licenses/mit-license.php">MIT license</a>. Here are my changes under the same license.</p>
<p>Long term, the ideal situation would be for <a href="http://www.apple.com">Apple</a> to add some XML APIs that can handle <a href="http://www.w3.org/TR/xpath">XPath</a> in a future OS release.</p>
<p>TiledMap.h</p>
<pre class="brush: cpp;">- (id)initWithTMXFile:(NSString *)tmxFile;</pre>
<p>TiledMap.m</p>
<pre class="brush: cpp;">- (id)initWithTMXFile:(NSString *)tmxFile {
	if ((self = [super init])) {

		// Shared game state
		sharedDirector = [Director sharedDirector];

	        // Set up the default colour filter
	        colourFilter = Color4fInit;

		// Set up the arrays and default values for layers and tilesets
		tileSets = [[NSMutableArray alloc] init];
		layers = [[NSMutableArray alloc] init];

		// Allocate and init the properties dictionary for the map
		mapProperties = [[NSMutableDictionary alloc] init];

		// Init the current layer, tileset and tile x and y
		currentLayerID = 0;
		currentTileSetID = 0;
		tileX = 0;
		tileY = 0;

		NSURL *url = [NSURL fileURLWithPath: [[NSBundle mainBundle] pathForResource:tmxFile ofType:@&quot;tmx&quot;]];
		NSXMLParser *parser = [[NSXMLParser alloc] initWithContentsOfURL:url];

		[parser setDelegate:self];
		[parser setShouldProcessNamespaces:NO];
		[parser setShouldReportNamespacePrefixes:NO];
		[parser setShouldResolveExternalEntities:NO];
		[parser parse];

		NSError *error = [parser parserError];
		if (error) {
			NSLog(@&quot;Error parsing TMX file: %@&quot;, error);
		}

		[parser release];

		// Calculate the total number of tiles it would take to fill the visible screen.  The values below which define the screen
		// size would need to be changed based on the size of the area you need the tilemap to fill.  I am adding a couple of tiles
		// to the total to cover fractions of a tile which may have resulted in the calculation.  I am then multuplying the result
		// by two as there are two triangles per tile
		int totalTriangles = ((320 / tileWidth) + 2) * ((480 / tileHeight) + 2) * 12 ;
		if(DEBUG) NSLog(@&quot;--&gt; Initializing vertex arrays for '%d' triangles.&quot;, totalTriangles);

		// Set up the vertex arrays
		tileVerts = calloc(totalTriangles, sizeof(TileVert));

		// If one of the arrays cannot be allocated, then report a warning and return nil
		if(!tileVerts) {
			if(DEBUG) NSLog(@&quot;WARNING: Tiled - Not enough memory to allocate vertex arrays&quot;);
			return nil;
		}
	}

	return self;
}

-(void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict {	

	if([elementName isEqualToString:@&quot;map&quot;]) {
		mapWidth = [[attributeDict valueForKey:@&quot;width&quot;] intValue];
		mapHeight = [[attributeDict valueForKey:@&quot;height&quot;] intValue];
		tileWidth = [[attributeDict valueForKey:@&quot;tilewidth&quot;] intValue];
		tileHeight = [[attributeDict valueForKey:@&quot;tileheight&quot;] intValue];

	} else if([elementName isEqualToString:@&quot;tileset&quot;]) {

		tileSetName = [[attributeDict valueForKey:@&quot;name&quot;] retain];
		tileSetFirstGID = [[attributeDict valueForKey:@&quot;firstgid&quot;] intValue];
		tileSetSpacing = [[attributeDict valueForKey:@&quot;spacing&quot;] intValue];
//		tileset-&gt;margin = [[attributeDict valueForKey:@&quot;margin&quot;] intValue];
		tileSetWidth = [[attributeDict valueForKey:@&quot;tilewidth&quot;] intValue];
		tileSetHeight = [[attributeDict valueForKey:@&quot;tileheight&quot;] intValue];

		tileSetProperties = [[NSMutableDictionary alloc] init];

	} else if([elementName isEqualToString:@&quot;layer&quot;]) {

		layerName = [[attributeDict valueForKey:@&quot;name&quot;] retain];
		layerWidth = [[attributeDict valueForKey:@&quot;width&quot;] intValue];
		layerHeight = [[attributeDict valueForKey:@&quot;height&quot;] intValue];

		currentLayer = [[Layer alloc] initWithName:layerName layerID:currentLayerID layerWidth:layerWidth layerHeight:layerHeight];
		if(DEBUG) NSLog(@&quot;--&gt; LAYER found called: %@, width=%d, height=%d&quot;, layerName, layerWidth, layerHeight);

		[layers addObject:currentLayer];
		[currentLayer release];
		currentLayerID++;

	} else if([elementName isEqualToString:@&quot;image&quot;]) {

		NSString *source = [[attributeDict valueForKey:@&quot;source&quot;] retain];

		// Create a tileset instance based on the retrieved information
		currentTileSet = [[TileSet alloc] initWithImageNamed:source
														name:tileSetName
												   tileSetID:currentTileSetID
													firstGID:tileSetFirstGID
												   tileWidth:tileSetWidth
												  tileHeight:tileSetHeight
													 spacing:tileSetSpacing];

		// Add the tileset instance we have just created to the array of tilesets
		[tileSets addObject:currentTileSet];

		// Release the current tileset instance as its been added to the array and we do not need it now
		[currentTileSet release];

		// Increment the current tileset id
		currentTileSetID++;

	} else if([elementName isEqualToString:@&quot;tile&quot;]) {

		if ([attributeDict valueForKey:@&quot;id&quot;] != nil) {
			currentTileID = [[attributeDict valueForKey:@&quot;id&quot;] intValue] + tileSetFirstGID;
		} else {

			Layer *layer = [layers lastObject];
			int globalID = [[attributeDict valueForKey:@&quot;gid&quot;] intValue];

			// If the globalID is 0 then this is an empty tile else populate the tile array with the
			// retrieved tile information
			if(globalID == 0) {
				[layer addTileAtX:tileX y:tileY tileSetID:-1 tileID:0 globalID:0];
			} else {
				TileSet *tileSet = [self findTileSetWithGlobalID:globalID];
				[layer addTileAtX:tileX
								y:tileY
						   tileSetID:[tileSet tileSetID]
							  tileID:globalID - [tileSet firstGID]
							globalID:globalID];
			}

			// Calculate the next coord within the tiledata array
			tileX++;
			if(tileX &gt; layerWidth - 1) {
				tileX = 0;
				tileY++;
			}
		}
	} else if([elementName isEqualToString:@&quot;property&quot;]) {

		NSString *tileIDKey = [NSString stringWithFormat:@&quot;%d&quot;, currentTileID];
		NSMutableDictionary *tileProperties = [[NSMutableDictionary alloc] init];

		NSString *name = [attributeDict valueForKey:@&quot;name&quot;];
		NSString *value = [attributeDict valueForKey:@&quot;value&quot;];
		if(DEBUG) NSLog(@&quot;----&gt; Property '%@' found with value '%@' for global tile id '%@'&quot;, name, value, tileIDKey);

		[tileProperties setObject:value forKey:name];
		[tileSetProperties setObject:tileProperties forKey:tileIDKey];

		// Release the tileProperties now they have been added to tileSetProperties
		[tileProperties release];
	}
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.lbtechservices.com/blog/2009/08/04/more-on-code-sharing/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MonoTouch Preview</title>
		<link>http://www.lbtechservices.com/blog/2009/08/03/monotouch-preview/</link>
		<comments>http://www.lbtechservices.com/blog/2009/08/03/monotouch-preview/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 20:25:53 +0000</pubDate>
		<dc:creator>lorenb</dc:creator>
				<category><![CDATA[iphone]]></category>
		<category><![CDATA[mono]]></category>

		<guid isPermaLink="false">http://www.lbtechservices.com/blog/?p=860</guid>
		<description><![CDATA[MonoTouch is now feature complete and the developers are looking for testers for a closed preview. 
MonoTouch is a static compiler for C# and other static CIL languages that allows developers to use C# for developing iPhone applications while taking advantage of Apple&#8217;s native APIs for developing iPhone applications.
It&#8217;s supposed to released the first week [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mono-project.com/MonoTouch">MonoTouch</a> is now feature complete and the developers are looking for testers for a <a href="http://spreadsheets.google.com/viewform?hl=en&#038;formkey=dHRXeFI5b1NjUWdRRkpiSmxkanh6T1E6MA..">closed preview</a>. </p>
<p>MonoTouch is a static compiler for C# and other static CIL languages that allows developers to use C# for developing iPhone applications while taking advantage of Apple&#8217;s native APIs for developing iPhone applications.</p>
<p>It&#8217;s supposed to released the first week of September. MonoTouch is a commercial product and will be licensed on a per-developer basis. </p>
<p>I&#8217;ll be watching to see what <a href="http://www.novell.com">Novell</a> is charging as I&#8217;m still interested in this project.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lbtechservices.com/blog/2009/08/03/monotouch-preview/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MMATracker 2.3</title>
		<link>http://www.lbtechservices.com/blog/2009/08/03/mmatracker-2-3/</link>
		<comments>http://www.lbtechservices.com/blog/2009/08/03/mmatracker-2-3/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 11:45:47 +0000</pubDate>
		<dc:creator>lorenb</dc:creator>
				<category><![CDATA[business]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://www.lbtechservices.com/blog/?p=852</guid>
		<description><![CDATA[MMATracker v2.3 has been submitted to Apple. New in this release: when showing a fight card, it&#8217;s now broken into sections for the main/under card. You can see a screenshot of that below. 
When clicking on &#8220;More&#8221; information about a figther, the app now slides over and shows that content in a web view. It [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=290587059&#038;mt=8">MMATracker</a> v2.3 has been submitted to <a href="http://www.apple.com/">Apple</a>. New in this release: when showing a fight card, it&#8217;s now broken into sections for the main/under card. You can see a screenshot of that below. </p>
<p>When clicking on &#8220;More&#8221; information about a figther, the app now slides over and shows that content in a web view. It no longer closes the program and launches Safari.</p>
<p>We were planning to update the titles view and drop <a href="http://www.gowamma.com/">WAMMA</a> and insert <a href="http://www.strikeforce.com/index2.html">Strikeforce</a> but it slipped my mind. We&#8217;ll do that in 2.3.1 or whatever the next release ends up being.</p>
<div id="attachment_853" class="wp-caption aligncenter" style="width: 330px"><img src="http://www.lbtechservices.com/blog/wp-content/uploads/2009/08/mma-tracker-2.3.jpg" alt="Showing main/under card breakdown in MMATracker" title="mma-tracker-2.3" width="320" height="480" class="size-full wp-image-853" /><p class="wp-caption-text">MMATracker v2.3</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.lbtechservices.com/blog/2009/08/03/mmatracker-2-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->