Saturday, February 11, 2012

Gmail and Task notification by Google notifier for Mac OSX


Gmail and Task notification by Google notifier for Mac OSX


I am quite dependent on google services, specially gmail, reader, calendar and of course Google Wave. Like many others, it gives me excellent support in managing my tasks, update to the web world and prompt communication.

But one thing that bothered me is to switch to the gmail tab in my browser to check if any new mail is received. Well, I could use Apple Mail and many other out there. In fact, I tried lots of them but none could replace the browser.

Recently I installed Google Notifier! Its amazing! Minimal yet complete. Here is a step by step instruction to use it.

First go to http://toolbar.google.com/gmail-helper/notifier_mac.html.

Gmail Notifier Home Page

Click the button on the right saying: “Download Google Notifier for Mac”

After its been downloaded, click the dmg file if not already the image is mounted. It will ask for a confirmation:

Google Notifier Mound Confirmation

Click “Open”. It will mount the image and following window will appear:

Install Google Notifier

Drag the Left side Application package to the Application directory folder on the left. Thats it!

Now, press Command + Space to open up the spotlight search prompt. Type Google Notifier.

Searching Google Notifier in Spotlight

Press Enter when Google Notifier is selected in the list.

Now enter your gmail account information. It can also be changed from preference.

Google Notifier Gmail Account Information

Thats it! look at your top bar!

Google Notifier Installed

Now, if you have any mail or calendar event, the corresponding icon will be colorized with a count!

Google Notifier! You Got Mail!

Optionally you may also configure Growl and a growl like this:

Google Notifier with Growl!

Now, I can browse the web relaxed! If any important mail requiring urgent reply, Google will serve me that info

iPhone app development cycle

iPhone app development cycle
Here is the iPhone app development cycle and required communication between you and us.
Stakeholders:
1. iPhone App Developer( “Dev” i.e. us)
2. iPhone app seller (“Client” i.e. you)
Firstly, an iPhone cannot be run on any iphone/ipod if it is not downloaded from itunes app-store and then installed to iphone/ipod by syncing( same as syncing music, pics etc. via iTunes).
Dev is a registered Apple Developer. He also registered his iPhone,iPod to Apple and apple in return gave him a certificate. Using this certificate
he can use his devices as debugger only when the devices are connected to his Mac machine using XCode IDE.
Clients or sellers need to register in any of the ADC programs. For example we have a registered standard program account i.e. we can also sell free/paid from iTunes along with development.
Now, how the Client will test/run the app? For this also, Client need to register http://developer.apple.com/iphone/program/ in a program standard/enterprise.
Then, from the control panel he need create certificate with his device ids( device id can be seen via itunes once connected, we can show you if u need).
After that, he has to send this certificates to the Developer. This is called AdHoc certificate. Using this certificate an app can run on those registered devices.
Now, the Developer will install the certificate on his Mac and make an app executable using this adhoc certificate. Then, he will mail this app/executable to the client.
The client will download the app and drag it on itunes and then sync his iphone/ipod.
But, this executable cannot be submitted to app-store and also wont run any other devices other than the ones registered in the AdHoc certificate.
To submit any app to app-store i.e. to sell/distribute an app using app-store, the executable must be compiled with with a Distribution certificate.
Distribution certificate is to created by the seller i.e. the client. It is similar to creating adhoc certificate. At this moment client must provide an app icon to the developer.
Then the client again send the distribution certificate to the developer. Developer compiles another build with it and sends the app-build to the client.
Then the client will download this build and submit to itunes app-store.
Once you are registered to the ADC standard($100) or enterprise($299) program from here http://developer.apple.com/iphone/program/
you will have a nice control panel. There are nice step by step guideline there.
****
So, in short:
1. Client Gives requirement to Developer
2. Developer develops the app
3. Client gives ad-hoc certificate to the developer.
4. Developer gives ad-hoc build to the client
5. Client Test the ad-hoc build on his iPhone/iPods
6. Client  gives the distribution certificate to the developer
7. Developer give distribution build to the client
8. Client submits this distribution build to app-store
9. App-Store takes around 1 week to review and then make it available on iTunes App-Store
Btw, the Client must also provide AppIcon or size 57px X 57px to the developer.
Client also need to have the same image of the AppIcon of size 512 X 512 to submit the app on app-store.

Twitter integration with Iphone application

Please don’t use the TwitterAgent as I have received a number of comments that I does not work anymore since twitter moved away from the http api. I’ll be posting a new tutorial soon to show how to use their new API.

In this tutorial I am going to show you how to integrate Twitter in your iPhone app. I am going to have a short talk about Twitter Agent by Aman and how to use it to integrate twittering game scores out of a small example game called iDice.

If you are already reading this you probably are looking into having an easy way to integrate some twittering in your app- fact is Twitter have quite good API (even 2 or 3 APIs if we want to be exact) and around the web there are some quite good Twitter engines already written in Objective-C. However today I’m gonna look into definitely the easiest way to provide twittering within your iPhone app.

I mean – 1 line of Objective-C code – how better can you do ?

Twitter Agent

Twitter Agent is one of those all-in-one libraries which have a single purpose and do it well, while still leave you the possibility to customize what you want. You can head straight away to google code here (only SVN access to the source code at the moment) or to this blog article to download the code as zip file. Be sure to return here to see the cool example I prepared ;)

First of all, how you go about twittering in 1 line of Objective-C? Look at this example:

[[TwitterAgent defaultAgent] twit ];

TwitterAgent has a static instance, which you can access straight away and a method “twit” which you can call: this code will show the user a twitter login window and after a successful login will present him with a textfield (and a char counter) where he/she can enter his tweet and send it into the wild. The twit method is really nicely wrapped, but there’s more to TwitterAgent than this simple call.

[[TwitterAgent defaultAgent] twit:@"Touch code magazine is great!" ];

This way the user is given a pre- filled text message to tweet, and if you also want to have a URL already shortened :

[TwitterAgent defaultAgent] twit:@"Touch code magazine is great!" withLink:@"http://www.touch-code-magazine.com" makeTiny:YES];

I really think Twitter integration does not get any simpler than that. If you want to change something in the looks of the dialogues or the functionality – just dig into the few very simple classes, it won’t take you much to figure your way.

iDice – a socially involved iPhone game

I’m going to put together a simple game which will give the user the possibility to tweet his game results. First I’m importing the TwitterAgent files and BusyAgent (simple class to dim the screen and let the user know there’s an action in progress) into my XCode project. I’ll just copy over the source files from the zip files I downloaded:

After that I craft fast in Interface Builder the interface of my game: 2 dices which will be the player and computer and 2 buttons – one to roll the dices again and on to tweet about my game result. (Won’t get in much details how to put together a UIViewController here)

In the action of the “Roll dices” button I put a simple code to generate 2 random numbers and show them in my 2 colorful UILabels (those are the virtual dices):

-(IBAction)rollDice {  playerScore = arc4random() % 6 + 1;  lblPlayer.text = [NSString stringWithFormat:@"%i", playerScore];  computerScore = arc4random() % 6 + 1;  lblComputer.text = [NSString stringWithFormat:@"%i", computerScore]; }

I include the TwitterAgent in my iDiceViewController.h:

#import "TwitterAgent.h"

Now comes the real meat of the tutorial, if the user is happy with his results (say he got a 6 and the computer 5) he can tap the “Tweet my results” button and show off in Twitter. Here is the complete code of the button’s action:

-(IBAction)tweetResults {  NSString* message;  if (playerScore > computerScore) {   message = [NSString stringWithFormat:@"I won at iDice %i to %i !", playerScore, computerScore];  } else if (playerScore < computerScore) {   message = [NSString stringWithFormat:@"I lost at iDice %i to %i", playerScore, computerScore];  } else {   message = [NSString stringWithFormat:@"A damn tie at iDice %i to %i ...", playerScore, computerScore];  }    [[TwitterAgent defaultAgent] twit:message withLink:@"http://www.touch-code-magazine.com" makeTiny:YES]; }

As a little extra I added a URL in the message – should have been the iDice app web site, but since iDice still does not have one / :) / I did put the Touch Code Magazine URL address.

And now – tap “Roll dices” and tweet results:

Now that tweeting is fully integrated in my iDice game and I thank Aman for putting in together I go on to testing and security. One thing I won’t like is the fact the user can edit the message: if actually looses he can edit the message as if he had won!

As I said TwitterAgent is quite simple and flexible, I’ll tamper a bit with the code to make the Twitter message editing disabled. In TwitterAgent.m on line 25 there’s the code which initializes the TextView field for the text message. Feels like a good place to change a property of this field. The changed code looks like this:

 txtMessage = [[UITextView alloc] initWithFrame:CGRectMake(15, 80, 250, 60)];  txtMessage.editable = NO;

Easy – now the user must tweet his real results, if he does not want to – he can tap Cancel and forfeit.

What’s next for TwitterAgent integration?

There many other easy tweaks one could do to customize the twitter agent to his needs – first thing coming in my mind is to actually have a delegate which gets notified when the message is sent, localizations, Twitpic integrations, etc.

Aman is also inviting others to join on Google code and bring more features to TwitterAgent – if you feel like you can contribute do go ahead!

Now one side note on security, the TwitterAgent uses plain http to make calls to Twitter, if you are a security freak that might alarm you, but if you are a casual score submitting game author, I guess it’s just fine.

That’s a wrap up for today

You can download the iDice game source code here. If you liked this article please ping me on Twitter or leave a comment.

TwitterAgent’s author’s site – here.

Your friend prasad

facebook integration witn iphone application

Today most of the applications we build have a common feature: Socialize! One common way to achieve this my integrating Facebook within the app.
In my earlier post I have shared a helper class for paginating data. Today I will share how I integrate facebook connect in iPhone apps. I humble admit I am a lazy, if not busy, developer who doesn’t like to write same code again again.
For iPhone applications FacebookConnect is the only way to integrate facebook social features. Facebook team has developed a sdk for iPhone. A sample code showing the use and integration of Facebook Connect in your application. This is quite simple and also tons of tutorials, forums, e-books and videos are out here on the web.
Well, I’m not gonna add few more grams on that! Rather I am going to share how I integrates facebook connects into my apps.
Firstly, let us see what are the steps to add facebook connect. You can also check out this tutorial on facebook wiki or watch the video Implement Facebook Connect on the iPhone in 5 minutes.
Basically the steps for publishing a feed are:
1. Download the sdk.
2. Add the connect source file in your project.
project
3. Update the settings to make FBConnect.h in you header path.
4. In the controller class, have session member variable, many delegate methods.
5. Have a login button to show the login prompt.
6. Once logged in, prepare an attachment json string and show the feed dialog.
These steps are quite simple but if you are a busy programmer and need to work on many projects these steps may be little bothering since you have to rewrite all the codes for loggin in, showing dialogs, handle login events etc.
So, I just encapsulated these repetitive work into a class named FacebookAgent and defined a simple protocol to work on.
Lets see how we can use it.
Objective: Create a simple view based application and publish a feed using FacebookAgent.
1. Download this folder FacebookAgent.zip.
It also includes facebook connect sdk. So you don’t need to add this sdk elsewhere or even update any project settings for this purpose.
2. Create a new project, name it FacebookAgentTest. Righ click on the project in the XCode and select Add existing files. Add the FacebookAgent Folder to your classes. Check copy the source files.

Add FacebookAgent folder to your project
3. In the FacebookAgentTestViewController.h, import FacebookAgent.h and implement protocol FacebookAgentDelegate.
@interface FacebookAgentTestViewController : UIViewController { ...
4. Declare a member variable of type FacebookAgent.
FacebookAgent* fbAgent;
5. Open FacebookAgentTest.m and initialize fbAgent in viewDidLoad method.
fbAgent = [[FacebookAgent alloc] initWithApiKey:@"PLACE YOUR FACEBOOK APPLICATION API KEY"             ApiSecret:@"PLACE YOUR FACEBOOK APPLICATION API SECRET"              ApiProxy:nil];  fbAgent.delegate = self;
6. Declare an IBAction method in the FacebookAgentTest.h file.
-(IBAction)updateStatus:(id)sender;
7. Define the above method in FacebookAgentTest.m file.
-(IBAction)updateStatus:(id)sender{ }
8. Open FacebookAgentTestViewController.xib and add a button in the view and connect the above method on its touchesUpInside signal.

9. Now just add the following lines in the updateStatus method to publish a feed!
-(IBAction)updateStatus:(id)sender{ [fbAgent publishFeedWithName:@"Hellow world"       captionText:@"how are you?"       imageurl:@"http://amanpages.com/wordpress/wp-content/uploads/2009/12/logo2.png"        linkurl:@"http://amanpages.com/"       userMessagePrompt:@"What do you think:"]; }
This code will first check if the user is logged in. If logged in it will show the feed dialog.
If the user is not logged in already, first the login dialog will be shown, after logging in, the feed dialog will be shown automatically!
But one minute, there is one require method in the FacebookAgentDelegate protocol. So, you need to define this:
- (void) facebookAgent:(FacebookAgent*)agent loginStatus:(BOOL) loggedIn{ }
Above method is called when the user logs in or logs out of the facebook. If you use any login button which is very likely, you may change the button title here.
10. Try updating your status. For this use this line:
[fbAgent setStatus:@"status from iPhone 1"];
This will first check if the user is logged in. if not logged in, then it will show the login prompt first.
After log in it will check if extended permission is enabled for this app. if not it will show the permission dialog.
Having given the permission, it will change the user status.
BUT.
11. You need to two more FacebookAgentDelegate method if you want to change status:
- (void) facebookAgent:(FacebookAgent*)agent requestFaild:(NSString*) message{ } - (void) facebookAgent:(FacebookAgent*)agent statusChanged:(BOOL) success{ }
12. Thats all :) Run the app!
You can look into the FacebookAgent.h for more detail. It is well documented. If you still have some question shoot here or drop me mail.
Feel free to use this classes without any restriction but I will appreciate if you let me know in which app you are using it :)
What can be done now using FacebookAgent:
1. Fetch user name:
For this after initialization, set shouldFetchUsernameAfterLogin = YES.
fbAgent.shouldFetchUsernameAfterLogin = YES
and also define the corresponding delegate method:
- (void) facebookAgent:(FacebookAgent*)agent didLoadName:(NSString*) name{     //use the name }
2. Make your own attachment and publish a feed.
// this method has some over loaded versions too - (void) publishFeed:(NSString*)attachement;
3. Publish feed by passing, name, caption, image and link url.
// this method has some over loaded versions too /**  * Let the agent make attachement for you. You just pass the information  *  */ - (void) publishFeedWithName:(NSString*)name     captionText:(NSString*)caption         imageurl:(NSString*)url       linkurl:(NSString*)href      userMessagePrompt:(NSString*)prompt;
4. upload a photo
- (void) uploadPhoto:(NSString*)imageurl;
6. ask for extended permission
- (void) askPermission;
7. login and logout
- (void) login; - (void) logout;
The delegates also offers some handy callback options like:
/**  * Must define this method if setStatus is called  *  * This method is called when user status is changed either successfully or not  */ - (void) facebookAgent:(FacebookAgent*)agent statusChanged:(BOOL) success;  /**  * Must define this method if shouldFetchUsernameAfterLogin is set YES  *  * This method is called after the agent fetched facebook profile name  */ - (void) facebookAgent:(FacebookAgent*)agent didLoadName:(NSString*) name;  /**  * Must define this method if uploadPhoto is called  *  * This method is called after photo is uploaded  */ - (void) facebookAgent:(FacebookAgent*)agent photoUploaded:(NSString*) pid;  /**  * Must impement this method if any of the above method is defined  *  * This method is called if the agent fails to perform any of the above three actions  */ - (void) facebookAgent:(FacebookAgent*)agent requestFaild:(NSString*) message;  @required  /**  * This method is called if after login or logout  */ - (void) facebookAgent:(FacebookAgent*)agent loginStatus:(BOOL) loggedIn;
Here is the demo project. DONT FORGET TO ADD YOUR key and secret!!
FacebookAgentTest

Howto use the Keychain in iPhone SDK to store and retrieve secure Data

Howto use the Keychain in iPhone SDK to store and retrieve secure Data

When you need to store data securely from within your iPhone application, sooner or later you will step over the iPhone keychain. This is the super-duper built-in iPhone safe, kindly provided to you by the fruit company.
Now - take your time to praise Apple for being so wise and foresighted to supply you with the cooked equipment for secure data storage...
..did you do well? Did you rag on some dump Windows users? Fine, then here is one more thing: The stuff ain't that simple to use. Of course, as a blessed Apple user you would expect a simple interface in the fashion of "[keychain getMySecretData] [keychain storeMySecretData]". But when you take a closer look at it you will find that it is rather half-baked - and implementing keychain access might take a little more than a one-buttoned mouse.
First of all, there ain't an easy-to-use keychain API in any of the frameworks delivered with the iPhone SDK. You would have to deal with weird C function calls. For instance, to retrieve data from the keychain you have to invoke something called SecItemCopyMatching, passing in a dictionary as parameter. Completely self explanatory, isn't it? If you're getting curious, you can dive into the secrets of keychain services here. Though in this programming guide the Apple guys are not getting bored emphasizing the straightforwardness and ease of use of the keychain API - there seems to be a little doubt, though.  Cause in the code examples accompanying the guidelines, they build an object-oriented wrapper class around all this cute C-function magic. And this is where we join the game..

The complete example application provided by Apple can be found here. But the only thing of interest to us is the KeyChainItemWrapper. You can think of a keychain item as a record stored in the keychain database. Each keychain item consists of unencrypted attributes, and the actual data, which is encrypted. For instance, a password keychain item could have the account name set as one of its attributes, and the password itself be stored as keychain item data. Apple defines these types (aka classes) of keychain items:
  • Generic Password
  • Internet Password
  • Certificate
  • Cryptographic Key
  • Digital Identity
Keychain item classes differ in the attributes and structure of item data.
The KeyChainItemWrapper is a kind of object-oriented wrapper around a Generic Password keychain item, providing methods for item creation and modification:

- (id)initWithIdentifier: (NSString *)identifier accessGroup:(NSString *) accessGroup

Creates a Generic Password keychain item. If an item with provided identifier is already stored in the keychain data base, it will load its data. If not, it will create a new one and initialize it with empty strings. The identifier should be a string identifying the account the password stored in the keychain item belongs to.
The access group can be used to share the keychain item among different applications. So in most cases, you will not need it, and it can be set to nil.

- (void)setObject:(id)inObject forKey:(id)key

Depending on the value you provide for key, it stores the inObject as keychain item attribute, or encrypted keychain item data. To gain reasonable results, you MUST use the constants defined in the keychain services API for the key. For example, to store an ecrypted password, kSecValueData must be the key, and the actual password must be the inObject. To store a login name as keychain item attribute, use kSecAttrAccount for key, and the login name for inObject.

No later than here you recognize, that even the "object-oriented" KeyChainItemWrapper is not object-oriented, but at most "objective". In a serious object-oriented language, they would have given us methods like [keyChainItem setPassword] and [keyChainItem setAccount]. In reality, we have to tell what we want by passing cryptic constants to generic methods. Well, you will have to get used to it: It's the Apple guys - they don't care about user requirements, they define them themselves.

- (id)objectForKey:(id)key

Get an attribute or data out of the keychain. Just as mentioned in the previous section, you will have to use the pre-defined keychain services API constants for key.

- (void)resetKeychainItem

Delete all attributes and data of the keychain item, and initialize them with empty strings. Note: This does not delete the keychain item itself! Deleting a keychain item is not implemented in the Apple example.
 
Here is a small code example of how to write to and read from the keychain:

- (void) savePassword: (NSString*) password {
    [self.keychainItemWrapper setObject:password forKey:
           (id)kSecValueData];
}

- (void) retrievePassword {
    return (NSString*) [self.keychainItemWrapper objectForKey:
           (id)kSecValueData];
}


Well, now you should be equipped with the basic knowledge to integrate a secure, keychain-based password storage into your iPhone application. 

Don't forget to add the Security.framework to your Xcode project if you want to use the KeyChainItemWrapper!

One important thing to mention is, that with the latest version 1.2, the KeyChainItemWrapper also works on the iPhone simulator. In prior versions it did not. The programmers just forgot to mention this in the revision history. The only thing you cannot use on the simulator is the ability to share keychain items among different applications using an accessGroup. 
I think, you'll get over it..

Tuesday, February 7, 2012

Creating Class Categories in Objective C

As I began refining some sample code for making Universal Apps for the iPhone and iPad, I sought a way to make my code as concise as possible. I needed to determine if the app was running on an iPad or iPhone/iPod Touch and use it to my advantage. This basic information is contained in the UIDevice class.

Unfortunately, using:


         [UIDevice currentDevice].model    

did not do precisely what I needed to do. I needed something specialized. I wanted to add new functionality to the UIDevice class as if it had been there all along.

Looking for Solutions
A few months back I ran into a code sample that adds functionality to the NSDate class called NSDate+Helper. This class, created by a programmer named Billy Gray was my first exposure to a wonderful feature built into Objective C called Class Categories. When I saw how one could do this, it set the wheels turning in my mind at all the possibilities!

In this tutorial I am going to show you how to use class categories, and for our example we are going to add functionality to the UIDevice class for use in ultimately creating a sample Universal App.

Sample Code Info:

Getting Sample Project Source Code & Running it in the Simulator
It would be handy for you to download a copy of our Universal App project to look over and try out. In order to really use it you will need to have an Intel-based Mac computer, and XCode 3.2 or better installed on it. Once you have done this,  you will be able to run it in the iPhone Simulator.

Make sure when running on the simulator that you set the proper build version before doing a build:


Simulating the app running on an iPhone:

Simulating the app running on an iPad:


Running the Sample Project on an Actual Device
If you want to run the project on an actual device rather than just the simulator, you will need to be a paying member of the Apple Developer Network ($99 a year at the time of this post). And you will need to have gone through the hoops of setting up your certificates, app record, and provisioning. ... We are not covering any of this getting on the device stuff in this tutorial.

At least you can run the project in the iPhone Simulator for free! 

Getting In Class Categories

What is a Class Category?
  • You use class categories to add new functionality to an existing class. This could be one of your own classes, or it could be a class in Apple or someone else's API.
  • You do not have to sub-class the class you are adding to.
  • You can add the new functionality in such a way (inside your project) that it seems that the functionality was there all along!

Step 1: Come Up With A Category Name
When creating a class category you are adding some sort of new functionality to an existing class (without touching any of the code actually in the existing class)! If you were to describe in a general way what that new functionality was, how would you phrase it? What "category" would it fall under?  This is something you make up. I make up some sort of camel-cased phrase for my category name. In the case of my new functionality to add to UIDevice, I thought that MyDeviceType captured it well. Perhaps if I had thought about it longer I could have made up something better! But that is what I came up with so that is what I used!

Step 2: Create a Group in Our Project to Place our Class Category in (optional)
The first thing you may want to do is create a new group (folder in your project) to place it in. This is optional, but it can make finding it easier as well as providing some form of internal documentation.

So, for the sake of argument, let's say that this is what you want to do. Let's go through the steps needed to do this:
- First of all click on your project file item (in examples shown in the screen shots, this is "classcat").
- Then control-click on it again to bring up a pop-up menu.
- Click the Add option at the top of the menu...
- Then click the New Group option (see screen shot below)
At this point you will see a new group appear under classcat with the text highlighted and ready for you to edit like in the screen shot below:

Lets rename the group to "Class Categories"...

Step 3: Create a new Class from the NSObject Class
- Control-click on our Class Categories group to bring up the pop-up menu.
- Pick the Add option.
- Pick the New File... option.


- The New File dialog window will appear.
- Make sure that Cocoa Touch Class is highlighted on the left hand side.
- Make sure the Objective-C class option is selected.
- Make sure Subclass of is set to NSObject.
- Then click the Next button.


The next screen will come up. It is looking for you to name the class:


We need to enter our class name. Gotta have some sorta naming convention! We will use the name of the original class we are creating a category for followed by the name of the category itself. That sounds good! So the original class in our example is UIDevice. The name of our class category is going to be: MyDeviceType. So we will type in UIDeviceMyDeviceType.
Above I type in my new class name. Then I would just click the blue Finish button.

Here is the initial header file XCode created:

This file starts out as just a normal class being subclassed from a superclass (NSObject).

Step 4: Modify Our New Class Files and Turn them Into a Class Category
The first thing we will do here is replace the class name UIDeviceMyDeviceType with the class name we are creating a category for. In this case that is UIDevice.
Next we are going to put MyDeviceType in parenthesis and delete the colon, NSObject and the curly braces and end up with this:
 
- Again note that above UIDevice is the existing class we are creating a category for. 
- MyDeviceType is the category name we made up for our category.
- The category name is in parenthesis.
- Although it might seem that we should put the category name in quotes... we do not.
- Again, we removed the normally correct curly braces... to leave them in on our class category will get you errors when you build your project.

While we are at it, lets add some interface definitions for the methods in our class category that we want to make public:
 

There may be other members in our class category than these, but these are available to be used by the "outside world."

Now let's look at the implementation file (the .m file)...



Notice it has the class name we gave originally. After the text UIDevice, we need to put parenthesis around MyDeviceType... Again, no quotes go around the class category name.



There! It is now setup to be used as a class category! All that remains to be done is add any variable declarations and code for our members.

Here is a screen shot showing a partial view of what that could look like:
 

To see an actual working example download the Universal App sample code I have provided.

Step 5: Use New Functionality in Your Project!
The new functionality at this point is ready to be used. There are two ways to make it accessible to various classes in your project:

1. In the implementation file of a class that is going to use this functionality, add an #import line at the top. In our case the line would be:

     #import "UIDeviceMyDeviceType.h"

2. If you are going to use it widely in your project there is a better way! 
Click in the Other Sources group in the project and click on the classcat_Prefix.pch file.
(the first part of the file name is the project name).
 

You will see two import lines defined for Apple framework stuff. XCode puts these in so that the programmer does not have to use #import for anything in these frameworks throughout the project... the #import is implied. Underneath the #import add our import statement:

     #import "UIDeviceMyDeviceType.h"




Save your changes and BOOM! All your new functionality in your new class category is available to project!

You could say:

      NSString *myDev = [UIDevice myDeviceType];

 in your code anywhere in your project and the new myDeviceType method will just work!

Different Uses for Class Categories
Here are some possibilities to think about:
  • Add new functionality to existing classes (especially API type stuff) like we did in this tutorial.
  • Break a large class up into separate files grouping various blocks by function "category."
  • Can you think of anything else? :)
Hope you find this tutorial useful. Any questions? Ask away. If you could rate my Youtube video that would be great too!

Monday, February 6, 2012

IOS 4 FEATURES


 IOS 4 FEATURES

First announced on April 8th and promised for a worldwide release on June 21st, Apple’s iOS 4 upgrade was officially released for public consumption earlier today. The fourth major release of Apple’s mobile device operating system has also been given a new name: iOS, representative of its place on Apple’s entire suite of mobile devices and not merely the iPhone. Despite this, however, today’s release only encompasses Apple’s iPhone and iPod touch devices; an iPad release is scheduled for later in the year.

Downloading and Installing

As with all previous iPhone and iPod touch updates, iOS 4 is downloaded and installed via iTunes. Note that you will need to be running iTunes 9.2 to receive the update. Unlike previous updates, iOS 4 is free for all supported iPhone and iPod touch users, however this update also represents the first time that earlier iOS devices have been excluded—iOS 4 will not run on the original iPhone or the first-generation iPod touch.
The download and installation process is relatively simple: Users can use the “Check for Updates” option found on their device Summary page in iTunes 9.2 and it should locate, download and install the iOS 4 update automatically. In some cases, iTunes may have already discovered the update by itself, in which case you will simply see an “Update” button instead of a “Check for Updates” button.
Note that the installation may or may not preserve all of your existing data—as with previous iOS updates it may result in the wiping of your device’s data under certain conditions. In at least one case we received a warning from iTunes that this was going to happen as part of the upgrade process, however the absence of such a warning should not be considered a guarantee that you’re not going to have to reload everything.  As a rule, it would appear that second-generation iPod touch and iPhone 3G devices will require a complete restore as part of the update process, while iPhone 3GS and third-generation iPod touch models may be able to upgrade in-place.
In addition to the backups that iTunes normally keeps, an additional backup of your device will automatically be made prior to applying the update.  Unlike previous updates, iTunes will specifically notify you of this.
This backup may take some time—unlike previous iOS updates, iTunes will backup ALL of the data from your iPhone or iPod touch, including your media content. This ensures that all content can be restored to the device even if it does not already exist in iTunes. Following the update, iTunes will automatically restore all content back onto your device as a separate process, rather than simply syncing it from iTunes in the normal manner.

Model Differences

iOS 4 also represents the first update where some features are only supported on specific iPhone and iPod touch models. While some of this variation existed with previous updates, it was generally obvious due to hardware limitations—for example the lack of a camera on the iPod touch.
With iOS 4, the differences are a little bit more vague, with only the iPhone 3GS and third-generation iPod touch devices supporting the full range of features offered by the new version. The iPhone 3G and second-generation iPod touch will support iOS 4, but users of these devices will find features like multitasking and home screen wallpaper support to be conspicuously absent. Further, the 2007 devices: The original iPhone and first-generation iPod touch are left completely out in the cold: iOS 4 isn’t even available for these devices.
It’s probably also worth noting here that the 8GB iPod touch still being sold by Apple is actually a second-generation model and users of these devices will still experience the same limitations as any other second-generation iPod touch.

General and System-Wide Changes

iOS4 introduces a number of significant changes to the overall operating system, adding significant features such as multitasking for third-party applications, system-wide spell check and home screen enhancements.

Multitasking (iPhone 3GS, iPhone 4, 3G iPod touch)

Probably the most-anticipated feature of iOS 4, Multitasking now allows third-party applications to perform certain important tasks in the background and access other new features in the OS to provide better user interaction when running in the background.
What it Does
In computer parlance, multitasking refers to the ability of multiple programs to run simultaneously, and to be clear the iPhone OS has always inherently supported multitasking: E-mail and text messages arrive in the background whether those apps are running or not, the iPod keeps playing music after you close the app, and the Phone app doesn’t have to be active for an actual phone call to be received. The problem was that until iOS 4, multitasking was restricted to Apple’s own core applications, presumably on the basis that only Apple knew best how to manage the resources of the iPhone operating system and preserve the best user experience in terms of battery life and performance.
iOS 4 finally changes this approach and allows third-party applications to multitask, albeit in a limited fashion. Third-party apps can perform certain specific tasks in the background, but they are not allowed to simply continue running in the background. Instead, apps are limited to the following specific functions when not running as the foreground application:
Background Audio: Third-party applications will now be able to take advantage of what Apple’s own iPod application has been able to do for three years: Keep playing music or other audio in the background after the app has been closed. Apple has already demonstrated this with Pandora Radio, and numerous other third-party audio streaming apps will no doubt begin to take advantage of this feature as well. Essentially, this allows third-party audio applications to work in much the same way as Apple’s own iPod application—not only will audio keep playing after the app is closed, but the home screen, lock screen and in-line headphone controls will be used for the currently-playing app.
Background VoIP: Applications such as Skype will be able to stay online in the background so that users can receive calls while using other applications or simply while the iPhone is in standby at the lock screen. In-progress calls using VoIP applications should appear with a status indicator at the top of the screen similar to the one used for the built-in Phone app.
Background Location: Navigation and other location-based applications will be able to poll for location information in the background so that they can provide voice guidance or update location-based online services. This mode will use cellular tower information whenever possible to save on battery drain from regularly accessing the GPS hardware. Apple has already demonstrated this with TomTom and Loopt, and Navigon has indicated that it will be adding support for this in an update to its Mobile Navigator app.
Local Notifications: With iPhone OS 3.0 last year, Apple introduced a new “Push Notification” feature that allowed network-based services to send notifications to iOS devices. Although this feature was great for services such as Facebook and AIM where notifications were coming from the Internet anyway, it was of less use for applications that resided natively on the device such as task management and reminder apps. This forced some developers to set up their own servers and synchronization systems merely to be able to provide reminders to their users. Local Notifications address this by allowing third-party applications to schedule notifications directly on the iOS device. These work in the same way as Push Notifications in that the notification can update a badge on the icon, display an alert and/or play a sound, however you will not need an active Internet connection to receive a local notification.
Task Completion: iOS 4 will now allow applications to take up to 10 minutes to complete tasks in the background after you exit the app. This will be particularly useful for applications that upload or sync information with online services. For example, an application could finish uploading photos to a service like Flickr in the background after the user exits the app, saving the user the trouble of having to leave the app open and wait for the upload to complete.
Fast App Switching: Applications can suspend in the background when the user leaves the app and return to the exact same place when the user loads the app up again. Applications will not actually run in the background, but merely freeze in their current state, allowing them to be quickly reloaded so the user can pick up where they left off. Any iOS 4 native app should take advantage of this feature automatically.
What Multitasking Won’t Do
As already noted, iOS 4 doesn’t introduce a “carte-blanche” multitasking environment where third-party apps can simply stay running and do as they please. Apps will be limited to the specific behaviours described above and nothing else. Apps cannot launch or perform any background tasks by themselves until the user specifically launches the app—Task Completion lets the app finish what it’s doing after the user closes it, but it doesn’t allow the app to keep running indefinitely. Likewise, Local Notifications can only display information that has been scheduled by the app when it was last run, they can’t actually launch any background processes. One significant limitation of this is that applications that sync with online services will still not be able to sync up and download current content until the user actually opens the app.
How it Works
iOS 4 only supports multitasking on the iPhone 3GS, third-generation iPod touch and upcoming iPhone 4. The multitasking features are inherent in the OS and although applications must be updated by their developers to support the new multitasking features, there is nothing the end user needs to do—the multitasking features for a given app should “just work.”
To facilitate quickly switching between applications, however, Apple has introduced a new recently-used apps dock. On devices that support multitasking, double-clicking the Home button from within any app will slide up the current screen to reveal a dock displaying the four most recently opened applications. You can open these applications by tapping on them in the usual manner, or swipe to the left to display more recently-used apps, four at a time.
Note that ALL recently-used apps are displayed here, regardless of whether they support any iOS 4 multitasking features or not. Pre-iOS 4 apps will simply behave and launch from here in the same way as they did from the home screen in iPhone OS 3.x. Keep in mind also that you don’t have to launch apps from here to take advantage of fast-app switching or any other iOS 4 multitasking features—you can still launch apps from their normal home screen position in the same way that you always have. The app switching dock is primarily there to provide a convenient way to move between apps.
The app switcher does provide one additional hidden feature: If you tap-and-hold on an app icon in the dock area, a red button will appear over each icon. Tapping on the red button for an application will terminate that app and remove it from the recently-used apps list.
Note that unlike other mobile platforms, iOS 4 is supposed to handle memory and resource management automatically, and most applications won’t actually be running in the background—this “task-killer” functionality is included for cases where a specific application needs to be restarted rather than situations where a user needs to close a bunch of apps for performance reasons.
On multitasking-capable devices a double-tap of the home button is now hardcoded to open the app switcher. Older devices that do not include multitasking capabilities still allow the home button to be customized for other functions as before.
Playback Controls & Rotation Lock
With the home button double-tap reassigned to the app switcher, the pop-up iPod playback controls are no longer available in the same way on multitasking-capable devices. Instead, swiping to the right from the app switcher will reveal a set of media playback controls.
The standard play/pause and track navigation buttons are here. Conspicuously absent compard to the previous playback controls is a volume slider, presumably redundant as all current iOS devices now include hardware volume buttons. To the right of the playback controls is the icon for the currently playing application—this defaults to the iPod icon when no music is playing, but will be replaced with any application currently providing background audio such as Pandora Radio or even the Safari icon when streaming audio in the browser.
To the left of the playback controls is an orientation lock button that can be used to lock the screen in portrait view. When locked in a portrait orientation, a lock icon will also appear in the status bar beside the battery meter.
Note that these new playback controls are only available on multitasking-capable models. The older non-multitasking capable devices still display the pop-up playback controls in the same manner as before.

Home Screen

iOS 4 adds a few iterative enhancements to the home screen. Although the same basic layout is used as in prior iOS versions, users can now replace the black background with a custom wallpaper and organize applications into folders.
Wallpapers (iPhone 3GS, iPhone 4, 3G iPod touch)
First introduced with the iPad back in April, iOS 4 now gives users the ability to specify a wallpaper for the iPhone or iPod touch home screen. As with multitasking, this feature is only supported on the iPhone 3GS and third-generation iPod touch, as well as the upcoming iPhone 4. Users of these devices can specify a wallpaper for their home screen simply by visiting the Wallpaper setting in the Settings app. In the wallpaper settings, screen previews of both the lock screen and home screen are shown with the currently-selected wallpaper for each.
Tapping on these previews will take you to the standard wallpaper selection screen, where you can choose from a pre-installed wallpaper or select one from your own photos. iOS 4 has also bundled several new wallpapers that provide suitable textured backgrounds for the home screen.
Selecting a wallpaper is handled in much the same way as in prior iOS versions, excpet that when actually choosing a wallpaper, you will be prompted for where you want to use it.
Setting a wallpaper from other applications, such as directly from within the Photos app, will produce the same prompt for whether to set the wallpaper on the Lock screen, Home screen, or both.
Note that iOS 4 doesn’t provide any way to remove the Home screen wallpaper and return to the default black background. If you prefer basic black you’ll need to create your own 480 x 320 black image and store it in your device’s photo library to use as a wallpaper. That said, the textured backgrounds included with iOS 4 provide some nice alternative options without appearing too cluttered.
Folders
Although iOS 4 contains the same limit of 11 home screen panes, you can now organize your applications into individual folders. A Folder can appear anywhere that a normal application icon can, and is represented by a collection of app icons representing those apps stored in the folder. Each folder can contain up to twelve applications. The use of folders increases the number of applications that can be accessed from the home screen from 180 to 2,160.
Unlike many other systems, there is no separate step to create a folder in iOS 4. Instead, you simply tap-and-hold to reorganize your app icons in the usual manner and then drop one application icon on top of another. The two application icons will be grouped together into a folder which will be given a default name based on the category of the applications.
While in edit mode you can tap on the name field to type in your own name instead of the default. Additional applications are added to an existing folder in the same manner: Simply drag-and-drop application icons on top of the folder while in home screen editing mode. To remove appliations from a folder, simply open the folder, tap-and-hold to enter edit mode, and then drag the apps out of the folder. While in edit mode within a folder, you can also rename the folder simply by tapping on the name. The entire process is relatively seamless and intuitive. Folders can also be moved between home screens in the same way as any other application. Note that folders cannot contain other folders.
iTunes 9.2 also allows folders to be created and managed from the iTunes “Apps” sync settings in much the same manner. See our iTunes 9.2 Article for more information.

Spotlight Search

The system-wide Spotlight Search introduced in iPhone OS 3.0 can still be found to the left of the first home screen. In addition to the content previously available, SMS/MMS messages can now be searched from here, and at the bottom of the search results additional options now appear to search Wikipedia or search the web using the device’s default search engine. Selecting either of these options will open the Safari browser and initiate a search accordingly.

Spell Check

First introduced for the iPad with iOS 3.2, iOS 4 now brings a system-wide spell check to iPhone and iPod touch devices. Incorrectly spelled words are highlighted with a red underline, and tapping on an underlined word will provide suggested corrections.
This is a system-wide text entry function that not only works with the built-in iOS 4 apps but should also work in all third-party apps that use standard text-entry controls.

Wireless Keyboard Support (iPhone 4, iPhone 3GS, 3G iPod touch)

First introduced for the iPad in iOS 3.2, iOS 4 adds support for external Bluetooth keyboards for the iPhone 4, iPhone 3GS and third-generation iPod touch. Keyboards can be paired from the Bluetooth options under Settings, General and once paired can be used in place of the on-screen iOS keyboard, which will not be displayed by default when a Bluetooth keyboard is available.
As with the iPad, when using an external keyboard, basic keyboard shortcuts are available for text selection and cut, copy and paste. The brightness, volume and media playback controls on Apple keyboards also work as expected, and the Eject button can be used to show or hide the on-screen keyboard.

Settings

There have been a few enhancements to the general iOS device settings as well. Application-specific settings are highlighted later on in the changes to the applications themselves.
Network Settings (iPhone)
An option is now available to enable or disable cellular data entirely. Toggling off the “Cellular Data” option disables all 3G and EDGE data access over the cellular network, essentially turning the iPhone into a Wi-Fi only data device. This can be useful in situations where you don’t have a data plan on your device or are coming close to exceeding your data cap. You will still be able to make and receive phone calls with cellular data off.
AT&T users may also notice that the “Internet Tethering” option has finally appeared here as well. Although new to AT&T, this is not an iOS 4 specific feature—other carriers have supported tethering since it was first released in iPhone OS 3.0, and there have been no changes in iOS 4 in terms of how this feature works.
Location Services
iOS 4 provides more granular control over location services. Previously only available as a global on/off toggle, you can now control which specific applications have the ability to determine your current location.
Applications that have requested your location data within the past 24 hours are indicated with a small compass arrow next to them. iOS 4 also provides a similar status indicator by the battery icon to indicate when location data is being used.
Passcode Lock
You can now choose to use a more complex alphanumeric passcode to secure your device. This option was available in iPhone OS 3.x, but only by creating a profile through the use of Apple’s iPhone Configuration Utility. The “Simple Password” option is enabled by default which uses the same four-digit password option as before; toggling this option off will prompt you to instead enter an alphanumeric password using the normal iOS keyboard.
You can also now access the passcode settings screen without having to set a passcode first. Most options will appear greyed out and a “Turn Passcode On” button appears at the top of this screen. This allows you to specify whether you want to use a simple or complex passcode before having to actually set it.
Restrictions
Austria has been added to the list of countries that ratings can be selected for. The actual Movies, TV Shows and Apps restrictions screens also now include checkmarks beside all allowed ratings and not merely the highest one. This makes it more clear which specific ratings are allowed.
Home / Spotlight Search
As noted earlier, on devices that support multitasking, a double-click of the Home button is now hard-coded to display the app switcher. As a result, the Home button configuration screen is no longer available on these devices. The “Search Options” sub-menu previously found under the “Home” section has been renamed “Spotlight Search” and is now displayed directly under General settings on these devices. Older iPhone and iPod touch models that do not support multitasking and the app switcher still include the “Home” settings and place the “Spotlight Search” option in that section as before.
Spotlight Search
Search Options has been renamed “Spotlight Search” and adds “Messages” to the list of data types that can be searched.
Further, as noted above the location of the Spotlight Search option now differs depending on whether the device being used supports multitasking and the app switcher.
Keyboard Settings
The keyboard selection and settings screens in iOS 4 have been redesigned to provide additional options. Prior iOS versions simply provided a list of keyboards with ON/OFF toggles beside each one. iOS 4 on the other hand provides a list of the currently active keyboard layouts with an “Add New Keyboard” button displayed below to add additional keyboards.
Keyboards can be removed or reordered from this list by tapping the “Edit” button in the top-right corner.
Some keyboards have more detailed options, indicated by an arrow to the right of the keyboard name. Tapping on the keyboard will bring up an additional options screen allowing you to set the layout for software and hardware versions of these keyboards.
As with prior iOS versions, when more than one keyboard is configured, a small globe icon will appear to the right of the spacebar in the on-screen keyboard. With iOS 4, tapping-and-holding on this button will provide a pop-up list of keyboards.
iOS 4 also adds several additional keyboard layouts: Catalan, Chinese-Simplified Stroke, Chinese-Traditional Cangjie, Chinese-Traditional Stroke and Vietnamese. Keyboard layouts are also now sorted alphabetically based on the current language and not on their native language (ie, “Spanish” now appears in the S section and not the E section).
International Settings
Languages have also been added to match the new keyboard settings, including language support for Català, Magyar and Vietnamese.
New Regional Formats include: Slovenian, Portuguese for Guineau-Bissau and Mozambique, Spanish for Equatorial Guinea, Russian for Moldova, Romanian for Moldova, Armenian, Mauritius and French for Cameroon, Central African Republic, Côte d’Ivoire, Guadeloupe, Guinea, Madagascar, Mali, Maritnique, Niger, Réunion, Saint Barthélemy and Saint Martin.
iOS 4 now also supports multiple calendar formats which can be selected from the International settings. Formats include Gregorian (default), Japanese, Buddhist and Republic of China.

IOS 5 FEATURES

 

 IOS 5 FEATURES

1. Wireless Sync and activation

Literally right out of the box, new iOS devices will be able to activate without a PC with wireless activation.  That’s something that Apple customers have been screaming for as some don’t want a computer, they just want an iPad.  This new feature fills that need.  And iOS devices don’t have to sync through a USB connection to iTunes.  Using a WiFi connection, users can backup to iCloud, as well as sync to iTunes on their PC.  And with new over the air (OTA) updating, users won’t have to sync to iTunes to get the latest iOS updates, something Android users have enjoyed since day one.  And any time you plug your iPhone into an AC outlet to charge, the iPhone will automatically sync to the Cloud via WiFi and look for a software upgrade.

2. Notification Center


The next new feature is another that isn’t really new to Android users, but that iOS 5 does quite elegantly … it’s the new Notification Center.  When users receive a message, whether text or email, iOS 5 will drop down a notification bar in the upper edge of the screen without kicking users out of the app they’re using at the moment.  Users can then swipe down to pull down the bar for more details. If there’s multiple messages, users can simply swipe to reply to messages.  For messages that come in when the iOS device isn’t being used, the Notification Center has lock screen notification, and a simple swipe will reveal and swipe to reply.

3. Greater Accessibility


This is so high on the list because Apple has always made accessibility to iOS a priority.  And these tweaks really help those who are hard of hearing or blind to further use their devices.  Features include LED Flash and vibration activation for incoming calls, improved voiceover support, a hearing aid mode for altering voice and voiceover, and custom gestures to perform key tasks.  Other improvements include a  larger text option, New speak selection, New assistive touch settings, and the ability to Set Mono Audio left or right.

4. Twitter Integration

With iOS 5, Twitter comes built in.  All users need to do is go into settings, select to install the official Twitter app and sign in.  New users can register within iOS 5 without having to launch the browser and go to Twitter to sign up. Once installed and activated, users will find Tweet options in several places from the Safari browser, the camera app, maps, and contact information where Twitter handles can be added.  Additionally, the keyboard has been redesigned for more prominent #(hash-tag) and @ (mention) keys.  Location services can also be added to any Tweet, making Tweet ups easier to create.

5. Greater phone support

You remember that the iPhone is actually a PHONE right?  It can make and receive calls!  That’s what my wife likes to joke about.  Well with iOS 5, users have greater phone support including deleting of individual phone calls with a wipe, unsecured call warnings, location notifications for calls not in contacts, and users can now edit their phone number in settings.

6. Enhanced email features

With iOS 5, users can now add a little more flair to their emails with rich text editing of italics, bold, underline, and even indenting.  And to make addressing an email even easier, users can now drag email addresses to address fields.  Email also will have the ability to organize messages easier with the addition of custom folders. And users can now select & mark multiple emails as read.

7. Enhanced contact features

iOS 5 brings a few extra fields for contact management.  Users can now add family relations, as well as social media links

8. iMessage between iOS devices


Users can also send unlimited messages directly to users of other iOS devices with iMessage.  iMessage allows you to send pictures, video, text messages, group messages, and contacts to any other iOS device – iPhones, iPads, and the iPod Touch.  Users can set up to receive delivery notification and receipts.  iMessage works on both 3G and WiFi, and messages are encrypted.  And just for fun, users can now use animated GIF images in iMessage (only).

9. Airplay wireless mirroring

Airplay mirroring comes to iOS 5, allowing users to use their iOS device through AppleTV on their TV set.  Suddenly, that iPhone or iPad screen is 50″, making it ideal for meetings or even game play.  And the image will also rotate on the TV as it does on the iOS device as you alter it.

10. Enhanced camera control

Users have been screaming for this feature and now they have it.  In iOS 5, users will be able to take capture those instant moments with a Lockscreen camera control, meaning that they don’t have to go into the camera app to snap a picture.  Additionally, users can use the up volume button to snap photo.  And users have greater control over what the iPhone focuses on with one tap auto focus.  In camera editing features are also added including with red eye reduction, rotating, and cropping.   Users can also organize their photos in camera roll with the addition of albums. And here’s a great additional option – users can use their iPhone earbuds as a remote trigger by using the Volume UP button.

11. Photostream

Through Photostream, users can now automatically upload images and videos to the Cloud and directly to all iOS devices and their Desktop PCs.   Additionally, iCloud stores every photo for 30 days and every iOS device will store the last 1000 snapshots.  Your Desktop, however, can store them all.

12. Improved Facetime features

Apple has also finally freed Facetime from the confines of WiFi.  Users can now video conference over 3G.  And they don’t need a SIM to initiate a call either as calls can be made via phone number or email address.  And what could be better?  How about airplay support?  Facetime now enjoys airplay mirroring for video conferencing over your TV set through AppleTV.  And video quality is improved.

13. iCloud

Here’s the biggie.  Users can take advantage of the Cloud with wireless backup and restore.  Users can also schedule daily over the air backup or disable iCloud syn via 3G to save bandwidth.   As previously mentioned, iOS 5 will also automatically sync and backup to iCloud every time users plug in their phone to recharge and look for updates.   Images, videos and files are also backed up to the Cloud and synced down to other iOS devices as well as your PC via iTunes.  And speaking of iTunes, users have the option of a free 256kb upgrade of songs if backing up to iCloud, with any apps or music purchased not counting towards their monthly cap.  Users get 5GB free, with additional storage options ranging from $20-100 annually.  And  Find My iPhone is also available as a part of iCloud integration with an option to disable it.

14. Calendar enhancements

Calendars become more useful with a tap to add event option, tap and drag to adjust time and duration of an event, swipe left or right to view a different day, and viewing of event attachments.

15. Location based Task manager

iOS 5 makes people more productive now with the Reminder Task Manager.   Tasks can be created and checked off, as well as syncd w/ iCal and Outlook.  Reminders can also be location based, meaning when your iOS device sees where you’re in the vicinity of a task, it’ll remind you to do it. reminders. Reminders — Instead of taking notes on your iPhone’s notepad app or putting a reminder in your calendar, you can now use Reminders in iOS to create a digital to-do list right on your iPhone. The geo-location abilities will trigger surrounding events for you to choose from.

16. Storage usage and clean-up

Here’s a nice feature for housekeeping of your iOS device.  iOS 5 brings Storage Usage Clean Up so that we not only see what files have taken up space but also the option to empty that space of Apps, Game saved data, Music, Videos etc. with single wipe.

17. The Assistant

iOS 5 brings a Voice activated assistant feature.   With a long press of the home button, your iOS device will interact and respond to voice commands. Users will be able to drive hands free and tell the phone to send email, texts, get maps, tweet, and even make phone calls.  Based on the popular Siri app, which Apple recently purchased.

18. Split keyboard for iPad

If you’ve ever used an iPad, you know how hard it is to thumb type.  So iOS 5 adds a split keyboard option to make it easier to type in portrait mode.

19. Video and music now separate apps

With iOS 5, the iPod app is retired in exchange for separate video and music apps.  Seems kind of odd, but it was actually done with the iPod Touch, so this change makes it consistent across all iOS platforms.  Users can also move between tracks with a swipe to the left or right (iPad only) and a slide will delete a song right away.

20. Custom Tones

To make the iOS experience more personal, users can now add custom tones for Calendar events, send/receive mail, voice mail, week view on calendar, year view on calendar (iPad) and more.  And of course, that means a new TONES App store!

21. Dictionary

Not an earth shattering feature, but it’s nice that dictionary has been added and is available in every app.

22. News stand subscriptions

Available through iBooks, users can now subscribe to magazines and newspapers.  Searching by popularity of subscriptions is also a plus.

23. Cellular Network for App Store

If users want to be stingy with their bandwidth and only download apps over WiFi, they now have the option to Enable or Disable App Store downloads via GPRS and 3G.

24. Faster Safari

Safari has become streamlined and is faster to load.  Users can also save web pages in reader mode which eliminates all ads to make them easier to read.  They can also be saved off line to read later.  And in the iPad, Safari also offers Tabbed Browsing support.

25. Alternate Routes in Google Maps

Ever frustrated when Maps gives you a route that’s longer or goes out of the way?  In iOS 5, users can choose alternate routes that are more to their liking.  For those who prefer things old school, users can now print directions from their iOS device.

26. HD YouTube

Users now have the option to stream HD/HQ videos through YouTube over 3G.  For those concerned about bandwidth, the ability to disable HQ video playback is also available in settings.  Nice.

27. Disable In-app Purchases

As a dad, I really appreciate this option.  With iOS 5, users now have the option of disabling in-app purchases.  No longer will I have to pay for things I didn’t want to buy because the purchase was done in-app without our knowledge or consent.

28. Game Center Enhancements

By contrast, Game Center now allows in app purchases of games.  Users can also further personalize their account with photos, and decide if your profile is private or public.

29. Weather updates

The iOS weather app becomes more useful with hourly updates, local weather, and the ability to swipe the weather widget in Notification Center to see a 5 day forecast.

30. MultiTasking

Users can now do gesture based multi tasking (iPad only).  With a swipe of 4 fingers, the app switcher appears.  Pinch will return to home screen.  And a swipe left and right to switch between  any actve apps
There are over 200 new features to iOS, and depending on which iOS device you use, some or all are available to enjoy.  But it’s certainly a well thought out and welcome update which will only get better with the addition of the new iPhone!