Swift 3.0 Preview

It [Swift 3.0] is inevitable. – Agent Smith

We are getting pretty close to the release of Swift 3.0. Part of me is very excited (fifty percent of me, to be precise). Since a few of my projects are completely written in Swift, no Objective-C, I decided to dive into Swift 3.0 with the release of a toolchain snapshot. I was particularly interested in quantifying the amount of effort it will require to update my apps (I like to migrate my code manually and see new changes rather then using auto-migration tool shipped with Xcode).

Needless to say, my project secretly named “Cobra (think of Jesse from the Burn Notice) – Update to Swift 3.0” wasn’t successful. It is way too early. I still managed to get a simple project setup and got myself familiarized with the new syntax – awesome. By the way, Playgrounds don’t work.

If you are interested, here are simple steps on how to use the Swift 3.0 Preview Toolchain in current version of Xcode (7.3.1).

First of all, head over to www.swift.org and download the latest snapshot (direct link here).

Once downloaded, run the package installer. This will install the new toolchain. Next, you’ll need to go to Xcode / Toolchains and select Swift 3.0 Preview 1 Snapshot. You’ll be asked to restart Xcode…

From here, it is time to test the waters and create a new project. I would suggest starting with a Single View Application template… a couple of warnings and compiler errors later, you are on your way to write your code.

Happy Swift 3.0 writing…

UPDATE: I successfully updated my project to Swift 3.0.

Swift 3.0 Preview

In-App Upgrade With MBStoreCheck

What a great day for iOS developers. In addition to some new APIs, Apple has dropped an unexpected “one more thing” at the end of the keynote – Swift. Swift is basically a new programming language for iOS and OS X. After playing with it for a couple of hours today, I love it. Granted, it will take some learning before I can really understand what’s going on, but so far, it’s pretty cool.

Recently I had the privilege to work with my friends on a project that required in-app purchase integration. To be more precise, we had a couple of app features locked and required paid upgrade to work. Because of that, I had to dive into in-app purchase APIs. Sadly, most of the articles – tutorials, are too complex for such a simple task. Thats why I wrote a very simple library implementing in-app purchase with 2 lines of code.

Continue reading “In-App Upgrade With MBStoreCheck”

In-App Upgrade With MBStoreCheck

Changing __MyCompanyName__ In Xcode Templates

How many times have you created your project and then manually changed the default __MyCompanyName__ to your company name? By default Xcode will use your identity card set in your Address Book but sometimes it simply won’t. There is a simple way to specify your company name per project basis. Here is how you would do it:

Select your project in Xcode (refer to the screenshot below).

Continue reading “Changing __MyCompanyName__ In Xcode Templates”

Changing __MyCompanyName__ In Xcode Templates