<?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>Free Time Studios &#187; Development</title>
	<atom:link href="http://www.freetimestudios.com/cat/dev/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.freetimestudios.com</link>
	<description></description>
	<lastBuildDate>Mon, 06 Sep 2010 06:55:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Introducing FTUtils: Open Source Utilities for iPhone Developers</title>
		<link>http://www.freetimestudios.com/2010/01/05/introducing-ftutils-open-source-utilities-for-iphone-developers/</link>
		<comments>http://www.freetimestudios.com/2010/01/05/introducing-ftutils-open-source-utilities-for-iphone-developers/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 19:33:13 +0000</pubDate>
		<dc:creator>Nathan Eror</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Core Animation]]></category>
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.freetimestudios.com/?p=252</guid>
		<description><![CDATA[For my Core Animation presentation at 360idev last year, I created a bunch of sample code to show how simple and powerful Core Animation is. I also promised that I would update the sample code with even more advanced examples. That has not really happened (yet!), and it is time for me to atone. I [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.freetimestudios.com%2F2010%2F01%2F05%2Fintroducing-ftutils-open-source-utilities-for-iphone-developers%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.freetimestudios.com%2F2010%2F01%2F05%2Fintroducing-ftutils-open-source-utilities-for-iphone-developers%2F&amp;source=freetimestudios&amp;style=normal&amp;service=bit.ly" height="61" width="50" />
			</a>
		</div><p>For my <a href="http://www.freetimestudios.com/2009/10/02/core-animation-hands-on-360idev-yes-there-is-more/" title="Core Animation: Hands-On @ 360idev. Yes, There is More! | Free Time Studios">Core Animation presentation</a> at <a href="http://www.360idev.com/" title="360|iDev the Premiere iPhone developer conference in the world!">360idev</a> last year, I created a bunch of <a href="http://github.com/neror/CA360" title="neror's CA360 at master - GitHub">sample code</a> to show how simple and powerful Core Animation is. I also promised that I would update the sample code with even more advanced examples. That has not really happened (yet!), and it is time for me to atone.</p>

<p>I am very excited to officially release a collection of utility code that I have accumulated over the past year: <a href="http://ftutils.com/" title="FTUtils - Open Source Tools for iPhone Developers"><strong>FTUtils</strong></a>! It is the first dependency I add to all of my projects, and I have already received enthusiastic feedback from developers who have stumbled on the <a href="http://github.com/neror/ftutils" title="neror's ftutils at master - GitHub">github project</a>.</p>

<p>It probably comes as no surprise that the bulk of <strong>FTUtils</strong> contains enhancements and extensions to the Core Animation API (called FTAnimation). I use Core Animation a lot, and I have tried to find elegant ways to round off some of the sharper edges of the API. <strong>FTUtils</strong> is not only about Core Animation, though. It features:</p>

<ul>
<li>A category on <code>UIView</code> that puts 13+ canned animations only a method call away.</li>
<li>Access to the <code>CAAnimation</code> objects for the canned animations so you can mix and match them all you want.</li>
<li>Implementation of the target/action pattern for animation delegate callbacks. No more huge <code>animationDidStop:finished:</code> methods!</li>
<li>Simple chaining of an arbitrary number of animations.</li>
<li>Embedding of a pre or post animation delay directly in the <code>CAAnimation</code> object (useful for chaining).</li>
<li><code>performSelector*</code> methods built for calling delegates that elegantly handle non-existent selectors and allow the passing of primitives as parameters.</li>
<li>Simple methods for reversing arrays.</li>
<li>A collection of macros to make common code patterns simpler to use.</li>
</ul>

<p>Since I use <strong>FTUtils</strong> in all of my projects, it is updated regularly with bug fixes and new features. Currently, I am working hard at documenting the whole library at <a href="http://ftutils.com/" title="FTUtils">ftutils.com</a>, and I will be pushing updates to the site as I finish chunks of the docs.</p>

<p>The iPhone developer community is an active and friendly one, and it has been very good to me. I am glad to have something to give back. Also, for those of you <a href="http://360idev-nathane.eventbrite.com/" title="360|iDev San Jose - April 11-14, 2010 - Eventbrite">planning to attend 360idev this April</a> (you should go&#8230;really), I will be speaking about advanced uses of Core Animation including an explanation of how everything in FTAnimation works.</p>

<h2>One more thing&#8230;</h2>

<p>Here&#8217;s a screencast showing off the canned animations in <strong>FTUtils</strong>. The code for this app is in the <a href="http://github.com/neror/ftutils/tree/master/Examples/" title="Examples at master from neror's ftutils - GitHub">Examples directory</a> of the project.</p>

<p>Enjoy!</p>

<p><object height='385' width='480'><param name='movie' value='http://www.youtube.com/v/UMYP-qEKs9Q&#038;hl=en_US&#038;fs=1&#038;' /><param name='allowFullScreen' value='true' /><param name='allowscriptaccess' value='always' /><embed src='http://www.youtube.com/v/UMYP-qEKs9Q&#038;hl=en_US&#038;fs=1&#038;' allowfullscreen='true' type='application/x-shockwave-flash' allowscriptaccess='always' height='385' width='480' /></object></p>

<p><a href="http://www.iphonekicks.com/kick/?url=http%3a%2f%2fwww.freetimestudios.com%2f2010%2f01%2f05%2fintroducing-ftutils-open-source-utilities-for-iphone-developers%2f"><img src="http://www.iphonekicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.freetimestudios.com%2f2010%2f01%2f05%2fintroducing-ftutils-open-source-utilities-for-iphone-developers%2f" border="0" alt="kick it on iPhoneKicks.com" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.freetimestudios.com/2010/01/05/introducing-ftutils-open-source-utilities-for-iphone-developers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Core Data Tips for iPhone Devs Part 1: Command Line Shortcuts</title>
		<link>http://www.freetimestudios.com/2009/11/11/core-data-tips-for-iphone-devs-part-1-command-line-shortcuts/</link>
		<comments>http://www.freetimestudios.com/2009/11/11/core-data-tips-for-iphone-devs-part-1-command-line-shortcuts/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 19:17:31 +0000</pubDate>
		<dc:creator>Nathan Eror</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Core Data]]></category>
		<category><![CDATA[Core Data Tips & Tricks]]></category>
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.freetimestudios.com/?p=133</guid>
		<description><![CDATA[I recently finished migrating the data management backend for all of my games to Core Data from a custom sqlite implementation. This is part of my commitment to use more Apple APIs where it makes sense, and this one made a lot of sense. While the migration took me a couple of days, the benefits [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.freetimestudios.com%2F2009%2F11%2F11%2Fcore-data-tips-for-iphone-devs-part-1-command-line-shortcuts%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.freetimestudios.com%2F2009%2F11%2F11%2Fcore-data-tips-for-iphone-devs-part-1-command-line-shortcuts%2F&amp;source=freetimestudios&amp;style=normal&amp;service=bit.ly" height="61" width="50" />
			</a>
		</div><div class="document">


<p>I recently finished migrating the data management backend for all of my games to Core Data from a custom sqlite implementation. This is part of my commitment to use more Apple APIs where it makes sense, and this one made a lot of sense. While the migration took me a couple of days, the benefits of using Core Data have already paid back that investment in improved performance and better data design. Among other things, my domain objects are now much more granular which allows me to pull only the little bits of data that I need when I need them. Core Data makes managing the relationships between all of these little domain objects dead simple. In other words, I don&#8217;t have to write any more <tt class="docutils literal">join</tt> queries!</p>
<p>Core Data is a massive topic, and I have only begun to scratch the surface of its usefulness. Still, I have found myself doing some repetitive tasks both at the command line and in code. Like any self respecting programmer, I hate repetitive tasks, and my Makefile and header file of macros have grown as a result. Since most of the shortcuts I have come up with will probably be useful to others, I am putting them together in a series of blog posts. This is the first of those posts.</p>
<div class="section" id="the-problem">
<h2>The Problem</h2>
<p>Core Data allows you to choose from multiple backend storage methods, and, other than having to choose a type, the data store is completely transparent. The recommended store on the iPhone is sqlite, and not only is it fast, but the schema generated by Core Data is fairly readable. Being able to poke around in the sqlite file was an immeasurable help while I was learning Core Data. The biggest problem is finding the sqlite database file. Every time you build and run your app in the simulator, the application directory is renamed with a new GUID which makes it really hard to find:</p>
<div id="attachment_146" class="wp-caption aligncenter" style="width: 414px"><a href="http://www.freetimestudios.com/wp-content/uploads/2009/10/SimulatorAppWhackAMole.png"><img src="http://www.freetimestudios.com/wp-content/uploads/2009/10/SimulatorAppWhackAMole.png" alt="Can you find your app?" title="Simulator App Whack-A-Mole" width="404" height="283" class="size-full wp-image-146" /></a><p class="wp-caption-text">Can you find your app?</p></div>
</div>
<div class="section" id="the-solution">
<h2>The Solution</h2>
<p>Thankfully, OS X has the full compliment of unix command line tools. Wrap the proper commands in a Makefile, and you have some instant command line Core Data database management tools. Unix to the rescue! Here are the four make targets that I use the most:</p>
<div class="highlight"><pre><span class="nv">SQLITE_DB_FILE</span><span class="o">=</span>AppData.sqlite
<span class="nv">SIMULATOR_HOME</span><span class="o">=</span><span class="k">$(</span>HOME<span class="k">)</span>/Library/Application<span class="se">\ </span>Support/iPhone<span class="se">\ </span>Simulator

dbshell:
      find <span class="k">$(</span>SIMULATOR_HOME<span class="k">)</span> -name <span class="s2">&quot;$(SQLITE_DB_FILE)&quot;</span> -exec sqlite3 <span class="o">{}</span> <span class="s1">&#39;;&#39;</span>

killdb:
      find <span class="k">$(</span>SIMULATOR_HOME<span class="k">)</span> -name <span class="s2">&quot;$(SQLITE_DB_FILE)&quot;</span> -exec rm <span class="o">{}</span> <span class="s1">&#39;;&#39;</span>

dbschema:
      find <span class="k">$(</span>SIMULATOR_HOME<span class="k">)</span> -name <span class="s2">&quot;$(SQLITE_DB_FILE)&quot;</span> -exec sqlite3 <span class="o">{}</span> .schema <span class="s1">&#39;;&#39;</span>

dbdump:
      find <span class="k">$(</span>SIMULATOR_HOME<span class="k">)</span> -name <span class="s2">&quot;$(SQLITE_DB_FILE)&quot;</span> -exec sqlite3 <span class="o">{}</span> .dump <span class="s1">&#39;;&#39;</span>
</pre></div>
<p>The target names should make their use self explanatory, but I&#8217;ll summarize them:</p>
<dl class="docutils">
<dt><strong>dbshell</strong></dt>
<dd>Open up the sqlite command line shell with the Core Data database selected.</dd>
<dt><strong>killdb</strong></dt>
<dd>Delete the database file. This is useful if you&#8217;re making big changes to the schema and you would rather delete the whole database and start over rather than migrating the schema.</dd>
<dt><strong>dbschema</strong></dt>
<dd>Dumps the <tt class="docutils literal">CREATE</tt> statements required to recreate the schema. This is useful to see how Core Data persists your object graph.</dd>
<dt><strong>dbdump</strong></dt>
<dd>Dumps the schema as <tt class="docutils literal">CREATE</tt> statements and all of the data as <tt class="docutils literal">INSERT</tt> statements.</dd>
</dl>
<p>There is nothing magical or difficult about these, but I have found them to be very useful while developing my data model.</p>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.freetimestudios.com/2009/11/11/core-data-tips-for-iphone-devs-part-1-command-line-shortcuts/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Core Animation: Hands-On @ 360idev. Yes, There is More!</title>
		<link>http://www.freetimestudios.com/2009/10/02/core-animation-hands-on-360idev-yes-there-is-more/</link>
		<comments>http://www.freetimestudios.com/2009/10/02/core-animation-hands-on-360idev-yes-there-is-more/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 22:03:14 +0000</pubDate>
		<dc:creator>Nathan Eror</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Core Animation]]></category>
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.freetimestudios.com/?p=64</guid>
		<description><![CDATA[I was surprised and excited to see the standing room only turnout for my in depth Core Animation talk at 360idev this week. I thought it would be a popular topic, but Collin really got people fired up to learn more during his introductory talk. I was able to cover quite a bit of material [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.freetimestudios.com%2F2009%2F10%2F02%2Fcore-animation-hands-on-360idev-yes-there-is-more%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.freetimestudios.com%2F2009%2F10%2F02%2Fcore-animation-hands-on-360idev-yes-there-is-more%2F&amp;source=freetimestudios&amp;style=normal&amp;service=bit.ly" height="61" width="50" />
			</a>
		</div><p>I was surprised and excited to see the standing room only turnout for my in depth Core Animation talk at <a href="http://www.360idev.com/" title="360|iDev the Premiere iPhone developer conference in the world!">360idev</a> this week. I thought it would be a popular topic, but <a href="http://collindonnell.com/" title="Collin Donnell">Collin</a> really got people fired up to learn more during his introductory talk. I was able to cover quite a bit of material in my 80 minutes, and I got some awesome feedback from the developers in attendance. The most common thing I heard from developers was some variation of &#8220;I didn&#8217;t know I could do that!&#8221; or &#8220;You just saved me <em>X</em> lines of code!&#8221; It was simultaneously flattering and disappointing.</p>

<p><strong>SlapHappy!</strong> is written entirely with Core Animation, and I&#8217;ve dug deeper into the API than most people outside of Apple. I&#8217;d forgotten how much of the stuff I know was picked up through a combination of trial and error, debugging, digging into headers, and re-reading <a href="http://pragprog.com/titles/bdcora/core-animation-for-mac-os-x-and-the-iphone" title="The Pragmatic Bookshelf | Core Animation for Mac OS X and the iPhone">books</a> and documentation. I didn&#8217;t expect that others have been as intimate with Core Animation as I have, but I was still a little surprised to see the lights go on in people&#8217;s heads as I spoke.</p>

<p>My experience presenting at 360idev proved what I had suspected: Many iPhone developers look at Core Animation as a low level framework hidden inside the black box of UIKit. I&#8217;d like to change that perception. While you can write an entire iPhone app without even knowing that Core Animation exists, just a basic understanding and application of the API and its concepts can go a long way to separate your app from the other 85,000+ in the app store.</p>

<p>Since I was not able to cover everything I wanted to in my 80 minutes at 360idev, I am putting together a <a href="http://www.freetimestudios.com/cat/core-animation/" title="Core Animation | Free Time Studios">series of blog posts</a> with Core Animation tips, tricks, lessons learned, and code. Consider this the first in the series. I&#8217;ll kick it off with my slide deck and a link to the more than 1,400 lines of sample code I prepared for the presentation.</p>

<ul>
<li><strong>The Slide Deck:</strong> <a href="http://www.freetimestudios.com/wp-content/uploads/2009/10/NathanEror_CoreAnimation_360idev.pdf" title="">Core Animation Hands-On: Building Complex and Attractive Cocoa Touch Interfaces</a></li>
<li><strong>The Code:</strong> <a href="http://github.com/neror/CA360" title="neror's CA360 at master - GitHub">http://github.com/neror/CA360</a></li>
</ul>

<p>I will be adding to the sample code project as I work on this series so make sure to <a href="http://github.com/neror/CA360/toggle_watch">watch</a> the project on github. Also, if you have any burning Core Animation questions that you&#8217;d like to see covered in this series, drop me an email or add a comment to this post.</p>

<p>Oh, and thank you again <a href="http://lordbron.wordpress.com/" title="Tom&#8217;s Blog">Tom</a> and <a href="http://johnwilker.com/" title="Community, Code, Awesomeness">John</a> for giving me the opportunity to be a part of such a tremendous show!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.freetimestudios.com/2009/10/02/core-animation-hands-on-360idev-yes-there-is-more/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
