IN The Brain Of Paul Ardeleanu
-
Upload
skills-matter -
Category
Technology
-
view
209 -
download
2
Transcript of IN The Brain Of Paul Ardeleanu
![Page 1: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/1.jpg)
What’s new in iOS4Paul Ardeleanu
@pardel
SkillsMatter - August 12th 2010
![Page 2: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/2.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
What was missing?
Multitasking
Flash
![Page 3: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/3.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
What’s new in iOS4?
Multitasking
Local Notifications
iAd
Game Center
New Frameworks & APIs
![Page 4: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/4.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
1. Multitasking
![Page 5: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/5.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
1. Multitasking ... of a different kind
![Page 7: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/7.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Multitasking
Fast app switching
Task Completion
Background Audio
Navigation & Location tracking
VoIP
![Page 8: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/8.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Fast App Switching
Running
Not running
![Page 9: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/9.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Fast App Switching
Running
Not running
Active
Inactive
![Page 10: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/10.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Fast App Switching
Running
Not running
Running
Not running
Background
Active
Inactive
![Page 11: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/11.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Fast App Switching
Running
Not running
Running
Not running
Background
Active
Inactive
Running
Suspended
![Page 12: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/12.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
App Life CycleForegroundActive
Inactive
Not running
![Page 13: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/13.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
App Life CycleForegroundActive
Inactive
Not running
didFinishLaunchingWithOptions:
![Page 14: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/14.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
App Life CycleForegroundActive
Inactive
Not running
didFinishLaunchingWithOptions:
applicationDidBecomeActive:
![Page 15: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/15.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
App Life CycleForegroundActive
Inactive
Not running
didFinishLaunchingWithOptions:
applicationDidBecomeActive:
applicationDidResignActive:
![Page 16: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/16.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
App Life CycleForegroundActive
Inactive
Not running
didFinishLaunchingWithOptions:
applicationDidBecomeActive:
applicationDidResignActive:
applicationDidTerminate:
![Page 17: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/17.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
App Life CycleForegroundActive
Inactive
Not running
didFinishLaunchingWithOptions:
applicationDidBecomeActive:
applicationDidResignActive:
applicationDidTerminate:
![Page 18: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/18.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
App Life CycleForegroundActive
Inactive
Not running
didFinishLaunchingWithOptions:
applicationDidBecomeActive:
applicationDidResignActive:
applicationDidTerminate:
![Page 19: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/19.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
App Life CycleForegroundActive
Inactive
BackgroundRunning
Suspended
Not running
didFinishLaunchingWithOptions:
applicationDidBecomeActive:
applicationDidResignActive:
applicationDidTerminate:
![Page 20: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/20.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
App Life CycleForegroundActive
Inactive
BackgroundRunning
Suspended
Not running
didFinishLaunchingWithOptions:
applicationDidBecomeActive:
applicationDidResignActive:
applicationDidTerminate:
applicationDidResignActive:
![Page 21: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/21.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
App Life CycleForegroundActive
Inactive
BackgroundRunning
Suspended
Not running
didFinishLaunchingWithOptions:
applicationDidBecomeActive:
applicationDidResignActive:
applicationDidTerminate:
applicationDidEnterBackground:
![Page 22: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/22.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
App Life CycleForegroundActive
Inactive
BackgroundRunning
Suspended
Not running
didFinishLaunchingWithOptions:
applicationDidBecomeActive:
applicationDidResignActive:
applicationDidTerminate:
applicationDidEnterBackground:
applicationDidEnterForeground:
![Page 23: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/23.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
App Life CycleForegroundActive
Inactive
BackgroundRunning
Suspended
Not running
didFinishLaunchingWithOptions:
applicationDidBecomeActive:
applicationDidResignActive:
applicationDidTerminate:
applicationDidEnterBackground:
applicationDidEnterForeground:
![Page 24: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/24.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
App Life CycleForegroundActive
Inactive
BackgroundRunning
Suspended
Not running
didFinishLaunchingWithOptions:
applicationDidBecomeActive:
applicationDidResignActive:
applicationDidTerminate:
applicationDidEnterBackground:
applicationDidEnterForeground:
![Page 25: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/25.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
App Life CycleForegroundActive
Inactive
BackgroundRunning
Suspended
Not running
didFinishLaunchingWithOptions:
applicationDidBecomeActive:
applicationDidResignActive:
applicationDidTerminate:
applicationDidEnterBackground:
applicationDidEnterForeground:
![Page 26: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/26.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
UIApplicationDelegate Callbacks
//// MyAppDelegate.m//
- (void)applicationWillResignActive:(UIApplication *)application
- (void)applicationDidEnterBackground:(UIApplication *)application
- (void)applicationWillEnterForeground:(UIApplication *)application
- (void)applicationDidBecomeActive:(UIApplication *)application
- (void)applicationWillTerminate:(UIApplication *)application
UIApplicationDidEnterBackgroundNotificationUIApplicationDidEnterForegroundNotification
![Page 27: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/27.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
UIApplicationDelegate Callbacks
//// MyAppDelegate.m//
- (void)applicationWillResignActive:(UIApplication *)application
- (void)applicationDidEnterBackground:(UIApplication *)application
- (void)applicationWillEnterForeground:(UIApplication *)application
- (void)applicationDidBecomeActive:(UIApplication *)application
- (void)applicationWillTerminate:(UIApplication *)application
Demo
UIApplicationDidEnterBackgroundNotificationUIApplicationDidEnterForegroundNotification
![Page 28: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/28.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
UIApplicationtypedef enum { UIApplicationStateActive, UIApplicationStateInactive, UIApplicationStateBackground} UIApplicationState;
@property(nonatomic,readonly) UIApplicationState applicationState
[[UIApplication sharedApplication] applicationState]
![Page 29: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/29.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Best practicesForegroundActive
Inactive
BackgroundRunning
Suspended
Not running
applicationDidEnterBackground:
applicationDidEnterForeground:
![Page 30: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/30.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Best practicesForegroundActive
Inactive
BackgroundRunning
Suspended
Not running
applicationDidEnterBackground:
applicationDidEnterForeground:
✦ save state✦ minimise memory usage✦ change the UI accordingly✦ stop Bonjour & networking✦ stop shared system data
access & GPU
![Page 31: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/31.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Best practicesForegroundActive
Inactive
BackgroundRunning
Suspended
Not running
applicationDidEnterBackground:
applicationDidEnterForeground:
✦ save state✦ minimise memory usage✦ change the UI accordingly✦ stop Bonjour & networking✦ stop shared system data
access & GPU
your app can be terminated at any time
![Page 32: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/32.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
No Multitasking
UIApplicationExitsOnSuspend
![Page 33: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/33.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
App Life CycleForegroundActive
Inactive
BackgroundRunning
Suspended
Not running
![Page 34: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/34.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
App Life CycleForegroundActive
Inactive
BackgroundRunning
Suspended
Not running
![Page 35: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/35.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
App Life CycleForegroundActive
Inactive
BackgroundRunning
Suspended
Not running
![Page 36: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/36.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
App Life CycleForegroundActive
Inactive
BackgroundRunning
Suspended
Not running
applicationDidEnterBackground:
![Page 37: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/37.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
App Life CycleForegroundActive
Inactive
BackgroundRunning
Suspended
Not running
applicationDidEnterBackground:
applicationDidTerminate:
![Page 38: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/38.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Background Services
Task completion
Background Audio
VoIP
Background Location
![Page 39: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/39.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Task completionForegroundActive
Inactive
Background
Not running
![Page 40: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/40.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Task completionForegroundActive
Inactive
BackgroundRunning
Not running
![Page 41: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/41.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Task completionForegroundActive
Inactive
BackgroundRunning
Not running
![Page 42: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/42.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Task completionForegroundActive
Inactive
BackgroundRunning
Suspended
Not running
![Page 43: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/43.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Task completionForegroundActive
Inactive
BackgroundRunning
Not running
![Page 44: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/44.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Task completionUIApplication
- (UIBackgroundTaskIdentifier)beginBackgroundTaskWithExpirationHandler:(void(^)(void))handler;- (void)endBackgroundTask:(UIBackgroundTaskIdentifier)identifier;
@property(nonatomic,readonly) NSTimeInterval backgroundTimeRemaining;
![Page 45: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/45.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Task completionUIApplication
typedef NSUInteger UIBackgroundTaskIdentifier;
- (UIBackgroundTaskIdentifier)beginBackgroundTaskWithExpirationHandler:(void(^)(void))handler;- (void)endBackgroundTask:(UIBackgroundTaskIdentifier)identifier;
@property(nonatomic,readonly) NSTimeInterval backgroundTimeRemaining;
![Page 46: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/46.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Task completion
self.bgTaskId = [app beginBackgroundTaskWithExpirationHandler: ^{ [self stopLongTask];}];...[[UIApplication sharedApplication] endBackgroundTask:self.bgTaskId];
UIApplication
typedef NSUInteger UIBackgroundTaskIdentifier;
- (UIBackgroundTaskIdentifier)beginBackgroundTaskWithExpirationHandler:(void(^)(void))handler;- (void)endBackgroundTask:(UIBackgroundTaskIdentifier)identifier;
@property(nonatomic,readonly) NSTimeInterval backgroundTimeRemaining;
![Page 47: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/47.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Background Services
Task completion
Background Audio
VoIP
Background Location
![Page 48: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/48.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Background Services
![Page 49: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/49.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
App Life CycleForegroundActive
Inactive
Background
Not running
![Page 50: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/50.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
App Life CycleForegroundActive
Inactive
BackgroundRunning
Not running
![Page 51: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/51.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
App Life CycleForegroundActive
Inactive
BackgroundRunning
Not running
AVAudioSession
AVAudioSessionDelegate
![Page 52: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/52.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
App Life CycleForegroundActive
Inactive
BackgroundRunning
Not running
AVAudioSession
AVAudioSessionDelegate
![Page 53: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/53.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
App Life CycleForegroundActive
Inactive
BackgroundRunning
Suspended
Not running
beginInteruption
AVAudioSession
AVAudioSessionDelegate
![Page 54: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/54.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
App Life CycleForegroundActive
Inactive
BackgroundRunning
Suspended
Not running
beginInteruption
AVAudioSession
AVAudioSessionDelegate
![Page 55: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/55.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
App Life CycleForegroundActive
Inactive
BackgroundRunning
Suspended
Not running
Running
beginInteruption
AVAudioSession
AVAudioSessionDelegate
endInteruption
![Page 56: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/56.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
App Life CycleForegroundActive
Inactive
BackgroundRunning
Suspended
Not running
Running
beginInteruption
AVAudioSession
AVAudioSessionDelegate
endInterruptionWithFlags:
![Page 57: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/57.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Background Location Services
Turn by turn directions
Location tracking✦ Significant location changing✦ Region monitoring (iPhone4 only)
![Page 58: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/58.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Turn by turn directions
locationManager = [[CLLocationManager alloc] init];locationManager.delegate = self;locationManager.desiredAccuracy = kCLLocationAccuracyBestForNavigation;[locationManager startUpdatingLocation];
![Page 59: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/59.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
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;
![Page 60: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/60.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Turn by turn directions
kCLLocationAccuracyBestForNavigationUse 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.
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;
![Page 61: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/61.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Location tracking
a) Significant location changing
![Page 62: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/62.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Location tracking
a) Significant location changing
![Page 63: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/63.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Location tracking
a) Significant location changing
![Page 64: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/64.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Location tracking
a) Significant location changing
![Page 65: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/65.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Location tracking
a) Significant location changing
locationManager = [[CLLocationManager alloc] init];locationManager.delegate = self;[locationManager startMonitoringSignificantLocationChanges];
![Page 66: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/66.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Location tracking
a) Significant location changing
- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
locationManager = [[CLLocationManager alloc] init];locationManager.delegate = self;[locationManager startMonitoringSignificantLocationChanges];
![Page 67: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/67.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Location tracking
b) Region monitoring (iPhone4 only)
![Page 68: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/68.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Location tracking
b) Region monitoring (iPhone4 only)
![Page 69: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/69.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Location tracking
b) Region monitoring (iPhone4 only)
- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
![Page 70: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/70.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Location tracking
b) Region monitoring (iPhone4 only)
- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
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];
![Page 72: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/72.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Multitasking
Fast app switching
Task Completion
Background Audio
Navigation & Location tracking
VoIP
![Page 73: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/73.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
2. Local Notifications
![Page 74: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/74.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
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]; } }
}
![Page 75: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/75.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
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
![Page 77: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/77.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
iAd
Nov 09 - Google acquires AdMob for $750 million in stock
Jan 10 - Apple acquires Quattro Wireless for $275 million
![Page 78: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/78.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
iAd
CPM + CPC = eCPM
![Page 79: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/79.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
iAd
CPM + CPC = eCPM
![Page 80: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/80.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
iAd
CPM + CPC = eCPM
60% revenues
![Page 82: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/82.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
iAd.frameworkADBannerView
@property(nonatomic, copy) NSSet *requiredContentSizeIdentifiers;@property (nonatomic, copy) NSString *currentContentSizeIdentifier;
@property(nonatomic, readonly) BOOL bannerLoaded;@property(nonatomic, readonly) BOOL bannerViewActionInProgress;
- (void)cancelBannerViewAction;
@property(nonatomic, assign) id<ADBannerViewDelegate> delegate;
![Page 83: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/83.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
iAd.frameworkADBannerView
@property(nonatomic, copy) NSSet *requiredContentSizeIdentifiers;@property (nonatomic, copy) NSString *currentContentSizeIdentifier;
@property(nonatomic, readonly) BOOL bannerLoaded;@property(nonatomic, readonly) BOOL bannerViewActionInProgress;
- (void)cancelBannerViewAction;
@property(nonatomic, assign) id<ADBannerViewDelegate> delegate;
![Page 84: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/84.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
iAd.frameworkADBannerView
@property(nonatomic, copy) NSSet *requiredContentSizeIdentifiers;@property (nonatomic, copy) NSString *currentContentSizeIdentifier;
@property(nonatomic, readonly) BOOL bannerLoaded;@property(nonatomic, readonly) BOOL bannerViewActionInProgress;
- (void)cancelBannerViewAction;
@property(nonatomic, assign) id<ADBannerViewDelegate> delegate;
![Page 85: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/85.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
iAd.frameworkADBannerView
ADBannerContentSizeIdentifier320x50ADBannerContentSizeIdentifier480x32
@property(nonatomic, copy) NSSet *requiredContentSizeIdentifiers;@property (nonatomic, copy) NSString *currentContentSizeIdentifier;
@property(nonatomic, readonly) BOOL bannerLoaded;@property(nonatomic, readonly) BOOL bannerViewActionInProgress;
- (void)cancelBannerViewAction;
@property(nonatomic, assign) id<ADBannerViewDelegate> delegate;
![Page 86: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/86.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
iAd.framework
ADBannerViewDelegate
ADBannerView
- (void)bannerViewDidLoadAd:(ADBannerView *)banner;
- (BOOL)bannerViewActionShouldBegin:(ADBannerView *)banner willLeaveApplication:(BOOL)willLeave;- (void)bannerViewActionDidFinish:(ADBannerView *)banner;
- (void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error;
![Page 87: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/87.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
iAd.framework
ADBannerViewDelegate
Demo
ADBannerView
- (void)bannerViewDidLoadAd:(ADBannerView *)banner;
- (BOOL)bannerViewActionShouldBegin:(ADBannerView *)banner willLeaveApplication:(BOOL)willLeave;- (void)bannerViewActionDidFinish:(ADBannerView *)banner;
- (void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error;
![Page 88: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/88.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
iAd JS
✦ Banner✦ Main advertising screen
HTML5 + CSS3
![Page 89: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/89.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
4. Game Center
![Page 90: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/90.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Game Center
✦ Beta✦ Social gaming network✦ Leaderboards & Achievements
![Page 91: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/91.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
5. New Frameworks & APIs
![Page 93: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/93.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Block Objectsself.bgTaskId = [app beginBackgroundTaskWithExpirationHandler:^{ [self stopLongTask];}];
![Page 94: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/94.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Block Objectsself.bgTaskId = [app beginBackgroundTaskWithExpirationHandler:^{ [self stopLongTask];}];
an object with some code
respond to NSObject methods
available in C
![Page 96: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/96.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Blocks
returnType (^myBlockName) (argumentType) = ^(argumentType argumentName){ returnType x; ... return x;}
![Page 97: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/97.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Blocks
returnType (^myBlockName) (argumentType) = ^(argumentType argumentName){ returnType x; ... return x;}
int (^myBlock) (int) = ^(int num) { return num * multiplier; }
![Page 98: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/98.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Blocks
returnType (^myBlockName) (argumentType) = ^(argumentType argumentName){ returnType x; ... return x;}
int (^myBlock) (int) = ^(int num) { return num * multiplier; }
int multiplier = 5;
![Page 99: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/99.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Blocks
returnType (^myBlockName) (argumentType) = ^(argumentType argumentName){ returnType x; ... return x;}
int (^myBlock) (int) = ^(int num) { return num * multiplier; }
int multiplier = 5;
myBlock(7);
![Page 100: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/100.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
New Frameworks
Quick Look
Event Kit
Core Motion
Core Telephony
Data Protection
![Page 102: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/102.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Event Kit
EKEventStore@property(nonatomic, readonly) NSArray *calendars@property(nonatomic, readonly) EKCalendar *defaultCalendarForNewEvents
![Page 103: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/103.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Event Kit
EKEventStore@property(nonatomic, readonly) NSArray *calendars@property(nonatomic, readonly) EKCalendar *defaultCalendarForNewEvents
EKCalendar
![Page 104: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/104.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Event Kit
EKEventStore@property(nonatomic, readonly) NSArray *calendars@property(nonatomic, readonly) EKCalendar *defaultCalendarForNewEvents
EKCalendartypedef enum { EKCalendarTypeLocal, EKCalendarTypeCalDAV, EKCalendarTypeExchange, EKCalendarTypeSubscription, EKCalendarTypeBirthday,} EKCalendarType;
![Page 105: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/105.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Event Kit
EKEventStore@property(nonatomic, readonly) NSArray *calendars@property(nonatomic, readonly) EKCalendar *defaultCalendarForNewEvents
EKCalendar EKEventtypedef enum { EKCalendarTypeLocal, EKCalendarTypeCalDAV, EKCalendarTypeExchange, EKCalendarTypeSubscription, EKCalendarTypeBirthday,} EKCalendarType;
alarms -> EKAlarmorganizer, attendees -> EKParticipantrecurrenceRule -> EKRecurrenceRule
![Page 106: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/106.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
New API’s
Block related methods
- (void)enumerateObjectsUsingBlock:(void (^)(id obj, NSUInteger idx, BOOL *stop))block
Photo Library Access
MapKit improvements
![Page 107: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/107.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
iPhone & iPad Application Development Course
Sep 29th to Oct 1st
http://skillsmatter.com/course/os-mobile-server/iphone-ipad-application-development
![Page 108: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/108.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
iPhone & iPad Application Development Course
Sep 29th to Oct 1st
http://skillsmatter.com/course/os-mobile-server/iphone-ipad-application-development
![Page 109: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/109.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
PROGRAMME
Day 1: Introduction to iOS development I • The development environment • Objective C crash course • Foundation framework • Memory management • The iPhone Dev Center
Day 3: Advance Features I • Touch & Gestures • Camera & Photo Library access • Core Location • Event Kit • Core Motion • Web Services (inc. XML & JSON Parsers) • Threading • Localisation
Day 2: Introduction to iOS development II • Design patterns (MVC, Delegation, etc.) • Table views, Navigation, Tab bar • Data Persistence (Preferences, SQLite & Code Data) • Animation • Core Graphics
Day 4: Advance Features II • Documents Sharing • Multitasking • Local notifications • iPad Specific topics • Testing and Optimisation (Instruments) • Submitting your application to the App Store
![Page 110: IN The Brain Of Paul Ardeleanu](https://reader038.fdocuments.in/reader038/viewer/2022110122/559ee4381a28ab260a8b46a7/html5/thumbnails/110.jpg)
SkillsMatter - August 12th 2010
http://pardel.net
Thank you
http://pardel.nethttp://twitter.com/pardel