Gierad Blogs

because he dreams for the wisdom of an owl, but has a memory of a goldfish

Sneak Peek of iPhone OS 4.0

May14

On April 8, 2010, Apple introduced iPhone OS 4. It is Apple’s fourth major iteration of its limelight mobile operating system with over 100 new features, including the highly sought multi-tasking capability. The new version includes major user experience improvements,  including updates targeted to Enterprise customers.

The new look of iPhone OS 4 includes a 3D dock, and a customizable wallpaper.

Apple illustrates the major updates of iPhone OS 4 into “tent poles” which are described in the next section.

1. Multi-tasking

This is perhaps the biggest update to iPhone OS 4. Make no mistake, the iPhone already supports multi-tasking on some of its native applications like Mail and iPod. However, it has closed this door to third-party applications because allowing them to run in the background affects the phone’s battery life and performance.

The big question to ask is: how does iPhone OS 4 support multi-tasking without affecting performance?

Rather than allowing applications to run freely in the background, Apple’s approach is to provide a la carte multi-tasking services. This ensures that an application will only use the multi-tasking function it needs without adulterating the performance of the entire device.

The multi-tasking services that are offered for iPhone OS 4 include:

  • Background Audio - this service will allow applications like Pandora, and Ambience to play audio on the background.
  • Voice Over IP - this service will allow applications like Skype, and Fring to receive VoIP calls even when the application is not running.
  • Background Location - this service will allow applications like Loopt and FourSquare to constantly update user location even when the application is not running. Instead of polling GPS data, this service will use triangulation to retrieve location.
  • Local Notifications - this service will allow productivity applications such as to-do lists and calendars to send notifications to the phone without having to use Apple’s Push Notification Service (PNS).
  • Task Finishing - this service will allow tasks that take a while to load (like uploading a picture on Facebook) to run in the background even when the application is not active.
  • Fast App Switching – this service will allow an application to save its entire state (i.e. state of a chess game) to enable users to swiftly change between applications without any delay.

With the iPhone OS 4 sporting new multi-tasking capabilities, there is a lot of creative potential for forthcoming applications.

With Multi-tasking, users can switch between apps at anytime by double-clicking the home button. Running apps can be killed by tapping and holding the app icon.

2. Enterprise

Enterprises have long had rancorous feelings about supporting the iPhone. In iPhone OS 3, the iPhone had spotty support for key enterprise features that were critical to enterprise adoption.

The release of iPhone OS 4 provides some important updates that might entice Enterprise decision-makers to take a second look at the iPhone. These new features include:

  • Data Protection
  • Wireless App Distribution
  • Improved Mail
  • Mobile Device Management
  • SSL VPN Support

Other major features of iPhone OS 4 include:

3. Folders

Scrolling through multiple pages before finding that favorite application? Android users don’t have a problem with this. However, with iPhone OS 4, applications can be organized and grouped into folders. Dragging the application on top of another application automatically creates a folder, reducing clutter. This also increases the current limit of 180 applications to 2160.

With Folders, apps can be organized to reduce clutter and improve usability.

4. Even Better Mail

With iPhone OS 4, the Mail application now supports a unified inbox. It also includes support for viewing messages as threads, and opening attachments using third party applications.

5. iBooks

Apple’s e-reader application that comes pre-installed on the iPad will be available to iPhone users with the update of iPhone OS 4. Similar to Amazon’s Kindle e-reader, a massive library of books can be purchased and downloaded straight from the iBooks application.

6. Game Center

With Apple’s successful business model for game development and distribution, is not surprising why Nintendo calls them “the enemy of the future”. In a move to aggrandize its market share, Apple is providing a new social platform for its avid gamers by introducing Game Center on iPhone OS 4. With Game Center, users can play multiplayer games, view ranks, and chat with their favorite buddies similar to Xbox Live.

Game Center provides a social platform for avid iPhone / iPod touch gamers similar to Xbox Live.

7. iAd

iAd is Apple’s new mobile advertising platform to help developers with revenue generation. Current ads found in most free iPhone applications resemble that of classic web banners where users are taken to an external website when clicked.  With iAds, apps can feature highly interactive ads that combine the emotion of TV with the interactivity of the web. Think of these ads as “micro-apps”, or an app within an app.

To wrap it up…

iPhone OS 4 is a major update for the OS. The addition of multi-tasking capabilities, coupled with several improvements in the user experience puts the OS ahead of its competition. Apple claims to have the best implementation of multi-tasking among its competitors. Their name will be put to the test come June.

To learn more about the upcoming iPhone OS 4.0, visit the Apple website or watch the Keynote address . If you are an official iPhone Developer, you can download a beta version of iPhone OS 4 from the developer portal.


iPhone OS 4.0 is Coming

April5

Apple has announced a surprise event on April 8th to reveal details on the much anticipated iPhone OS 4.0.  This event should spill the beans on multi-tasking support and other new features. Im curious to see what’s in store for the future of iPhone OS…

Touch Me Not

March24
With  the success of the iPhone,  touch-screen phones have flooded display shelves, and the number of people with these devices are growing.  As companies incorporate touch screens in their handsets, they have done so with varying degrees of success.
 
If you plan to buy one of these gadgets, an important thing to consider is how well you can use them.  Does Phone A provide you with a great user experience? Does Phone B frustrate you because its almost impossible to type on its virtual keyboard?
 
The MOTO research group examined the performance of leading touch-screen smartphones. The goal was to visually measure the effectiveness of touch-screens from various handsets. What they found may actually surprise you.
 
 
MOTO initially had a person going through each phone and running tests with fingers pressing at varying pressure points. But their initial experiment was deemed “scientifically flawed” because it wasn’t precise enough. Surprisingly, the group responded by performing a second test, this time creating a mechanized hand (a robot) to simulate user touches (see image).
 
 
No matter how much “power” or “features” a phone claims to have, it is very critical to provide an excellent user experience. For touch screens, this means being able to respond to finger taps and touches with high sensitivity, all the time. This is a great formula for happy users.

posted under Mobility | No Comments »

iPhone SDK: Dealing with .plist Files

November28

Loading Contents of .plist file to an Array

The most straightforward method for dealing with .plist files is +[NSArray initWithContentsOfFile:path]. However, you need to specify the correct path of the plist file via [NSBundle pathForResource:plist ofType:].

- (NSArray *)arrayFromPlist: (NSString *)plist {
     NSString *path = [[NSBundle mainBundle] pathForResource:plist ofType:@"plist"];
     NSArray *array = [[NSArray alloc] initWithContentsOfFile:path];
     return array;
 }

Loading to a Dictionary

To load the contents of a .plist file to a dictionary,  instantiate a NSDictionary or NSMutableDictionary and initialize it with [NSDictionary initWithContentsOfFile:]

- (NSDictionary *)dictionaryFromPlist: (NSString *)plist {
 NSString *path = [[NSBundle mainBundle] pathForResource:plist ofType:@"plist"];
 NSDictionary *dict = [[NSDictionary alloc] initWithContentsOfFile:path];
 return dict;
}

Writing to a .plist

The easiest way to write values to a .plist file is to use a NSDictionary and modify its contents using -[NSDictionary setObject: forKey:]. To save the contents to a .plist file, use -[NSDictionary writeToFile: atomically:].

Atomically writing to a file guarantees that the file, if it exists at all, does not become corrupted even when the system should crash while writing.

NSString *path = @"Path to Plist.plist";
 NSDictionary *dict = [[NSDictionary alloc] initWithContentsOfFile:path];
[dict setObject:@"Gierad" forKey:@"name"];
[dict writeToFile:path atomically:YES];

Lastly, if you want to read/write small configurations for your app, NSUserDefaults is recommended. It contains methods to easily handle key-value pairs including floats and other objects.

My BlackBerry Runs on the Simulator, Now What?

November21

BlackBerry Code Signing

Update: Companies that are part of the BlackBerry Trial Premier Support can obtain signing keys for free. Contact your BlackBerry Account Manager for more details.

You create apps for the BlackBerry and it runs perfect on the simulator. Now you want to deploy it on an actual device. It may sound easy, but if your app is using specific BlackBerry API’s, your program will not function if they are not code-signed. You need to sign-up for API keys from RIM.

So you want to run your app on a BlackBerry device? Start reading!

Basically, you need to do three things:

  1. First, you need to fill out the BlackBerry signing keys request form. You can fill out the form here. There is a $25 fee for requesting signing keys. During registration, you will be asked for a security PIN. REMEMBER THIS PIN!
  2. Once the form is complete, you will get an email from RIM with attachments (.csi) within 48 hours to 10 business days. You will get three keys in three separate emails.
  3. Finally, install the keys on your machine by running the BlackBerry SignatureTool. This program is located under the BlackBerry JDE installation directory. To run SignatureTool, use the command prompt and type the following:

    java -jar <BB JDE Dir>\SignatureTool.jar <.csi file>

    This will take you to the SignatureTool registration wizard. The wizard will ask you for the registration PIN mentioned in Step 1. It will also ask you for a personal password. Make sure to remember this personal password since you will be asked for it whenever you compile you BlackBerry app.

That’s it! The steps might be a bit intimidating at first, but its very straightforward. I still honestly think that RIM should streamline the key signing process similar to the iPhone Developer Program.

Additionally, you may also want to read this article from Chris Crowe.