ios app extensions - raywenderlich.com · introduction to cloudkit part 7: sub... nov 10, 2014,...

6
iOS App Extensions Today Extensions: Updating

Upload: others

Post on 24-Jun-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: iOS App Extensions - raywenderlich.com · Introduction to CloudKit Part 7: Sub... Nov 10, 2014, 12:00 PM Calendar Tomorrow You have no events scheduled for tomorrow. raywenderlich.com

iOS App Extensions

Today Extensions: Updating

Page 2: iOS App Extensions - raywenderlich.com · Introduction to CloudKit Part 7: Sub... Nov 10, 2014, 12:00 PM Calendar Tomorrow You have no events scheduled for tomorrow. raywenderlich.com
Page 3: iOS App Extensions - raywenderlich.com · Introduction to CloudKit Part 7: Sub... Nov 10, 2014, 12:00 PM Calendar Tomorrow You have no events scheduled for tomorrow. raywenderlich.com

NSURLSession

// 2: Work in the background NSURLSessionConfiguration.backgroundSessionConfigurationWithIdentifier(config)

// 3: Set the shared container identifier config.sharedContainerIdentifier = “group.com.myGroupID”

// 1: Set separate configuration identifiers config.sharedContainerIdentifier = “com.myApp” config.sharedContainerIdentifier = “com.myAppExtension”

Page 4: iOS App Extensions - raywenderlich.com · Introduction to CloudKit Part 7: Sub... Nov 10, 2014, 12:00 PM Calendar Tomorrow You have no events scheduled for tomorrow. raywenderlich.com

Background Refresh

func widgetPerformUpdateWithCompletionHandler( completionHandler: ((NCUpdateResult) -> Void)!) {

}

case NewData case NoData case Failed

Page 5: iOS App Extensions - raywenderlich.com · Introduction to CloudKit Part 7: Sub... Nov 10, 2014, 12:00 PM Calendar Tomorrow You have no events scheduled for tomorrow. raywenderlich.com

Demo

RWFetcher Widget update Delegate

Page 6: iOS App Extensions - raywenderlich.com · Introduction to CloudKit Part 7: Sub... Nov 10, 2014, 12:00 PM Calendar Tomorrow You have no events scheduled for tomorrow. raywenderlich.com

Challenge Time!