SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Mais procurados

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
 

Mais procurados (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
 

Semelhante a 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
 

Semelhante a 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)
 

Mais 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
 

Mais 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
 

Último

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 

Último (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 

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