24
Mobile App Development With Apple iOS -Presented By Remesh Govind.

ios-mobile-app-development-intro

Embed Size (px)

Citation preview

Mobile App Development With Apple iOS-Presented By Remesh Govind.

Mobile History

● Mobiles have moved up with capabilities ● Simple Mobile ● To More Compact● To Smart Phones● Operating Systems

○ Embedded (custom)○ J2ME○ Android○ Apple iOS○ Symbian ○ BlackBerry OS

J2ME

Java Based Portable (based on version) -- Connected Limited Device Configuration (CLDC) Does not have many classes from J2SE● JVMs● Brew● Sun ● Other Vendor

Android

Google TechOpen Handset Alliance based ( AT&T, Verizon etc)Open SourceJava and Non Java based development.Java - SDKNon-Java - NDK ( Native Development Kit )

Symbian

Symbian ( 2009 - Royalty Free - Symbian Foundation)Symbian acquired by Nokia- Nokia acquires QT.- Adds QT Support to SymbianExcellent Platform- J2ME Support- C/C++ based development

BlackBerry

Blackberry.Excellent Devices for Business.- IMHO this is a panic reaction- Not doing so well ( BB tab was being sold a 15 K INR last X'Mas)- Java Based development- Limited API- Need you to consume BB service.

Apple ( iOS 5.x)

Apple uses ARM based Processors Operating System is called iOS. Current Major Version 5.xLast hardware released - The New iPad. -- Has more resolution than a HD TV !! -- Same from factor( almost ) !!

Devices that can be used

iPhone 3 - iPhone 3 arm v6, - 3GS armv7iPhone 4iPad ( iPad , iPad 2 the new iPad) - Ax - new iPad uses Arm A5X processor- iPod - 4th Gen +

What is needed

● Apple Mac Box ● Apple iOS Device ● Apple Xcode

Tools

● XCode○ IDE

● Instruments

○ Testing and Analytics Tool ● Interface Builder

○ User To build UI ( .xib ) files

● Language Objective C

Application

Entry Point -main()● Create Applciation Class Object ● Create Delegate to manage Application

Events● Create Views ( Screens)

○ Manage Event Life cycles

Views - Life Cycle

● init /initWithNibName● didLoad● willAppear● didAppear● shouldAutorotateToInterfaceOrientation● viewWillDisappear● viewDidUnload● didReceiveMemoryWarning ( any time !)

Fences

● Application load ○ Has 20 secs to start ○ Any Later - App will be Killed/ operation stopped.

● Forbes 214 Million app launch tests

○ iOS Likely to crash more often than Android.

Crash Reports on Start

Source : Forbes

Plan for crashes

Save User Data. - Database - App Storage ( NSUserDefaults / Android SharedPreferenes )

Demo

Creation of Simple App - Tool XCode - Lets Watch the demo

DataTypes

Common (C / C++)int long floatdoublechatObjects:NSStringNSArray/ NSMutableArrayMore .....

Hello World

- (void)viewDidLoad{

[super viewDidLoad];// Release any retained subviews of the main

view.NSLog( "Hello World");

}

Interface Builder

Create UI ● Different For iPad and iPhone● App needs to detect current device &

orientation Orientation : Human Interface Guidelines - Support Both versions of same orientation atleast.

● LandscapeLeft/LandScapeRight● Portrait / PortraitUpsideDown

Orientation Demo-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{ return (interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown );}

Button Click

Hello World ButtonButton Types Image [btnSend setImage:[UIImage imageNamed:@"home.png"] forState:UIControlStateNormal];

Rounded Rect:[btnSave setTitle:@"Go" forState:UIControlStateNormal];

DEMO !

Universal Apps

● Universal Apps Demo !

Load a new View

Demo!

More Demos and Discussions if time permits!