SlideShare ist ein Scribd-Unternehmen logo
1 von 97
Downloaden Sie, um offline zu lesen
ACCU 2010
iPhone development a brief introduction                            pete goodliffe




                 Hello,
                                          iPhone
                 world!                   Development
                                          a brief introduction




                                                           Pete Goodliffe
                                                           pete@goodliffe.net
iPhone development a brief introduction                                 pete goodliffe




                                     Pete Goodliffe
                                       A programmer, a columnist,
                                       an author, a teacher. Someone
                                       who cares about code.
                                                              www.goodliffe.net
                                                           goodliffe.blogspot.com
                                                                   @petegoodliffe
iPhone development a brief introduction                                 pete goodliffe




                                     Pete Goodliffe
                                       A programmer, a columnist,
                                       an author, a teacher. Someone
                                       who cares about code.
                                                              www.goodliffe.net
                                                           goodliffe.blogspot.com
                                                                   @petegoodliffe
iPhone development a brief introduction                                                           pete goodliffe




    talk synopsis
                  An introduction to iPhone development
                  An introduction to iPhone development for beginners or those who are casually
                  interested and want a leg up the learning curve.

                  This talk is an overview of how to get started as an iPhone developer, and an
                  introduction to the core technologies, including:

                   ‣   Common iPhone/Mac OS design patterns, idioms, and practices
                   ‣   Becoming a native: how to "think in iPhone"
                   ‣   Overview of the libraries and facilities that exist
                   ‣   Limitations of the development environment
iPhone development a brief introduction                pete goodliffe




                         90 minutes? is that all?!!!
iPhone development a brief introduction                                                       pete goodliffe




in 90 minutes...                                   Demo           Intro
      ‣ Intro
      ‣ The tools                           Tips
      ‣ The language                                                          Tools

      ‣ The UI
      ‣ Key technologies
      ‣ Deploying                         Further info

      ‣ Further info                                                               Language

      ‣ Tips and tricks                            Deploying
      ‣ The demo                                                              UI
                                                               Technologies




                    m… pie
                 Mm
iPhone development a brief introduction                                                       pete goodliffe




in 90 minutes...                                   Demo
                                                                  Intro



      ‣ Intro


          Introduction
      ‣ The tools                           Tips
      ‣ The language                                                          Tools

      ‣ The UI
      ‣ Key technologies
      ‣ Deploying                         Further info

      ‣ Further info                                                               Language

      ‣ Tips and tricks                            Deploying
      ‣ The demo                                                              UI
                                                               Technologies
iPhone development a brief introduction     pete goodliffe




                             who are you?
iPhone development a brief introduction     pete goodliffe




                           why develop
                          for the iPhone?
iPhone development a brief introduction    pete goodliffe




                        the alternatives
iPhone development a brief introduction                                                       pete goodliffe




in 90 minutes...                                   Demo
                                                                  Intro



      ‣ Intro
      ‣ The tools                           Tips
      ‣ The language                                                          Tools

      ‣ The UI
      ‣ Key technologies
      ‣ Deploying                         Further info

      ‣ Further info                                                               Language

      ‣ Tips and tricks                            Deploying
      ‣ The demo                                                              UI
                                                               Technologies
iPhone development a brief introduction                                                       pete goodliffe




in 90 minutes...                                   Demo           Intro
      ‣ Intro
      ‣ The tools                           Tips
      ‣ The language                                                          Tools

      ‣ The UI
      ‣ Key technologies
      ‣ Deploying                         Further info

      ‣ Further info                                                               Language

      ‣ Tips and tricks                            Deploying
      ‣ The demo                                                              UI
                                                               Technologies
iPhone development a brief introduction                                                       pete goodliffe




in 90 minutes...                                   Demo           Intro
      ‣ Intro


                       The tools
      ‣ The tools                           Tips                                    Tools
      ‣ The language
      ‣ The UI
      ‣ Key technologies
      ‣ Deploying                         Further info

      ‣ Further info                                                               Language

      ‣ Tips and tricks                            Deploying
      ‣ The demo                                                              UI
                                                               Technologies
iPhone development a brief introduction                pete goodliffe




                                 ❖        The cast ❖
                           Xcode
                   iPhone/iPod Touch/iPad
                      Interface builder
                      iPhone simulator
                     Instruments/Shark
                         Other tools
iPhone development a brief introduction           pete goodliffe




                                          Xcode
iPhone development a brief introduction   pete goodliffe
iPhone development a brief introduction   pete goodliffe
iPhone development a brief introduction         pete goodliffe




                                    an iPhone
iPhone development a brief introduction   pete goodliffe




                      Interface Builder
iPhone development a brief introduction   pete goodliffe




                     iPhone simulator
iPhone development a brief introduction   pete goodliffe




                 Instruments/Shark
iPhone development a brief introduction         pete goodliffe




                                  Other tools
iPhone development a brief introduction               pete goodliffe




                        Getting set up...
                                Get a Mac
                              Get the tools
                                 Install
                           Get an ADC account   $$$
                                  Code
                                    …
                                  Profit
iPhone development a brief introduction                                                       pete goodliffe




in 90 minutes...                                   Demo           Intro
      ‣ Intro
      ‣ The tools                           Tips                                    Tools
      ‣ The language
      ‣ The UI
      ‣ Key technologies
      ‣ Deploying                         Further info

      ‣ Further info                                                               Language

      ‣ Tips and tricks                            Deploying
      ‣ The demo                                                              UI
                                                               Technologies
iPhone development a brief introduction                                                       pete goodliffe




in 90 minutes...                                   Demo           Intro
      ‣ Intro
      ‣ The tools                           Tips
      ‣ The language                                                          Tools

      ‣ The UI
      ‣ Key technologies
      ‣ Deploying                         Further info

      ‣ Further info                                                               Language

      ‣ Tips and tricks                            Deploying
      ‣ The demo                                                              UI
                                                               Technologies
iPhone development a brief introduction                                                          pete goodliffe




in 90 minutes...                                   Demo           Intro
      ‣ Intro


      The language
      ‣ The tools                           Tips
      ‣ The language                                                          Tools

      ‣ The UI
      ‣ Key technologies
      ‣ Deploying                         Further info

      ‣ Further info                                                                  Language
      ‣ Tips and tricks                            Deploying
      ‣ The demo                                                              UI
                                                               Technologies
iPhone development a brief introduction                 pete goodliffe




                     (well, languages)
                                              C
                                             C++
                                          Objective-C
iPhone development a brief introduction   pete goodliffe
iPhone development a brief introduction                    pete goodliffe




                     a history of
                   objective-c in 14
                 lines and 12 words
                                          (give or take)
iPhone development a brief introduction                               pete goodliffe


                                             algol


                      CPL                               Simula

                    BCPL                   Smalltalk
                     B
                     C
                                          Objective-C
                                                            C++


                                                     Java    C#   D
iPhone development a brief introduction                   pete goodliffe



                           objective C is...
                                   dynamic
                         based on message passing
                        follows C compilation model
                              full of [ ] and @s

                                                       ot too
                                                      n
   - (id) thisIsAMethod:(int)param1                        ry!
              signatute:(float)param2                  sca
   {
       for (int n (brace n < 10; ++n)
                   = 0; yourself)
       {
           NSLog(@”N=%d”, n);
           [object callMethod:1 thing:2];
       }
   }
iPhone development a brief introduction             pete goodliffe

                                          .m file

  @implementation MyClass

  - (id) thisIsAMethod:(int)param1
             signatute:(float)param2
  {
      for (int n = 0; n < 10; ++n)
      {
          NSLog(@”N=%d”, n);
          [object callMethod:1 thing:2];
      }
  }

  @end
iPhone development a brief introduction    pete goodliffe




  @implementation MyClass

  - (id) thisIsAMethod:(int)param1
        @class
             signatute:(float)param2
  {     @interface
        @implementation
      for (int n = 0; n < 10; ++n)
      { @end
          NSLog(@”N=%d”, n);
        @property
          [object callMethod:1 thing:2];
        @private
      }
  }     @protected

  @end
iPhone development a brief introduction    pete goodliffe




  @implementation MyClass

  - (id) thisIsAMethod:(int)param1
             signatute:(float)param2
  {
      for (int n = 0; n < 10; ++n)
      {
          NSLog(@”N=%d”, n);
          [object callMethod:1 thing:2];
      }
  }

  @end
iPhone development a brief introduction    pete goodliffe




  @implementation MyClass

  - (id) thisIsAMethod:(int)param1
             signatute:(float)param2
  {
      for (int n = 0; n < 10; ++n)
      {
          NSLog(@”N=%d”, n);
          [object callMethod:1 thing:2];
      }
  }

  @end
iPhone development a brief introduction    pete goodliffe




  @implementation MyClass

  - (id) thisIsAMethod:(int)param1
             signatute:(float)param2
  {
      for (int n = 0; n < 10; ++n)
      {
          NSLog(@”N=%d”, n);
          [object callMethod:1 thing:2];
      }
  }

  @end
iPhone development a brief introduction            pete goodliffe




  @implementation MyClass

  - (id) thisIsAMethod:(int)param1
             signatute:(float)param2
                              C an
  {                                stil
                                        l
                                  C fr write
      for (int n = 0; n < 10; ++n)ee func (and c
                                             tion all)
      {                                          s

          NSLog(@”N=%d”, n);
          [object callMethod:1 thing:2];
      }
  }

  @end
iPhone development a brief introduction    pete goodliffe




  @implementation MyClass

  - (id) thisIsAMethod:(int)param1
             signatute:(float)param2
  {
      for (int n = 0; n < 10; ++n)
      {
          NSLog(@”N=%d”, n);
                         NSS
          [object callMethod:1 thing:2];
                             tri
      }                          ng
  }

  @end
iPhone development a brief introduction    pete goodliffe




  @implementation MyClass

  - (id) thisIsAMethod:(int)param1
             signatute:(float)param2
  {
      for (int n = 0; n < 10; ++n)
      {
          NSLog(@”N=%d”, n);
          [object callMethod:1 thing:2];
      }
  }

  @end
iPhone development a brief introduction     pete goodliffe




  @implementation MyClass

  - (id) thisIsAMethod:(int)param1
              signatute:(float)param2
  {
       for (int n = 0; n < 10; ++n)
       {
           NSLog(@”N=%d”, n);
           [object callMethod:1 thing:2];
       }                  Can
  }                           call
                                   nil
  @end
iPhone development a brief introduction                pete goodliffe



                                          Sending messages

         [object method];
 int i = [object method];
        [[object method1] method2];

                      [object method:10];
                      [object1 method:[object 2:method]];
iPhone development a brief introduction                              pete goodliffe



                                                   Method names
                                                        parameters


 object


 [circle setCenterAtX:(float)x y:(float)y];

                                          method name


                         method name is: setCenterAtX:y:


            SEL s = @selector(setCenterAtX:y:);
            [circle performSelector:s];
iPhone development a brief introduction                  pete goodliffe




                    parameter types:
                             int, float, unsigned, etc
                              syntax: (return type)
                                          id
iPhone development a brief introduction             pete goodliffe
                                          .h file

  @class ForwardDeclaration;

  @interface MyClass : NSObject
  {
      ForwardDeclaration *member;
      bool                otherMember;
  }

  - (void) init;
  - (id) initWithItems:(NSArray*)array
               enabled:(bool)enabled;

  + (id) myClassWithItems:(NSArray*)array;

  @end
iPhone development a brief introduction   pete goodliffe



  @class ForwardDeclaration;

  @interface MyClass : NSObject
  {
      ForwardDeclaration *member;
      bool                otherMember;
  }

  - (void) init;
  - (id) initWithItems:(NSArray*)array
               enabled:(bool)enabled;

  + (id) myClassWithItems:(NSArray*)array;

  @end
iPhone development a brief introduction   pete goodliffe



  @class ForwardDeclaration;

  @interface MyClass : NSObject
  {
      ForwardDeclaration *member;
      bool                otherMember;
  }

  - (void) init;
  - (id) initWithItems:(NSArray*)array
               enabled:(bool)enabled;

  + (id) myClassWithItems:(NSArray*)array;

  @end
iPhone development a brief introduction   pete goodliffe



  @class ForwardDeclaration;

  @interface MyClass : NSObject
  {
      ForwardDeclaration *member;
      bool                otherMember;
  }

  - (void) init;
  - (id) initWithItems:(NSArray*)array
               enabled:(bool)enabled;

  + (id) myClassWithItems:(NSArray*)array;

  @end
iPhone development a brief introduction   pete goodliffe



  @class ForwardDeclaration;

  @interface MyClass : NSObject
  {
      ForwardDeclaration *member;
      bool                otherMember;
  }

  - (void) init;
  - (id) initWithItems:(NSArray*)array
               enabled:(bool)enabled;

  + (id) myClassWithItems:(NSArray*)array;

  @end
iPhone development a brief introduction   pete goodliffe



  @class ForwardDeclaration;

  @interface MyClass : NSObject
  {
      ForwardDeclaration *member;
      bool                otherMember;
  }

  - (void) init;
  - (id) initWithItems:(NSArray*)array
               enabled:(bool)enabled;

  + (id) myClassWithItems:(NSArray*)array;

  @end
iPhone development a brief introduction   pete goodliffe



  @class ForwardDeclaration;

  @interface MyClass : NSObject
  {
      ForwardDeclaration *member;
      bool                otherMember;
  }

  - (void) init;
  - (id) initWithItems:(NSArray*)array
               enabled:(bool)enabled;

  + (id) myClassWithItems:(NSArray*)array;

  @end
iPhone development a brief introduction   pete goodliffe



  @class ForwardDeclaration;

  @interface MyClass : NSObject
  {
      ForwardDeclaration *member;
      bool                otherMember;
  }

  - (void) init;
  - (id) initWithItems:(NSArray*)array
               enabled:(bool)enabled;

  + (id) myClassWithItems:(NSArray*)array;

  @end
iPhone development a brief introduction               pete goodliffe




                            Objective C++
                              In .mm files
                    Classes can contain C++ objects
                         May use in functions
                           You can use RAII
                             C++ libraries
iPhone development a brief introduction                 pete goodliffe



Properties
            @interface MyClass
            {
                 int harold;
            }
            @property (nonatomic,assign) int harold;
            @end

        In MyClass.m...
          @interface MyClass
          @synthesize harold;
          @end

                                            This will become
                                          important when we
                                          look at creating UIs
iPhone development a brief introduction               pete goodliffe




                     The tao of objects
                         You don’t call methods
                       You pass messages to objects

            [theObject sendMessage:parameter];
iPhone development a brief introduction                                        pete goodliffe


                                                         Java, C++, C#
  object.myMethod(1066);

                                           MyClass

                                     myMethod(int)
                                                               MyClass *this
                                     another()

                                     more()
                                                          class MyClass
                                                          {
                                          private data        public myMethod(int i)
                                                              {
                                                                  // ...
                                                              }
                                                          };
iPhone development a brief introduction                                        pete goodliffe


                                                           Objective-C
  [object myMethod:1066];

                                             MyClass
           message
            (selector)
                                                              MyClass *self

                                          myMethod(int)

                                          another()
                                                            @implementation MyClass
                                                            - (void) myMethod:(int)i
                                            private data    {
                                                               // ...
                                                            }
                                                            @end
iPhone development a brief introduction     pete goodliffe



Categories

        @interface NSObject (Foo)
        - (void) extraFooMethod;
        @end



        NSArray *array = [NSArray array];
        [array extraFooMethod];
iPhone development a brief introduction                                 pete goodliffe



                                                Object lifetime
                                          All objects are reference counted
                                                               (the retain count)




 NSArray *array1 = [[NSArray alloc] init];
 NSArray *array2 = [NSArray array];

 [array1 release];
 [array2 release]; // wrong

 Circle *circle = [[Circle alloc] initAtCenterX:100
                                              y:100
                                         radius:200];
iPhone development a brief introduction                                 pete goodliffe




                                                               Retain
                                          Action               count



       [[object alloc] init];                                    1


                                            [object retain];     2


       [object release];                                         1


                                           [object release];     0

                                                      [object dealloc];
iPhone development a brief introduction                 pete goodliffe



                                          The usual suspects

       NSObject
       NSString
       NSArray       NSMutableArray
       NSNumber
       NSThread
       NSDictionary NSMutableDictionary
       NSApplication
       NSData        NSMutableData
       NSURL
       NSSet         NSMutableSet
       NSValue
iPhone development a brief introduction   pete goodliffe




       Statically typed my arse
               #import
iPhone development a brief introduction                   pete goodliffe




                                          Idioms

                   Delegates
               Key-value coding
              Protocol (interfaces)
                                    formal and informal
iPhone development a brief introduction                                   pete goodliffe




                              The libraries
         Objective C
                                          Cocoa Touch             UIKit, etc


                                                          Core Audio, Open GL ES,
                                             Media        Quartz, Core Animation


                                          Core Services

                                            Core OS           Posix,SQLite, Core
                                                               Foundation, BSD
               C
iPhone development a brief introduction                                                          pete goodliffe




in 90 minutes...                                   Demo           Intro
      ‣ Intro
      ‣ The tools                           Tips
      ‣ The language                                                          Tools

      ‣ The UI
      ‣ Key technologies
      ‣ Deploying                         Further info

      ‣ Further info                                                                  Language
      ‣ Tips and tricks                            Deploying
      ‣ The demo                                                              UI
                                                               Technologies
iPhone development a brief introduction                                                       pete goodliffe




in 90 minutes...                                   Demo           Intro
      ‣ Intro
      ‣ The tools                           Tips
      ‣ The language                                                          Tools

      ‣ The UI
      ‣ Key technologies
      ‣ Deploying                         Further info

      ‣ Further info                                                               Language

      ‣ Tips and tricks                            Deploying
      ‣ The demo                                                              UI
                                                               Technologies
iPhone development a brief introduction                                                    pete goodliffe




in 90 minutes...                                   Demo           Intro
      ‣ Intro


                                  The UI
      ‣ The tools                           Tips
      ‣ The language                                                          Tools

      ‣ The UI
      ‣ Key technologies
      ‣ Deploying                         Further info

      ‣ Further info                                                            Language

      ‣ Tips and tricks                            Deploying
      ‣ The demo
                                                               Technologies
                                                                                 UI
iPhone development a brief introduction   pete goodliffe




                      Interface Builder
iPhone development a brief introduction                     pete goodliffe




                                Held in .xib files
                                          (Compiled NIBs)

                    Loaded into application
                     (semi-automatically)

              IB is tightly integrated with
                          Xcode

                              UIKit framework
iPhone development a brief introduction   pete goodliffe
iPhone development a brief introduction          pete goodliffe




                            Create UI elements

            Link to an object reference in
             the XIB through properties
                 marked as IBOutlet

                    Link actions to methods
                       defined IBAction
iPhone development a brief introduction                                         pete goodliffe




  //
  //     ExampleAppDelegate.h
  //     Example
  //
  //     Created by Pete Goodliffe on 03/04/2010.
  //     Copyright __MyCompanyName__ 2010. All rights reserved.
  //

  #import <UIKit/UIKit.h>

  @interface ExampleAppDelegate : NSObject <UIApplicationDelegate> {

         UIWindow *window;
         UINavigationController *navigationController;
  }

  @property (nonatomic, retain) IBOutlet UIWindow *window;
  @property (nonatomic, retain) IBOutlet UINavigationController *navigationController;

  @end
iPhone development a brief introduction                                                    pete goodliffe




in 90 minutes...                                   Demo           Intro
      ‣ Intro
      ‣ The tools                           Tips
      ‣ The language                                                          Tools

      ‣ The UI
      ‣ Key technologies
      ‣ Deploying                         Further info

      ‣ Further info                                                            Language

      ‣ Tips and tricks                            Deploying
      ‣ The demo
                                                               Technologies
                                                                                 UI
iPhone development a brief introduction                                                       pete goodliffe




in 90 minutes...                                   Demo           Intro
      ‣ Intro
      ‣ The tools                           Tips
      ‣ The language                                                          Tools

      ‣ The UI
      ‣ Key technologies
      ‣ Deploying                         Further info

      ‣ Further info                                                               Language

      ‣ Tips and tricks                            Deploying
      ‣ The demo                                                              UI
                                                               Technologies
iPhone development a brief introduction                                                       pete goodliffe




      ‣ Intro
              Key
in 90 minutes...
      ‣ The tools
      ‣ The language
      ‣ The UI
                                            Tips
                                                   Demo         Intro




                                                                              Tools




          technologies
      ‣ Key technologies
      ‣ Deploying                         Further info

      ‣ Further info                                                               Language

      ‣ Tips and tricks                            Deploying
      ‣ The demo                                                              UI


                                                               Technologies
iPhone development a brief introduction   pete goodliffe




                        UIKit
                    Core Graphics
                     Core Audio
              Media Core / AVFoundation
               MapKit / Core Location
                 CoreData (or sqlite)
                     OpenGL ES
                 External Accessory
iPhone development a brief introduction                                                       pete goodliffe




in 90 minutes...                                   Demo         Intro
      ‣ Intro
      ‣ The tools                           Tips
      ‣ The language                                                          Tools

      ‣ The UI
      ‣ Key technologies
      ‣ Deploying                         Further info

      ‣ Further info                                                               Language

      ‣ Tips and tricks                            Deploying
      ‣ The demo                                                              UI


                                                               Technologies
iPhone development a brief introduction                                                       pete goodliffe




in 90 minutes...                                   Demo           Intro
      ‣ Intro
      ‣ The tools                           Tips
      ‣ The language                                                          Tools

      ‣ The UI
      ‣ Key technologies
      ‣ Deploying                         Further info

      ‣ Further info                                                               Language

      ‣ Tips and tricks                            Deploying
      ‣ The demo                                                              UI
                                                               Technologies
iPhone development a brief introduction                                                       pete goodliffe




in 90 minutes...                                    Demo          Intro
      ‣ Intro


                   Deploying
      ‣ The tools                           Tips
      ‣ The language                                                          Tools

      ‣ The UI
      ‣ Key technologies
      ‣ Deploying                         Further info

      ‣ Further info                                                               Language

      ‣ Tips and tricks
      ‣ The demo                                   Deploying
                                                                              UI
                                                               Technologies
iPhone development a brief introduction                                pete goodliffe




                 Deploying
            iPhone
          simulator                                    iPhone

                                                  developer account ($$$)
               free
                                                        “DRM hell”
               x86
                                                  Deployment certificates
      runs at desktop speed
                          different build targets   100 devices per year
         more memory
           network stable
                                           App
                                          store   iTunes connect
                                                  Another build type
iPhone development a brief introduction                  pete goodliffe




                                              App
                                             store

                                            submit

                                          get rejected

                                             fix it

                                           resubmit


                                            profit
iPhone development a brief introduction                                                       pete goodliffe




in 90 minutes...                                    Demo          Intro
      ‣ Intro
      ‣ The tools                           Tips
      ‣ The language                                                          Tools

      ‣ The UI
      ‣ Key technologies
      ‣ Deploying                         Further info

      ‣ Further info                                                               Language

      ‣ Tips and tricks
      ‣ The demo                                   Deploying
                                                                              UI
                                                               Technologies
iPhone development a brief introduction                                                       pete goodliffe




in 90 minutes...                                   Demo           Intro
      ‣ Intro
      ‣ The tools                           Tips
      ‣ The language                                                          Tools

      ‣ The UI
      ‣ Key technologies
      ‣ Deploying                         Further info

      ‣ Further info                                                               Language

      ‣ Tips and tricks                            Deploying
      ‣ The demo                                                              UI
                                                               Technologies
iPhone development a brief introduction                                                             pete goodliffe




in 90 minutes...                                         Demo           Intro
      ‣ Intro


           Further info
      ‣ The tools                                Tips
      ‣ The language                                                                Tools

      ‣ The UI
      ‣ Key technologies
      ‣ Deploying                         Further info

      ‣ Further info                                                                     Language

      ‣ Tips and tricks                                  Deploying
      ‣ The demo                                                                    UI
                                                                     Technologies
iPhone development a brief introduction                            pete goodliffe




                Xcode documentation
             developer.apple.com/iphone
                        Books
                      Websites
                                   Stack Overflow, CocoaDev, ADC

                   Videos on iTunes U
               http://itunes.stanford.edu/
iPhone development a brief introduction                                                             pete goodliffe




in 90 minutes...                                         Demo           Intro
      ‣ Intro
      ‣ The tools                                Tips
      ‣ The language                                                                Tools

      ‣ The UI
      ‣ Key technologies
      ‣ Deploying                         Further info

      ‣ Further info                                                                     Language

      ‣ Tips and tricks                                  Deploying
      ‣ The demo                                                                    UI
                                                                     Technologies
iPhone development a brief introduction                                                       pete goodliffe




in 90 minutes...                                   Demo           Intro
      ‣ Intro
      ‣ The tools                           Tips
      ‣ The language                                                          Tools

      ‣ The UI
      ‣ Key technologies
      ‣ Deploying                         Further info

      ‣ Further info                                                               Language

      ‣ Tips and tricks                            Deploying
      ‣ The demo                                                              UI
                                                               Technologies
iPhone development a brief introduction                                                      pete goodliffe




in 90 minutes...
      ‣ Intro
      ‣ The tools
      ‣ The language
      ‣ The UI
                     Tips                 Tips
                                                    Demo            Intro




                                                                                Tools




                   and tricks
      ‣ Key technologies
      ‣ Deploying                           Further info

      ‣ Further info                                                              Language

      ‣ Tips and tricks                              Deploying
      ‣ The demo                                                                UI
                                                                 Technologies
iPhone development a brief introduction          pete goodliffe




                               Thinking iPhone
iPhone development a brief introduction                          pete goodliffe




                                 Get the UI right
                                             HIG
                                    resource conservation
                                (alpha blending, prerendering)
iPhone development a brief introduction     pete goodliffe




                The network is not always
                        available
iPhone development a brief introduction             pete goodliffe




                          Do not write to disk
                                          (often)
iPhone development a brief introduction                pete goodliffe




                           Conserve resources
                                             RAM
                                              CPU
                                          filesystem
iPhone development a brief introduction                                                      pete goodliffe




in 90 minutes...                                    Demo            Intro
      ‣ Intro
      ‣ The tools                         Tips

      ‣ The language                                                            Tools

      ‣ The UI
      ‣ Key technologies
      ‣ Deploying                           Further info

      ‣ Further info                                                              Language

      ‣ Tips and tricks                              Deploying
      ‣ The demo                                                                UI
                                                                 Technologies
iPhone development a brief introduction                                                       pete goodliffe




in 90 minutes...                                   Demo           Intro
      ‣ Intro
      ‣ The tools                           Tips
      ‣ The language                                                          Tools

      ‣ The UI
      ‣ Key technologies
      ‣ Deploying                         Further info

      ‣ Further info                                                               Language

      ‣ Tips and tricks                            Deploying
      ‣ The demo                                                              UI
                                                               Technologies
iPhone development a brief introduction                                                       pete goodliffe




in 90 minutes...                                Demo

                                                                  Intro
      ‣ Intro


                    The demo
      ‣ The tools                           Tips
      ‣ The language                                                          Tools

      ‣ The UI
      ‣ Key technologies
      ‣ Deploying                         Further info

      ‣ Further info                                                               Language

      ‣ Tips and tricks                            Deploying
      ‣ The demo                                                              UI
                                                               Technologies
iPhone development a brief introduction      pete goodliffe




                           (wish me luck)
                              wasn’t that
                              marvellous?!
iPhone development a brief introduction           pete goodliffe




                                          Pete Goodliffe
                                          pete@goodliffe.net

Weitere ähnliche Inhalte

Ähnlich wie iPhone development: A brief introduction

Mobile Prototyping
Mobile PrototypingMobile Prototyping
Mobile PrototypingDonna Lichaw
 
JHipster conf : craftsmanship & tdd
JHipster conf : craftsmanship & tddJHipster conf : craftsmanship & tdd
JHipster conf : craftsmanship & tddHippolyte Durix
 
Modern mobile development overview
Modern mobile development overviewModern mobile development overview
Modern mobile development overviewDima Maleev
 
Developer's got talent iPhone
Developer's got talent iPhoneDeveloper's got talent iPhone
Developer's got talent iPhonePiTechnologies
 
上午3 linpus rita_idf beijing powerpoint2011.ppt
上午3 linpus rita_idf beijing powerpoint2011.ppt上午3 linpus rita_idf beijing powerpoint2011.ppt
上午3 linpus rita_idf beijing powerpoint2011.pptcsdnmobile
 
10 reasons why swift is best for i os app development
10 reasons why swift is best for i os app development10 reasons why swift is best for i os app development
10 reasons why swift is best for i os app developmentMoon Technolabs Pvt. Ltd.
 
Advanced Speech Delivery - Lesson 4 (t)
Advanced Speech Delivery - Lesson 4 (t)Advanced Speech Delivery - Lesson 4 (t)
Advanced Speech Delivery - Lesson 4 (t)SkimaTalk
 
Appcelerator Titanium App Development
Appcelerator Titanium App DevelopmentAppcelerator Titanium App Development
Appcelerator Titanium App DevelopmentAnubavam
 
Storyboard i phone scholz_week_8_
Storyboard i phone scholz_week_8_Storyboard i phone scholz_week_8_
Storyboard i phone scholz_week_8_clscholz
 
PhoneGap: a brief history and apologia
PhoneGap: a brief history and apologiaPhoneGap: a brief history and apologia
PhoneGap: a brief history and apologialorinbeer
 
Why Python is the Best Coding Language For PWA Development_.ppt
Why Python is the Best Coding Language For PWA Development_.pptWhy Python is the Best Coding Language For PWA Development_.ppt
Why Python is the Best Coding Language For PWA Development_.pptTechinventive Software
 
Video Sharing Platform in eLearning
Video Sharing Platform in eLearningVideo Sharing Platform in eLearning
Video Sharing Platform in eLearningCITE
 
637b4894085c4_ppt.pptx
637b4894085c4_ppt.pptx637b4894085c4_ppt.pptx
637b4894085c4_ppt.pptxArjun123Bagri
 
Designing Software With the User in Mind - Symbio
Designing Software With the User in Mind - SymbioDesigning Software With the User in Mind - Symbio
Designing Software With the User in Mind - SymbioEmily Chong
 
Da DevOps a DevSecOps: Servizi applicativi di sicurezza automatizzati con F5 ...
Da DevOps a DevSecOps: Servizi applicativi di sicurezza automatizzati con F5 ...Da DevOps a DevSecOps: Servizi applicativi di sicurezza automatizzati con F5 ...
Da DevOps a DevSecOps: Servizi applicativi di sicurezza automatizzati con F5 ...Emerasoft, solutions to collaborate
 

Ähnlich wie iPhone development: A brief introduction (20)

Phonegap 1.0
Phonegap 1.0Phonegap 1.0
Phonegap 1.0
 
Mobile Prototyping
Mobile PrototypingMobile Prototyping
Mobile Prototyping
 
JHipster conf : craftsmanship & tdd
JHipster conf : craftsmanship & tddJHipster conf : craftsmanship & tdd
JHipster conf : craftsmanship & tdd
 
Modern mobile development overview
Modern mobile development overviewModern mobile development overview
Modern mobile development overview
 
Developer's got talent iPhone
Developer's got talent iPhoneDeveloper's got talent iPhone
Developer's got talent iPhone
 
上午3 linpus rita_idf beijing powerpoint2011.ppt
上午3 linpus rita_idf beijing powerpoint2011.ppt上午3 linpus rita_idf beijing powerpoint2011.ppt
上午3 linpus rita_idf beijing powerpoint2011.ppt
 
Features of Python.pdf
Features of Python.pdfFeatures of Python.pdf
Features of Python.pdf
 
The future is hybrid
The future is hybridThe future is hybrid
The future is hybrid
 
10 reasons why swift is best for i os app development
10 reasons why swift is best for i os app development10 reasons why swift is best for i os app development
10 reasons why swift is best for i os app development
 
I Phone Session Mufix
I Phone Session MufixI Phone Session Mufix
I Phone Session Mufix
 
Advanced Speech Delivery - Lesson 4 (t)
Advanced Speech Delivery - Lesson 4 (t)Advanced Speech Delivery - Lesson 4 (t)
Advanced Speech Delivery - Lesson 4 (t)
 
Appcelerator Titanium App Development
Appcelerator Titanium App DevelopmentAppcelerator Titanium App Development
Appcelerator Titanium App Development
 
Storyboard i phone scholz_week_8_
Storyboard i phone scholz_week_8_Storyboard i phone scholz_week_8_
Storyboard i phone scholz_week_8_
 
PhoneGap: a brief history and apologia
PhoneGap: a brief history and apologiaPhoneGap: a brief history and apologia
PhoneGap: a brief history and apologia
 
Why Python is the Best Coding Language For PWA Development_.ppt
Why Python is the Best Coding Language For PWA Development_.pptWhy Python is the Best Coding Language For PWA Development_.ppt
Why Python is the Best Coding Language For PWA Development_.ppt
 
Video Sharing Platform in eLearning
Video Sharing Platform in eLearningVideo Sharing Platform in eLearning
Video Sharing Platform in eLearning
 
637b4894085c4_ppt.pptx
637b4894085c4_ppt.pptx637b4894085c4_ppt.pptx
637b4894085c4_ppt.pptx
 
Designing Software With the User in Mind - Symbio
Designing Software With the User in Mind - SymbioDesigning Software With the User in Mind - Symbio
Designing Software With the User in Mind - Symbio
 
Old School Race
Old School RaceOld School Race
Old School Race
 
Da DevOps a DevSecOps: Servizi applicativi di sicurezza automatizzati con F5 ...
Da DevOps a DevSecOps: Servizi applicativi di sicurezza automatizzati con F5 ...Da DevOps a DevSecOps: Servizi applicativi di sicurezza automatizzati con F5 ...
Da DevOps a DevSecOps: Servizi applicativi di sicurezza automatizzati con F5 ...
 

Mehr von Pete Goodliffe

Becoming a Better Programmer
Becoming a Better ProgrammerBecoming a Better Programmer
Becoming a Better ProgrammerPete Goodliffe
 
Running Effective Worship Rehearsals
Running Effective Worship RehearsalsRunning Effective Worship Rehearsals
Running Effective Worship RehearsalsPete Goodliffe
 
Becoming a Better Programmer (2013)
Becoming a Better Programmer (2013)Becoming a Better Programmer (2013)
Becoming a Better Programmer (2013)Pete Goodliffe
 
Version Control Done Right
Version Control Done RightVersion Control Done Right
Version Control Done RightPete Goodliffe
 
C++: The Cathedral and the Bizarre
C++: The Cathedral and the BizarreC++: The Cathedral and the Bizarre
C++: The Cathedral and the BizarrePete Goodliffe
 
Three Objectionable Things
Three Objectionable ThingsThree Objectionable Things
Three Objectionable ThingsPete Goodliffe
 
Coping with Complexity
Coping with ComplexityCoping with Complexity
Coping with ComplexityPete Goodliffe
 
Stood at the bottom of a mountain looking up
Stood at the bottom of a mountain looking upStood at the bottom of a mountain looking up
Stood at the bottom of a mountain looking upPete Goodliffe
 
Legacy Code: Learning To Live With It
Legacy Code: Learning To Live With ItLegacy Code: Learning To Live With It
Legacy Code: Learning To Live With ItPete Goodliffe
 

Mehr von Pete Goodliffe (14)

Becoming a Better Programmer
Becoming a Better ProgrammerBecoming a Better Programmer
Becoming a Better Programmer
 
Words in Code
Words in CodeWords in Code
Words in Code
 
Running Effective Worship Rehearsals
Running Effective Worship RehearsalsRunning Effective Worship Rehearsals
Running Effective Worship Rehearsals
 
Becoming a Better Programmer (2013)
Becoming a Better Programmer (2013)Becoming a Better Programmer (2013)
Becoming a Better Programmer (2013)
 
Design Sins
Design SinsDesign Sins
Design Sins
 
Advanced iOS
Advanced iOSAdvanced iOS
Advanced iOS
 
Version Control Done Right
Version Control Done RightVersion Control Done Right
Version Control Done Right
 
Getting Into Git
Getting Into GitGetting Into Git
Getting Into Git
 
C++: The Cathedral and the Bizarre
C++: The Cathedral and the BizarreC++: The Cathedral and the Bizarre
C++: The Cathedral and the Bizarre
 
Three Objectionable Things
Three Objectionable ThingsThree Objectionable Things
Three Objectionable Things
 
Coping with Complexity
Coping with ComplexityCoping with Complexity
Coping with Complexity
 
Manyfestos
ManyfestosManyfestos
Manyfestos
 
Stood at the bottom of a mountain looking up
Stood at the bottom of a mountain looking upStood at the bottom of a mountain looking up
Stood at the bottom of a mountain looking up
 
Legacy Code: Learning To Live With It
Legacy Code: Learning To Live With ItLegacy Code: Learning To Live With It
Legacy Code: Learning To Live With It
 

Kürzlich hochgeladen

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
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
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
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
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
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
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
 
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
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
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
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 

Kürzlich hochgeladen (20)

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
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
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
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
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?
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
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
 
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
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
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
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 

iPhone development: A brief introduction

  • 1. ACCU 2010 iPhone development a brief introduction pete goodliffe Hello, iPhone world! Development a brief introduction Pete Goodliffe pete@goodliffe.net
  • 2. iPhone development a brief introduction pete goodliffe Pete Goodliffe A programmer, a columnist, an author, a teacher. Someone who cares about code. www.goodliffe.net goodliffe.blogspot.com @petegoodliffe
  • 3. iPhone development a brief introduction pete goodliffe Pete Goodliffe A programmer, a columnist, an author, a teacher. Someone who cares about code. www.goodliffe.net goodliffe.blogspot.com @petegoodliffe
  • 4. iPhone development a brief introduction pete goodliffe talk synopsis An introduction to iPhone development An introduction to iPhone development for beginners or those who are casually interested and want a leg up the learning curve. This talk is an overview of how to get started as an iPhone developer, and an introduction to the core technologies, including: ‣ Common iPhone/Mac OS design patterns, idioms, and practices ‣ Becoming a native: how to "think in iPhone" ‣ Overview of the libraries and facilities that exist ‣ Limitations of the development environment
  • 5. iPhone development a brief introduction pete goodliffe 90 minutes? is that all?!!!
  • 6. iPhone development a brief introduction pete goodliffe in 90 minutes... Demo Intro ‣ Intro ‣ The tools Tips ‣ The language Tools ‣ The UI ‣ Key technologies ‣ Deploying Further info ‣ Further info Language ‣ Tips and tricks Deploying ‣ The demo UI Technologies m… pie Mm
  • 7. iPhone development a brief introduction pete goodliffe in 90 minutes... Demo Intro ‣ Intro Introduction ‣ The tools Tips ‣ The language Tools ‣ The UI ‣ Key technologies ‣ Deploying Further info ‣ Further info Language ‣ Tips and tricks Deploying ‣ The demo UI Technologies
  • 8. iPhone development a brief introduction pete goodliffe who are you?
  • 9. iPhone development a brief introduction pete goodliffe why develop for the iPhone?
  • 10. iPhone development a brief introduction pete goodliffe the alternatives
  • 11. iPhone development a brief introduction pete goodliffe in 90 minutes... Demo Intro ‣ Intro ‣ The tools Tips ‣ The language Tools ‣ The UI ‣ Key technologies ‣ Deploying Further info ‣ Further info Language ‣ Tips and tricks Deploying ‣ The demo UI Technologies
  • 12. iPhone development a brief introduction pete goodliffe in 90 minutes... Demo Intro ‣ Intro ‣ The tools Tips ‣ The language Tools ‣ The UI ‣ Key technologies ‣ Deploying Further info ‣ Further info Language ‣ Tips and tricks Deploying ‣ The demo UI Technologies
  • 13. iPhone development a brief introduction pete goodliffe in 90 minutes... Demo Intro ‣ Intro The tools ‣ The tools Tips Tools ‣ The language ‣ The UI ‣ Key technologies ‣ Deploying Further info ‣ Further info Language ‣ Tips and tricks Deploying ‣ The demo UI Technologies
  • 14. iPhone development a brief introduction pete goodliffe ❖ The cast ❖ Xcode iPhone/iPod Touch/iPad Interface builder iPhone simulator Instruments/Shark Other tools
  • 15. iPhone development a brief introduction pete goodliffe Xcode
  • 16. iPhone development a brief introduction pete goodliffe
  • 17. iPhone development a brief introduction pete goodliffe
  • 18. iPhone development a brief introduction pete goodliffe an iPhone
  • 19. iPhone development a brief introduction pete goodliffe Interface Builder
  • 20. iPhone development a brief introduction pete goodliffe iPhone simulator
  • 21. iPhone development a brief introduction pete goodliffe Instruments/Shark
  • 22. iPhone development a brief introduction pete goodliffe Other tools
  • 23. iPhone development a brief introduction pete goodliffe Getting set up... Get a Mac Get the tools Install Get an ADC account $$$ Code … Profit
  • 24. iPhone development a brief introduction pete goodliffe in 90 minutes... Demo Intro ‣ Intro ‣ The tools Tips Tools ‣ The language ‣ The UI ‣ Key technologies ‣ Deploying Further info ‣ Further info Language ‣ Tips and tricks Deploying ‣ The demo UI Technologies
  • 25. iPhone development a brief introduction pete goodliffe in 90 minutes... Demo Intro ‣ Intro ‣ The tools Tips ‣ The language Tools ‣ The UI ‣ Key technologies ‣ Deploying Further info ‣ Further info Language ‣ Tips and tricks Deploying ‣ The demo UI Technologies
  • 26. iPhone development a brief introduction pete goodliffe in 90 minutes... Demo Intro ‣ Intro The language ‣ The tools Tips ‣ The language Tools ‣ The UI ‣ Key technologies ‣ Deploying Further info ‣ Further info Language ‣ Tips and tricks Deploying ‣ The demo UI Technologies
  • 27. iPhone development a brief introduction pete goodliffe (well, languages) C C++ Objective-C
  • 28. iPhone development a brief introduction pete goodliffe
  • 29. iPhone development a brief introduction pete goodliffe a history of objective-c in 14 lines and 12 words (give or take)
  • 30. iPhone development a brief introduction pete goodliffe algol CPL Simula BCPL Smalltalk B C Objective-C C++ Java C# D
  • 31. iPhone development a brief introduction pete goodliffe objective C is... dynamic based on message passing follows C compilation model full of [ ] and @s ot too n - (id) thisIsAMethod:(int)param1 ry! signatute:(float)param2 sca { for (int n (brace n < 10; ++n) = 0; yourself) { NSLog(@”N=%d”, n); [object callMethod:1 thing:2]; } }
  • 32. iPhone development a brief introduction pete goodliffe .m file @implementation MyClass - (id) thisIsAMethod:(int)param1 signatute:(float)param2 { for (int n = 0; n < 10; ++n) { NSLog(@”N=%d”, n); [object callMethod:1 thing:2]; } } @end
  • 33. iPhone development a brief introduction pete goodliffe @implementation MyClass - (id) thisIsAMethod:(int)param1 @class signatute:(float)param2 { @interface @implementation for (int n = 0; n < 10; ++n) { @end NSLog(@”N=%d”, n); @property [object callMethod:1 thing:2]; @private } } @protected @end
  • 34. iPhone development a brief introduction pete goodliffe @implementation MyClass - (id) thisIsAMethod:(int)param1 signatute:(float)param2 { for (int n = 0; n < 10; ++n) { NSLog(@”N=%d”, n); [object callMethod:1 thing:2]; } } @end
  • 35. iPhone development a brief introduction pete goodliffe @implementation MyClass - (id) thisIsAMethod:(int)param1 signatute:(float)param2 { for (int n = 0; n < 10; ++n) { NSLog(@”N=%d”, n); [object callMethod:1 thing:2]; } } @end
  • 36. iPhone development a brief introduction pete goodliffe @implementation MyClass - (id) thisIsAMethod:(int)param1 signatute:(float)param2 { for (int n = 0; n < 10; ++n) { NSLog(@”N=%d”, n); [object callMethod:1 thing:2]; } } @end
  • 37. iPhone development a brief introduction pete goodliffe @implementation MyClass - (id) thisIsAMethod:(int)param1 signatute:(float)param2 C an { stil l C fr write for (int n = 0; n < 10; ++n)ee func (and c tion all) { s NSLog(@”N=%d”, n); [object callMethod:1 thing:2]; } } @end
  • 38. iPhone development a brief introduction pete goodliffe @implementation MyClass - (id) thisIsAMethod:(int)param1 signatute:(float)param2 { for (int n = 0; n < 10; ++n) { NSLog(@”N=%d”, n); NSS [object callMethod:1 thing:2]; tri } ng } @end
  • 39. iPhone development a brief introduction pete goodliffe @implementation MyClass - (id) thisIsAMethod:(int)param1 signatute:(float)param2 { for (int n = 0; n < 10; ++n) { NSLog(@”N=%d”, n); [object callMethod:1 thing:2]; } } @end
  • 40. iPhone development a brief introduction pete goodliffe @implementation MyClass - (id) thisIsAMethod:(int)param1 signatute:(float)param2 { for (int n = 0; n < 10; ++n) { NSLog(@”N=%d”, n); [object callMethod:1 thing:2]; } Can } call nil @end
  • 41. iPhone development a brief introduction pete goodliffe Sending messages [object method]; int i = [object method]; [[object method1] method2]; [object method:10]; [object1 method:[object 2:method]];
  • 42. iPhone development a brief introduction pete goodliffe Method names parameters object [circle setCenterAtX:(float)x y:(float)y]; method name method name is: setCenterAtX:y: SEL s = @selector(setCenterAtX:y:); [circle performSelector:s];
  • 43. iPhone development a brief introduction pete goodliffe parameter types: int, float, unsigned, etc syntax: (return type) id
  • 44. iPhone development a brief introduction pete goodliffe .h file @class ForwardDeclaration; @interface MyClass : NSObject { ForwardDeclaration *member; bool otherMember; } - (void) init; - (id) initWithItems:(NSArray*)array enabled:(bool)enabled; + (id) myClassWithItems:(NSArray*)array; @end
  • 45. iPhone development a brief introduction pete goodliffe @class ForwardDeclaration; @interface MyClass : NSObject { ForwardDeclaration *member; bool otherMember; } - (void) init; - (id) initWithItems:(NSArray*)array enabled:(bool)enabled; + (id) myClassWithItems:(NSArray*)array; @end
  • 46. iPhone development a brief introduction pete goodliffe @class ForwardDeclaration; @interface MyClass : NSObject { ForwardDeclaration *member; bool otherMember; } - (void) init; - (id) initWithItems:(NSArray*)array enabled:(bool)enabled; + (id) myClassWithItems:(NSArray*)array; @end
  • 47. iPhone development a brief introduction pete goodliffe @class ForwardDeclaration; @interface MyClass : NSObject { ForwardDeclaration *member; bool otherMember; } - (void) init; - (id) initWithItems:(NSArray*)array enabled:(bool)enabled; + (id) myClassWithItems:(NSArray*)array; @end
  • 48. iPhone development a brief introduction pete goodliffe @class ForwardDeclaration; @interface MyClass : NSObject { ForwardDeclaration *member; bool otherMember; } - (void) init; - (id) initWithItems:(NSArray*)array enabled:(bool)enabled; + (id) myClassWithItems:(NSArray*)array; @end
  • 49. iPhone development a brief introduction pete goodliffe @class ForwardDeclaration; @interface MyClass : NSObject { ForwardDeclaration *member; bool otherMember; } - (void) init; - (id) initWithItems:(NSArray*)array enabled:(bool)enabled; + (id) myClassWithItems:(NSArray*)array; @end
  • 50. iPhone development a brief introduction pete goodliffe @class ForwardDeclaration; @interface MyClass : NSObject { ForwardDeclaration *member; bool otherMember; } - (void) init; - (id) initWithItems:(NSArray*)array enabled:(bool)enabled; + (id) myClassWithItems:(NSArray*)array; @end
  • 51. iPhone development a brief introduction pete goodliffe @class ForwardDeclaration; @interface MyClass : NSObject { ForwardDeclaration *member; bool otherMember; } - (void) init; - (id) initWithItems:(NSArray*)array enabled:(bool)enabled; + (id) myClassWithItems:(NSArray*)array; @end
  • 52. iPhone development a brief introduction pete goodliffe Objective C++ In .mm files Classes can contain C++ objects May use in functions You can use RAII C++ libraries
  • 53. iPhone development a brief introduction pete goodliffe Properties @interface MyClass { int harold; } @property (nonatomic,assign) int harold; @end In MyClass.m... @interface MyClass @synthesize harold; @end This will become important when we look at creating UIs
  • 54. iPhone development a brief introduction pete goodliffe The tao of objects You don’t call methods You pass messages to objects [theObject sendMessage:parameter];
  • 55. iPhone development a brief introduction pete goodliffe Java, C++, C# object.myMethod(1066); MyClass myMethod(int) MyClass *this another() more() class MyClass { private data public myMethod(int i) { // ... } };
  • 56. iPhone development a brief introduction pete goodliffe Objective-C [object myMethod:1066]; MyClass message (selector) MyClass *self myMethod(int) another() @implementation MyClass - (void) myMethod:(int)i private data { // ... } @end
  • 57. iPhone development a brief introduction pete goodliffe Categories @interface NSObject (Foo) - (void) extraFooMethod; @end NSArray *array = [NSArray array]; [array extraFooMethod];
  • 58. iPhone development a brief introduction pete goodliffe Object lifetime All objects are reference counted (the retain count) NSArray *array1 = [[NSArray alloc] init]; NSArray *array2 = [NSArray array]; [array1 release]; [array2 release]; // wrong Circle *circle = [[Circle alloc] initAtCenterX:100 y:100 radius:200];
  • 59. iPhone development a brief introduction pete goodliffe Retain Action count [[object alloc] init]; 1 [object retain]; 2 [object release]; 1 [object release]; 0 [object dealloc];
  • 60. iPhone development a brief introduction pete goodliffe The usual suspects NSObject NSString NSArray NSMutableArray NSNumber NSThread NSDictionary NSMutableDictionary NSApplication NSData NSMutableData NSURL NSSet NSMutableSet NSValue
  • 61. iPhone development a brief introduction pete goodliffe Statically typed my arse #import
  • 62. iPhone development a brief introduction pete goodliffe Idioms Delegates Key-value coding Protocol (interfaces) formal and informal
  • 63. iPhone development a brief introduction pete goodliffe The libraries Objective C Cocoa Touch UIKit, etc Core Audio, Open GL ES, Media Quartz, Core Animation Core Services Core OS Posix,SQLite, Core Foundation, BSD C
  • 64. iPhone development a brief introduction pete goodliffe in 90 minutes... Demo Intro ‣ Intro ‣ The tools Tips ‣ The language Tools ‣ The UI ‣ Key technologies ‣ Deploying Further info ‣ Further info Language ‣ Tips and tricks Deploying ‣ The demo UI Technologies
  • 65. iPhone development a brief introduction pete goodliffe in 90 minutes... Demo Intro ‣ Intro ‣ The tools Tips ‣ The language Tools ‣ The UI ‣ Key technologies ‣ Deploying Further info ‣ Further info Language ‣ Tips and tricks Deploying ‣ The demo UI Technologies
  • 66. iPhone development a brief introduction pete goodliffe in 90 minutes... Demo Intro ‣ Intro The UI ‣ The tools Tips ‣ The language Tools ‣ The UI ‣ Key technologies ‣ Deploying Further info ‣ Further info Language ‣ Tips and tricks Deploying ‣ The demo Technologies UI
  • 67. iPhone development a brief introduction pete goodliffe Interface Builder
  • 68. iPhone development a brief introduction pete goodliffe Held in .xib files (Compiled NIBs) Loaded into application (semi-automatically) IB is tightly integrated with Xcode UIKit framework
  • 69. iPhone development a brief introduction pete goodliffe
  • 70. iPhone development a brief introduction pete goodliffe Create UI elements Link to an object reference in the XIB through properties marked as IBOutlet Link actions to methods defined IBAction
  • 71. iPhone development a brief introduction pete goodliffe // // ExampleAppDelegate.h // Example // // Created by Pete Goodliffe on 03/04/2010. // Copyright __MyCompanyName__ 2010. All rights reserved. // #import <UIKit/UIKit.h> @interface ExampleAppDelegate : NSObject <UIApplicationDelegate> { UIWindow *window; UINavigationController *navigationController; } @property (nonatomic, retain) IBOutlet UIWindow *window; @property (nonatomic, retain) IBOutlet UINavigationController *navigationController; @end
  • 72. iPhone development a brief introduction pete goodliffe in 90 minutes... Demo Intro ‣ Intro ‣ The tools Tips ‣ The language Tools ‣ The UI ‣ Key technologies ‣ Deploying Further info ‣ Further info Language ‣ Tips and tricks Deploying ‣ The demo Technologies UI
  • 73. iPhone development a brief introduction pete goodliffe in 90 minutes... Demo Intro ‣ Intro ‣ The tools Tips ‣ The language Tools ‣ The UI ‣ Key technologies ‣ Deploying Further info ‣ Further info Language ‣ Tips and tricks Deploying ‣ The demo UI Technologies
  • 74. iPhone development a brief introduction pete goodliffe ‣ Intro Key in 90 minutes... ‣ The tools ‣ The language ‣ The UI Tips Demo Intro Tools technologies ‣ Key technologies ‣ Deploying Further info ‣ Further info Language ‣ Tips and tricks Deploying ‣ The demo UI Technologies
  • 75. iPhone development a brief introduction pete goodliffe UIKit Core Graphics Core Audio Media Core / AVFoundation MapKit / Core Location CoreData (or sqlite) OpenGL ES External Accessory
  • 76. iPhone development a brief introduction pete goodliffe in 90 minutes... Demo Intro ‣ Intro ‣ The tools Tips ‣ The language Tools ‣ The UI ‣ Key technologies ‣ Deploying Further info ‣ Further info Language ‣ Tips and tricks Deploying ‣ The demo UI Technologies
  • 77. iPhone development a brief introduction pete goodliffe in 90 minutes... Demo Intro ‣ Intro ‣ The tools Tips ‣ The language Tools ‣ The UI ‣ Key technologies ‣ Deploying Further info ‣ Further info Language ‣ Tips and tricks Deploying ‣ The demo UI Technologies
  • 78. iPhone development a brief introduction pete goodliffe in 90 minutes... Demo Intro ‣ Intro Deploying ‣ The tools Tips ‣ The language Tools ‣ The UI ‣ Key technologies ‣ Deploying Further info ‣ Further info Language ‣ Tips and tricks ‣ The demo Deploying UI Technologies
  • 79. iPhone development a brief introduction pete goodliffe Deploying iPhone simulator iPhone developer account ($$$) free “DRM hell” x86 Deployment certificates runs at desktop speed different build targets 100 devices per year more memory network stable App store iTunes connect Another build type
  • 80. iPhone development a brief introduction pete goodliffe App store submit get rejected fix it resubmit profit
  • 81. iPhone development a brief introduction pete goodliffe in 90 minutes... Demo Intro ‣ Intro ‣ The tools Tips ‣ The language Tools ‣ The UI ‣ Key technologies ‣ Deploying Further info ‣ Further info Language ‣ Tips and tricks ‣ The demo Deploying UI Technologies
  • 82. iPhone development a brief introduction pete goodliffe in 90 minutes... Demo Intro ‣ Intro ‣ The tools Tips ‣ The language Tools ‣ The UI ‣ Key technologies ‣ Deploying Further info ‣ Further info Language ‣ Tips and tricks Deploying ‣ The demo UI Technologies
  • 83. iPhone development a brief introduction pete goodliffe in 90 minutes... Demo Intro ‣ Intro Further info ‣ The tools Tips ‣ The language Tools ‣ The UI ‣ Key technologies ‣ Deploying Further info ‣ Further info Language ‣ Tips and tricks Deploying ‣ The demo UI Technologies
  • 84. iPhone development a brief introduction pete goodliffe Xcode documentation developer.apple.com/iphone Books Websites Stack Overflow, CocoaDev, ADC Videos on iTunes U http://itunes.stanford.edu/
  • 85. iPhone development a brief introduction pete goodliffe in 90 minutes... Demo Intro ‣ Intro ‣ The tools Tips ‣ The language Tools ‣ The UI ‣ Key technologies ‣ Deploying Further info ‣ Further info Language ‣ Tips and tricks Deploying ‣ The demo UI Technologies
  • 86. iPhone development a brief introduction pete goodliffe in 90 minutes... Demo Intro ‣ Intro ‣ The tools Tips ‣ The language Tools ‣ The UI ‣ Key technologies ‣ Deploying Further info ‣ Further info Language ‣ Tips and tricks Deploying ‣ The demo UI Technologies
  • 87. iPhone development a brief introduction pete goodliffe in 90 minutes... ‣ Intro ‣ The tools ‣ The language ‣ The UI Tips Tips Demo Intro Tools and tricks ‣ Key technologies ‣ Deploying Further info ‣ Further info Language ‣ Tips and tricks Deploying ‣ The demo UI Technologies
  • 88. iPhone development a brief introduction pete goodliffe Thinking iPhone
  • 89. iPhone development a brief introduction pete goodliffe Get the UI right HIG resource conservation (alpha blending, prerendering)
  • 90. iPhone development a brief introduction pete goodliffe The network is not always available
  • 91. iPhone development a brief introduction pete goodliffe Do not write to disk (often)
  • 92. iPhone development a brief introduction pete goodliffe Conserve resources RAM CPU filesystem
  • 93. iPhone development a brief introduction pete goodliffe in 90 minutes... Demo Intro ‣ Intro ‣ The tools Tips ‣ The language Tools ‣ The UI ‣ Key technologies ‣ Deploying Further info ‣ Further info Language ‣ Tips and tricks Deploying ‣ The demo UI Technologies
  • 94. iPhone development a brief introduction pete goodliffe in 90 minutes... Demo Intro ‣ Intro ‣ The tools Tips ‣ The language Tools ‣ The UI ‣ Key technologies ‣ Deploying Further info ‣ Further info Language ‣ Tips and tricks Deploying ‣ The demo UI Technologies
  • 95. iPhone development a brief introduction pete goodliffe in 90 minutes... Demo Intro ‣ Intro The demo ‣ The tools Tips ‣ The language Tools ‣ The UI ‣ Key technologies ‣ Deploying Further info ‣ Further info Language ‣ Tips and tricks Deploying ‣ The demo UI Technologies
  • 96. iPhone development a brief introduction pete goodliffe (wish me luck) wasn’t that marvellous?!
  • 97. iPhone development a brief introduction pete goodliffe Pete Goodliffe pete@goodliffe.net