Introduction to iPhone Programming

74
Presented by Vu Tran Lam Introduction to iPhone Programming Thursday, March 21, 13

description

Introduction to iPhone Programming

Transcript of Introduction to iPhone Programming

Page 1: Introduction to iPhone Programming

Presented by Vu Tran Lam

Introduction toiPhone Programming

Thursday, March 21, 13

Page 2: Introduction to iPhone Programming

The Beginning of Apple’s Story From This Man...

Thursday, March 21, 13

Page 3: Introduction to iPhone Programming

...in 1980 Steve Jobs Recounted The Following Story...

a few years before the Macintosh…

Thursday, March 21, 13

Page 4: Introduction to iPhone Programming

released 1984

...and That’s Exactly What We’re Doing Here

Thursday, March 21, 13

Page 5: Introduction to iPhone Programming

The Computer Was Just The Beginning...

Thursday, March 21, 13

Page 6: Introduction to iPhone Programming

6

Steve Timeline...

Thursday, March 21, 13

Page 7: Introduction to iPhone Programming

Steve Timeline...

Thursday, March 21, 13

Page 8: Introduction to iPhone Programming

8

Steve Timeline...

Thursday, March 21, 13

Page 9: Introduction to iPhone Programming

Steve timeline...Steve Timeline...

Thursday, March 21, 13

Page 10: Introduction to iPhone Programming

To Be Continue...

Thursday, March 21, 13

Page 11: Introduction to iPhone Programming

Thursday, March 21, 13

Page 12: Introduction to iPhone Programming

welcome to the future

Thursday, March 21, 13

Page 13: Introduction to iPhone Programming

Yesterday

“Go to the computer”to use the web/Internet

Thursday, March 21, 13

Page 14: Introduction to iPhone Programming

Yesterday

“Go to the computer”to use the web/Internet

Today

“Use the mobile”to use the web/Internet

Thursday, March 21, 13

Page 15: Introduction to iPhone Programming

Thursday, March 21, 13

Page 16: Introduction to iPhone Programming

...in The Old Days

Thursday, March 21, 13

Page 17: Introduction to iPhone Programming

...in The Old Days

Thursday, March 21, 13

Page 18: Introduction to iPhone Programming

...in The Old Days

Thursday, March 21, 13

Page 19: Introduction to iPhone Programming

...in The Old Days

Thursday, March 21, 13

Page 20: Introduction to iPhone Programming

Mobile Development...

Thursday, March 21, 13

Page 21: Introduction to iPhone Programming

iOS Developers

Mobile Development...

Thursday, March 21, 13

Page 22: Introduction to iPhone Programming

...Develop Mobile AppIMPOSSIBLE

Thursday, March 21, 13

Page 23: Introduction to iPhone Programming

iPhone app development

Really Bloody Difficult...This Technique is

Thursday, March 21, 13

Page 24: Introduction to iPhone Programming

23

Ways...?

Thursday, March 21, 13

Page 25: Introduction to iPhone Programming

24

...Ask Guru?

Thursday, March 21, 13

Page 26: Introduction to iPhone Programming

Apple Developer Center

Thursday, March 21, 13

Page 27: Introduction to iPhone Programming

Thursday, March 21, 13

Page 28: Introduction to iPhone Programming

Mac OS X

Thursday, March 21, 13

Page 29: Introduction to iPhone Programming

Unix History

Thursday, March 21, 13

Page 30: Introduction to iPhone Programming

Apple OS History

Thursday, March 21, 13

Page 31: Introduction to iPhone Programming

• Mac OS X is the first real replacement for the older Mac OS, based on the OPENSTEP (NEXTSTEP) from NeXT.

• NeXT Computer Inc. is named the company that was set up by Steve Jobs in 1985 is taken by Apple completely for 400 million dollars in 1997.

Mac OS X History

Thursday, March 21, 13

Page 32: Introduction to iPhone Programming

Mac OS X Family

10.6 10.7 10.8

Thursday, March 21, 13

Page 33: Introduction to iPhone Programming

Mac OS X Architecture

Thursday, March 21, 13

Page 34: Introduction to iPhone Programming

Mac OS X Architecture

Thursday, March 21, 13

Page 35: Introduction to iPhone Programming

Mac OS X Architecture

Thursday, March 21, 13

Page 36: Introduction to iPhone Programming

Mac OS X Architecture

Thursday, March 21, 13

Page 37: Introduction to iPhone Programming

Mac OS X Architecture

Thursday, March 21, 13

Page 38: Introduction to iPhone Programming

Mac OS X Architecture

Thursday, March 21, 13

Page 39: Introduction to iPhone Programming

Mac OS X Architecture

Thursday, March 21, 13

Page 40: Introduction to iPhone Programming

With easy-to-use interface, amazing features, and rock-solid stability, iOS is the foundation of iPhone, iPad, and iPod touch.

Thursday, March 21, 13

Page 41: Introduction to iPhone Programming

iOS Architecture

Thursday, March 21, 13

Page 42: Introduction to iPhone Programming

iOS Family

Thursday, March 21, 13

Page 43: Introduction to iPhone Programming

iOS Architecture

Thursday, March 21, 13

Page 44: Introduction to iPhone Programming

Cocoa Fundamentals

Thursday, March 21, 13

Page 45: Introduction to iPhone Programming

• Cocoa is an application environment for both the OS X and iOS, the operating system used on Multi-Touch devices such as iPhone, iPad, and iPod touch.

• Cocoa consists of a suite of object-oriented software libraries, a runtime system, and an integrated development environment.

What is Cocoa?

Thursday, March 21, 13

Page 46: Introduction to iPhone Programming

• Two core Objective-C frameworks:• AppKit: provides the user interface objects and defines the

structure for application behavior, including event handling and drawing

• Foundation: defines the basic behavior of objects, establishes mechanisms to manage and provide objects for primitive data types, collections, and operating-system services

How Cocoa Fits into OS X?

Thursday, March 21, 13

Page 47: Introduction to iPhone Programming

• Application framework layer of iOS is called Cocoa Touch.• Cocoa Touch frameworks that drive iOS apps share many

proven patterns found on Mac OS, but it has special focus on touch-based interfaces and optimization.

• UIKit provides the basic tools you need to implement graphical, event-driven applications in iOS.

• UIKit builds on the same Foundation framework infrastructure found on the Mac OS X, including file handling, networking, string building, and more.

How Cocoa Fits into iOS?

Thursday, March 21, 13

Page 48: Introduction to iPhone Programming

• General migration notes• Migrating your data model• Migrating your user interface• Memory management

• Framework differences• UIKit versus AppKit• Foundation framework differences• Changes to other frameworks

Migrating from Cocoa to Cocoa Touch

Thursday, March 21, 13

Page 49: Introduction to iPhone Programming

• Provides the classes needed to construct and manage GUI for iOS

• Provides an application object, event handling, drawing model, windows, views, and controls specifically designed for a touch screen interface

UIKit Framework

Thursday, March 21, 13

Page 50: Introduction to iPhone Programming

• Define a base layer of Objective-C classes

• Provide a small set of basic utility classes

• Make software development easier by introducing consistent conventions for things such as deallocation

• Support Unicode strings, object persistence, and object distribution.

• Provide a level of OS independence, to enhance portability.

Foundation Framework

Thursday, March 21, 13

Page 51: Introduction to iPhone Programming

iOS Developer Tools

Thursday, March 21, 13

Page 52: Introduction to iPhone Programming

Xcode

Xcode is the complete toolset for building OS X and iOS applications. Xcode 4 has been redesigned to be faster and easier to use.

Thursday, March 21, 13

Page 53: Introduction to iPhone Programming

iOS SDK

The iOS Simulator runs your application in much the same way as an actual iOS device.

iOS 6 SDK provides support for developing iOS apps, and it includes the complete set of Xcode tools, compilers, and frameworks for creating apps for iOS and OS X.

Thursday, March 21, 13

Page 54: Introduction to iPhone Programming

iOS Simulator

Thursday, March 21, 13

Page 55: Introduction to iPhone Programming

Instruments

To ensure that you deliver the best user experience, the Instruments lets you analyze the performance of your iOS applications while running in Simulator or on a device.

Thursday, March 21, 13

Page 56: Introduction to iPhone Programming

Thursday, March 21, 13

Page 57: Introduction to iPhone Programming

Thursday, March 21, 13

Page 58: Introduction to iPhone Programming

Thursday, March 21, 13

Page 59: Introduction to iPhone Programming

Thursday, March 21, 13

Page 60: Introduction to iPhone Programming

Thursday, March 21, 13

Page 61: Introduction to iPhone Programming

Thursday, March 21, 13

Page 62: Introduction to iPhone Programming

Thursday, March 21, 13

Page 63: Introduction to iPhone Programming

Thursday, March 21, 13

Page 64: Introduction to iPhone Programming

Thursday, March 21, 13

Page 65: Introduction to iPhone Programming

64

Thursday, March 21, 13

Page 66: Introduction to iPhone Programming

Thursday, March 21, 13

Page 67: Introduction to iPhone Programming

Setup Windows Environment

Thursday, March 21, 13

Page 68: Introduction to iPhone Programming

CPU: Core i5RAM: 4GBOS: Windows 7HDD: Free 20GB

Setup Windows Environment

Install VMware Workstation 8 to create a virtual machine, and perform common virtual machine operations

Install OS X Mountain Lion on VMware Workstation 8 to deploy iOS development environment

Thursday, March 21, 13

Page 70: Introduction to iPhone Programming

Thursday, March 21, 13

Page 71: Introduction to iPhone Programming

Thursday, March 21, 13

Page 72: Introduction to iPhone Programming

Next...

Thursday, March 21, 13

Page 74: Introduction to iPhone Programming

many thanks to

Thank you

[email protected]

Stanford Universityhttps://developer.apple.com

Developer Center

http://www.stanford.edu/class/cs193p

xin chào

Referenceshttp://az4you.wordpress.comhttps://www.slideshare.net/vutlam9083/introduction-to-iphone-programming/

Thursday, March 21, 13