Your SlideShare is downloading. ×
0
What’s new in iOS4
    Paul Ardeleanu
       @pardel




                     SkillsMatter - August 12th 2010
SkillsMatter - August 12th 2010




What was missing?

Multitasking
Flash




                                   http://pa...
SkillsMatter - August 12th 2010




What’s new in iOS4?

Multitasking
Local Notifications
iAd
Game Center
New Frameworks & ...
SkillsMatter - August 12th 2010




1. Multitasking



                                 http://pardel.net
SkillsMatter - August 12th 2010




1. Multitasking   ... of a different kind




                                        ...
SkillsMatter - August 12th 2010




Multitasking




                              http://pardel.net
SkillsMatter - August 12th 2010




Multitasking

 Fast app switching
 Task Completion
 Background Audio
 Navigation & Loc...
SkillsMatter - August 12th 2010




Fast App Switching

    Running




    Not running


                                ...
SkillsMatter - August 12th 2010




Fast App Switching
                  Active
    Running
                  Inactive



...
SkillsMatter - August 12th 2010




Fast App Switching
                  Active
    Running                  Running
     ...
SkillsMatter - August 12th 2010




Fast App Switching
                   Active
    Running                   Running
   ...
SkillsMatter - August 12th 2010




App Life Cycle
     Active
                       Foreground



     Inactive




    ...
SkillsMatter - August 12th 2010




App Life Cycle
     Active
                       Foreground   didFinishLaunchingWithO...
SkillsMatter - August 12th 2010




App Life Cycle
     Active
                       Foreground   didFinishLaunchingWithO...
SkillsMatter - August 12th 2010




App Life Cycle
     Active
                       Foreground   didFinishLaunchingWithO...
SkillsMatter - August 12th 2010




App Life Cycle
     Active
                       Foreground   didFinishLaunchingWithO...
SkillsMatter - August 12th 2010




App Life Cycle
     Active
                       Foreground   didFinishLaunchingWithO...
SkillsMatter - August 12th 2010




App Life Cycle
     Active
                       Foreground   didFinishLaunchingWithO...
SkillsMatter - August 12th 2010




App Life Cycle
     Active
                       Foreground   didFinishLaunchingWithO...
SkillsMatter - August 12th 2010




App Life Cycle
     Active
                       Foreground   didFinishLaunchingWithO...
SkillsMatter - August 12th 2010




App Life Cycle
     Active
                       Foreground   didFinishLaunchingWithO...
SkillsMatter - August 12th 2010




App Life Cycle
     Active
                       Foreground   didFinishLaunchingWithO...
SkillsMatter - August 12th 2010




App Life Cycle
     Active
                       Foreground   didFinishLaunchingWithO...
SkillsMatter - August 12th 2010




App Life Cycle
     Active
                       Foreground   didFinishLaunchingWithO...
SkillsMatter - August 12th 2010




App Life Cycle
     Active
                       Foreground   didFinishLaunchingWithO...
SkillsMatter - August 12th 2010




UIApplicationDelegate Callbacks
     //
     //   MyAppDelegate.m
     //


     - (vo...
SkillsMatter - August 12th 2010




UIApplicationDelegate Callbacks
     //
     //   MyAppDelegate.m
     //


     - (vo...
SkillsMatter - August 12th 2010




UIApplication
typedef enum {
	 UIApplicationStateActive,
	 UIApplicationStateInactive,...
SkillsMatter - August 12th 2010




Best practices
     Active
                       Foreground



     Inactive         ...
SkillsMatter - August 12th 2010




Best practices
     Active
                       Foreground



     Inactive         ...
SkillsMatter - August 12th 2010




Best practices
     Active
                       Foreground



     Inactive         ...
SkillsMatter - August 12th 2010




No Multitasking




         UIApplicationExitsOnSuspend
                             ...
SkillsMatter - August 12th 2010




App Life Cycle
     Active
                       Foreground



     Inactive




    ...
SkillsMatter - August 12th 2010




App Life Cycle
     Active
                       Foreground



     Inactive




    ...
SkillsMatter - August 12th 2010




App Life Cycle
     Active
                       Foreground



     Inactive




    ...
SkillsMatter - August 12th 2010




App Life Cycle
     Active
                       Foreground



     Inactive




    ...
SkillsMatter - August 12th 2010




App Life Cycle
     Active
                       Foreground



     Inactive




    ...
SkillsMatter - August 12th 2010




Background Services

Task completion
Background Audio
VoIP
Background Location




   ...
SkillsMatter - August 12th 2010




Task completion
    Active
             Foreground



  Inactive




                 ...
SkillsMatter - August 12th 2010




Task completion
    Active
             Foreground



  Inactive




                 ...
SkillsMatter - August 12th 2010




Task completion
    Active
             Foreground



  Inactive




                 ...
SkillsMatter - August 12th 2010




Task completion
    Active
             Foreground



  Inactive




                 ...
SkillsMatter - August 12th 2010




Task completion
    Active
             Foreground



  Inactive




                 ...
SkillsMatter - August 12th 2010




Task completion
UIApplication
  - (UIBackgroundTaskIdentifier)beginBackgroundTaskWithE...
SkillsMatter - August 12th 2010




Task completion
UIApplication
  - (UIBackgroundTaskIdentifier)beginBackgroundTaskWithE...
SkillsMatter - August 12th 2010




Task completion
UIApplication
  - (UIBackgroundTaskIdentifier)beginBackgroundTaskWithE...
SkillsMatter - August 12th 2010




Background Services

Task completion
Background Audio
VoIP
Background Location




   ...
SkillsMatter - August 12th 2010




Background Services




                                     http://pardel.net
SkillsMatter - August 12th 2010




App Life Cycle
    Active
             Foreground



  Inactive




                  ...
SkillsMatter - August 12th 2010




App Life Cycle
    Active
             Foreground



  Inactive




                  ...
SkillsMatter - August 12th 2010




App Life Cycle
                                  AVAudioSession


    Active
         ...
SkillsMatter - August 12th 2010




App Life Cycle
                                  AVAudioSession


    Active
         ...
SkillsMatter - August 12th 2010




App Life Cycle
                                            AVAudioSession


    Active...
SkillsMatter - August 12th 2010




App Life Cycle
                                            AVAudioSession


    Active...
SkillsMatter - August 12th 2010




App Life Cycle
                                             AVAudioSession


    Activ...
SkillsMatter - August 12th 2010




App Life Cycle
                                                 AVAudioSession


    A...
SkillsMatter - August 12th 2010




Background Location Services


Turn by turn directions

Location tracking
  ✦   Signifi...
SkillsMatter - August 12th 2010




Turn by turn directions
 locationManager = [[CLLocationManager alloc] init];
 location...
SkillsMatter - August 12th 2010




Turn by turn directions
 locationManager = [[CLLocationManager alloc] init];
 location...
SkillsMatter - August 12th 2010




Turn by turn directions
 locationManager = [[CLLocationManager alloc] init];
 location...
SkillsMatter - August 12th 2010




Location tracking
a) Significant location changing




                                ...
SkillsMatter - August 12th 2010




Location tracking
a) Significant location changing




                                ...
SkillsMatter - August 12th 2010




Location tracking
a) Significant location changing




                                ...
SkillsMatter - August 12th 2010




Location tracking
a) Significant location changing




                                ...
SkillsMatter - August 12th 2010




Location tracking
a) Significant location changing




   locationManager = [[CLLocatio...
SkillsMatter - August 12th 2010




Location tracking
a) Significant location changing




   locationManager = [[CLLocatio...
SkillsMatter - August 12th 2010




Location tracking
b) Region monitoring (iPhone4 only)




                            ...
SkillsMatter - August 12th 2010




Location tracking
b) Region monitoring (iPhone4 only)




                            ...
SkillsMatter - August 12th 2010




Location tracking
b) Region monitoring (iPhone4 only)




 - (void)locationManager:(CL...
SkillsMatter - August 12th 2010




Location tracking
b) Region monitoring (iPhone4 only)
locationManager = [[CLLocationMa...
SkillsMatter - August 12th 2010




Multitasking




                              http://pardel.net
SkillsMatter - August 12th 2010




Multitasking

 Fast app switching
 Task Completion
 Background Audio
 Navigation & Loc...
SkillsMatter - August 12th 2010




2. Local Notifications



                                       http://pardel.net
SkillsMatter - August 12th 2010




Local notifications
// check if the local notification class exists
Class cls = NSClass...
SkillsMatter - August 12th 2010




Local notifications
// check if the local notification class exists
Class cls = NSClass...
SkillsMatter - August 12th 2010




3. iAd



                        http://pardel.net
SkillsMatter - August 12th 2010




iAd


Nov 09 - Google acquires AdMob for $750 million in
stock
Jan 10 - Apple acquires...
SkillsMatter - August 12th 2010




iAd
      CPM + CPC = eCPM




                                        http://pardel.n...
SkillsMatter - August 12th 2010




iAd
      CPM + CPC = eCPM




                                        http://pardel.n...
SkillsMatter - August 12th 2010




iAd
      CPM + CPC = eCPM




         60% revenues
                                 ...
SkillsMatter - August 12th 2010




iAd




                     http://pardel.net
SkillsMatter - August 12th 2010




iAd.framework
               @property(nonatomic, copy) NSSet *requiredContentSizeIden...
SkillsMatter - August 12th 2010




iAd.framework
               @property(nonatomic, copy) NSSet *requiredContentSizeIden...
SkillsMatter - August 12th 2010




iAd.framework
               @property(nonatomic, copy) NSSet *requiredContentSizeIden...
SkillsMatter - August 12th 2010




iAd.framework
               @property(nonatomic, copy) NSSet *requiredContentSizeIden...
SkillsMatter - August 12th 2010




  iAd.framework
   ADBannerView




                   ADBannerViewDelegate


- (void)...
SkillsMatter - August 12th 2010




  iAd.framework
   ADBannerView




                   ADBannerViewDelegate


- (void)...
SkillsMatter - August 12th 2010




iAd JS
         HTML5 + CSS3


         ✦   Banner
         ✦   Main advertising scree...
SkillsMatter - August 12th 2010




4. Game Center



                                http://pardel.net
SkillsMatter - August 12th 2010




Game Center

       ✦ Beta

       ✦ Socialgaming network
       ✦ Leaderboards & Achi...
SkillsMatter - August 12th 2010




5. New Frameworks & APIs



                                   http://pardel.net
SkillsMatter - August 12th 2010




Block Objects




                               http://pardel.net
SkillsMatter - August 12th 2010




Block Objects
 self.bgTaskId = [app beginBackgroundTaskWithExpirationHandler:^{
     [...
SkillsMatter - August 12th 2010




Block Objects
 self.bgTaskId = [app beginBackgroundTaskWithExpirationHandler:^{
     [...
SkillsMatter - August 12th 2010




Blocks




                        http://pardel.net
SkillsMatter - August 12th 2010




Blocks
 returnType (^myBlockName) (argumentType) = ^(argumentType argumentName)
 {
   ...
SkillsMatter - August 12th 2010




Blocks
 returnType (^myBlockName) (argumentType) = ^(argumentType argumentName)
 {
   ...
SkillsMatter - August 12th 2010




Blocks
 returnType (^myBlockName) (argumentType) = ^(argumentType argumentName)
 {
   ...
SkillsMatter - August 12th 2010




Blocks
 returnType (^myBlockName) (argumentType) = ^(argumentType argumentName)
 {
   ...
SkillsMatter - August 12th 2010




New Frameworks

Quick Look
Event Kit
Core Motion
Core Telephony
Data Protection



   ...
SkillsMatter - August 12th 2010




Event Kit




                           http://pardel.net
SkillsMatter - August 12th 2010




Event Kit
  EKEventStore
@property(nonatomic, readonly) NSArray *calendars
@property(n...
SkillsMatter - August 12th 2010




Event Kit
  EKEventStore
@property(nonatomic, readonly) NSArray *calendars
@property(n...
SkillsMatter - August 12th 2010




Event Kit
  EKEventStore
@property(nonatomic, readonly) NSArray *calendars
@property(n...
SkillsMatter - August 12th 2010




Event Kit
  EKEventStore
@property(nonatomic, readonly) NSArray *calendars
@property(n...
SkillsMatter - August 12th 2010




New API’s

Block related methods
  - (void)enumerateObjectsUsingBlock:(void (^)(id obj...
SkillsMatter - August 12th 2010




iPhone & iPad Application
Development Course
 Sep 29th to Oct 1st
 http://skillsmatter...
SkillsMatter - August 12th 2010




iPhone & iPad Application
Development Course
 Sep 29th to Oct 1st
 http://skillsmatter...
SkillsMatter - August 12th 2010




PROGRAMME

Day 1: Introduction to iOS development I             Day 3: Advance Feature...
SkillsMatter - August 12th 2010




Thank you


       http://pardel.net
       http://twitter.com/pardel




            ...
Upcoming SlideShare
Loading in...5
×

In The Brain of Paul Ardeleanu: What's new in iOS 4

2,840

Published on

Skills Matter Presentation: "What's new in iOS 4"

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,840
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
38
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Transcript of "In The Brain of Paul Ardeleanu: What's new in iOS 4"

  1. 1. What’s new in iOS4 Paul Ardeleanu @pardel SkillsMatter - August 12th 2010
  2. 2. SkillsMatter - August 12th 2010 What was missing? Multitasking Flash http://pardel.net
  3. 3. SkillsMatter - August 12th 2010 What’s new in iOS4? Multitasking Local Notifications iAd Game Center New Frameworks & APIs http://pardel.net
  4. 4. SkillsMatter - August 12th 2010 1. Multitasking http://pardel.net
  5. 5. SkillsMatter - August 12th 2010 1. Multitasking ... of a different kind http://pardel.net
  6. 6. SkillsMatter - August 12th 2010 Multitasking http://pardel.net
  7. 7. SkillsMatter - August 12th 2010 Multitasking Fast app switching Task Completion Background Audio Navigation & Location tracking VoIP http://pardel.net
  8. 8. SkillsMatter - August 12th 2010 Fast App Switching Running Not running http://pardel.net
  9. 9. SkillsMatter - August 12th 2010 Fast App Switching Active Running Inactive Not running http://pardel.net
  10. 10. SkillsMatter - August 12th 2010 Fast App Switching Active Running Running Inactive Background Not running Not running http://pardel.net
  11. 11. SkillsMatter - August 12th 2010 Fast App Switching Active Running Running Inactive Running Background Suspended Not running Not running http://pardel.net
  12. 12. SkillsMatter - August 12th 2010 App Life Cycle Active Foreground Inactive Not running http://pardel.net
  13. 13. SkillsMatter - August 12th 2010 App Life Cycle Active Foreground didFinishLaunchingWithOptions: Inactive Not running http://pardel.net
  14. 14. SkillsMatter - August 12th 2010 App Life Cycle Active Foreground didFinishLaunchingWithOptions: applicationDidBecomeActive: Inactive Not running http://pardel.net
  15. 15. SkillsMatter - August 12th 2010 App Life Cycle Active Foreground didFinishLaunchingWithOptions: applicationDidBecomeActive: applicationDidResignActive: Inactive Not running http://pardel.net
  16. 16. SkillsMatter - August 12th 2010 App Life Cycle Active Foreground didFinishLaunchingWithOptions: applicationDidBecomeActive: applicationDidResignActive: Inactive applicationDidTerminate: Not running http://pardel.net
  17. 17. SkillsMatter - August 12th 2010 App Life Cycle Active Foreground didFinishLaunchingWithOptions: applicationDidBecomeActive: applicationDidResignActive: Inactive applicationDidTerminate: Not running http://pardel.net
  18. 18. SkillsMatter - August 12th 2010 App Life Cycle Active Foreground didFinishLaunchingWithOptions: applicationDidBecomeActive: applicationDidResignActive: Inactive applicationDidTerminate: Not running http://pardel.net
  19. 19. SkillsMatter - August 12th 2010 App Life Cycle Active Foreground didFinishLaunchingWithOptions: applicationDidBecomeActive: applicationDidResignActive: Inactive applicationDidTerminate: Background Running Suspended Not running http://pardel.net
  20. 20. SkillsMatter - August 12th 2010 App Life Cycle Active Foreground didFinishLaunchingWithOptions: applicationDidBecomeActive: applicationDidResignActive: Inactive applicationDidTerminate: applicationDidResignActive: Background Running Suspended Not running http://pardel.net
  21. 21. SkillsMatter - August 12th 2010 App Life Cycle Active Foreground didFinishLaunchingWithOptions: applicationDidBecomeActive: applicationDidResignActive: Inactive applicationDidTerminate: Background applicationDidEnterBackground: Running Suspended Not running http://pardel.net
  22. 22. SkillsMatter - August 12th 2010 App Life Cycle Active Foreground didFinishLaunchingWithOptions: applicationDidBecomeActive: applicationDidResignActive: Inactive applicationDidTerminate: Background applicationDidEnterBackground: Running applicationDidEnterForeground: Suspended Not running http://pardel.net
  23. 23. SkillsMatter - August 12th 2010 App Life Cycle Active Foreground didFinishLaunchingWithOptions: applicationDidBecomeActive: applicationDidResignActive: Inactive applicationDidTerminate: Background applicationDidEnterBackground: Running applicationDidEnterForeground: Suspended Not running http://pardel.net
  24. 24. SkillsMatter - August 12th 2010 App Life Cycle Active Foreground didFinishLaunchingWithOptions: applicationDidBecomeActive: applicationDidResignActive: Inactive applicationDidTerminate: Background applicationDidEnterBackground: Running applicationDidEnterForeground: Suspended Not running http://pardel.net
  25. 25. SkillsMatter - August 12th 2010 App Life Cycle Active Foreground didFinishLaunchingWithOptions: applicationDidBecomeActive: applicationDidResignActive: Inactive applicationDidTerminate: Background applicationDidEnterBackground: Running applicationDidEnterForeground: Suspended Not running http://pardel.net
  26. 26. SkillsMatter - August 12th 2010 UIApplicationDelegate Callbacks // // MyAppDelegate.m // - (void)applicationWillResignActive:(UIApplication *)application - (void)applicationDidEnterBackground:(UIApplication *)application - (void)applicationWillEnterForeground:(UIApplication *)application - (void)applicationDidBecomeActive:(UIApplication *)application - (void)applicationWillTerminate:(UIApplication *)application UIApplicationDidEnterBackgroundNotification UIApplicationDidEnterForegroundNotification http://pardel.net
  27. 27. SkillsMatter - August 12th 2010 UIApplicationDelegate Callbacks // // MyAppDelegate.m // - (void)applicationWillResignActive:(UIApplication *)application - (void)applicationDidEnterBackground:(UIApplication *)application - (void)applicationWillEnterForeground:(UIApplication *)application - (void)applicationDidBecomeActive:(UIApplication *)application - (void)applicationWillTerminate:(UIApplication *)application UIApplicationDidEnterBackgroundNotification UIApplicationDidEnterForegroundNotification Demo http://pardel.net
  28. 28. SkillsMatter - August 12th 2010 UIApplication typedef enum { UIApplicationStateActive, UIApplicationStateInactive, UIApplicationStateBackground } UIApplicationState; @property(nonatomic,readonly) UIApplicationState applicationState [[UIApplication sharedApplication] applicationState] http://pardel.net
  29. 29. SkillsMatter - August 12th 2010 Best practices Active Foreground Inactive applicationDidEnterForeground: Background applicationDidEnterBackground: Running Suspended Not running http://pardel.net
  30. 30. SkillsMatter - August 12th 2010 Best practices Active Foreground Inactive applicationDidEnterForeground: Background applicationDidEnterBackground: Running ✦ save state ✦ minimise memory usage ✦ change the UI accordingly ✦ stop Bonjour & networking ✦ stop shared system data Suspended access & GPU Not running http://pardel.net
  31. 31. SkillsMatter - August 12th 2010 Best practices Active Foreground Inactive applicationDidEnterForeground: Background applicationDidEnterBackground: Running ✦ save state ✦ minimise memory usage ✦ change the UI accordingly ✦ stop Bonjour & networking ✦ stop shared system data Suspended access & GPU your app can be Not running terminated at any time http://pardel.net
  32. 32. SkillsMatter - August 12th 2010 No Multitasking UIApplicationExitsOnSuspend http://pardel.net
  33. 33. SkillsMatter - August 12th 2010 App Life Cycle Active Foreground Inactive Background Running Suspended Not running http://pardel.net
  34. 34. SkillsMatter - August 12th 2010 App Life Cycle Active Foreground Inactive Background Running Suspended Not running http://pardel.net
  35. 35. SkillsMatter - August 12th 2010 App Life Cycle Active Foreground Inactive Background Running Suspended Not running http://pardel.net
  36. 36. SkillsMatter - August 12th 2010 App Life Cycle Active Foreground Inactive Background Running applicationDidEnterBackground: Suspended Not running http://pardel.net
  37. 37. SkillsMatter - August 12th 2010 App Life Cycle Active Foreground Inactive Background Running applicationDidEnterBackground: applicationDidTerminate: Suspended Not running http://pardel.net
  38. 38. SkillsMatter - August 12th 2010 Background Services Task completion Background Audio VoIP Background Location http://pardel.net
  39. 39. SkillsMatter - August 12th 2010 Task completion Active Foreground Inactive Background Not running http://pardel.net
  40. 40. SkillsMatter - August 12th 2010 Task completion Active Foreground Inactive Background Running Not running http://pardel.net
  41. 41. SkillsMatter - August 12th 2010 Task completion Active Foreground Inactive Background Running Not running http://pardel.net
  42. 42. SkillsMatter - August 12th 2010 Task completion Active Foreground Inactive Background Running Suspended Not running http://pardel.net
  43. 43. SkillsMatter - August 12th 2010 Task completion Active Foreground Inactive Background Running Not running http://pardel.net
  44. 44. SkillsMatter - August 12th 2010 Task completion UIApplication - (UIBackgroundTaskIdentifier)beginBackgroundTaskWithExpirationHandler: (void(^)(void))handler; - (void)endBackgroundTask:(UIBackgroundTaskIdentifier)identifier; @property(nonatomic,readonly) NSTimeInterval backgroundTimeRemaining; http://pardel.net
  45. 45. SkillsMatter - August 12th 2010 Task completion UIApplication - (UIBackgroundTaskIdentifier)beginBackgroundTaskWithExpirationHandler: (void(^)(void))handler; - (void)endBackgroundTask:(UIBackgroundTaskIdentifier)identifier; @property(nonatomic,readonly) NSTimeInterval backgroundTimeRemaining; typedef NSUInteger UIBackgroundTaskIdentifier; http://pardel.net
  46. 46. SkillsMatter - August 12th 2010 Task completion UIApplication - (UIBackgroundTaskIdentifier)beginBackgroundTaskWithExpirationHandler: (void(^)(void))handler; - (void)endBackgroundTask:(UIBackgroundTaskIdentifier)identifier; @property(nonatomic,readonly) NSTimeInterval backgroundTimeRemaining; typedef NSUInteger UIBackgroundTaskIdentifier; self.bgTaskId = [app beginBackgroundTaskWithExpirationHandler: ^{ [self stopLongTask]; }]; ... [[UIApplication sharedApplication] endBackgroundTask:self.bgTaskId]; http://pardel.net
  47. 47. SkillsMatter - August 12th 2010 Background Services Task completion Background Audio VoIP Background Location http://pardel.net
  48. 48. SkillsMatter - August 12th 2010 Background Services http://pardel.net
  49. 49. SkillsMatter - August 12th 2010 App Life Cycle Active Foreground Inactive Background Not running http://pardel.net
  50. 50. SkillsMatter - August 12th 2010 App Life Cycle Active Foreground Inactive Background Running Not running http://pardel.net
  51. 51. SkillsMatter - August 12th 2010 App Life Cycle AVAudioSession Active Foreground Inactive AVAudioSessionDelegate Background Running Not running http://pardel.net
  52. 52. SkillsMatter - August 12th 2010 App Life Cycle AVAudioSession Active Foreground Inactive AVAudioSessionDelegate Background Running Not running http://pardel.net
  53. 53. SkillsMatter - August 12th 2010 App Life Cycle AVAudioSession Active Foreground Inactive AVAudioSessionDelegate beginInteruption Background Running Suspended Not running http://pardel.net
  54. 54. SkillsMatter - August 12th 2010 App Life Cycle AVAudioSession Active Foreground Inactive AVAudioSessionDelegate beginInteruption Background Running Suspended Not running http://pardel.net
  55. 55. SkillsMatter - August 12th 2010 App Life Cycle AVAudioSession Active Foreground endInteruption Inactive AVAudioSessionDelegate beginInteruption Background Running Running Suspended Not running http://pardel.net
  56. 56. SkillsMatter - August 12th 2010 App Life Cycle AVAudioSession Active Foreground Inactive AVAudioSessionDelegate beginInteruption endInterruptionWithFlags: Background Running Running Suspended Not running http://pardel.net
  57. 57. SkillsMatter - August 12th 2010 Background Location Services Turn by turn directions Location tracking ✦ Significant location changing ✦ Region monitoring (iPhone4 only) http://pardel.net
  58. 58. SkillsMatter - August 12th 2010 Turn by turn directions locationManager = [[CLLocationManager alloc] init]; locationManager.delegate = self; locationManager.desiredAccuracy = kCLLocationAccuracyBestForNavigation; [locationManager startUpdatingLocation]; http://pardel.net
  59. 59. SkillsMatter - August 12th 2010 Turn by turn directions locationManager = [[CLLocationManager alloc] init]; locationManager.delegate = self; locationManager.desiredAccuracy = kCLLocationAccuracyBestForNavigation; [locationManager startUpdatingLocation]; extern const CLLocationAccuracy kCLLocationAccuracyBestForNavigation; extern const CLLocationAccuracy kCLLocationAccuracyBest; extern const CLLocationAccuracy kCLLocationAccuracyNearestTenMeters; extern const CLLocationAccuracy kCLLocationAccuracyHundredMeters; extern const CLLocationAccuracy kCLLocationAccuracyKilometer; extern const CLLocationAccuracy kCLLocationAccuracyThreeKilometers; http://pardel.net
  60. 60. SkillsMatter - August 12th 2010 Turn by turn directions locationManager = [[CLLocationManager alloc] init]; locationManager.delegate = self; locationManager.desiredAccuracy = kCLLocationAccuracyBestForNavigation; [locationManager startUpdatingLocation]; extern const CLLocationAccuracy kCLLocationAccuracyBestForNavigation; extern const CLLocationAccuracy kCLLocationAccuracyBest; extern const CLLocationAccuracy kCLLocationAccuracyNearestTenMeters; extern const CLLocationAccuracy kCLLocationAccuracyHundredMeters; extern const CLLocationAccuracy kCLLocationAccuracyKilometer; extern const CLLocationAccuracy kCLLocationAccuracyThreeKilometers; kCLLocationAccuracyBestForNavigation Use the highest possible accuracy and combine it with additional sensor data. This level of accuracy is intended for use in navigation applications that require precise position information at all times and are intended to be used only while the device is plugged in. http://pardel.net
  61. 61. SkillsMatter - August 12th 2010 Location tracking a) Significant location changing http://pardel.net
  62. 62. SkillsMatter - August 12th 2010 Location tracking a) Significant location changing http://pardel.net
  63. 63. SkillsMatter - August 12th 2010 Location tracking a) Significant location changing http://pardel.net
  64. 64. SkillsMatter - August 12th 2010 Location tracking a) Significant location changing http://pardel.net
  65. 65. SkillsMatter - August 12th 2010 Location tracking a) Significant location changing locationManager = [[CLLocationManager alloc] init]; locationManager.delegate = self; [locationManager startMonitoringSignificantLocationChanges]; http://pardel.net
  66. 66. SkillsMatter - August 12th 2010 Location tracking a) Significant location changing locationManager = [[CLLocationManager alloc] init]; locationManager.delegate = self; [locationManager startMonitoringSignificantLocationChanges]; - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation: (CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation http://pardel.net
  67. 67. SkillsMatter - August 12th 2010 Location tracking b) Region monitoring (iPhone4 only) http://pardel.net
  68. 68. SkillsMatter - August 12th 2010 Location tracking b) Region monitoring (iPhone4 only) http://pardel.net
  69. 69. SkillsMatter - August 12th 2010 Location tracking b) Region monitoring (iPhone4 only) - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation: (CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation http://pardel.net
  70. 70. SkillsMatter - August 12th 2010 Location tracking b) Region monitoring (iPhone4 only) locationManager = [[CLLocationManager alloc] init]; locationManager.delegate = self; locationManager.desiredAccuracy = kCLLocationAccuracyNearestTenMeters; CLLocationCoordinate2D regionCenterCoordinate; tempCoordinate.latitude = 51.5245; tempCoordinate.longitude = -0.0995; CLRegion *region = [[CLRegion alloc] initCircularRegionWithCenter:regionCenterCoordinate radius:10.0 identifier:@"Skills Matter"]; [locationManager startMonitoringForRegion:region desiredAccuracy:kCLLocationAccuracyNearestTenMeters]; - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation: (CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation http://pardel.net
  71. 71. SkillsMatter - August 12th 2010 Multitasking http://pardel.net
  72. 72. SkillsMatter - August 12th 2010 Multitasking Fast app switching Task Completion Background Audio Navigation & Location tracking VoIP http://pardel.net
  73. 73. SkillsMatter - August 12th 2010 2. Local Notifications http://pardel.net
  74. 74. SkillsMatter - August 12th 2010 Local notifications // check if the local notification class exists Class cls = NSClassFromString(@"UILocalNotification"); if (cls != nil) { // check if the device is supporting multitasking UIDevice* device = [UIDevice currentDevice]; if ([device respondsToSelector:@selector(isMultitaskingSupported)]) { UIApplication* app = [UIApplication sharedApplication]; UILocalNotification* alarm = [[[UILocalNotification alloc] init] autorelease]; if (alarm) { alarm.fireDate = [NSDate date]; alarm.timeZone = [NSTimeZone defaultTimeZone]; alarm.repeatInterval = 0; alarm.soundName = @"alert.caf"; alarm.alertBody = @"Ha ha"; [app scheduleLocalNotification:alarm]; } } } http://pardel.net
  75. 75. SkillsMatter - August 12th 2010 Local notifications // check if the local notification class exists Class cls = NSClassFromString(@"UILocalNotification"); if (cls != nil) { // check if the device is supporting multitasking UIDevice* device = [UIDevice currentDevice]; if ([device respondsToSelector:@selector(isMultitaskingSupported)]) { UIApplication* app = [UIApplication sharedApplication]; UILocalNotification* alarm = [[[UILocalNotification alloc] init] autorelease]; if (alarm) { alarm.fireDate = [NSDate date]; alarm.timeZone = [NSTimeZone defaultTimeZone]; alarm.repeatInterval = 0; alarm.soundName = @"alert.caf"; alarm.alertBody = @"Ha ha"; [app scheduleLocalNotification:alarm]; } } } Demo http://pardel.net
  76. 76. SkillsMatter - August 12th 2010 3. iAd http://pardel.net
  77. 77. SkillsMatter - August 12th 2010 iAd Nov 09 - Google acquires AdMob for $750 million in stock Jan 10 - Apple acquires Quattro Wireless for $275 million http://pardel.net
  78. 78. SkillsMatter - August 12th 2010 iAd CPM + CPC = eCPM http://pardel.net
  79. 79. SkillsMatter - August 12th 2010 iAd CPM + CPC = eCPM http://pardel.net
  80. 80. SkillsMatter - August 12th 2010 iAd CPM + CPC = eCPM 60% revenues http://pardel.net
  81. 81. SkillsMatter - August 12th 2010 iAd http://pardel.net
  82. 82. SkillsMatter - August 12th 2010 iAd.framework @property(nonatomic, copy) NSSet *requiredContentSizeIdentifiers; ADBannerView @property (nonatomic, copy) NSString *currentContentSizeIdentifier; @property(nonatomic, readonly) BOOL bannerLoaded; @property(nonatomic, readonly) BOOL bannerViewActionInProgress; - (void)cancelBannerViewAction; @property(nonatomic, assign) id<ADBannerViewDelegate> delegate; http://pardel.net
  83. 83. SkillsMatter - August 12th 2010 iAd.framework @property(nonatomic, copy) NSSet *requiredContentSizeIdentifiers; ADBannerView @property (nonatomic, copy) NSString *currentContentSizeIdentifier; @property(nonatomic, readonly) BOOL bannerLoaded; @property(nonatomic, readonly) BOOL bannerViewActionInProgress; - (void)cancelBannerViewAction; @property(nonatomic, assign) id<ADBannerViewDelegate> delegate; http://pardel.net
  84. 84. SkillsMatter - August 12th 2010 iAd.framework @property(nonatomic, copy) NSSet *requiredContentSizeIdentifiers; ADBannerView @property (nonatomic, copy) NSString *currentContentSizeIdentifier; @property(nonatomic, readonly) BOOL bannerLoaded; @property(nonatomic, readonly) BOOL bannerViewActionInProgress; - (void)cancelBannerViewAction; @property(nonatomic, assign) id<ADBannerViewDelegate> delegate; http://pardel.net
  85. 85. SkillsMatter - August 12th 2010 iAd.framework @property(nonatomic, copy) NSSet *requiredContentSizeIdentifiers; ADBannerView @property (nonatomic, copy) NSString *currentContentSizeIdentifier; @property(nonatomic, readonly) BOOL bannerLoaded; @property(nonatomic, readonly) BOOL bannerViewActionInProgress; - (void)cancelBannerViewAction; @property(nonatomic, assign) id<ADBannerViewDelegate> delegate; ADBannerContentSizeIdentifier320x50 ADBannerContentSizeIdentifier480x32 http://pardel.net
  86. 86. SkillsMatter - August 12th 2010 iAd.framework ADBannerView ADBannerViewDelegate - (void)bannerViewDidLoadAd:(ADBannerView *)banner; - (BOOL)bannerViewActionShouldBegin:(ADBannerView *)banner willLeaveApplication:(BOOL)willLeave; - (void)bannerViewActionDidFinish:(ADBannerView *)banner; - (void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error; http://pardel.net
  87. 87. SkillsMatter - August 12th 2010 iAd.framework ADBannerView ADBannerViewDelegate - (void)bannerViewDidLoadAd:(ADBannerView *)banner; - (BOOL)bannerViewActionShouldBegin:(ADBannerView *)banner willLeaveApplication:(BOOL)willLeave; - (void)bannerViewActionDidFinish:(ADBannerView *)banner; - (void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error; Demo http://pardel.net
  88. 88. SkillsMatter - August 12th 2010 iAd JS HTML5 + CSS3 ✦ Banner ✦ Main advertising screen http://pardel.net
  89. 89. SkillsMatter - August 12th 2010 4. Game Center http://pardel.net
  90. 90. SkillsMatter - August 12th 2010 Game Center ✦ Beta ✦ Socialgaming network ✦ Leaderboards & Achievements http://pardel.net
  91. 91. SkillsMatter - August 12th 2010 5. New Frameworks & APIs http://pardel.net
  92. 92. SkillsMatter - August 12th 2010 Block Objects http://pardel.net
  93. 93. SkillsMatter - August 12th 2010 Block Objects self.bgTaskId = [app beginBackgroundTaskWithExpirationHandler:^{ [self stopLongTask]; }]; http://pardel.net
  94. 94. SkillsMatter - August 12th 2010 Block Objects self.bgTaskId = [app beginBackgroundTaskWithExpirationHandler:^{ [self stopLongTask]; }]; an object with some code respond to NSObject methods available in C http://pardel.net
  95. 95. SkillsMatter - August 12th 2010 Blocks http://pardel.net
  96. 96. SkillsMatter - August 12th 2010 Blocks returnType (^myBlockName) (argumentType) = ^(argumentType argumentName) { returnType x; ... return x; } http://pardel.net
  97. 97. SkillsMatter - August 12th 2010 Blocks returnType (^myBlockName) (argumentType) = ^(argumentType argumentName) { returnType x; ... return x; } int (^myBlock) (int) = ^(int num) { return num * multiplier; } http://pardel.net
  98. 98. SkillsMatter - August 12th 2010 Blocks returnType (^myBlockName) (argumentType) = ^(argumentType argumentName) { returnType x; ... return x; } int multiplier = 5; int (^myBlock) (int) = ^(int num) { return num * multiplier; } http://pardel.net
  99. 99. SkillsMatter - August 12th 2010 Blocks returnType (^myBlockName) (argumentType) = ^(argumentType argumentName) { returnType x; ... return x; } int multiplier = 5; int (^myBlock) (int) = ^(int num) { return num * multiplier; } myBlock(7); http://pardel.net
  100. 100. SkillsMatter - August 12th 2010 New Frameworks Quick Look Event Kit Core Motion Core Telephony Data Protection http://pardel.net
  101. 101. SkillsMatter - August 12th 2010 Event Kit http://pardel.net
  102. 102. SkillsMatter - August 12th 2010 Event Kit EKEventStore @property(nonatomic, readonly) NSArray *calendars @property(nonatomic, readonly) EKCalendar *defaultCalendarForNewEvents http://pardel.net
  103. 103. SkillsMatter - August 12th 2010 Event Kit EKEventStore @property(nonatomic, readonly) NSArray *calendars @property(nonatomic, readonly) EKCalendar *defaultCalendarForNewEvents EKCalendar http://pardel.net
  104. 104. SkillsMatter - August 12th 2010 Event Kit EKEventStore @property(nonatomic, readonly) NSArray *calendars @property(nonatomic, readonly) EKCalendar *defaultCalendarForNewEvents EKCalendar typedef enum { EKCalendarTypeLocal, EKCalendarTypeCalDAV, EKCalendarTypeExchange, EKCalendarTypeSubscription, EKCalendarTypeBirthday, } EKCalendarType; http://pardel.net
  105. 105. SkillsMatter - August 12th 2010 Event Kit EKEventStore @property(nonatomic, readonly) NSArray *calendars @property(nonatomic, readonly) EKCalendar *defaultCalendarForNewEvents EKCalendar EKEvent typedef enum { EKCalendarTypeLocal, alarms -> EKAlarm EKCalendarTypeCalDAV, organizer, attendees -> EKParticipant EKCalendarTypeExchange, recurrenceRule -> EKRecurrenceRule EKCalendarTypeSubscription, EKCalendarTypeBirthday, } EKCalendarType; http://pardel.net
  106. 106. SkillsMatter - August 12th 2010 New API’s Block related methods - (void)enumerateObjectsUsingBlock:(void (^)(id obj, NSUInteger idx, BOOL *stop)) block Photo Library Access MapKit improvements http://pardel.net
  107. 107. SkillsMatter - August 12th 2010 iPhone & iPad Application Development Course Sep 29th to Oct 1st http://skillsmatter.com/course/os-mobile-server/ iphone-ipad-application-development http://pardel.net
  108. 108. SkillsMatter - August 12th 2010 iPhone & iPad Application Development Course Sep 29th to Oct 1st http://skillsmatter.com/course/os-mobile-server/ iphone-ipad-application-development http://pardel.net
  109. 109. SkillsMatter - August 12th 2010 PROGRAMME Day 1: Introduction to iOS development I Day 3: Advance Features I • The development environment • Touch & Gestures • Objective C crash course • Camera & Photo Library access • Foundation framework • Core Location • Memory management • Event Kit • The iPhone Dev Center • Core Motion • Web Services (inc. XML & JSON Parsers) • Threading • Localisation Day 2: Introduction to iOS development II Day 4: Advance Features II • Design patterns (MVC, Delegation, etc.) • Documents Sharing • Table views, Navigation, Tab bar • Multitasking • Data Persistence (Preferences, SQLite & • Local notifications Code Data) • iPad Specific topics • Animation • Testing and Optimisation (Instruments) • Core Graphics • Submitting your application to the App Store http://pardel.net
  110. 110. SkillsMatter - August 12th 2010 Thank you http://pardel.net http://twitter.com/pardel http://pardel.net
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×