Thursday, June 5, 2014

Swift programming language Introduction

I was on my way to learn the all mighty Objective-C, and suddenly Apple has come up with the super cool programming language "Swift"....

We will discuss few things about Swift and you will see more Tutorials coming on the way here regarding this.

Here are few of the highlights of the Swift.

  • Adapts Safe Programming Patterns
  • Future of the Apple Software Development
  • Provides access to the existing Foundation and Cocoa Framework.
  • Support both iOS and Mac Apps development.
Best thing that comes with Swift is...

Playground

Playground is an innovative feature that lets you play with the programming language and you can see the results of the program on the fly without even building and running the code. What it does:

Saturday, May 31, 2014

Multipeer Connectivity in iOS 7 Part 2

In the Part 1 of this series we discussed how we can do multipeer connectivity using the BrowserViewController. 

In this blog we will discuss how we can achieve the same programatically, you can also call it programmatic discovery. Doing this Programatically gives us:

  1. Flexibility
  2. Sending and Accepting Invitations Programmatically.
  3. Build a custom UI for discovery.
So if we are going to things manually, than we should know the classes involved in the process. All the classes which are related to the Multipeer Connectivity are available in the "MultipeerConnectivity.framework". 

Add the framework in the project and you can see the list of classes available in the framework. Out of all the classes which will interest you to start doing things are:
  • MCNearbyServiceAdvertiser
  • MCNearbyServiceBrowser
  • MCPeerID
  • MCSession

Sunday, February 16, 2014

Multipeer Connectivity in iOS 7 Part 1

In this blog we will discuss about how to achieve multi peer connectivity using iOS 7 new Muti peer connectivity Framework. We will do it in multiple parts. In this part we will discuss how to discover the near by devices and connect them using the BrowserViewController.


In the first part we will discuss how can we use the view controller provided by the MultipeerConnectivity.framework. Classes in the Framework are prefixed with MC so from now we will use MC for mentioning the Multipeer Connectivity.

So What are the advantages of using the MC framework? Here are few mentioned in the WWDC sessions.

Sunday, January 5, 2014

Objective C Runtime

We will discuss how Objective C runtime system works and how we can find information about the objects at the runtime. The language always behave differently compile time and runtime. 


Objective C Runtimes

Objective C have two versions of the runtime "modern" and "legacy". The modern version comes with version 2.0 of the language. 

Difference among both the versions is that with the modern runtime if you change the layout of a class than you do not have to recompile the classes that inherit from it.



Sunday, November 24, 2013

Messaging in Objective C

In Objective C we know that objects send messages. If you do not know about it you can refer to the one of the previous blogs Object Model of Objective C

Now the messages are not bound to the method implementation until runtime. So how does this binding happens at runtime? There is no magic here is the messaging function which does this at runtime "objc_msgSend". This function takes the receiver and the name of the method - this is the method selector name as argument,