Rest2mobile is a project providing an Xcode and IntelliJ UDEA plugin along with a command line tool from Magnet submitted by Pascal Jaillon that allows you to automatically generate native objective-c code for communication with a a REST service.

The plugin provides a nice interface allowing you to retrieve the JSON payload from the REST service and generate the code with a couple of clicks. The code works with the rest2mobile SDK for communication which uses AFNetworking to communicate with the REST API.

Read More »


The excellent playground feature in Xcode 6 provides a great way to create interactive programming examples, but unfortunately only works with Swift.

Here’s a library submitted by Krzysztof Zablocki providing an extensive feature set for creating Playgrounds in Objective-C called KZPlayground.

Some of the features of KZPlayground as stated in the readme include:

  • Faster than Swift playgrounds (a lot)
  • Extra controls for tweaking:
    • values
    • images
  • Auto-animated values
  • Synchronizing DSL’s
  • Buttons
  • IDE agnostic, once you run it, you can modify the code even from vim.
  • Full iOS simulator and access to all iOS features, so you can prototype production ready code.
  • Nice DSL for rapid prototyping
  • CocoaPods support, so you can add it to existing projects to experiment
  • Open source, anyone can contribute to make them better!

An example project is included.

Read More »


Today we will be learning about another aspect of Class Initializers. The Swift language has two different types of initializers they are called designated initializers and convenience initializers. These existed in Objective-C, but a few rules have changed in Swift, and a very helpful keyword was introduced. We will discuss how designated and convenience initializers are used, and how they can work together to get your classes ready for use.

Read More »


Learn how to work with Generics in Swift and make your code more concise and powerful!

You might not know it, but you’ve probably already seen generics at work in Swift. Arrays and dictionaries are classic examples of the type safety of generics in action.

Objective-C developers are accustomed to arrays and dictionaries holding objects of many types in the same collection. This provides for great flexibility, but how do you know what an array returned from an API is meant to hold? You can only be sure by looking at documentation or at variable names, another form of documentation. Even with documentation, there is nothing (other than bug-free code!) to prevent something unexpected in the collection at runtime.

Swift, on the other hand, has typed arrays and dictionaries. An array of Ints can only hold Ints and can never (for example) contain a String. This means you can document code by writing code, allowing the compiler to do the type checking for you.

Read More »


How do the Objective-C patterns we already know translate into Swift?

Patterns are your go-to code chunks; the things you know exactly how to do in Objective-C because you’ve framed code like it in all of your projects. Swift syntax seems to come pretty easy to iOS developers but we still need a lot of exploration to find the best reimplementations our favorite patterns in Swift.

This is part of that exploration, listing patterns I’ve found while working in Swift and that others have shared elsewhere.

“That thing is Swift” is a listing of examples that shows object oriented design patterns implemented in Swift programming language.

Read More »


If you are not yet aware of this, Apple has introduced a new programming language called Swift in this year’s WWDC, alongside the new Mac OS X Yosemite. Swift aims to simplify the codes used in Apple platforms iOS and OS X. Despite the new name, Swift is compatible with the roots of predecessors like C, Objective-C and Cocoa Touch framework.

If you have been programming with Objective-C, learning Swift would be a breeze as it has inherited a number of syntax that you may already have been familiar with. And if learning Swift is in your to-do list but you haven’t started, here are a few free sources that is going to make things a lot easier for you.

The article lists 15 interesting resources that helps to learn Swift programming language. It’s targeted for beginners as well as experienced developers.

Read More »