So today my first app featuring iOS5 extras went live on the App Store. It’s another iteration of the iOS photo editing engine I’m working on for 2 years now, wrapped up with a super nice new UI and released as an universal app running on your iPod, iPhone and iPad.
“Fun Photo Booth” is a free download from the App Store, and high quality sharing to Facebook/Twitter/iCloud requires a $ upgrade.
I wanted to share a bit about what difficulties I encountered while upgrading the code for iOS5.
Saving to camera roll and custom app photo albums
So, iOS5 SDK has new APIs in the assets framework, which gives you the opportunity to add the photos your app creates to custom albums. It’s a pretty neat feature as with the booming photo app market the user want to have their photos organized by the software they have been created by. So, “Fun Photo Booth” saves all photos to a custom album called “Fun Booth photos”. That was kind of a challenge as I find the new assets framework APIs aren’t working smooth enough already.
If you would like to add this feature to your iOS app, you can have a look at this tutorial I wrote about it (it features also a free source code download)
Integration with the new iOS5 Twitter UI
Right now the app is compatible with iOS 5.0 and iOS 4.x, so I have a little runtime check for the iOS version and when the user is running iOS 5.0 and later when he/she wants to share their photo directly to Twitter they will see new slick iOS5 UI; and when they are still running 4.x they see our custom post to Twitter UI. It probably sounds like too much effort, but when there’s another couple of minor iteration of iOS5 I’ll just remove the code supporting 4.x and voila! Everyone’s happy.
If you want to learn more about the new Twitter integration in iOS5, you can first read through the excellent “Beginning Twitter in iOS 5 Tutorial“. It’s written by my co-author on “iOS5 by Tutorials” – Felipe Laso. It’s a very good tutorial to get you started, and if you want to learn more on Twitter or iOS5 in general you’re welcome to have a look at our book: “iOS5 by Tutorials”
Integration with iCloud
Integrating iCloud within “Fun Photo Booth” was actually quite easy. iCloud being enabled that is – after that getting things to work as I want honestly wasn’t that easy
So basically what I wanted was to be able to store photos from Fun Photo Booth in the user’s iCloud space and being able to open them again later on. So if the user kinda has several devices and so on, he will be able to exchange photos, etc. etc.
The issue right there (after some testing) I realized was – each photo is few megabytes in size (depending on your device’s camera) and when there were 10 photos coming from iCloud this was taking quite a lot of time. I wanted to be able to instantly show a list with previews to the user, so he can choose which photo he wants to download.
First thing that came to my mind was to save file bundles from my app and those bundles would include a thumbnail and the full photo. After I browsed quickly through the NSFIleWrapper docs, it looked like you need to open the bundle and then you can extract single files, so that didn’t help me much. In the end I just made the app save separate files for the thumbnail and the full photo, so when user wants to open a file he is presented with the thumbnail previews (say 1K each) and if he wants to open a photo, then the full photo is loaded …
I bundled this iCloud image opener as a separate standalone view controller and I was wondering whether this would be an interesting topic to post about on Touch Code Magazine? Let me know guys, if you think it will be.
To get started yourselves with iCloud you can read through this excellent tutorial “Beginning iCloud in iOS 5“. It is written by Cesare Rocchi – one of my co-authors on “iOS5 by Tutorials” – I guess there’s no need by now to mention again that if you want to read more from Cesare on iCloud and learn other new iOS5 APIs you should definitely lookup the “iOS5 by Tutorials” book.
Fun Photo Booth
If I got you interested – Fun Photo Booth is a free download and I’d be glad to hear your feedback
The post was originally published on the following URL: http://www.touch-code-magazine.com/fun-photo-booth-released-features-icloud-new-twitter-ui-custom-album-ios5/
·






