SlideShare une entreprise Scribd logo
1  sur  81
Programming with iPhone SDK




                                                                         Javier González Sánchez
                                                                  Maria Elena Chávez Echeagaray


Copyright is held by the author/owner(s).
OOPSLA 2009, October 25–29, 2009, Orlando, Florida, USA.
Expectatives
Introduction
           1.
What is iPhone ?

Limited screen size. You have a 480 x 320
pixels screen.

Light mobile. Height: 4.5 inches, Width: 2.4
inches, Depth 0.48 inches, Weight: 4.8
ounces.

One application at a time. It only can
handle one application running at a time.

Only one window. iPhone applications only
can have one window at a time.

Five seconds limit. When the user hits the
home button, your application will have 5
seconds to save data, close and give up its
control. If it takes more than that, it will be
terminated.
                                                                     4
What is iPhone ?

CPU. 412 | 600 MHz
Memory administration. It has 128 | 256
MB of physical RAM and 8 | 32 GB of
storage.
File Management. It provides each
application with a sandbox (2GB), where the
application can read/write files, store
documents, preferences and data.
Different physical interface. iPhone do not
have a physical keyboard and a mouse.
Instead of that we have multitouch.
Other features. iPhone includes Core
Location, 3 megapixels built-in camera and
photo library, a built-in accelerometer,
proximity sensor, and ambient light sensor.
And a Phone with WiFi
Memory management without a “garbage
collector”.                                                      5
iPhone SDK
         2.
Developer Connection




                   7
How does this works?


  There is a free SDK that allow you to create your applications, and test them
  in a Simulator.

  Ok!, so what?, Is this a business?


  There is a Standard or the Enterprise version of the SDK. They cost $99 and
  $299 respectively.

  Now you can upload your application to your iPhone or distribute them in
  Apples’ iPhone App Store.

  They take care of the process, you then take care or your development.

                                                                                   8
Installation
iPhone SDK


                •  Sample code
Documentation   •  Reference libraries
                •  Coding how-to

                •  UIKit
                •  Foundation
 Frameworks     •  OpenGL / Quartz / Core Graphics
                •  Media


                •  Xcode,
    Tools       •  Interface Builder
                •  iPhone Simulator




                                                              10
Frameworks

                  Foundation
Cocoa Touch
                  UIKit
                  OpenGL ES, Quartz,
   Media
                  OpenAL, Core Audio,
                  Core Animation
                  Core Location,
Core Services
                  CFNetwork,
                  SQLite,
                  Security,

                  UNIX sockets
  Core OS
                  File system
                  Memory allocation     11
Tools

We are going to be working with:


    Xcode. Apple's Integrated Development Environment (IDE).

    Interface Builder (IB). environment to facilitate the development of your GUI's
    and to give functionality to its components.

    iPhone Simulator. It allows you to run your iPhone programs on your Mac.
    NOTE: the free SDK does not allow you to upload your applications to your
    iPhone (or iPod Touch) or distribute your software in Apples' iPhone App Store. In
    order to do this, you have to get the Standard ($99) or the Enterprise ($299)
    version of the SDK.

    Instruments. environment It lets you analyze the performance of your iPhone
    applications while running in the simulator or on a device.

                                                                                       12
Xcode




    13
Interface Builder
  Library
                                                   View

                       .xib file

                                                   View




               Instance of UIView, this is
               the area the users interact        Design area
GUI elements              with                                  14
Interface Builder

  Interface Builder is the tool you use to assemble your application’s user interface
  visually.
      You assemble your application’s window by dragging and dropping preconfigured
       components onto it.
      The components include standard system controls such as switches, text fields, and buttons,
       and also custom views to represent the views your application provides.
      After you’ve placed the components on the window’s surface, you can establish the
       relationships between those objects and your code. When your interface looks the way you
       want it, you save the contents to a nib file, which is a custom resource file format.




  The nib files you create in Interface Builder contain all the information that the UI Kit
  needs to recreate the same objects in your application at runtime. Loading a nib file
  creates runtime versions of all the objects stored in the file, configuring them exactly
  as they were in Interface Builder.



                                                                                                 15
Demo


  Hello World
Model(delegate) + Controller + View



                       View
                              Include
                              XIB files




            Model                         Controller

Delegates




                                                       17
Objective-C
          3.
Objective-C

  Is a simple computer language designed to enable sophisticated OO programming.


  Extends the standard ANSI C language by providing syntax for defining classes,
  methods, and properties, as well as other constructs that promote dynamic
  extension of classes.



  Based mostly on Smalltalk (class syntax and design), one of the first object-oriented
  programming languages.



  Includes the traditional object-oriented concepts, such as encapsulation,
  inheritance, and polymorphism.



                                                                                       19
Files


     Extension                           Source Type
.h               Header files. Header files contain class, type, function, and
                 constant declarations.

.m               Source files. This is the typical extension used for source
                 files and can contain both Objective-C and C code.

.mm              Source files. A source file with this extension can contain C+
                 + code in addition to Objective-C and C code.

                 This extension should be used only if you actually refer to C+
                 + classes or features from your Objective-C code.




                                                                                  20
#import

  To include header files in your source code, you can use the standard #include, but….
  Objective-C provides a better way #import. it makes sure that the same file is never
  included more than once.


 	
  #import	
  “MyAppDelegate.h”	
  
 	
  #import	
  “MyViewController.h”	
  

 	
  #import	
  <UIKit/UIKit.h>	
  




                                                                                           21
Class

  The specification of a class in Objective-C requires two distinct pieces: the
  interface (.h files) and the implementation (.m files).

  The interface portion contains the class declaration and defines the instance
  variables and methods associated with the class.
     @interface	
  
 	
  …	
  
 	
  @end	
  



  The implementation portion contains the actual code for the methods of the
  class.
 	
  @implementation	
  
 	
  …	
  
 	
  @end	
  



                                                                                   22
Class
                                             Class name

@interface	
  MyClass	
  :	
  NSObject	
                Parent class
{	
  
           	
  int	
  count;	
  
           	
  id	
  data;	
                                        Instance variables
           	
  NSString*	
  name;	
  
}	
  

-­‐	
  (id)initWithString:(NSString	
  *)aName;	
  
                                                                                methods
+	
  (MyClass	
  *)createMyClassWithString:	
  (NSString	
  *)	
  aName;	
  

@end	
  




                                                                                         23
Class
                                                                    Class name

@implementation	
  MyClass	
  

-­‐	
  (id)initWithString:(NSString	
  *)	
  aName	
  
{	
  
	
  	
  	
  	
  if	
  (self	
  =	
  [super	
  init])	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  count	
  =	
  0;	
  
	
  	
  	
  	
  	
  	
  	
  	
  data	
  =	
  nil;	
                                         methods
	
  	
  	
  	
  	
  	
  	
  	
  name	
  =	
  [aName	
  copy];	
  
	
  	
  	
  	
  	
  	
  	
  	
  return	
  self;	
  
	
  	
  	
  	
  }	
  
}	
  

+	
  (MyClass	
  *)createMyClassWithString:	
  (NSString	
  *)	
  aName	
  
{	
  
	
  	
  	
  	
  return	
  [[[self	
  alloc]	
  initWithString:aName]	
  autorelease];	
  
}	
  

@end	
  


                                                                                                 24
Methods

  A class in Objective-C can declare two types of methods:
  Instance method is a method whose execution is scoped to a particular instance of the
  class. In other words, before you call an instance method, you must first create an
  instance of the class.

  Class methods, by comparison, do not require you to create an instance.



 Method type identifier               One or more signature keywords


 	
  -­‐(void)insertObject:(id)anObject	
  atIndex:(NSUInteger)index;	
  




           Return type                          Parameters with (type) and name
                                                                                           25
Methods

So	
  the	
  declaration	
  of	
  the	
  method	
  insertObject	
  would	
  be:	
  

-­‐(void)insertObject:(id)anObject	
  atIndex:(NSUInteger)index	
  



     Method type identifier, is (-) to instance methods, (+) to class methods.




And	
  the	
  line	
  to	
  call	
  the	
  method	
  would	
  be:	
  

[myArray	
  insertObject:anObj	
  atIndex:0];	
  



                                                                                            26
Properties

  They are simply a shorthand for defining methods (getters and setters) that
  access existing instance variables.



  Properties do not create new instance variables in your class declaration.


  Reduce the amount of redundant code you have to write. Because most
  accessor methods are implemented in similar ways



  You specify the behavior you want using the property declaration and then
  synthesize actual getter and setter methods based on that declaration at
  compile time.

                                                                                 27
Properties

In the interface we have:
{	
  
BOOL	
  flag;	
  
NSString*	
  myObject;	
  
UIView*	
  rootView;	
  
}	
  

@property	
  BOOL	
  flag;	
  
@property	
  (copy)	
  NSString*	
  myObject;	
  //	
  Copy	
  the	
  object	
  during	
  assignement	
  
@property	
  (readonly)	
  UIView*	
  rootView;	
  //	
  Create	
  only	
  a	
  getter	
  method.	
  
  	
         	
              	
          	
               	
  	
  

…	
  

And in the implementation side we have:
@syntetize	
  flag;	
  
@syntetize	
  myObject;	
  
@syntetize	
  rootView;	
  

…	
  
myObject.flag	
  =	
  YES;	
  
CGRect	
  	
  	
  viewFrame	
  =	
  myObject.rootView.frame;	
  



                                                                                                                     28
Properties

Writability

  Readwrite. You can read/write it. This is the default value.
  Readonly. You can only read it.

Setter semantics (mutually exclusive)

  Assign. Specifies that the setter uses simple assignment. This is the default value.
  Retain. Specifies that a pointer should be retained.
  Copy. Specifies that a copy of the object should be used for assignment.

Atomicity (multithreading)

  Nonatomic. Specifies that accessor methods are not atomic.
  The default value is atomic but there is no need to specify it.


                                                                                          29
Protocols and Delegates

  Protocols are not classes themselves. They simply define an interface that other objects
  are responsible for implementing


  A protocol declares methods that can be implemented by any class.


  In iPhone OS, protocols are used frequently to implement delegate objects. A delegate
  object is an object that acts on behalf of, or in coordination with, another object.


  The declaration of a protocol looks similar to that of a class interface, with the exceptions
  that protocols do not have a parent class and they do not define instance variables.


  In the case of many delegate protocols, adopting a protocol is simply a matter of
  implementing the methods defined by that protocol. There are some protocols that
  require you to state explicitly that you support the protocol, and protocols can specify
  both required and optional methods.
                                                                                               30
Example: Fraction

Fraction.h	
                                               Fraction.m	
  

#import	
  <Foundation/NSObject.h>	
  	
                   #import	
  "Fraction.h"	
  	
  
                                                           #import	
  <stdio.h>	
  	
  	
  
@interface	
  Fraction:	
  NSObject	
  {	
  	
  	
  	
  
	
  	
  	
  int	
  numerator;	
  	
  	
  	
  	
  	
  
                                                           @implementation	
  Fraction	
  
	
  	
  	
  int	
  denominator;	
  	
  
	
  }	
  	
  	
  
                                                           @synthesize	
  numerator;	
  
//Properties	
  instead	
  of	
  getters	
  and	
  	
      @synthesize	
  denominator;	
  
//setters	
  
@property	
  (nonatomic)	
  int	
  numerator;	
            //	
  Output	
  Print	
  
@property	
  (nonatomic)	
  int	
  denominator;	
          -­‐(void)	
  print	
  {	
  	
  	
  	
  	
  	
  
                                                           printf("%i/%i",	
  numerator,denominator);	
  	
  
                                                           }	
  	
  	
  
//Output	
  print	
                                        @end	
  	
  
-­‐(void)	
  print;	
  	
  

@end	
  	
  


                                                                                                                31
Example: Fraction

main.m


#import <stdio.h>
#import "Fraction.h"

int main( int argc, const char *argv[] ) {
    Fraction *frac = [[Fraction alloc] init];
    frac.numerator = 1;
    frac.denominator=3;

    printf( "The fraction is: " );
    [frac print];
    printf( "n" );

    [frac release]
    return 0;
}




                                                                32
Strings

  The NSString class provides an object wrapper.
  Supports storing arbitrary-length strings, support for Unicode, printf-style
  formatting utilities, and more.

  Shorthand notation for creating NSString objects from constant values.
  Precede a normal, double-quoted string with the @ symbol.


  NSString*	
  	
  myString	
  =	
  @”Hello	
  Worldn";	
  


  NSString*	
  	
  anotherString	
  =	
  	
  
   	
     	
  	
  	
  	
  	
  	
  [NSString	
  stringWithFormat:@"%d	
  %s",	
  1,	
  @"String”];	
  




                                                                                                         33
Exercise


  Fraction
Let us Code:
Outlet and Actions
                 4.
What about main method ?

int main(int argc, char *argv[]) {

    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

    int retVal = UIApplicationMain(argc, argv, nil, nil);

    [pool release];

    return retVal;

}




                                                                   36
Model(delegate)



                                         View
                                                Include
                                                XIB files




   Protocol
implementation
                               Model                        Controller

                   Delegates



             UIApplicationDelegate
             UIAccelerometerDelegate
             UILocationManagerDelegate



                                                                         37
UIApplicationDelegate

#import <UIKit/UIKit.h>

@class TutorialEvaluationViewController;



@interface TutorialEvaluationAppDelegate : NSObject <UIApplicationDelegate> {

    UIWindow *window;

    TutorialEvaluationViewController *viewController;

}



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

@property (nonatomic, retain) IBOutlet TutorialEvaluationViewController *viewController;

@end
                                                                                           38
UIApplicationDelegate

#import "TutorialEvaluationAppDelegate.h”
#import "TutorialEvaluationViewController.h”

@implementation TutorialEvaluationAppDelegate

@synthesize window;
@synthesize viewController;

-    (void)applicationDidFinishLaunching:(UIApplication *) application {
      // Override point for customization after app launch
      [window addSubview:viewController.view];
      [window makeKeyAndVisible];
}

-    (void) dealloc {
      [viewController release];
      [window release];
      [super dealloc];
}

@end
                                                                            39
View (go back to IB)



                                           View
                                                  Include
                                                  XIB files


                                                                   IBOutlet
                                                       IBAction


      Protocol
   implementation
                                   Model                          Controller

                       Delegates



UIApplicationDelegate
UIAccelerometerDelegate
UILocationManagerDelegate



                                                                               40
Controller



                                           View
                                                  Include
                                                  XIB files


                                                                   IBOutlet
                                                       IBAction


      Protocol
   implementation
                                   Model                          Controller

                       Delegates



UIApplicationDelegate
UIAccelerometerDelegate
UILocationManagerDelegate



                                                                               41
Actions and Outlets

  Outlet: is a pointer that points an
  object in the NIB file.




•  Action: objects in the nib can trigger
  special methods in our controller. These
  special methods are known as action
  methods.




                                                               42
FooViewController.h

#import <UIKit/UIKit.h>



@interface FooViewController : UIViewController {

    IBOutlet UILabel *label;

}

@property (retain, nonatomic) UILabel *label;

- (IBAction)buttonPressed:(id)sender;

@end



                                                                      43
FooViewController.m


#import ”FooViewController.h"

@implementation FooViewController

@synthesize label;

-(IBAction)buttonPressed:(did)sender{
     label.text = [sender titleForState:UIControlStateNormal];
}

-    (void)dealloc {
       [label release]
       [super dealloc];
}
@end



                                                                          44
Connecting

  We need to connect the elements in the interface with its functionality, i.e., we have
  to connect our View with the File's Owner.

  With this connection we are telling our controller that when our application starts it
  loads the TutorialEvaluationViewController.xib file into memory and get control of it.



                               UI




                                                                                            45
Exercise
Solution


IBOutlet UILabel *label;
IBOutlet	
  UIImageView	
  *logo;	
  

@property	
  (nonatomic,	
  retain)	
  UILabel	
  *label;	
  
@property	
  (nonatomic,	
  retain)	
  UIImageView	
  *logo;	
  


@synthesize	
  label;	
  
@synthesize	
  logo;	
  

-­‐(IBAction)pressButtonFlorida:(id)sender{	
  
	
  	
  label.text	
  =	
  @"Welcome	
  to	
  Florida";	
  
	
  	
  logo.image	
  =	
  [UIImage	
  imageNamed:@"MickeyMouse.gif"];	
  
}	
  

-­‐(IBAction)pressButtonArizona:(id)sender{	
  
	
  	
  label.text	
  =	
  @"Greetings	
  from	
  Arizona";logo.image	
  =	
  [UIImage	
  
        imageNamed:@"ASU_logo.png"];	
  
}	
  
Let us Code:
Touch Events
            5
Handling Touch Events

All UIViewController inherit from UIResponder, and is able to handle touch Event.
In order to do this we use these three methods.



-­‐	
  (void)touchesBegan:(NSSet	
  *)touches	
  withEvent:(UIEvent	
  *)event;	
  

-­‐	
  (void)touchesMoved:(NSSet	
  *)touches	
  withEvent:(UIEvent	
  *)event;	
  

-­‐	
  (void)touchesEnded:(NSSet	
  *)touches	
  withEvent:(UIEvent	
  *)event;	
  




                                                                                      49
Exercise
Solution
-­‐(void)touchesBegan:(NSSet	
  *)touches	
  withEvent:(UIEvent	
  *)event{	
  
	
  	
  	
  touchLabel.text	
  =	
  @"began";	
  
	
  	
  	
  NSUInteger	
  numTaps	
  =	
  [[touches	
  anyObject]	
  tapCount];	
  
	
  	
  	
  if	
  (numTaps	
  ==	
  1)	
  
	
  	
  	
  	
  	
  [self.view	
  setBackgroundColor:	
  [UIColor	
  redColor]];	
  
	
  	
  	
  else	
  if	
  (numTaps	
  ==	
  2)	
  
	
  	
  	
  	
  	
  [self.view	
  setBackgroundColor:	
  [UIColor	
  blueColor]];	
  
	
  	
  	
  else	
  if	
  (numTaps	
  ==	
  3)	
  
	
  	
  	
  	
  	
  [self.view	
  setBackgroundColor:	
  [UIColor	
  yellowColor]];	
  	
  
}	
  

-­‐(void)touchesMoved:(NSSet	
  *)touches	
  withEvent:(UIEvent	
  *)event{	
  
	
  	
  	
  CGPoint	
  point	
  =	
  [[touches	
  anyObject]	
  locationInView:self.view];	
  
	
  	
  	
  NSString	
  *touchesMessage	
  =	
  [[NSString	
  alloc]	
  initWithFormat:@"%f,	
  %f",	
  	
  	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  point.x,	
  point.y];	
  
	
  	
  	
  touchLabel.text	
  =	
  touchesMessage;	
  
	
  	
  	
  [touchesMessage	
  release];	
  
}	
  

-­‐(void)touchesEnded:(NSSet	
  *)touches	
  withEvent:(UIEvent	
  *)event{	
  
	
  	
  	
  touchLabel.text	
  =	
  @"ended";	
  
}	
  
Demo


  Fireworks
Let us code:
Autorotate and Accelerometer
                           6
AutoRotate

The UIViewController class provides the infrastructure needed to rotate your interface and
  adjust the position of views automatically in response to orientation changes.


-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation interfaceOrientation {
   return YES;
   //return (interfaceOrientation == UIInterfaceOrientationPortrait);
}


interfaceOrientation values:

  UIInterfaceOrientationPortrait
  UIInterfaceOrientationPortraitUpsideDown
  UIInterfaceOrientationLandscapeLeft
  UIInterfaceOrientationLandscapeRight

                                                                                             54
AutoRotate adjustments




                     55
Accelerometer


Measure of Gravity acceleration:

0g

1g

2.3g




                              56
Reading the Accelerometer

  UIAccelerometer object in UIKit allow you to access to the raw accelerometer
     data directly. This object reports the current accelerometer values.

  To get an instance of this class, call the sharedAccelerometer method of
     UIAccelerometer class.

    The updateInterval property define the reporting interval in seconds.


-­‐(void)viewDidLoad	
  {	
  
	
  	
  UIAccelerometer	
  *accelerometer	
  =	
  [UIAccelerometer	
  sharedAccelerometer];	
  
	
  	
  accelerometer.delegate	
  =	
  self;	
  
	
  	
  accelerometer.updateInterval	
  =	
  	
  1.0/60;	
  
	
  	
  [super	
  viewDidLoad];	
  
}	
  



                                                                                              57
Reading the Accelerometer

  A delegate (UIAccelerometerDelegate) will receive acceleration events.


@interface	
  FooViewController:	
  UIViewController	
  <UIAccelerometerDelegate>	
  



  Use   accelerometer:didAccelerate: method to process accelerometer data.


-­‐(void)accelerometer:(UIAccelerometer	
  *)accelerometer	
  didAccelerate:
                	
  (UIAcceleration	
  *)acceleration	
  {	
  	
  	
  	
  	
  
	
  	
  NSString	
  *s	
  =	
  [[NSString	
  alloc]	
  initWithFormat:@"%f,	
  %f,	
  %f",	
   	
     	
  
                	
  acceleration.x,	
  acceleration.y,	
  acceleration.z];	
  
    	
  accLabel.text	
  =	
  s;	
  
	
  	
  [s	
  release];	
  
}
                                                                                                        58
Exercise
Demo


 Rolling ball
Core Location
            7
Core Location


The Core Location framework monitors signals coming from cell phone towers
and Wi-Fi hotspots and uses them to triangulate the user's current position.




                                                                               62
Getting the User's Current Location

  Create an instance of CLLocationManager class.
It	
  is	
  necessary	
  to	
  include	
  the	
  CoreLocation.framework	
  

#import	
  <CoreLocation/CoreLocation.h>	
  

@interface	
  FooViewController:	
  UIViewController<CLLocationManagerDelegate>	
  	
  



  To begin receiving notifications, assign a delegate and call the
   startUpdatingLocation method.


-­‐(void)viewDidLoad	
  {	
  
	
  	
  CLLocationManager	
  *locationManager=	
  [[CLLocationManager	
  alloc]	
  init];	
  
	
  	
  [locationManager	
  startUpdatingLocation];locationManager.delegate	
  =	
  self;	
  
	
  	
  locationManager.distanceFilter	
  =	
  kCLDistanceFilterNone;	
  	
  	
  	
  
	
  	
  locationManager.desiredAccuracy	
  =	
  kCLLocationAccuracyBest;	
  
}	
  

                                                                                                63
Using the Core Location

  We need implement this:

-­‐  (void)locationManager:(CLLocationManager	
  *)manager	
  didUpdateToLocation:
  (CLLocation	
  *)newLocation	
  fromLocation:(CLLocation	
  *)oldLocation	
  {	
  

	
  	
  NSString	
  *latitudeString	
  =	
  [[NSString	
  alloc]	
  initWithFormat:@"%g°",	
  
             	
         	
       	
            	
  newLocation.coordinate.latitude];	
  

	
  	
  latitudeLabel.text	
  =	
  latitudeString;	
  
	
  	
  [latitudeString	
  release];	
  
    	
  NSString	
  *longitudeString	
  =	
  [[NSString	
  alloc]	
  initWithFormat:@"%g°",	
  	
  
    	
       	
         	
  newLocation.coordinate.longitude];	
  

	
  	
  longitudeLabel.text	
  =	
  longitudeString;	
  
	
  	
  [longitudeString	
  release];	
  
}	
  


                                                                                                      64
Exercise
Demo


  Where I am?
Quartz
     8
Coding a new view

#import	
  <UIKit/UIKit.h>	
  

@interface	
  myView	
  :	
  UIView	
  {	
  

	
  	
  	
  CGPoint	
  myPoint;	
  	
  	
  
	
  	
  	
  int	
  x;	
  
	
  	
  	
  int	
  y;	
  
}	
  

@property	
  CGPoint	
  myPoint;	
  
@property	
  int	
  x;	
  
@property	
  int	
  y;	
  

-­‐(void)draw;	
  

@end	
  


                                                               68
Coding a new view
@implementation	
  myView	
  

@synthesize	
  myPoint;	
  
@synthesize	
  x;	
  
@synthesize	
  y;	
  

-­‐(id)initWithCoder:(NSCoder	
  *)coder	
  {	
  

	
  	
  	
  if	
  (self	
  =	
  [super	
  initWithCoder:coder])	
  {	
  
	
  	
  	
  	
  	
  	
  x=self.bounds.size.width	
  /	
  2;	
  
	
  	
  	
  	
  	
  	
  y=self.bounds.size.height	
  /	
  2;	
  
	
  	
  	
  }	
  
	
  	
  	
  return	
  self;	
  
}	
  

-­‐(void)touchesBegan:(NSSet	
  *)touches	
  withEvent:(UIEvent	
  *)event{	
  
	
  	
  	
  UITouch	
  *t	
  =	
  [touches	
  anyObject];	
  
	
  	
  	
  CGPoint	
  point	
  =	
  [t	
  locationInView:t.view];	
  
	
  	
  	
  x	
  =	
  point.x;	
  
	
  	
  	
  y	
  =	
  point.y;	
  
	
  	
  	
  [self	
  setNeedsDisplay];	
  
}	
  
                                                                                           69
Coding a new view

-­‐	
  (void)draw{	
  

CGContextRef	
  context	
  =	
  UIGraphicsGetCurrentContext();	
  
CGContextSetFillColorWithColor(context,	
  [UIColor	
  colorWithRed:1.0f	
  
         	
         	
          	
  green:0.0f	
  blue:0.0f	
  alpha:1.0f].CGColor);	
  	
  	
  	
  	
  
CGRect	
  patito	
  =	
  CGRectMake	
  (x,y,10,10);CGContextAddEllipseInRect
      (context,	
  patito);	
  
CGContextDrawPath(context,	
  kCGPathFillStroke);	
  
}	
  


-­‐  (void)drawRect:(CGRect)rect	
  {	
  
 	
  [self	
  draw];	
  
}	
  




                                                                                                           70
Connecting the view




                  71
Exercise
openGL | ES
          9
openGL | ES




          74
Demo
Plist file
        3.3
plist file

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleDevelopmentRegion</key>
    <string>en</string>
    <key>CFBundleDisplayName</key>
    <string>${PRODUCT_NAME}</string>
    <key>CFBundleExecutable</key>
    <string>${EXECUTABLE_NAME}</string>
    <key>CFBundleIconFile</key>
    <string>Icon.png</string>
    <key>CFBundleIdentifier</key>
    <string>com.yourcompany.${PRODUCT_NAME:identifier}</string>




                                                                           77
plist file

    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>${PRODUCT_NAME}</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>1.0</string>
    <key>UIStatusBarHidden</key>
    <true/>
    <key>NSMainNibFile</key>
    <string>MainWindow</string>
</dict>
</plist>


                                                        78
Exercises and
  References
            6
iPhone Dev Center




http://developer.apple.com/iphone




                                           80
Instructors



          Javier González Sánchez
Tecnológico de Monterrey, campus Guadalajara
             javiergs@itesm.mx
                   .com/in/javiergs


       Maria Elena Chávez Echeagaray
Tecnológico de Monterrey, campus Guadalajara
            mechavez@itesm.mx
                 .com/in/mechavez




                                                     81

Contenu connexe

Tendances

C:\fakepath\buildingblock bbmanifest
C:\fakepath\buildingblock bbmanifestC:\fakepath\buildingblock bbmanifest
C:\fakepath\buildingblock bbmanifestdil12345
 
mobile technologies iOS
mobile technologies iOSmobile technologies iOS
mobile technologies iOSchrisiegers
 
仕様決定、部品化、ディレクションがなぜ重要か
仕様決定、部品化、ディレクションがなぜ重要か仕様決定、部品化、ディレクションがなぜ重要か
仕様決定、部品化、ディレクションがなぜ重要かKohei Otsuka
 
Cross Platform Game Development with GDAP, December 2012
Cross Platform Game Development with GDAP, December 2012Cross Platform Game Development with GDAP, December 2012
Cross Platform Game Development with GDAP, December 2012jobandesther
 
ioS Einstieg und Ausblick - Mobile DevCon Hamburg 2011 - OPITZ CONSULTING - S...
ioS Einstieg und Ausblick - Mobile DevCon Hamburg 2011 - OPITZ CONSULTING - S...ioS Einstieg und Ausblick - Mobile DevCon Hamburg 2011 - OPITZ CONSULTING - S...
ioS Einstieg und Ausblick - Mobile DevCon Hamburg 2011 - OPITZ CONSULTING - S...OPITZ CONSULTING Deutschland
 
Cider: Native Execution of iOS Apps on Android
Cider: Native Execution of iOS Apps on AndroidCider: Native Execution of iOS Apps on Android
Cider: Native Execution of iOS Apps on Androiddegarden
 

Tendances (10)

Ios part1
Ios part1Ios part1
Ios part1
 
C:\fakepath\buildingblock bbmanifest
C:\fakepath\buildingblock bbmanifestC:\fakepath\buildingblock bbmanifest
C:\fakepath\buildingblock bbmanifest
 
50120140507001 2
50120140507001 250120140507001 2
50120140507001 2
 
Android basics
Android basicsAndroid basics
Android basics
 
mobile technologies iOS
mobile technologies iOSmobile technologies iOS
mobile technologies iOS
 
仕様決定、部品化、ディレクションがなぜ重要か
仕様決定、部品化、ディレクションがなぜ重要か仕様決定、部品化、ディレクションがなぜ重要か
仕様決定、部品化、ディレクションがなぜ重要か
 
Cross Platform Game Development with GDAP, December 2012
Cross Platform Game Development with GDAP, December 2012Cross Platform Game Development with GDAP, December 2012
Cross Platform Game Development with GDAP, December 2012
 
ioS Einstieg und Ausblick - Mobile DevCon Hamburg 2011 - OPITZ CONSULTING - S...
ioS Einstieg und Ausblick - Mobile DevCon Hamburg 2011 - OPITZ CONSULTING - S...ioS Einstieg und Ausblick - Mobile DevCon Hamburg 2011 - OPITZ CONSULTING - S...
ioS Einstieg und Ausblick - Mobile DevCon Hamburg 2011 - OPITZ CONSULTING - S...
 
Cider: Native Execution of iOS Apps on Android
Cider: Native Execution of iOS Apps on AndroidCider: Native Execution of iOS Apps on Android
Cider: Native Execution of iOS Apps on Android
 
Mahmoud Mustafa Cv
Mahmoud Mustafa CvMahmoud Mustafa Cv
Mahmoud Mustafa Cv
 

En vedette

Oasis Training Barcelona 2014
Oasis Training Barcelona 2014Oasis Training Barcelona 2014
Oasis Training Barcelona 2014Val Rocha
 
Syst reninangiot pp cv aomi 02fev 2
Syst reninangiot pp cv   aomi 02fev 2Syst reninangiot pp cv   aomi 02fev 2
Syst reninangiot pp cv aomi 02fev 2sfa_angeiologie
 
RCMSL Phenomenal Aug 28, 2009
RCMSL Phenomenal Aug 28, 2009RCMSL Phenomenal Aug 28, 2009
RCMSL Phenomenal Aug 28, 2009etalcomendras
 
Phenomenal Oct 15, 2009
Phenomenal Oct 15, 2009Phenomenal Oct 15, 2009
Phenomenal Oct 15, 2009etalcomendras
 
링크의 경제학(요약)
링크의 경제학(요약)링크의 경제학(요약)
링크의 경제학(요약)guest29fabfa
 
Eurochap2010 final program
Eurochap2010 final programEurochap2010 final program
Eurochap2010 final programsfa_angeiologie
 
Micazxpl - Intelligent Sensors Network project report
Micazxpl - Intelligent Sensors Network project reportMicazxpl - Intelligent Sensors Network project report
Micazxpl - Intelligent Sensors Network project reportAnkit Singh
 
Developing distributed analysis pipelines with shared community resources usi...
Developing distributed analysis pipelines with shared community resources usi...Developing distributed analysis pipelines with shared community resources usi...
Developing distributed analysis pipelines with shared community resources usi...Brad Chapman
 
How new technologies affect the art of contesting
How new technologies affect the art of contestingHow new technologies affect the art of contesting
How new technologies affect the art of contestingTobias Wellnitz
 

En vedette (20)

Oasis Training Barcelona 2014
Oasis Training Barcelona 2014Oasis Training Barcelona 2014
Oasis Training Barcelona 2014
 
Syst reninangiot pp cv aomi 02fev 2
Syst reninangiot pp cv   aomi 02fev 2Syst reninangiot pp cv   aomi 02fev 2
Syst reninangiot pp cv aomi 02fev 2
 
RCMSL Phenomenal Aug 28, 2009
RCMSL Phenomenal Aug 28, 2009RCMSL Phenomenal Aug 28, 2009
RCMSL Phenomenal Aug 28, 2009
 
Phenomenal Oct 15, 2009
Phenomenal Oct 15, 2009Phenomenal Oct 15, 2009
Phenomenal Oct 15, 2009
 
링크의 경제학(요약)
링크의 경제학(요약)링크의 경제학(요약)
링크의 경제학(요약)
 
LiveOffice Email Archiving Makes Cents
LiveOffice Email Archiving Makes CentsLiveOffice Email Archiving Makes Cents
LiveOffice Email Archiving Makes Cents
 
Eurochap2010 final program
Eurochap2010 final programEurochap2010 final program
Eurochap2010 final program
 
201004 - brain computer interaction
201004 - brain computer interaction201004 - brain computer interaction
201004 - brain computer interaction
 
Micazxpl - Intelligent Sensors Network project report
Micazxpl - Intelligent Sensors Network project reportMicazxpl - Intelligent Sensors Network project report
Micazxpl - Intelligent Sensors Network project report
 
201506 CSE340 Lecture 11
201506 CSE340 Lecture 11201506 CSE340 Lecture 11
201506 CSE340 Lecture 11
 
201505 CSE340 Lecture 06
201505 CSE340 Lecture 06201505 CSE340 Lecture 06
201505 CSE340 Lecture 06
 
Developing distributed analysis pipelines with shared community resources usi...
Developing distributed analysis pipelines with shared community resources usi...Developing distributed analysis pipelines with shared community resources usi...
Developing distributed analysis pipelines with shared community resources usi...
 
Paul Pangaro
Paul PangaroPaul Pangaro
Paul Pangaro
 
How new technologies affect the art of contesting
How new technologies affect the art of contestingHow new technologies affect the art of contesting
How new technologies affect the art of contesting
 
fugitive emission ball valve
fugitive emission ball valvefugitive emission ball valve
fugitive emission ball valve
 
Tabado
TabadoTabado
Tabado
 
Valvuloplastie
ValvuloplastieValvuloplastie
Valvuloplastie
 
Windowsxp
WindowsxpWindowsxp
Windowsxp
 
Barya Perception
Barya PerceptionBarya Perception
Barya Perception
 
201506 CSE340 Lecture 20
201506 CSE340 Lecture 20 201506 CSE340 Lecture 20
201506 CSE340 Lecture 20
 

Similaire à Programming with iPhone SDK

Java Is A Programming Dialect And Registering Stage Essay
Java Is A Programming Dialect And Registering Stage EssayJava Is A Programming Dialect And Registering Stage Essay
Java Is A Programming Dialect And Registering Stage EssayLiz Sims
 
Layer architecture of ios (1)
Layer architecture of ios (1)Layer architecture of ios (1)
Layer architecture of ios (1)dwipalp
 
iOS Development - Offline Class for Jasakomer
iOS Development - Offline Class for JasakomeriOS Development - Offline Class for Jasakomer
iOS Development - Offline Class for JasakomerAndri Yadi
 
Cara Tepat Menjadi iOS Developer Expert - Gilang Ramadhan
Cara Tepat Menjadi iOS Developer Expert - Gilang RamadhanCara Tepat Menjadi iOS Developer Expert - Gilang Ramadhan
Cara Tepat Menjadi iOS Developer Expert - Gilang RamadhanDicodingEvent
 
Best iOS Application Development Tools.pdf
Best iOS Application Development Tools.pdfBest iOS Application Development Tools.pdf
Best iOS Application Development Tools.pdfFuGenx Technologies
 
Mobile application development
Mobile application developmentMobile application development
Mobile application developmentrohithn
 
iPhone application development training day 1
iPhone application development training day 1iPhone application development training day 1
iPhone application development training day 1Shyamala Prayaga
 
iOS App Development with Storyboard
iOS App Development with StoryboardiOS App Development with Storyboard
iOS App Development with StoryboardBabul Mirdha
 
outgoing again
outgoing againoutgoing again
outgoing againspredslide
 
iphone application development
iphone application developmentiphone application development
iphone application developmentarpitnot4u
 
Enterprise ipad Development with notes
Enterprise ipad Development with notesEnterprise ipad Development with notes
Enterprise ipad Development with notesjaxarcsig
 
Developing Applications on iOS
Developing Applications on iOSDeveloping Applications on iOS
Developing Applications on iOSFrancisco Ramos
 
Analysis Of The Original Version Of Java
Analysis Of The Original Version Of JavaAnalysis Of The Original Version Of Java
Analysis Of The Original Version Of JavaAmanda Brady
 

Similaire à Programming with iPhone SDK (20)

Java Is A Programming Dialect And Registering Stage Essay
Java Is A Programming Dialect And Registering Stage EssayJava Is A Programming Dialect And Registering Stage Essay
Java Is A Programming Dialect And Registering Stage Essay
 
200810 - iPhone Tutorial
200810 - iPhone Tutorial200810 - iPhone Tutorial
200810 - iPhone Tutorial
 
Layer architecture of ios (1)
Layer architecture of ios (1)Layer architecture of ios (1)
Layer architecture of ios (1)
 
iOS Development - Offline Class for Jasakomer
iOS Development - Offline Class for JasakomeriOS Development - Offline Class for Jasakomer
iOS Development - Offline Class for Jasakomer
 
Cara Tepat Menjadi iOS Developer Expert - Gilang Ramadhan
Cara Tepat Menjadi iOS Developer Expert - Gilang RamadhanCara Tepat Menjadi iOS Developer Expert - Gilang Ramadhan
Cara Tepat Menjadi iOS Developer Expert - Gilang Ramadhan
 
Best iOS Application Development Tools.pdf
Best iOS Application Development Tools.pdfBest iOS Application Development Tools.pdf
Best iOS Application Development Tools.pdf
 
Mobile application development
Mobile application developmentMobile application development
Mobile application development
 
iPhone application development training day 1
iPhone application development training day 1iPhone application development training day 1
iPhone application development training day 1
 
ios basics
ios basicsios basics
ios basics
 
Training in iOS Development
Training in iOS DevelopmentTraining in iOS Development
Training in iOS Development
 
iOS App Development with Storyboard
iOS App Development with StoryboardiOS App Development with Storyboard
iOS App Development with Storyboard
 
outgoing again
outgoing againoutgoing again
outgoing again
 
iphone application development
iphone application developmentiphone application development
iphone application development
 
Enterprise ipad Development with notes
Enterprise ipad Development with notesEnterprise ipad Development with notes
Enterprise ipad Development with notes
 
Ide
IdeIde
Ide
 
Ios
IosIos
Ios
 
MSR iOS Tranining
MSR iOS TraniningMSR iOS Tranining
MSR iOS Tranining
 
Developing Applications on iOS
Developing Applications on iOSDeveloping Applications on iOS
Developing Applications on iOS
 
Analysis Of The Original Version Of Java
Analysis Of The Original Version Of JavaAnalysis Of The Original Version Of Java
Analysis Of The Original Version Of Java
 
Ios development
Ios developmentIos development
Ios development
 

Plus de Javier Gonzalez-Sanchez (20)

201804 SER332 Lecture 01
201804 SER332 Lecture 01201804 SER332 Lecture 01
201804 SER332 Lecture 01
 
201801 SER332 Lecture 03
201801 SER332 Lecture 03201801 SER332 Lecture 03
201801 SER332 Lecture 03
 
201801 SER332 Lecture 04
201801 SER332 Lecture 04201801 SER332 Lecture 04
201801 SER332 Lecture 04
 
201801 SER332 Lecture 02
201801 SER332 Lecture 02201801 SER332 Lecture 02
201801 SER332 Lecture 02
 
201801 CSE240 Lecture 26
201801 CSE240 Lecture 26201801 CSE240 Lecture 26
201801 CSE240 Lecture 26
 
201801 CSE240 Lecture 25
201801 CSE240 Lecture 25201801 CSE240 Lecture 25
201801 CSE240 Lecture 25
 
201801 CSE240 Lecture 24
201801 CSE240 Lecture 24201801 CSE240 Lecture 24
201801 CSE240 Lecture 24
 
201801 CSE240 Lecture 23
201801 CSE240 Lecture 23201801 CSE240 Lecture 23
201801 CSE240 Lecture 23
 
201801 CSE240 Lecture 22
201801 CSE240 Lecture 22201801 CSE240 Lecture 22
201801 CSE240 Lecture 22
 
201801 CSE240 Lecture 21
201801 CSE240 Lecture 21201801 CSE240 Lecture 21
201801 CSE240 Lecture 21
 
201801 CSE240 Lecture 20
201801 CSE240 Lecture 20201801 CSE240 Lecture 20
201801 CSE240 Lecture 20
 
201801 CSE240 Lecture 19
201801 CSE240 Lecture 19201801 CSE240 Lecture 19
201801 CSE240 Lecture 19
 
201801 CSE240 Lecture 18
201801 CSE240 Lecture 18201801 CSE240 Lecture 18
201801 CSE240 Lecture 18
 
201801 CSE240 Lecture 17
201801 CSE240 Lecture 17201801 CSE240 Lecture 17
201801 CSE240 Lecture 17
 
201801 CSE240 Lecture 16
201801 CSE240 Lecture 16201801 CSE240 Lecture 16
201801 CSE240 Lecture 16
 
201801 CSE240 Lecture 15
201801 CSE240 Lecture 15201801 CSE240 Lecture 15
201801 CSE240 Lecture 15
 
201801 CSE240 Lecture 14
201801 CSE240 Lecture 14201801 CSE240 Lecture 14
201801 CSE240 Lecture 14
 
201801 CSE240 Lecture 13
201801 CSE240 Lecture 13201801 CSE240 Lecture 13
201801 CSE240 Lecture 13
 
201801 CSE240 Lecture 12
201801 CSE240 Lecture 12201801 CSE240 Lecture 12
201801 CSE240 Lecture 12
 
201801 CSE240 Lecture 11
201801 CSE240 Lecture 11201801 CSE240 Lecture 11
201801 CSE240 Lecture 11
 

Dernier

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Dernier (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

Programming with iPhone SDK

  • 1. Programming with iPhone SDK Javier González Sánchez Maria Elena Chávez Echeagaray Copyright is held by the author/owner(s). OOPSLA 2009, October 25–29, 2009, Orlando, Florida, USA.
  • 4. What is iPhone ? Limited screen size. You have a 480 x 320 pixels screen. Light mobile. Height: 4.5 inches, Width: 2.4 inches, Depth 0.48 inches, Weight: 4.8 ounces. One application at a time. It only can handle one application running at a time. Only one window. iPhone applications only can have one window at a time. Five seconds limit. When the user hits the home button, your application will have 5 seconds to save data, close and give up its control. If it takes more than that, it will be terminated. 4
  • 5. What is iPhone ? CPU. 412 | 600 MHz Memory administration. It has 128 | 256 MB of physical RAM and 8 | 32 GB of storage. File Management. It provides each application with a sandbox (2GB), where the application can read/write files, store documents, preferences and data. Different physical interface. iPhone do not have a physical keyboard and a mouse. Instead of that we have multitouch. Other features. iPhone includes Core Location, 3 megapixels built-in camera and photo library, a built-in accelerometer, proximity sensor, and ambient light sensor. And a Phone with WiFi Memory management without a “garbage collector”. 5
  • 8. How does this works?   There is a free SDK that allow you to create your applications, and test them in a Simulator.   Ok!, so what?, Is this a business?   There is a Standard or the Enterprise version of the SDK. They cost $99 and $299 respectively.   Now you can upload your application to your iPhone or distribute them in Apples’ iPhone App Store.   They take care of the process, you then take care or your development. 8
  • 10. iPhone SDK •  Sample code Documentation •  Reference libraries •  Coding how-to •  UIKit •  Foundation Frameworks •  OpenGL / Quartz / Core Graphics •  Media •  Xcode, Tools •  Interface Builder •  iPhone Simulator 10
  • 11. Frameworks   Foundation Cocoa Touch   UIKit   OpenGL ES, Quartz, Media   OpenAL, Core Audio,   Core Animation   Core Location, Core Services   CFNetwork,   SQLite,   Security,   UNIX sockets Core OS   File system   Memory allocation 11
  • 12. Tools We are going to be working with:   Xcode. Apple's Integrated Development Environment (IDE).   Interface Builder (IB). environment to facilitate the development of your GUI's and to give functionality to its components.   iPhone Simulator. It allows you to run your iPhone programs on your Mac. NOTE: the free SDK does not allow you to upload your applications to your iPhone (or iPod Touch) or distribute your software in Apples' iPhone App Store. In order to do this, you have to get the Standard ($99) or the Enterprise ($299) version of the SDK.   Instruments. environment It lets you analyze the performance of your iPhone applications while running in the simulator or on a device. 12
  • 13. Xcode 13
  • 14. Interface Builder Library View .xib file View Instance of UIView, this is the area the users interact Design area GUI elements with 14
  • 15. Interface Builder   Interface Builder is the tool you use to assemble your application’s user interface visually.   You assemble your application’s window by dragging and dropping preconfigured components onto it.   The components include standard system controls such as switches, text fields, and buttons, and also custom views to represent the views your application provides.   After you’ve placed the components on the window’s surface, you can establish the relationships between those objects and your code. When your interface looks the way you want it, you save the contents to a nib file, which is a custom resource file format.   The nib files you create in Interface Builder contain all the information that the UI Kit needs to recreate the same objects in your application at runtime. Loading a nib file creates runtime versions of all the objects stored in the file, configuring them exactly as they were in Interface Builder. 15
  • 17. Model(delegate) + Controller + View View Include XIB files Model Controller Delegates 17
  • 19. Objective-C   Is a simple computer language designed to enable sophisticated OO programming.   Extends the standard ANSI C language by providing syntax for defining classes, methods, and properties, as well as other constructs that promote dynamic extension of classes.   Based mostly on Smalltalk (class syntax and design), one of the first object-oriented programming languages.   Includes the traditional object-oriented concepts, such as encapsulation, inheritance, and polymorphism. 19
  • 20. Files Extension Source Type .h Header files. Header files contain class, type, function, and constant declarations. .m Source files. This is the typical extension used for source files and can contain both Objective-C and C code. .mm Source files. A source file with this extension can contain C+ + code in addition to Objective-C and C code. This extension should be used only if you actually refer to C+ + classes or features from your Objective-C code. 20
  • 21. #import   To include header files in your source code, you can use the standard #include, but….   Objective-C provides a better way #import. it makes sure that the same file is never included more than once.  #import  “MyAppDelegate.h”    #import  “MyViewController.h”    #import  <UIKit/UIKit.h>   21
  • 22. Class   The specification of a class in Objective-C requires two distinct pieces: the interface (.h files) and the implementation (.m files).   The interface portion contains the class declaration and defines the instance variables and methods associated with the class. @interface    …    @end     The implementation portion contains the actual code for the methods of the class.  @implementation    …    @end   22
  • 23. Class Class name @interface  MyClass  :  NSObject   Parent class {    int  count;    id  data;   Instance variables  NSString*  name;   }   -­‐  (id)initWithString:(NSString  *)aName;   methods +  (MyClass  *)createMyClassWithString:  (NSString  *)  aName;   @end   23
  • 24. Class Class name @implementation  MyClass   -­‐  (id)initWithString:(NSString  *)  aName   {          if  (self  =  [super  init])  {                  count  =  0;                  data  =  nil;   methods                name  =  [aName  copy];                  return  self;          }   }   +  (MyClass  *)createMyClassWithString:  (NSString  *)  aName   {          return  [[[self  alloc]  initWithString:aName]  autorelease];   }   @end   24
  • 25. Methods   A class in Objective-C can declare two types of methods:   Instance method is a method whose execution is scoped to a particular instance of the class. In other words, before you call an instance method, you must first create an instance of the class.   Class methods, by comparison, do not require you to create an instance. Method type identifier One or more signature keywords  -­‐(void)insertObject:(id)anObject  atIndex:(NSUInteger)index;   Return type Parameters with (type) and name 25
  • 26. Methods So  the  declaration  of  the  method  insertObject  would  be:   -­‐(void)insertObject:(id)anObject  atIndex:(NSUInteger)index   Method type identifier, is (-) to instance methods, (+) to class methods. And  the  line  to  call  the  method  would  be:   [myArray  insertObject:anObj  atIndex:0];   26
  • 27. Properties   They are simply a shorthand for defining methods (getters and setters) that access existing instance variables.   Properties do not create new instance variables in your class declaration.   Reduce the amount of redundant code you have to write. Because most accessor methods are implemented in similar ways   You specify the behavior you want using the property declaration and then synthesize actual getter and setter methods based on that declaration at compile time. 27
  • 28. Properties In the interface we have: {   BOOL  flag;   NSString*  myObject;   UIView*  rootView;   }   @property  BOOL  flag;   @property  (copy)  NSString*  myObject;  //  Copy  the  object  during  assignement   @property  (readonly)  UIView*  rootView;  //  Create  only  a  getter  method.               …   And in the implementation side we have: @syntetize  flag;   @syntetize  myObject;   @syntetize  rootView;   …   myObject.flag  =  YES;   CGRect      viewFrame  =  myObject.rootView.frame;   28
  • 29. Properties Writability   Readwrite. You can read/write it. This is the default value.   Readonly. You can only read it. Setter semantics (mutually exclusive)   Assign. Specifies that the setter uses simple assignment. This is the default value.   Retain. Specifies that a pointer should be retained.   Copy. Specifies that a copy of the object should be used for assignment. Atomicity (multithreading)   Nonatomic. Specifies that accessor methods are not atomic.   The default value is atomic but there is no need to specify it. 29
  • 30. Protocols and Delegates   Protocols are not classes themselves. They simply define an interface that other objects are responsible for implementing   A protocol declares methods that can be implemented by any class.   In iPhone OS, protocols are used frequently to implement delegate objects. A delegate object is an object that acts on behalf of, or in coordination with, another object.   The declaration of a protocol looks similar to that of a class interface, with the exceptions that protocols do not have a parent class and they do not define instance variables.   In the case of many delegate protocols, adopting a protocol is simply a matter of implementing the methods defined by that protocol. There are some protocols that require you to state explicitly that you support the protocol, and protocols can specify both required and optional methods. 30
  • 31. Example: Fraction Fraction.h   Fraction.m   #import  <Foundation/NSObject.h>     #import  "Fraction.h"     #import  <stdio.h>       @interface  Fraction:  NSObject  {              int  numerator;             @implementation  Fraction        int  denominator;      }       @synthesize  numerator;   //Properties  instead  of  getters  and     @synthesize  denominator;   //setters   @property  (nonatomic)  int  numerator;   //  Output  Print   @property  (nonatomic)  int  denominator;   -­‐(void)  print  {             printf("%i/%i",  numerator,denominator);     }       //Output  print   @end     -­‐(void)  print;     @end     31
  • 32. Example: Fraction main.m #import <stdio.h> #import "Fraction.h" int main( int argc, const char *argv[] ) { Fraction *frac = [[Fraction alloc] init]; frac.numerator = 1; frac.denominator=3; printf( "The fraction is: " ); [frac print]; printf( "n" ); [frac release] return 0; } 32
  • 33. Strings   The NSString class provides an object wrapper.   Supports storing arbitrary-length strings, support for Unicode, printf-style formatting utilities, and more.   Shorthand notation for creating NSString objects from constant values. Precede a normal, double-quoted string with the @ symbol. NSString*    myString  =  @”Hello  Worldn";   NSString*    anotherString  =                  [NSString  stringWithFormat:@"%d  %s",  1,  @"String”];   33
  • 35. Let us Code: Outlet and Actions 4.
  • 36. What about main method ? int main(int argc, char *argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; int retVal = UIApplicationMain(argc, argv, nil, nil); [pool release]; return retVal; } 36
  • 37. Model(delegate) View Include XIB files Protocol implementation Model Controller Delegates UIApplicationDelegate UIAccelerometerDelegate UILocationManagerDelegate 37
  • 38. UIApplicationDelegate #import <UIKit/UIKit.h> @class TutorialEvaluationViewController; @interface TutorialEvaluationAppDelegate : NSObject <UIApplicationDelegate> { UIWindow *window; TutorialEvaluationViewController *viewController; } @property (nonatomic, retain) IBOutlet UIWindow *window; @property (nonatomic, retain) IBOutlet TutorialEvaluationViewController *viewController; @end 38
  • 39. UIApplicationDelegate #import "TutorialEvaluationAppDelegate.h” #import "TutorialEvaluationViewController.h” @implementation TutorialEvaluationAppDelegate @synthesize window; @synthesize viewController; -  (void)applicationDidFinishLaunching:(UIApplication *) application { // Override point for customization after app launch [window addSubview:viewController.view]; [window makeKeyAndVisible]; } -  (void) dealloc { [viewController release]; [window release]; [super dealloc]; } @end 39
  • 40. View (go back to IB) View Include XIB files IBOutlet IBAction Protocol implementation Model Controller Delegates UIApplicationDelegate UIAccelerometerDelegate UILocationManagerDelegate 40
  • 41. Controller View Include XIB files IBOutlet IBAction Protocol implementation Model Controller Delegates UIApplicationDelegate UIAccelerometerDelegate UILocationManagerDelegate 41
  • 42. Actions and Outlets   Outlet: is a pointer that points an object in the NIB file. •  Action: objects in the nib can trigger special methods in our controller. These special methods are known as action methods. 42
  • 43. FooViewController.h #import <UIKit/UIKit.h> @interface FooViewController : UIViewController { IBOutlet UILabel *label; } @property (retain, nonatomic) UILabel *label; - (IBAction)buttonPressed:(id)sender; @end 43
  • 44. FooViewController.m #import ”FooViewController.h" @implementation FooViewController @synthesize label; -(IBAction)buttonPressed:(did)sender{ label.text = [sender titleForState:UIControlStateNormal]; } -  (void)dealloc { [label release] [super dealloc]; } @end 44
  • 45. Connecting   We need to connect the elements in the interface with its functionality, i.e., we have to connect our View with the File's Owner.   With this connection we are telling our controller that when our application starts it loads the TutorialEvaluationViewController.xib file into memory and get control of it. UI 45
  • 47. Solution IBOutlet UILabel *label; IBOutlet  UIImageView  *logo;   @property  (nonatomic,  retain)  UILabel  *label;   @property  (nonatomic,  retain)  UIImageView  *logo;   @synthesize  label;   @synthesize  logo;   -­‐(IBAction)pressButtonFlorida:(id)sender{      label.text  =  @"Welcome  to  Florida";      logo.image  =  [UIImage  imageNamed:@"MickeyMouse.gif"];   }   -­‐(IBAction)pressButtonArizona:(id)sender{      label.text  =  @"Greetings  from  Arizona";logo.image  =  [UIImage   imageNamed:@"ASU_logo.png"];   }  
  • 48. Let us Code: Touch Events 5
  • 49. Handling Touch Events All UIViewController inherit from UIResponder, and is able to handle touch Event. In order to do this we use these three methods. -­‐  (void)touchesBegan:(NSSet  *)touches  withEvent:(UIEvent  *)event;   -­‐  (void)touchesMoved:(NSSet  *)touches  withEvent:(UIEvent  *)event;   -­‐  (void)touchesEnded:(NSSet  *)touches  withEvent:(UIEvent  *)event;   49
  • 51. Solution -­‐(void)touchesBegan:(NSSet  *)touches  withEvent:(UIEvent  *)event{        touchLabel.text  =  @"began";        NSUInteger  numTaps  =  [[touches  anyObject]  tapCount];        if  (numTaps  ==  1)            [self.view  setBackgroundColor:  [UIColor  redColor]];        else  if  (numTaps  ==  2)            [self.view  setBackgroundColor:  [UIColor  blueColor]];        else  if  (numTaps  ==  3)            [self.view  setBackgroundColor:  [UIColor  yellowColor]];     }   -­‐(void)touchesMoved:(NSSet  *)touches  withEvent:(UIEvent  *)event{        CGPoint  point  =  [[touches  anyObject]  locationInView:self.view];        NSString  *touchesMessage  =  [[NSString  alloc]  initWithFormat:@"%f,  %f",                                                        point.x,  point.y];        touchLabel.text  =  touchesMessage;        [touchesMessage  release];   }   -­‐(void)touchesEnded:(NSSet  *)touches  withEvent:(UIEvent  *)event{        touchLabel.text  =  @"ended";   }  
  • 53. Let us code: Autorotate and Accelerometer 6
  • 54. AutoRotate The UIViewController class provides the infrastructure needed to rotate your interface and adjust the position of views automatically in response to orientation changes. -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation interfaceOrientation { return YES; //return (interfaceOrientation == UIInterfaceOrientationPortrait); } interfaceOrientation values:   UIInterfaceOrientationPortrait   UIInterfaceOrientationPortraitUpsideDown   UIInterfaceOrientationLandscapeLeft   UIInterfaceOrientationLandscapeRight 54
  • 56. Accelerometer Measure of Gravity acceleration: 0g 1g 2.3g 56
  • 57. Reading the Accelerometer   UIAccelerometer object in UIKit allow you to access to the raw accelerometer data directly. This object reports the current accelerometer values.   To get an instance of this class, call the sharedAccelerometer method of UIAccelerometer class.   The updateInterval property define the reporting interval in seconds. -­‐(void)viewDidLoad  {      UIAccelerometer  *accelerometer  =  [UIAccelerometer  sharedAccelerometer];      accelerometer.delegate  =  self;      accelerometer.updateInterval  =    1.0/60;      [super  viewDidLoad];   }   57
  • 58. Reading the Accelerometer   A delegate (UIAccelerometerDelegate) will receive acceleration events. @interface  FooViewController:  UIViewController  <UIAccelerometerDelegate>     Use accelerometer:didAccelerate: method to process accelerometer data. -­‐(void)accelerometer:(UIAccelerometer  *)accelerometer  didAccelerate:  (UIAcceleration  *)acceleration  {              NSString  *s  =  [[NSString  alloc]  initWithFormat:@"%f,  %f,  %f",        acceleration.x,  acceleration.y,  acceleration.z];    accLabel.text  =  s;      [s  release];   } 58
  • 62. Core Location The Core Location framework monitors signals coming from cell phone towers and Wi-Fi hotspots and uses them to triangulate the user's current position. 62
  • 63. Getting the User's Current Location   Create an instance of CLLocationManager class. It  is  necessary  to  include  the  CoreLocation.framework   #import  <CoreLocation/CoreLocation.h>   @interface  FooViewController:  UIViewController<CLLocationManagerDelegate>       To begin receiving notifications, assign a delegate and call the startUpdatingLocation method. -­‐(void)viewDidLoad  {      CLLocationManager  *locationManager=  [[CLLocationManager  alloc]  init];      [locationManager  startUpdatingLocation];locationManager.delegate  =  self;      locationManager.distanceFilter  =  kCLDistanceFilterNone;            locationManager.desiredAccuracy  =  kCLLocationAccuracyBest;   }   63
  • 64. Using the Core Location   We need implement this: -­‐  (void)locationManager:(CLLocationManager  *)manager  didUpdateToLocation: (CLLocation  *)newLocation  fromLocation:(CLLocation  *)oldLocation  {      NSString  *latitudeString  =  [[NSString  alloc]  initWithFormat:@"%g°",          newLocation.coordinate.latitude];      latitudeLabel.text  =  latitudeString;      [latitudeString  release];    NSString  *longitudeString  =  [[NSString  alloc]  initWithFormat:@"%g°",          newLocation.coordinate.longitude];      longitudeLabel.text  =  longitudeString;      [longitudeString  release];   }   64
  • 67. Quartz 8
  • 68. Coding a new view #import  <UIKit/UIKit.h>   @interface  myView  :  UIView  {        CGPoint  myPoint;            int  x;        int  y;   }   @property  CGPoint  myPoint;   @property  int  x;   @property  int  y;   -­‐(void)draw;   @end   68
  • 69. Coding a new view @implementation  myView   @synthesize  myPoint;   @synthesize  x;   @synthesize  y;   -­‐(id)initWithCoder:(NSCoder  *)coder  {        if  (self  =  [super  initWithCoder:coder])  {              x=self.bounds.size.width  /  2;              y=self.bounds.size.height  /  2;        }        return  self;   }   -­‐(void)touchesBegan:(NSSet  *)touches  withEvent:(UIEvent  *)event{        UITouch  *t  =  [touches  anyObject];        CGPoint  point  =  [t  locationInView:t.view];        x  =  point.x;        y  =  point.y;        [self  setNeedsDisplay];   }   69
  • 70. Coding a new view -­‐  (void)draw{   CGContextRef  context  =  UIGraphicsGetCurrentContext();   CGContextSetFillColorWithColor(context,  [UIColor  colorWithRed:1.0f        green:0.0f  blue:0.0f  alpha:1.0f].CGColor);           CGRect  patito  =  CGRectMake  (x,y,10,10);CGContextAddEllipseInRect (context,  patito);   CGContextDrawPath(context,  kCGPathFillStroke);   }   -­‐  (void)drawRect:(CGRect)rect  {    [self  draw];   }   70
  • 75. Demo
  • 76. Plist file 3.3
  • 77. plist file <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>en</string> <key>CFBundleDisplayName</key> <string>${PRODUCT_NAME}</string> <key>CFBundleExecutable</key> <string>${EXECUTABLE_NAME}</string> <key>CFBundleIconFile</key> <string>Icon.png</string> <key>CFBundleIdentifier</key> <string>com.yourcompany.${PRODUCT_NAME:identifier}</string> 77
  • 78. plist file <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>${PRODUCT_NAME}</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>1.0</string> <key>UIStatusBarHidden</key> <true/> <key>NSMainNibFile</key> <string>MainWindow</string> </dict> </plist> 78
  • 79. Exercises and References 6
  • 81. Instructors Javier González Sánchez Tecnológico de Monterrey, campus Guadalajara javiergs@itesm.mx .com/in/javiergs Maria Elena Chávez Echeagaray Tecnológico de Monterrey, campus Guadalajara mechavez@itesm.mx .com/in/mechavez 81