Posts Tagged ‘iPhone OS 3.0’

5 Predictions About iPhone OS 4 Features

April 7th, 2010

Back in 2009 when iPhone OS 3.0 was released the most anticipated feature was multitasking. After a year, now that Apple has decided to preview iPhone OS 4 this Thursday, multitasking still remains as the feature with the highest demand. Of course there are other expectations from users and Apple also promises to throw in a bunch of other changes most of which are tweaks like User Expo, which is the Home Screen for iPhone.

Let’s try to predict some of the features for iPhone OS 4 and we can come back to check once we have the final words from Apple.

Multitasking: Of course, this is the most expected feature this time. Well, it was rumored last year that iPhone may get Multitasking with the release of iPhone OS 3.0 but when they previewed it, they showed off Push Notification and positioned it as an alternative to Multitasking. Though, this Push Notification services were first demonstrated with the release of iPhone OS 2.0 however got delayed by a year and finally released in iPhone OS 3.0. Today, when all the iPhone competitors have multitasking as their major feature it becomes all the more essential for iPhone to have multitasking. Let’s hope Apple finally gives us multitasking with OS 4.0 and just not come up with another weak alternative.

Better Notifications: iPhone OS 3.0 pushes you the notification right away, whether its an IM you received or to join a multi-player game online. But this notification system is really at its initial stage of development. These notifications come to the user’s iPhone even when the App is not running in background (as iPhone doesn’t allow yet). So, the parts of the notification system includes badges count, sound & window popup alert. If you’re working on any App on your iPhone and you received an Alert Window notification, you can respond to right there. If at all you quit that notification window you need to go to that app and run it & if you forget to do so then you miss it completely. Given the situation it would be extremely helpful for users if Apple improves this notification system, so that the users can view all the unanswered notifications on a separate screen or something similar. Well, let’s see what iPhone OS 4 has to give us on this.

Better Mail App: The current Mail App need each accounts to be configured separately. All accounts have their inbox separate from other accounts. So, the whole navigation flow to check your inbox is to tap, tap & tap to go from one inbox to other. It’s been expected that there will be a common inbox for all the mails account.

Better Syncing: Apple may introduce a whole new way for syncing Mails, Contacts, Calendar and Multimedia content. Today, iPhone does sync perfectly but there are some itches when it comes to third party syncing options. Like, Google Sync.

Some tweaks with Home Screen: If at all Apple gets multitasking to iPhone via iPhone OS 4.0, and then we should see some little tweaks with the Home Screen. There can be a better way to switch between Apps. It’s also expected that iPhone may have more number of Home Screens (if at all they plan to keep same Home Screen pattern), which currently can only hold around 180 apps on 11 screens.

Apart from this, there can be many minor tweaks for iPhone in 4.0 releases. Let’s wait for 8th April and see what iPhone OS 4.0 has to offer.

Tags: iPhone OS, iPhone OS 3.0, iPhone OS 4.0, multi tasking

Memory Issues in iPhone OS 3.0 : Sample Code

August 26th, 2009

As mentioned in a previous article by Rama Krishna the memory issues in iPhone OS 3.0 relating to UIImageView can be reproduced easily. And here is such a re-production. You can download the iPhone sample application and see for yourself what the problem is. Just open the project, build it for the device (not the simulator) and run it with Instruments (ObjectAlloc) to see a nice little upwards running ramp developing on screen.

Oh!! but remember to run the app on iPhone OS 3.0 and not on iPhone OS 3.1 (the bug has apparently been patched for this version)

Tags: iPhone App Developers, iPhone app Developers help, iPhone Application sample code, iPhone OS 3.0, iPhone OS 3.0 issues, iPhone OS Bugs

Custom URL schemes and Launching other applications — Best Practices for iPhone OS 3.0

August 24th, 2009

How to open other applications like phone dialer, SMS, Safari, Google Maps, iTunes or AppStore or any other iPhone application?

“openURL” is the API to use to achieve any of the above and many more.
If you need to let your application users quickly dial APPLE from within your app, just include the following line

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel:8006927753"]];

Similarly, you could initiate SMS application by using openURL with “sms: “, but unfortunately you cannot fill in the SMS content as Apple does not yet support it.
There are many more things you could do with this API like launching Google Maps, Safari with any website like you want or even the AppStore links to your apps which you want the users to buy.

Checking support for URLs of other applications
Until the release of iPhone OS 3.0 it was not possible to find if there are any applications installed on the device which handle the URL scheme you are about to use. But now it is possible through the following API

- (BOOL)canOpenURL:(NSURL*)url

Call the above API before using “openURL” to make sure your call will “certainly” be handled by a registered application. If you were developing an iphone app which lets a phone call be made from within it, do the following

// this will fail if the device is an iPod
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"tel:111"]])
{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel:111"]];
}
else
{
// show an Alert here indicating that the call can’t be completed
}

Apart from using “canOpenURL”, do check the return value from “openURL” too and take appropriate action.

You should also use “canOpenURL” to find out if any features (like calling a number and SMS) that are not accessible on iPod should be disabled or hidden. Showing “phone” icons and letting them be clicked in your application on an iPod is a sure shot way to get your application rejected for uploading to AppStore.

Registering and handling custom URL schemes
If you are developing a great tool and can be used by other applications, you can register custom URL schemes and implement them. To create custom URL schemes just add them to your application’s “info.plist” file.

  • To the root element of your application’s “info.plist” file, add a row with key named “URL types”.
  • Expand it to find “item1″ in it, expand it and edit the value for key “URL identifier” to look something like “com.yourcompany.yoururlscheme”
  • Add another row to “item1″ with key “URL Schemes”. Type in the first few characters of your URL scheme.
    For an example, if you wish to use url formats like abc://part1/part2, just enter “abc” for URL Schemes

Once you have created and registered your own URL formats/schemes, you can handle incoming URL requests by implementing the following UIApplicationDelegate method

- (BOOL)application:(UIApplication*)application handleOpenURL:(NSURL*)url

Before parsing and/or handling the URL, make sure it is in the right format and follows all rules of your URL scheme.

The above method was the only place where you can handle incoming URLs until iPhone OS 3.0 arrived. For iPhone OS 3.0 and above, the preferred place to handle incoming URLs is

- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions

This method should return whatever “handleOpenURL” API would have returned if it were implemented. If you implement the above delegate method of UIApplication, IPhone OS will not invoke the following methods

- (void)applicationDidFinishLaunching:(UIApplication*)application
- (BOOL)application:(UIApplication*)application handleOpenURL:(NSURL*)url

Tags: Best Practices for iPhone OS 3.0, iPhone App Developers, iPhone app Developers help, iPhone App Development, iPhone Custom URL schemes, iPhone OS 3.0, iPhone SDK Help