iOS Application DevelopmentDevelopment Foundation
iOS Application DevelopmentDevelopment Foundation
Mobile Development Choices
iOS Application DevelopmentDevelopment Foundation
Mobile Development Choices
NativeVS
WebVS
Hybrid
iOS Application DevelopmentDevelopment Foundation
“It’s about usage. Not units”HISTORY
• Number of queries on Google search from iPhones surpassed those
from Symbian-based phones in the days after Christmas. Nokia’s Symbian-based phones are 40% of the market worldwide.
• German iPhone users consume 30 times more data.
• 95% of iPhone customers regularly surf the Internet. Data services revenues increase from $2.7 billion in 2005 to $6.9 billion in 2007.
• Google sees 50 times the number of searches using the iPhone than any other mobile device. They were so surprised, they asked their engineers to check the logs to make sure it was correct.
• This is why major companies, Google, Yahoo, Facebook, etc. are all launching iPhone-optimized service despite the iPhone’s 1% market share.
iOS Application DevelopmentDevelopment Foundation
Credit: Flickr Photo by Civis
iOS Application DevelopmentDevelopment Foundation
Carriers App StoreOpenness Closed, Seek
permissionOpen to anyone who signs agreement
Entry Cost Thousands of dollars
$99
Revenue Split 60/40 - 50/50 70/30
Release Timely, Difficult 1-2 Weeks
Micropayments Inconsistent itune for every phone
What makes the App Store successful?
iOS Application DevelopmentDevelopment Foundation
iOS Application DevelopmentDevelopment Foundation
What a Kind of iPhone App that famous in 2011-2012
iOS Application DevelopmentDevelopment Foundation
iOS Application DevelopmentDevelopment Foundation
web
mobile
ux
iOS Application DevelopmentDevelopment Foundation
Native appAn application that is specifically written for a device platform.
iOS Application DevelopmentDevelopment Foundation
iOS Application DevelopmentDevelopment Foundation
iOS Application DevelopmentDevelopment Foundation
Native App
An application designed to run in the computer environment (machine language and OS) it is being run in. The term is used to refer to a locally installed application in contrast to various other software architectures.
iOS Application DevelopmentDevelopment Foundation
Native App (ext.)For example, it may contrast a native application that runs by itself with an interpreted one, such as a Java applet, that requires interpreter software in the machine. A native app may be contrasted with an emulated application written for a different platform and converted in real time to run.
In addition, a native app may be contrasted with a Web application that is run within the browser.
iOS Application DevelopmentDevelopment Foundation
iOS Application DevelopmentDevelopment Foundation
Hybrid appAn application using primarily web technologies inside a native container.
iOS Application DevelopmentDevelopment Foundation
Using FrameworkTo create web apps display and rendering Movement (Gestures Touch) like Native Apps By HTML5 and Java Script (jQuery)
Example:• Sencha Framework• jQuery Mobile• jQTouch
iOS Application DevelopmentDevelopment Foundation
iOS Application DevelopmentDevelopment Foundation
iOS Application DevelopmentDevelopment Foundation
HTML5 WebUsing HTML Tag standard for display style of web that supported mobile platform.
iOS Application DevelopmentDevelopment Foundation
iPhone App Development (Native)
iOS Application DevelopmentDevelopment Foundation
Setup Environment: https://developer.apple.com/xcode/
iOS Application DevelopmentDevelopment Foundation
What is Xcode?
• Apple's IDE for Mac and iPhone/iPad development
History
• Introduced in 2003, as a replacement for good old Project Builder
• Evolves over time, to version 4x (2012)
iOS Application DevelopmentDevelopment Foundation
Main FeaturesBuild System• dependencies, command-line, distrbuted build across
network, configuration of app targets, compiler integration...
Source Code Editor• Code completion and coloring, symbol indexing,
navigation,...
Debugger• GDB integration, step by step, runtime variable
inspection, remote debug...
Documentation• contextual help, guides, reference
iOS Application DevelopmentDevelopment Foundation
iOS Application DevelopmentDevelopment Foundation
Registering as a Developer and Downloading Xcode
1. Open your favorite web browser and go to http://developer.apple.com/iphone/program.
2. Scroll to the bottom of the page and click "Download the Free SDK".
3. Click "Create Apple ID".4. Input your information and click "Create".5. In the downloads section, click "iPhone SDK".6. Choose a location to save the DMG file.
iOS Application DevelopmentDevelopment Foundation
Registering as a Developer and Downloading Xcode
1. Open your favorite web browser and go to http://developer.apple.com/iphone/program.
2. Scroll to the bottom of the page and click "Download the Free SDK".
3. Click "Create Apple ID".4. Input your information and click "Create".5. In the downloads section, click "iPhone SDK".6. Choose a location to save the DMG file.
iOS Application DevelopmentDevelopment Foundation
The Workspace Window
iOS Application DevelopmentDevelopment Foundation
The project contents in the Xcode project navigator
You can edit many types of information, including source code, property lists (plists), Core Data models, and user interface (nib or storyboard) files, and you can view many more.
iOS Application DevelopmentDevelopment Foundation
The utility area
iOS Application DevelopmentDevelopment Foundation
The debug area
iOS Application DevelopmentDevelopment Foundation
Target information
iOS Application DevelopmentDevelopment Foundation
Interface Builder
iOS Application DevelopmentDevelopment Foundation
The Conceptual BasedObjective C Programming Language
iOS Application DevelopmentDevelopment Foundation
What is an Object?An object can be considered a "thing" that can perform a set of related activities. The set of activities that the object performs defines the object's behavior. For example, the hand can grip something or a Student (object) can give the name or address.
iOS Application DevelopmentDevelopment Foundation
• In old style programming, you had:– data, which was completely passive– functions, which could manipulate any data
• An object contains both data and methods that manipulate that data– An object is active, not passive; it does things– An object is responsible for its own data
• But: it can expose that data to other objects
Object
iOS Application DevelopmentDevelopment Foundation
• An object contains both data and methods that manipulate that data– The data represent the state of the object– Data can also describe the relationships between this
object and other objects
• Example: A CheckingAccount might have– A balance (the internal state of the account)– An owner (some object representing a person)
iOS Application DevelopmentDevelopment Foundation
Example: a “cow” Object• You could (in a game, for example) create an
object representing a cow• It would have data:
– How hungry it is– How frightened it is– Where it is
• And methods:– eat, die, run, sleep
iOS Application DevelopmentDevelopment Foundation
Concept: Classes describe objects
• Every object belongs to (is an instance of) a class
• An object may have fields, or variables– The class describes those fields
• An object may have methods– The class describes those methods
• A class is like a template, or cookie cutter
iOS Application DevelopmentDevelopment Foundation
Class: Abstract Data Types
• An Abstract Data Type (ADT) bundles together:– some data, representing an object or "thing"– the operations on that data
• Example: a CheckingAccount, with operations deposit, withdraw, getBalance, etc.
• Classes enforce this bundling together
iOS Application DevelopmentDevelopment Foundation
What is a Class?A class is simply a representation of a type of object. It is the blueprint/ plan/ template that describe the details of an object. A class is the blueprint from which the individual objects are created. Class is composed of three things: a name, attributes, and operations.
iOS Application DevelopmentDevelopment Foundation
Example of a classclass Employee { // fields String name; double salary;
// a method void pay () { System.out.println("Pay to the order of " + name + " $" + salary); }}
iOS Application DevelopmentDevelopment Foundation
Classes form a hierarchy
• Classes are arranged in a treelike structure called a hierarchy• The class at the root is named Object• Every class, except Object, has a superclass• A class may have several ancestors, up to Object• When you define a class, you specify its superclass
– If you don’t specify a superclass, Object is assumed
• Every class may have one or more subclasses
iOS Application DevelopmentDevelopment Foundation
Xcode: Work shop
“Hello World”;
iOS Application DevelopmentDevelopment Foundation
Creating Your First Project1. Click “File -> New Project”.2. Click the “View-Based Application” icon.3. Click “Choose”.4. Navigate to a location where you would like
to storeyour iPhone projects. In the text box labeled “Save As:” type “HelloWorld”.
5. Click “Save”.
iOS Application DevelopmentDevelopment Foundation
Writing and Compiling Your Program
The window you are seeing now is the main IDE program. It has the editor and controls for the compiler built into it. We will now add the code to create a button and a button action.1. Expand the “Classes” group on the left side by clicking on the small
triangle next to it.2. Click on “HelloWorldViewController.m”.3. Scroll down to the second green code region. This is a code comment
showing where to put your code if you are creating your user interface using code.
4. Highlight the whole comment from the “/*” line to the “*/” line and paste or type the following code in it's place:
iOS Application DevelopmentDevelopment Foundation
iOS Application DevelopmentDevelopment Foundation
Running Your ProgramNow we have some code written for the compiler to compile andthe simulator to run. To compile your code and start the simulatorrunning your program, press the “Build and Go” button at the top.If asked to save your changes, press “Save All”. The simulator willstart up and run your program. Congratulations on writing yourfirst iPhone program!
iOS Application DevelopmentDevelopment Foundation
Thank You.
Top Related