<?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>Juggleware Developers&#039; Blog &#187; iPhone Development</title>
	<atom:link href="http://www.juggleware.com/blog/tag/iphone-dev/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.juggleware.com/blog</link>
	<description>news and random thoughts from your friendly neighborhood independent developers at juggleware, llc</description>
	<lastBuildDate>Thu, 15 Jul 2010 20:43:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How to get the Return key to dismiss a UITextView</title>
		<link>http://www.juggleware.com/blog/2010/07/how-to-get-the-return-key-to-dismiss-a-uitextview/</link>
		<comments>http://www.juggleware.com/blog/2010/07/how-to-get-the-return-key-to-dismiss-a-uitextview/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 20:05:07 +0000</pubDate>
		<dc:creator>alec</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[iPhone Development]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[UITextView]]></category>

		<guid isPermaLink="false">http://www.juggleware.com/blog/?p=280</guid>
		<description><![CDATA[Need to dismiss they keyboard in a UITextView? Changing the Return key to read &#8220;Done&#8221; doesn&#8217;t make the iPhone keyboard to go away.  Put this code in the delegate for your UITextView and your return key can behave more like &#8230; <a href="http://www.juggleware.com/blog/2010/07/how-to-get-the-return-key-to-dismiss-a-uitextview/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Need to dismiss they keyboard in a UITextView? Changing the Return key to read &#8220;Done&#8221; doesn&#8217;t make the iPhone keyboard to go away.  Put this code in the delegate for your UITextView and your return key can behave more like the Done button in the keyboard for a UITextField.</p>
<textarea cols="40" rows="10" name="code" class="Cpp">#pragma mark -
#pragma mark UITextViewDelegate methods

- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range 
 replacementText:(NSString *)text{
	if (range.length==0) {
		if ([text isEqualToString:@"\n"]) {
			[textView resignFirstResponder];
			return NO;
		}
	}
	
 return YES;
			 
}</textarea>
	<!-- Wordpress Code Snippet -->
	<script type="text/javascript" src="http://www.juggleware.com/blog/wp-content/plugins/wordpress-code-snippet/js/shCore.js"></script><script type="text/javascript" src="http://www.juggleware.com/blog/wp-content/plugins/wordpress-code-snippet/js/shBrushCpp.js"></script>
	<link type="text/css" rel="stylesheet" href="http://www.juggleware.com/blog/wp-content/plugins/wordpress-code-snippet/css/SyntaxHighlighter.css"/>
	
	<script language="javascript">
	dp.SyntaxHighlighter.ClipboardSwf = 'http://www.juggleware.com/blog/wp-content/plugins/wordpress-code-snippet/js/clipboard.swf';
	dp.SyntaxHighlighter.HighlightAll('code');
	</script>
	<!-- End Wordpress Code Snippet -->
	]]></content:encoded>
			<wfw:commentRss>http://www.juggleware.com/blog/2010/07/how-to-get-the-return-key-to-dismiss-a-uitextview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Radio BPR v2 update submitted to app store</title>
		<link>http://www.juggleware.com/blog/2010/07/radio-bpr-v2-submitted/</link>
		<comments>http://www.juggleware.com/blog/2010/07/radio-bpr-v2-submitted/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 16:25:19 +0000</pubDate>
		<dc:creator>alec</dc:creator>
				<category><![CDATA[Radio BPR]]></category>
		<category><![CDATA[App Store]]></category>
		<category><![CDATA[iOS4]]></category>
		<category><![CDATA[iPhone Apps]]></category>
		<category><![CDATA[iPhone Development]]></category>

		<guid isPermaLink="false">http://www.juggleware.com/blog/?p=269</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[
<a href='http://www.juggleware.com/blog/2010/07/radio-bpr-v2-submitted/streaming-radio-player/' title='Streaming Radio Player'><img width="150" height="150" src="http://www.juggleware.com/blog/wp-content/uploads/2010/07/Streaming-Radio-Player-150x150.png" class="attachment-thumbnail" alt="Streaming Radio Player" title="Streaming Radio Player" /></a>
<a href='http://www.juggleware.com/blog/2010/07/radio-bpr-v2-submitted/artist-roster/' title='Artist Roster'><img width="150" height="150" src="http://www.juggleware.com/blog/wp-content/uploads/2010/07/Artist-Roster-150x150.png" class="attachment-thumbnail" alt="Artist Roster" title="Artist Roster" /></a>
<a href='http://www.juggleware.com/blog/2010/07/radio-bpr-v2-submitted/photo/' title='Artist Bio/Photo'><img width="150" height="150" src="http://www.juggleware.com/blog/wp-content/uploads/2010/07/Photo-150x150.png" class="attachment-thumbnail" alt="Artist Bio/Photo" title="Artist Bio/Photo" /></a>
<a href='http://www.juggleware.com/blog/2010/07/radio-bpr-v2-submitted/newsfeed/' title='Newsfeed'><img width="150" height="150" src="http://www.juggleware.com/blog/wp-content/uploads/2010/07/Newsfeed-150x150.png" class="attachment-thumbnail" alt="Newsfeed" title="Newsfeed" /></a>
<a href='http://www.juggleware.com/blog/2010/07/radio-bpr-v2-submitted/news-article/' title='News Article'><img width="150" height="150" src="http://www.juggleware.com/blog/wp-content/uploads/2010/07/News-Article-150x150.png" class="attachment-thumbnail" alt="News Article" title="News Article" /></a>
<a href='http://www.juggleware.com/blog/2010/07/radio-bpr-v2-submitted/credits/' title='Credits'><img width="150" height="150" src="http://www.juggleware.com/blog/wp-content/uploads/2010/07/Credits-150x150.png" class="attachment-thumbnail" alt="Credits" title="Credits" /></a>

]]></content:encoded>
			<wfw:commentRss>http://www.juggleware.com/blog/2010/07/radio-bpr-v2-submitted/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>plist &gt; JSON &gt; XML</title>
		<link>http://www.juggleware.com/blog/2010/07/plist-json-xml/</link>
		<comments>http://www.juggleware.com/blog/2010/07/plist-json-xml/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 16:14:48 +0000</pubDate>
		<dc:creator>alec</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[iPhone Development]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[mySQL]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.juggleware.com/blog/?p=266</guid>
		<description><![CDATA[Having developed 4 or 5 iPhone apps now that download remote XML data from servers and populate tables view and other content, I can tell you without reservation that it is the slowest way to go. Performance using JSON is &#8230; <a href="http://www.juggleware.com/blog/2010/07/plist-json-xml/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Having developed 4 or 5 iPhone apps now that download remote XML data from servers and populate tables view and other content, I can tell you without reservation that it is the slowest way to go.</p>
<p>Performance using JSON is quite a bit better, but if you can get access to the server to write a Property List (.plist) file instead of (or alongside) the XML you will be much happier with the ease-of-coding and, more importantly, the speed in which the data loads into your app.</p>
<p>If you use mySQL/PHP for your backend, pretty much everything you need to know is explained in this excellent blog post by Aaron Dunnington:</p>
<p><a href="http://www.dunnington.net/entry/data-driven-iphone-apps-with-property-lists-and-php">Data-driven iPhone Apps with Property Lists and PHP</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.juggleware.com/blog/2010/07/plist-json-xml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Place a UIWebView inside a UIScrollView</title>
		<link>http://www.juggleware.com/blog/2010/07/how-to-place-a-uiwebview-inside-a-uiscrollview/</link>
		<comments>http://www.juggleware.com/blog/2010/07/how-to-place-a-uiwebview-inside-a-uiscrollview/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 16:53:36 +0000</pubDate>
		<dc:creator>alec</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[iPhone Development]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[UIScrollView]]></category>
		<category><![CDATA[UIWebView]]></category>

		<guid isPermaLink="false">http://www.juggleware.com/blog/?p=247</guid>
		<description><![CDATA[To display several pieces of content on a screen, I needed several views. A scroll view (UIScrollView) was necessary to encompass the headline, photo and story text; I had the headline and photo at the top in a fixed area, &#8230; <a href="http://www.juggleware.com/blog/2010/07/how-to-place-a-uiwebview-inside-a-uiscrollview/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>To display several pieces of content on a screen, I needed several views. A scroll view (<code>UIScrollView</code>) was necessary to encompass the headline, photo and story text; I had the headline and photo at the top in a fixed area, but the content was of variable size as the story length changed.</p>
<p>Originally I had a text view (<code>UITextView</code>) to hold the story, but I wanted to do rich-text formatting, and since my database already used HTML to do italic and bold markup, a web view (<code>UIWebView</code>) was the obvious fit.</p>
<p>However, there are some caveats to using web views, most importantly to do with getting the size of the view after you&#8217;ve set the content. First, you must make sure the content has completed loading before you retrieve the size; you can do this in the delegate handler<code>webViewDidFinishLoading:</code></p>
<p>Secondly, web views don&#8217;t respond correctly to <code>sizeToFit:</code> so you must do some more manual labor using a Javascript call to find the size of the web view after you&#8217;ve inserted the content. Some comments on other web sites mentioned that you can try  <code>[webView sizeThatFits:CGSizeZero]</code> but this did not work for me. </p>
<p>Here&#8217;s the pertinent code from my current project. Also please note that I have a <code>&lt;div id="body"&gt;</code> surrounding my HTML content that I pass into the view. The javascript call uses this to grab the height of the web view after it loads. You&#8217;ll also notice that this calculation sometimes falls a little short so I add 12 points to it. </p>
<p>The code below creates a UIButton beneath the text copy, so I added 70 pixels to the contentSize of the enclosing scroll view. It works perfectly for me; hopefully it helps someone else, too.</p>
<p>If there&#8217;s a more kosher way to do it, I&#8217;d love to hear it. I had considered putting everything (including the headline and photo) inside the UIWebView, but then I would not have been able to have a UIButton beneath/outside it off screen; nor, more importantly would I be able to use my custom NetImageViewer class on the photo. (More on that later.)</p>
<textarea cols="40" rows="10" name="code" class="Cpp">#pragma mark -
#pragma mark UIWebViewDelegate methods 
-(void)webViewDidFinishLoad:(UIWebView *)webView{
	if (webView!=bioWebView)return;

	float h;
	
	NSLog(@"web view is %f high", bioWebView.frame.size.height);
	NSString *heightString = [bioWebView stringByEvaluatingJavaScriptFromString:@"document.getElementById(\"body\").offsetHeight;"];
	NSLog(@"web content is %@ high",heightString);
	
	h = [heightString floatValue] +12.0f; // convert from string to float plus some extra points because calculation is sometimes one line short
	
	bioWebView.frame = CGRectMake(bioWebView.frame.origin.x, bioWebView.frame.origin.y, bioWebView.frame.size.width, h);
	
	// get bottom of text field
	h = bioWebView.frame.origin.y + h + 70; // extra 70 pixels for UIButton at bottom and padding.
	[scrollView setContentSize:CGSizeMake(320, h)];
	
	/* 

        position button code here.... 

        */

}
</textarea>
	<!-- Wordpress Code Snippet -->
	<script type="text/javascript" src="http://www.juggleware.com/blog/wp-content/plugins/wordpress-code-snippet/js/shCore.js"></script><script type="text/javascript" src="http://www.juggleware.com/blog/wp-content/plugins/wordpress-code-snippet/js/shBrushCpp.js"></script>
	<link type="text/css" rel="stylesheet" href="http://www.juggleware.com/blog/wp-content/plugins/wordpress-code-snippet/css/SyntaxHighlighter.css"/>
	
	<script language="javascript">
	dp.SyntaxHighlighter.ClipboardSwf = 'http://www.juggleware.com/blog/wp-content/plugins/wordpress-code-snippet/js/clipboard.swf';
	dp.SyntaxHighlighter.HighlightAll('code');
	</script>
	<!-- End Wordpress Code Snippet -->
	]]></content:encoded>
			<wfw:commentRss>http://www.juggleware.com/blog/2010/07/how-to-place-a-uiwebview-inside-a-uiscrollview/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Xcode installation woes.</title>
		<link>http://www.juggleware.com/blog/2010/07/xcode-installation-woes/</link>
		<comments>http://www.juggleware.com/blog/2010/07/xcode-installation-woes/#comments</comments>
		<pubDate>Sat, 03 Jul 2010 18:04:32 +0000</pubDate>
		<dc:creator>alec</dc:creator>
				<category><![CDATA[iPhone Development]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[iOS4]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://www.juggleware.com/blog/?p=245</guid>
		<description><![CDATA[iPhone developers: if you install Xcode 3.2.3 to start developing iOS4 apps you may be surprised to find that all prior SDKs and Simulators before 4.0 for iPhone (and 3.2 for iPad) get removed. Trying to build using an older &#8230; <a href="http://www.juggleware.com/blog/2010/07/xcode-installation-woes/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>iPhone developers: if you install Xcode 3.2.3 to start developing iOS4 apps you may be surprised to find that all prior SDKs and Simulators before 4.0 for iPhone (and 3.2 for iPad) get removed. Trying to build using an older SDK will leave you with a &#8220;Base SDK missing&#8221; warning.</p>
<p>I wrote a huge blog post last week about how to successfully integrate the old SDKs into the latest Xcode (version 3.2.3), since I wasted a whole trying to get it to work, I thought I would share.</p>
<p>Unfortunately, it still wasn&#8217;t working after all that work, so my recommendation to you, should you want to hang on to the older SDKs (for the time being) is to install the new XCode in a new folder outside of /Developer. The dialog in the installer for picking the install location is a little different from what might you might be used to seeing, so proceed carefully.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.juggleware.com/blog/2010/07/xcode-installation-woes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Juggleware at WWDC</title>
		<link>http://www.juggleware.com/blog/2010/06/juggleware-at-wwdc/</link>
		<comments>http://www.juggleware.com/blog/2010/06/juggleware-at-wwdc/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 15:40:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Miscellany]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[iPhone Development]]></category>

		<guid isPermaLink="false">http://www.juggleware.com/blog/?p=240</guid>
		<description><![CDATA[WWDC is definitely the top annual event for Apple developers. The event, which took place last week at the Moscone Center in downtown San Francisco was Juggleware&#8217;s first year there, and it was all that it was promised to be. &#8230; <a href="http://www.juggleware.com/blog/2010/06/juggleware-at-wwdc/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://developer.apple.com/wwdc/">WWDC</a> is definitely the top annual event for Apple developers. The event, which took place last week at the Moscone Center in downtown San Francisco was Juggleware&#8217;s first year there, and it was all that it was promised to be.  Thanks to Chris at <a href="http://www.calliopedigital.com/">Calliope Digital</a> for recommending it. It was definitely &#8220;drinking from a firehose&#8221; (in the <a href="http://iphonedevelopment.blogspot.com/2010/04/wwdc-first-time-guide-2010-edition.html">words of Jeff LaMarche</a>). Highly recommended if you&#8217;re a serious Apple developer. Intense, inspiring, and interesting, WWDC isn&#8217;t like your typical convention that&#8217;s all about the sales floor. After Jobs&#8217; keynote Monday morning, it&#8217;s nothing but technical sessions until Friday night&#8217;s beer bash, which was hosted outdoors in a grassy downtown park with hipster geek band OK Go rocking the crowd.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.juggleware.com/blog/2010/06/juggleware-at-wwdc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Streaming Radio app approved</title>
		<link>http://www.juggleware.com/blog/2010/04/streaming-radio-app-approved/</link>
		<comments>http://www.juggleware.com/blog/2010/04/streaming-radio-app-approved/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 18:06:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[App Store]]></category>
		<category><![CDATA[Radio BPR]]></category>
		<category><![CDATA[iPhone Apps]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[iPhone Development]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[radio]]></category>
		<category><![CDATA[rejected]]></category>
		<category><![CDATA[streaming]]></category>

		<guid isPermaLink="false">http://www.juggleware.com/blog/?p=238</guid>
		<description><![CDATA[Fast on the heels of the last post, we are pleased to announce that Apple has approved Juggleware&#8217;s latest app, Radio Backporch Revolution. Initially we received a rejection letter from the App Store review team, saying that the app used &#8230; <a href="http://www.juggleware.com/blog/2010/04/streaming-radio-app-approved/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Fast on the heels of the last post, we are pleased to announce that Apple has approved Juggleware&#8217;s latest app, <a href="http://www.juggleware.com/iphone/radioBPR/">Radio Backporch Revolution</a>.</p>
<p>Initially we received a rejection letter from the App Store review team, saying that the app used bandwidth that was demanding on the cell network that was excessive &#8220;in Apple&#8217;s reasonable judgment.&#8221; With a 128kbps mp3 stream, I found this curious as I have used several streaming radio apps that connect to 128kbps streams, including the <a href="http://blog.wfmu.org/freeform/2009/08/just-released-wfmus-iphone-app.html">excellent WFMU app</a>, but also the much higher profile AOL Radio app.</p>
<p>Some google searching revealed <a href="http://stackoverflow.com/questions/1236788/iphone-app-rejected-for-transferring-excessive-volumes-of-data">this helpful article on StackOverflow</a> wherein the writer related being told verbally by App Store personnel that one megabyte per minute was the maximum allowed. I did some quick math on the calculator and it seemed that my app should be receiving 960KB/minute, so I should be good.  But following the StackOverflow poster&#8217;s advice related from Apple staff, I shut off all other notifications and used the Settings app&gt;General&gt;Usage  to reset the statistics and then track the app for 5 minutes. For some reason the app came in as receiving 5.4MB over 5 minutes, which means I was around 10% over the limit.</p>
<p>I am not sure if other 128kbps streams have this issue, or there&#8217;s mysterious overhead lurking in mine, but I had planned to knock down the quality to 96k anyway as 128k over 3G still has too many dropouts.</p>
<p>I wrote Apple an email back explaining that it was not an app issue but a stream issue, and I could easily knock the stream down a notch. Which I did, and I got an email saying the status of the app had been changed to &#8220;Pending&#8221; again. A couple days later, a very congenial Apple developer relations person called me and confirmed the rumor that the limit was indeed 1MB per minute. I said that I had already compressed the stream further and she said they&#8217;d rerun the metrics.</p>
<p>It was all very well handled, and to my satisfaction&#8230; but the question remains, if the limit for data transfer is a hard number (1MB/min) then why isn&#8217;t that written in the developer agreement? Why do they only communicate the details of the rules verbally after the fact? As with the no satire rule, it would would be nice to know what the specifics are in advance.</p>
<p><em>Backporch Revolution is an artist-run collective and netlabel based in New Orleans that specializes in releasing experimental electronic works by local musicians. The website is <a href="http://www.backporchrevolution.com">backporchrevolution.com</a></em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.juggleware.com/blog/2010/04/streaming-radio-app-approved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apple v. Satire, part 17.</title>
		<link>http://www.juggleware.com/blog/2010/04/apple-v-satire-part-17/</link>
		<comments>http://www.juggleware.com/blog/2010/04/apple-v-satire-part-17/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 15:59:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[App Store]]></category>
		<category><![CDATA[Freedom Time]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[censor]]></category>
		<category><![CDATA[defamatory]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[iPhone Apps]]></category>
		<category><![CDATA[iPhone Development]]></category>
		<category><![CDATA[parody]]></category>
		<category><![CDATA[rejected]]></category>
		<category><![CDATA[satire]]></category>
		<category><![CDATA[steve jobs]]></category>

		<guid isPermaLink="false">http://www.juggleware.com/blog/?p=236</guid>
		<description><![CDATA[Pulitzer-prize winning satirist Mark Fiore had his app rejected by Apple because it &#8220;ridicules public figures.&#8221; Regular readers will remember that Juggleware&#8217;s own app Freedom Time was actually the test case of this unwritten and up-til-then unknown policy, which had &#8230; <a href="http://www.juggleware.com/blog/2010/04/apple-v-satire-part-17/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Pulitzer-prize winning satirist Mark Fiore had his app <a href="http://www.niemanlab.org/2010/04/mark-fiore-can-win-a-pulitzer-prize-but-he-cant-get-his-iphone-cartoon-app-past-apples-satire-police/">rejected by Apple</a> because it &#8220;ridicules public figures.&#8221;</p>
<p>Regular readers will remember that Juggleware&#8217;s own app <a href="http://www.juggleware.com/iphone/freedomtime/">Freedom Time</a> was actually the test case of this unwritten and up-til-then unknown policy, which had not been explicitly defined beyond the word &#8220;defamatory&#8221; briefly appearing.  For a timeline of other apps (there are at least 16 now) that have been banned for this silly charge, see this blog:</p>
<p><a href="http://www.cloudfour.com/apples-policy-on-satire-16-rejected-apps/">Apple’s Policy on Satire: 16 Apps Rejected for “Ridiculing Public Figures”</a> [Cloud Four]</p>
<p>If there was an app rejected before September 2008 for political satire, we&#8217;d like to hear about it; please post in the comments below.</p>
<p>The interesting thing about the Mark Fiore case is that <a href="http://www.niemanlab.org/2010/04/satire-police-update-apple-to-reconsider-keeping-mark-fiores-cartoon-app-off-the-iphone/">Apple has apparently reconsidered</a> their rejection, and asked Fiore to resubmit his app. That&#8217;s great news, but does it really mean Apple is finally reconsidering their rather draconian policy? Or are they just trying to avoid the bad publicity that&#8217;s likely to escalate when the content is associated with the winner of a Pulitzer? I guess we&#8217;ll have to wait till the next rejection (or approval) to find out.</p>
<p>John Gruber of Daring Fireball makes the point that <a href="http://daringfireball.net/2010/04/not_the_control_the_secrecy">what&#8217;s most frustrating to developers is the grey area of ill-defined rules</a>. Developers trying to navigate App Store policy plays out like trying to divine the will of a god, who is without a doubt omnipotent, but  rarely seems omniscient, and appears to mortals as vindictive and capricious at times. Or perhaps a closer amalgam could be a Kafka-esque bureaucracy, layers of obscure rules unseen by citizens, wheels moving cruelly behind the scenes towards some irreversible and arbitrary concept justice so thickly wrapped in red tape as to be impenetrable?</p>
<p>But back to the heart of it, what&#8217;s really so awful about demeaning public figures? Most of them need a swift kick in the ass. If it&#8217;s done in a way that&#8217;s not illegal or obscene,  that threatens violence or makes a patently untrue claim, then why the censorship? One possible answer might be that that&#8217;s it&#8217;s just wide cover for one public figure who is sacrosanct in the Apple canon, in which case I would like to suggest the following amendment to the satire rule:  <em>No application may include images, text, or sound that demeans Steven P. Jobs.</em></p>
<p>At least that way we could still satirize everything else under the sun, and the rule would kind of be a parody of itself.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.juggleware.com/blog/2010/04/apple-v-satire-part-17/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mySQL to SQLite cheatsheet for iPhone developers</title>
		<link>http://www.juggleware.com/blog/2009/09/mysql-to-sqlite-cheatsheet-for-iphone-developers/</link>
		<comments>http://www.juggleware.com/blog/2009/09/mysql-to-sqlite-cheatsheet-for-iphone-developers/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 17:17:26 +0000</pubDate>
		<dc:creator>alec</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[iPhone Development]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[Core Data]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[mySQL]]></category>
		<category><![CDATA[SQLite]]></category>

		<guid isPermaLink="false">http://www.juggleware.com/blog/?p=140</guid>
		<description><![CDATA[Although I started writing this as a cheat-sheet for myself (after many hours of struggling with this by trial-and-error), I figured it would be helpful for other iPhone developers who&#8217;d like to take a mySQL database online and migrate it &#8230; <a href="http://www.juggleware.com/blog/2009/09/mysql-to-sqlite-cheatsheet-for-iphone-developers/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Although I started writing this as a cheat-sheet for myself (after many hours of struggling with this by trial-and-error), I figured it would be helpful for other iPhone developers who&#8217;d like to take a mySQL database online and migrate it to their current iPhone project. While other tutorials cover how to read the database into the application from the coding point-of-view, this is just to make sure you get your data uncompromised from your existing mySQL database into a new SQLite DB that your iPhone app can read.</p>
<p>First of all, here&#8217;s what I am currently using; I am including versions in case that&#8217;s relevant to your situation:</p>
<ul>
<li><a href="http://dev.mysql.com/">MySQL</a> 5.0.81</li>
<li>MySQL charset: UTF8-Unicode (utf8)</li>
<li>MySQL connection collation: utf8_unicode_ci</li>
<li><a href="http://www.phpmyadmin.net/home_page/index.php">phpMyAdmin</a> &#8211; 2.11.9.5</li>
<li><a href="http://sqlitebrowser.sourceforge.net/">SQLite Database Browser</a> 1.3 (includes 3.3.5 of the SQLite database engine)</li>
<li>iPhone Dev Kit &#8211; 3.0</li>
<li>XCode 3.1.3</li>
<li>SQLite 3 framework found at /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib/libsqlite3.dylib</li>
</ul>
<p>You can try other solutions for importing the data into a SQLite format, but I&#8217;ve had the best luck with Mauricio Piacentini&#8217;s SQLite Database Browser. <a href="http://www.sqlite.org/cvstrac/wiki?p=ManagementTools">Other options</a> you might want to try include a <a href="https://addons.mozilla.org/en-US/firefox/addon/5817">Firefox plugin</a>.</p>
<p><strong>Here are the steps, using SQLite Database Browser:</strong></p>
<ol>
<li><a href="http://www.juggleware.com/blog/wp-content/uploads/2009/09/phpAdmin-SQLite_export.png"><img class="size-medium wp-image-143 alignright" title="phpAdmin-SQLite_export" src="http://www.juggleware.com/blog/wp-content/uploads/2009/09/phpAdmin-SQLite_export-300x250.png" alt="phpMyAdmin options for exporting to SQLite" width="300" height="250" /></a>log into phpMyAdmin, select your database and go to <strong>Database&gt; Export</strong>.</li>
<li>On the export tab, make sure all databases are selected, and the <strong>&#8220;SQL&#8221;</strong> radio button is selected.</li>
<li>Select <strong>ANSI</strong> from the pulldown for export compatibility.</li>
<li>Uncheck all options under <strong>Structure</strong> and <strong>Data</strong>, but leave each section checked.</li>
<li><strong>Save as file</strong> should be checked, and probably be via ZIP or GZIP, just in case.</li>
<li>Click the <strong>Go</strong> button to download your file.</li>
<li>Extract the file and open it up in your favorite text editor (I use <a href="http://barebones.com/products/bbedit/">BBEdit</a>).</li>
<li>Find the first <strong>CREATE TABLE</strong> line. We need to modify these by hand to simplify the table creation so that SQLite doesn&#8217;t get confused. For example, my file came down looking like this after the comment section ended:<br />
<code><br />
CREATE TABLE dictionary (<br />
id int(11) NOT NULL auto_increment,<br />
word varchar(100) NOT NULL,<br />
adjective tinyint(1) NOT NULL default '0' COMMENT 'is an adjective',<br />
noun tinyint(1) NOT NULL default '0' COMMENT 'is a noun ',<br />
intro tinyint(1) NOT NULL default '0' COMMENT 'is an intro',<br />
PRIMARY KEY  (id),<br />
UNIQUE KEY words (word)<br />
);<br />
</code></p>
<p>You&#8217;ll want to edit this to remove pretty much everything but the most basic information and normalize the data types to <a href="http://www.sqlite.org/datatype3.html">SQLite 3 Data Types</a>, which are <strong>TEXT, NUMERIC, INTEGER, REAL, or BLOB</strong>.  Your CREATE TABLE should look something like this:</p>
<p><code>CREATE TABLE dictionary(<br />
id  INTEGER PRIMARY KEY ASC,<br />
word TEXT,<br />
adjective  INTEGER,<br />
noun INTEGER,<br />
intro TEXT<br />
);</code></p>
<p>I was using id as a primary key so I&#8217;ve added &#8220;PRIMARY KEY ASC&#8221; after &#8220;id INTEGER&#8221;. (Primary Keys are aliases to row IDs in SQLite, if you have questions read <a href="http://www.sqlite.org/lang_createtable.html#rowid">this</a>.)</p>
<p>However, I&#8217;ve noticed that the SQLite Database browser exports SQL in the even more simplified format with no datatype specification as such, which also seemed to work for me and may work just as well for your needs:</p>
<p><code>CREATE TABLE dictionary (id, word, adjective, noun, intro);<br />
</code></li>
<li>Continue going through your text file and fix all CREATE TABLE lines as in #8, above.</li>
<li>Check your file text encoding. BBEdit may default to Western (Mac OS Roman), which worked for me, but if you have problems you may need to set it to Unicode, depending on your character set.</li>
<li>Check your file for suspicious characters that might cause the import to choke. Single quotation marks used as apostrophes show up as escaped by themselves; for example <code>you're</code> becomes <code>you''re</code>. This seemed to import fine as long as the other guidelines are followed. Here&#8217;s what an example INSERT should look like:
<p><code>INSERT INTO dictionary VALUES(305, 'ne''er-do-well', 0, 1, 0);<br />
</code></li>
<li>Check your line endings. BBEdit defaulted to Unix (LF) which worked for me.</li>
<li>Open up SQLite Database Browser, create a new database (.db) file, and import your SQL text file by selecting <strong>File&gt; Import&gt; Database From SQL File</strong> from the menu.</li>
<li>Check your data by clicking the <strong>Browse Data</strong> tab and make sure everything came in all right. If not, go back over the steps. Look for weird characters, text and line encoding issues, and syntax issues. The only two commands in your file should be CREATE TABLE and INSERT, although technically it should probably begin with <code>BEGIN TRANSACTION;</code> and end with <code>COMMIT;</code></li>
</ol>
<p>Again these steps were derived mostly by trial-and-error, so there may be issues particular to your DB that these guidelines didn&#8217;t solve. Please feel free to add any corrections, tips, and questions to the comments area. </p>
<p>Also, I know that with the iPhone OS 3.0, Core Data can take care of a lot of database functionality for you. I&#8217;d love to hear how people made the transition, and especially how anyone got a pre-existing SQL database into a Core Data store.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.juggleware.com/blog/2009/09/mysql-to-sqlite-cheatsheet-for-iphone-developers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apple tries to defend its App Store to the FCC</title>
		<link>http://www.juggleware.com/blog/2009/08/apple-tries-to-defend-its-app-store-to-the-fcc/</link>
		<comments>http://www.juggleware.com/blog/2009/08/apple-tries-to-defend-its-app-store-to-the-fcc/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 19:06:14 +0000</pubDate>
		<dc:creator>alec</dc:creator>
				<category><![CDATA[Freedom Time]]></category>
		<category><![CDATA[iPhone Development]]></category>
		<category><![CDATA[App Store]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[censor]]></category>
		<category><![CDATA[defamatory]]></category>
		<category><![CDATA[iPhone Apps]]></category>

		<guid isPermaLink="false">http://www.juggleware.com/blog/?p=136</guid>
		<description><![CDATA[I just saw that Apple has put on its home page now has a public response to justify its App Store policies. http://www.apple.com/hotnews/apple-answers-fcc-questions/ Of course the FCC is primarily interested in its rejection of big, important apps like Google Voice, &#8230; <a href="http://www.juggleware.com/blog/2009/08/apple-tries-to-defend-its-app-store-to-the-fcc/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I just saw that Apple has put on its home page now has a public response to justify its App Store policies.</p>
<p><a href="http://www.apple.com/hotnews/apple-answers-fcc-questions/  ">http://www.apple.com/hotnews/apple-answers-fcc-questions/</a></p>
<p>Of course the FCC is primarily interested in its rejection of big, important apps like Google Voice, and not indie developer apps, so Apple was able to gloss over its political censorship of apps like Freedom Time (See section 5, above), and not even include any rejected political content app in its list of &#8220;representative applications.&#8221;</p>
<p>To me, rejecting an app for speech reasons is much worse than for technological competition reasons, but maybe that&#8217;s because I am someone who cares about the first Amendment, something that has been shoved to the back of the bus while greasing the wheels of the free market machine.</p>
<p>Thanks to Brad at Bent Media for pointing me to this <a href="http://joehewitt.com/post/innocent-until-proven-guilty/">excellent essay by Joe Hewitt </a>demanding the end of the App Store approval process as we know it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.juggleware.com/blog/2009/08/apple-tries-to-defend-its-app-store-to-the-fcc/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
