<?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>Nick Kuh &#8211; React Native, iOS &amp; Android Developer</title>
	<atom:link href="https://www.nickkuh.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.nickkuh.com</link>
	<description>A Freelance React Native, iOS &#38; Android Developer, Consultant and published Author based in Brighton, UK</description>
	<lastBuildDate>Sat, 22 Aug 2020 15:59:03 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.2.2</generator>
	<item>
		<title>Building Apps Fast in 2020  Using React, React Native and Firebase</title>
		<link>https://www.nickkuh.com/react-native/building-apps-fast-in-2020-using-react-react-native-and-firebase/2020/08/</link>
					<comments>https://www.nickkuh.com/react-native/building-apps-fast-in-2020-using-react-react-native-and-firebase/2020/08/#respond</comments>
		
		<dc:creator><![CDATA[Nick Kuh]]></dc:creator>
		<pubDate>Sat, 22 Aug 2020 15:25:08 +0000</pubDate>
				<category><![CDATA[React Native]]></category>
		<guid isPermaLink="false">https://www.nickkuh.com/?p=2298</guid>

					<description><![CDATA[We're rolling out iOS and Android apps in weeks not months! Using React Native and Firebase developers can now build complex web and mobile apps faster than ever before.]]></description>
										<content:encoded><![CDATA[<style>
    #video {
      width: 100%;
      height: 0;
      padding-bottom: 56.25%;
      position: relative;
    }
    #iframe-video {
        width: 100%;
    height: 100%;
    position: absolute;
    display: block;
    top: 0;
    left: 0;
    }
</style>
<div id="video">
  <iframe id="iframe-video" scrolling="no" frameBorder="0" src="https://www.subtitlescreator.com/video"></iframe>
</div>
</p>
<h3>Using modern, cross-platform technologies such as <a href="https://reactjs.org/">React</a>, <a href="https://reactnative.dev/">React Native</a> and <a href="https://firebase.google.com/">Firebase</a> developers are now able to build complex mobile apps and websites faster than ever before.</h3>
<p>I head up the mobile app development hub at A Squared &#8211; a Brighton based digital agency of 15 specialising in React and React Native front-end development.</p>
<p>I joined the team in February 2020 and in my first 6 months we built 6 mobile apps!</p>
<p>
<a href="https://www.automationsquared.com/post/building-apps-fast-in-2020-using-react-native-and-firebase">Read the full blog post here.</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.nickkuh.com/react-native/building-apps-fast-in-2020-using-react-react-native-and-firebase/2020/08/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Presenting Apple Watch Dev with Swift</title>
		<link>https://www.nickkuh.com/ios/presentation-on-developing-for-apple-watchwith-swift/2015/04/</link>
					<comments>https://www.nickkuh.com/ios/presentation-on-developing-for-apple-watchwith-swift/2015/04/#respond</comments>
		
		<dc:creator><![CDATA[Nick Kuh]]></dc:creator>
		<pubDate>Thu, 23 Apr 2015 13:02:10 +0000</pubDate>
				<category><![CDATA[Apple Watch]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Speaking]]></category>
		<guid isPermaLink="false">https://www.nickkuh.com/?p=2192</guid>

					<description><![CDATA[I've spent the last month learning how to Develop Apple Watch Apps in Swift. Tonight I get to share some of the cool tips and tricks I've discovered with the new Brighton Mobile Dev Group (Mobbers)!]]></description>
										<content:encoded><![CDATA[<p>I&#8217;ve spent the last 6 years working as a freelance iOS Developer, building apps for iPhones and iPads. As verbose a language as Objective-C is I&#8217;ve grown to enjoy working with it. Last year, Apple launched Swift &#8211; a new, modern programming language they offered Apple App Developers an alternative means to build apps. </p>
<p>Swift is a succinct, modern and flexible &#8211; great! But it&#8217;s also a new language and for Objective-C Devs like myself that means even more new stuff to learn in addition to all the new APIs added in iOS 8.</p>
<p>Like others (not all others!) I&#8217;ve procrastinated and delayed using Swift in my apps. It&#8217;s still in it&#8217;s infancy. However, when the opportunity came up for me to present at a <a href="http://www.meetup.com/Brighton-Mobile-Development-Meetup/events/221213301/">new Brighton-based Mobile Developer Group</a> I decided that enough was enough and it was time to take a break from client work and focus on updating my skills.</p>
<p>As a large part of this learning experience I&#8217;ve been building a really cool (if I do say so myself!) iOS and Apple Watch app &#8211; an app for parents to remotely track their kids daily iPad/iPod usage via their own iPhone or it&#8217;s Apple Watch extension App. In fact the parents can even track their own usage if, like me, you find your phone hard to put down!</p>
<p>I&#8217;ll be blogging more about the 3 main topics covered in my presentation (Swift, Adaptive Layout and Apple Watch Dev) in the coming weeks. But for now the main purpose of this blog post is to share access to the source code and workflow videos that accompany my talk.</p>
<p><a href="https://github.com/nickkuh/OldDogNewTricks">The source code can be downloaded from Github here!</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.nickkuh.com/ios/presentation-on-developing-for-apple-watchwith-swift/2015/04/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Modally Present Windows as Sheets in OS X (Yosemite &#038; Mavericks)</title>
		<link>https://www.nickkuh.com/mac-os-x/how-to-modally-present-windows-as-sheets-in-os-x-yosemite-mavericks/2015/01/</link>
					<comments>https://www.nickkuh.com/mac-os-x/how-to-modally-present-windows-as-sheets-in-os-x-yosemite-mavericks/2015/01/#comments</comments>
		
		<dc:creator><![CDATA[Nick Kuh]]></dc:creator>
		<pubDate>Fri, 16 Jan 2015 12:20:38 +0000</pubDate>
				<category><![CDATA[Mac OS X]]></category>
		<guid isPermaLink="false">https://www.nickkuh.com/?p=2178</guid>

					<description><![CDATA[When developing iOS Apps it&#8217;s very rare to come up against a technical challenge that hasn&#8217;t already been solved and the solution shared on Stack Overflow or in Apple&#8217;s sample code in the iOS Dev Center. Unfortunately I haven&#8217;t experienced the same luxury with Mac OS X Development. In a Mac App that I&#8217;m currently [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>When developing iOS Apps it&#8217;s very rare to come up against a technical challenge that hasn&#8217;t already been solved and the solution shared on <a href="http://stackoverflow.com/questions/tagged/ios">Stack Overflow</a> or in Apple&#8217;s sample code in the <a href="https://developer.apple.com/devcenter/ios/">iOS Dev Center</a>. Unfortunately I haven&#8217;t experienced the same luxury with Mac OS X Development.</p>
<p>In a Mac App that I&#8217;m currently developing for a client I need to be able to create modally presented windows as sheets <a href="https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/OSXHIGuidelines/WindowDialogs.html#//apple_ref/doc/uid/20000957-CH43-SW2">as described here in Apple&#8217;s Human Interface Guidelines</a>.</p>
<p><img decoding="async" loading="lazy" class="alignnone wp-image-2182 size-full" src="https://www.nickkuh.com/wp-content/uploads/2015/01/sheet_example_2x.png" alt="sheet_example_2x" width="788" height="659" srcset="https://www.nickkuh.com/wp-content/uploads/2015/01/sheet_example_2x.png 788w, https://www.nickkuh.com/wp-content/uploads/2015/01/sheet_example_2x-300x251.png 300w, https://www.nickkuh.com/wp-content/uploads/2015/01/sheet_example_2x-640x535.png 640w" sizes="(max-width: 788px) 100vw, 788px" /></p>
<p>Document Modal Dialogs or &#8220;Sheets&#8221; are instances of NSWindow. According to <a href="https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Sheets/Tasks/UsingCustomSheets.html">Apple&#8217;s documentation</a> to present a custom NSWindow sheet we use the following code:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">[NSApp beginSheet: myCustomSheet<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; modalForWindow: window<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; modalDelegate: self<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; didEndSelector: @selector(didEndSheet:returnCode:contextInfo:)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; contextInfo: nil];</div></div>
<p>Problem is beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo: was deprecated a few years ago and appears to no longer work in Yosemite and Mavericks <img src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f615.png" alt="😕" class="wp-smiley" style="height: 1em; max-height: 1em;" /> With out-of-date documentation and all Googling resulting in out-of-date solutions to presenting custom modal windows, I went about figuring out the modern solution to this challenge!</p>
<p>The replacement for beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo: is to now call beginSheet:completionHandler: on the NSWindow that you want to present from, passing in reference to the instance of your custom NSWindow subclass.</p>
<p>I also discovered a few important steps that you need to implement when presenting sheets&#8230;</p>
<p><strong>Step 1: Retain a reference to the NSWindow or NSWindowController that you are creating when presenting a sheet:</strong></p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">@interface MainWindowViewController ()<br />
<br />
@property (strong) CustomModalWindowController *myCustomModalWindowController;<br />
<br />
@end<br />
<br />
@implementation MainWindowViewController<br />
<br />
<br />
- (IBAction)didTapOpenButton:(id)sender {<br />
&nbsp; &nbsp; self.myCustomModalWindowController = [[CustomModalWindowController alloc] initWithWindowNibName:@&quot;CustomModalWindowController&quot;];<br />
&nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; [self.window beginSheet:self.myCustomModalWindowController.window &nbsp;completionHandler:^(NSModalResponse returnCode) {<br />
&nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; }];<br />
<br />
&nbsp; &nbsp; <br />
}<br />
<br />
@end</div></div>
<p><strong>Step 2: Deselect the <em>Visible at Launch</em> window attribute for your custom NSWindow or it&#8217;ll fail to present modally</strong></p>
<p><img decoding="async" loading="lazy" src="https://www.nickkuh.com/wp-content/uploads/2015/01/Visible-At-Launch.jpg" alt="Visible-At-Launch" width="743" height="508" class="alignnone size-full wp-image-2185" srcset="https://www.nickkuh.com/wp-content/uploads/2015/01/Visible-At-Launch.jpg 743w, https://www.nickkuh.com/wp-content/uploads/2015/01/Visible-At-Launch-300x205.jpg 300w, https://www.nickkuh.com/wp-content/uploads/2015/01/Visible-At-Launch-640x438.jpg 640w" sizes="(max-width: 743px) 100vw, 743px" /></p>
<p><strong>Step 3: Call the window &#8220;sheetParent&#8221; in order to close the sheet and trigger the sheet completion block in the presentation code:</strong></p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">[self.window.sheetParent endSheet:self.window returnCode:NSModalResponseOK];</div></div>
<p>I&#8217;ve created a demo Xcode project that you can grab from my github repository to see this all in action:</p>
<p><a href="https://github.com/nickkuh/OS-X-Custom-Document-Modal-Window">Download source example from Github</a></p>
<p>Happy Coding!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.nickkuh.com/mac-os-x/how-to-modally-present-windows-as-sheets-in-os-x-yosemite-mavericks/2015/01/feed/</wfw:commentRss>
			<slash:comments>12</slash:comments>
		
		
			</item>
		<item>
		<title>Unity: a Great Tool for Kids Learning to Code Games</title>
		<link>https://www.nickkuh.com/unity/unity-a-great-tool-for-kids-learning-to-code-games/2015/01/</link>
					<comments>https://www.nickkuh.com/unity/unity-a-great-tool-for-kids-learning-to-code-games/2015/01/#comments</comments>
		
		<dc:creator><![CDATA[Nick Kuh]]></dc:creator>
		<pubDate>Thu, 08 Jan 2015 08:52:39 +0000</pubDate>
				<category><![CDATA[Learning Code]]></category>
		<category><![CDATA[Unity]]></category>
		<guid isPermaLink="false">https://www.nickkuh.com/?p=2155</guid>

					<description><![CDATA[Over the Christmas break while many were munching mince-pies and stuffing in the turkey, my son Finn and I were coding games in Unity 🙂 Finn&#8217;s 11. He&#8217;s currently in his first year of Secondary School. He&#8217;s a keen gamer on his Xbox and iPad. Tempting him to try and learn a little code to [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Over the Christmas break while many were munching mince-pies and stuffing in the turkey, my son Finn and I were coding games in Unity <img src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>Finn&#8217;s 11. He&#8217;s currently in his first year of Secondary School. He&#8217;s a keen gamer on his Xbox and iPad. Tempting him to try and learn a little code to understand what goes on behind the scenes of the games he plays started as a bit of an experiment. We began by chatting about his favourite games. With the list of favourites including <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=918338898&#038;mt=8">Stick Hero</a> and Flappy Bird it was clear that a game didn&#8217;t need to have the level of complexity of huge budget hits such as Fifa, Call of Duty or Clash of Clans to make a lasting impression on an 11 year old boy with a short attention span!</p>
<p>I wanted to see if I could rouse Finn&#8217;s interest for long enough to get him coding a simple game. <a href="http://unity3d.com/">Unity</a> was my tool of choice. With my own experience of many tools and languages including iOS, SpriteKit, Android and Flash, Unity is leaps and bounds ahead of the competition as the best tool for making mobile games these days. There&#8217;s also a relatively low barrier to entry to get up and running and quickly see immediate results from just a few lines of JavaScript code or simply by dragging and dropping game objects onto your canvas and applying simple built in physics your game objects immediately begin to interact with one another. It&#8217;s a very satisfying experience!</p>
<p>Not only is Unity easy to get up and running with, it&#8217;s also a very powerful tool that enables developers to publish to a long list of platforms that includes iOS, Android and Window&#8217;s Phone. Around 70% of games in Apple&#8217;s App Store are now being developed in Unity. I created <a href="/project/poker-royale/">Poker Royale</a> and <a href="/project/wordsy/">Wordsy</a> natively in Objective-C and iOS but with hindsight Unity would have been a better choice <img src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f615.png" alt="😕" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>My method of getting Finn into writing code has been for us to follow this wonderful video course on <a href="https://www.youtube.com/playlist?list=PLPV2KyIb3jR4_IYZY2V0G3IUYcx1zZkJe">how to make a 2D Game (Pong)</a> by <a href="http://brackeys.com/">Asbjørn Thirslund @ Brackeys</a>. I highly recommend the free video courses you can find at <a href="http://brackeys.com/">Brackeys.com</a>. You build a simple game from scratch following the clear step-by-step bite-size videos. </p>
<p>Finn and I followed the course together on our laptops. It was great to see how quickly he was able to pick up the process of navigating the Unity GUI: how easy it was to import graphic assets into his game and then position and size them on the canvas. Asbjørn moves at a fast pace and with his quirky English accent he keeps things quite amusing. Finn and I joked together throughout the course and I noticed how his competitive instinct kicked in while working alongside dad &#8211; he was keen to show me each time he finished writing some code before me or discovered a new short cut to get the job done quicker!</p>
<p>Finn has highlighted the similarities between his experience with Unity so far and learning to code with <a href="http://scratch.mit.edu/">Scratch</a> at school. I don&#8217;t know Scratch that well but my understanding is that it provides a simplistic drag and drop UI to help kids to learn the basics of how an application or game is built. It&#8217;s clearly a great foundation for taking coding to the next level.</p>
<p>Finn&#8217;s interest in coding seems to increase each time we spend a new Unity session together. With each session his understanding of the power of programming progresses and further opens his imagination to all of the possibilities that being a programmer offers! It&#8217;ll be interesting to see how this plays out <img src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.nickkuh.com/unity/unity-a-great-tool-for-kids-learning-to-code-games/2015/01/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>A Hacking Experience By The Sea</title>
		<link>https://www.nickkuh.com/ios/facebooks-parse-by-the-sea-hackathon/2013/10/</link>
					<comments>https://www.nickkuh.com/ios/facebooks-parse-by-the-sea-hackathon/2013/10/#comments</comments>
		
		<dc:creator><![CDATA[Nick Kuh]]></dc:creator>
		<pubDate>Tue, 01 Oct 2013 09:26:25 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[iOS]]></category>
		<guid isPermaLink="false">https://www.nickkuh.com/?p=1556</guid>

					<description><![CDATA[Last Thursday at 5pm I joined around 100 other geeks at Parse By The Sea &#8211; an all night &#8216;hackathon&#8217; and part of the Brighton Digital Festival. What is a &#8216;Hackathon&#8217;? The idea behind a hackathon is to work with other developers to code/hack new digital features or product prototypes in a short (and intense) [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Last Thursday at 5pm I joined around 100 other geeks at <a href="http://www.brightondigitalfestival.co.uk/events/parse-by-the-sea/">Parse By The Sea</a> &#8211; an all night &#8216;hackathon&#8217; and part of the <a href="http://www.brightondigitalfestival.co.uk/">Brighton Digital Festival</a>.</p>
<div id="attachment_1562" style="width: 610px" class="wp-caption alignnone"><img aria-describedby="caption-attachment-1562" decoding="async" loading="lazy" class="size-full wp-image-1562 " alt="Parse by the Sea Hackathon" src="https://www.nickkuh.com/wp-content/uploads/2013/10/parse-by-the-sea-hackathon1.jpg" width="600" height="303" srcset="https://www.nickkuh.com/wp-content/uploads/2013/10/parse-by-the-sea-hackathon1.jpg 600w, https://www.nickkuh.com/wp-content/uploads/2013/10/parse-by-the-sea-hackathon1-225x113.jpg 225w, https://www.nickkuh.com/wp-content/uploads/2013/10/parse-by-the-sea-hackathon1-300x151.jpg 300w" sizes="(max-width: 600px) 100vw, 600px" /><p id="caption-attachment-1562" class="wp-caption-text">Parse by the Sea Hackathon</p></div>
<p><strong>What is a &#8216;Hackathon&#8217;?</strong></p>
<p>The idea behind a hackathon is to work with other developers to code/hack new digital features or product prototypes in a short (and intense) period of time. Hackathons will often run overnight and developers work together to maintain their focus and momentum with the help of caffeinated and alcoholic drinks! Not all that healthy but strangely productive. After a night of coding all teams present their hacks the next morning.</p>
<div id="attachment_1567" style="width: 610px" class="wp-caption alignleft"><img aria-describedby="caption-attachment-1567" decoding="async" loading="lazy" class="size-full wp-image-1567" alt="Caffeinated drinks!" src="https://www.nickkuh.com/wp-content/uploads/2013/10/redbull.jpg" width="600" height="298" srcset="https://www.nickkuh.com/wp-content/uploads/2013/10/redbull.jpg 600w, https://www.nickkuh.com/wp-content/uploads/2013/10/redbull-225x111.jpg 225w, https://www.nickkuh.com/wp-content/uploads/2013/10/redbull-300x149.jpg 300w" sizes="(max-width: 600px) 100vw, 600px" /><p id="caption-attachment-1567" class="wp-caption-text">Caffeinated drinks!</p></div>
<p><strong>Parse By The Sea</strong></p>
<p>Parse By The Sea was organised and hosted by <a href="https://www.facebook.com/facebooklondon">Facebook</a> and took place inside the Brighton Dome last Thursday and Friday. The event was sponsored by <a href="http://www.parse.com">Parse</a>, <a href="http://unity3d.com/">Unity</a>, <a href="http://pusher.com/">Pusher</a>, <a href="http://www.deezer.com/">Deezer</a> and <a href="http://www.withings.com/">Withings</a>. There was no fixed brief for the hack apart from a mobile theme. But all of the sponsors were offering great tech prizes to the best hacks that used their APIs with an <a href="http://www.brightondigitalfestival.co.uk/prizes-by-the-sea/">overall winners prize from Facebook and Parse</a>.</p>
<p>I&#8217;ve never attended a hackathon before but have recently discovered just how popular they are. Internally Facebook hosts a hackathon every 6 weeks and gives it&#8217;s in-house software engineers a chance to hack away on new ideas that apparently often end up becoming fully fledged features on Facebook.com or in their various mobile apps.</p>
<p>With Parse By The Sea Facebook decided to open up their regular hack to external Developers: Developers from all around the UK and Europe, Computer Science Students and in-house Facebook Software Engineers.</p>
<p>There was a fairly even mix of iOS, Android, Unity, Web and Server-Side Developers. In advance of the Hackathon Facebook setup a group for us all where we could start to share ideas and build teams. The ideas started to flow in and initial teams started to form.</p>
<p><strong>An Idea and a Team</strong></p>
<p>Initially I had an idea to build a multiplayer iOS word game using Parse and Pusher where four players would all compete with the same set of letters to form the longest words. All players would see each others game points in realtime creating a very competitive and fun multiplayer game. I was initially quite fixed on this idea. But you&#8217;ve only got about 14 hours of code time so an idea like this was optimistic/ambitious.</p>
<p>After the various sponsors had presented their APIs it was 7pm and dinner was served. I started to mingle with other developers at the Hack and met fellow iOS Developer <a href="http://about.me/benchester">Ben</a> and Android Whizz <a href="http://blog.mindoverflow.info/">Jose</a> &#8211; also a big thanks to <a href="http://www.twitter.com/adamyeats">Adam</a> from Pusher who knocked up a simple Node.js server-side for us in about 5 minutes!</p>
<div id="attachment_1568" style="width: 610px" class="wp-caption alignleft"><img aria-describedby="caption-attachment-1568" decoding="async" loading="lazy" class="size-full wp-image-1568" alt="Ben and Jose (taken from/by our app!)" src="https://www.nickkuh.com/wp-content/uploads/2013/10/ben-jose.jpg" width="600" height="300" srcset="https://www.nickkuh.com/wp-content/uploads/2013/10/ben-jose.jpg 600w, https://www.nickkuh.com/wp-content/uploads/2013/10/ben-jose-225x112.jpg 225w, https://www.nickkuh.com/wp-content/uploads/2013/10/ben-jose-300x150.jpg 300w" sizes="(max-width: 600px) 100vw, 600px" /><p id="caption-attachment-1568" class="wp-caption-text">Ben and Jose (taken from/by our app!)</p></div>
<p>We were chatting about our various hack ideas and one of Ben&#8217;s ideas was to create a photo app where multiple users could contribute photos to shared albums. This idea really resonated with me. I&#8217;m half American and every few years I travel the the US to catch up with my extensive US family. At these family reunions there are often 50 or more family members. Everyone is taking snaps on their smart phones and capturing these special moments. But then what? How do we share these photos just with the family members? There are a number of ways to do this with tools like Dropbox or uploading the photos to Facebook and assigning access permissions. But both of these methods requires all members of the family to sign up to the respective service and both methods require a certain amount of effort by all the photographers to share.</p>
<p>So the idea then developed into an app that would work on both iOS and Android. An app which would connect multiple users and enable them to create and contribute to multiple shared photo albums. As users took photos those photos would update across all connected user&#8217;s devices in realtime (instantly).</p>
<p>And that&#8217;s just what we built in 14 hours. 2 native apps (iOS and Android) that shared data via Parse and hooked into a simple Pusher backend to instantly stream in new photos as soon as they were saved to Parse. We initially named the app <em>Shared Photos</em> which then became <em>Frictionless Photo Sharing</em> &#8211; neither were particularly inspiring names but hey it was 5am FFS!</p>
<div id="attachment_1571" style="width: 610px" class="wp-caption alignleft"><img aria-describedby="caption-attachment-1571" decoding="async" loading="lazy" class="size-full wp-image-1571" alt="Frictionless Photo Sharing running on iOS" src="https://www.nickkuh.com/wp-content/uploads/2013/10/frictionless-photo-sharing-iOS.jpg" width="600" height="533" srcset="https://www.nickkuh.com/wp-content/uploads/2013/10/frictionless-photo-sharing-iOS.jpg 600w, https://www.nickkuh.com/wp-content/uploads/2013/10/frictionless-photo-sharing-iOS-225x199.jpg 225w, https://www.nickkuh.com/wp-content/uploads/2013/10/frictionless-photo-sharing-iOS-300x266.jpg 300w" sizes="(max-width: 600px) 100vw, 600px" /><p id="caption-attachment-1571" class="wp-caption-text">Frictionless Photo Sharing running on iOS</p></div>
<p>I&#8217;d never met Ben and Jose before the Facebook Hack but we really connected and gelled as a team. It was amazing to work with such talented Developers and the enthusiasm for our product stayed alive throughout the night. None of us got a wink of sleep! There were beds to sleep in and as we passed 4am, 5am, 6am the urge to sleep got greater. But there was a communal sense that we were building something super cool and we all wanted to make it as good as it could be by day break. So we just kept on ploughing on, beer, Redbull and jokes aflowing <img src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<div id="attachment_1573" style="width: 610px" class="wp-caption alignleft"><img aria-describedby="caption-attachment-1573" decoding="async" loading="lazy" class="size-full wp-image-1573" alt="4am..." src="https://www.nickkuh.com/wp-content/uploads/2013/10/4am.jpg" width="600" height="338" srcset="https://www.nickkuh.com/wp-content/uploads/2013/10/4am.jpg 600w, https://www.nickkuh.com/wp-content/uploads/2013/10/4am-225x126.jpg 225w, https://www.nickkuh.com/wp-content/uploads/2013/10/4am-300x169.jpg 300w" sizes="(max-width: 600px) 100vw, 600px" /><p id="caption-attachment-1573" class="wp-caption-text">4am&#8230;</p></div>
<p>At one point Jose chucked some tenuous(!) link to the Deezer API into the Android version of the app &#8211; connecting a music track to each photo just for kicks &#8211; well anything to add a shot at more API prizes! The guys next to us were building something in Unity and we considered adding a few pics of their app into ours just to make the Unity connection&#8230; lol</p>
<p><strong>Presentation Time</strong></p>
<p>There were some really cool hacks and such a variety of ideas. Here are a few examples:</p>
<ul>
<li>Too uber geeks decided they&#8217;d write a compiler &#8211; well why not!</li>
<li>The team next to ours created a 3D sound game in Unity for blind users.</li>
<li>One developer created a drag&#8217;n&#8217;drop music game that split Deezer tracks into multiple segments, randomised the order and players had to rearrange and rebuild the tune &#8211; awesome idea!</li>
<li><em>Flapdoodle</em> was another memorable hack &#8211; an app for party hosts that used Facebook and Deezer APIs to auto-build party playlists from your friend&#8217;s music tastes. An especially nice touch was the friend&#8217;s face rotating on a record during playback &#8211; so that everyone would know just who was responsible for choosing Justin Bieber!</li>
</ul>
<p><strong>Our Turn</strong></p>
<p>Each team only had just 2 minutes to present. With our hack it was all about the demo. The idea was simple but seeing as we&#8217;d used <em>Frictionless</em> in the title of our app I was hoping that the presentation would follow suit!</p>
<p>While Ben and Jose presented the idea and UI on screen I wondered around taking snaps of the audience on my iPhone which instantly streamed into Ben&#8217;s version of the app hooked up to the monitor. It&#8217;s not that tricky to implement this sort of thing but it makes for a really cool live demo <img src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<div id="attachment_1577" style="width: 610px" class="wp-caption alignnone"><img aria-describedby="caption-attachment-1577" decoding="async" loading="lazy" class="size-full wp-image-1577 " alt="Our Presentation" src="https://www.nickkuh.com/wp-content/uploads/2013/10/presentation-ben-jose-nick.jpg" width="600" height="262" srcset="https://www.nickkuh.com/wp-content/uploads/2013/10/presentation-ben-jose-nick.jpg 600w, https://www.nickkuh.com/wp-content/uploads/2013/10/presentation-ben-jose-nick-225x98.jpg 225w, https://www.nickkuh.com/wp-content/uploads/2013/10/presentation-ben-jose-nick-300x131.jpg 300w" sizes="(max-width: 600px) 100vw, 600px" /><p id="caption-attachment-1577" class="wp-caption-text">Our Presentation</p></div>
<p>Initially we were a bit gutted not to pick up any of the sponsor prizes but our dissapointment was short-lived when <a href="https://www.facebook.com/jimpurbrick">Jim</a> announced that the overall hack winners were <em>Frictionless Photo Sharing</em>! It took us a minute or 2 to remember that was us!!</p>
<div id="attachment_1580" style="width: 610px" class="wp-caption alignleft"><img aria-describedby="caption-attachment-1580" decoding="async" loading="lazy" class="size-full wp-image-1580" alt="Hack Winners!" src="https://www.nickkuh.com/wp-content/uploads/2013/10/winners1.jpg" width="600" height="401" srcset="https://www.nickkuh.com/wp-content/uploads/2013/10/winners1.jpg 600w, https://www.nickkuh.com/wp-content/uploads/2013/10/winners1-225x150.jpg 225w, https://www.nickkuh.com/wp-content/uploads/2013/10/winners1-300x200.jpg 300w" sizes="(max-width: 600px) 100vw, 600px" /><p id="caption-attachment-1580" class="wp-caption-text">Prize Winners!</p></div>
<p>We won Parse and Pusher Pro accounts which is super-cool as it ultimately means that we can potentially develop our prototype into a product and ship it without incurring hosting costs for the foreseeable future.</p>
<p><strong>Hacking the Future</strong></p>
<p>I had such an amazing first hackathon experience and working with such talented and enthusiastic teammates enhanced the experience even further. Bring on the next one! <img src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.nickkuh.com/ios/facebooks-parse-by-the-sea-hackathon/2013/10/feed/</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
			</item>
		<item>
		<title>Core Data Migration Woes with Binary Data and External Storage == Data Loss</title>
		<link>https://www.nickkuh.com/iphone/core-data-migration-woes-with-binary-data-and-external-storage-data-loss/2012/06/</link>
					<comments>https://www.nickkuh.com/iphone/core-data-migration-woes-with-binary-data-and-external-storage-data-loss/2012/06/#comments</comments>
		
		<dc:creator><![CDATA[Nick Kuh]]></dc:creator>
		<pubDate>Sat, 09 Jun 2012 14:05:52 +0000</pubDate>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Core Data]]></category>
		<guid isPermaLink="false">https://www.nickkuh.com/?p=1429</guid>

					<description><![CDATA[I&#8217;m currently on a flight to San Francisco to attend Apple’s WWDC 2012 Conference – with 10 hours of time to kill I thought I’d spend a few hours writing a post about a CoreData bug I discovered recently. I’m also planning on showing the bug to Apple engineers next week so with a bit [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I&#8217;m currently on a flight to San Francisco to attend Apple’s <a href="https://developer.apple.com/wwdc/">WWDC 2012</a> Conference – with 10 hours of time to kill I thought I’d spend a few hours writing a post about a CoreData bug I discovered recently. I’m also planning on showing the bug to Apple engineers next week so with a bit of luck this issue may get fixed in iOS 6. Fingers crossed.</p>
<p><strong>Apple’s Binary Data attribute type</strong></p>
<p>In iOS 5 Apple introduced a great new Core Data attribute type, <em>Binary Data</em>. This was a great new attribute &#8211; prior to iOS 5 it was typical to manage and store images and other binary files to disk outside of Core Data and store references to the files from Core Data entities &#8211; not ideal.</p>
<p><strong>Use Case Scenario</strong></p>
<p>A lot of the apps I build make extensive use of caching images so that users of my apps can continue to use my apps even when they’re offline. A good example of this is my latest iPad App, <a href="https://www.nickkuh.com/portfoliopro">Portfolio Pro</a>. Portfolio Pro is an app for Photographers and Designers to import their photos and videos into the app and then be able to present those binary files to clients in a coffee shop for example. The images need to be cached by the app for offline use.</p>
<p><strong>The Problem</strong></p>
<p>I’ve been using Apple’s <em>Binary Data</em> attribute type to store both the large photographs imported by users of my app and thumbnails for the photos. I’ve updated the app a few times without experiencing any problems accessing the previously cached Core Data binary attributes. Until that is, I tried to attempt a very simple automated Core Data model migration in a recent update. A strange bug occurred. Cached Core Data binary data started disappearing!</p>
<p>What was odd was that all of the cached thumbnails remained after an automated migration but the larger binary data attributes containing the original large sized photographs (2048 pixels long side) became nullified.</p>
<p>I was using exactly the same approach to store the thumbnail binary data and the large photo binary data. So why was one migrating and the other not? In both cases in addition to setting the Core Data attribute type to <em>Binary Data</em> I’d also selected <em>Allows External Storage </em>option. It seemed like the sensible choice, as I’d expect an optimized database framework to read/write large binary files to disk.</p>
<p><strong>Allows External Storage</strong></p>
<p>While investigating the migration issue I was experiencing in Portfolio Pro I discovered that Core Data writes large binary data to disk but not smaller binary data. Exactly what size it uses as the cut-off limit I don’t know but with large photo data I found that Core Data had created external binary files on disk in a subfolder of my app’s documents folder named &#8220;_EXTERNAL_DATA&#8221; within another folder named &#8220;.[MyProjectName]_SUPPORT&#8221;. So if your Xcode target is named <em>MyCoolApp</em> then the path to Core Data’s external storage will be [DocumentsFolder]/.MyCoolApp_SUPPORT/_EXTERNAL_DATA</p>
<p><strong>Goodbye External Storage</strong></p>
<p>Once I’d discovered this hidden storage folder I then found the cause of my disappearing photos. When Core Data performs an automated model migration it deletes/resets the _EXTERNAL_DATA folder – goodbye photos! All of my entities were being migrated just fine but the large, externally stored binary attributes were just disappearing because the storage directory was getting nuked in the migration process.</p>
<p>So that’s the bug with migrating a CoreData model that uses Binary Data attributes with Allows External Storage switched on.</p>
<p><strong>See for yourself</strong></p>
<p>I’ve put together an example project to demonstrate the bug. Download the source files here:</p>
<p><a href="https://www.nickkuh.com/demos/coredata-binary-bug-source.zip"> Download Source Files</a></p>
<p>Begin by opening up the Xcode project within the <em>Before Migration</em> folder. Run the project in the iOS Simulator. You should get similar results to figure 1.</p>
<div id="attachment_1430" style="width: 406px" class="wp-caption alignnone"><a href="https://www.nickkuh.com/iphone/core-data-migration-woes-with-binary-data-and-external-storage-data-loss/2012/06/attachment/figure1/" rel="attachment wp-att-1430"><img aria-describedby="caption-attachment-1430" decoding="async" loading="lazy" class="size-full wp-image-1430" title="Figure 1" src="https://www.nickkuh.com/wp-content/uploads/2012/06/figure1.png" alt="Figure 1" width="396" height="744" srcset="https://www.nickkuh.com/wp-content/uploads/2012/06/figure1.png 396w, https://www.nickkuh.com/wp-content/uploads/2012/06/figure1-119x225.png 119w, https://www.nickkuh.com/wp-content/uploads/2012/06/figure1-159x300.png 159w, https://www.nickkuh.com/wp-content/uploads/2012/06/figure1-78x148.png 78w, https://www.nickkuh.com/wp-content/uploads/2012/06/figure1-16x31.png 16w, https://www.nickkuh.com/wp-content/uploads/2012/06/figure1-20x38.png 20w, https://www.nickkuh.com/wp-content/uploads/2012/06/figure1-114x215.png 114w" sizes="(max-width: 396px) 100vw, 396px" /></a><p id="caption-attachment-1430" class="wp-caption-text">Figure 1: Before CoreData Migration</p></div>
<p>The 2 image views are being populated by a single Core Data entity. The entity contains 2 identical Binary Data attribute types. 1 named <em>smallImage</em> and one named <em>largeImage</em>. Both have been set up to <em>Allow External Storage</em>. In the view I’m rendering the <em>smallImage</em> binary data into the first image view and the <em>largeImage</em> binary data into the second image view. Both image views have content mode set to aspect fit.</p>
<p>Close the <em>Before Migration</em> version of the project. Now open <em>After Migration (Bug)</em> version of the same project. The only difference between this version of the project and the first is that I’ve migrated the CoreData model by adding a model version and adding a new unused string attribute named <em>newAttribute</em> to the Core Data Entity.</p>
<p>The project is already set-up correctly for automatic Core Data migration. Build and run. This should replace your previous version of the example app and perform the automatic model migration. But what happens to the binary data attributes of our entity? Here’s what happens, the small image remains and the large image is deleted (see figure 2)!</p>
<div id="attachment_1435" style="width: 406px" class="wp-caption alignnone"><a href="https://www.nickkuh.com/iphone/core-data-migration-woes-with-binary-data-and-external-storage-data-loss/2012/06/attachment/figure2/" rel="attachment wp-att-1435"><img aria-describedby="caption-attachment-1435" decoding="async" loading="lazy" class="size-full wp-image-1435" title="Figure 2: After CoreData Migration" src="https://www.nickkuh.com/wp-content/uploads/2012/06/figure2.png" alt="Figure 2: After CoreData Migration" width="396" height="744" srcset="https://www.nickkuh.com/wp-content/uploads/2012/06/figure2.png 396w, https://www.nickkuh.com/wp-content/uploads/2012/06/figure2-119x225.png 119w, https://www.nickkuh.com/wp-content/uploads/2012/06/figure2-159x300.png 159w, https://www.nickkuh.com/wp-content/uploads/2012/06/figure2-78x148.png 78w, https://www.nickkuh.com/wp-content/uploads/2012/06/figure2-16x31.png 16w, https://www.nickkuh.com/wp-content/uploads/2012/06/figure2-20x38.png 20w, https://www.nickkuh.com/wp-content/uploads/2012/06/figure2-114x215.png 114w" sizes="(max-width: 396px) 100vw, 396px" /></a><p id="caption-attachment-1435" class="wp-caption-text">Figure 2: After CoreData Migration</p></div>
<p>Ok, point proven. Delete the demo app from your iOS Simulator. Run the original <em>Before Migration</em> version once more – you should now have both images displayed as before. Now for the solution…</p>
<p><strong>The Solution</strong></p>
<p>Now build and run the third version of the example app within the <em>After Migration (Solution)</em> folder. You should still have 2 images displayed after migration – hurray!</p>
<p>The solution I’ve come up with is when your code initializes a persistent store coordinator for your Core Data model run a few checks before attempting automatic migration. Check whether the new model is compatible with the current stored model. If it’s not then you know that Core Data is about to migrate your old model to your new version and in doing so will wipe the external storage folder. Before it does so simply move the external storage folder to a temporary location. Once the migration has completed replace new empty external storage folder generated by Core Data. Here’s the code that you’ll also find in the <em>Model</em> class of the example project within the <em>After Migration (Solution)</em> folder:</p>
<div class="codecolorer-container objc default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/CoreDataFramework/Classes/NSPersistentStoreCoordinator_Class/"><span style="color: #400080;">NSPersistentStoreCoordinator</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>persistentStoreCoordinator<br />
<br />
<span style="color: #002200;">&#123;</span><br />
<br />
<span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span>_persistentStoreCoordinator <span style="color: #002200;">!=</span> <span style="color: #a61390;">nil</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span><br />
<br />
<span style="color: #a61390;">return</span> _persistentStoreCoordinator;<br />
<br />
<span style="color: #002200;">&#125;</span><br />
<br />
<a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSURL_Class/"><span style="color: #400080;">NSURL</span></a> <span style="color: #002200;">*</span>storeURL <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>self applicationDocumentsDirectory<span style="color: #002200;">&#93;</span> URLByAppendingPathComponent<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;CoreDataBinaryBug.sqlite&quot;</span><span style="color: #002200;">&#93;</span>;<br />
<br />
<a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSError_Class/"><span style="color: #400080;">NSError</span></a> <span style="color: #002200;">*</span>error <span style="color: #002200;">=</span> <span style="color: #a61390;">nil</span>;<br />
<br />
<a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSDictionary_Class/"><span style="color: #400080;">NSDictionary</span></a> <span style="color: #002200;">*</span>sourceMetadata <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/CoreDataFramework/Classes/NSPersistentStoreCoordinator_Class/"><span style="color: #400080;">NSPersistentStoreCoordinator</span></a> metadataForPersistentStoreOfType<span style="color: #002200;">:</span>NSSQLiteStoreType<br />
<br />
URL<span style="color: #002200;">:</span>storeURL<br />
<br />
error<span style="color: #002200;">:&amp;</span>amp;error<span style="color: #002200;">&#93;</span>;<br />
<br />
<span style="color: #11740a; font-style: italic;">//Check if the new model is compatible with any previously stored model</span><br />
<br />
<span style="color: #a61390;">BOOL</span> isCompatibile <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>self.managedObjectModel isConfiguration<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span> compatibleWithStoreMetadata<span style="color: #002200;">:</span>sourceMetadata<span style="color: #002200;">&#93;</span>;<br />
<br />
<span style="color: #a61390;">BOOL</span> needsMigration <span style="color: #002200;">=</span> <span style="color: #002200;">!</span>isCompatibile;<br />
<br />
<a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSFileManager_Class/"><span style="color: #400080;">NSFileManager</span></a> <span style="color: #002200;">*</span>fileManager <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSFileManager_Class/"><span style="color: #400080;">NSFileManager</span></a> defaultManager<span style="color: #002200;">&#93;</span>;<br />
<br />
<span style="color: #11740a; font-style: italic;">//Prepare a temporary path to move CoreData's external data storage folder to if automatic model migration is required</span><br />
<br />
<a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span>documentsPath <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> lastObject<span style="color: #002200;">&#93;</span>;<br />
<br />
<a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span>tmpPathToExternalStorage <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>documentsPath stringByAppendingPathComponent<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;tmpPathToReplacementData&quot;</span><span style="color: #002200;">&#93;</span>;<br />
<br />
<a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span>pathToExternalStorage <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>documentsPath stringByAppendingPathComponent<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;.CoreDataBinaryBug_SUPPORT/_EXTERNAL_DATA&quot;</span><span style="color: #002200;">&#93;</span>;<br />
<br />
<span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span>needsMigration<span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span><br />
<br />
<span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span><span style="color: #002200;">&#91;</span>fileManager fileExistsAtPath<span style="color: #002200;">:</span>pathToExternalStorage<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span><br />
<br />
<span style="color: #11740a; font-style: italic;">//Move Apple's CoreData external storage folder before it's nuked by the migration bug</span><br />
<br />
<span style="color: #002200;">&#91;</span>fileManager moveItemAtPath<span style="color: #002200;">:</span>pathToExternalStorage toPath<span style="color: #002200;">:</span>tmpPathToExternalStorage error<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span>;<br />
<br />
<span style="color: #002200;">&#125;</span><br />
<br />
<span style="color: #002200;">&#125;</span><br />
<br />
<a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSDictionary_Class/"><span style="color: #400080;">NSDictionary</span></a> <span style="color: #002200;">*</span>options <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSDictionary_Class/"><span style="color: #400080;">NSDictionary</span></a> dictionaryWithObjectsAndKeys<span style="color: #002200;">:</span><br />
<br />
<span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSNumber_Class/"><span style="color: #400080;">NSNumber</span></a> numberWithBool<span style="color: #002200;">:</span><span style="color: #a61390;">YES</span><span style="color: #002200;">&#93;</span>,NSMigratePersistentStoresAutomaticallyOption,<br />
<br />
<span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSNumber_Class/"><span style="color: #400080;">NSNumber</span></a> numberWithBool<span style="color: #002200;">:</span><span style="color: #a61390;">YES</span><span style="color: #002200;">&#93;</span>, NSInferMappingModelAutomaticallyOption, <span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span>;<br />
<br />
_persistentStoreCoordinator <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/CoreDataFramework/Classes/NSPersistentStoreCoordinator_Class/"><span style="color: #400080;">NSPersistentStoreCoordinator</span></a> alloc<span style="color: #002200;">&#93;</span> initWithManagedObjectModel<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span>self managedObjectModel<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;<br />
<br />
<span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span><span style="color: #002200;">!</span><span style="color: #002200;">&#91;</span>_persistentStoreCoordinator addPersistentStoreWithType<span style="color: #002200;">:</span>NSSQLiteStoreType configuration<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span> URL<span style="color: #002200;">:</span>storeURL options<span style="color: #002200;">:</span>options error<span style="color: #002200;">:&amp;</span>amp;error<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span><br />
<br />
<span style="color: #002200;">&amp;</span>nbsp;<br />
<br />
NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Unresolved error %@, %@&quot;</span>, error, <span style="color: #002200;">&#91;</span>error userInfo<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span>;<br />
<br />
<a href="http://www.opengroup.org/onlinepubs/009695399/functions/abort.html"><span style="color: #a61390;">abort</span></a><span style="color: #002200;">&#40;</span><span style="color: #002200;">&#41;</span>;<br />
<br />
<span style="color: #002200;">&#125;</span><br />
<br />
<span style="color: #a61390;">else</span> <span style="color: #002200;">&#123;</span><br />
<br />
<span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span>needsMigration<span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span><br />
<br />
<span style="color: #11740a; font-style: italic;">//Apple's automatic migration is now complete. Replace the default external storage folder with the version pre upgrade</span><br />
<br />
<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSFileManager_Class/"><span style="color: #400080;">NSFileManager</span></a> defaultManager<span style="color: #002200;">&#93;</span> removeItemAtPath<span style="color: #002200;">:</span>pathToExternalStorage error<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span>;<br />
<br />
<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSFileManager_Class/"><span style="color: #400080;">NSFileManager</span></a> defaultManager<span style="color: #002200;">&#93;</span> moveItemAtPath<span style="color: #002200;">:</span>tmpPathToExternalStorage toPath<span style="color: #002200;">:</span>pathToExternalStorage error<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span>;<br />
<br />
<span style="color: #002200;">&#125;</span><br />
<br />
<span style="color: #002200;">&#125;</span><br />
<br />
<span style="color: #a61390;">return</span> _persistentStoreCoordinator;<br />
<br />
<span style="color: #002200;">&#125;</span></div></div>
<p>Once more, here are the source files for the example project:</p>
<p><a href="https://www.nickkuh.com/demos/coredata-binary-bug-source.zip">Download Source Files</a></p>
<p>Interested in iOS Development and Core Data? <a href="http://www.twitter.com/nickkuh">Follow me on Twitter</a> for more tidbits <img src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.nickkuh.com/iphone/core-data-migration-woes-with-binary-data-and-external-storage-data-loss/2012/06/feed/</wfw:commentRss>
			<slash:comments>10</slash:comments>
		
		
			</item>
		<item>
		<title>Speaker at the next Brighton iPhone Creators Meetup</title>
		<link>https://www.nickkuh.com/iphone/speaker-at-the-next-brighton-iphone-creators-meetup/2010/09/</link>
					<comments>https://www.nickkuh.com/iphone/speaker-at-the-next-brighton-iphone-creators-meetup/2010/09/#respond</comments>
		
		<dc:creator><![CDATA[Nick Kuh]]></dc:creator>
		<pubDate>Tue, 07 Sep 2010 09:54:20 +0000</pubDate>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<guid isPermaLink="false">https://www.nickkuh.com/?p=688</guid>

					<description><![CDATA[As per the title, I&#8217;m going to be speaking about iPad Development at the next Brighton iPhone Creators Meetup. Here are a few details about the event: Presenting: iPad Development: New Challenges and Opportunities for iPhone Devs When: Tuesday 21st @ 7pm Where: The Skiff, 6 Gloucester Street, Brighton, BN1 4EW I&#8217;ve been primarily asked [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>As per the title, I&#8217;m going to be speaking about iPad Development at the next <a href="http://groups.google.com/group/brighton-iphone-creators">Brighton iPhone Creators</a> Meetup. Here are a few details about the event:</p>
<p>Presenting: <strong>iPad Development: New Challenges and Opportunities for iPhone Devs</strong></p>
<p>When: Tuesday 21st @ 7pm</p>
<p>Where:<a href="http://theskiff.org/"> The Skiff</a>, 6 Gloucester Street, Brighton, BN1 4EW</p>
<p>I&#8217;ve been primarily asked to talk about iPad development so that&#8217;s going to be the main feature in my 20/30 min presentation. How iPad development creates new challenges (User Experience, Development for multiple iDevices etc) and opportunities for iPhone Devs (increased sales, AppStore rankings).</p>
<p>I&#8217;m also planning to share some of my experiences of developing for the AppStore such as tips on how to improve your app reviews and ratings and how to avoid some of the mistakes I&#8217;ve already made <img src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>That&#8217;s it for now&#8230; Gotta get on with my latest app idea <img src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.nickkuh.com/iphone/speaker-at-the-next-brighton-iphone-creators-meetup/2010/09/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Portfolio To Go goes Mini!</title>
		<link>https://www.nickkuh.com/iphone/portfolio-to-go-goes-mini/2010/09/</link>
					<comments>https://www.nickkuh.com/iphone/portfolio-to-go-goes-mini/2010/09/#respond</comments>
		
		<dc:creator><![CDATA[Nick Kuh]]></dc:creator>
		<pubDate>Fri, 03 Sep 2010 10:28:53 +0000</pubDate>
				<category><![CDATA[iPhone]]></category>
		<guid isPermaLink="false">https://www.nickkuh.com/?p=680</guid>

					<description><![CDATA[Portfolio to Go Mini has just been approved for sale by Apple and is now availabile on iPhone and iPod from the App Store!. Following the success of the iPad version and winning Apple&#8217;s prestigious App of the Week award, Portfolio To Go goes mini and arrives on your iPhone and iPod touch! Portfolio to [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a href="/portfolio-to-go-mini/" title="Portfolio To Go for iPhone/iPod">Portfolio to Go Mini</a> has just been approved for sale by Apple and is now <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=389132385&amp;mt=8">availabile on iPhone and iPod from the App Store!</a>.</p>
<p><a title="Portfolio To Go Mini AppStore Link" href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=389132385&amp;amp;mt=8" target="_blank"><img decoding="async" loading="lazy" style="border: 0pt none; margin: 0px;" src="https://www.nickkuh.com/branding/portfolio2go127x107.png " alt="" width="127" height="107" /><img decoding="async" loading="lazy" style="border: 0pt none; margin: 0px;" src="https://www.nickkuh.com/wp-includes/images/appstoreBadge.png" alt="" width="173" height="65" /></a></p>

<p>Following the success of the <a href="/portfolio-to-go/" title="Portfolio To Go for iPad">iPad version</a> and winning Apple&#8217;s prestigious <a href="/portfolio-to-go/#press" title="Press">App of the Week</a> award, Portfolio To Go goes mini and arrives on your iPhone and iPod touch!</p>
<p>Portfolio to Go syncs your Flickr photosets to local, cached galleries on your iPhone or iPod Touch. Once all galleries and images are cached you can view your portfolio without an internet connection. Perfect for use with wi-fi: sync and go.</p>
<p>Portfolio To Go is elegant and intuitive, giving users instant access to all of their Flickr photosets. The unique interface design presents thumbnail images horizontally and vertically on a photo-wall capable of displaying thousands of images simultaneously that scroll at the touch of a finger.</p>
<p>Portfolio To Go supports all device rotations so can be flipped vertically for portraits and horizontally for landscapes.</p>
<p>Another unique selling point of this app is the ‘Send Portfolio to a Client’ feature.  The Photographer picks and chooses which of his galleries to share and can then send an auto-generated email to clients and friends containing a free download link to ‘Portfolio To Go Player’ iPad/iPhone App. By clicking the emailed link clients launch the photographer’s portfolio on their own iPad/iPhone/iPod Touch.</p>
<p><a href="#top">Top</a></p>
<h3><a name="screengrabs">Screen Grabs</a></h3>
<p>[flickr album=72157624869114732 num=30 size=Medium]</p>
<p><a href="#top">Top</a></p>
<h3><a name="key-features">Key Features</a></h3>
<p># Photo Wall:<br />
View all your Flickr photo galleries at once &#8211; scroll each gallery horizontally to browse thumbs, scroll vertically to traverse through all synced galleries. Click on any thumbnail to jump into the main image view.</p>
<p># Main image view displays gallery thumbnails to enable intuitive gallery navigation. Just click the main image to go full-screen.</p>
<p># Flickr Authorization: access to all of your private, friends and family and public photos</p>
<p># Multiple cached portfolios: add unlimited Flickr portfolios via your contacts or Flickr IDs to P2G and switch between them.</p>
<p># Auto-cache photos: all photos get cached in the background while you browse (you can turn this feature off in settings)</p>
<p># Send Portfolio to a Client: Pick and choose which galleries to include and then send your portfolio straight to clients and friends by email from the app. Clients will download the free Portfolio to Go Player app to their iPad/iPhone/iPod Touch and launch your portfolio from the emailed link.</p>
<p># Share your photos and Flickr links via Facebook, Twitter or Email </p>
<p># Save favourite Photos to your iPhone/iPod Photo Library</p>
<p><a href="#top">Top</a></p>
<p><a name="tryout"></a></p>
<h3>Portfolio To Go Player</h3>
<p>You can try out the Portfolio To Go Player experience for free (just like your clients and friends) by following 2 simple steps <strong>on your iPad, iPhone or iPod Touch:</strong><br />
1) Click and download this free iPad app: <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=384891126&amp;amp;mt=8">Portfolio To Go Player</a><br />
2) Click and launch this link (it will open in the downloaded app): <a href="p2gplayer://Nicole%20Carman&#038;44743266@N05&#038;nicolecarman&#038;72157624410307923-bded54529e749a2c&#038;1&#038;604800&#038;1&#038;1&#038;72157623566886279,72157622705748907,72157622830138222,72157622875768336,72157622875636876,72157622875664794,72157622875328948,72157623610362380,72157624347354400">Nicole Carman&#8217;s Portfolio</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.nickkuh.com/iphone/portfolio-to-go-goes-mini/2010/09/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Video Review of Portfolio To Go</title>
		<link>https://www.nickkuh.com/ipad/video-review-of-portfolio-to-go/2010/08/</link>
					<comments>https://www.nickkuh.com/ipad/video-review-of-portfolio-to-go/2010/08/#comments</comments>
		
		<dc:creator><![CDATA[Nick Kuh]]></dc:creator>
		<pubDate>Fri, 13 Aug 2010 02:36:46 +0000</pubDate>
				<category><![CDATA[iPad]]></category>
		<guid isPermaLink="false">https://www.nickkuh.com/?p=592</guid>

					<description><![CDATA[Just came across this great video review of the latest version of my iPad photography app Portfolio To Go for Flickr. If you want to preview all the new features I&#8217;ve added in a recent app update this review from Adorama TV covers most of them 🙂 Download Portfolio To Go for Flickr]]></description>
										<content:encoded><![CDATA[<p>Just came across this great video review of the latest version of my iPad photography app <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=378747963&amp;amp;mt=8">Portfolio To Go for Flickr</a>. If you want to preview all the new features I&#8217;ve added in a recent app update <a href="http://www.adorama.com/alc/article/Portfolio-To-Go-AdoramaTV">this review from Adorama TV</a> covers most of them <img src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="600" height="360" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="data" value="http://www.youtube.com/v/LHin-etUxpA?fs=1&amp;hl=en_US" /><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/LHin-etUxpA?fs=1&amp;hl=en_US" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="600" height="360" src="http://www.youtube.com/v/LHin-etUxpA?fs=1&amp;hl=en_US" allowscriptaccess="always" allowfullscreen="true" data="http://www.youtube.com/v/LHin-etUxpA?fs=1&amp;hl=en_US"></embed></object></p>
<p><a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=378747963&amp;amp;mt=8">Download Portfolio To Go for Flickr</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.nickkuh.com/ipad/video-review-of-portfolio-to-go/2010/08/feed/</wfw:commentRss>
			<slash:comments>18</slash:comments>
		
		
			</item>
		<item>
		<title>Portfolio to Go for Flickr</title>
		<link>https://www.nickkuh.com/portfolio/portfolio-to-go-for-flickr/2010/07/</link>
					<comments>https://www.nickkuh.com/portfolio/portfolio-to-go-for-flickr/2010/07/#comments</comments>
		
		<dc:creator><![CDATA[Nick Kuh]]></dc:creator>
		<pubDate>Fri, 09 Jul 2010 13:44:16 +0000</pubDate>
				<category><![CDATA[iPad]]></category>
		<category><![CDATA[Portfolio]]></category>
		<guid isPermaLink="false">https://www.nickkuh.com/?p=588</guid>

					<description><![CDATA[A top 10 paid iPad App for Photographers]]></description>
										<content:encoded><![CDATA[<p>Portfolio to Go for Flickr has just been approved for sale by Apple and is now <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=378747963&amp;mt=8">availabile for iPad on the App Store</a>.</p>
<p><a title="Portfolio To Go AppStore Link" href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=378747963&amp;mt=8" target="_blank"><img decoding="async" loading="lazy" style="border: 0pt none; margin: 0px;" src="https://www.nickkuh.com/wp-includes/images/appstoreBadge.png" alt="" width="173" height="65" /></a></p>
<p>A recent winner of Apple’s ‘iPad App of the Week’ award, Portfolio To Go features an elegant and intuitive photo-wall giving users instant access to all of their Flickr photosets: scroll each gallery horizontally to browse thumbs, scroll vertically to traverse through all synced galleries.<br />
The main purpose of Portfolio To Go is to enable photographers to present their portfolio offline to clients &#8211; perfect for use with iPad wi-fi: just sync and go. Photographers create and edit photosets on Flickr.com and Portfolio To Go acts as a presentation tool, keeping in sync with all your Flickr changes.</p>
<p>Portfolio To Go supports all iPad rotations so can be flipped vertically for portraits and horizontally for landscapes.</p>
<p>Another unique selling point of this app is the ‘Send Portfolio to a Client’ feature.  The Photographer picks and chooses which of his galleries to share and can then send an auto-generated email to clients and friends containing a free download link to ‘Portfolio To Go Player’ iPad App. By clicking the emailed link clients launch the photographer’s portfolio on their own iPad(s).</p>
<p>[flickr album=72157624609630073 num=30 size=Small]</p>
<p>Check out this great video review of <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=378747963&amp;amp;mt=8">Portfolio To Go on iPad</a>. Mark Wallace from <a href="http://www.adorama.com/alc/article/Portfolio-To-Go-AdoramaTV">Adorama TV</a> takes you through most of the key features of the app <img src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="600" height="360" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="data" value="http://www.youtube.com/v/LHin-etUxpA?fs=1&amp;hl=en_US" /><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/LHin-etUxpA?fs=1&amp;hl=en_US" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="600" height="360" src="http://www.youtube.com/v/LHin-etUxpA?fs=1&amp;hl=en_US" allowscriptaccess="always" allowfullscreen="true" data="http://www.youtube.com/v/LHin-etUxpA?fs=1&amp;hl=en_US"></embed></object></p>
<h3>Key Features</h3>
<p># Photo Wall:<br />
View all your Flickr photo galleries at once &#8211; scroll each gallery horizontally to browse thumbs, scroll vertically to traverse through all synced galleries. Click on any thumbnail to jump into the main image view.</p>
<p># Main image view displays gallery thumbnails to enable intuitive gallery navigation. Just click the main image to go full-screen.</p>
<p># Flickr Authorization: access to all of your private, friends and family and public photos</p>
<p># Multiple cached portfolios: add unlimited Flickr portfolios via your contacts or Flickr IDs to P2G and switch between them.</p>
<p># Auto-cache photos: all photos get cached in the background while you browse (you can turn this feature off in settings)</p>
<p># Send Portfolio to a Client: Pick and choose which galleries to include and then send your portfolio straight to clients and friends by email from the app. Clients will download the free Portfolio to Go Player app to their iPad and launch your portfolio from the emailed link.</p>
<p># Share your photos and Flickr links via Facebook, Twitter or Email </p>
<p># Save favourite Photos to your iPad Photo Library</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.nickkuh.com/portfolio/portfolio-to-go-for-flickr/2010/07/feed/</wfw:commentRss>
			<slash:comments>10</slash:comments>
		
		
			</item>
	</channel>
</rss>
