secrets of an iphone developer n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Secrets of an iPhone Developer PowerPoint Presentation
Download Presentation
Secrets of an iPhone Developer

Loading in 2 Seconds...

play fullscreen
1 / 25

Secrets of an iPhone Developer - PowerPoint PPT Presentation


  • 112 Views
  • Uploaded on

Secrets of an iPhone Developer. Brian Robbins Founder, Riptide Games Slides at http://www.dubane.com/cons/ FITC Mobile – September 14, 2009. Today. Programming AudioSession Accelerometer Input Accelerometer Calibration Prevent screen darkening OS 3.0/2.0 compatibility Anti-Hacking

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Secrets of an iPhone Developer' - yama


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
secrets of an iphone developer

Secrets of an iPhone Developer

Brian Robbins

Founder, Riptide Games

Slides at http://www.dubane.com/cons/

FITC Mobile – September 14, 2009

today
Today

Brian Robbins - slides available: http://www.dubane.com/cons/

  • Programming
    • AudioSession
    • Accelerometer Input
    • Accelerometer Calibration
    • Prevent screen darkening
    • OS 3.0/2.0 compatibility
    • Anti-Hacking
    • NSZombieEnabled
    • Xcode 3.2 Errors / Warnings
    • Xcode 3.2 Static Analyzer
    • Demo
  • App Development
    • Provisioning Profile tips
    • iTunes Connect
    • App Submission Tips
    • Analytics tracking
    • Score / Networking Tools
    • iPhone Configuration Utility (iPCU)
    • Other Useful Tools
today s goal

Today’s Goal

Most useful session you attend

Brian Robbins - slides available: http://www.dubane.com/cons/

audiosession
AudioSession

Brian Robbins - slides available: http://www.dubane.com/cons/

  • Can use AudioSession APIs
    • C-based
  • Or AVAudioSession (SDK 3.0)
    • Obj-C wrapper into same C calls
  • Categories:
    • Ambient – Games, allows background iPod Music Playback and follows ringer switch
    • SoloAmbient – Same as ambient, but stops iPod Music Playback so use this if you have your own background music
    • Playback – Use for audio playback apps
    • Record & PlayAndRecord – For recording and playback
accelerometer input
Accelerometer Input

Brian Robbins - slides available: http://www.dubane.com/cons/

  • Use an adaptive Low-Pass filter, for better response
  • Full Implementation in the AccelerometerGraph sample application

#define FILTERFACTOR 0.1

#define ATTENUATION 3.0

#define MINSTEP 0.02

// Start with the value from a basic low-pass filter

basevalue = (newAcceleration * FILTERFACTOR) + (previousValue * (1.0 - FILTERFACTOR));

// Smooth more for small movement to filter out

noised = Clamp(ABS(Normalize(basevalue)-Normalize(newAcceleration))/MINSTEP - 1., 0., 1.);

// Calculate a proportional factor

alpha = (1.-d) * FILTERFACTOR / ATTENUATION + d * FILTERFACTOR;

// Use the new factor to offset smoothed values

value = newAcceleration * alpha + basevalue * (1. - alpha);

accelerometer calibration
Accelerometer Calibration

Brian Robbins - slides available: http://www.dubane.com/cons/

Map to the user’s starting orientation when doing heavy accelerometer control

Do this when action starts, and ideally tell the user

Sorry (James) no example

prevent screen darkening
Prevent Screen Darkening

Brian Robbins - slides available: http://www.dubane.com/cons/

Turn on during gameplay

Turn off in menus

[UIApplication sharedApplication].idleTimerDisabled = YES;

os 3 0 2 0 compatibility
OS 3.0 / 2.0 compatibility

Brian Robbins - slides available: http://www.dubane.com/cons/

  • Use OS 3.0 features like MPMusicPicker, without requiring OS 3.0
    • Why? OS upgrades on iPod Touch is very low
  • 4 technical steps
  • Business rules for behavior
os 3 0 2 0 compatibility1
OS 3.0 / 2.0 Compatibility

Brian Robbins - slides available: http://www.dubane.com/cons/

  • Target > Info > General
    • Set Framework Linked Library from “Required” to “Weak”
  • Target > Info > Build
    • Set Base SDK to latest SDK (ie 3.0)
  • Target > Info > Build
    • Set iPhone OS Deployment Target to oldest SDK (ie 2.1)
  • Check for availability of class before using it
    • if ([MPMusicPickerController])
anti hacking
Anti-Hacking

Brian Robbins - slides available: http://www.dubane.com/cons/

http://thwart-ipa-cracks.blogspot.com/

Very simple detection, can go a lot more complex

NSBundle *bundle = [NSBundle mainBundle];

NSDictionary *info = [bundle infoDictionary];

if ([info objectForKey: @"SignerIdentity"] != nil)

{/* do something */

}

Can also look to see if app is encrypted, check size of info.plist, call home, etc.

nszombieenabled
NSZombieEnabled

Brian Robbins - slides available: http://www.dubane.com/cons/

  • Executables > Info > Arguments
    • NSZombieEnabled value YES
  • Good for EXC_BAD_ACCESS
  • BAD for memory!!!
xcode 3 2 errors warnings
Xcode 3.2 Errors & Warnings

Brian Robbins - slides available: http://www.dubane.com/cons/

Use the tabs to see from last build or all builds

Can also group by type instead of by class

xcode 3 2 static analyzer
Xcode 3.2 Static Analyzer

Brian Robbins - slides available: http://www.dubane.com/cons/

Uses Open Source Clang analyzer

Good for memory references and Obj-C coding compliance

Freaking awesome!

live demo

Live Demo

Brian Robbins - slides available: http://www.dubane.com/cons/

provisioning profile tips
Provisioning Profile Tips

Brian Robbins - slides available: http://www.dubane.com/cons/

  • Make and use a single “wildcard” App ID
    • Nothing but a single *
    • Use that for all development and provisioning profiles
    • Unless you’re doing in-app purchase or Push Notification
  • When adding devices or users make a new Provisioning Profile
    • ie Riptide_Dev_01, Riptide_Dev_02
itunes connect
iTunes Connect

Brian Robbins - slides available: http://www.dubane.com/cons/

  • Release Date
    • When submit, set it to whatever, probably 1-2 weeks in the future
    • The moment you get approval set the release date to today
    • For Updates, leave release date as is when submit
      • Setting to future will remove you from store!
    • Moment approved, set release date to today
itunes connect app submission
iTunes Connect App Submission

Brian Robbins - slides available: http://www.dubane.com/cons/

  • Taking ~2 weeks for approval
    • Every time, even if rejected for app description problem!
  • Plan for keywords, but don’t use competitor names
  • Don’t put pricing in your app description
  • Don’t put keywords in your app title
analytics tracking
Analytics Tracking

Brian Robbins - slides available: http://www.dubane.com/cons/

Simple, cheap (free) and very easy to implement

PinchMedia is good

Other major one is Flurry Analytics

Not something you need to pay for!

score networking
Score / Networking

Brian Robbins - slides available: http://www.dubane.com/cons/

Good idea, especially for games

Use an existing network to borrow traffic/users

OpenFeint, ScoreLoop are biggest open ones

Plus+ from ngMoCo is picking up steam, but you have to talk to ngMoCo to use it.

iphone configuration utility
iPhone Configuration Utility

Brian Robbins - slides available: http://www.dubane.com/cons/

Search for iPhone Configuration Utility on Apple Site (2.1 latest version)

Basically the Xcode Organizer without Xcode

Much easier for AdHoc users to install and manage apps

other useful tools
Other Useful Tools

Brian Robbins - slides available: http://www.dubane.com/cons/

  • MajicRank
    • http://www.majicjungle.com/majicrank.html
  • AppViz
    • http://www.ideaswarm.com/
  • MobClix for rank tracking
    • http://www.mobclix.com/appstore/1
  • AppShopper for price history
    • http://appshopper.com/
recap
Recap

Brian Robbins - slides available: http://www.dubane.com/cons/

  • Programming
    • AudioSession
    • Accelerometer Input
    • Accelerometer Calibration
    • Prevent screen darkening
    • OS 3.0/2.0 compatibility
    • Anti-Hacking
    • NSZombieEnabled
    • Xcode 3.2 Errors / Warnings
    • Xcode 3.2 Static Analyzer
    • Demo
  • App Development
    • Provisioning Profile tips
    • iTunes Connect
    • App Submission Tips
    • Analytics tracking
    • Score / Networking Tools
    • iPhone Configuration Utility (iPCU)
    • Other Useful Tools
questions

Questions?

Slides at http://www.dubane.com/cons/

Brian Robbins

www.riptidegames.com

Twitter: @dubane

brian@riptidegames.com