iPhone Development: Zero to Sixty

4,070 views

Published on

A Presentation I did for Northwest Of US Mac User Group - Programmers Special Interest Group on Thursday October 2, 2008.

Get in touch if you like it or even if you hate it!

Published in: Technology, News & Politics
1 Comment
13 Likes
Statistics
Notes
No Downloads
Views
Total views
4,070
On SlideShare
0
From Embeds
0
Number of Embeds
260
Actions
Shares
0
Downloads
191
Comments
1
Likes
13
Embeds 0
No embeds

No notes for slide

iPhone Development: Zero to Sixty

  1. iPhone Development Zero to Sixty Tom Swift 1821 Design
  2. Who the hell am I? <ul><ul><li>iPhone Developer: Thomas Swift </li></ul></ul><ul><ul><li>Owner of 1821 Design </li></ul></ul><ul><ul><ul><li>http://1821design.com </li></ul></ul></ul><ul><ul><li>Rails Developer & Web Designer </li></ul></ul><ul><ul><li>http://twitter.com/tmy - add me </li></ul></ul><ul><ul><ul><li>or don't (i swear a lot) </li></ul></ul></ul>
  3. Why iPhone Development? <ul><ul><li>The iPhone kicks ass </li></ul></ul><ul><ul><ul><li>3G and GPS </li></ul></ul></ul><ul><ul><ul><li>Powerful </li></ul></ul></ul><ul><ul><ul><li>OpenGL ES </li></ul></ul></ul><ul><ul><li>Mac Development </li></ul></ul><ul><ul><li>Xcode & Objective-C </li></ul></ul><ul><ul><li>App Store </li></ul></ul><ul><ul><ul><li>One Stop Shop </li></ul></ul></ul><ul><ul><ul><li>Easy For Users </li></ul></ul></ul><ul><ul><ul><li>Great For Developers * </li></ul></ul></ul>
  4. Getting Started <ul><ul><li>What you need </li></ul></ul><ul><ul><ul><li>iPhone Developer Account </li></ul></ul></ul><ul><ul><ul><li>Newest Xcode </li></ul></ul></ul><ul><ul><ul><li>Intel Machine :( </li></ul></ul></ul><ul><ul><li>What you (really) need </li></ul></ul><ul><ul><ul><li>iPhone or iPod Touch </li></ul></ul></ul><ul><ul><ul><li>Developer Certificate </li></ul></ul></ul><ul><ul><ul><li>Patience or some sort of mechanism to cope </li></ul></ul></ul>
  5. <ul><ul><li>Learning Objective-C or: </li></ul></ul><ul><ul><li>How I Learned to Stop Worrying and Love the Bracket </li></ul></ul>
  6. Objective-C <ul><li>Things that threw me for a loop </li></ul><ul><li>Bracket Madness </li></ul><ul><ul><li>Method Calling </li></ul></ul><ul><ul><ul><li>[object method:param] instead of object.method(param) </li></ul></ul></ul><ul><li>Plus and Minus in front of method calls </li></ul><ul><li>Going back to two files .m and .h </li></ul><ul><li>Pointers and Memory Management </li></ul><ul><li>Extremely long names of things </li></ul><ul><ul><li>UIBarButtonItem *buttonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(toggleView)]; </li></ul></ul><ul><li>Get Over It </li></ul><ul><li>I’m sure I forgot something </li></ul>
  7. Where I started <ul><li>Apple Sample Code </li></ul><ul><ul><li>Apple Sample Code is like an old BMW M5 </li></ul></ul>
  8. Which M5 - E60 M5 ?
  9. Which M5 – E36 M5?
  10. Nope: the E34 M5
  11. Why is Apple Sample code like a old BMW M5? <ul><li>Hand built by Single Person or a small team </li></ul><ul><li>Test Drivers were able to tell who built them </li></ul><ul><li>Each had own individual style to match objective </li></ul><ul><li>Pretty badass and very relevant </li></ul><ul><li>They get the job done </li></ul><ul><li>A Little Old – except a few </li></ul>
  12. Good Apple Samples <ul><li>LocateMe </li></ul><ul><ul><li>CoreLocation </li></ul></ul><ul><ul><li>Delegates </li></ul></ul><ul><li>SpeakHere </li></ul><ul><ul><li>AudioToolbox </li></ul></ul><ul><ul><li>AudioQueue </li></ul></ul><ul><li>AccelerometerGraph </li></ul><ul><li>SeismicXML </li></ul><ul><ul><li>Pulling from the web </li></ul></ul><ul><li>Reachability </li></ul><ul><ul><li>Wifi, Cell Network </li></ul></ul><ul><li>Many More </li></ul>
  13. Learning From Them <ul><li>Remove the 50 pages of comments from each file </li></ul><ul><li>Start from the top </li></ul><ul><ul><li>main.m </li></ul></ul><ul><ul><li><APP>AppDelegate.h .m </li></ul></ul>
  14. Xcode is slick <ul><li>Research Assistant </li></ul><ul><li>Code completion </li></ul><ul><ul><li>press esc </li></ul></ul><ul><li>Breakpoints & GDB </li></ul><ul><li>Documentation </li></ul><ul><li>Code Folding </li></ul><ul><li>Instruments </li></ul>
  15. A few tips <ul><li>An Error is an Error </li></ul><ul><li>A Warning is an Error - Fix it </li></ul><ul><li>When you alloc init something release it when your done with it </li></ul><ul><li>Link to frameworks inside the iPhone SDK Frameworks, sometime you’ll get funky build errors </li></ul><ul><li>Speaking of building </li></ul><ul><li>ABB – Always Be Building </li></ul>
  16. Simulators are no fun * <ul><li>Except for SimCity </li></ul><ul><li>It’s a little faster to compile it to the simulator </li></ul><ul><li>You can test out your didReceiveMemoryWarning (a little harder on the device) </li></ul>
  17. Taste The Real Thing <ul><li>Accelerometer </li></ul><ul><li>GPS </li></ul><ul><li>Microphone * </li></ul><ul><li>Real Memory Space </li></ul><ul><li>Testing Hand Interaction (that sounds sick) </li></ul><ul><ul><li>Left Handed, Right Handed </li></ul></ul><ul><ul><li>Screen Orientation </li></ul></ul><ul><ul><li>Keyboard Flow </li></ul></ul><ul><li>Oh crap! Phone Call </li></ul><ul><li>No WIFI, No Cell Signal </li></ul>
  18. Developer Certificate
  19. Getting that app on the Device <ul><li>Program Portal </li></ul><ul><ul><li>http://developer.apple.com/iphone/manage/overview/index.action </li></ul></ul><ul><li>Generate on keys the machine </li></ul><ul><li>Upload to Apple </li></ul><ul><li>Setup a Provision Profile </li></ul><ul><li>Download the Profile </li></ul><ul><li>Install in Xcode </li></ul><ul><li>Send app to device </li></ul>
  20. Program Portal
  21. Team
  22. Certificates
  23. Devices
  24. App IDs
  25. Struggle
  26. Provisioning Profile
  27. Installing Provisioning Profile <ul><li>Download and Drag to Xcode </li></ul><ul><ul><li>Xcode should be open </li></ul></ul><ul><li>When things get jacked up </li></ul><ul><ul><li>Restart Xcode </li></ul></ul><ul><ul><li>remove profiles </li></ul></ul><ul><ul><ul><li>delete from ~/Library/MobileDevice/Provisioning Profiles </li></ul></ul></ul><ul><ul><ul><li>drag the downloaded one to Xcode again </li></ul></ul></ul><ul><ul><ul><li>restart xcode for good measure </li></ul></ul></ul><ul><li>tweet about stabbing your eyes out </li></ul>
  28. Build? <ul><li>Not Yet – Error 0xE8000001 </li></ul><ul><li>Change Build Settings and info.plist </li></ul>
  29. 2 nd Most Important Slide
  30. Build Settings Right Click Blue Icon Get Info Click on Build Tab
  31.  
  32. YES!!!
  33. Where to turn to when the S hits the fan? (before fnda lifted) <ul><li>Apple Docs </li></ul><ul><li>Cocoa Dev Wiki </li></ul><ul><li>The Googles </li></ul><ul><li>http://www.iphonedevsdk.com/forum </li></ul><ul><li>IRC #iphonedev on freenode </li></ul><ul><li>Apple Dev Mail list </li></ul><ul><li>Existing Source Code </li></ul><ul><ul><li>Wordpress iPhone Code </li></ul></ul>
  34. * App Store <ul><li>First off, It’s awesome </li></ul><ul><li>But, </li></ul><ul><ul><li>REVIEWS </li></ul></ul><ul><ul><li>Loose Guidelines </li></ul></ul><ul><ul><li>NDA’d Rejections </li></ul></ul><ul><ul><li>Sea of pointless apps * </li></ul></ul><ul><ul><li>No Trials </li></ul></ul><ul><ul><li>Cheap People </li></ul></ul>
  35. Don’t Take My Word for it <ul><li>I am not an expert </li></ul><ul><li>I have no apps on the store </li></ul><ul><li>Based on personal experience </li></ul><ul><li>Your results WILL vary </li></ul><ul><li>Not Covered </li></ul><ul><ul><li>Distribution and Ad-Hoc </li></ul></ul>
  36. Enough Blab Let’s build something! Thomas Swift 1821 Design Slides: http://www.slideshare.net/1821Design/

×