<?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>Paul Solt &#187; iPad</title>
	<atom:link href="http://paulsolt.com/tag/ipad/feed/" rel="self" type="application/rss+xml" />
	<link>http://paulsolt.com</link>
	<description>Putting the Inc back in Solt since 2005.</description>
	<lastBuildDate>Tue, 01 May 2012 15:03:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>iPhone Unit Testing Explained &#8211; Part II</title>
		<link>http://paulsolt.com/2012/03/iphone-unit-testing-explained-part-ii/</link>
		<comments>http://paulsolt.com/2012/03/iphone-unit-testing-explained-part-ii/#comments</comments>
		<pubDate>Sat, 31 Mar 2012 18:00:10 +0000</pubDate>
		<dc:creator>Paul Solt</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[bundle]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iphone unit test]]></category>
		<category><![CDATA[mac unit test]]></category>
		<category><![CDATA[OCUnit]]></category>
		<category><![CDATA[resource paths]]></category>
		<category><![CDATA[sentest]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[testable code]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[unit testing]]></category>
		<category><![CDATA[xcode 4]]></category>

		<guid isPermaLink="false">http://paulsolt.com/?p=735</guid>
		<description><![CDATA[<p style="text-align: justify;">Xcode 4 has drastically improved iPhone unit testing and Mac unit testing from my previous post, <a href="http://paulsolt.com/2010/11/iphone-unit-testing-explained-part-1/">iPhone Unit Testing Explained &#8211; Part I</a> Creating the unit testing target is easy and you can start writing test code in under 5 minutes.</p> <p style="text-align: justify;">The biggest hassle in testing is setting up the [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Xcode 4 has drastically improved iPhone unit testing and Mac unit testing from my previous post,<em> <a href="http://paulsolt.com/2010/11/iphone-unit-testing-explained-part-1/">iPhone Unit Testing Explained &#8211; Part I</a></em> Creating the unit testing target is easy and you can start writing test code in under 5 minutes.</p>
<p style="text-align: justify;">The biggest hassle in testing is setting up the project correctly, and Xcode 4 makes it simple. If you read Part I, I pushed for GHUnit because of the GUI interface, but now Xcode&#8217;s built in testing is enough to get you started. If you need a GUI, add GHUnit later, but start writing your tests today, since they&#8217;re compatible with GHUnit when you decide to integrate with it.</p>
<p style="text-align: justify;">Testing is important to start from the beginning or you will never have the motivation to write the tests unless your boss demand</p>
<p><span style="font-size: 24px; font-weight: bold;">Getting Started</span></p>
<p>To start writing unit tests you have two options, either create a new project with unit tests or add unit tests to an existing project.</p>
<h2>New Project with Unit Tests</h2>
<p>Create a new project and make sure the checkbox is enabled for unit tests.</p>
<p>&nbsp;</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" title="UnitTests New Project.png" src="http://paulsolt.com/wp-content/uploads/2012/03/UnitTests-New-Project1.png" alt="New Xcode 4 Project with Unit Tests" width="600" height="429" border="0" /></p>
<h2>Add Unit Tests Target to Existing Projects</h2>
<p>Add a unit test target to your project by clicking on your Project (top left) -&gt; Add Target (bottom middle) -&gt; iOS -&gt; Other -&gt; Unit Testing Bundle.</p>
<p>&nbsp;</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" title="Add Unit Tests to Existing Xcode Project.png" src="http://paulsolt.com/wp-content/uploads/2012/03/Add-Unit-Tests-to-Existing-Xcode-Project1.png" alt="Add Unit Tests to Existing Xcode Project" width="600" height="429" border="0" /></p>
<h2>(Optional) Share the Target and Testing Scheme</h2>
<p style="text-align: justify;">If you add a unit test target, you&#8217;ll most likely want to share your testing scheme with your team over version control (git, svn, etc.) Otherwise you&#8217;re teammates will have to setup for themselves.</p>
<p>Goto Editor -&gt; Manage Schemes -&gt; Click Shared next to the Unit Test</p>
<p>&nbsp;</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" title="Share Xcode Schemes with Teammates.png" src="http://paulsolt.com/wp-content/uploads/2012/03/Share-Xcode-Schemes-with-Teammates1.png" alt="Share Xcode Schemes with Teammates" width="600" height="429" border="0" /></p>
<h2>Adding Resources</h2>
<p style="text-align: justify;">When you want to test code or import resources like images or data files you&#8217;ll need to tell the testing target about the resources. There are two ways, you can do it when you first add the resource to the project or you can do it by editing the Build Phases for the unit test target.</p>
<p>&nbsp;</p>
<h3>Adding New Resources to the Unit Test Target</h3>
<p>Click on File -&gt; Add Files to &#8220;TestProject&#8221; -&gt; Click on the checkbox on unit test target and Copy items</p>
<p>&nbsp;</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" title="Copy Items and add to Unit Test Target in Xcode 4.png" src="http://paulsolt.com/wp-content/uploads/2012/03/Copy-Items-and-add-to-Unit-Test-Target-in-Xcode-41.png" alt="Copy Items and add to Unit Test Target in Xcode 4" width="600" height="477" border="0" /></p>
<h3>Adding Existing Resources to the Unit Test Target</h3>
<p>Click on your project &#8220;TestProject&#8221; -&gt; Build Phases -&gt; Expand one of three (Compile Sources, Link Binary With Libraries, or Copy Bundle Resources)</p>
<p>&nbsp;</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" title="Build Phases for unit test in Xcode 4.png" src="http://paulsolt.com/wp-content/uploads/2012/03/Build-Phases-for-unit-test-in-Xcode-4.png" alt="Build Phases for unit test in Xcode 4" width="600" height="477" border="0" /></p>
<h2>Resource Paths are Different!</h2>
<p style="text-align: justify;">Many assumptions that your bundle is the main bundle will cause problems when testing. (Especially when adding tests to existing code) Look at the difference in bundles, the main bundle isn&#8217;t what you&#8217;d expect in a unit test.</p>
<p style="padding-left: 30px;"><span style="color: #703daa;"><br />
</span></p>
<p style="font: normal normal normal 12px/normal Menlo; padding-left: 30px; margin: 0px;"><span style="color: #703daa;">NSString *mainBundlePath = [[NSBundle mainBundle] resourcePath];</span></p>
<p style="font: normal normal normal 12px/normal Menlo; padding-left: 30px; margin: 0px;"><span style="color: #703daa;">NSString</span> *directBundlePath = [[<span style="color: #703daa;">NSBundle</span> <span style="color: #3d1d81;">bundleForClass</span>:[<span style="color: #bb2ca2;">self</span> <span style="color: #3d1d81;">class</span>]] <span style="color: #3d1d81;">resourcePath</span>];</p>
<p style="font: normal normal normal 12px/normal Menlo; padding-left: 30px; margin: 0px;"><span style="color: #3d1d81;">NSLog</span>(<span style="color: #d12f1b;">@&#8221;Main Bundle Path: %@&#8221;</span>, mainBundlePath);</p>
<p style="font: normal normal normal 12px/normal Menlo; padding-left: 30px; margin: 0px;"><span style="color: #3d1d81;">NSLog</span>(<span style="color: #d12f1b;">@&#8221;Direct Path: %@&#8221;</span>, directBundlePath);</p>
<p style="font: normal normal normal 12px/normal Menlo; padding-left: 30px; margin: 0px;"><span style="color: #703daa;">NSString</span> *mainBundleResourcePath = [[<span style="color: #703daa;">NSBundle</span> <span style="color: #3d1d81;">mainBundle</span>] <span style="color: #3d1d81;">pathForResource</span>:<span style="color: #d12f1b;">@&#8221;Frame.png&#8221;</span> <span style="color: #3d1d81;">ofType</span>:<span style="color: #bb2ca2;">nil</span>];</p>
<p style="font: normal normal normal 12px/normal Menlo; padding-left: 30px; margin: 0px;"><span style="color: #703daa;">NSString</span> *directBundleResourcePath = [[<span style="color: #703daa;">NSBundle</span> <span style="color: #3d1d81;">bundleForClass</span>:[<span style="color: #bb2ca2;">self</span> <span style="color: #3d1d81;">class</span>]] <span style="color: #3d1d81;">pathForResource</span>:<span style="color: #d12f1b;">@&#8221;Frame.png&#8221;</span> <span style="color: #3d1d81;">ofType</span>:<span style="color: #bb2ca2;">nil</span>];</p>
<p style="font: normal normal normal 12px/normal Menlo; padding-left: 30px; margin: 0px;"><span style="color: #3d1d81;">NSLog</span>(<span style="color: #d12f1b;">@&#8221;Main Bundle Path: %@&#8221;</span>, mainBundleResourcePath);</p>
<p style="font: normal normal normal 12px/normal Menlo; padding-left: 30px; margin: 0px;"><span style="color: #3d1d81;">NSLog</span>(<span style="color: #d12f1b;">@&#8221;Direct Path: %@&#8221;</span>, directBundleResourcePath);</p>
<p><strong>Output</strong>:</p>
<p style="font: normal normal normal 11px/normal Menlo; padding-left: 30px; margin: 0px;">Main Bundle Path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/Developer/usr/bin</p>
<p style="font: normal normal normal 11px/normal Menlo; padding-left: 30px; margin: 0px;">Direct Path: /Users/paulsolt/Library/Developer/Xcode/DerivedData/PhotoTable-dqueeqsjkjdthcbkrdzcvwifesvl/Build/Products/Debug-iphonesimulator/Unit Tests.octest</p>
<p style="font: normal normal normal 11px/normal Menlo; padding-left: 30px; margin: 0px;">Main Bundle Path: (null)</p>
<p style="font: normal normal normal 11px/normal Menlo; padding-left: 30px; margin: 0px;">Direct Path: /Users/paulsolt/Library/Developer/Xcode/DerivedData/PhotoTable-dqueeqsjkjdthcbkrdzcvwifesvl/Build/Products/Debug-iphonesimulator/Unit Tests.octest/Frame.png</p>
<h3></h3>
<h3>Problem: My Unit test has a nil image, data file, etc. Why?</h3>
<p style="text-align: justify;"><span style="font-size: 14px;">The unit test doesn&#8217;t use the same bundle for resources that you&#8217;re accustomed to when running an app. Therefore, the resource we&#8217;re trying to load cannot be found.  You&#8217;ll need to make changes to the code to support testing external resources (images, data files, etc). For example the following code</span></p>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 30px; margin: 0px;">- (<span style="color: #703daa;">UIImage</span> *)resizeFrameForImage:(<span style="color: #703daa;">NSString</span> *)theImageName {</pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 60px; margin: 0px;"><span style="color: #703daa;">UIImage</span> *image = [<span style="color: #703daa;">UIImage</span> <span style="color: #3d1d81;">imageNamed</span>:theImageName];</pre>
<pre style="font: normal normal normal 12px/normal Menlo; color: #008400; padding-left: 60px; margin: 0px;">// ... do magical resize and return</pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 60px; margin: 0px;"><span style="color: #bb2ca2;">return</span> image;</pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 30px; margin: 0px;">}</pre>
<h3></h3>
<h3>Solution 1: Change the function parameters</h3>
<p style="text-align: justify;">Functions like these are semi-black boxes that aren&#8217;t ideal for testing. You want access to all your inputs/outputs, especially if we&#8217;re working with any kind of file resource. To fix it, just pass in the resource from the unit test, rather than having the function load it from a NSString object.</p>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 30px; margin: 0px;">- (<span style="color: #703daa;">UIImage</span> *)resizeFrameForImage:(<span style="color: #703daa;">UIImage</span> *)theImage {</pre>
<pre style="font: normal normal normal 12px/normal Menlo; color: #008400; padding-left: 60px; margin: 0px;">// ... do magical resize and return</pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 60px; margin: 0px;"><span style="color: #bb2ca2;">return</span> theImage;</pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 30px; margin: 0px;">}</pre>
<h3></h3>
<h3>Solution 2: Change the resource loading inside the function</h3>
<p style="text-align: justify;">If you need to load the resource in the function, you can alternatively change the way it is loaded. You need to stop using UIImage&#8217;s imageNamed: method and switch to imageWithContentsOfFile: This way you can pass in the resource with the correct path, however it&#8217;ll change logic elsewhere in your app.</p>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 30px; margin: 0px;">- (<span style="color: #703daa;">UIImage</span> *)resizeFrameForImage:(<span style="color: #703daa;">NSString</span> *)theImagePath {</pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 60px; margin: 0px;"><span style="color: #703daa;">UIImage</span> *image = [<span style="color: #703daa;">UIImage</span> <span style="color: #3d1d81;">imageWithContentsOfFile</span>:theImagePath];</pre>
<pre style="font: normal normal normal 12px/normal Menlo; color: #008400; padding-left: 60px; margin: 0px;">// ... do magical resize and return</pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 60px; margin: 0px;"><span style="color: #bb2ca2;">return</span> image;</pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 30px; margin: 0px;">}</pre>
<h3></h3>
<h3>Solution 3: Load resources using the bundle for the current class</h3>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 30px; margin: 0px;">- (<span style="color: #703daa;">UIImage</span> *)resizeFrameForImage:(<span style="color: #703daa;">NSString</span> *)theImageName {</pre>
<pre style="font: normal normal normal 12px/normal Menlo; color: #008400; padding-left: 60px; margin: 0px;">// Note: There are several ways you can write it, but make sure you include</pre>
<pre style="font: normal normal normal 12px/normal Menlo; color: #008400; padding-left: 60px; margin: 0px;">//  the extension or you'll have trouble finding the resource</pre>
<pre style="font: normal normal normal 12px/normal Menlo; color: #008400; padding-left: 60px; margin: 0px;">// 1. NSString *imagePath = [[NSBundle bundleForClass:[self class]] pathForResource:@"Image.png" ofType:nil];</pre>
<pre style="font: normal normal normal 12px/normal Menlo; color: #008400; padding-left: 60px; margin: 0px;">// 2. NSString *imagePath = [[NSBundle bundleForClass:[self class]] pathForResource:@"Image" ofType:@"png"];</pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 60px; margin: 0px;"><span style="color: #703daa;">NSString</span> *imagePath = [[<span style="color: #703daa;">NSBundle</span> <span style="color: #3d1d81;">bundleForClass</span>:[<span style="color: #bb2ca2;">self</span> <span style="color: #3d1d81;">class</span>]] <span style="color: #3d1d81;">pathForResource</span>:theImageName <span style="color: #3d1d81;">ofType</span>:<span style="color: #bb2ca2;">nil</span>];</pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 60px; margin: 0px;"><span style="color: #703daa;">UIImage</span> *image = [<span style="color: #703daa;">UIImage</span> <span style="color: #3d1d81;">imageWithContentsOfFile</span>:imagePath];</pre>
<pre style="font: normal normal normal 12px/normal Menlo; color: #008400; padding-left: 60px; margin: 0px;">// ... do magical resize and return</pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 60px; margin: 0px;"><span style="color: #bb2ca2;">return</span> image;</pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 30px; margin: 0px;">}</pre>
<h2 style="font-size: 1.5em; padding-left: 30px;"></h2>
<h2 style="font-size: 1.5em;">My First Test</h2>
<p style="text-align: justify;">Code completion in Xcode will make writing tests easy. To test different things you&#8217;ll use the following macros:</p>
<ul>
<li><span style="color: #78492a;">STAssertNotNil</span>(Object, Description);</li>
<li><span style="color: #78492a;">STAssertEquals</span>(Value1, Value2, Description);</li>
<li><span style="color: #78492a;">STAssertEqualObjects</span>(Object1, Object2, Description<span style="color: #78492a;">);</span></li>
</ul>
<p>Example: MyTest.m</p>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 30px; margin: 0px;"><span style="color: #bb2ca2;">@implementation</span> TestImagePrintHelper</pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 30px; margin: 0px;">- (<span style="color: #bb2ca2;">void</span>)setUp</pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 30px; margin: 0px;">{</pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 60px; margin: 0px;">[<span style="color: #bb2ca2;">super</span> <span style="color: #3d1d81;">setUp</span>];</pre>
<pre style="font: normal normal normal 12px/normal Menlo; color: #008400; padding-left: 60px; margin: 0px;">// Set-up code here.</pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 30px; margin: 0px;">}</pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 30px; margin: 0px;">- (<span style="color: #bb2ca2;">void</span>)tearDown</pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 30px; margin: 0px;">{</pre>
<pre style="font: normal normal normal 12px/normal Menlo; color: #008400; padding-left: 60px; margin: 0px;">// Tear-down code here.</pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 60px; margin: 0px;">[<span style="color: #bb2ca2;">super</span> <span style="color: #3d1d81;">tearDown</span>];</pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 30px; margin: 0px;">}</pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 30px; margin: 0px;">- (<span style="color: #bb2ca2;">void</span>)testName {</pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 60px; margin: 0px;"><span style="color: #703daa;">NSString</span> *testFirstName = <span style="color: #d12f1b;">@"Paul"</span>;</pre>
<pre style="font: normal normal normal 12px/normal Menlo; color: #d12f1b; padding-left: 60px; margin: 0px;"><span style="color: #78492a;">STAssertEqualObjects</span><span style="color: #000000;">([</span><span style="color: #4f8187;">person</span><span style="color: #000000;"> firstName</span><span style="color: #000000;">], testFirstName, </span>@"The name does not match"<span style="color: #000000;">);</span></pre>
<pre style="font: normal normal normal 12px/normal Menlo; color: #d12f1b; padding-left: 30px; margin: 0px;"><span style="color: #000000; font-family: Helvetica; font-size: medium;">}</span></pre>
<pre style="font: normal normal normal 12px/normal Menlo; color: #bb2ca2; padding-left: 30px; margin: 0px;">@end</pre>
<p>The <em>STAssertEqualObjects</em> macro will invoke the object&#8217;s isEqual method, <strong>make sure you write one</strong>. See the section below. If you used the <em>STAssertEquals</em> it will test for primitive/pointer equality, not object equality.</p>
<h2 style="text-align: justify;">Testable Code</h2>
<p style="text-align: justify;">Writing testable code requires that you add some additional functions that might feel optional before you decided to start testing.</p>
<h3 style="text-align: justify;">1. Create a isEqual method for your class.</h3>
<p style="text-align: justify;">Most of the time you&#8217;ll want to compare if the object is the correct object. This always requires that you write an isEqual method, otherwise you&#8217;ll be using the NSObject isEqual test and it&#8217;ll compare address pointers for the objects.</p>
<p style="text-align: justify;"><strong>Example: </strong>Person.m</p>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 30px; margin: 0px;">- (<span style="color: #bb2ca2;">BOOL</span>)isEqual:(<span style="color: #bb2ca2;">id</span>)other {</pre>
<pre style="font: normal normal normal 12px/normal Menlo; color: #008400; padding-left: 60px; margin: 0px;"><span style="color: #bb2ca2;">if</span><span style="color: #000000;"> (other == </span><span style="color: #bb2ca2;">self</span><span style="color: #000000;">) { </span>// self equality, compare address pointers</pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 90px; margin: 0px;"><span style="color: #bb2ca2;">return</span> <span style="color: #bb2ca2;">YES</span>;</pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 60px; margin: 0px;">}</pre>
<pre style="font: normal normal normal 12px/normal Menlo; color: #008400; padding-left: 60px; margin: 0px;"><span style="color: #bb2ca2;">if</span><span style="color: #000000;"> (!other || ![other </span><span style="color: #3d1d81;">isKindOfClass</span><span style="color: #000000;">:[</span><span style="color: #bb2ca2;">self </span><span style="color: #3d1d81;">class</span><span style="color: #000000;">]]) { </span></pre>
<pre style="font: normal normal normal 12px/normal Menlo; color: #008400; padding-left: 90px; margin: 0px;">// test not nil and is same type of class</pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 90px; margin: 0px;"><span style="color: #bb2ca2;">return</span> <span style="color: #bb2ca2;">NO</span>;</pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 60px; margin: 0px;">}</pre>
<pre style="font: normal normal normal 12px/normal Menlo; color: #008400; padding-left: 60px; margin: 0px;"><span style="color: #bb2ca2;">return</span><span style="color: #000000;"> [</span><span style="color: #bb2ca2;">self </span><span style="color: #31595d;">isEqualToPerson</span><span style="color: #000000;">: other]; </span>// call our isEqual method for Person objects</pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 30px; margin: 0px;">}</pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 30px; margin: 0px;">- (<span style="color: #bb2ca2;">BOOL</span>)isEqualToPerson:(Person *) other {</pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 60px; margin: 0px;"><span style="color: #bb2ca2;">BOOL</span> value = <span style="color: #bb2ca2;">NO</span>;</pre>
<pre style="font: normal normal normal 12px/normal Menlo; color: #008400; padding-left: 60px; margin: 0px;"><span style="color: #bb2ca2;">if</span><span style="color: #000000;"> (</span><span style="color: #bb2ca2;">self</span><span style="color: #000000;"> == other) { </span>// test for self equality</pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 90px; margin: 0px;">value = <span style="color: #bb2ca2;">YES</span>;</pre>
<pre style="font: normal normal normal 12px/normal Menlo; color: #3d1d81; padding-left: 60px; margin: 0px;"><span style="color: #000000;"> } </span><span style="color: #bb2ca2;">else</span><span style="color: #bb2ca2;">if</span><span style="color: #000000;">([[</span><span style="color: #bb2ca2;">self</span>firstName<span style="color: #000000;">] </span>isEqualToString<span style="color: #000000;">:[other </span>firstName<span style="color: #000000;">]] &amp;&amp;</span></pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 120px; margin: 0px;">[<span style="color: #bb2ca2;">self</span> <span style="color: #3d1d81;">age</span>] == [other <span style="color: #3d1d81;">age</span>]) {</pre>
<pre style="font: normal normal normal 12px/normal Menlo; color: #008400; padding-left: 90px; margin: 0px;">// Add any other tests for instance variables (ivars) that need to be compared</pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 90px; margin: 0px;">value = <span style="color: #bb2ca2;">YES</span>;</pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 60px; margin: 0px;">}</pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 60px; margin: 0px;"><span style="color: #bb2ca2;">return</span> value;</pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 30px; margin: 0px;">}</pre>
<h3 style="text-align: justify;">2. Create a description method for your class.</h3>
<p style="text-align: justify;">This is what will output on the command line, rather than the objects memory address. It can be also called when you decide to print the value in a tests</p>
<p style="text-align: justify;"><strong>Example: </strong>Person.m</p>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 30px; margin: 0px;">- (<span style="color: #703daa;">NSString</span> *)description {</pre>
<pre style="font: normal normal normal 12px/normal Menlo; color: #3d1d81; padding-left: 60px; margin: 0px;"><span style="color: #bb2ca2;">return</span><span style="color: #000000;"> [</span><span style="color: #703daa;">NSString</span>stringWithFormat<span style="color: #000000;">:</span><span style="color: #d12f1b;">@"Person Name: %@ Age: %d"</span><span style="color: #000000;">, [</span><span style="color: #bb2ca2;">self </span>firstName<span style="color: #000000;">], [</span><span style="color: #bb2ca2;">self </span>age<span style="color: #000000;">]];</span></pre>
<pre style="font: normal normal normal 12px/normal Menlo; padding-left: 30px; margin: 0px;">}</pre>
<p><strong>Example</strong>: Test using the description method, and we&#8217;ll see the first name and age printed like it was formatted in our description method.</p>
<pre style="font: normal normal normal 12px/normal Menlo; color: #d12f1b; padding-left: 30px; margin: 0px;"><span style="color: #78492a;">STAssertEqualObjects</span><span style="color: #000000;">([</span><span style="color: #3d1d81;">person</span><span style="color: #3d1d81;">firstName</span><span style="color: #000000;">], testFirstName, </span>@"The name does not match %@"<span style="color: #000000;">, </span><span style="color: #3d1d81;">person</span><span style="color: #000000;">);</span></pre>
<p style="font: normal normal normal 12px/normal Menlo; color: #d12f1b; margin: 0px;"><span style="color: #78492a;"><br />
</span></p>
<p style="text-align: justify;">Further reading in <a href="https://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/UnitTesting/00-About_Unit_Testing/about.html#//apple_ref/doc/uid/TP40002143-CH1-SW1">Apple&#8217;s Unit Testing Guide</a> is available. Now you have the basics for unit testing. The next part will provide an example project using resources and providing unit tests.</p>
<p><em> (Part III: Coming Soon)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://paulsolt.com/2012/03/iphone-unit-testing-explained-part-ii/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The Potential of Siri</title>
		<link>http://paulsolt.com/2011/10/the-potential-of-siri/</link>
		<comments>http://paulsolt.com/2011/10/the-potential-of-siri/#comments</comments>
		<pubDate>Tue, 18 Oct 2011 17:48:33 +0000</pubDate>
		<dc:creator>Paul Solt</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[computer]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[sdk]]></category>
		<category><![CDATA[siri]]></category>
		<category><![CDATA[voice control]]></category>

		<guid isPermaLink="false">http://paulsolt.com/?p=1225</guid>
		<description><![CDATA[<p>I&#8217;ve been working on iPhone development for several years and I have been very excited to see how the iPhone SDK has progressed. See my original article on how I envisioned the <a title="iPad Revolution" href="http://paulsolt.com/2010/02/ipad-revolution/" target="_blank">iPad revolutionizing the computing experience</a>. Siri takes the iPhone platform to an entirely new level. </p> <p>Feature article by MD</p> [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on iPhone development for several years and I have been very excited to see how the iPhone SDK has progressed. See my original article on how I envisioned the <a title="iPad Revolution" href="http://paulsolt.com/2010/02/ipad-revolution/" target="_blank">iPad revolutionizing the computing experience</a>. Siri takes the iPhone platform to an entirely new level. <span id="more-1225"></span></p>
<p>Feature article by MD</p>
<p>If you&#8217;re curious as to how the potential of Siri will impact iOS App development, then look no further than the video Apple used to demonstrate the technology, despite its somewhat heavy-on-the-awesome slant. The fact of the matter is, this is voice recognition technology that&#8217;s approaching the level of sophistication you saw in Startrek Voyager as a kid, and it could do wonders for 3rd party App developers.</p>
<p>&#8220;Load Angry Birds. New game, please. Aim 45 degrees off the starboard. Lower 3 degrees. Fire. Raise 3 degrees. Fire. Down with the piggies! Fire.&#8221;</p>
<p>It sounds far fetched, but is it? Voice control to do anything from text messaging to calling, and it&#8217;s not difficult to imagine it controlling things that are not traditionally based around natural voice input. It&#8217;d also be a great idea to work in some camera/augmented reality games, as playing &#8220;I Spy&#8221; with Siri could only make the device even more intuitive, when you&#8217;re not ringing your husband, friend or <a title="O2" href="http://www.o2.co.uk/" target="_blank">O2</a> without even touching your handset.</p>
<p>An open API to Siri will help push developers in a new direction building innovative software for the iPhone 4S, given that Siri pushes the boundaries in a way that encourages people to try something new. Google Goggles was a great example of this &#8211; it took what QR codes were doing and pushed it farther than anyone had expected it to go &#8211; I certainly didn&#8217;t expect to be able to use my voice to dictate a text message, make two calls and send an email to my boss, did you?</p>
<p>The best thing about it is the potential it awards developers working with voice and hardware interaction, as unless you&#8217;re paranoid about SkyNet and HAL-9000 becoming a reality, it certainly puts a friendlier face on an already friendly looking phone. All that&#8217;s left is for us to enjoy the adventures many app programmers are embarking on with Siri, in addition to the talented invidiual who&#8217;s just ported it to the iPhone 4. Good times to come, ahead.</p>
]]></content:encoded>
			<wfw:commentRss>http://paulsolt.com/2011/10/the-potential-of-siri/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Photo Table: Sharing Photos on iPad and iPhone using Multi-touch Input</title>
		<link>http://paulsolt.com/2011/09/photo-table-sharing-photos-on-ipad-and-iphone-using-multi-touch-input/</link>
		<comments>http://paulsolt.com/2011/09/photo-table-sharing-photos-on-ipad-and-iphone-using-multi-touch-input/#comments</comments>
		<pubDate>Fri, 30 Sep 2011 16:47:52 +0000</pubDate>
		<dc:creator>Paul Solt</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[App Store]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[photo table]]></category>
		<category><![CDATA[slideshow]]></category>

		<guid isPermaLink="false">http://paulsolt.com/?p=1203</guid>
		<description><![CDATA[Photo Table has been built from the ground up to support image management using the concept of albums. We can import albums from Facebook, Flickr, and the Photo Library.]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><img class="size-full wp-image-1209 alignright" title="Photo Table on iPad and iPhone" src="http://paulsolt.com/wp-content/uploads/2011/09/iPadiPhoneDuo.png" alt="Multi-touch Photo Sharing" width="278" height="392" /></p>
<p style="text-align: justify;">I&#8217;ve been busy avoiding recruiters and graduating to work on a software startup in the RIT Summer Startup Program. Over the past four months we&#8217;ve been working out of RIT&#8217;s Venture Creations at 125 Tech Park, Rochester, NY. Initially we focused on Artwork Evolution and printing integration, but have shifted directions into supporting photo sharing.</p>
<p style="text-align: justify;">Our new product is called Photo Table. It&#8217;s an app that enables sharing photos on iPad and iPhone. The uses multi-touch gestures seen first in my gesture based <a title="Wallpaper Evolution for iPhone and iPad" href="http://blog.artworkevolution.com/ios-apps/wallpaper-evolution/">Wallpaper Evolution app</a> for iPhone and iPad. The interactive Wallpaper Evolution app provided a mechanism to add one photo to the table at a time, but it lacked depth without photo album management. That changes with Photo Table.</p>
<p style="text-align: justify;">Photo Table has been built from the ground up to support image management using the concept of albums. We can import albums from Facebook, Flickr, and the Photo Library. Any image can be added to an album or removed just like you&#8217;d expect. Once you have albums you can open them and show family and friends interactive slideshows. All the photos are stored in the app, so we support offline content viewing. We have a lot of fun with the App and are hoping that you&#8217;ll be excited to try it.</p>
<ul style="text-align: justify;">
<li><strong>Website</strong>: <a title="Multi-touch photo sharing app for iPad" href="http://www.PhotoTableApp.com/">http://www.PhotoTableApp.com/</a></li>
<li><strong>Twitter</strong>: <a title="Photo Table on Twitter" href="http://www.twitter.com/PhotoTable">@PhotoTable</a></li>
<li><strong>Facebook</strong>: <a title="Photo Table on Facebook" href="http://www.Facebook.com/PhotoTableApp/">http://www.Facebook.com/PhotoTableApp/</a></li>
</ul>
<h3 style="text-align: justify;"><a title="Download Facebook albums for off-line viewing" href="http://www.youtube.com/watch?v=7dPguidC6Mk ">Photo Table Facebook Album Importing</a></h3>
<p style="text-align: justify;">
<p><a href="http://www.youtube.com/watch?v=7dPguidC6Mk&#038;fmt=18">http://www.youtube.com/watch?v=7dPguidC6Mk</a></p>
</p>
<h3 style="text-align: justify;"><a title="Play Music with Photo Albums and Share with Family" href="http://www.youtube.com/watch?v=fpge8z65wH4 ">Add Music to Photo Albums for Sharing with Families</a></h3>
<p style="text-align: justify;">
<p><a href="http://www.youtube.com/watch?v=fpge8z65wH4&#038;fmt=18">http://www.youtube.com/watch?v=fpge8z65wH4</a></p></p>
]]></content:encoded>
			<wfw:commentRss>http://paulsolt.com/2011/09/photo-table-sharing-photos-on-ipad-and-iphone-using-multi-touch-input/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Idea to App Store &#8211; How to make, market, and sell your iPhone App</title>
		<link>http://paulsolt.com/2011/08/idea-to-app-store-how-to-make-market-and-sell-your-iphone-app/</link>
		<comments>http://paulsolt.com/2011/08/idea-to-app-store-how-to-make-market-and-sell-your-iphone-app/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 18:53:27 +0000</pubDate>
		<dc:creator>Paul Solt</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[App Store]]></category>
		<category><![CDATA[appfigures]]></category>
		<category><![CDATA[Artwork Evolution]]></category>
		<category><![CDATA[flurry]]></category>
		<category><![CDATA[idea]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[sales]]></category>

		<guid isPermaLink="false">http://paulsolt.com/?p=1173</guid>
		<description><![CDATA[<p>I&#8217;ve posted my presentation from the Computer Science Community at RIT on making iPhone/iPad apps from February 2011. The video is in two parts and I discuss the initial sales, analytics, marketing when releasing an iPhone app.</p> <p></p> <p>Update: 8/31/11 <a href="http://paulsolt.com/wp-content/uploads/2011/08/Idea-to-App-Store.pdf">Idea to App Store Slides (PDF)</a></p> <a title="Idea to App Store Part 1" href="http://www.youtube.com/watch?v=2uza2teEBEQ">Part 1:</a> [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve posted my presentation from the Computer Science Community at RIT on making iPhone/iPad apps from February 2011. The video is in two parts and I discuss the initial sales, analytics, marketing when releasing an iPhone app.</p>
<p><span id="more-1173"></span></p>
<p><strong>Update: 8/31/11</strong> <a href="http://paulsolt.com/wp-content/uploads/2011/08/Idea-to-App-Store.pdf">Idea to App Store Slides (PDF)</a></p>
<h2><a title="Idea to App Store Part 1" href="http://www.youtube.com/watch?v=2uza2teEBEQ">Part 1:</a></h2>
<p><a href="http://www.youtube.com/watch?v=2uza2teEBEQ&#038;fmt=18">http://www.youtube.com/watch?v=2uza2teEBEQ</a></p>
<h2><a title="Idea to App Store Part 2" href="http://www.youtube.com/watch?v=iyBis6W28Rw">Part 2:</a></h2>
<p><a href="http://www.youtube.com/watch?v=iyBis6W28Rw&#038;fmt=18">http://www.youtube.com/watch?v=iyBis6W28Rw</a></p>
]]></content:encoded>
			<wfw:commentRss>http://paulsolt.com/2011/08/idea-to-app-store-how-to-make-market-and-sell-your-iphone-app/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Transparent UITableView with Custom Background UIView and Tap Gestures</title>
		<link>http://paulsolt.com/2011/05/transparent-uitableview-with-custom-background-uiview-and-tap-gestures/</link>
		<comments>http://paulsolt.com/2011/05/transparent-uitableview-with-custom-background-uiview-and-tap-gestures/#comments</comments>
		<pubDate>Sat, 14 May 2011 23:38:41 +0000</pubDate>
		<dc:creator>Paul Solt</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[tap gesture]]></category>
		<category><![CDATA[transparent background]]></category>
		<category><![CDATA[uitableview]]></category>

		<guid isPermaLink="false">http://paulsolt.com/?p=1094</guid>
		<description><![CDATA[<p style="text-align: justify;">In order to create a custom background for a transparent UITableView you&#8217;ll need to do a few things. I&#8217;ve got the basic code below after a lot of tinkering. I&#8217;ve also included how to make it so you can hide the UITableView when you tap in the transparent areas below the rows using [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">In order to create a custom background for a transparent <code>UITableView</code> you&#8217;ll need to do a few things. I&#8217;ve got the basic code below after a lot of tinkering. I&#8217;ve also included how to make it so you can hide the <code>UITableView</code> when you tap in the transparent areas below the rows using a <code>UITapGestureRecognizer</code>. In the images below you can see the custom view in action.</p>
<div class="mceTemp" style="text-align: center;">
<dl id="attachment_1102" class="wp-caption alignnone" style="width: 169px;">
<dt class="wp-caption-dt"><a href="http://paulsolt.com/wp-content/uploads/2011/05/TableViewCustomBackground.png"><img class="size-medium wp-image-1102" title="TableViewCustomBackground" src="http://paulsolt.com/wp-content/uploads/2011/05/TableViewCustomBackground-159x300.png" alt="UITableView with custom backgroundView" width="159" height="300" /></a></dt>
<dd class="wp-caption-dd">UITableView with Custom Background</dd>
</dl>
</div>
<p style="text-align: center;"><a href="http://paulsolt.com/wp-content/uploads/2011/05/TableViewCustomBackground.png"></a><a href="http://paulsolt.com/wp-content/uploads/2011/05/TableViewHidden.png"><br />
</a></p>
<div id="attachment_1101" class="wp-caption aligncenter" style="width: 169px"><a href="http://paulsolt.com/wp-content/uploads/2011/05/TableViewHidden.png"><img class="size-medium wp-image-1101" title="TableViewHidden" src="http://paulsolt.com/wp-content/uploads/2011/05/TableViewHidden-159x300.png" alt="Hidden UITableView with Custom Background" width="159" height="300" /></a><p class="wp-caption-text">Hidden UITableView Showing Custom Background</p></div>
<p><strong>Key Points:</strong></p>
<ul>
<li style="text-align: justify;">Don&#8217;t subclass <code>UITableView</code>, instead use it as a instance variable in your own custom UIViewController subclass.</li>
<li style="text-align: justify;"> Create a custom <code>UIView</code> subclass to use as the background view, this will be visible when the <code>UITableView</code> is hidden or has a transparent background view.</li>
<li style="text-align: justify;"> On iPad make sure you clear the UITableView&#8217;s <code>backgroundView</code> and set it to <code>nil</code> in addition to setting the background color to<code>[UIColor clearColor]</code></li>
<li style="text-align: justify;"> Register a <code>UITapGestureRecognizer</code> with the viewController&#8217;s view and then set the attribute <code>cancelsTouches</code> to <code>NO</code> so that the touches from the gesture propagate to both the <code>UITableView</code> and the custom background view.</li>
<li style="text-align: justify;"> In the <code>-(void)handleTapGesture:</code> method you&#8217;ll want to send taps that don&#8217;t touch a row to toggle the UI so that the <code>UITableView</code> hides or unhides.</li>
</ul>
<p style="text-align: justify;"><strong>Notes:</strong></p>
<ul>
<li style="text-align: justify;">I show a <code>UINavigationBar</code>, so my <code>UITableView</code> frame needs to take into account the size of the navigation bar.</li>
<li style="text-align: justify;">Set the UILabel&#8217;s or custom views backgroundColor in the table&#8217;s cells to have <code>[UIColor clearColor]</code> so that they animate and fade correctly.</li>
</ul>
<p>See the sample code below:<br />
<script src="https://gist.github.com/972555.js?file=MyTransparentTableViewController.h"></script> <script src="https://gist.github.com/972555.js?file=MyTransparentTableViewController.m"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://paulsolt.com/2011/05/transparent-uitableview-with-custom-background-uiview-and-tap-gestures/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Artwork Evolution 1.2.80 Released!</title>
		<link>http://paulsolt.com/2011/02/artwork-evolution-1-2-80-released/</link>
		<comments>http://paulsolt.com/2011/02/artwork-evolution-1-2-80-released/#comments</comments>
		<pubDate>Mon, 21 Feb 2011 20:06:51 +0000</pubDate>
		<dc:creator>Paul Solt</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[App Store]]></category>
		<category><![CDATA[Artwork Evolution]]></category>
		<category><![CDATA[coffee table]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[ipod touch]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[wallpapers]]></category>

		<guid isPermaLink="false">http://paulsolt.com/?p=1058</guid>
		<description><![CDATA[Download <p style="padding-left: 30px;">Buy <a href="http://bit.ly/ArtworkEvolutionApp">Artwork Evolution on the App Store</a> and create wallpapers for iPhone, iPod Touch, and iPad!<br /> <a href="http://bit.ly/ArtworkEvolutionApp"></a></p> <a href="http://blog.artworkevolution.com/wp-content/uploads/2011/02/NewUISmallWeb.jpg"></a><a href="http://bit.ly/ArtworkEvolutionApp"></a> New Features Coffee Table Photos: Touch, slide, and flick photos off the table! Updated main screen user interface Video <p style="text-align: center;"> <p><a href="http://www.youtube.com/watch?v=xkwE8BRQsAo&#038;fmt=18">http://www.youtube.com/watch?v=xkwE8BRQsAo</a></p></p>]]></description>
			<content:encoded><![CDATA[<h3>Download</h3>
<p style="padding-left: 30px;">Buy <a href="http://bit.ly/ArtworkEvolutionApp">Artwork Evolution on the App Store</a> and create wallpapers for iPhone, iPod Touch, and iPad!<br />
<a href="http://bit.ly/ArtworkEvolutionApp"><img src="http://ax.phobos.apple.com.edgesuite.net/images/web/linkmaker/badge_appstore-lrg.gif" alt="Artwork Evolution - Paul Solt" /></a></p>
<div class="mceIEcenter">
<dl id="attachment_79" class="aligncenter">
<dt><a href="http://blog.artworkevolution.com/wp-content/uploads/2011/02/NewUISmallWeb.jpg"></a><a href="http://bit.ly/ArtworkEvolutionApp"><img class="aligncenter size-full wp-image-1061" title="NewUISmallWeb" src="http://paulsolt.com/wp-content/uploads/2011/02/NewUISmallWeb.jpg" alt="" width="360" height="780" /></a>
</dt>
</dl>
</div>
<h3>New Features</h3>
<ul>
<li>Coffee Table Photos: Touch, slide, and flick photos off the table!</li>
<li>Updated main screen user interface</li>
</ul>
<h3>Video</h3>
<p style="text-align: center;">
<p><a href="http://www.youtube.com/watch?v=xkwE8BRQsAo&#038;fmt=18">http://www.youtube.com/watch?v=xkwE8BRQsAo</a></p></p>
]]></content:encoded>
			<wfw:commentRss>http://paulsolt.com/2011/02/artwork-evolution-1-2-80-released/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Artwork Evolution on App Store</title>
		<link>http://paulsolt.com/2011/01/artwork-evolution-on-app-store/</link>
		<comments>http://paulsolt.com/2011/01/artwork-evolution-on-app-store/#comments</comments>
		<pubDate>Fri, 07 Jan 2011 01:43:11 +0000</pubDate>
		<dc:creator>Paul Solt</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[abstract art]]></category>
		<category><![CDATA[App Store]]></category>
		<category><![CDATA[art]]></category>
		<category><![CDATA[Artwork Evolution]]></category>
		<category><![CDATA[genetic art]]></category>
		<category><![CDATA[iPad]]></category>

		<guid isPermaLink="false">http://paulsolt.com/?p=1033</guid>
		<description><![CDATA[<p><a href="http://itunes.apple.com/us/app/artwork-evolution/id393135008?mt=8&#38;uo=4" target="itunes_store"></a></p> <p>Artwork Evolution, my first iOS App is now available on the <a title="Artwork Evolution on App Store" href="http://itunes.apple.com/us/app/artwork-evolution/id393135008?mt=8#">App Store for iPhone, iPod Touch, and iPad</a>. It allows you to create complex abstract art with the touch of a finger. You can breed images together to create new images.</p> <p style="text-align: center;"> Tutorial [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://itunes.apple.com/us/app/artwork-evolution/id393135008?mt=8&amp;uo=4" target="itunes_store"><img class="alignleft" style="border: 0;" src="http://ax.phobos.apple.com.edgesuite.net/images/web/linkmaker/badge_appstore-lrg.gif" alt="Artwork Evolution - Paul Solt" /></a></p>
<p>Artwork Evolution, my first iOS App is now available on the <a title="Artwork Evolution on App Store" href="http://itunes.apple.com/us/app/artwork-evolution/id393135008?mt=8#">App Store for iPhone, iPod Touch, and iPad</a>. It allows you to create complex abstract art with the touch of a finger. You can breed images together to create new images.</p>
<p style="text-align: center;">
<div id="attachment_1038" class="wp-caption aligncenter" style="width: 406px"><a href="http://paulsolt.com/wp-content/uploads/2011/01/Screen-shot-2011-01-06-at-8.35.20-PM.png"><img class="size-full wp-image-1038" title="Artwork Evolution on iPhone 4" src="http://paulsolt.com/wp-content/uploads/2011/01/Screen-shot-2011-01-06-at-8.35.20-PM.png" alt="" width="396" height="744" /></a><p class="wp-caption-text">Artwork Evolution on iPhone 4</p></div>
<h2>Tutorial Video</h2>
<p style="text-align: center;">
<p><a href="http://www.youtube.com/watch?v=_VZnFsnO4YY&#038;fmt=18">http://www.youtube.com/watch?v=_VZnFsnO4YY</a></p>
</p>
<p style="text-align: center;">
<p style="text-align: center;">
]]></content:encoded>
			<wfw:commentRss>http://paulsolt.com/2011/01/artwork-evolution-on-app-store/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>iOS: Converting UIImage to RGBA8 Bitmaps and Back</title>
		<link>http://paulsolt.com/2010/09/ios-converting-uiimage-to-rgba8-bitmaps-and-back/</link>
		<comments>http://paulsolt.com/2010/09/ios-converting-uiimage-to-rgba8-bitmaps-and-back/#comments</comments>
		<pubDate>Wed, 22 Sep 2010 20:25:33 +0000</pubDate>
		<dc:creator>Paul Solt</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[CGImage]]></category>
		<category><![CDATA[conversion]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[RBGA8 bitmap]]></category>
		<category><![CDATA[respondsToSelector:]]></category>
		<category><![CDATA[Retina display]]></category>
		<category><![CDATA[UIImage]]></category>

		<guid isPermaLink="false">http://paulsolt.com/?p=641</guid>
		<description><![CDATA[<p style="text-align: justify;">Edited 8/24/11: Fixed a bug with alpha transparency not being preserved. Thanks for the tip Scott! Updated the gist and github project to test transparent images.</p> <p style="text-align: justify;">Edited 12/13/10: Updated the code on github/gist to fix static analyzer warnings. Changed a function name to conform to the Apple standard.</p> <p style="text-align: justify;">When I [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><strong>Edited 8/24/11:</strong> Fixed a bug with alpha transparency not being preserved. Thanks for the tip Scott! Updated the gist and github project to test transparent images.</p>
<p style="text-align: justify;"><strong>Edited 12/13/10:</strong> Updated the code on github/gist to fix static analyzer warnings. Changed a function name to conform to the Apple standard.</p>
<p style="text-align: justify;">When I started working with iPhone I was working with Objective-C and C++. I created a library in C++ and needed access to a bitmap array so that I could perform image processing. In order to do so I had to create some helper functions to convert between UIImage objects and the RGBA8 bitmap arrays.</p>
<p style="text-align: justify;">Here are the updated routines that should work on iPhone 4.1 and iPad 3.2. The iPhone 4 has a high resolution screen requires setting a scaling factor for high resolution images. I&#8217;ve added support to set the scaling factor based on the devices mainScreen scaling factor</p>
<p style="text-align: justify;"><strong> UPDATE: 9/23/10</strong><br />
My code to work with the Retina display was incorrect, it ran fine on iPad with 3.2, but it didn&#8217;t do anything &#8220;high-res&#8221; on iPhone 4. I was using the following:</p>
<p><code>__IPHONE_OS_VERSION_MAX_ALLOWED &gt;= 30200</code></p>
<p style="text-align: justify;">but it isn&#8217;t safe, when I run it for a universal App 4.1/3.2 it will always return 40100, and the expression didn&#8217;t make sense. (Side Note) I took this check from Apple&#8217;s website when iPad 3.2 was actually ahead of iPhone 3.1.X, but that doesn&#8217;t help with iPhone 4.1 being ahead of iPad 3.2.</p>
<p style="text-align: justify;">The issue with iPad is that the <code>imageWithCGImage:scale:orientation:</code> selector doesn&#8217;t exist on iOS 3.2, most likely it will on iOS 4.2, so the following code should be safe. Some methods in iOS 4.1 don&#8217;t exist in iOS 3.2, so you need to check to see if a newer method exists before trying to execute it. There are two methods you can use depending on the class/instance (+/-) modifier on the function definition.</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">+</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">BOOL</span><span style="color: #002200;">&#41;</span>respondsToSelector<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">SEL</span><span style="color: #002200;">&#41;</span>aSelector   <span style="color: #11740a; font-style: italic;">// (+) Class method check</span>
<span style="color: #002200;">+</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">BOOL</span><span style="color: #002200;">&#41;</span>instancesRespondToSelector<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">SEL</span><span style="color: #002200;">&#41;</span>aSelector   <span style="color: #11740a; font-style: italic;">// (-) Instance method check</span></pre></div></div>

<p><code>imageWithCGImage:scale:orientation</code> is a class method, so we need to use <code>respondsToSelector:</code> The correct code to scale the CGImage is below:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #a61390;">if</span><span style="color: #002200;">&#40;</span><span style="color: #002200;">&#91;</span>UIImage respondsToSelector<span style="color: #002200;">:</span><span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>imageWithCGImage<span style="color: #002200;">:</span>scale<span style="color: #002200;">:</span>orientation<span style="color: #002200;">:</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span>
	<span style="color: #a61390;">float</span> scale <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIScreen mainScreen<span style="color: #002200;">&#93;</span> scale<span style="color: #002200;">&#93;</span>;
	image <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>UIImage imageWithCGImage<span style="color: #002200;">:</span>imageRef scale<span style="color: #002200;">:</span>scale orientation<span style="color: #002200;">:</span>UIImageOrientationUp<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span> <span style="color: #a61390;">else</span> <span style="color: #002200;">&#123;</span>
	image <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>UIImage imageWithCGImage<span style="color: #002200;">:</span>imageRef<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span></pre></div></div>

<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-2182421302031373";
/* Large Post Ad */
google_ad_slot = "4358587115";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p style="text-align: justify;">It might help if there was some images to explain what&#8217;s happening if you don&#8217;t use this <code>imageWithCGImage:scale:orientation:</code> on the iPhone 4 with the correct scale factor. It should be 2.0 on Retina displays (iPhone 4 or the new iPod Touch) and 1.0 on the 3G, 3GS, and iPad. <code>float scale = [[UIScreen mainScreen] scale];</code> will provide the correct scale factor for the device. The first image has jaggies in it, while the second does not. The third image, an iPhone 3G/3GS, also does not have jaggies.</p>
<div id="attachment_697" class="wp-caption aligncenter" style="width: 461px"><a href="http://paulsolt.com/wp-content/uploads/2010/09/Screen-shot-2010-09-23-at-10.54.38-AM.png"><img class="size-full wp-image-697 " title="iPhone 4 " src="http://paulsolt.com/wp-content/uploads/2010/09/Screen-shot-2010-09-23-at-10.54.38-AM.png" alt="" width="451" height="643" /></a><p class="wp-caption-text">iPhone 4 with default scale of 1.0 causes the image to be enlarged and with jaggies.</p></div>
<div id="attachment_698" class="wp-caption aligncenter" style="width: 461px"><a href="http://paulsolt.com/wp-content/uploads/2010/09/Screen-shot-2010-09-23-at-10.54.52-AM.png"><img class="size-full wp-image-698 " title="iPhone 4 with scaling" src="http://paulsolt.com/wp-content/uploads/2010/09/Screen-shot-2010-09-23-at-10.54.52-AM.png" alt="" width="451" height="643" /></a><p class="wp-caption-text">iPhone 4 with scaling of 2.0 makes the image half the size and removes the jaggies</p></div>
<div id="attachment_692" class="wp-caption aligncenter" style="width: 424px"><a href="http://paulsolt.com/wp-content/uploads/2010/09/Screen-shot-2010-09-22-at-4.45.51-PM.png"><img class="size-full wp-image-692" title="Xcode Sample" src="http://paulsolt.com/wp-content/uploads/2010/09/Screen-shot-2010-09-22-at-4.45.51-PM.png" alt="" width="414" height="770" /></a><p class="wp-caption-text">iPhone 3G/3GS with scaling set to 1.0</p></div>
<p style="text-align: justify;">I hope it helps other people with image processing on the iPhone/iPad. It&#8217;s based on some previous tutorials using OpenGL, which I fixed (memory leaks) and modified to work with unsigned char arrays (bitmap).</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-2182421302031373";
/* 468x15, created 11/9/10 */
google_ad_slot = "7180498408";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>Grab the two files here or the sample Universal iOS App project:</p>
<ul>
<li><a href="http://github.com/PaulSolt/UIImage-Conversion/blob/master/ImageHelper.h">ImageHelper.h</a></li>
<li><a href="http://github.com/PaulSolt/UIImage-Conversion/blob/master/ImageHelper.m">ImageHelper.m</a></li>
<li><a href="http://github.com/PaulSolt/UIImage-Conversion">Xcode Project on Github</a></li>
</ul>
<p>Example Usage:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>path <span style="color: #002200;">=</span> <span style="color: #002200;">&#40;</span><span style="color: #400080;">NSString</span><span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSBundle</span> mainBundle<span style="color: #002200;">&#93;</span> pathForResource<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Icon4&quot;</span> ofType<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;png&quot;</span><span style="color: #002200;">&#93;</span>;
UIImage <span style="color: #002200;">*</span>image <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>UIImage imageWithContentsOfFile<span style="color: #002200;">:</span>path<span style="color: #002200;">&#93;</span>;
<span style="color: #a61390;">int</span> width <span style="color: #002200;">=</span> image.size.width;
<span style="color: #a61390;">int</span> height <span style="color: #002200;">=</span> image.size.height;
&nbsp;
    <span style="color: #11740a; font-style: italic;">// Create a bitmap</span>
<span style="color: #a61390;">unsigned</span> <span style="color: #a61390;">char</span> <span style="color: #002200;">*</span>bitmap <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>ImageHelper convertUIImageToBitmapRGBA8<span style="color: #002200;">:</span>image<span style="color: #002200;">&#93;</span>;
&nbsp;
    <span style="color: #11740a; font-style: italic;">// Create a UIImage using the bitmap</span>
UIImage <span style="color: #002200;">*</span>imageCopy <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>ImageHelper convertBitmapRGBA8ToUIImage<span style="color: #002200;">:</span>bitmap withWidth<span style="color: #002200;">:</span>width withHeight<span style="color: #002200;">:</span>height<span style="color: #002200;">&#93;</span>;
&nbsp;
    <span style="color: #11740a; font-style: italic;">// Display the image copy on the GUI</span>
UIImageView <span style="color: #002200;">*</span>imageView <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIImageView alloc<span style="color: #002200;">&#93;</span> initWithImage<span style="color: #002200;">:</span>imageCopy<span style="color: #002200;">&#93;</span>;
&nbsp;
    <span style="color: #11740a; font-style: italic;">// Cleanup</span>
<span style="color: #a61390;">free</span><span style="color: #002200;">&#40;</span>bitmap<span style="color: #002200;">&#41;</span>;</pre></div></div>

<p style="text-align: center;">Below is the full source code for converting between bitmap and UIImage:</p>
<p>ImageHelper.h</p>
<p><script type="text/javascript" src="https://gist.github.com/739132.js?file=ImageHelper.h"></script>ImageHelper.m<script type="text/javascript" src="https://gist.github.com/739132.js?file=ImageHelper.m"></script></p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-2182421302031373";
/* Large Post Ad */
google_ad_slot = "4358587115";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://paulsolt.com/2010/09/ios-converting-uiimage-to-rgba8-bitmaps-and-back/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>C++ Logging and building Boost for iPhone/iPad 3.2 and MacOSX</title>
		<link>http://paulsolt.com/2010/04/c-logging-and-building-boost-for-iphoneipad-3-2-and-macosx/</link>
		<comments>http://paulsolt.com/2010/04/c-logging-and-building-boost-for-iphoneipad-3-2-and-macosx/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 05:15:42 +0000</pubDate>
		<dc:creator>Paul Solt</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Boost]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone 3.2]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://paulsolt.com/?p=559</guid>
		<description><![CDATA[<p style="text-align: justify;">In my effort to write more robust and maintainable code I have been searching for a cross-platform C++ logging utility. I&#8217;m working on a C++ static library for iPhone/iPad 3.2/Mac/Windows and I needed a way to log what was happening in my library. Along the way I was forced to build Boost for [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">In my effort to write more robust and maintainable code I have been searching for a cross-platform C++ logging utility. I&#8217;m working on a C++ static library for iPhone/iPad 3.2/Mac/Windows and I needed a way to log what was happening in my library. Along the way I was forced to build Boost for iPhone, iPhone Simulator, and the Mac.</p>
<h2 style="text-align: justify;">Why logging?</h2>
<p style="text-align: justify;">Mobile devices lack a console when detached from a development machine, so it&#8217;s hard to track down issues. I needed a system that could log at multiple levels (Debug1, Debug2, Info, Error, Warning) and be thread safe. Multiple logger levels allow a developer to turn up/down the detail of information that is stored, which in turn affect performance with I/O writes. A developer with logging information can better track down crashes and other issues during an applications lifetime.</p>
<h2 style="text-align: justify;">Why Boost Logger Library v2?</h2>
<p style="text-align: justify;">I struggled trying to get a logger working. After many failed attempts with <a href="http://pantheios.sourceforge.net/">Pantheios</a>, <a href="http://logging.apache.org/log4cxx/">log4cxx</a>, <a href="http://log4cpp.sourceforge.net/">log4cpp</a>, and <a href="http://code.google.com/p/google-glog/">glog</a>, I settled on the <a href="http://torjo.com/log2/">Boost Logger Library v2</a> because I was able to &#8220;compile&#8221; for iPhone/iPad 3.2 and Mac OSX. Most of the loggers required other dependencies that would need to be rebuilt for iPhone and didn&#8217;t directly support iPhone.</p>
<p style="text-align: justify;">The Boost Logger is all header files so it doesn&#8217;t require &#8220;compiling,&#8221; which made it much easier to get working. However, it does require a few Boost libraries that need to be compiled. The Boost Logging needs the following libraries: filesystem, system, and threading depending on what functionality is used.</p>
<h3>Step 1: Building Boost for iPhone/iPad and iPhone Simulator 3.2</h3>
<p style="text-align: justify;">A few Boost libraries need compiling for the iPhone/iPad and the iPhone Simulator in order to link against the Boost Logger. <a href="http://iphone.galloway.me.uk/2009/11/compiling-boost-for-the-iphone/">Matt Galloway</a> provided a demo on how to compile Boost 1.41/1.42 for iPhone/iPhone Simulator. Here are the steps I used for Boost 1.42 based on his tutorial.</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-2182421302031373";
/* Large Post Ad */
google_ad_slot = "4358587115";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<ol>
<li>Get <a href="http://www.boost.org/users/news/version_1_42_0">Boost 1.42</a></li>
<li>Extract Boost:</li>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">tar</span> xzf boost_1_42_0.tar.gz</pre></div></div>

<li>Create a user-config.jam file in your user directory (~/user-config.jam) such as /Users/paulsolt/user-config.jam with the following. (<strong>Note</strong>:  this config file needs to be rename or moved during the MacOSX bjam build)</li>
<p><code><br />
</code><br />
~/user-config.jam</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">using darwin : 4.2.1~iphone
   : <span style="color: #000000; font-weight: bold;">/</span>Developer<span style="color: #000000; font-weight: bold;">/</span>Platforms<span style="color: #000000; font-weight: bold;">/</span>iPhoneOS.platform<span style="color: #000000; font-weight: bold;">/</span>Developer<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>gcc-<span style="color: #000000;">4.2</span> <span style="color: #660033;">-arch</span> armv7 <span style="color: #660033;">-mthumb</span> <span style="color: #660033;">-fvisibility</span>=hidden <span style="color: #660033;">-fvisibility-inlines-hidden</span>
   : <span style="color: #000000; font-weight: bold;">&lt;</span>striper<span style="color: #000000; font-weight: bold;">&gt;</span>
   : <span style="color: #000000; font-weight: bold;">&lt;</span>architecture<span style="color: #000000; font-weight: bold;">&gt;</span>arm <span style="color: #000000; font-weight: bold;">&lt;</span>target-os<span style="color: #000000; font-weight: bold;">&gt;</span>iphone <span style="color: #000000; font-weight: bold;">&lt;</span>macosx-version<span style="color: #000000; font-weight: bold;">&gt;</span>iphone-<span style="color: #000000;">3.2</span>
   ;
&nbsp;
using darwin : 4.2.1~iphonesim
   : <span style="color: #000000; font-weight: bold;">/</span>Developer<span style="color: #000000; font-weight: bold;">/</span>Platforms<span style="color: #000000; font-weight: bold;">/</span>iPhoneSimulator.platform<span style="color: #000000; font-weight: bold;">/</span>Developer<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>gcc-<span style="color: #000000;">4.2</span> <span style="color: #660033;">-arch</span> i386 <span style="color: #660033;">-fvisibility</span>=hidden <span style="color: #660033;">-fvisibility-inlines-hidden</span>
   : <span style="color: #000000; font-weight: bold;">&lt;</span>striper<span style="color: #000000; font-weight: bold;">&gt;</span>
   : <span style="color: #000000; font-weight: bold;">&lt;</span>architecture<span style="color: #000000; font-weight: bold;">&gt;</span>x86 <span style="color: #000000; font-weight: bold;">&lt;</span>target-os<span style="color: #000000; font-weight: bold;">&gt;</span>iphone <span style="color: #000000; font-weight: bold;">&lt;</span>macosx-version<span style="color: #000000; font-weight: bold;">&gt;</span>iphonesim-<span style="color: #000000;">3.2</span>
   ;</pre></div></div>

<li>Make sure the file <em>boost_1_42_0/tools/build/v2/tools/darwin.jam</em> has the following information:</li>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">tools<span style="color: #000000; font-weight: bold;">/</span>build<span style="color: #000000; font-weight: bold;">/</span>v2<span style="color: #000000; font-weight: bold;">/</span>tools<span style="color: #000000; font-weight: bold;">/</span>darwin.jam
<span style="color: #666666; font-style: italic;">## The MacOSX versions we can target.</span>
.macosx-versions =
    <span style="color: #000000;">10.6</span> <span style="color: #000000;">10.5</span> <span style="color: #000000;">10.4</span> <span style="color: #000000;">10.3</span> <span style="color: #000000;">10.2</span> <span style="color: #000000;">10.1</span>
    iphone-<span style="color: #000000;">3.2</span> iphonesim-<span style="color: #000000;">3.2</span>
    iphone-3.1.3 iphonesim-3.1.3
    iphone-3.1.2 iphonesim-3.1.2
    iphone-<span style="color: #000000;">3.1</span> iphonesim-<span style="color: #000000;">3.1</span>
    iphone-<span style="color: #000000;">3.0</span> iphonesim-<span style="color: #000000;">3.0</span>
    iphone-2.2.1 iphonesim-2.2.1
    iphone-<span style="color: #000000;">2.2</span> iphonesim-<span style="color: #000000;">2.2</span>
    iphone-<span style="color: #000000;">2.1</span> iphonesim-<span style="color: #000000;">2.1</span>
    iphone-<span style="color: #000000;">2.0</span> iphonesim-<span style="color: #000000;">2.0</span>
    iphone-<span style="color: #000000;">1</span>.x
    ;</pre></div></div>

<li>Change directories to the Boost directory that you downloaded:</li>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>boost_1_42_0</pre></div></div>

<li style="text-align: justify;">Run the following commands to compile the iPhone and iPhone Simulator Boost libraries. I only need filesystem, system, and thread to be use Boost logging for the iPhone, so I don&#8217;t build everything. Run ./bootstrap.sh &#8211;help or ./bjam &#8211;help for more options. I built the binaries to a location in my development folder to include in my project dependencies.</li>
<p><code><br />
</code></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>bootstrap.sh <span style="color: #660033;">--with-libraries</span>=filesystem,system,thread</pre></div></div>

<p><code><br />
</code></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>bjam <span style="color: #660033;">--prefix</span>=<span style="color: #800000;">${HOME}</span><span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>boost<span style="color: #000000; font-weight: bold;">/</span>iphone <span style="color: #007800;">toolset</span>=darwin <span style="color: #007800;">architecture</span>=arm target-os=iphone macosx-version=iphone-<span style="color: #000000;">3.2</span> <span style="color: #007800;">define</span>=_LITTLE_ENDIAN <span style="color: #007800;">link</span>=static <span style="color: #c20cb9; font-weight: bold;">install</span>
.<span style="color: #000000; font-weight: bold;">/</span>bjam <span style="color: #660033;">--prefix</span>=<span style="color: #800000;">${HOME}</span><span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>boost<span style="color: #000000; font-weight: bold;">/</span>iphoneSimulator <span style="color: #007800;">toolset</span>=darwin <span style="color: #007800;">architecture</span>=x86 target-os=iphone macosx-version=iphonesim-<span style="color: #000000;">3.2</span> <span style="color: #007800;">link</span>=static <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<li style="text-align: justify;"><strong>Update: </strong>Create a universal Boost Library using the lipo tool. In this example I&#8217;m assuming the binaries that were created have the following names. The names from the bjam generation will be different, based on your own configuration.<strong>End Update</strong></li>
<p style="text-align: center;"><code><script type="text/javascript"><!--
google_ad_client = "pub-2182421302031373";
/* 468x15, created 11/9/10 */
google_ad_slot = "7180498408";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
</code></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">lipo <span style="color: #660033;">-create</span> libboost_filesystem_iphone.a libboost_filesystem_iphonesimulator.a <span style="color: #660033;">-output</span> libboost_filesystem_iphone_universal.a
&nbsp;
lipo <span style="color: #660033;">-create</span> libboost_system_iphone.a libboost_system_iphonesimulator.a <span style="color: #660033;">-output</span> libboost_system_iphone_universal.a
&nbsp;
lipo <span style="color: #660033;">-create</span> libboost_thread_iphone.a libboost_thread_iphonesimulator.a <span style="color: #660033;">-output</span> libboost_thread_iphone_universal.a</pre></div></div>

<li style="text-align: justify;">I&#8217;m working on a cross-platform project and my directory structure looks like the following structure. I copied the include and lib files for iPhone and iPhone Simulator into the appropriate directories. The dependency structure allows me to checkout the project on another machine and have relative references to Boost and other dependencies.</li>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">   <span style="color: #000000; font-weight: bold;">|</span>-ArtworkEvolution
   <span style="color: #000000; font-weight: bold;">|</span>---Xcode
   <span style="color: #000000; font-weight: bold;">|</span>-----BoostLoggingTest
   <span style="color: #000000; font-weight: bold;">|</span>---dependencies
   <span style="color: #000000; font-weight: bold;">|</span>-----iphone
   <span style="color: #000000; font-weight: bold;">|</span>-------debug
   <span style="color: #000000; font-weight: bold;">|</span>-------release
   <span style="color: #000000; font-weight: bold;">|</span>---------include
   <span style="color: #000000; font-weight: bold;">|</span>-----------boost
   <span style="color: #000000; font-weight: bold;">|</span>---------lib
   <span style="color: #000000; font-weight: bold;">|</span>-----iphone-simulator
   <span style="color: #000000; font-weight: bold;">|</span>-------debug
   <span style="color: #000000; font-weight: bold;">|</span>-------release
   <span style="color: #000000; font-weight: bold;">|</span>---------include
   <span style="color: #000000; font-weight: bold;">|</span>-----------boost
   <span style="color: #000000; font-weight: bold;">|</span>---------lib
   <span style="color: #000000; font-weight: bold;">|</span>-----macosx
   <span style="color: #000000; font-weight: bold;">|</span>-------debug
   <span style="color: #000000; font-weight: bold;">|</span>-------release
   <span style="color: #000000; font-weight: bold;">|</span>---------include
   <span style="color: #000000; font-weight: bold;">|</span>-----------boost
   <span style="color: #000000; font-weight: bold;">|</span>-----------libs
   <span style="color: #000000; font-weight: bold;">|</span>-----win32
   <span style="color: #000000; font-weight: bold;">|</span>---docs
   <span style="color: #000000; font-weight: bold;">|</span>---source
   <span style="color: #000000; font-weight: bold;">|</span>---tests</pre></div></div>

<li style="text-align: justify;">Download the <a href="http://torjo.com/log2/">Boost Logging Library v2</a> and unzip it.</li>
<li style="text-align: justify;">Copy and paste the logging folder into each include/boost folder for iPhone and iPhone Simulator dependency folders like in my directory structure. After you unzip the header files are located in the folder logging/boost/logging.</li>
</ol>
<h4 style="text-align: justify;">Step 2:  Creating the Xcode Project</h4>
<p style="text-align: justify;">With the iPhone and iPhone Simulator Boost libraries in hand we&#8217;re ready to make an Xcode project. Due to the difference in the iPhone and iPhone Simulator libraries we&#8217;ll need to make two targets. One will build linking against the iPhone Boost libraries (arm) and the other against the iPhone Boost Simulator libraries (x86).</p>
<p style="text-align: justify;"><strong>Update:</strong> You don&#8217;t need to create two targets, as we can use the lipo tool to make a universal iPhone/iPhone Simulator library file. The universal library file can be shared between iPhone and iPhone Simulator build configurations. See the instructions for using lipo to create the universal library files in the previous section. However, I will keep the two target instructions up as an alternate approach for Xcode project development, if you choose not to use the lipo tool.</p>
<p style="text-align: justify;"><strong>End Update</strong></p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-2182421302031373";
/* 468x15, created 11/9/10 */
google_ad_slot = "7180498408";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p style="text-align: justify;">1. Create a new iPhone project (view based)</p>
<p style="text-align: justify;">2. There will be two targets: &#8220;BoostLoggingTest Device&#8221; and &#8220;BoostLogging Test Simulator&#8221; each will reference different headers and libraries. Duplicate the starting target and rename each target respectively.</p>
<div id="attachment_566" class="wp-caption aligncenter" style="width: 502px"><a href="http://paulsolt.com/wp-content/uploads/2010/04/Screen-shot-2010-04-06-at-7.43.21-PM.png"><img class="size-full wp-image-566 " title="Screen shot 2010-04-06 at 7.43.21 PM" src="http://paulsolt.com/wp-content/uploads/2010/04/Screen-shot-2010-04-06-at-7.43.21-PM.png" alt="" width="492" height="427" /></a><p class="wp-caption-text">Duplicate target to make iPhone/iPhoneSimulator targets</p></div>
<p style="text-align: justify;">3. Add the libraries that we compiled into two groups: device and simulator under Resources. Right-click on the group &#8220;Simulator&#8221; or &#8220;Device&#8221; and select &#8220;Add Existing Files&#8221;. Search for the library .a files that you copied into the iphone and iphone-simulator directories. These resources should be added relative to the project folder.</p>
<p style="text-align: justify;">4. Drag the appropriate libraries to each Target. We need two targets since the architecture is different on the iPhone device (arm) versus the iPhone Simulator (Intel x86).</p>
<div id="attachment_569" class="wp-caption aligncenter" style="width: 486px"><a href="http://paulsolt.com/wp-content/uploads/2010/04/DragDeviceLibraries.png"><img class="size-full wp-image-569 " title="DragDeviceLibraries" src="http://paulsolt.com/wp-content/uploads/2010/04/DragDeviceLibraries.png" alt="" width="476" height="431" /></a><p class="wp-caption-text">Drag the device libraries to the device target.</p></div>
<div id="attachment_570" class="wp-caption aligncenter" style="width: 486px"><a href="http://paulsolt.com/wp-content/uploads/2010/04/DragSimulatorLibraries.png"><img class="size-full wp-image-570 " title="DragSimulatorLibraries" src="http://paulsolt.com/wp-content/uploads/2010/04/DragSimulatorLibraries.png" alt="" width="476" height="431" /></a><p class="wp-caption-text">Drag simulator dependencies to the iPhone simulator target</p></div>
<p style="text-align: justify;">5. Add the &#8220;Header Search Path&#8221; for each target. For me the relative path will be two directories up from the Xcode project folders:  <em>../../dependencies/iphone/release/include</em> and <em>../../dependencies/iphone-simulator/release/include.</em> Right-click on each Target in the left pane and click on &#8220;Get Info&#8221; -&gt; Build -&gt; Type &#8220;Header&#8221; in the search field -&gt; Edit the list of paths.</p>
<div id="attachment_571" class="wp-caption aligncenter" style="width: 522px"><a href="http://paulsolt.com/wp-content/uploads/2010/04/Device-Header-Path.png"><img class="size-full wp-image-571   " title="Device Header Path" src="http://paulsolt.com/wp-content/uploads/2010/04/Device-Header-Path.png" alt="" width="512" height="471" /></a><p class="wp-caption-text">Add the Device Target Header Search path for the boost libraries</p></div>
<div id="attachment_572" class="wp-caption aligncenter" style="width: 528px"><a href="http://paulsolt.com/wp-content/uploads/2010/04/Simulator-Header-Path.png"><img class="size-full wp-image-572 " title="Simulator Header Path" src="http://paulsolt.com/wp-content/uploads/2010/04/Simulator-Header-Path.png" alt="" width="518" height="471" /></a><p class="wp-caption-text">Add the simulator targets Header Search Paths</p></div>
<p style="text-align: justify;">6. Change the base SDK of each target. For the Device you need to use <em>iPhone Device 3.2</em> and the Simulator Target needs <em>iPhone Simulator 3.2</em> or later.</p>
<div id="attachment_573" class="wp-caption aligncenter" style="width: 441px"><a href="http://paulsolt.com/wp-content/uploads/2010/04/Device-Base-SDK.png"><img class="size-full wp-image-573 " title="Device Base SDK" src="http://paulsolt.com/wp-content/uploads/2010/04/Device-Base-SDK.png" alt="" width="431" height="471" /></a><p class="wp-caption-text">Set the Device Target to iPhone Device 3.2</p></div>
<div id="attachment_574" class="wp-caption aligncenter" style="width: 441px"><a href="http://paulsolt.com/wp-content/uploads/2010/04/Simulator-Base-SDK.png"><img class="size-full wp-image-574 " title="Simulator Base SDK" src="http://paulsolt.com/wp-content/uploads/2010/04/Simulator-Base-SDK.png" alt="" width="431" height="471" /></a><p class="wp-caption-text">Set the Simulator Target to iPhone Simulator 3.2</p></div>
<p style="text-align: justify;">7. Now you have two different targets. One is for the iPhone Device and the other is for the iPhone Simulator. We did this because we built separate binaries for Boost on the iPhone (arm) and simulator (x86) platforms.</p>
<p style="text-align: justify;">8. Set the project&#8217;s <em>Active SDK</em> to use the Base SDK (top left of Xcode). Now it will automatically choose the iPhone Device or iPhone Simulator based on the Base SDK of each Target you select.</p>
<p style="text-align: justify;">
<p style="text-align: justify;">9. Logging on the iPhone requires that we use the full path to the file within the application sandbox. Use the following Objective-C code to get it:</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-2182421302031373";
/* 468x15, created 11/9/10 */
google_ad_slot = "7180498408";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>docsDirectory <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>NSSearchPathForDirectoriesInDomains<span style="color: #002200;">&#40;</span>NSDocumentDirectory, NSUserDomainMask, <span style="color: #a61390;">YES</span><span style="color: #002200;">&#41;</span> objectAtIndex<span style="color: #002200;">:</span><span style="color: #2400d9;">0</span><span style="color: #002200;">&#93;</span>;
<span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>path <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>docsDirectory stringByAppendingPathComponent<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;err.txt&quot;</span><span style="color: #002200;">&#93;</span>;
<span style="color: #a61390;">const</span> <span style="color: #a61390;">char</span> <span style="color: #002200;">*</span>outputFilename <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>path UTF8String<span style="color: #002200;">&#93;</span>;</pre></div></div>

<p style="text-align: justify;">10. I modified one of the Boost Logging samples to use the full file path on the iPhone. Rename the main.m as main.mm to use Objective-C/C++ and copy paste the following:  <span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; line-height: 18px; font-size: 12px; white-space: pre;"><a href="http://paulsolt.com/wp-content/uploads/2010/04/main.txt">main.mm code</a></span></p>
<p style="text-align: justify;">11. If everything compiled and ran on the Device you can get the application data from the Xcode Organizer (Option+Command+O) Navigate to Devices and then look in Applications for the test application. Just drag the &#8220;Application Data&#8221; to your desktop to download it from the device. Your logs should appear in the Documents folder.</p>
<p style="text-align: center;">
<h4 style="text-align: justify;">Part 3: Build Boost for Mac OS X 10.6 &#8211; 4 way fat (32/64 PPC and 32/64 Intel)</h4>
<p style="text-align: justify;">1. Build boost for Mac OS X. <strong>Note</strong>:  If you setup the user-config.jam file for iPhone Boost build, rename or move the file to a different folder than your home directory, otherwise ignore this command.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mv</span> ~<span style="color: #000000; font-weight: bold;">/</span>user-config.jam ~<span style="color: #000000; font-weight: bold;">/</span>user-config.jam.INACTIVE</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>boost_1_42_0
.<span style="color: #000000; font-weight: bold;">/</span>bootstrap.sh <span style="color: #660033;">--with-libraries</span>=filesystem,system,thread
.<span style="color: #000000; font-weight: bold;">/</span>bjam <span style="color: #660033;">--prefix</span>=<span style="color: #800000;">${HOME}</span><span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>boost<span style="color: #000000; font-weight: bold;">/</span>macosx <span style="color: #007800;">toolset</span>=darwin <span style="color: #007800;">architecture</span>=combined address-model=<span style="color: #000000;">32</span>_64 <span style="color: #007800;">link</span>=static <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p style="text-align: justify;">2. Copy the output into your dependency structure and add the Boost Logging Library headers into the include/boost folder. (Same procedure as with iPhone)</p>
<p style="text-align: justify;">3. Setup a Xcode project or target with the appropriate header search path, Boost Mac OSX libraries in the same way we setup the iPhone Xcode project.</p>
<p style="text-align: justify;"><strong>Note: </strong>If you get warnings about hidden symbols and default settings open the Xcode project for and make sure that the &#8220;Inline Methods Hidden&#8221; and &#8220;Symbols Hidden by Default&#8221; are unchecked. Clicking on/off might fix any Xcode warnings.</p>
<p style="text-align: center;"><a href="http://paulsolt.com/wp-content/uploads/2010/04/Hidden-Symbols-Off.png"><img class="aligncenter size-full wp-image-576" title="Hidden Symbols Off" src="http://paulsolt.com/wp-content/uploads/2010/04/Hidden-Symbols-Off.png" alt="" width="431" height="471" /></a></p>
<h5>References:</h5>
<ul>
<li><a href="http://iphone.galloway.me.uk/2009/11/compiling-boost-for-the-iphone/" target="_blank">http://iphone.galloway.me.uk/2009/11/compiling-boost-for-the-iphone/</a></li>
<li><a href="http://brockwoolf.com/blog/compile-and-use-boost-libraries-in-xcode-visual-studio">http://brockwoolf.com/blog/compile-and-use-boost-libraries-in-xcode-visual-studio</a></li>
</ul>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-2182421302031373";
/* Large Post Ad */
google_ad_slot = "4358587115";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://paulsolt.com/2010/04/c-logging-and-building-boost-for-iphoneipad-3-2-and-macosx/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>iPad Revolution</title>
		<link>http://paulsolt.com/2010/02/ipad-revolution/</link>
		<comments>http://paulsolt.com/2010/02/ipad-revolution/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 22:38:41 +0000</pubDate>
		<dc:creator>Paul Solt</dc:creator>
				<category><![CDATA[Opinion]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[entertainment]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[revolution]]></category>

		<guid isPermaLink="false">http://paulsolt.com/?p=420</guid>
		<description><![CDATA[<p>A lot of people have been talking about the iPad. Here are my opinions on the future of iPad, computing, and entertainment.</p> <p><a href="http://paulsolt.com/wp-content/uploads/2010/02/ipad.jpg"></a></p> <p>The iPad is set to revolutionize how we interact with multimedia content and computers. There are a number of reasons that make the hardware and software standout. First and foremost, it [...]]]></description>
			<content:encoded><![CDATA[<p>A lot of people have been talking about the iPad. Here are my opinions on the future of iPad, computing, and entertainment.</p>
<p><a href="http://paulsolt.com/wp-content/uploads/2010/02/ipad.jpg"><img class="aligncenter size-medium wp-image-507" title="ipad" src="http://paulsolt.com/wp-content/uploads/2010/02/ipad-272x300.jpg" alt="" width="272" height="300" /></a></p>
<p><strong>The iPad is set to revolutionize how we interact with multimedia content and computers.</strong> There are a number of reasons that make the hardware and software standout. First and foremost, it is affordable cutting-edge technology. The $499 price point means that it is not out of reach for average consumers who are interested in an updated “all-in-one” computing device. All 9.7 inches of the screen are multi-touch, which will allow software developers to create very interactive applications. Star Trek, Avatar, and other science fiction movie computer interfaces can finally be realized on a large multi-touch screen. The device is connected, which allows the consumer to use it anywhere. Lastly, the device will provide the ultimate responsive user experience.</p>
<h4>Home Entertainment Revolution</h4>
<p>Apple now has the ability to revolutionize the home entertainment market. They are provided a multi-media portal, which will change the way we use our TV’s, computers, and music players. Imagine controlling a TV from the couch without attaching any wires. A user might want to watch “Batman Begins” on their 42” HDTV. A few touches will open iTunes and start the movie. I mentioned the TV, how does that fit into the picture? The movie streams wirelessly in HD from the couch to the 42” TV. Gone are all the cables, remotes, and hassles. Don’t bother with power cable, since the device will play content for 10 hours straight. The entertainment cabinet can be cleaned out. Throw out the VCR, CD player, DVD player, Blue-Ray player, cable TV, satellite TV, and digital antennas because they are not needed. Apple will be the one stop remote control into all media content and it will be seamless to use and control.</p>
<h4>Affordable Technology</h4>
<p>A few years back, in 2007, Amazon set out to take over the digital books arena. They did a pretty good job at providing access to books, but that is about all they did. The Kindle DX costs $489 and is just a digital book reader. It has limited processing power and storage space. The main attraction is the e-ink technology that is supposed to be easier to read. Overall, the device is nice, but is very limited in the target audience and lacks multi-media capabilities like an iPhone.<br />
Apple worked hard to set the price point of the iPad as close as possible to the Kindle, because they are directly competing with Kindle’s e-book market. For $10 more one can get a fully color display that can play videos, music, games, display e-books, and run applications. Apple did a wonderful job in selecting a set of features that could be combined for a relatively low price point. The device is slightly more expensive than other eBook readers and net books, but not overly expensive.</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-2182421302031373";
/* Large Post Ad */
google_ad_slot = "4358587115";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<h4>Large Multi-Touch Screen</h4>
<p>For the longest time computers were something that required skill to use. However, this learning steep learning curve is almost no longer the case with the iPhone, iPod Touch, and iPad. The iPhone revolution brought capacitive multi-touch screens to the public. In English this means that a user just touches, not “presses,” the screen to perform actions. iPad is riding on that revolution wake and it is taking it step further by increasing the size of the screen. This technology is not foreign; it is mainstream and it is here to stay because it works. If a user knows how to use an iPhone or a laptop track pad then the transition is smooth. The touch screen is key, because it allows people to interact with a device just like they might interact with a microwave or a washing machine. A user physically touches, taps, and slides controls around that directly mirror the physical world. The iPad is a natural user interface and it is what most people what, but do not know how to ask for.</p>
<h4>Software is Key</h4>
<p>The main attraction with any working piece of hardware is software. People want to use a piece of hardware that is customizable. At any given point the device can assume different roles, because it was built to be extensible. In one instant it is an email program, movie player, music player, and then an entire college library. Apple has created a platform that provides many inputs and outputs that software developers can hook into to provide new and novel user experiences. The software development kit (SDK) has given developers direct access to technology that was locked down or too expensive to use. Developers can use a digital compass, accelerometer, multi-touch screen, microphone, and motion sensors to interact with a user in astonishing ways.</p>
<h4>Connected</h4>
<p>The iPhone provided the all-in-one experience because it can double as a music player, movie player, email program, Internet browser, and eBook reader. It was small, but it had the ability to execute each of those tasks. It has those abilities because of the Wi-Fi and 3G data connections. These connections make it possible to see content beyond the walls of a single hard drive. It provides a much richer experience to user. The iPad takes these same tasks and now makes it better by providing a bigger experience. Users can use these connections in a larger form factor and can be more productive. For most users a simple Wi-Fi connection will be all they need from the couch in the living room. Some users might be active and on the go, so they will need a 3G wireless connection. Apple has realized this connection issues and separated both technologies to reach different consumers needs. Users can get the Wi-Fi by itself, or combine Wi-Fi and 3G if they need to always have a connection the the internet.</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-2182421302031373";
/* 468x15, created 11/9/10 */
google_ad_slot = "7180498408";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<h4>User Experience</h4>
<p>Users want fast responsive devices, not sluggish devices. A lot of users complain that they cannot run multiple applications (multi-tasking) on the iPhone, but what they do not realize is what they have to give up for multiple applications. Running anything in parallel on a mobile device means that it is dividing computing resources and power among applications that are invisible in the background. These resource hogs will slow a device down and drain a battery.</p>
<p><strong>Traditional multi-tasking is not what users want.</strong> Apple supports multi-tasking, but only to first party applications. In restricting access, Apple has complete control of the user experience. Third-party multi-tasking is not supported for a few reasons.</p>
<ul>
<li>Window’s Task Manager is a power user feature that is unnecessarily complicated. On a Windows Mobile 6.x device, task manager is a terrible experience. For example, pressing the ‘X’ on an application is not guaranteed to close the application. The button may only minimize the application, in which case it is still using computing resources and draining the battery. The ability to manage open applications is a power user feature on a mobile device and should be hidden from a typical user.</li>
<li>What is the difference between running an application in the background and running an application one at a time if the transition from one application to the next is fast and seamless? Does the experience have to differ solely from a technicality? iPhone applications can save state from the last thing they were doing when they are closed. For example, if a user is composing an email about a trip on an iPad. They need weather information and decide to check the weather with the following steps.
<ol>
<li>Press the home button.</li>
<li>Touch the weather application.</li>
<li>Press the home button.</li>
<li>Touch the email application.</li>
<li>Resume composing the email with the updated weather knowledge.</li>
</ol>
</li>
<li>Running applications in the background allows companies to directly compete with Apples multimedia business. iTunes is one of the few applications like Mail and Messages that run in the background. A user can play music through iTunes while using different applications. If a user could use Pandora for music in the background, then they would have a smaller reason to stay on the iTunes platform. I do not see Apple changing this policy, since it is not in their best interest.</li>
</ul>
<h4>Conclusion</h4>
<p>The iPad will simplify the experience to download new movies, games, music, books, and utility applications. There is no doubt in my mind that Apple will continue to innovate on this new iPad platform to further simplify and connect the multimedia experience in every persons home. The iPad is magic and just works.</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-2182421302031373";
/* Large Post Ad */
google_ad_slot = "4358587115";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://paulsolt.com/2010/02/ipad-revolution/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

