MLCamera – Vision & Core ML with AVCaptureSession Inceptionv3 model

June 13, 2017
Goal of MLCamera demo is to demonstrates using of Vision and Core ML frameworks, to process AVCaptureVideoDataOutput and to perform image classification. Complete working demo can be dowloaded from github. Relevant WWDC session are Introduction to Core ML, Vision framework building on Core ML. Apple provides few models converted to its Core ML supported format here. Apple also provides tools to convert most popular machine learning model types to Core ML supported format. With that out of the way let’s get started. (more…)
#AI, #Blog posts, #Coding, #iOS Development, #Swift, #Technology

SnowGlobe.framework iOS Xmas easter egg, shake iPhone to make it snow

November 11, 2015
Update: Now updated to Swift 3 thanks to Ben Kreeger. I don’t see anything wrong with falling for spirit of the holiday season and getting bit cheesy. Last year I wrote SnowGlobe.framework. Its easy to use, open source iOS framework written in Swift. Now updated for swift 2.0 and added Jingle bells sound effect. It allows you to add delightful / cheesy Christmas easter egg to your awesome app for holiday season. When user shakes the device, your app “turns into a snow globe”. Leveraging CAEmitterLayer to create snow fall, snow globe like animation while device is shaken. I am a sucker for that kinda of thing ☺️. You can get it at github here. Or using CocoaPods (“SnowGlobe”) Read about how to integrate it in original post here. Watch how it works in few of my apps below You can now see in action in Memory game. Sadly both of these apps are still (more…)
#Blog posts, #Coding, #iOS Development, #Swift

Push / Pop modal SFSafariViewController (Hacking swipe from edge gesture)

October 11, 2015
In iOS 9 Apple introduced SFSafariViewController. In a nutshell it pretty much runs full Safari in your app. This is great as user gets all Keychain passwords, Safari extensions access, cookies, session data, etc. All of that done securely as the SFSafariViewController spins up a separate process, so that the app does not have access to SFSafariViewController’s content (More info here). That’s all great, however there is problem. Result of pushing SFSafariViewController in UINavigationsController is loss of default bar behaviour, which looks pretty bad. So really, only option is to present it modally. This has is own drawbacks. Apple has made unfortunate choice of placing the done button to top right corner. This makes it very difficult to dismiss when using the phone one handed. Although, I don’t really think positioning it anywhere else would solve the problem. Now standard swipe from the edge of the screen gesture really is the (more…)
#Blog posts, #Coding, #iOS Development, #Swift

Add iOS 9’s Quick Actions shortcut support in 15 minutes right now !

September 14, 2015
Apple introduced 3D touch (/force touch for iOS) functionality in iOS 9. API is divided into 3 parts. Quick actions, Peek and Pop, Pressure Sensitivity. This functionality will be available in iOS 9 at launch. Meaning you can already submit apps with support for it right now. I will only delve into Quick Action support which is most straight forward and no brainer. With a bit of luck it can all be done in 15 min. Let me however start by disclaimer, that at the time of writing of this article I have no way of testing any sample code as neither simulator in Xcode 7 nor 7.1 beta support 3D touch simulation and iPhone 6s is still over a week away. I will update this post as soon as I’m able to actually test it. If you’d like to hear about update, you can follow me here @stringCode. Without further (more…)
#Blog posts, #Coding, #iOS Development, #Swift

Rendering version number into beta app icon using swift script

August 28, 2015
It’s quite handy to have multiple builds of same app on one device for developing purposes. I usually setup three different builds. I like to have AppStore version alongside βeta version that is distributed to testers, as well as having separate debug builds. Last is only used when I directly build and run from Xcode. I described my setup in blog post here. That blog post it’s a prerequisite for following technique of rendering app version and build number onto icon described below. All of the code is written in Swift 2.0 and sample project is Xcode 7.0 beta 6 project. Start by downloading icon_processor.swift. You may want to download whole sample project (make sure you are viewing icon_version_rendering branch). It will make following along easier. Copy icon_processor.swift to your project folder. Add new Run script build phase in iOS target just under target dependencies in Build Phases tab. Define a path to (more…)
#Blog posts, #Coding, #iOS Development, #Swift

Memory Game – Maiden Voyage

April 23, 2015
Memory Game – Maiden Voyage. Take on a voyage through the memory frontier. Explore its wondrous tiles… We would like to consider Memory Game Maiden Voyage the most gorgeous memory game on AppStore for iPhone, iPad and  Watch and would love to hear form you on wether you think we have achieved that goal. We think you are going to enjoy our game when you have a few moments to pass and would like to see something delightful. Perhaps you are stuck on crowded public transport, holding the bar with one hand. It is so crowded you can’t even pull out your iPhone. You can keep holding the bar with one hand and taping with the other. We have put a lot of effort into design and bringing almost impossible animations and responsiveness to Apple watch, as we wanted to create bitesized delightful experience. We would like to consider Memory (more…)
#Apps, #Blog posts, #Coding, #iOS Development, #Swift

Collection of interesting Swift talks

January 21, 2015
I collected a few talks in this post that I consider particularly interesting, educational, enlightening and thought provoking. Now almost 8 months on from Swift announcement, with vibrant community, there are plenty of talks to choose from. I feel like we as a community (or at least me) are still working out what will the standard practices be when it comes to structuring and developing software in Swift. I think this might not truly change until Apple rewrites / replaces Cocoa. Talks below are some of the ones that shape my thinking on that topic. If there are any talks that gave you “aha moment”, or made you think about Swift in whole new light. I would love to know, feel free to tweet links at me. (more…)
#Blog posts, #Coding, #iOS Development, #Swift