Native Phone Development 101

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Favorite

    Native Phone Development 101 - Presentation Transcript

    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
    5. Network Environment
    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
    23. Pinch Analytics
    24. OpenFeint
    25. Hello, World!
    26. The End http://basil-salad.com

    + Sasmito AdibowoSasmito Adibowo, 1 month ago

    custom

    377 views, 1 favs, 2 embeds more stats

    The basics of programming native applications on th more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 377
      • 357 on SlideShare
      • 20 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 14
    Most viewed embeds
    • 17 views on http://www.saturngod.net
    • 3 views on http://cubic-m.blogspot.com

    more

    All embeds
    • 17 views on http://www.saturngod.net
    • 3 views on http://cubic-m.blogspot.com

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories