<?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>Makes No Sense At All &#187; iPhone SDK</title>
	<atom:link href="http://www.katoemba.net/makesnosenseatall/tag/iphone-sdk/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.katoemba.net/makesnosenseatall</link>
	<description>Interesting things to share around software development, music and what else comes to mind</description>
	<lastBuildDate>Sat, 21 Jan 2012 09:09:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>iPad: popup view out of another view</title>
		<link>http://www.katoemba.net/makesnosenseatall/2010/05/17/ipad-popup-view-out-of-another-view/</link>
		<comments>http://www.katoemba.net/makesnosenseatall/2010/05/17/ipad-popup-view-out-of-another-view/#comments</comments>
		<pubDate>Mon, 17 May 2010 19:59:13 +0000</pubDate>
		<dc:creator>Berrie</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[CoreAnimation]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone SDK]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.katoemba.net/makesnosenseatall/2010/05/17/ipad-popup-view-out-of-another-view/</guid>
		<description><![CDATA[For one of my projects on the iPad I wanted to popup a detail window out of an existing image view, using some animation while popping up. CoreAnimation was the way to go, but I was facing difficulties to:
a) find out how to do it and
b) get it working.
The animation should combine movement (from the [...]]]></description>
			<content:encoded><![CDATA[<p>For one of my projects on the iPad I wanted to popup a detail window out of an existing image view, using some animation while popping up. CoreAnimation was the way to go, but I was facing difficulties to:</p>
<p>a) find out how to do it and<br />
b) get it working.</p>
<p>The animation should combine movement (from the location of the clicked image to the location where the popup is shown), scaling (from the image size to the popup size) and rotation (for a nice effect). Google searches delivered bits and pieces, the best sample I found was <a href="http://boondoggle.atomicwang.org/lemurflip/" target="_top">MFFlip</a> from Mike Lee. This didn&#8217;t include scaling and movement like I wanted it, so I added this and then packed it up nicely into a single class ViewFlipper with a single factory method that takes 2 views as parameters and does all the calculations and animation. The ViewFlipper class can be included without further dependencies into any project, except that you need to include the QuartzCore framework.</p>
<p>I&#8217;ve created a little sample iPad program around it that you can download <a href="http://www.katoemba.net/download/CoreAnimation.zip" target="_top">here</a>. I&#8217;ve put some documentation in the code that describes the what goes on inside. I hope this is useful for others who are struggling with this too.</p>
<p>Note: initially I kept having trouble with all of the examples I found, it turned out this was caused by the fact that I had one view with 3 subviews: a UITableView covering the entire view, the imageView and popupView (which were shown above the UITableView). I managed to solve this by moving the imageView and popupView onto a view of its own. I gave this extra view a transparent background, so that the underlying UITableView was still visible. This extra view also has the advantage that you can catch touch events on it which you can use to popdown the popup.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.katoemba.net/makesnosenseatall/2010/05/17/ipad-popup-view-out-of-another-view/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Signing Amazon Webservices requests</title>
		<link>http://www.katoemba.net/makesnosenseatall/2009/07/11/signing-amazon-webservices-requests/</link>
		<comments>http://www.katoemba.net/makesnosenseatall/2009/07/11/signing-amazon-webservices-requests/#comments</comments>
		<pubDate>Sat, 11 Jul 2009 14:16:45 +0000</pubDate>
		<dc:creator>Berrie</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Amazon Webservices]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPhone SDK]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.katoemba.net/makesnosenseatall/2009/07/11/signing-amazon-webservices-requests/</guid>
		<description><![CDATA[MPoD is retrieving cover art for the currently playing song from Amazon the AWS (Amazon Web Services). From August 15 onwards, all requests made will have to be signed using a secret key that is attached to the registered AWSAccessKeyId. Searching on Google, I found various helpful bits, especially on the learn amazon web services [...]]]></description>
			<content:encoded><![CDATA[<p>MPoD is retrieving cover art for the currently playing song from Amazon the AWS (Amazon Web Services). From August 15 onwards, all requests made will have to be signed using a secret key that is attached to the registered AWSAccessKeyId. Searching on Google, I found various helpful bits, especially on the <a href="http://learnaws.com/archives/category/blog" target="_blank">learn amazon web services</a> blog. But I didn&#8217;t find a ready made implementation that I could use directly from my code.</p>
<p>Based on what I found I created a helper class AWSRequestSigner, that takes a dictionary of parameters to pass to the webservice, and returns a ready made NSURL object that can be used in an NSURLRequest object as in the following example:</p>
<pre>
<code>
NSURL *url = [AWSRequestSigner urlForParameterDict:[NSDictionary dictionaryWithObjectsAndKeys:
                                               @"Sea Of Tears",        @"Title",
                                               @"Eilen Jewell",        @"Artist",
                                               @"ItemSearch",          @"Operation",
                                               @"Images",              @"ResponseGroup",
                                               @"Music",               @"SearchIndex",
                                               @"AWSECommerceService", @"Service",
                                               nil]];
</code>
</pre>
<p>To look at the source code for the AWSRequestSigner class, download it <a href="http://www.katoemba.net/makesnosenseatall/wp-content/uploads/2009/07/AWSRequestSigner.zip" title="AWSRequestSigner.zip">here</a> and open it in XCode.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.katoemba.net/makesnosenseatall/2009/07/11/signing-amazon-webservices-requests/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AppStore and Adhoc distribution profiles &#8211; Howto</title>
		<link>http://www.katoemba.net/makesnosenseatall/2008/11/15/appstore-and-adhoc-distribution-profiles-howto/</link>
		<comments>http://www.katoemba.net/makesnosenseatall/2008/11/15/appstore-and-adhoc-distribution-profiles-howto/#comments</comments>
		<pubDate>Sat, 15 Nov 2008 21:53:55 +0000</pubDate>
		<dc:creator>Berrie</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPhone SDK]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.katoemba.net/makesnosenseatall/2008/11/15/appstore-and-adhoc-distribution-profiles-howto/</guid>
		<description><![CDATA[Many developers have been facing issues with building iphone applications using distribution profiles (AdHoc and AppStore). Often the correct distribution profiles don&#8217;t appear in the build settings in XCode.
I have been struggling with this for quite some time as well, but as of late I seem to have found a method of working that always [...]]]></description>
			<content:encoded><![CDATA[<p>Many developers have been facing issues with building iphone applications using distribution profiles (AdHoc and AppStore). Often the correct distribution profiles don&#8217;t appear in the build settings in XCode.</p>
<p>I have been struggling with this for quite some time as well, but as of late I seem to have found a method of working that always does the trick. What it comes down to, is that when you want to change the build settings, as well as when you want to build a distribution version, you need to make sure that a device (iPhone, iPod Touch) is connected to your Mac. If you don&#8217;t connect it, there&#8217;s a good chance that the build profiles don&#8217;t show up in the build settings. Connecting the device and restarting XCode usually fixes this.</p>
<p>The practice I&#8217;m using currently, is that whenever I want to build for testing in the iPhone simulator I make sure no device is connected, and when a build is destined for a device I make sure that a device is actually connected. I make it a habit to connect or disconnect the device (depending on the build target), and restart XCode. This is a bit of a hassle, but at least it gives me predictable results.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.katoemba.net/makesnosenseatall/2008/11/15/appstore-and-adhoc-distribution-profiles-howto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Application integration using the iPhone SDK</title>
		<link>http://www.katoemba.net/makesnosenseatall/2008/11/09/application-integration-using-the-iphone-sdk/</link>
		<comments>http://www.katoemba.net/makesnosenseatall/2008/11/09/application-integration-using-the-iphone-sdk/#comments</comments>
		<pubDate>Sun, 09 Nov 2008 08:30:40 +0000</pubDate>
		<dc:creator>Berrie</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPhone SDK]]></category>

		<guid isPermaLink="false">http://www.katoemba.net/makesnosenseatall/2008/11/09/application-integration-using-the-iphone-sdk/</guid>
		<description><![CDATA[Recently the successful iPhone applications Trein and iNap realized a tight integration, in that you can activate iNap directly from Trein. How to create the integration on the side of the &#8216;receiving&#8217; application, iNap in this case, is described in the iPhone SDK example &#8216;Launch Me&#8217;.
When integrating applications, you typically want to pass data from [...]]]></description>
			<content:encoded><![CDATA[<p>Recently the successful iPhone applications Trein and <a href="http://www.moop.me/inap.php" target="_blank">iNap</a> realized a tight integration, in that you can activate iNap directly from Trein. How to create the integration on the side of the &#8216;receiving&#8217; application, iNap in this case, is described in the iPhone SDK example &#8216;Launch Me&#8217;.<br/><br />
When integrating applications, you typically want to pass data from one to the other, in this post I&#8217;ll describe how the incoming parameters can easily be extracted in the receiving application.<br/><br />
The receiving application will register itself in the OS (for details see the &#8216;Launch Me&#8217; example), and the result is that it can be activated from another application or from a hyperlink in a webpage. An example of a url that activates another application is:<br/></p>
<pre>
<code>
myapp://myapp?latitude=51.3&#038;longitude=5.2&#038;title=middle of nowhere
</code>
</pre>
<p>In the receiving application the method <code>- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url</code> will be called on the application delegate object, and in this method you need to extract the parameters from the URL. The following code shows how to do that with minimal code. Like Apple&#8217;s example, it does a lot of checking to prevent undesired usage, in this case the url parameters must meet the exact specifications (i.e. no missing parameters, no extra parameters) otherwise the request will be ignored.</p>
<pre>
<code>
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url
{
  // You should be extremely careful when handling URL requests.
  // You must take steps to validate the URL before handling it.
  // If any of the validations fails, bail out returning NO.
  if (!url) {
    // The URL is nil. There's nothing more to do.
    return NO;
  }

  // Split the url into two sections, one section with the base url and one with the parameters.
  NSArray *urlSections = [[url absoluteString] componentsSeparatedByCharactersInSet:
              [NSCharacterSet characterSetWithCharactersInString:@"?"]];

  // Check that you actually got a base section and a parameter section.
  if ([urlSections count] != 2) {
    return NO;
  }

  // Check that the base part of the url is what you expect it to be.
  if (![[urlSections objectAtIndex:0] isEqualToString:@"myapp://myapp"]) {
    return NO;
  }

  // Split up the parameter section into a parameter Array.
  NSArray *parameterArray = [[urlSections objectAtIndex:1] componentsSeparatedByCharactersInSet:
              [NSCharacterSet characterSetWithCharactersInString:@"&#038;="]];
  NSEnumerator *parameterEnum = [parameterArray objectEnumerator];
  NSString *parameter, *value;
  // The parameters values that we are expecting.
  NSString *latitude = nil, *longitude = nil, *title = nil;

  // Run through the array of parameters.
  while (parameter = [parameterEnum nextObject]) {
    // Get the value that goes with this parameter, and if it is missing break.
    if ((value = [parameterEnum nextObject]) == nil)
      break;

    // Check the parameter value against the parameters that you support/expect,
    // and assign the matching value to the right variable.
    if ([parameter isEqualToString:@"latitude"])
      latitude = value;
    else if ([parameter isEqualToString:@"longitude"])
      longitude = value;
    else if ([parameter isEqualToString:@"title"])
      title = [value stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
    else {
      // An unexpected parameter was passed, bail out.
      latitude = nil;
      longitude = nil;
      title = nil;
      break;
    }
  }

  // Check if we got all parameters (in this case all are mandatory), if not bail out.
  if (latitude == nil || longitude == nil || title == nil) {
    return NO;
  }

  // Use the parameters to do your thing.
  CLLocation *location = [[[CLLocation alloc]
                               initWithLatitude:[latitude doubleValue]
                               longitude:[longitude doubleValue]] autorelease];
  [someObject activateDestination:title location:location];

  return YES;
}
</code>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.katoemba.net/makesnosenseatall/2008/11/09/application-integration-using-the-iphone-sdk/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>MPoD update &#8211; first screenshots</title>
		<link>http://www.katoemba.net/makesnosenseatall/2008/07/01/mpod-update-first-screenshots/</link>
		<comments>http://www.katoemba.net/makesnosenseatall/2008/07/01/mpod-update-first-screenshots/#comments</comments>
		<pubDate>Tue, 01 Jul 2008 20:53:43 +0000</pubDate>
		<dc:creator>Berrie</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPhone SDK]]></category>
		<category><![CDATA[MPD]]></category>

		<guid isPermaLink="false">http://www.katoemba.net/makesnosenseatall/index.php/2008/07/01/mpod-update-first-screenshots/</guid>
		<description><![CDATA[
MPoD, the iPhone/iPod Touch client for the MPD music player, is coming along well. Check out the first screenshots on the product page.
]]></description>
			<content:encoded><![CDATA[<p>
MPoD, the iPhone/iPod Touch client for the MPD music player, is coming along well. Check out the first screenshots on the <a href="http://www.katoemba.net/makesnosenseatall/index.php/mpod/">product page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.katoemba.net/makesnosenseatall/2008/07/01/mpod-update-first-screenshots/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The iPhone SDK &#8211; why are people left out?</title>
		<link>http://www.katoemba.net/makesnosenseatall/2008/03/12/the-iphone-sdk-why-are-people-left-out/</link>
		<comments>http://www.katoemba.net/makesnosenseatall/2008/03/12/the-iphone-sdk-why-are-people-left-out/#comments</comments>
		<pubDate>Wed, 12 Mar 2008 19:43:48 +0000</pubDate>
		<dc:creator>Berrie</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPhone SDK]]></category>
		<category><![CDATA[MPD]]></category>

		<guid isPermaLink="false">http://www.katoemba.net/makesnosenseatall/index.php/2008/03/12/the-iphone-sdk-why-are-people-left-out/</guid>
		<description><![CDATA[Last week Apple finally made the iPhone SDK available. Great, now I can turn my iPod Touch into a remote for the MPD music server that I&#8217;m running on my central Ubuntu server.
But hold on&#8230; I can&#8217;t install the SDK on my G4 Powerbook. What a bummer. In the meantime there are listings on the [...]]]></description>
			<content:encoded><![CDATA[<p>Last week Apple finally made the <a href="http://developer.apple.com/iphone/" target="_blank">iPhone SDK</a> available. Great, now I can turn my iPod Touch into a remote for the <a href="http://www.musicpd.org/" target="_blank">MPD</a> music server that I&#8217;m running on my central <a href="http://www.ubuntu.com/" target="_blank">Ubuntu</a> server.<br/><br />
But hold on&#8230; I can&#8217;t install the SDK on my G4 Powerbook. What a bummer. In the meantime there are listings on the Internet on how you can use Pacifist to <a href="http://www.iphoneatlas.com/2008/03/10/surprise-iphone-sdk-also-works-on-powerpc-macs/" target="_blank">install the SDK on a PowerPC system</a>. I tried that today, but it dropped everything in my root rather then creating a Developer folder, making it quite a mess. It also dropped stuff in my /usr and /Library folders, ouch. After cleaning up the mess I took a different route: I installed the SDK on my wifes iBook, then copied the entire Development folder over to my PowerPC. This works fine, and after downloading <a href="http://www.musicpd.org/libmpdclient.shtml" target="_blank">lipmpdclient</a>, I had the list of artists on my server showing up in the Aspen emulator in less then 10 minutes.<br/><br />
So I can develop happily from here onwards, as long as I don&#8217;t want to actually install anything on my iPod Touch. To get onto the device you need to apply for the iPhone Developer Program. But initially it&#8217;s only open to developers from the US. What sort of policy is that? Does Apple see 1st class world-citizens and 2nd class world-citizens? I don&#8217;t care so much that I can&#8217;t distribute this software to others right now, but I&#8217;m not even able to put it on my own Touch. Don&#8217;t I have the right to mess with that thing? Weird.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.katoemba.net/makesnosenseatall/2008/03/12/the-iphone-sdk-why-are-people-left-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

