SlideShare une entreprise Scribd logo
1  sur  112
XCODE 4.5
 Nicolas Lauquin - L’atelier du mobile




8 novembre 2012 @ CocoaHeads
pense, crée et fait connaitre vos applications mobiles
INTRODUCTION
• Chronologie     d’Xcode 4.x & fonctionnalités clefs

• Améliorations    d’Objective C

• Démo

• Les   impacts & architectures supportées



Note : présentation orientée iOS
(R)EVOLUTION D’XCODE 4.0
     MARS 2011 (PUBLIC RELEASE)
(R)EVOLUTION D’XCODE 4.0
                 MARS 2011 (PUBLIC RELEASE)




•   Présentations «Hello Xcode 4» Cocoaheads du 14 avril 2011
(R)EVOLUTION D’XCODE 4.0
                     MARS 2011 (PUBLIC RELEASE)




•   Présentations «Hello Xcode 4» Cocoaheads du 14 avril 2011

    •   «Un outil attendu (instable ? ;-))»
(R)EVOLUTION D’XCODE 4.0
                     MARS 2011 (PUBLIC RELEASE)




•   Présentations «Hello Xcode 4» Cocoaheads du 14 avril 2011

    •   «Un outil attendu (instable ? ;-))»

    •   «Une modification du processus de développement»
(R)EVOLUTION D’XCODE 4.0
                     MARS 2011 (PUBLIC RELEASE)




•   Présentations «Hello Xcode 4» Cocoaheads du 14 avril 2011

    •   «Un outil attendu (instable ? ;-))»

    •   «Une modification du processus de développement»

    •   «Des fonctionnalités perdues & des évolutions»
EVOLUTION XCODE 4.1
      JUILLET 2011
EVOLUTION XCODE 4.1
                         JUILLET 2011



•   Support de Mac OS X LION (10.7)
EVOLUTION XCODE 4.1
                         JUILLET 2011



•   Support de Mac OS X LION (10.7)

•   Autolayout (Lion)
EVOLUTION XCODE 4.1
                         JUILLET 2011



•   Support de Mac OS X LION (10.7)

•   Autolayout (Lion)

•   OS X Application Sandbox (Lion)
EVOLUTION XCODE 4.1
                         JUILLET 2011



•   Support de Mac OS X LION (10.7)

•   Autolayout (Lion)

•   OS X Application Sandbox (Lion)

•   Default compiler LLVM-GCC 4.2
EVOLUTION XCODE 4.1
                         JUILLET 2011



•   Support de Mac OS X LION (10.7)

•   Autolayout (Lion)

•   OS X Application Sandbox (Lion)

•   Default compiler LLVM-GCC 4.2

•   Custom Behaviors
EVOLUTION XCODE 4.1
                         JUILLET 2011



•   Support de Mac OS X LION (10.7)

•   Autolayout (Lion)

•   OS X Application Sandbox (Lion)

•   Default compiler LLVM-GCC 4.2

•   Custom Behaviors

•   Git Remote Management
EVOLUTION XCODE 4.2
      OCTOBRE 2011
EVOLUTION XCODE 4.2
                    OCTOBRE 2011



•   Support iOS 5
EVOLUTION XCODE 4.2
                    OCTOBRE 2011



•   Support iOS 5

•   ARC
EVOLUTION XCODE 4.2
                        OCTOBRE 2011



•   Support iOS 5

•   ARC

•   Default compiler LLVM 3.0
EVOLUTION XCODE 4.2
                        OCTOBRE 2011



•   Support iOS 5

•   ARC

•   Default compiler LLVM 3.0

•   Storyboarding
EVOLUTION XCODE 4.2
                          OCTOBRE 2011



•   Support iOS 5

•   ARC

•   Default compiler LLVM 3.0

•   Storyboarding

•   Location Simulation
EVOLUTION XCODE 4.2
                          OCTOBRE 2011



•   Support iOS 5

•   ARC

•   Default compiler LLVM 3.0

•   Storyboarding

•   Location Simulation

•   Dernière version compatible Snow Leopard
EVOLUTION XCODE 4.3
       MARS 2012
EVOLUTION XCODE 4.3
                           MARS 2012




•   Une application “tout en un“ téléchargeable depuis le Mac
    AppStore. Bybye «/Developer»
EVOLUTION XCODE 4.3
                           MARS 2012




•   Une application “tout en un“ téléchargeable depuis le Mac
    AppStore. Bybye «/Developer»

•   Auto Layout est par défaut pour tout projet Cocoa
EVOLUTION XCODE 4.3
                               MARS 2012




•   Une application “tout en un“ téléchargeable depuis le Mac
    AppStore. Bybye «/Developer»

•   Auto Layout est par défaut pour tout projet Cocoa

•   Xcode 4.3.1 -> support iOS5.1
EVOLUTION XCODE 4.3
                               MARS 2012




•   Une application “tout en un“ téléchargeable depuis le Mac
    AppStore. Bybye «/Developer»

•   Auto Layout est par défaut pour tout projet Cocoa

•   Xcode 4.3.1 -> support iOS5.1

•   Xcode 4.3.3 -> maj pour 10.7.4
EVOLUTION XCODE 4.4
      JUILLET 2012
EVOLUTION XCODE 4.4
                           JUILLET 2012


•   Support de Mountain Lion (10.8)
EVOLUTION XCODE 4.4
                           JUILLET 2012


•   Support de Mountain Lion (10.8)

•   Fonctionne sur Mac OS X Lion et Mountain Lion
EVOLUTION XCODE 4.4
                            JUILLET 2012


•   Support de Mountain Lion (10.8)

•   Fonctionne sur Mac OS X Lion et Mountain Lion

•   LLVM 4.0 Compiler màj (literals & subscription) - OS X
EVOLUTION XCODE 4.4
                            JUILLET 2012


•   Support de Mountain Lion (10.8)

•   Fonctionne sur Mac OS X Lion et Mountain Lion

•   LLVM 4.0 Compiler màj (literals & subscription) - OS X

•   Synthesize par défaut pour les properties
EVOLUTION XCODE 4.4
                            JUILLET 2012


•   Support de Mountain Lion (10.8)

•   Fonctionne sur Mac OS X Lion et Mountain Lion

•   LLVM 4.0 Compiler màj (literals & subscription) - OS X

•   Synthesize par défaut pour les properties

•   Amélioration de l’«analyzer»   (common security mistakes in API and malloc
    usages)
EVOLUTION XCODE 4.4
                                 JUILLET 2012


•   Support de Mountain Lion (10.8)

•   Fonctionne sur Mac OS X Lion et Mountain Lion

•   LLVM 4.0 Compiler màj (literals & subscription) - OS X

•   Synthesize par défaut pour les properties

•   Amélioration de l’«analyzer»      (common security mistakes in API and malloc
    usages)

•   4.4.1 -> avec correction de quelques bugs
EVOLUTION XCODE 4.5
     SEPTEMBRE 2012
EVOLUTION XCODE 4.5
                   SEPTEMBRE 2012

•   iOS6 support
EVOLUTION XCODE 4.5
                        SEPTEMBRE 2012

•   iOS6 support

•   Écran 4“ Retina de l’iPhone 5 & iPod
EVOLUTION XCODE 4.5
                        SEPTEMBRE 2012

•   iOS6 support

•   Écran 4“ Retina de l’iPhone 5 & iPod

•   Support des literals & subscripting pour iOS
EVOLUTION XCODE 4.5
                          SEPTEMBRE 2012

•   iOS6 support

•   Écran 4“ Retina de l’iPhone 5 & iPod

•   Support des literals & subscripting pour iOS

•   Autolayout pour iOS
EVOLUTION XCODE 4.5
                          SEPTEMBRE 2012

•   iOS6 support

•   Écran 4“ Retina de l’iPhone 5 & iPod

•   Support des literals & subscripting pour iOS

•   Autolayout pour iOS

•   LLDB is now the default debugger & LLDB supports hardware
    watchpoints on iOS devices
EVOLUTION XCODE 4.5
                                SEPTEMBRE 2012

•   iOS6 support

•   Écran 4“ Retina de l’iPhone 5 & iPod

•   Support des literals & subscripting pour iOS

•   Autolayout pour iOS

•   LLDB is now the default debugger & LLDB supports hardware
    watchpoints on iOS devices

•   Xcode 4.5.1 (octobre) -> bug fix & stabilité
EVOLUTION XCODE 4.5
                                SEPTEMBRE 2012

•   iOS6 support

•   Écran 4“ Retina de l’iPhone 5 & iPod

•   Support des literals & subscripting pour iOS

•   Autolayout pour iOS

•   LLDB is now the default debugger & LLDB supports hardware
    watchpoints on iOS devices

•   Xcode 4.5.1 (octobre) -> bug fix & stabilité

•   Xcode 4.5.2 (novembre) -> support de l’iPad mini & iPad écran retina
AMÉLIORATION D’OBJECTIVE C
SIMPLIFICATION : ORDRE DES MÉTHODES 1/5
AMÉLIORATION D’OBJECTIVE C
       SIMPLIFICATION : ORDRE DES MÉTHODES 1/5


#import "CocoaheadsMeetingViewController.h"


@implementation CocoaheadsMeetingViewController

- (void)listeningThePresentation {
    [self carefully];
}

- (void)carefully {}


@end
AMÉLIORATION D’OBJECTIVE C
        SIMPLIFICATION : ORDRE DES MÉTHODES 1/5


 #import "CocoaheadsMeetingViewController.h"


 @implementation CocoaheadsMeetingViewController

 - (void)listeningThePresentation {
     [self carefully];
 }

 - (void)carefully {}


 @end




Avant Xcode 4.4 -> warning méthode non trouvée
AMÉLIORATION D’OBJECTIVE C
SIMPLIFICATION : ORDRE DES MÉTHODES 2/5
AMÉLIORATION D’OBJECTIVE C
        SIMPLIFICATION : ORDRE DES MÉTHODES 2/5

Solution 1) Ordonnancer les méthodes
 #import "CocoaheadsMeetingViewController.h"

 @implementation CocoaheadsMeetingViewController


 - (void)carefully {}

 - (void)listeningThePresentation {
     [self carefully];
 }

 @end
AMÉLIORATION D’OBJECTIVE C
        SIMPLIFICATION : ORDRE DES MÉTHODES 2/5

Solution 1) Ordonnancer les méthodes
 #import "CocoaheadsMeetingViewController.h"

 @implementation CocoaheadsMeetingViewController


 - (void)carefully {}

 - (void)listeningThePresentation {
     [self carefully];
 }

 @end


Analyse :
• ne fonctionne pas tout le temps
• surtout une perte de temps
AMÉLIORATION D’OBJECTIVE C
SIMPLIFICATION : ORDRE DES MÉTHODES 3/5
AMÉLIORATION D’OBJECTIVE C
     SIMPLIFICATION : ORDRE DES MÉTHODES 3/5

Solution 2) Classe publique
AMÉLIORATION D’OBJECTIVE C
        SIMPLIFICATION : ORDRE DES MÉTHODES 3/5

Solution 2) Classe publique

 @interface CocoaheadsMeetingViewController : UIViewController
    - (void)carefully;
 @end

 @implementation CocoaheadsMeetingViewController

 - (void)listeningThePresentation {
     [self carefully];
 }

 - (void)carefully {}

 @end
AMÉLIORATION D’OBJECTIVE C
        SIMPLIFICATION : ORDRE DES MÉTHODES 3/5

Solution 2) Classe publique

 @interface CocoaheadsMeetingViewController : UIViewController
    - (void)carefully;
 @end

 @implementation CocoaheadsMeetingViewController

 - (void)listeningThePresentation {
     [self carefully];
 }

 - (void)carefully {}

 @end

Analyse :
• mauvaise exposition/programmation
AMÉLIORATION D’OBJECTIVE C
SIMPLIFICATION : ORDRE DES MÉTHODES 4/5
AMÉLIORATION D’OBJECTIVE C
     SIMPLIFICATION : ORDRE DES MÉTHODES 4/5

Solution 3) Extension de classe
AMÉLIORATION D’OBJECTIVE C
        SIMPLIFICATION : ORDRE DES MÉTHODES 4/5

Solution 3) Extension de classe
 @interface CocoaheadsMeetingViewController ()

 - (void)carefully;

 @end

 @implementation CocoaheadsMeetingViewController

 - (void)listeningThePresentation {
     [self carefully];
 }

 - (void)carefully {}
AMÉLIORATION D’OBJECTIVE C
        SIMPLIFICATION : ORDRE DES MÉTHODES 4/5

Solution 3) Extension de classe
 @interface CocoaheadsMeetingViewController ()

 - (void)carefully;

 @end

 @implementation CocoaheadsMeetingViewController

 - (void)listeningThePresentation {
     [self carefully];
 }

 - (void)carefully {}

Analyse :
• permet l’ajout de “property“ privées & méthodes accessibles depuis un nib
• reste une perte de temps & un workaround
AMÉLIORATION D’OBJECTIVE C
SIMPLIFICATION : ORDRE DES MÉTHODES 5/5
AMÉLIORATION D’OBJECTIVE C
     SIMPLIFICATION : ORDRE DES MÉTHODES 5/5

Solution 4)
AMÉLIORATION D’OBJECTIVE C
     SIMPLIFICATION : ORDRE DES MÉTHODES 5/5

Solution 4)




 Ça fonctionne tout simplement dans Xcode 4.5
AMÉLIORATION D’OBJECTIVE C
                    AMÉLIORATION : ENUM

Enum with fixed underlying type



 typedef enum CocoaheadsPublicType : NSUInteger {
     CocoaheadsPublicDevelopper,
     CocoaheadsPublicDesigner,
     CocoaheadsPublicPM
 } CocoaheadsPublicType;




  Analyse :
  • enumération typées
  • Warning type checking
  • Warning handeling all enums values
AMÉLIORATION D’OBJECTIVE C
     SIMPLIFICATION : PROPERTIES
AMÉLIORATION D’OBJECTIVE C
                       SIMPLIFICATION : PROPERTIES

   @interface PropertyObject : NSObject
   @property (readwrite, strong) NSString * name;
   @end

   @implementation PropertyObject

   @end


Analyse :
•“synthesize“ par défaut
•chaque accesseur est généré si non fourni
AMÉLIORATION D’OBJECTIVE C
                        SIMPLIFICATION : PROPERTIES

   @interface PropertyObject : NSObject
   @property (readwrite, strong) NSString * name;
   @end

   @implementation PropertyObject
   @synthesize name = _name;// generated by default
   @end


Analyse :
•“synthesize“ par défaut
•chaque accesseur est généré si non fourni
•variable d’instance généré par défaut “_variable“ si non fournie
AMÉLIORATION D’OBJECTIVE C
                        SIMPLIFICATION : PROPERTIES

   @interface PropertyObject : NSObject
   @property (readwrite, strong) NSString * name;
   @end

   @implementation PropertyObject
   @synthesize name = _name;// generated by default
   @end


Analyse :
•“synthesize“ par défaut
•chaque accesseur est généré si non fourni
•variable d’instance généré par défaut “_variable“ si non fournie
•compatibilité :
LITERALS 1/6
    INTRO
LITERALS 1/6
                      INTRO




•   Code allégé
LITERALS 1/6
                        INTRO




•   Code allégé

•   Gain de temps
LITERALS 1/6
                               INTRO




•   Code allégé

•   Gain de temps

•   “boxing“ : primitive value to object. (Necessary for Foundation
    collections)
LITERALS 2/6
NSNUMBER - BOXED NUMBER
LITERALS 2/6
                  NSNUMBER - BOXED NUMBER




•   [NSNumber numberWithInt:42];
LITERALS 2/6
                  NSNUMBER - BOXED NUMBER




•   [NSNumber numberWithInt:42];            -> @42
LITERALS 2/6
                  NSNUMBER - BOXED NUMBER




•   [NSNumber numberWithInt:42];            -> @42


•   [NSNumber numberWithBool:YES];
LITERALS 2/6
                  NSNUMBER - BOXED NUMBER




•   [NSNumber numberWithInt:42];            -> @42


•   [NSNumber numberWithBool:YES];          -> @YES
LITERALS 2/6
                  NSNUMBER - BOXED NUMBER




•   [NSNumber numberWithInt:42];               -> @42


•   [NSNumber numberWithBool:YES];             -> @YES


•   [NSNumber numberWithFloat:3.141592654F];
LITERALS 2/6
                  NSNUMBER - BOXED NUMBER




•   [NSNumber numberWithInt:42];               -> @42


•   [NSNumber numberWithBool:YES];             -> @YES


•   [NSNumber numberWithFloat:3.141592654F]; -> @3.141592654F;
LITERALS 3/6
BOXED EXPRESSIONS
LITERALS 3/6
                            BOXED EXPRESSIONS

Syntaxe : @( expression )
LITERALS 3/6
                            BOXED EXPRESSIONS

Syntaxe : @( expression )

•   1) Numbers
LITERALS 3/6
                               BOXED EXPRESSIONS

Syntaxe : @( expression )

•   1) Numbers

    •   NSNumber *piOverTwo = @(M_PI / 2); // [NSNumber numberWithDouble:(M_PI / 2)]
LITERALS 3/6
                                   BOXED EXPRESSIONS

Syntaxe : @( expression )

•   1) Numbers

    •   NSNumber *piOverTwo = @(M_PI / 2); // [NSNumber numberWithDouble:(M_PI / 2)]

•   2) Enumerated types :

    •   typedef enum { Red, Green, Blue } Color;

    •   NSNumber *favoriteColor = @(Green);        // [NSNumber numberWithInt:((int)Green)]
LITERALS 3/6
                                    BOXED EXPRESSIONS

Syntaxe : @( expression )

•   1) Numbers

     •   NSNumber *piOverTwo = @(M_PI / 2); // [NSNumber numberWithDouble:(M_PI / 2)]

•   2) Enumerated types :

    •    typedef enum { Red, Green, Blue } Color;

    •    NSNumber *favoriteColor = @(Green);        // [NSNumber numberWithInt:((int)Green)]
•   3) Strings :

    •    NSString *path = @(getenv("PATH"));    // [NSString stringWithUTF8String:(getenv("PATH"))]

    •    NSArray *pathComponents = [path componentsSeparatedByString:@":"];
LITERALS 4/6
  DICTIONARY
LITERALS 4/6
                              DICTIONARY




•   NSDictionnary *dict = [NSDictionnary
    dictionnaryWithObjectsAndKeys:{"val1", "key1", "val2", "key2"};
LITERALS 4/6
                              DICTIONARY




•   NSDictionnary *dict = [NSDictionnary
    dictionnaryWithObjectsAndKeys:{"val1", "key1", "val2", "key2"};

•   NSDictionnary *dict = @{ @"key1":@"val1", @"key2":@"val2" };
LITERALS 4/6
                               DICTIONARY




•   NSDictionnary *dict = [NSDictionnary
    dictionnaryWithObjectsAndKeys:{"val1", "key1", "val2", "key2"};

•   NSDictionnary *dict = @{ @"key1":@"val1", @"key2":@"val2" };

•   Syntaxe @{key : obj, … }
LITERALS 4/6
                               DICTIONARY




•   NSDictionnary *dict = [NSDictionnary
    dictionnaryWithObjectsAndKeys:{"val1", "key1", "val2", "key2"};

•   NSDictionnary *dict = @{ @"key1":@"val1", @"key2":@"val2" };

•   Syntaxe @{key : obj, … }

•   -> Attention cohérence
LITERALS 5/6
    ARRAY
LITERALS 5/6
                                ARRAY




•   NSArray *ar = [NSArray arrayWithObjects:@"titi", @"toto", nil];
LITERALS 5/6
                                ARRAY




•   NSArray *ar = [NSArray arrayWithObjects:@"titi", @"toto", nil];

•   NSArray *ar = @[@"titi", @"toto"];
LITERALS 5/6
                                ARRAY




•   NSArray *ar = [NSArray arrayWithObjects:@"titi", @"toto", nil];

•   NSArray *ar = @[@"titi", @"toto"];

•   Syntaxe : @[obj1, obj2]
LITERALS 5/6
  CONTAINER
LITERALS 5/6
                            CONTAINER



•   Container sont “immutable“
LITERALS 5/6
                                  CONTAINER



•   Container sont “immutable“

•   Utiliser : “-mutableCopy“
      NSMutableArray * numberArray = [@[ @"one", @"two", @"three"]mutableCopy];
LITERALS 5/6
                                  CONTAINER



•   Container sont “immutable“

•   Utiliser : “-mutableCopy“
      NSMutableArray * numberArray = [@[ @"one", @"two", @"three"]mutableCopy];


•   Usage static : «Initializer element is not a compile-time constant»
LITERALS 5/6
                                    CONTAINER



•   Container sont “immutable“

•   Utiliser : “-mutableCopy“
        NSMutableArray * numberArray = [@[ @"one", @"two", @"three"]mutableCopy];


•   Usage static : «Initializer element is not a compile-time constant»

    •   workaround : affecter la valeur dans la méthode “+initialize“ de
        votre classe
OBJECT SUBSCRIPTING 1/3

Array (index subscripting)
NSMutableArray *array = ...;
NSUInteger idx = ...;
id newObject = ...;
id oldObject = array[idx];
array[idx] = newObject;! !     // replace oldObject with newObject
OBJECT SUBSCRIPTING 1/3

Array (index subscripting)
NSMutableArray *array = ...;
NSUInteger idx = ...;
id newObject = ...;
id oldObject = array[idx];
array[idx] = newObject;! !       // replace oldObject with newObject



Dictionnary (key subscripting)
NSMutableDictionary *dictionary = ...;
NSString *key = ...;
oldObject = dictionary[key];
dictionary[key] = newObject;!// replace oldObject with newObject
OBJECT SUBSCRIPTING 2/3
       DÉCRYPTAGE
OBJECT SUBSCRIPTING 2/3
                          DÉCRYPTAGE

Array
id value = array[idx]; -> id value = [array objectAtIndexedSubscript:idx];
array[idx] = object; -> [array setObject:object atIndexedSubscript:idx];

idx : integral type
object : object pointer
OBJECT SUBSCRIPTING 2/3
                          DÉCRYPTAGE

Array
id value = array[idx]; -> id value = [array objectAtIndexedSubscript:idx];
array[idx] = object; -> [array setObject:object atIndexedSubscript:idx];

idx : integral type
object : object pointer




Dictionnary
id value = dict[key]; -> id value = [dict objectForKeyedSubscript:key];
dict[key] = object; -> [dict setObject:object forKeyedSubscript:key];


key & object : object pointer
OBJECT SUBSCRIPTING 3/3
 VOTRE CLASSE “SUBSCRIPTABLE“
OBJECT SUBSCRIPTING 3/3
              VOTRE CLASSE “SUBSCRIPTABLE“
@interface MyCocoaheadsList : NSObject

- (User *) objectAtIndexedSubscript:(NSUInteger)idx;
- (void) setObject:(User*) user atIndexedSubcript:(NSUInteger)idx;

@end

@implementation MyCocoaheadsList {
    NSMutableArray * myCocoaheadsList;
}

- (User *) objectAtIndexedSubscript:(NSUInteger)idx{
    return (User *) myCocoaheadsList[idx];
}

- (void) setObject:(User*) user atIndexedSubcript:(NSUInteger)idx {
    myCocoaheadsList[idx] = user;
}

@end

Appel via :

MyCocoaheadsList * mycocoaheadsList = [[MyCocoaheadsList alloc] init];
User * firstUser = mycocoaheadsList[0];
ASTUCES DÉMO


•   Find and Search indexation de symbols & Insert pattern

•   Callers or Callees

•   Tag Fixme & TODO

•   Refactor -> convert to modern Objectiv C
XCODE 4.5 ARCHITECTURES
SUPPORTÉES & IMPACTS 1/2
XCODE 4.5 ARCHITECTURES
       SUPPORTÉES & IMPACTS 1/2
• Simulateur   4.3 disparu sous Mountain Lion
XCODE 4.5 ARCHITECTURES
       SUPPORTÉES & IMPACTS 1/2
• Simulateur   4.3 disparu sous Mountain Lion

• Abandon   de armv6 (iPhone 1, iPod touch 2G (2007), iPhone
 3G)
XCODE 4.5 ARCHITECTURES
        SUPPORTÉES & IMPACTS 1/2
• Simulateur   4.3 disparu sous Mountain Lion

• Abandon   de armv6 (iPhone 1, iPod touch 2G (2007), iPhone
 3G)




• iOS   4.3 minimum supporté.

  • =>   solution simple de tester ???
BIBLIOGRAPHIE
• Details
       sur literals & object subscription : http://clang.llvm.org/
 docs/ObjectiveCLiterals.html

• WWDC        2012 session 405 : Modern Objective C (vidéo)

• Xcode     release : https://developer.apple.com/library/mac/#releasenotes/
 DeveloperTools/RN-Xcode/_index.html

• What’s    new in Xcode : http://developer.apple.com/library/ios/#documentation/
 DeveloperTools/Conceptual/WhatsNewXcode/00-Introduction/Introduction.html


• http://en.wikipedia.org/wiki/Xcode#Major_features
QUESTIONS

Contenu connexe

Tendances

Présentation de Carthage par Simone Civetta
Présentation de Carthage par Simone CivettaPrésentation de Carthage par Simone Civetta
Présentation de Carthage par Simone CivettaCocoaHeads France
 
L'intégration continue avec Bitrise
L'intégration continue avec BitriseL'intégration continue avec Bitrise
L'intégration continue avec BitriseCocoaHeads France
 
Firebase par nicolas lehovetzki
Firebase par nicolas lehovetzkiFirebase par nicolas lehovetzki
Firebase par nicolas lehovetzkiCocoaHeads France
 
Build automatique et distribution OTA avec Xcode 4.x et Jenkins
Build automatique et distribution OTA avec Xcode 4.x et JenkinsBuild automatique et distribution OTA avec Xcode 4.x et Jenkins
Build automatique et distribution OTA avec Xcode 4.x et JenkinsCocoaHeads France
 
CocoaHeads Toulouse - Xcode et les tests - Epitez
CocoaHeads Toulouse - Xcode et les tests - EpitezCocoaHeads Toulouse - Xcode et les tests - Epitez
CocoaHeads Toulouse - Xcode et les tests - EpitezCocoaHeads France
 
Introduction à Play Framework 2
Introduction à Play Framework 2Introduction à Play Framework 2
Introduction à Play Framework 2Samy Dindane
 
App groups, faire communiquer ses applications {Cocoaheads Montpellier}
App groups, faire communiquer ses applications {Cocoaheads Montpellier}App groups, faire communiquer ses applications {Cocoaheads Montpellier}
App groups, faire communiquer ses applications {Cocoaheads Montpellier}Idean France
 
JENKINS_OWF11_OSDC_PARIS20110924
JENKINS_OWF11_OSDC_PARIS20110924JENKINS_OWF11_OSDC_PARIS20110924
JENKINS_OWF11_OSDC_PARIS20110924Gregory Boissinot
 
CocoaPods par David Yang
CocoaPods par David YangCocoaPods par David Yang
CocoaPods par David YangIdean France
 
Android distribution cyanogen mod _ guillaume lesniak, student at miage nancy
Android distribution   cyanogen mod _ guillaume lesniak, student at miage nancyAndroid distribution   cyanogen mod _ guillaume lesniak, student at miage nancy
Android distribution cyanogen mod _ guillaume lesniak, student at miage nancyParis Open Source Summit
 
Gatekeeper par Guillaume Faure
Gatekeeper par Guillaume FaureGatekeeper par Guillaume Faure
Gatekeeper par Guillaume FaureCocoaHeads France
 

Tendances (17)

Présentation de Carthage par Simone Civetta
Présentation de Carthage par Simone CivettaPrésentation de Carthage par Simone Civetta
Présentation de Carthage par Simone Civetta
 
Multi-Threading Et Cocoa
Multi-Threading Et CocoaMulti-Threading Et Cocoa
Multi-Threading Et Cocoa
 
L'intégration continue avec Bitrise
L'intégration continue avec BitriseL'intégration continue avec Bitrise
L'intégration continue avec Bitrise
 
Nouveauté iOS 6
Nouveauté iOS 6Nouveauté iOS 6
Nouveauté iOS 6
 
Firebase par nicolas lehovetzki
Firebase par nicolas lehovetzkiFirebase par nicolas lehovetzki
Firebase par nicolas lehovetzki
 
Build automatique et distribution OTA avec Xcode 4.x et Jenkins
Build automatique et distribution OTA avec Xcode 4.x et JenkinsBuild automatique et distribution OTA avec Xcode 4.x et Jenkins
Build automatique et distribution OTA avec Xcode 4.x et Jenkins
 
CocoaHeads Toulouse - Xcode et les tests - Epitez
CocoaHeads Toulouse - Xcode et les tests - EpitezCocoaHeads Toulouse - Xcode et les tests - Epitez
CocoaHeads Toulouse - Xcode et les tests - Epitez
 
Introduction à Play Framework 2
Introduction à Play Framework 2Introduction à Play Framework 2
Introduction à Play Framework 2
 
App groups, faire communiquer ses applications {Cocoaheads Montpellier}
App groups, faire communiquer ses applications {Cocoaheads Montpellier}App groups, faire communiquer ses applications {Cocoaheads Montpellier}
App groups, faire communiquer ses applications {Cocoaheads Montpellier}
 
JENKINS_OWF11_OSDC_PARIS20110924
JENKINS_OWF11_OSDC_PARIS20110924JENKINS_OWF11_OSDC_PARIS20110924
JENKINS_OWF11_OSDC_PARIS20110924
 
CocoaPods par David Yang
CocoaPods par David YangCocoaPods par David Yang
CocoaPods par David Yang
 
1 tours horizon
1 tours horizon1 tours horizon
1 tours horizon
 
SDN OpenDaylight
SDN OpenDaylightSDN OpenDaylight
SDN OpenDaylight
 
Javaoop
JavaoopJavaoop
Javaoop
 
Android distribution cyanogen mod _ guillaume lesniak, student at miage nancy
Android distribution   cyanogen mod _ guillaume lesniak, student at miage nancyAndroid distribution   cyanogen mod _ guillaume lesniak, student at miage nancy
Android distribution cyanogen mod _ guillaume lesniak, student at miage nancy
 
Java vs .Net
Java vs .NetJava vs .Net
Java vs .Net
 
Gatekeeper par Guillaume Faure
Gatekeeper par Guillaume FaureGatekeeper par Guillaume Faure
Gatekeeper par Guillaume Faure
 

En vedette

SimPholders par Nicolas Lauquin
SimPholders par Nicolas LauquinSimPholders par Nicolas Lauquin
SimPholders par Nicolas LauquinCocoaHeads France
 
Cocoaheads Lille - Septembre 2013
Cocoaheads Lille - Septembre 2013Cocoaheads Lille - Septembre 2013
Cocoaheads Lille - Septembre 2013CocoaHeads France
 
Universal app par d’Olivier Collet
Universal app par d’Olivier ColletUniversal app par d’Olivier Collet
Universal app par d’Olivier ColletCocoaHeads France
 
Responsive design bookmarklet
Responsive design bookmarkletResponsive design bookmarklet
Responsive design bookmarkletCocoaHeads France
 
Sango Nini May 2015 FIN
Sango Nini May 2015 FINSango Nini May 2015 FIN
Sango Nini May 2015 FINIssa Soré
 

En vedette (6)

SimPholders par Nicolas Lauquin
SimPholders par Nicolas LauquinSimPholders par Nicolas Lauquin
SimPholders par Nicolas Lauquin
 
Cocoaheads Lille - Septembre 2013
Cocoaheads Lille - Septembre 2013Cocoaheads Lille - Septembre 2013
Cocoaheads Lille - Septembre 2013
 
Universal app par d’Olivier Collet
Universal app par d’Olivier ColletUniversal app par d’Olivier Collet
Universal app par d’Olivier Collet
 
Responsive design bookmarklet
Responsive design bookmarkletResponsive design bookmarklet
Responsive design bookmarklet
 
Sango Nini May 2015 FIN
Sango Nini May 2015 FINSango Nini May 2015 FIN
Sango Nini May 2015 FIN
 
Icon preview tool
Icon preview toolIcon preview tool
Icon preview tool
 

Similaire à Xcode 4.5

L’environnement du développement mobile iOS & Android
L’environnement du développement mobile iOS & AndroidL’environnement du développement mobile iOS & Android
L’environnement du développement mobile iOS & AndroidChris Saez
 
Xcode の一歩進んだ使い方 分散ビルド
Xcode の一歩進んだ使い方 分散ビルドXcode の一歩進んだ使い方 分散ビルド
Xcode の一歩進んだ使い方 分散ビルドnnkgw
 
Gui android eclipse
Gui android eclipseGui android eclipse
Gui android eclipseESPRIT
 
Presentation of Oracle database products for Beginners
Presentation of Oracle database products for BeginnersPresentation of Oracle database products for Beginners
Presentation of Oracle database products for Beginnersyazidaguedal
 
Presentation of Oracle database products
Presentation of Oracle database productsPresentation of Oracle database products
Presentation of Oracle database productsAlgiers Tech Meetup
 
AlterWay SolutionsLinux Outils Industrialisation PHP
AlterWay SolutionsLinux Outils Industrialisation PHPAlterWay SolutionsLinux Outils Industrialisation PHP
AlterWay SolutionsLinux Outils Industrialisation PHPjulien pauli
 
Introduction to iOS Development
Introduction to iOS DevelopmentIntroduction to iOS Development
Introduction to iOS DevelopmentNidhal Satouri
 
Alphorm.com Formation Android 5
Alphorm.com Formation Android 5Alphorm.com Formation Android 5
Alphorm.com Formation Android 5Alphorm
 
cours-android.pdf
cours-android.pdfcours-android.pdf
cours-android.pdfmed_univ78
 
XWiki : évolutions 2012 / 2013
XWiki : évolutions 2012 / 2013XWiki : évolutions 2012 / 2013
XWiki : évolutions 2012 / 2013XWiki
 
Evolutions XWiki 2012/2013
Evolutions XWiki 2012/2013Evolutions XWiki 2012/2013
Evolutions XWiki 2012/2013Vincent Massol
 
Java EE, un ami qui vous veut du bien
Java EE, un ami qui vous veut du bienJava EE, un ami qui vous veut du bien
Java EE, un ami qui vous veut du bienAntoine Sabot-Durand
 
Créer un Micro PaaS avec Docker et Maven
Créer un Micro PaaS avec Docker et MavenCréer un Micro PaaS avec Docker et Maven
Créer un Micro PaaS avec Docker et MavenAmico Fabien
 
Develop on Apache Ofbiz
Develop on Apache OfbizDevelop on Apache Ofbiz
Develop on Apache Ofbizbakhtout
 
Formation développement iOS - Tutoriel
Formation développement iOS - TutorielFormation développement iOS - Tutoriel
Formation développement iOS - TutorielHETIC
 
Tech Conf n°1 - Développement natif d'applications mobiles
Tech Conf n°1 - Développement natif d'applications mobilesTech Conf n°1 - Développement natif d'applications mobiles
Tech Conf n°1 - Développement natif d'applications mobilesMichael Laguerre
 
Hackathon Android Abidjan
Hackathon Android  AbidjanHackathon Android  Abidjan
Hackathon Android AbidjanBacely YoroBi
 
Panorama des solutions mobile hybrides
Panorama des solutions mobile hybridesPanorama des solutions mobile hybrides
Panorama des solutions mobile hybridesekino
 

Similaire à Xcode 4.5 (20)

L’environnement du développement mobile iOS & Android
L’environnement du développement mobile iOS & AndroidL’environnement du développement mobile iOS & Android
L’environnement du développement mobile iOS & Android
 
Xcode の一歩進んだ使い方 分散ビルド
Xcode の一歩進んだ使い方 分散ビルドXcode の一歩進んだ使い方 分散ビルド
Xcode の一歩進んだ使い方 分散ビルド
 
Gui android eclipse
Gui android eclipseGui android eclipse
Gui android eclipse
 
Presentation of Oracle database products for Beginners
Presentation of Oracle database products for BeginnersPresentation of Oracle database products for Beginners
Presentation of Oracle database products for Beginners
 
Presentation of Oracle database products
Presentation of Oracle database productsPresentation of Oracle database products
Presentation of Oracle database products
 
AlterWay SolutionsLinux Outils Industrialisation PHP
AlterWay SolutionsLinux Outils Industrialisation PHPAlterWay SolutionsLinux Outils Industrialisation PHP
AlterWay SolutionsLinux Outils Industrialisation PHP
 
Introduction to iOS Development
Introduction to iOS DevelopmentIntroduction to iOS Development
Introduction to iOS Development
 
Alphorm.com Formation Android 5
Alphorm.com Formation Android 5Alphorm.com Formation Android 5
Alphorm.com Formation Android 5
 
cours-android.pdf
cours-android.pdfcours-android.pdf
cours-android.pdf
 
XWiki : évolutions 2012 / 2013
XWiki : évolutions 2012 / 2013XWiki : évolutions 2012 / 2013
XWiki : évolutions 2012 / 2013
 
Evolutions XWiki 2012/2013
Evolutions XWiki 2012/2013Evolutions XWiki 2012/2013
Evolutions XWiki 2012/2013
 
Java EE, un ami qui vous veut du bien
Java EE, un ami qui vous veut du bienJava EE, un ami qui vous veut du bien
Java EE, un ami qui vous veut du bien
 
Créer un Micro PaaS avec Docker et Maven
Créer un Micro PaaS avec Docker et MavenCréer un Micro PaaS avec Docker et Maven
Créer un Micro PaaS avec Docker et Maven
 
Develop on Apache Ofbiz
Develop on Apache OfbizDevelop on Apache Ofbiz
Develop on Apache Ofbiz
 
Formation développement iOS - Tutoriel
Formation développement iOS - TutorielFormation développement iOS - Tutoriel
Formation développement iOS - Tutoriel
 
Développement web mobile avec IONIC 2
Développement web mobile avec IONIC 2Développement web mobile avec IONIC 2
Développement web mobile avec IONIC 2
 
Tech Conf n°1 - Développement natif d'applications mobiles
Tech Conf n°1 - Développement natif d'applications mobilesTech Conf n°1 - Développement natif d'applications mobiles
Tech Conf n°1 - Développement natif d'applications mobiles
 
2011 06-pres
2011 06-pres2011 06-pres
2011 06-pres
 
Hackathon Android Abidjan
Hackathon Android  AbidjanHackathon Android  Abidjan
Hackathon Android Abidjan
 
Panorama des solutions mobile hybrides
Panorama des solutions mobile hybridesPanorama des solutions mobile hybrides
Panorama des solutions mobile hybrides
 

Plus de CocoaHeads France

Plus de CocoaHeads France (20)

Mutation testing for a safer Future
Mutation testing for a safer FutureMutation testing for a safer Future
Mutation testing for a safer Future
 
iOS App Group for Debugging
iOS App Group for DebuggingiOS App Group for Debugging
iOS App Group for Debugging
 
Asynchronous swift
Asynchronous swiftAsynchronous swift
Asynchronous swift
 
Visual accessibility in iOS11
Visual accessibility in iOS11Visual accessibility in iOS11
Visual accessibility in iOS11
 
My script - One year of CocoaHeads
My script - One year of CocoaHeadsMy script - One year of CocoaHeads
My script - One year of CocoaHeads
 
Ui testing dealing with push notifications
Ui testing dealing with push notificationsUi testing dealing with push notifications
Ui testing dealing with push notifications
 
CONTINUOUS DELIVERY WITH FASTLANE
CONTINUOUS DELIVERY WITH FASTLANECONTINUOUS DELIVERY WITH FASTLANE
CONTINUOUS DELIVERY WITH FASTLANE
 
Super combinators
Super combinatorsSuper combinators
Super combinators
 
Design like a developer
Design like a developerDesign like a developer
Design like a developer
 
Handle the error
Handle the errorHandle the error
Handle the error
 
Quoi de neuf dans iOS 10.3
Quoi de neuf dans iOS 10.3Quoi de neuf dans iOS 10.3
Quoi de neuf dans iOS 10.3
 
IoT Best practices
 IoT Best practices IoT Best practices
IoT Best practices
 
SwiftyGPIO
SwiftyGPIOSwiftyGPIO
SwiftyGPIO
 
Présentation de HomeKit
Présentation de HomeKitPrésentation de HomeKit
Présentation de HomeKit
 
Programme MFI retour d'expérience
Programme MFI retour d'expérienceProgramme MFI retour d'expérience
Programme MFI retour d'expérience
 
How to communicate with Smart things?
How to communicate with Smart things?How to communicate with Smart things?
How to communicate with Smart things?
 
Build a lego app with CocoaPods
Build a lego app with CocoaPodsBuild a lego app with CocoaPods
Build a lego app with CocoaPods
 
Let's migrate to Swift 3.0
Let's migrate to Swift 3.0Let's migrate to Swift 3.0
Let's migrate to Swift 3.0
 
Project Entourage
Project EntourageProject Entourage
Project Entourage
 
What's new in iOS9
What's new in iOS9What's new in iOS9
What's new in iOS9
 

Xcode 4.5

  • 1.
  • 2. XCODE 4.5 Nicolas Lauquin - L’atelier du mobile 8 novembre 2012 @ CocoaHeads
  • 3.
  • 4. pense, crée et fait connaitre vos applications mobiles
  • 5. INTRODUCTION • Chronologie d’Xcode 4.x & fonctionnalités clefs • Améliorations d’Objective C • Démo • Les impacts & architectures supportées Note : présentation orientée iOS
  • 6. (R)EVOLUTION D’XCODE 4.0 MARS 2011 (PUBLIC RELEASE)
  • 7. (R)EVOLUTION D’XCODE 4.0 MARS 2011 (PUBLIC RELEASE) • Présentations «Hello Xcode 4» Cocoaheads du 14 avril 2011
  • 8. (R)EVOLUTION D’XCODE 4.0 MARS 2011 (PUBLIC RELEASE) • Présentations «Hello Xcode 4» Cocoaheads du 14 avril 2011 • «Un outil attendu (instable ? ;-))»
  • 9. (R)EVOLUTION D’XCODE 4.0 MARS 2011 (PUBLIC RELEASE) • Présentations «Hello Xcode 4» Cocoaheads du 14 avril 2011 • «Un outil attendu (instable ? ;-))» • «Une modification du processus de développement»
  • 10. (R)EVOLUTION D’XCODE 4.0 MARS 2011 (PUBLIC RELEASE) • Présentations «Hello Xcode 4» Cocoaheads du 14 avril 2011 • «Un outil attendu (instable ? ;-))» • «Une modification du processus de développement» • «Des fonctionnalités perdues & des évolutions»
  • 11. EVOLUTION XCODE 4.1 JUILLET 2011
  • 12. EVOLUTION XCODE 4.1 JUILLET 2011 • Support de Mac OS X LION (10.7)
  • 13. EVOLUTION XCODE 4.1 JUILLET 2011 • Support de Mac OS X LION (10.7) • Autolayout (Lion)
  • 14. EVOLUTION XCODE 4.1 JUILLET 2011 • Support de Mac OS X LION (10.7) • Autolayout (Lion) • OS X Application Sandbox (Lion)
  • 15. EVOLUTION XCODE 4.1 JUILLET 2011 • Support de Mac OS X LION (10.7) • Autolayout (Lion) • OS X Application Sandbox (Lion) • Default compiler LLVM-GCC 4.2
  • 16. EVOLUTION XCODE 4.1 JUILLET 2011 • Support de Mac OS X LION (10.7) • Autolayout (Lion) • OS X Application Sandbox (Lion) • Default compiler LLVM-GCC 4.2 • Custom Behaviors
  • 17. EVOLUTION XCODE 4.1 JUILLET 2011 • Support de Mac OS X LION (10.7) • Autolayout (Lion) • OS X Application Sandbox (Lion) • Default compiler LLVM-GCC 4.2 • Custom Behaviors • Git Remote Management
  • 18. EVOLUTION XCODE 4.2 OCTOBRE 2011
  • 19. EVOLUTION XCODE 4.2 OCTOBRE 2011 • Support iOS 5
  • 20. EVOLUTION XCODE 4.2 OCTOBRE 2011 • Support iOS 5 • ARC
  • 21. EVOLUTION XCODE 4.2 OCTOBRE 2011 • Support iOS 5 • ARC • Default compiler LLVM 3.0
  • 22. EVOLUTION XCODE 4.2 OCTOBRE 2011 • Support iOS 5 • ARC • Default compiler LLVM 3.0 • Storyboarding
  • 23. EVOLUTION XCODE 4.2 OCTOBRE 2011 • Support iOS 5 • ARC • Default compiler LLVM 3.0 • Storyboarding • Location Simulation
  • 24. EVOLUTION XCODE 4.2 OCTOBRE 2011 • Support iOS 5 • ARC • Default compiler LLVM 3.0 • Storyboarding • Location Simulation • Dernière version compatible Snow Leopard
  • 25. EVOLUTION XCODE 4.3 MARS 2012
  • 26. EVOLUTION XCODE 4.3 MARS 2012 • Une application “tout en un“ téléchargeable depuis le Mac AppStore. Bybye «/Developer»
  • 27. EVOLUTION XCODE 4.3 MARS 2012 • Une application “tout en un“ téléchargeable depuis le Mac AppStore. Bybye «/Developer» • Auto Layout est par défaut pour tout projet Cocoa
  • 28. EVOLUTION XCODE 4.3 MARS 2012 • Une application “tout en un“ téléchargeable depuis le Mac AppStore. Bybye «/Developer» • Auto Layout est par défaut pour tout projet Cocoa • Xcode 4.3.1 -> support iOS5.1
  • 29. EVOLUTION XCODE 4.3 MARS 2012 • Une application “tout en un“ téléchargeable depuis le Mac AppStore. Bybye «/Developer» • Auto Layout est par défaut pour tout projet Cocoa • Xcode 4.3.1 -> support iOS5.1 • Xcode 4.3.3 -> maj pour 10.7.4
  • 30. EVOLUTION XCODE 4.4 JUILLET 2012
  • 31. EVOLUTION XCODE 4.4 JUILLET 2012 • Support de Mountain Lion (10.8)
  • 32. EVOLUTION XCODE 4.4 JUILLET 2012 • Support de Mountain Lion (10.8) • Fonctionne sur Mac OS X Lion et Mountain Lion
  • 33. EVOLUTION XCODE 4.4 JUILLET 2012 • Support de Mountain Lion (10.8) • Fonctionne sur Mac OS X Lion et Mountain Lion • LLVM 4.0 Compiler màj (literals & subscription) - OS X
  • 34. EVOLUTION XCODE 4.4 JUILLET 2012 • Support de Mountain Lion (10.8) • Fonctionne sur Mac OS X Lion et Mountain Lion • LLVM 4.0 Compiler màj (literals & subscription) - OS X • Synthesize par défaut pour les properties
  • 35. EVOLUTION XCODE 4.4 JUILLET 2012 • Support de Mountain Lion (10.8) • Fonctionne sur Mac OS X Lion et Mountain Lion • LLVM 4.0 Compiler màj (literals & subscription) - OS X • Synthesize par défaut pour les properties • Amélioration de l’«analyzer» (common security mistakes in API and malloc usages)
  • 36. EVOLUTION XCODE 4.4 JUILLET 2012 • Support de Mountain Lion (10.8) • Fonctionne sur Mac OS X Lion et Mountain Lion • LLVM 4.0 Compiler màj (literals & subscription) - OS X • Synthesize par défaut pour les properties • Amélioration de l’«analyzer» (common security mistakes in API and malloc usages) • 4.4.1 -> avec correction de quelques bugs
  • 37. EVOLUTION XCODE 4.5 SEPTEMBRE 2012
  • 38. EVOLUTION XCODE 4.5 SEPTEMBRE 2012 • iOS6 support
  • 39. EVOLUTION XCODE 4.5 SEPTEMBRE 2012 • iOS6 support • Écran 4“ Retina de l’iPhone 5 & iPod
  • 40. EVOLUTION XCODE 4.5 SEPTEMBRE 2012 • iOS6 support • Écran 4“ Retina de l’iPhone 5 & iPod • Support des literals & subscripting pour iOS
  • 41. EVOLUTION XCODE 4.5 SEPTEMBRE 2012 • iOS6 support • Écran 4“ Retina de l’iPhone 5 & iPod • Support des literals & subscripting pour iOS • Autolayout pour iOS
  • 42. EVOLUTION XCODE 4.5 SEPTEMBRE 2012 • iOS6 support • Écran 4“ Retina de l’iPhone 5 & iPod • Support des literals & subscripting pour iOS • Autolayout pour iOS • LLDB is now the default debugger & LLDB supports hardware watchpoints on iOS devices
  • 43. EVOLUTION XCODE 4.5 SEPTEMBRE 2012 • iOS6 support • Écran 4“ Retina de l’iPhone 5 & iPod • Support des literals & subscripting pour iOS • Autolayout pour iOS • LLDB is now the default debugger & LLDB supports hardware watchpoints on iOS devices • Xcode 4.5.1 (octobre) -> bug fix & stabilité
  • 44. EVOLUTION XCODE 4.5 SEPTEMBRE 2012 • iOS6 support • Écran 4“ Retina de l’iPhone 5 & iPod • Support des literals & subscripting pour iOS • Autolayout pour iOS • LLDB is now the default debugger & LLDB supports hardware watchpoints on iOS devices • Xcode 4.5.1 (octobre) -> bug fix & stabilité • Xcode 4.5.2 (novembre) -> support de l’iPad mini & iPad écran retina
  • 45. AMÉLIORATION D’OBJECTIVE C SIMPLIFICATION : ORDRE DES MÉTHODES 1/5
  • 46. AMÉLIORATION D’OBJECTIVE C SIMPLIFICATION : ORDRE DES MÉTHODES 1/5 #import "CocoaheadsMeetingViewController.h" @implementation CocoaheadsMeetingViewController - (void)listeningThePresentation { [self carefully]; } - (void)carefully {} @end
  • 47. AMÉLIORATION D’OBJECTIVE C SIMPLIFICATION : ORDRE DES MÉTHODES 1/5 #import "CocoaheadsMeetingViewController.h" @implementation CocoaheadsMeetingViewController - (void)listeningThePresentation { [self carefully]; } - (void)carefully {} @end Avant Xcode 4.4 -> warning méthode non trouvée
  • 48. AMÉLIORATION D’OBJECTIVE C SIMPLIFICATION : ORDRE DES MÉTHODES 2/5
  • 49. AMÉLIORATION D’OBJECTIVE C SIMPLIFICATION : ORDRE DES MÉTHODES 2/5 Solution 1) Ordonnancer les méthodes #import "CocoaheadsMeetingViewController.h" @implementation CocoaheadsMeetingViewController - (void)carefully {} - (void)listeningThePresentation { [self carefully]; } @end
  • 50. AMÉLIORATION D’OBJECTIVE C SIMPLIFICATION : ORDRE DES MÉTHODES 2/5 Solution 1) Ordonnancer les méthodes #import "CocoaheadsMeetingViewController.h" @implementation CocoaheadsMeetingViewController - (void)carefully {} - (void)listeningThePresentation { [self carefully]; } @end Analyse : • ne fonctionne pas tout le temps • surtout une perte de temps
  • 51. AMÉLIORATION D’OBJECTIVE C SIMPLIFICATION : ORDRE DES MÉTHODES 3/5
  • 52. AMÉLIORATION D’OBJECTIVE C SIMPLIFICATION : ORDRE DES MÉTHODES 3/5 Solution 2) Classe publique
  • 53. AMÉLIORATION D’OBJECTIVE C SIMPLIFICATION : ORDRE DES MÉTHODES 3/5 Solution 2) Classe publique @interface CocoaheadsMeetingViewController : UIViewController - (void)carefully; @end @implementation CocoaheadsMeetingViewController - (void)listeningThePresentation { [self carefully]; } - (void)carefully {} @end
  • 54. AMÉLIORATION D’OBJECTIVE C SIMPLIFICATION : ORDRE DES MÉTHODES 3/5 Solution 2) Classe publique @interface CocoaheadsMeetingViewController : UIViewController - (void)carefully; @end @implementation CocoaheadsMeetingViewController - (void)listeningThePresentation { [self carefully]; } - (void)carefully {} @end Analyse : • mauvaise exposition/programmation
  • 55. AMÉLIORATION D’OBJECTIVE C SIMPLIFICATION : ORDRE DES MÉTHODES 4/5
  • 56. AMÉLIORATION D’OBJECTIVE C SIMPLIFICATION : ORDRE DES MÉTHODES 4/5 Solution 3) Extension de classe
  • 57. AMÉLIORATION D’OBJECTIVE C SIMPLIFICATION : ORDRE DES MÉTHODES 4/5 Solution 3) Extension de classe @interface CocoaheadsMeetingViewController () - (void)carefully; @end @implementation CocoaheadsMeetingViewController - (void)listeningThePresentation { [self carefully]; } - (void)carefully {}
  • 58. AMÉLIORATION D’OBJECTIVE C SIMPLIFICATION : ORDRE DES MÉTHODES 4/5 Solution 3) Extension de classe @interface CocoaheadsMeetingViewController () - (void)carefully; @end @implementation CocoaheadsMeetingViewController - (void)listeningThePresentation { [self carefully]; } - (void)carefully {} Analyse : • permet l’ajout de “property“ privées & méthodes accessibles depuis un nib • reste une perte de temps & un workaround
  • 59. AMÉLIORATION D’OBJECTIVE C SIMPLIFICATION : ORDRE DES MÉTHODES 5/5
  • 60. AMÉLIORATION D’OBJECTIVE C SIMPLIFICATION : ORDRE DES MÉTHODES 5/5 Solution 4)
  • 61. AMÉLIORATION D’OBJECTIVE C SIMPLIFICATION : ORDRE DES MÉTHODES 5/5 Solution 4) Ça fonctionne tout simplement dans Xcode 4.5
  • 62. AMÉLIORATION D’OBJECTIVE C AMÉLIORATION : ENUM Enum with fixed underlying type typedef enum CocoaheadsPublicType : NSUInteger { CocoaheadsPublicDevelopper, CocoaheadsPublicDesigner, CocoaheadsPublicPM } CocoaheadsPublicType; Analyse : • enumération typées • Warning type checking • Warning handeling all enums values
  • 63. AMÉLIORATION D’OBJECTIVE C SIMPLIFICATION : PROPERTIES
  • 64. AMÉLIORATION D’OBJECTIVE C SIMPLIFICATION : PROPERTIES @interface PropertyObject : NSObject @property (readwrite, strong) NSString * name; @end @implementation PropertyObject @end Analyse : •“synthesize“ par défaut •chaque accesseur est généré si non fourni
  • 65. AMÉLIORATION D’OBJECTIVE C SIMPLIFICATION : PROPERTIES @interface PropertyObject : NSObject @property (readwrite, strong) NSString * name; @end @implementation PropertyObject @synthesize name = _name;// generated by default @end Analyse : •“synthesize“ par défaut •chaque accesseur est généré si non fourni •variable d’instance généré par défaut “_variable“ si non fournie
  • 66. AMÉLIORATION D’OBJECTIVE C SIMPLIFICATION : PROPERTIES @interface PropertyObject : NSObject @property (readwrite, strong) NSString * name; @end @implementation PropertyObject @synthesize name = _name;// generated by default @end Analyse : •“synthesize“ par défaut •chaque accesseur est généré si non fourni •variable d’instance généré par défaut “_variable“ si non fournie •compatibilité :
  • 67. LITERALS 1/6 INTRO
  • 68. LITERALS 1/6 INTRO • Code allégé
  • 69. LITERALS 1/6 INTRO • Code allégé • Gain de temps
  • 70. LITERALS 1/6 INTRO • Code allégé • Gain de temps • “boxing“ : primitive value to object. (Necessary for Foundation collections)
  • 71. LITERALS 2/6 NSNUMBER - BOXED NUMBER
  • 72. LITERALS 2/6 NSNUMBER - BOXED NUMBER • [NSNumber numberWithInt:42];
  • 73. LITERALS 2/6 NSNUMBER - BOXED NUMBER • [NSNumber numberWithInt:42]; -> @42
  • 74. LITERALS 2/6 NSNUMBER - BOXED NUMBER • [NSNumber numberWithInt:42]; -> @42 • [NSNumber numberWithBool:YES];
  • 75. LITERALS 2/6 NSNUMBER - BOXED NUMBER • [NSNumber numberWithInt:42]; -> @42 • [NSNumber numberWithBool:YES]; -> @YES
  • 76. LITERALS 2/6 NSNUMBER - BOXED NUMBER • [NSNumber numberWithInt:42]; -> @42 • [NSNumber numberWithBool:YES]; -> @YES • [NSNumber numberWithFloat:3.141592654F];
  • 77. LITERALS 2/6 NSNUMBER - BOXED NUMBER • [NSNumber numberWithInt:42]; -> @42 • [NSNumber numberWithBool:YES]; -> @YES • [NSNumber numberWithFloat:3.141592654F]; -> @3.141592654F;
  • 79. LITERALS 3/6 BOXED EXPRESSIONS Syntaxe : @( expression )
  • 80. LITERALS 3/6 BOXED EXPRESSIONS Syntaxe : @( expression ) • 1) Numbers
  • 81. LITERALS 3/6 BOXED EXPRESSIONS Syntaxe : @( expression ) • 1) Numbers • NSNumber *piOverTwo = @(M_PI / 2); // [NSNumber numberWithDouble:(M_PI / 2)]
  • 82. LITERALS 3/6 BOXED EXPRESSIONS Syntaxe : @( expression ) • 1) Numbers • NSNumber *piOverTwo = @(M_PI / 2); // [NSNumber numberWithDouble:(M_PI / 2)] • 2) Enumerated types : • typedef enum { Red, Green, Blue } Color; • NSNumber *favoriteColor = @(Green); // [NSNumber numberWithInt:((int)Green)]
  • 83. LITERALS 3/6 BOXED EXPRESSIONS Syntaxe : @( expression ) • 1) Numbers • NSNumber *piOverTwo = @(M_PI / 2); // [NSNumber numberWithDouble:(M_PI / 2)] • 2) Enumerated types : • typedef enum { Red, Green, Blue } Color; • NSNumber *favoriteColor = @(Green); // [NSNumber numberWithInt:((int)Green)] • 3) Strings : • NSString *path = @(getenv("PATH")); // [NSString stringWithUTF8String:(getenv("PATH"))] • NSArray *pathComponents = [path componentsSeparatedByString:@":"];
  • 84. LITERALS 4/6 DICTIONARY
  • 85. LITERALS 4/6 DICTIONARY • NSDictionnary *dict = [NSDictionnary dictionnaryWithObjectsAndKeys:{"val1", "key1", "val2", "key2"};
  • 86. LITERALS 4/6 DICTIONARY • NSDictionnary *dict = [NSDictionnary dictionnaryWithObjectsAndKeys:{"val1", "key1", "val2", "key2"}; • NSDictionnary *dict = @{ @"key1":@"val1", @"key2":@"val2" };
  • 87. LITERALS 4/6 DICTIONARY • NSDictionnary *dict = [NSDictionnary dictionnaryWithObjectsAndKeys:{"val1", "key1", "val2", "key2"}; • NSDictionnary *dict = @{ @"key1":@"val1", @"key2":@"val2" }; • Syntaxe @{key : obj, … }
  • 88. LITERALS 4/6 DICTIONARY • NSDictionnary *dict = [NSDictionnary dictionnaryWithObjectsAndKeys:{"val1", "key1", "val2", "key2"}; • NSDictionnary *dict = @{ @"key1":@"val1", @"key2":@"val2" }; • Syntaxe @{key : obj, … } • -> Attention cohérence
  • 89. LITERALS 5/6 ARRAY
  • 90. LITERALS 5/6 ARRAY • NSArray *ar = [NSArray arrayWithObjects:@"titi", @"toto", nil];
  • 91. LITERALS 5/6 ARRAY • NSArray *ar = [NSArray arrayWithObjects:@"titi", @"toto", nil]; • NSArray *ar = @[@"titi", @"toto"];
  • 92. LITERALS 5/6 ARRAY • NSArray *ar = [NSArray arrayWithObjects:@"titi", @"toto", nil]; • NSArray *ar = @[@"titi", @"toto"]; • Syntaxe : @[obj1, obj2]
  • 93. LITERALS 5/6 CONTAINER
  • 94. LITERALS 5/6 CONTAINER • Container sont “immutable“
  • 95. LITERALS 5/6 CONTAINER • Container sont “immutable“ • Utiliser : “-mutableCopy“ NSMutableArray * numberArray = [@[ @"one", @"two", @"three"]mutableCopy];
  • 96. LITERALS 5/6 CONTAINER • Container sont “immutable“ • Utiliser : “-mutableCopy“ NSMutableArray * numberArray = [@[ @"one", @"two", @"three"]mutableCopy]; • Usage static : «Initializer element is not a compile-time constant»
  • 97. LITERALS 5/6 CONTAINER • Container sont “immutable“ • Utiliser : “-mutableCopy“ NSMutableArray * numberArray = [@[ @"one", @"two", @"three"]mutableCopy]; • Usage static : «Initializer element is not a compile-time constant» • workaround : affecter la valeur dans la méthode “+initialize“ de votre classe
  • 98. OBJECT SUBSCRIPTING 1/3 Array (index subscripting) NSMutableArray *array = ...; NSUInteger idx = ...; id newObject = ...; id oldObject = array[idx]; array[idx] = newObject;! ! // replace oldObject with newObject
  • 99. OBJECT SUBSCRIPTING 1/3 Array (index subscripting) NSMutableArray *array = ...; NSUInteger idx = ...; id newObject = ...; id oldObject = array[idx]; array[idx] = newObject;! ! // replace oldObject with newObject Dictionnary (key subscripting) NSMutableDictionary *dictionary = ...; NSString *key = ...; oldObject = dictionary[key]; dictionary[key] = newObject;!// replace oldObject with newObject
  • 100. OBJECT SUBSCRIPTING 2/3 DÉCRYPTAGE
  • 101. OBJECT SUBSCRIPTING 2/3 DÉCRYPTAGE Array id value = array[idx]; -> id value = [array objectAtIndexedSubscript:idx]; array[idx] = object; -> [array setObject:object atIndexedSubscript:idx]; idx : integral type object : object pointer
  • 102. OBJECT SUBSCRIPTING 2/3 DÉCRYPTAGE Array id value = array[idx]; -> id value = [array objectAtIndexedSubscript:idx]; array[idx] = object; -> [array setObject:object atIndexedSubscript:idx]; idx : integral type object : object pointer Dictionnary id value = dict[key]; -> id value = [dict objectForKeyedSubscript:key]; dict[key] = object; -> [dict setObject:object forKeyedSubscript:key]; key & object : object pointer
  • 103. OBJECT SUBSCRIPTING 3/3 VOTRE CLASSE “SUBSCRIPTABLE“
  • 104. OBJECT SUBSCRIPTING 3/3 VOTRE CLASSE “SUBSCRIPTABLE“ @interface MyCocoaheadsList : NSObject - (User *) objectAtIndexedSubscript:(NSUInteger)idx; - (void) setObject:(User*) user atIndexedSubcript:(NSUInteger)idx; @end @implementation MyCocoaheadsList { NSMutableArray * myCocoaheadsList; } - (User *) objectAtIndexedSubscript:(NSUInteger)idx{ return (User *) myCocoaheadsList[idx]; } - (void) setObject:(User*) user atIndexedSubcript:(NSUInteger)idx { myCocoaheadsList[idx] = user; } @end Appel via : MyCocoaheadsList * mycocoaheadsList = [[MyCocoaheadsList alloc] init]; User * firstUser = mycocoaheadsList[0];
  • 105. ASTUCES DÉMO • Find and Search indexation de symbols & Insert pattern • Callers or Callees • Tag Fixme & TODO • Refactor -> convert to modern Objectiv C
  • 107. XCODE 4.5 ARCHITECTURES SUPPORTÉES & IMPACTS 1/2 • Simulateur 4.3 disparu sous Mountain Lion
  • 108. XCODE 4.5 ARCHITECTURES SUPPORTÉES & IMPACTS 1/2 • Simulateur 4.3 disparu sous Mountain Lion • Abandon de armv6 (iPhone 1, iPod touch 2G (2007), iPhone 3G)
  • 109. XCODE 4.5 ARCHITECTURES SUPPORTÉES & IMPACTS 1/2 • Simulateur 4.3 disparu sous Mountain Lion • Abandon de armv6 (iPhone 1, iPod touch 2G (2007), iPhone 3G) • iOS 4.3 minimum supporté. • => solution simple de tester ???
  • 110.
  • 111. BIBLIOGRAPHIE • Details sur literals & object subscription : http://clang.llvm.org/ docs/ObjectiveCLiterals.html • WWDC 2012 session 405 : Modern Objective C (vidéo) • Xcode release : https://developer.apple.com/library/mac/#releasenotes/ DeveloperTools/RN-Xcode/_index.html • What’s new in Xcode : http://developer.apple.com/library/ios/#documentation/ DeveloperTools/Conceptual/WhatsNewXcode/00-Introduction/Introduction.html • http://en.wikipedia.org/wiki/Xcode#Major_features

Notes de l'éditeur

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. Amélioration du rechercher/remplacer (Pattern & Appelant et appelé & indexation de symbole)\n Tag Fixme & TODO & #pragma mark listés dans les méthodes\n
  26. Amélioration du rechercher/remplacer (Pattern & Appelant et appelé & indexation de symbole)\n Tag Fixme & TODO & #pragma mark listés dans les méthodes\n
  27. Amélioration du rechercher/remplacer (Pattern & Appelant et appelé & indexation de symbole)\n Tag Fixme & TODO & #pragma mark listés dans les méthodes\n
  28. Amélioration du rechercher/remplacer (Pattern & Appelant et appelé & indexation de symbole)\n Tag Fixme & TODO & #pragma mark listés dans les méthodes\n
  29. Amélioration du rechercher/remplacer (Pattern & Appelant et appelé & indexation de symbole)\n Tag Fixme & TODO & #pragma mark listés dans les méthodes\n
  30. Amélioration du rechercher/remplacer (Pattern & Appelant et appelé & indexation de symbole)\n Tag Fixme & TODO & #pragma mark listés dans les méthodes\n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n
  59. \n
  60. \n
  61. \n
  62. \n
  63. NSNumber *fortyTwo = @42; -> [NSNumber numberWithInt:42]\n NSNumber *fortyTwoUnsigned = @42U; -> [NSNumber numberWithUnsignedInt:42U]\n NSNumber *fortyTwoLong = @42L; -> [NSNumber numberWithLong:42L]\n NSNumber *fortyTwoLongLong = @42LL; -> [NSNumber numberWithLongLong:42LL]\n NSNumber *piFloat = @3.141592654F; -> [NSNumber numberWithFloat:3.141592654F]\n NSNumber *piDouble = @3.1415926535; -> [NSNumber numberWithDouble:3.1415926535]\n
  64. NSNumber *fortyTwo = @42; -> [NSNumber numberWithInt:42]\n NSNumber *fortyTwoUnsigned = @42U; -> [NSNumber numberWithUnsignedInt:42U]\n NSNumber *fortyTwoLong = @42L; -> [NSNumber numberWithLong:42L]\n NSNumber *fortyTwoLongLong = @42LL; -> [NSNumber numberWithLongLong:42LL]\n NSNumber *piFloat = @3.141592654F; -> [NSNumber numberWithFloat:3.141592654F]\n NSNumber *piDouble = @3.1415926535; -> [NSNumber numberWithDouble:3.1415926535]\n
  65. NSNumber *fortyTwo = @42; -> [NSNumber numberWithInt:42]\n NSNumber *fortyTwoUnsigned = @42U; -> [NSNumber numberWithUnsignedInt:42U]\n NSNumber *fortyTwoLong = @42L; -> [NSNumber numberWithLong:42L]\n NSNumber *fortyTwoLongLong = @42LL; -> [NSNumber numberWithLongLong:42LL]\n NSNumber *piFloat = @3.141592654F; -> [NSNumber numberWithFloat:3.141592654F]\n NSNumber *piDouble = @3.1415926535; -> [NSNumber numberWithDouble:3.1415926535]\n
  66. NSNumber *fortyTwo = @42; -> [NSNumber numberWithInt:42]\n NSNumber *fortyTwoUnsigned = @42U; -> [NSNumber numberWithUnsignedInt:42U]\n NSNumber *fortyTwoLong = @42L; -> [NSNumber numberWithLong:42L]\n NSNumber *fortyTwoLongLong = @42LL; -> [NSNumber numberWithLongLong:42LL]\n NSNumber *piFloat = @3.141592654F; -> [NSNumber numberWithFloat:3.141592654F]\n NSNumber *piDouble = @3.1415926535; -> [NSNumber numberWithDouble:3.1415926535]\n
  67. NSNumber *fortyTwo = @42; -> [NSNumber numberWithInt:42]\n NSNumber *fortyTwoUnsigned = @42U; -> [NSNumber numberWithUnsignedInt:42U]\n NSNumber *fortyTwoLong = @42L; -> [NSNumber numberWithLong:42L]\n NSNumber *fortyTwoLongLong = @42LL; -> [NSNumber numberWithLongLong:42LL]\n NSNumber *piFloat = @3.141592654F; -> [NSNumber numberWithFloat:3.141592654F]\n NSNumber *piDouble = @3.1415926535; -> [NSNumber numberWithDouble:3.1415926535]\n
  68. NSNumber *fortyTwo = @42; -> [NSNumber numberWithInt:42]\n NSNumber *fortyTwoUnsigned = @42U; -> [NSNumber numberWithUnsignedInt:42U]\n NSNumber *fortyTwoLong = @42L; -> [NSNumber numberWithLong:42L]\n NSNumber *fortyTwoLongLong = @42LL; -> [NSNumber numberWithLongLong:42LL]\n NSNumber *piFloat = @3.141592654F; -> [NSNumber numberWithFloat:3.141592654F]\n NSNumber *piDouble = @3.1415926535; -> [NSNumber numberWithDouble:3.1415926535]\n
  69. When the type of the parenthesized expression is (char *) or (const char *), the result of the boxed expression is a pointer to an NSString object containing equivalent character data, which is assumed to be '\\0'-terminated and UTF-8 encoded.\n(use the fixed underlying type)\n
  70. When the type of the parenthesized expression is (char *) or (const char *), the result of the boxed expression is a pointer to an NSString object containing equivalent character data, which is assumed to be '\\0'-terminated and UTF-8 encoded.\n(use the fixed underlying type)\n
  71. When the type of the parenthesized expression is (char *) or (const char *), the result of the boxed expression is a pointer to an NSString object containing equivalent character data, which is assumed to be '\\0'-terminated and UTF-8 encoded.\n(use the fixed underlying type)\n
  72. When the type of the parenthesized expression is (char *) or (const char *), the result of the boxed expression is a pointer to an NSString object containing equivalent character data, which is assumed to be '\\0'-terminated and UTF-8 encoded.\n(use the fixed underlying type)\n
  73. When the type of the parenthesized expression is (char *) or (const char *), the result of the boxed expression is a pointer to an NSString object containing equivalent character data, which is assumed to be '\\0'-terminated and UTF-8 encoded.\n(use the fixed underlying type)\n
  74. \n
  75. \n
  76. \n
  77. \n
  78. \n
  79. \n
  80. \n
  81. \n
  82. \n
  83. \n
  84. \n
  85. \n
  86. \n
  87. \n
  88. \n
  89. \n
  90. \n
  91. \n
  92. \n
  93. \n
  94. \n
  95. \n
  96. \n
  97. \n
  98. \n
  99. \n
  100. \n
  101. \n