Skip to content

Commit 7ebd80e

Browse files
committed
Updated all the recipes to ensure they build and work fine with Xcode 6, beta 2 (6A1052c)
1 parent 47fb730 commit 7ebd80e

File tree

81 files changed

+400
-367
lines changed
  • chapter-addressBook/Retrieving a Property of a Person Entity with System UI/Retrieving a Property of a Person Entity with System UI
  • chapter-camera
    • Detecting and Probing the Camera/Detecting and Probing the Camera
    • Editing Images and Videos Right on the Device/Editing Images and Videos Right on the Device
    • Reacting to Changes in Images and Videos/Reacting to Changes in Images and Videos
    • Searching for and Retrieving Images and Videos/Searching for and Retrieving Images and Videos
    • Storing Photos in the Photo Library/Storing Photos in the Photo Library
    • Storing Videos in the Photo Library/Storing Videos in the Photo Library
    • Taking Photos with the Camera/Taking Photos with the Camera
    • Taking Videos with the Camera/Taking Videos with the Camera
  • chapter-cloud
  • chapter-data
  • chapter-extensions
    • Adding New Photo Editing Capabilities to the Photos App/Adding New Photo Editing Capabilities to the Photos App
    • Building Custom Keyboards/Building Custom Keyboards
    • Creating a Service Within Your App with Action Extensions/Creating a Service Within Your App with Action Extensions
    • Providing a Custom Sharing Extension to iOS/Providing a Custom Sharing Extension to iOS
  • chapter-gestures
  • chapter-health
  • chapter-homekit
    • Adding Rooms to the User’s Home/Adding Rooms to the User’s Home
    • Discovering and Managing HomeKit Enabled Accessories/Discovering and Managing HomeKit Enabled Accessories
    • Grouping Services of HomeKit Accessories/Grouping Services of HomeKit Accessories
    • Interacting with HomeKit Accessories/Interacting with HomeKit Accessories
    • Managing the User’s Home in HomeKit/Managing the User’s Home in HomeKit
    • Simulating HomeKit Accessories/Simulating HomeKit Accessories
    • Specifying Zones in the User’s Home/Specifying Zones in the User’s Home
  • chapter-maps
    • Customizing the View of the Map with a Camera/Customizing the View of the Map with a Camera
    • Defining and Processing iBeacons - Destination/Defining and Processing iBeacons - Destination
    • Defining and Processing iBeacons - Source/Defining and Processing iBeacons - Source
    • Detecting Which Floor the User is on in a Building/Detecting Which Floor the User is on in a Building
    • Displaying Directions on The Map/Displaying Directions on The Map
    • Searching on a Map View/Searching on a Map View
  • chapter-motion
  • chapter-multimedia
  • chapter-networking
    • Creating a Tunneled VPN Connection/Creating a Tunneled VPN Connection
    • Customizing URL Requests/Customizing URL Requests
    • Downloading Asynchronously with NSURLConnection/Downloading Asynchronously with NSURLConnection
    • Downloading Data Using NSURLSession/Downloading Data Using NSURLSession
    • Downloading Data in the Background Using NSURLSession/Downloading Data in the Background Using NSURLSession
    • Downloading Synchronously with NSURLConnection/Downloading Synchronously with NSURLConnection
    • Handling Timeouts in Asynchronous Connections/Handling Timeouts in Asynchronous Connections
    • Integrating Social Sharing into Your Apps/Integrating Social Sharing into Your Apps
    • Sending HTTP Requests with NSURLConnection/Sending HTTP Requests with NSURLConnection
    • Serializing and Deserializing JSON Objects/Serializing and Deserializing JSON Objects
    • Uploading Data Using NSURLSession/Uploading Data Using NSURLSession
  • chapter-notification
    • Listening and Reacting to Keyboard Notifications/Listening and Reacting to Keyboard Notifications
    • Sending Notifications/Sending Notifications
    • Setting Up Your App for Push Notifications/Setting Up Your App for Push Notifications
  • 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.

81 files changed

+400
-367
lines changed

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

+5-5
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,25 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
3333
return true
3434
}
3535

36-
func applicationWillResignActive(application: UIApplication!) {
36+
func applicationWillResignActive(application: UIApplication) {
3737
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
3838
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
3939
}
4040

41-
func applicationDidEnterBackground(application: UIApplication!) {
41+
func applicationDidEnterBackground(application: UIApplication) {
4242
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
4343
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
4444
}
4545

46-
func applicationWillEnterForeground(application: UIApplication!) {
46+
func applicationWillEnterForeground(application: UIApplication) {
4747
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
4848
}
4949

50-
func applicationDidBecomeActive(application: UIApplication!) {
50+
func applicationDidBecomeActive(application: UIApplication) {
5151
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
5252
}
5353

54-
func applicationWillTerminate(application: UIApplication!) {
54+
func applicationWillTerminate(application: UIApplication) {
5555
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
5656
}
5757

chapter-camera/Detecting and Probing the Camera/Detecting and Probing the Camera/AppDelegate.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,25 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
3333
return true
3434
}
3535

36-
func applicationWillResignActive(application: UIApplication!) {
36+
func applicationWillResignActive(application: UIApplication) {
3737
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
3838
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
3939
}
4040

41-
func applicationDidEnterBackground(application: UIApplication!) {
41+
func applicationDidEnterBackground(application: UIApplication) {
4242
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
4343
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
4444
}
4545

46-
func applicationWillEnterForeground(application: UIApplication!) {
46+
func applicationWillEnterForeground(application: UIApplication) {
4747
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
4848
}
4949

50-
func applicationDidBecomeActive(application: UIApplication!) {
50+
func applicationDidBecomeActive(application: UIApplication) {
5151
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
5252
}
5353

54-
func applicationWillTerminate(application: UIApplication!) {
54+
func applicationWillTerminate(application: UIApplication) {
5555
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
5656
}
5757

chapter-camera/Editing Images and Videos Right on the Device/Editing Images and Videos Right on the Device/AppDelegate.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,25 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
3333
return true
3434
}
3535

36-
func applicationWillResignActive(application: UIApplication!) {
36+
func applicationWillResignActive(application: UIApplication) {
3737
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
3838
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
3939
}
4040

41-
func applicationDidEnterBackground(application: UIApplication!) {
41+
func applicationDidEnterBackground(application: UIApplication) {
4242
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
4343
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
4444
}
4545

46-
func applicationWillEnterForeground(application: UIApplication!) {
46+
func applicationWillEnterForeground(application: UIApplication) {
4747
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
4848
}
4949

50-
func applicationDidBecomeActive(application: UIApplication!) {
50+
func applicationDidBecomeActive(application: UIApplication) {
5151
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
5252
}
5353

54-
func applicationWillTerminate(application: UIApplication!) {
54+
func applicationWillTerminate(application: UIApplication) {
5555
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
5656
}
5757

chapter-camera/Reacting to Changes in Images and Videos/Reacting to Changes in Images and Videos/AppDelegate.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,25 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
3333
return true
3434
}
3535

36-
func applicationWillResignActive(application: UIApplication!) {
36+
func applicationWillResignActive(application: UIApplication) {
3737
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
3838
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
3939
}
4040

41-
func applicationDidEnterBackground(application: UIApplication!) {
41+
func applicationDidEnterBackground(application: UIApplication) {
4242
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
4343
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
4444
}
4545

46-
func applicationWillEnterForeground(application: UIApplication!) {
46+
func applicationWillEnterForeground(application: UIApplication) {
4747
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
4848
}
4949

50-
func applicationDidBecomeActive(application: UIApplication!) {
50+
func applicationDidBecomeActive(application: UIApplication) {
5151
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
5252
}
5353

54-
func applicationWillTerminate(application: UIApplication!) {
54+
func applicationWillTerminate(application: UIApplication) {
5555
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
5656
}
5757

chapter-camera/Searching for and Retrieving Images and Videos/Searching for and Retrieving Images and Videos/AppDelegate.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,25 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
3333
return true
3434
}
3535

36-
func applicationWillResignActive(application: UIApplication!) {
36+
func applicationWillResignActive(application: UIApplication) {
3737
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
3838
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
3939
}
4040

41-
func applicationDidEnterBackground(application: UIApplication!) {
41+
func applicationDidEnterBackground(application: UIApplication) {
4242
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
4343
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
4444
}
4545

46-
func applicationWillEnterForeground(application: UIApplication!) {
46+
func applicationWillEnterForeground(application: UIApplication) {
4747
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
4848
}
4949

50-
func applicationDidBecomeActive(application: UIApplication!) {
50+
func applicationDidBecomeActive(application: UIApplication) {
5151
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
5252
}
5353

54-
func applicationWillTerminate(application: UIApplication!) {
54+
func applicationWillTerminate(application: UIApplication) {
5555
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
5656
}
5757

chapter-camera/Storing Photos in the Photo Library/Storing Photos in the Photo Library/AppDelegate.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,25 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
3333
return true
3434
}
3535

36-
func applicationWillResignActive(application: UIApplication!) {
36+
func applicationWillResignActive(application: UIApplication) {
3737
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
3838
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
3939
}
4040

41-
func applicationDidEnterBackground(application: UIApplication!) {
41+
func applicationDidEnterBackground(application: UIApplication) {
4242
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
4343
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
4444
}
4545

46-
func applicationWillEnterForeground(application: UIApplication!) {
46+
func applicationWillEnterForeground(application: UIApplication) {
4747
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
4848
}
4949

50-
func applicationDidBecomeActive(application: UIApplication!) {
50+
func applicationDidBecomeActive(application: UIApplication) {
5151
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
5252
}
5353

54-
func applicationWillTerminate(application: UIApplication!) {
54+
func applicationWillTerminate(application: UIApplication) {
5555
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
5656
}
5757

chapter-camera/Storing Videos in the Photo Library/Storing Videos in the Photo Library/AppDelegate.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,25 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
3333
return true
3434
}
3535

36-
func applicationWillResignActive(application: UIApplication!) {
36+
func applicationWillResignActive(application: UIApplication) {
3737
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
3838
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
3939
}
4040

41-
func applicationDidEnterBackground(application: UIApplication!) {
41+
func applicationDidEnterBackground(application: UIApplication) {
4242
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
4343
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
4444
}
4545

46-
func applicationWillEnterForeground(application: UIApplication!) {
46+
func applicationWillEnterForeground(application: UIApplication) {
4747
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
4848
}
4949

50-
func applicationDidBecomeActive(application: UIApplication!) {
50+
func applicationDidBecomeActive(application: UIApplication) {
5151
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
5252
}
5353

54-
func applicationWillTerminate(application: UIApplication!) {
54+
func applicationWillTerminate(application: UIApplication) {
5555
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
5656
}
5757

chapter-camera/Taking Photos with the Camera/Taking Photos with the Camera/AppDelegate.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,25 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
3333
return true
3434
}
3535

36-
func applicationWillResignActive(application: UIApplication!) {
36+
func applicationWillResignActive(application: UIApplication) {
3737
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
3838
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
3939
}
4040

41-
func applicationDidEnterBackground(application: UIApplication!) {
41+
func applicationDidEnterBackground(application: UIApplication) {
4242
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
4343
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
4444
}
4545

46-
func applicationWillEnterForeground(application: UIApplication!) {
46+
func applicationWillEnterForeground(application: UIApplication) {
4747
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
4848
}
4949

50-
func applicationDidBecomeActive(application: UIApplication!) {
50+
func applicationDidBecomeActive(application: UIApplication) {
5151
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
5252
}
5353

54-
func applicationWillTerminate(application: UIApplication!) {
54+
func applicationWillTerminate(application: UIApplication) {
5555
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
5656
}
5757

chapter-camera/Taking Videos with the Camera/Taking Videos with the Camera/AppDelegate.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,25 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
3333
return true
3434
}
3535

36-
func applicationWillResignActive(application: UIApplication!) {
36+
func applicationWillResignActive(application: UIApplication) {
3737
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
3838
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
3939
}
4040

41-
func applicationDidEnterBackground(application: UIApplication!) {
41+
func applicationDidEnterBackground(application: UIApplication) {
4242
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
4343
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
4444
}
4545

46-
func applicationWillEnterForeground(application: UIApplication!) {
46+
func applicationWillEnterForeground(application: UIApplication) {
4747
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
4848
}
4949

50-
func applicationDidBecomeActive(application: UIApplication!) {
50+
func applicationDidBecomeActive(application: UIApplication) {
5151
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
5252
}
5353

54-
func applicationWillTerminate(application: UIApplication!) {
54+
func applicationWillTerminate(application: UIApplication) {
5555
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
5656
}
5757

0 commit comments

Comments
 (0)