Skip to content

Commit b2d0fc3

Browse files
committed
I noticed that the application did finish launching method now uses swift dictionary format instead of NSDictionary. Updated that for all example codes
1 parent 7ebd80e commit b2d0fc3

File tree

92 files changed

+109
-103
lines changed
  • chapter-addressBook/Retrieving a Person Entity with System UI/Retrieving a Person Entity with System UI
  • chapter-basics
    • Accepting User Text Input with UITextField/Accepting User Text Input with UITextField
    • Adding Blur Effects to Your Views/Adding Blur Effects to Your Views
    • Adding Buttons to the User Interface with UIButton/Adding Buttons to the User Interface with UIButton
    • Creating Scrollable Content with UIScrollView/Creating Scrollable Content with UIScrollView
    • Creating, Using and Customizing Switches with UISwitch/Creating, Using and Customizing Switches with UISwitch
    • Displaying Alerts and Action Sheets/Displaying Alerts and Action Sheets
    • Displaying Images with UIImageView/Displaying Images with UIImageView
    • Displaying Long Lines of Text with UITextView/Displaying Long Lines of Text with UITextView
    • Displaying Progress with UIProgressView/Displaying Progress with UIProgressView
    • Displaying Static Text with UILabel/Displaying Static Text with UILabel
    • Grouping Compact Options with UISegmentedControl/Grouping Compact Options with UISegmentedControl
    • Implementing Range Pickers with UISlider/Implementing Range Pickers with UISlider
    • Loading Web Pages with UIWebView/Loading Web Pages with UIWebView
    • Loading Web Pages with WebKit/Loading Web Pages with WebKit
    • Picking Values with the UIPickerView/Picking Values with the UIPickerView
    • Picking the Date and Time with UIDatePicker/Picking the Date and Time with UIDatePicker
    • Presenting Custom Sharing Options with UIActivityViewController/Presenting Custom Sharing Options with UIActivityViewController
    • Presenting Sharing Options with UIActivityViewController/Presenting Sharing Options with UIActivityViewController
    • Presenting Temporary Information on the Screen with Popovers/Presenting Temporary Information on the Screen with Popovers
  • chapter-concurrency
    • Adding Background Fetch Capabilities to Your Apps/Adding Background Fetch Capabilities to Your Apps
    • Completing a Long-Running Task in the Background/Completing a Long-Running Task in the Background
    • Creating Dependency Between Operations/Creating Dependency Between Operations
    • Creating Simple Concurrency with Operations/Creating Simple Concurrency with Operations
    • Firing Periodic Tasks/Firing Periodic Tasks
    • Grouping Tasks Together/Grouping Tasks Together
    • Handling Location Changes in the Background/Handling Location Changes in the Background
    • Handling Network Connections in the Background/Handling Network Connections in the Background
    • Performing Tasks After a Delay/Performing Tasks After a Delay
    • Performing a Task Only Once/Performing a Task Only Once
    • Playing Audio in the Background/Playing Audio in the Background
    • Scheduling a Background Activity/Scheduling a Background Activity
  • chapter-datesCaneldarsEvents
  • chapter-dynamics
    • Adding Gravity to Your UI Components/Adding Gravity to Your UI Components
    • Adding a Dynamic Snap Effect to Your UI Components/Adding a Dynamic Snap Effect to Your UI Components
    • Animating Your UI Components With a Push/Animating Your UI Components With a Push
    • Assigning Characteristics to Your Dynamic Effects/Assigning Characteristics to Your Dynamic Effects
    • Attaching Multiple Dynamic Items to Each Other/Attaching Multiple Dynamic Items to Each Other
    • Detecting and Reacting to Collisions Between UI Components/Detecting and Reacting to Collisions Between UI Components
  • chapter-fileManagement
  • chapter-graphics
  • chapter-maps
    • Displaying Custom Pins on a Map View/Displaying Custom Pins on a Map View
    • Displaying Pins on a Map View/Displaying Pins on a Map View
    • Pinpointing the Location of a Device/Pinpointing the Location of a Device
  • chapter-security
    • Authenticating the User with Touch ID/Authenticating the User with Touch ID
    • Deleting Exiting Values in the Keychain/Deleting Exiting Values in the Keychain
    • Enabling Security and Protection for Your Apps/Enabling Security and Protection for Your Apps
    • Finding Values in the Keychain/Finding Values in the Keychain
    • Sharing Keychain Data Between Multiple Apps - Reading/Sharing Keychain Data Between Multiple Apps - Reading
    • Sharing Keychain Data Between Multiple Apps - Writing/Sharing Keychain Data Between Multiple Apps - Writing
    • Storing Files Securely in the App Sandbox/Storing Files Securely in the App Sandbox
    • Storing Values in the Keychain/Storing Values in the Keychain
    • Updating Existing Values in the Keychain/Updating Existing Values in the Keychain
    • Writing to and Reading Keychain Data from iCloud/Writing to and Reading Keychain Data from iCloud
  • chapter-tables
    • Adding Custom Interactions to Collection Views/Adding Custom Interactions to Collection Views
    • Constructing Headers and Footers in Table Views/Constructing Headers and Footers in Table Views
    • Displaying a Refresh Control for Table Views/Displaying a Refresh Control for Table Views
    • Enabling Swipe Deletion of Table View Cells/Enabling Swipe Deletion of Table View Cells
    • Feeding Custom Cells to Collection Views Using .xib Files/Feeding Custom Cells to Collection Views Using .xib Files
    • Handling Events in Collection Views/Handling Events in Collection Views
    • Populating a Table View with Data/Populating a Table View with Data
    • Providing Basic Content to a Collection View/Providing Basic Content to a Collection View
  • ios8swiftprogrammingcookbook.xcworkspace/xcuserdata/vandadnp.xcuserdatad

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+109
-103
lines changed

chapter-addressBook/Retrieving a Person Entity with System UI/Retrieving a Person Entity with System UI/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2828

2929
var window: UIWindow?
3030

31-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
31+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
3232
// Override point for customization after application launch.
3333
return true
3434
}

chapter-basics/Accepting User Text Input with UITextField/Accepting User Text Input with UITextField/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2828

2929
var window: UIWindow?
3030

31-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
31+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
3232
// Override point for customization after application launch.
3333
return true
3434
}

chapter-basics/Adding Blur Effects to Your Views/Adding Blur Effects to Your Views/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2828

2929
var window: UIWindow?
3030

31-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
31+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
3232
// Override point for customization after application launch.
3333
return true
3434
}

chapter-basics/Adding Buttons to Navigation Bars Using UIBarButtonItem/Adding Buttons to Navigation Bars Using UIBarButtonItem/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2828

2929
var window: UIWindow?
3030

31-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
31+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
3232
// Override point for customization after application launch.
3333
return true
3434
}

chapter-basics/Adding Buttons to the User Interface with UIButton/Adding Buttons to the User Interface with UIButton/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2828

2929
var window: UIWindow?
3030

31-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
31+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
3232
// Override point for customization after application launch.
3333
return true
3434
}

chapter-basics/Creating Scrollable Content with UIScrollView/Creating Scrollable Content with UIScrollView/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2828

2929
var window: UIWindow?
3030

31-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
31+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
3232
// Override point for customization after application launch.
3333
return true
3434
}

chapter-basics/Creating, Using and Customizing Switches with UISwitch/Creating, Using and Customizing Switches with UISwitch/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2828

2929
var window: UIWindow?
3030

31-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
31+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
3232
// Override point for customization after application launch.
3333
return true
3434
}

chapter-basics/Displaying Alerts and Action Sheets/Displaying Alerts and Action Sheets/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2828

2929
var window: UIWindow?
3030

31-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
31+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
3232
// Override point for customization after application launch.
3333
return true
3434
}

chapter-basics/Displaying Images with UIImageView/Displaying Images with UIImageView/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2828

2929
var window: UIWindow?
3030

31-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
31+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
3232
// Override point for customization after application launch.
3333
return true
3434
}

chapter-basics/Displaying Long Lines of Text with UITextView/Displaying Long Lines of Text with UITextView/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2828

2929
var window: UIWindow?
3030

31-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
31+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
3232
// Override point for customization after application launch.
3333
return true
3434
}

chapter-basics/Displaying Progress with UIProgressView/Displaying Progress with UIProgressView/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2828

2929
var window: UIWindow?
3030

31-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
31+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
3232
// Override point for customization after application launch.
3333
return true
3434
}

chapter-basics/Displaying Static Text with UILabel/Displaying Static Text with UILabel/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2828

2929
var window: UIWindow?
3030

31-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
31+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
3232
// Override point for customization after application launch.
3333
return true
3434
}

chapter-basics/Displaying an Image on a Navigation Bar/Displaying an Image on a Navigation Bar/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2828

2929
var window: UIWindow?
3030

31-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
31+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
3232
// Override point for customization after application launch.
3333
return true
3434
}

chapter-basics/Grouping Compact Options with UISegmentedControl/Grouping Compact Options with UISegmentedControl/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2828

2929
var window: UIWindow?
3030

31-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
31+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
3232
// Override point for customization after application launch.
3333
return true
3434
}

chapter-basics/Implementing Range Pickers with UISlider/Implementing Range Pickers with UISlider/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2828

2929
var window: UIWindow?
3030

31-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
31+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
3232
// Override point for customization after application launch.
3333
return true
3434
}

chapter-basics/Loading Web Pages with UIWebView/Loading Web Pages with UIWebView/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2828

2929
var window: UIWindow?
3030

31-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
31+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
3232
// Override point for customization after application launch.
3333
return true
3434
}

chapter-basics/Loading Web Pages with WebKit/Loading Web Pages with WebKit/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2828

2929
var window: UIWindow?
3030

31-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
31+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
3232
// Override point for customization after application launch.
3333
return true
3434
}

chapter-basics/Picking Values with the UIPickerView/Picking Values with the UIPickerView/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2828

2929
var window: UIWindow?
3030

31-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
31+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
3232
// Override point for customization after application launch.
3333
return true
3434
}

chapter-basics/Picking the Date and Time with UIDatePicker/Picking the Date and Time with UIDatePicker/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2828

2929
var window: UIWindow?
3030

31-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
31+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
3232
// Override point for customization after application launch.
3333
return true
3434
}

chapter-basics/Presenting Custom Sharing Options with UIActivityViewController/Presenting Custom Sharing Options with UIActivityViewController/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2828

2929
var window: UIWindow?
3030

31-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
31+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
3232
// Override point for customization after application launch.
3333
return true
3434
}

chapter-basics/Presenting Sharing Options with UIActivityViewController/Presenting Sharing Options with UIActivityViewController/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2828

2929
var window: UIWindow?
3030

31-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
31+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
3232
// Override point for customization after application launch.
3333
return true
3434
}

chapter-basics/Presenting Temporary Information on the Screen with Popovers/Presenting Temporary Information on the Screen with Popovers/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2828

2929
var window: UIWindow?
3030

31-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
31+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
3232
// Override point for customization after application launch.
3333
return true
3434
}

chapter-concurrency/Adding Background Fetch Capabilities to Your Apps/Adding Background Fetch Capabilities to Your Apps/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
3636
}
3737

3838
func application(application: UIApplication,
39-
didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
39+
didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
4040

4141
newsItems.append(NewsItem(date: NSDate(), text: "News Item 1"))
4242

chapter-concurrency/Completing a Long-Running Task in the Background/Completing a Long-Running Task in the Background/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
3434
var myTimer: NSTimer?
3535

3636
func application(application: UIApplication,
37-
didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
37+
didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
3838
return true
3939
}
4040

chapter-concurrency/Creating Dependency Between Operations/Creating Dependency Between Operations/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2828

2929
var window: UIWindow?
3030

31-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
31+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
3232
// Override point for customization after application launch.
3333
return true
3434
}

chapter-concurrency/Creating Simple Concurrency with Operations/Creating Simple Concurrency with Operations/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2828

2929
var window: UIWindow?
3030

31-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
31+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
3232
// Override point for customization after application launch.
3333
return true
3434
}

chapter-concurrency/Firing Periodic Tasks/Firing Periodic Tasks/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
5252
}
5353

5454
func application(application: UIApplication,
55-
didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
55+
didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
5656
return true
5757
}
5858

chapter-concurrency/Grouping Tasks Together/Grouping Tasks Together/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2828

2929
var window: UIWindow?
3030

31-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
31+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
3232
// Override point for customization after application launch.
3333
return true
3434
}

chapter-concurrency/Handling Location Changes in the Background/Handling Location Changes in the Background/AppDelegate.swift

+11-10
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,19 @@ CLLocationManagerDelegate {
3232
var locationManager: CLLocationManager! = nil
3333
var isExecutingInBackground = false
3434

35-
func locationManager(manager: CLLocationManager!,
36-
didUpdateToLocation newLocation: CLLocation!,
37-
fromLocation oldLocation: CLLocation!){
38-
if isExecutingInBackground{
39-
/* We are in the background. Do not do any heavy processing */
40-
} else {
41-
/* We are in the foreground. Do any processing that you wish */
42-
}
43-
}
35+
func locationManager(manager: CLLocationManager!,
36+
didUpdateToLocation newLocation: CLLocation!,
37+
fromLocation oldLocation: CLLocation!){
38+
if isExecutingInBackground{
39+
/* We are in the background. Do not do any heavy processing */
40+
} else {
41+
/* We are in the foreground. Do any processing that you wish */
42+
}
43+
}
4444

4545
func application(application: UIApplication,
46-
didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
46+
didFinishLaunchingWithOptions
47+
launchOptions: [NSObject : AnyObject]?) -> Bool {
4748
locationManager = CLLocationManager()
4849
locationManager.desiredAccuracy = kCLLocationAccuracyBest
4950
locationManager.delegate = self

chapter-concurrency/Handling Network Connections in the Background/Handling Network Connections in the Background/AppDelegate.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
// var window: UIWindow?
3131
//
3232
// func application(application: UIApplication,
33-
// didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
33+
// didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
3434
//
3535
// let urlAsString = "http://www.apple.com"
3636
// let url = NSURL(string: urlAsString)
@@ -68,7 +68,7 @@
6868
// var window: UIWindow?
6969
//
7070
// func application(application: UIApplication,
71-
// didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
71+
// didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
7272
//
7373
// let urlAsString = "http://www.apple.com"
7474
// let url = NSURL(string: urlAsString)
@@ -104,7 +104,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
104104
var window: UIWindow?
105105

106106
func application(application: UIApplication,
107-
didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
107+
didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
108108

109109
let dispatchQueue =
110110
dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)

chapter-concurrency/Performing Non-UI Related Tasks/Performing Non-UI Related Tasks/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2828

2929
var window: UIWindow?
3030

31-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
31+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
3232
// Override point for customization after application launch.
3333
return true
3434
}

chapter-concurrency/Performing Tasks After a Delay/Performing Tasks After a Delay/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2828

2929
var window: UIWindow?
3030

31-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
31+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
3232
// Override point for customization after application launch.
3333
return true
3434
}

chapter-concurrency/Performing UI-Related Tasks/Performing UI-Related Tasks/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2828

2929
var window: UIWindow?
3030

31-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
31+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
3232
// Override point for customization after application launch.
3333
return true
3434
}

chapter-concurrency/Performing a Task Only Once/Performing a Task Only Once/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2828

2929
var window: UIWindow?
3030

31-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
31+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
3232
// Override point for customization after application launch.
3333
return true
3434
}

chapter-concurrency/Playing Audio in the Background/Playing Audio in the Background/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, AVAudioPlayerDelegate {
3131
var audioPlayer: AVAudioPlayer?
3232

3333
func application(application: UIApplication,
34-
didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
34+
didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
3535

3636
let dispatchQueue =
3737
dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)

chapter-concurrency/Scheduling a Background Activity/Scheduling a Background Activity/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2828

2929
var window: UIWindow?
3030

31-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
31+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
3232
// Override point for customization after application launch.
3333
return true
3434
}

chapter-datesCaneldarsEvents/Accessing the Contents of Calendars/Accessing the Contents of Calendars/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
151151

152152
}
153153

154-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
154+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
155155
example1()
156156
self.window = UIWindow(frame: UIScreen.mainScreen().bounds)
157157
// Override point for customization after application launch.

chapter-datesCaneldarsEvents/Adding Alarms to Calendars/Adding Alarms to Calendars/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
149149

150150
}
151151

152-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
152+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
153153

154154
example1()
155155

chapter-datesCaneldarsEvents/Adding Events to Calendars/Adding Events to Calendars/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
181181

182182
}
183183

184-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
184+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
185185

186186
example1()
187187

chapter-datesCaneldarsEvents/Adding Recurring Events to Calendars/Adding Recurring Events to Calendars/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ func createRecurringEventInStore(store: EKEventStore, calendar: EKCalendar)
275275

276276
}
277277

278-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
278+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
279279
example1()
280280
self.window = UIWindow(frame: UIScreen.mainScreen().bounds)
281281
// Override point for customization after application launch.

0 commit comments

Comments
 (0)