+ All Categories
Home > Technology > I Phone Development Presentation

I Phone Development Presentation

Date post: 14-Jan-2015
Category:
Upload: aessam
View: 2,638 times
Download: 0 times
Share this document with a friend
Description:
 
Popular Tags:
27
iPhone Development Ahmed Essam Software Research Engineer @ Unisoft
Transcript
Page 1: I Phone Development Presentation

iPhone DevelopmentAhmed Essam

Software Research Engineer @ Unisoft

Page 2: I Phone Development Presentation

Agenda

Mobile Application Development

iPhone Development methods

iPhone Development tools

Introduction to Objective C

Introduction to iPhone SDK

Demo

Page 3: I Phone Development Presentation

Advice

Be neutral when it comes to technology to be able to make the right decision

Page 4: I Phone Development Presentation

Mobile Application

There is three ways to do mobile applications

Mobile Web Interface

Develop for Java or Flash

Develop for the native platform

Page 5: I Phone Development Presentation

Mobile Web Applications

This application is mostly connected, so most of the time user can’t handle it without internet or cached history

Javascript provides reach function to access some hardware like GPS and other devices specific hardware

Developer doesn’t have much authority over the device, tied by the browser.

Page 6: I Phone Development Presentation

Java

In some cases you can use Java but not all platforms supports Java as it is for instance

BlackBerry

You can use Java but it must be compiled using BB tools

iPhone

Doesn’t Support Java at all

Android

It is Java but not as J2ME developers used to.

Page 7: I Phone Development Presentation

Flash

Can be used if the application is all about interface

currently flash can be used to act like real application, it has access to camera, GPS... etc

iPhone doesn’t support it.

Page 8: I Phone Development Presentation

Native Applications

You can do what ever you want to,except what the framework doesn’t allow you to do.

Page 9: I Phone Development Presentation

Native Development

Windows Mobile SDK

C#, C/C++ (Very easy to do apps on this SDK)

Android SDK

C (Doing libraries that will be used by Java Apps), Java

BlackBerry SDK

Java ( You need to package the Java code using the SDK )

Nokia SDK

Java, C++ ( I call it Symbian’s C++, needs some time to use it)

Page 10: I Phone Development Presentation

Why not Java

Every device has its own characteristics and style

Java is annoying to protect the user, “Do you allow this application to do .....?”

You can’t know the (keyboard or keypad) layout

Canvas or default system controls

When using canvas you have to handle little everything

Many features can’t be used.

Page 11: I Phone Development Presentation

Personally

I like:

Windows mobile (Low level guys will enjoy it)

iPhone (Most of the work REALLY done)

Android (I love the idea of Open Source)

Page 12: I Phone Development Presentation

iPhone Development Methods

iPhone Web Applications

Normal web site with specified for iPhone using some JS functions that is provided by the Safari

iPhone Native Applications

Using Objective C

iPhone SDK

Jailbreak iPhone development tools

Page 13: I Phone Development Presentation

Jailbreak iPhone development

I don’t know much about it but

You can do really what every you like all the undocumented functions are yours

You can’t publish such app in the apps store

You can publish such app in Cydia

Page 14: I Phone Development Presentation

Needed to develop for iPhone

Knowledge of C

Mac OS X Intel based machine

iPhone Developer program

iPhone or iPod touch

Page 15: I Phone Development Presentation

iPhone Development tools

Xcode

Interface Builder

Instruments

Page 16: I Phone Development Presentation

Objective C

You can consider it Extension for C language

ObjC add more dynamicity to C Language

Single inheritance from super class and protocols is used as interfaces

Totally new syntax but still can use C with it.

Page 17: I Phone Development Presentation

Objective C

• New concepts

• Class definition

• Protocol implementation

• Class messages

• All objects are heap based & no stack objects

• Classes and Instances are both objects

• Class is a blue print to create instance

Page 18: I Phone Development Presentation

Classes and Objects

• Classes declare the state and behavior

• State (class data) is instance variables and behavior is methods

• Instances are hidden, it can be accessed through getters and setters

Page 19: I Phone Development Presentation

Class and instance methods

• Instances responds to “Instance methods”

• -(id)init;

• -(char*)getName;

• Class responds to “Static methods”

• +(id)alloc;

• +(char*)getClassName;

Page 20: I Phone Development Presentation

Message syntax (calling methods)• Function calling in Objective C called message, this is to give

more dynamicity to the language, some times if the method is not implemented the calling result will be nil = null

• [objectOfClass functionName];

• [objectOfClass functionName:Arg1];

• Calling staic method

• [Class functionName];

• [Class functionName:Arg1];

• Function also called selector, this is helpful in cases of passing the function name as parameter.

Page 21: I Phone Development Presentation

Objective C• Dot Syntax

• It is only working in Objective C 2.0

• It is only used for properties of object

• Dynamic Casting

• Using type “id” , id is pointer to void “C Style void*”

• id object = [Class new];

• Static casting

• Class* object = [Class new];

Page 22: I Phone Development Presentation

Objective C• nil is equivalents to null

• Objective C Class has no operators overloading

• Objective C Class has no constructors or destructors

• Boolean type is, BOOL

• YES is TRUE

• NO is FALSE

• Pointer to function in class called selector

• SEL method = [object event];

• [object setEvent:@selecyot(function:)];

• SEL function = @selector(function::);

Page 23: I Phone Development Presentation

iPhone frameworks• Foundation

• UIKit

• CoreGrphics

• CFNetwork

• CoreLocation

• CoreData

• ExternalAccessory

• GameKit

MapKit

IOKit

MediaPlayer

AddressBook

MobileCoreSerivces

OpenGL

Security

StoreKitAnd many more

Page 24: I Phone Development Presentation

iPhone Development

• It is true that Objective C is not as strong as any other language but the huge coverage of frameworks that is provided by Apple makes it Ok to use such SDK

• From My experience I can tell, that there is too many things already done for me in way that make me use it in no time considering other platforms

Page 25: I Phone Development Presentation

Demo

Page 26: I Phone Development Presentation

Refernces

• iPhone Development course form Stanford CS193P

• Objective C developers guide

• Google

Page 27: I Phone Development Presentation

Contact me

• Ahmed Essam Naiem

[email protected]

• http://www.ahmed-essam.com

• http://www.twitter.com/Neo_4583

• http://www.facebook.com/aessam


Recommended