Apple has launched iPad device and developers are busy with exploring and observing iPhone SDK 3.2 from a 360 degree perspective. iPad comes with unique, awesome features and challenges for developing common application development for iPhone and iPad devices. Apple introduced “Universal Application” concept with iPad launch. Universal Application refers to common binary (application) development for iPhone devices and iPad.
At present, a large number of applications are available on AppStore which can be successfully launched on iPad. But it will run in compatibility mode so failing to utilize native support and unique features of iPad like Split view and Popovers. So it becomes very important to make available an application on iPad to utilize iPad features.
Here I would like to discuss few points for “Porting an existing application To Universal Application“ to make that process simple and straight-forward.
è Re-design User Interface:
This is more related to application layout and graphics like orientation, images etc.
- Layout the app in such a way so it can provide more content/information to utilize real estate on iPad.
- Try to reduce screen transitions
- Design views considering all available orientations
- Possibly, layout to flatten hierarchy of screens
- Take care of multi-touch facility
- Utilizes device specific UI controls effectively like SplitterView in iPad and TabBar/Navigation controller in iPhone
- Device specific hardware features
è Implement Conditional-Coding Technique:
This is more related to runtime check for availability of specific class, method and device specific function.
- Check for device specific class e.g. UIDocumentInteractionController
- Check for device specific Methods and Functions e.g. NSRegularExpressionSearch
- Check for device specific new APIs in existing frameworks e.g. PDF APIs in UIGraphics Framework
Let me share few examples to get better understanding of run-time code check:
Runtime Check Example-1:
Following code-snippet performs runtime check, if specific class is available for the underlying device or not.
Class documentVCClass = NSClassFromString(@"UIDocumentInteractionController "); if (documentVCClass) { UIDocumentInteractionController * myDocumentController = [[documentVCClass alloc] init]; // Configure the document interaction view controller. }
Runtime Check Example-2:
Following code-snippet performs run-time check, if specific method is available for the underlying device or not.
if (UIGraphicsBeginPDFPage != NULL){ UIGraphicsBeginPDFPage(); }
Reference: Creating Universal Applications @ http://developer.apple.com/ipad/sdk/index.html