SlideShare une entreprise Scribd logo
1  sur  26
Native iPhone Development 101
Sasmito Adibowo
adib (at) basil-salad dot com
http://www.basil-salad.com
3-Nov-2009
Agenda

Getting Started
What’s available to you
Accessing Web Services
Apple’s App Store
Beyond the App Store
Hello World Demo
What do you need
Minimum               Good to have
 An Intel Mac with     An iPhone or iPod
 Leopard or Snow       touch
 Leopard
                       iPhone Developer
 iPhone SDK (free      membership
 download)
                       A bank account
 Some free time and    (SWIFT)
 patience
The iPhone Stack


     Cocoa Touch                       WebKit

   Objective-C Runtime           Core*** Frameworks

 ANSI C Runtime     ANSI C++ Runtime        OpenGL ES

           Unix (BSD Variant), 32-bit ARM
Network Environment
Programming Languages
Objective-C
  Superset of C
  Dynamic Binding
  Cocoa Touch
C/C++
JavaScript
Class Declaration

#import <Foundation/Foundation.h>

@interface ThisIsAClass : NSObject {
@public
! // public data variables
@protected
! // protected data variables
@private
! // private data variables
!
}

// a message handler
-(void) doSomeThingAt:(id) whatever optionsAre:(NSDictionary*) options;

@end
Class Implementation

#import "ThisIsAClass.h"

@implementation ThisIsAClass

-(void) doSomeThingAt:(id) whatever optionsAre:(NSDictionary*) options
{
! if ([whatever respondsToSelector:@selector(sayHello:)]) {
! !   [whatever sayHello:options];
! }
}

@end
What you can do
Floating-point math          Network (TCP/IP) in & out
Threads                      Accelerated 3D graphics
C++ Programming              Memory-mapped files —
                             BSD mmap()
  STL included
                             Control iPod playback
Access the Address Book
                             (new in OS 3.0)
Compose e-mail
Write to the Photo Library
What you can’t do
Run in the background     Intercept phone calls /
                          SMSs / e-mails
Forking / multitasking
                          Create self-modifying
Access the Calendar
                          code
Read user’s e-mail
Access other
application’s data area
Cocoa Touch

MVC design pattern
Non-overlapping
window
Buttons, etc
Web Browser
Map Browser
Accessing Web Services

Built-in support
  JSON
  Property List Talk
3rd party
  SOAP
  RemObjects
JavaScript Object Notation (JSON)

                          {
                                  "firstName": "John",
 List of Values in                "lastName": "Smith",
                                  "address": {
 JavaScript syntax                    "streetAddress": "21 2nd Street",
                                       "city": "New York",
                                       "state": "NY",
 Useful if you have a                  "postalCode": "10021"
                                  },
 JavaScript interpreter           "phoneNumbers": [
 ready                              { "type": "home",
                                     "number": "212 555-1234" },
                                    { "type": "fax",
 iPhone has one!                  ]
                                      "number": "646 555-4567" }

                              }
JSON Example
 Your iApp             UIWebView         Your Server

             HTTP Request

                             JSON Response

             JSON String

             Data Values
Property List Talk
                                       <?xml version="1.0" encoding="UTF-8"?>
                                       <!DOCTYPE plist PUBLIC "-//Apple
                                       Computer//DTD PLIST 1.0//EN"
 Apple’s first-class XML                !       "http://www.apple.com/DTDs/
                                       PropertyList-1.0.dtd">
 format                                <plist version="1.0">
                                       <dict>
                                          <key>Year Of Birth</key>
                                          <integer>1965</integer>
 Can be easily                            <key>Pets Names</key>
                                          <array/>
 generated by a PHP                       <key>Picture</key>
                                          <data>

 script                                !       PEKBpYGlmYFCPA==
                                          </data>
                                          <key>City of Birth</key>
                                          <string>Springfield</string>
 Built-in conversion to                   <key>Name</key>
                                          <string>John Doe</string>
 Cocoa objects                            <key>Kids Names</key>
                                          <array>
                                       !       <string>John</string>
NSDictionary* dic = [NSDictionary      !       <string>Kyra</string>
   dictionaryWithContentsOfURL:...];      </array>
                                       </dict>
                                       </plist>
HTTP-Plist Example
Your iApp                NSDictionary                  Your Server

      [NSDictionary dictionaryWithContentsOfURL:...]


                                         HTTP Request


                                       Property List response

       new Dictionary object
Case Study: Fund Watch
  Display fund prices from
  Fundsupermart*
  Screen scraper
  JavaScript-based HTML
  parser
  Derived from
  Fundsupermart
  Dashboard Widget

*Fund Watch is not associated with Fundsupermart
Fund Watch Parser
Fund Watch               UIWebView          fundsupermart.com

    Load JavaScript library

                 Request fund prices page

                                     HTML Page

       Parse HTML Page

           Fund prices
The App Store
Accessible via iTunes
  3rd party screen
  scrapers
The only way to sell your
native apps
50K+ apps and counting
Requires a developer’s
account
Selling your Apps
1. Register for an iPhone Developer account

2. Get your bank’s SWIFT code

3. Prepare IRS documents

   1. Fill and submit SS-4 “Request for EIN” to IRS

   2. Wait for your EIN from IRS

   3. Fill form W8-BEN and submit to Apple

4. Fill the Paid Applications Contract

5. Register SWIFT code to Apple

6. Upload your paid applications to Apple’s iTunes Connect
Beyond the App Store

    Advertisement    Admob

         Analytics   Pinch Media

 Social Networking   OpenFeint
AdMob
Pinch Analytics
OpenFeint
Hello, World!
The End
http://basil-salad.com

Contenu connexe

Tendances

MongoDB and Ruby on Rails
MongoDB and Ruby on RailsMongoDB and Ruby on Rails
MongoDB and Ruby on Railsrfischer20
 
Practical Ruby Projects with MongoDB - MongoSF
Practical Ruby Projects with MongoDB - MongoSFPractical Ruby Projects with MongoDB - MongoSF
Practical Ruby Projects with MongoDB - MongoSFAlex Sharp
 
Practical Ruby Projects (Alex Sharp)
Practical Ruby Projects (Alex Sharp)Practical Ruby Projects (Alex Sharp)
Practical Ruby Projects (Alex Sharp)MongoSF
 
Learning To Run - XPages for Lotus Notes Client Developers
Learning To Run - XPages for Lotus Notes Client DevelopersLearning To Run - XPages for Lotus Notes Client Developers
Learning To Run - XPages for Lotus Notes Client DevelopersKathy Brown
 
Introduction to Google API - Focusky
Introduction to Google API - FocuskyIntroduction to Google API - Focusky
Introduction to Google API - FocuskyFocusky Presentation
 
PHP Forms PHP 05
PHP Forms PHP 05PHP Forms PHP 05
PHP Forms PHP 05Spy Seat
 
jQuery from the very beginning
jQuery from the very beginningjQuery from the very beginning
jQuery from the very beginningAnis Ahmad
 
Micro-ORM Introduction - Don't overcomplicate
Micro-ORM Introduction - Don't overcomplicateMicro-ORM Introduction - Don't overcomplicate
Micro-ORM Introduction - Don't overcomplicateKiev ALT.NET
 
ePUB 3 and Publishing e-books
ePUB 3 and Publishing e-booksePUB 3 and Publishing e-books
ePUB 3 and Publishing e-booksKerem Karatal
 
Web Development Course: PHP lecture 2
Web Development Course: PHP lecture 2Web Development Course: PHP lecture 2
Web Development Course: PHP lecture 2Gheyath M. Othman
 
Handle complex POST/PATCH requests in RESTful API
Handle complex POST/PATCH requests in RESTful APIHandle complex POST/PATCH requests in RESTful API
Handle complex POST/PATCH requests in RESTful APIfightmaster
 
ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)
ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)
ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)Clément Wehrung
 
Linguistic Abstraction for the Web
Linguistic Abstraction for the WebLinguistic Abstraction for the Web
Linguistic Abstraction for the WebEelco Visser
 
jQuery Fundamentals
jQuery FundamentalsjQuery Fundamentals
jQuery FundamentalsGil Fink
 
Introducation to php for beginners
Introducation to php for beginners Introducation to php for beginners
Introducation to php for beginners musrath mohammad
 

Tendances (20)

MongoDB and Ruby on Rails
MongoDB and Ruby on RailsMongoDB and Ruby on Rails
MongoDB and Ruby on Rails
 
Practical Ruby Projects with MongoDB - MongoSF
Practical Ruby Projects with MongoDB - MongoSFPractical Ruby Projects with MongoDB - MongoSF
Practical Ruby Projects with MongoDB - MongoSF
 
Practical Ruby Projects (Alex Sharp)
Practical Ruby Projects (Alex Sharp)Practical Ruby Projects (Alex Sharp)
Practical Ruby Projects (Alex Sharp)
 
Advanced Json
Advanced JsonAdvanced Json
Advanced Json
 
Learning To Run - XPages for Lotus Notes Client Developers
Learning To Run - XPages for Lotus Notes Client DevelopersLearning To Run - XPages for Lotus Notes Client Developers
Learning To Run - XPages for Lotus Notes Client Developers
 
Json tutorial, a beguiner guide
Json tutorial, a beguiner guideJson tutorial, a beguiner guide
Json tutorial, a beguiner guide
 
Introduction to Google API - Focusky
Introduction to Google API - FocuskyIntroduction to Google API - Focusky
Introduction to Google API - Focusky
 
PHP Forms PHP 05
PHP Forms PHP 05PHP Forms PHP 05
PHP Forms PHP 05
 
jQuery from the very beginning
jQuery from the very beginningjQuery from the very beginning
jQuery from the very beginning
 
Micro-ORM Introduction - Don't overcomplicate
Micro-ORM Introduction - Don't overcomplicateMicro-ORM Introduction - Don't overcomplicate
Micro-ORM Introduction - Don't overcomplicate
 
ePUB 3 and Publishing e-books
ePUB 3 and Publishing e-booksePUB 3 and Publishing e-books
ePUB 3 and Publishing e-books
 
Learn css3
Learn css3Learn css3
Learn css3
 
Web Development Course: PHP lecture 2
Web Development Course: PHP lecture 2Web Development Course: PHP lecture 2
Web Development Course: PHP lecture 2
 
Handle complex POST/PATCH requests in RESTful API
Handle complex POST/PATCH requests in RESTful APIHandle complex POST/PATCH requests in RESTful API
Handle complex POST/PATCH requests in RESTful API
 
ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)
ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)
ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)
 
Linguistic Abstraction for the Web
Linguistic Abstraction for the WebLinguistic Abstraction for the Web
Linguistic Abstraction for the Web
 
MWLUG 2017 - Elementary!
MWLUG 2017 - Elementary!MWLUG 2017 - Elementary!
MWLUG 2017 - Elementary!
 
jQuery Fundamentals
jQuery FundamentalsjQuery Fundamentals
jQuery Fundamentals
 
jQuery
jQueryjQuery
jQuery
 
Introducation to php for beginners
Introducation to php for beginners Introducation to php for beginners
Introducation to php for beginners
 

Similaire à Native Phone Development 101

beyond tellerrand: Mobile Apps with JavaScript – There's More Than Web
beyond tellerrand: Mobile Apps with JavaScript – There's More Than Webbeyond tellerrand: Mobile Apps with JavaScript – There's More Than Web
beyond tellerrand: Mobile Apps with JavaScript – There's More Than WebHeiko Behrens
 
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...SPTechCon
 
Crafting Evolvable Api Responses
Crafting Evolvable Api ResponsesCrafting Evolvable Api Responses
Crafting Evolvable Api Responsesdarrelmiller71
 
WebSocket JSON Hackday
WebSocket JSON HackdayWebSocket JSON Hackday
WebSocket JSON HackdaySomay Nakhal
 
node.js: Javascript's in your backend
node.js: Javascript's in your backendnode.js: Javascript's in your backend
node.js: Javascript's in your backendDavid Padbury
 
There's more than web
There's more than webThere's more than web
There's more than webMatt Evans
 
iPhone Development Intro
iPhone Development IntroiPhone Development Intro
iPhone Development IntroLuis Azevedo
 
JavaOne Brasil 2016: JavaEE e HTML5: da web/desktop ao mobile
JavaOne Brasil 2016: JavaEE e HTML5: da web/desktop ao mobileJavaOne Brasil 2016: JavaEE e HTML5: da web/desktop ao mobile
JavaOne Brasil 2016: JavaEE e HTML5: da web/desktop ao mobileLoiane Groner
 
CouchDB on Android
CouchDB on AndroidCouchDB on Android
CouchDB on AndroidSven Haiges
 
Introduction to ReasonML
Introduction to ReasonMLIntroduction to ReasonML
Introduction to ReasonMLRiza Fahmi
 
Cross-Platform Data Access for Android and iPhone
Cross-Platform Data Access for Android and iPhoneCross-Platform Data Access for Android and iPhone
Cross-Platform Data Access for Android and iPhonePeter Friese
 
Smoothing Your Java with DSLs
Smoothing Your Java with DSLsSmoothing Your Java with DSLs
Smoothing Your Java with DSLsintelliyole
 
Terrastore - A document database for developers
Terrastore - A document database for developersTerrastore - A document database for developers
Terrastore - A document database for developersSergio Bossa
 
Domain Specific Languages (EclipseCon 2012)
Domain Specific Languages (EclipseCon 2012)Domain Specific Languages (EclipseCon 2012)
Domain Specific Languages (EclipseCon 2012)Sven Efftinge
 
Perkenalan ReasonML
Perkenalan ReasonMLPerkenalan ReasonML
Perkenalan ReasonMLRiza Fahmi
 
Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Igor Moochnick
 

Similaire à Native Phone Development 101 (20)

beyond tellerrand: Mobile Apps with JavaScript – There's More Than Web
beyond tellerrand: Mobile Apps with JavaScript – There's More Than Webbeyond tellerrand: Mobile Apps with JavaScript – There's More Than Web
beyond tellerrand: Mobile Apps with JavaScript – There's More Than Web
 
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
 
08 ajax
08 ajax08 ajax
08 ajax
 
Crafting Evolvable Api Responses
Crafting Evolvable Api ResponsesCrafting Evolvable Api Responses
Crafting Evolvable Api Responses
 
World of javascript
World of javascriptWorld of javascript
World of javascript
 
WebSocket JSON Hackday
WebSocket JSON HackdayWebSocket JSON Hackday
WebSocket JSON Hackday
 
node.js: Javascript's in your backend
node.js: Javascript's in your backendnode.js: Javascript's in your backend
node.js: Javascript's in your backend
 
There's more than web
There's more than webThere's more than web
There's more than web
 
iPhone Development Intro
iPhone Development IntroiPhone Development Intro
iPhone Development Intro
 
Os Pruett
Os PruettOs Pruett
Os Pruett
 
JavaOne Brasil 2016: JavaEE e HTML5: da web/desktop ao mobile
JavaOne Brasil 2016: JavaEE e HTML5: da web/desktop ao mobileJavaOne Brasil 2016: JavaEE e HTML5: da web/desktop ao mobile
JavaOne Brasil 2016: JavaEE e HTML5: da web/desktop ao mobile
 
CouchDB on Android
CouchDB on AndroidCouchDB on Android
CouchDB on Android
 
Introduction to ReasonML
Introduction to ReasonMLIntroduction to ReasonML
Introduction to ReasonML
 
Cross-Platform Data Access for Android and iPhone
Cross-Platform Data Access for Android and iPhoneCross-Platform Data Access for Android and iPhone
Cross-Platform Data Access for Android and iPhone
 
Smoothing Your Java with DSLs
Smoothing Your Java with DSLsSmoothing Your Java with DSLs
Smoothing Your Java with DSLs
 
Terrastore - A document database for developers
Terrastore - A document database for developersTerrastore - A document database for developers
Terrastore - A document database for developers
 
Tml for Objective C
Tml for Objective CTml for Objective C
Tml for Objective C
 
Domain Specific Languages (EclipseCon 2012)
Domain Specific Languages (EclipseCon 2012)Domain Specific Languages (EclipseCon 2012)
Domain Specific Languages (EclipseCon 2012)
 
Perkenalan ReasonML
Perkenalan ReasonMLPerkenalan ReasonML
Perkenalan ReasonML
 
Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)
 

Plus de Sasmito Adibowo

Youth Entrepreneurhip Skills Bootcamp rev 2
Youth Entrepreneurhip Skills Bootcamp rev 2Youth Entrepreneurhip Skills Bootcamp rev 2
Youth Entrepreneurhip Skills Bootcamp rev 2Sasmito Adibowo
 
Earth Hour Hackathon Mockup
Earth Hour Hackathon MockupEarth Hour Hackathon Mockup
Earth Hour Hackathon MockupSasmito Adibowo
 
News Anchor from Conception to Completion
News Anchor from Conception to CompletionNews Anchor from Conception to Completion
News Anchor from Conception to CompletionSasmito Adibowo
 
Social Cluster Analysis of Interbank Money Market Transaction Behavior
Social Cluster Analysis of Interbank Money Market Transaction BehaviorSocial Cluster Analysis of Interbank Money Market Transaction Behavior
Social Cluster Analysis of Interbank Money Market Transaction BehaviorSasmito Adibowo
 

Plus de Sasmito Adibowo (6)

Applying SAP Scenes
Applying SAP ScenesApplying SAP Scenes
Applying SAP Scenes
 
Youth Entrepreneurhip Skills Bootcamp rev 2
Youth Entrepreneurhip Skills Bootcamp rev 2Youth Entrepreneurhip Skills Bootcamp rev 2
Youth Entrepreneurhip Skills Bootcamp rev 2
 
Yammer API
Yammer APIYammer API
Yammer API
 
Earth Hour Hackathon Mockup
Earth Hour Hackathon MockupEarth Hour Hackathon Mockup
Earth Hour Hackathon Mockup
 
News Anchor from Conception to Completion
News Anchor from Conception to CompletionNews Anchor from Conception to Completion
News Anchor from Conception to Completion
 
Social Cluster Analysis of Interbank Money Market Transaction Behavior
Social Cluster Analysis of Interbank Money Market Transaction BehaviorSocial Cluster Analysis of Interbank Money Market Transaction Behavior
Social Cluster Analysis of Interbank Money Market Transaction Behavior
 

Dernier

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 

Dernier (20)

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 

Native Phone Development 101

  • 1. Native iPhone Development 101 Sasmito Adibowo adib (at) basil-salad dot com http://www.basil-salad.com 3-Nov-2009
  • 2. Agenda Getting Started What’s available to you Accessing Web Services Apple’s App Store Beyond the App Store Hello World Demo
  • 3. What do you need Minimum Good to have An Intel Mac with An iPhone or iPod Leopard or Snow touch Leopard iPhone Developer iPhone SDK (free membership download) A bank account Some free time and (SWIFT) patience
  • 4. The iPhone Stack Cocoa Touch WebKit Objective-C Runtime Core*** Frameworks ANSI C Runtime ANSI C++ Runtime OpenGL ES Unix (BSD Variant), 32-bit ARM
  • 6. Programming Languages Objective-C Superset of C Dynamic Binding Cocoa Touch C/C++ JavaScript
  • 7. Class Declaration #import <Foundation/Foundation.h> @interface ThisIsAClass : NSObject { @public ! // public data variables @protected ! // protected data variables @private ! // private data variables ! } // a message handler -(void) doSomeThingAt:(id) whatever optionsAre:(NSDictionary*) options; @end
  • 8. Class Implementation #import "ThisIsAClass.h" @implementation ThisIsAClass -(void) doSomeThingAt:(id) whatever optionsAre:(NSDictionary*) options { ! if ([whatever respondsToSelector:@selector(sayHello:)]) { ! ! [whatever sayHello:options]; ! } } @end
  • 9. What you can do Floating-point math Network (TCP/IP) in & out Threads Accelerated 3D graphics C++ Programming Memory-mapped files — BSD mmap() STL included Control iPod playback Access the Address Book (new in OS 3.0) Compose e-mail Write to the Photo Library
  • 10. What you can’t do Run in the background Intercept phone calls / SMSs / e-mails Forking / multitasking Create self-modifying Access the Calendar code Read user’s e-mail Access other application’s data area
  • 11. Cocoa Touch MVC design pattern Non-overlapping window Buttons, etc Web Browser Map Browser
  • 12. Accessing Web Services Built-in support JSON Property List Talk 3rd party SOAP RemObjects
  • 13. JavaScript Object Notation (JSON) { "firstName": "John", List of Values in "lastName": "Smith", "address": { JavaScript syntax "streetAddress": "21 2nd Street", "city": "New York", "state": "NY", Useful if you have a "postalCode": "10021" }, JavaScript interpreter "phoneNumbers": [ ready { "type": "home", "number": "212 555-1234" }, { "type": "fax", iPhone has one! ] "number": "646 555-4567" } }
  • 14. JSON Example Your iApp UIWebView Your Server HTTP Request JSON Response JSON String Data Values
  • 15. Property List Talk <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" Apple’s first-class XML ! "http://www.apple.com/DTDs/ PropertyList-1.0.dtd"> format <plist version="1.0"> <dict> <key>Year Of Birth</key> <integer>1965</integer> Can be easily <key>Pets Names</key> <array/> generated by a PHP <key>Picture</key> <data> script ! PEKBpYGlmYFCPA== </data> <key>City of Birth</key> <string>Springfield</string> Built-in conversion to <key>Name</key> <string>John Doe</string> Cocoa objects <key>Kids Names</key> <array> ! <string>John</string> NSDictionary* dic = [NSDictionary ! <string>Kyra</string> dictionaryWithContentsOfURL:...]; </array> </dict> </plist>
  • 16. HTTP-Plist Example Your iApp NSDictionary Your Server [NSDictionary dictionaryWithContentsOfURL:...] HTTP Request Property List response new Dictionary object
  • 17. Case Study: Fund Watch Display fund prices from Fundsupermart* Screen scraper JavaScript-based HTML parser Derived from Fundsupermart Dashboard Widget *Fund Watch is not associated with Fundsupermart
  • 18. Fund Watch Parser Fund Watch UIWebView fundsupermart.com Load JavaScript library Request fund prices page HTML Page Parse HTML Page Fund prices
  • 19. The App Store Accessible via iTunes 3rd party screen scrapers The only way to sell your native apps 50K+ apps and counting Requires a developer’s account
  • 20. Selling your Apps 1. Register for an iPhone Developer account 2. Get your bank’s SWIFT code 3. Prepare IRS documents 1. Fill and submit SS-4 “Request for EIN” to IRS 2. Wait for your EIN from IRS 3. Fill form W8-BEN and submit to Apple 4. Fill the Paid Applications Contract 5. Register SWIFT code to Apple 6. Upload your paid applications to Apple’s iTunes Connect
  • 21. Beyond the App Store Advertisement Admob Analytics Pinch Media Social Networking OpenFeint
  • 22. AdMob