App Extension Best Practices
|
|
- Logan Abel York
- 6 years ago
- Views:
Transcription
1 App Frameworks #WWDC15 App Extension Best Practices Session 224 Sophia Teutschler UIKit Engineer Ian Baird CoreOS Engineer 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple.
2 Agenda
3 Agenda Action and Share Extensions
4 Agenda Action and Share Extensions Today widget enhancements
5 Agenda Action and Share Extensions Today widget enhancements Real world examples
6 Action and Share Extensions
7 Action and Share Extensions Action Share
8 Action and Share Extensions Action Extensions Action
9 Action and Share Extensions Action Extensions Acts on the current content Action
10 Action and Share Extensions Action Extensions Acts on the current content Uses the content as the user interface Action
11 Action and Share Extensions Action Extensions Acts on the current content Uses the content as the user interface Opportunity to present additional options Action
12 Action and Share Extensions Action Extensions Acts on the current content Uses the content as the user interface Opportunity to present additional options App can provide multiple Action Extensions Action
13
14
15
16
17
18
19
20 Action and Share Extensions Action Share
21 Action and Share Extensions Share
22 Action and Share Extensions Share Extensions Share
23 Action and Share Extensions Share Extensions Shares content to your app or web service Share
24 Action and Share Extensions Share Extensions Shares content to your app or web service Allows validation and editing Share
25 Action and Share Extensions Share Extensions Shares content to your app or web service Allows validation and editing Can use SLComposeServiceViewController Share
26 Action and Share Extensions Share Extensions Shares content to your app or web service Allows validation and editing Can use SLComposeServiceViewController Your app provides one Share Extension Share
27
28
29
30
31
32 Action and Share Extensions SLComposeServiceViewController
33 Action and Share Extensions SLComposeServiceViewController
34 Action and Share Extensions SLComposeServiceViewController viewcontroller.placeholder = "Caption (Optional)"
35 Action and Share Extensions SLComposeServiceViewController viewcontroller.placeholder = "Caption (Optional)"
36 Action and Share Extensions SLComposeServiceViewController viewcontroller.charactersremaining = 80
37 Action and Share Extensions SLComposeServiceViewController viewcontroller.charactersremaining = 80
38 Action and Share Extensions SLComposeServiceViewController override func loadpreviewview() -> UIView! { } return FaceDetectingPreviewView( )
39 Action and Share Extensions SLComposeServiceViewController override func loadpreviewview() -> UIView! { } return FaceDetectingPreviewView( )
40 Action and Share Extensions SLComposeServiceViewController func configurationitems() -> [SLComposeSheetConfigurationItem]
41 Action and Share Extensions SLComposeServiceViewController func configurationitems() -> [SLComposeSheetConfigurationItem]
42 Action and Share Extensions SLComposeServiceViewController override func configurationitems() -> [AnyObject]! { let item = SLComposeSheetConfigurationItem() item.title = "Blog" item.value = "My Road Trips" item.taphandler = { let viewcontroller = BlogPickerViewController() self.pushconfigurationviewcontroller(viewcontroller) } } return [ item ]
43 Action and Share Extensions SLComposeServiceViewController override func configurationitems() -> [AnyObject]! { let item = SLComposeSheetConfigurationItem() item.title = "Blog" item.value = "My Road Trips" item.taphandler = { let viewcontroller = BlogPickerViewController() self.pushconfigurationviewcontroller(viewcontroller) } } return [ item ]
44 Action and Share Extensions SLComposeServiceViewController override func configurationitems() -> [AnyObject]! { let item = SLComposeSheetConfigurationItem() item.title = "Blog" item.value = "My Road Trips" item.taphandler = { let viewcontroller = BlogPickerViewController() self.pushconfigurationviewcontroller(viewcontroller) } } return [ item ]
45 Action and Share Extensions SLComposeServiceViewController override func configurationitems() -> [AnyObject]! { let item = SLComposeSheetConfigurationItem() item.title = "Blog" item.value = "My Road Trips" item.taphandler = { let viewcontroller = BlogPickerViewController() self.pushconfigurationviewcontroller(viewcontroller) } } return [ item ]
46 Action and Share Extensions SLComposeServiceViewController override func configurationitems() -> [AnyObject]! { let item = SLComposeSheetConfigurationItem() item.title = "Blog" item.value = "My Road Trips" item.taphandler = { let viewcontroller = BlogPickerViewController() self.pushconfigurationviewcontroller(viewcontroller) } } return [ item ]
47 Action and Share Extensions SLComposeServiceViewController override func configurationitems() -> [AnyObject]! { let item = SLComposeSheetConfigurationItem() item.title = "Blog" item.value = "My Road Trips" item.taphandler = { let viewcontroller = BlogPickerViewController() self.pushconfigurationviewcontroller(viewcontroller) } } return [ item ]
48 Action and Share Extensions SLComposeServiceViewController override func configurationitems() -> [AnyObject]! { let item = SLComposeSheetConfigurationItem() item.title = "Blog" item.value = "My Road Trips" item.taphandler = { let viewcontroller = BlogPickerViewController() self.pushconfigurationviewcontroller(viewcontroller) } } return [ item ]
49 Action and Share Extensions SLComposeServiceViewController override func configurationitems() -> [AnyObject]! { let item = SLComposeSheetConfigurationItem() item.title = "Blog" item.value = "My Road Trips" item.taphandler = { let viewcontroller = BlogPickerViewController() self.pushconfigurationviewcontroller(viewcontroller) } } return [ item ]
50 Action and Share Extensions SLComposeServiceViewController override func configurationitems() -> [AnyObject]! { let item = SLComposeSheetConfigurationItem() item.title = "Blog" item.value = "My Road Trips" item.taphandler = { let viewcontroller = BlogPickerViewController() self.pushconfigurationviewcontroller(viewcontroller) } } return [ item ]
51 Action and Share Extensions SLComposeServiceViewController viewcontroller.autocompletionviewcontroller = SuggestionViewController( )
52 Action and Share Extensions SLComposeServiceViewController viewcontroller.autocompletionviewcontroller = SuggestionViewController( )
53 Action and Share Extensions SLComposeServiceViewController
54 Action and Share Extensions SLComposeServiceViewController Provides consistent and familiar UI
55 Action and Share Extensions SLComposeServiceViewController Provides consistent and familiar UI Customizable
56 Action and Share Extensions SLComposeServiceViewController Provides consistent and familiar UI Customizable Completely custom UI using UIViewController
57
58 Action and Share Extensions Being a good host kuttypeplaintext
59 Action and Share Extensions Being a good host kuttypepdf
60 Action and Share Extensions Being a good host kuttypehtml
61 Action and Share Extensions Being a good host
62 Action and Share Extensions Being a good host kuttypeplaintext kuttypepdf kuttypehtml
63 Action and Share Extensions Being a good host NSItemProvider kuttypeplaintext kuttypepdf kuttypehtml
64 Action and Share Extensions Being a good host let itemprovider = NSItemProvider() itemprovider.registeritemfortypeidentifier(kuttypeplaintext as String) { completionhandler, expectedclass, options in completionhandler(self.renderplaintextdocumentstring(), nil) } itemprovider.registeritemfortypeidentifier(kuttypepdf as String) { completionhandler, expectedclass, options in completionhandler(self.renderpdfdocument(), nil) } let vc = UIActivityViewController(activityItems: [ itemprovider ], applicationactivities: nil) self.presentviewcontroller(vc, animated: true, completion: nil)
65 Action and Share Extensions Being a good host let itemprovider = NSItemProvider() itemprovider.registeritemfortypeidentifier(kuttypeplaintext as String) { completionhandler, expectedclass, options in completionhandler(self.renderplaintextdocumentstring(), nil) } itemprovider.registeritemfortypeidentifier(kuttypepdf as String) { completionhandler, expectedclass, options in completionhandler(self.renderpdfdocument(), nil) } let vc = UIActivityViewController(activityItems: [ itemprovider ], applicationactivities: nil) self.presentviewcontroller(vc, animated: true, completion: nil)
66 Action and Share Extensions Being a good host let itemprovider = NSItemProvider() itemprovider.registeritemfortypeidentifier(kuttypeplaintext as String) { completionhandler, expectedclass, options in completionhandler(self.renderplaintextdocumentstring(), nil) } itemprovider.registeritemfortypeidentifier(kuttypepdf as String) { completionhandler, expectedclass, options in completionhandler(self.renderpdfdocument(), nil) } let vc = UIActivityViewController(activityItems: [ itemprovider ], applicationactivities: nil) self.presentviewcontroller(vc, animated: true, completion: nil)
67 Action and Share Extensions Being a good host let itemprovider = NSItemProvider() itemprovider.registeritemfortypeidentifier(kuttypeplaintext as String) { completionhandler, expectedclass, options in completionhandler(self.renderplaintextdocumentstring(), nil) } itemprovider.registeritemfortypeidentifier(kuttypepdf as String) { completionhandler, expectedclass, options in completionhandler(self.renderpdfdocument(), nil) } let vc = UIActivityViewController(activityItems: [ itemprovider ], applicationactivities: nil) self.presentviewcontroller(vc, animated: true, completion: nil)
68 Action and Share Extensions Being a good host let itemprovider = NSItemProvider() itemprovider.registeritemfortypeidentifier(kuttypeplaintext as String) { completionhandler, expectedclass, options in completionhandler(self.renderplaintextdocumentstring(), nil) } itemprovider.registeritemfortypeidentifier(kuttypepdf as String) { completionhandler, expectedclass, options in completionhandler(self.renderpdfdocument(), nil) } let vc = UIActivityViewController(activityItems: [ itemprovider ], applicationactivities: nil) self.presentviewcontroller(vc, animated: true, completion: nil)
69 Action and Share Extensions Being a good host let itemprovider = NSItemProvider() itemprovider.registeritemfortypeidentifier(kuttypeplaintext as String) { completionhandler, expectedclass, options in completionhandler(self.renderplaintextdocumentstring(), nil) } itemprovider.registeritemfortypeidentifier(kuttypepdf as String) { completionhandler, expectedclass, options in completionhandler(self.renderpdfdocument(), nil) } let vc = UIActivityViewController(activityItems: [ itemprovider ], applicationactivities: nil) self.presentviewcontroller(vc, animated: true, completion: nil)
70 Action and Share Extensions Being a good host let itemprovider = NSItemProvider() itemprovider.registeritemfortypeidentifier(kuttypeplaintext as String) { completionhandler, expectedclass, options in completionhandler(self.renderplaintextdocumentstring(), nil) } itemprovider.registeritemfortypeidentifier(kuttypepdf as String) { completionhandler, expectedclass, options in completionhandler(self.renderpdfdocument(), nil) } let vc = UIActivityViewController(activityItems: [ itemprovider ], applicationactivities: nil) self.presentviewcontroller(vc, animated: true, completion: nil)
71 Action and Share Extensions Being a good host let itemprovider = NSItemProvider() itemprovider.registeritemfortypeidentifier(kuttypeplaintext as String) { completionhandler, expectedclass, options in completionhandler(self.renderplaintextdocumentstring(), nil) } itemprovider.registeritemfortypeidentifier(kuttypepdf as String) { completionhandler, expectedclass, options in completionhandler(self.renderpdfdocument(), nil) } let vc = UIActivityViewController(activityItems: [ itemprovider ], applicationactivities: nil) self.presentviewcontroller(vc, animated: true, completion: nil)
72 Action and Share Extensions Being a good host let itemprovider = NSItemProvider() itemprovider.registeritemfortypeidentifier(kuttypeplaintext as String) { completionhandler, expectedclass, options in completionhandler(self.renderplaintextdocumentstring(), nil) } itemprovider.registeritemfortypeidentifier(kuttypepdf as String) { completionhandler, expectedclass, options in completionhandler(self.renderpdfdocument(), nil) } let vc = UIActivityViewController(activityItems: [ itemprovider ], applicationactivities: nil) self.presentviewcontroller(vc, animated: true, completion: nil)
73 Action and Share Extensions Being a good host let itemprovider = NSItemProvider() itemprovider.registeritemfortypeidentifier(kuttypeplaintext as String) { completionhandler, expectedclass, options in completionhandler(self.renderplaintextdocumentstring(), nil) } itemprovider.registeritemfortypeidentifier(kuttypepdf as String) { completionhandler, expectedclass, options in completionhandler(self.renderpdfdocument(), nil) } let vc = UIActivityViewController(activityItems: [ itemprovider ], applicationactivities: nil) self.presentviewcontroller(vc, animated: true, completion: nil)
74 Action and Share Extensions Being a good host
75 Action and Share Extensions Being a good host Host apps should offer content previews
76 Action and Share Extensions Being a good host Host apps should offer content previews Represents what will be shared
77 Action and Share Extensions Being a good host Host apps should offer content previews Represents what will be shared Simple and efficient representation of the content
78 Action and Share Extensions Being a good host itemprovider.previewimagehandler = { completionhandler, expectedclass, options in completionhandler(self.renderthumbnail(), nil) }
79 Action and Share Extensions Being a good host itemprovider.previewimagehandler = { completionhandler, expectedclass, options in completionhandler(self.renderthumbnail(), nil) }
80 Action and Share Extensions Being a good host itemprovider.previewimagehandler = { completionhandler, expectedclass, options in completionhandler(self.renderthumbnail(), nil) }
81 Action and Share Extensions Being a good host itemprovider.previewimagehandler = { completionhandler, expectedclass, options in completionhandler(self.renderthumbnail(), nil) }
82 Action and Share Extensions Activation rules
83 Action and Share Extensions Activation rules Host App kuttypeimage kuttypemovie
84 Action and Share Extensions Activation rules Host App NSExtensionActivationSupportsImage Extension kuttypeimage NSExtensionActivationSupportsMovie Extension NSExtensionActivationSupportsImage NSExtensionActivationSupportsMovie Extension kuttypemovie
85 Action and Share Extensions Activation rules Host App NSExtensionActivationSupportsImage Extension kuttypeimage NSExtensionActivationSupportsMovie Extension NSExtensionActivationSupportsImage NSExtensionActivationSupportsMovie Extension kuttypemovie
86 Action and Share Extensions Activation rules Host App NSExtensionActivationSupportsImage Extension kuttypeimage NSExtensionActivationSupportsMovie Extension NSExtensionActivationSupportsImage NSExtensionActivationSupportsMovie Extension kuttypemovie
87 Action and Share Extensions Activation rules Host App NSExtensionActivationSupportsImage Extension kuttypeimage NSExtensionActivationSupportsMovie Extension NSExtensionActivationSupportsImage NSExtensionActivationSupportsMovie Extension kuttypemovie
88 Action and Share Extensions Activation rules
89 Action and Share Extensions Activation rules
90 Action and Share Extensions Activation rules
91 Action and Share Extensions Activation rules Host App NSExtensionActivationSupportsImage Extension kuttypeimage NSExtensionActivationSupportsMovie Extension NSExtensionActivationSupportsImage NSExtensionActivationSupportsMovie Extension kuttypemovie
92 Action and Share Extensions Activation rules SUBQUERY(extensionItems, $extensionitem, SUBQUERY($extensionItem.attachments, $attachment, ANY $attachment.registeredtypeidentifiers UTI-CONFORMS-TO == == 1 OR SUBQUERY(extensionItems, $extensionitem, SUBQUERY($extensionItem.attachments, $attachment, ANY $attachment.registeredtypeidentifiers UTI-CONFORMS-TO "com.adobe.pdf").@count == 1).@count == 1
93 Action and Share Extensions Activation rules SUBQUERY(extensionItems, $extensionitem, SUBQUERY($extensionItem.attachments, $attachment, ANY $attachment.registeredtypeidentifiers UTI-CONFORMS-TO == == 1 OR SUBQUERY(extensionItems, $extensionitem, SUBQUERY($extensionItem.attachments, $attachment, ANY $attachment.registeredtypeidentifiers UTI-CONFORMS-TO "com.adobe.pdf").@count == 1).@count == 1
94 Action and Share Extensions Icons
95 Action and Share Extensions Icons Share Extensions use the containing app icon
96 Action and Share Extensions Icons Share Extensions use the containing app icon No additional work needed
97 Action and Share Extensions Icons
98 Action and Share Extensions Icons Action Extensions require template images
99 Action and Share Extensions Icons Action Extensions require template images Two sizes for iphone and ipad
100 Action and Share Extensions Icons Action Extensions require template images Two sizes for iphone and ipad Reside in the extension bundle
101 Action and Share Extensions Icons
102 Action and Share Extensions Action icons
103 Action and Share Extensions Action icons 60pt 76pt
104 Action and Share Extensions Action icons 29pt 40pt 60pt 76pt
105 Today Widget Enhancements Ian Baird CoreOS Engineer
106 Today Widget Enhancements Quick information at a glance
107 Today Widget Enhancements Quick information at a glance Enhance your Today widget
108 Today Widget Enhancements Quick information at a glance Enhance your Today widget General best practices
109
110
111
112
113 Working with the Containing App URL handlers Interactions use URLs to take user to app
114 Working with the Containing App URL handlers Interactions use URLs to take user to app Best practices
115 Working with the Containing App URL handlers Interactions use URLs to take user to app Best practices Use your app s registered URL schemes
116 Working with the Containing App URL handlers Interactions use URLs to take user to app Best practices Use your app s registered URL schemes System URL schemes
117 Working with the Containing App URL handlers Interactions use URLs to take user to app. Best practices Use your app s registered URL schemes System URL schemes func tableview(, didselectrowatindexpath indexpath: NSIndexPath) { let selectedname = names[indexpath.row] let URL = NSURL(string: "my-app://name=\(selectedname)")! extensioncontext!.openurl(url) { success in print("openurl returned: \(success)") } }
118 Working with the Containing App URL handlers Interactions use URLs to take user to app. Best practices Use your app s registered URL schemes System URL schemes func tableview(, didselectrowatindexpath indexpath: NSIndexPath) { let selectedname = names[indexpath.row] let URL = NSURL(string: "my-app://name=\(selectedname)")! extensioncontext!.openurl(url) { success in print("openurl returned: \(success)") } }
119 Working with the Containing App URL handlers Interactions use URLs to take user to app. Best practices Use your app s registered URL schemes System URL schemes func tableview(, didselectrowatindexpath indexpath: NSIndexPath) { let selectedname = names[indexpath.row] let URL = NSURL(string: "my-app://name=\(selectedname)")! extensioncontext!.openurl(url) { success in print("openurl returned: \(success)") } }
120 Working with the Containing App URL handlers Interactions use URLs to take user to app. Best practices Use your app s registered URL schemes System URL schemes func tableview(, didselectrowatindexpath indexpath: NSIndexPath) { let selectedname = names[indexpath.row] let URL = NSURL(string: "my-app://name=\(selectedname)")! extensioncontext!.openurl(url) { success in print("openurl returned: \(success)") } }
121 Working with the Containing App App groups Defaults
122 Working with the Containing App App groups Defaults Containers
123 Working with the Containing App App groups Defaults Containers Keychain items
124 Working with the Containing App App groups Defaults Containers Keychain items Framework data
125 Working with the Containing App User defaults
126 Working with the Containing App User defaults Used for small pieces of configuration data
127 Working with the Containing App User defaults Used for small pieces of configuration data let defaults = NSUserDefaults.initWithSuiteName("group.com.example.my-app")
128 Working with the Containing App What goes in a shared container? Model data
129 Working with the Containing App What goes in a shared container? Model data Documents
130 Working with the Containing App What goes in a shared container? Model data Documents Media
131 Working with the Containing App Working with model data in the shared container lazy var secureappgrouppersistentstoreurl: NSURL = { let fm = NSFileManager.defaultManager() let directory = fm.containerurlforsecurityapplicationgroupidentifier("group.com.example.myapp")! return directory.urlbyappendingpathcomponent("myfilename.sqlite") }()
132 Working with the Containing App Working with model data in the shared container lazy var secureappgrouppersistentstoreurl: NSURL = { let fm = NSFileManager.defaultManager() let directory = fm.containerurlforsecurityapplicationgroupidentifier("group.com.example.myapp")! return directory.urlbyappendingpathcomponent("myfilename.sqlite") }()
133 Working with the Containing App Working with model data in the shared container lazy var secureappgrouppersistentstoreurl: NSURL = { let fm = NSFileManager.defaultManager() let directory = fm.containerurlforsecurityapplicationgroupidentifier("group.com.example.myapp")! return directory.urlbyappendingpathcomponent("myfilename.sqlite") }()
134 Working with the Containing App Working with model data in the shared container lazy var secureappgrouppersistentstoreurl: NSURL = { let fm = NSFileManager.defaultManager() let directory = fm.containerurlforsecurityapplicationgroupidentifier("group.com.example.myapp")! return directory.urlbyappendingpathcomponent("myfilename.sqlite") }()
135 Working with the Containing App Working with model data in the shared container lazy var secureappgrouppersistentstoreurl: NSURL = { let fm = NSFileManager.defaultManager() let directory = fm.containerurlforsecurityapplicationgroupidentifier("group.com.example.myapp")! return directory.urlbyappendingpathcomponent("myfilename.sqlite") }()
136 Working with the Containing App Working with model data in the shared container lazy var persistentstorecoordinator: NSPersistentStoreCoordinator = { let storecoordinator = NSPersistentStoreCoordinator(managedObjectModel: self.managedobjectmodel) let storeurl = self.secureappgrouppersistentstoreurl do { try storecoordinator.addpersistentstorewithtype(nssqlitestoretype, configuration: nil, URL: storeurl, options: [NSMigratePersistentStoresAutomaticallyOption: true, NSInferMappingModelAutomaticallyOption, true]) } catch let error as NSError { // handle error } return storecoordinator }()
137 Working with the Containing App Working with model data in the shared container lazy var persistentstorecoordinator: NSPersistentStoreCoordinator = { let storecoordinator = NSPersistentStoreCoordinator(managedObjectModel: self.managedobjectmodel) let storeurl = self.secureappgrouppersistentstoreurl do { try storecoordinator.addpersistentstorewithtype(nssqlitestoretype, configuration: nil, URL: storeurl, options: [NSMigratePersistentStoresAutomaticallyOption: true, NSInferMappingModelAutomaticallyOption, true]) } catch let error as NSError { // handle error } return storecoordinator }()
138 Working with the Containing App Working with model data in the shared container lazy var persistentstorecoordinator: NSPersistentStoreCoordinator = { let storecoordinator = NSPersistentStoreCoordinator(managedObjectModel: self.managedobjectmodel) let storeurl = self.secureappgrouppersistentstoreurl do { try storecoordinator.addpersistentstorewithtype(nssqlitestoretype, configuration: nil, URL: storeurl, options: [NSMigratePersistentStoresAutomaticallyOption: true, NSInferMappingModelAutomaticallyOption, true]) } catch let error as NSError { // handle error } return storecoordinator }()
139 Working with the Containing App Working with model data in the shared container lazy var persistentstorecoordinator: NSPersistentStoreCoordinator = { let storecoordinator = NSPersistentStoreCoordinator(managedObjectModel: self.managedobjectmodel) let storeurl = self.secureappgrouppersistentstoreurl do { try storecoordinator.addpersistentstorewithtype(nssqlitestoretype, configuration: nil, URL: storeurl, options: [NSMigratePersistentStoresAutomaticallyOption: true, NSInferMappingModelAutomaticallyOption, true]) } catch let error as NSError { // handle error } return storecoordinator }()
140 Working with the Containing App Working with model data in the shared container lazy var persistentstorecoordinator: NSPersistentStoreCoordinator = { let storecoordinator = NSPersistentStoreCoordinator(managedObjectModel: self.managedobjectmodel) let storeurl = self.secureappgrouppersistentstoreurl do { try storecoordinator.addpersistentstorewithtype(nssqlitestoretype, configuration: nil, URL: storeurl, options: [NSMigratePersistentStoresAutomaticallyOption: true, NSInferMappingModelAutomaticallyOption, true]) } catch let error as NSError { // handle error } return storecoordinator }()
141 Working with the Containing App Working with model data in the shared container lazy var persistentstorecoordinator: NSPersistentStoreCoordinator = { let storecoordinator = NSPersistentStoreCoordinator(managedObjectModel: self.managedobjectmodel) let storeurl = self.secureappgrouppersistentstoreurl do { try storecoordinator.addpersistentstorewithtype(nssqlitestoretype, configuration: nil, URL: storeurl, options: [NSMigratePersistentStoresAutomaticallyOption: true, NSInferMappingModelAutomaticallyOption, true]) } catch let error as NSError { // handle error } return storecoordinator }()
142 Working with the Containing App Working with model data in the shared container lazy var managedobjectcontext: NSManagedObjectContext = { let coordinator = self.persistentstorecoordinator var managedobjectcontext = NSManagedObjectContext(concurrencyType:.MainQueueConcurrencyType) managedobjectcontext.persistentstorecoordinator = coordinator return managedobjectcontext }()
143 Working with the Containing App Working with model data in the shared container lazy var managedobjectcontext: NSManagedObjectContext = { let coordinator = self.persistentstorecoordinator var managedobjectcontext = NSManagedObjectContext(concurrencyType:.MainQueueConcurrencyType) managedobjectcontext.persistentstorecoordinator = coordinator return managedobjectcontext }()
144 Working with the Containing App Working with model data in the shared container lazy var managedobjectcontext: NSManagedObjectContext = { let coordinator = self.persistentstorecoordinator var managedobjectcontext = NSManagedObjectContext(concurrencyType:.MainQueueConcurrencyType) managedobjectcontext.persistentstorecoordinator = coordinator return managedobjectcontext }()
145 Working with the Containing App Working with model data in the shared container lazy var managedobjectcontext: NSManagedObjectContext = { let coordinator = self.persistentstorecoordinator var managedobjectcontext = NSManagedObjectContext(concurrencyType:.MainQueueConcurrencyType) managedobjectcontext.persistentstorecoordinator = coordinator return managedobjectcontext }()
146 Staying Responsive Locking in the shared container
147 Staying Responsive Locking in the shared container Be careful taking exclusive locks for data in the shared container
148 Staying Responsive Locking in the shared container Be careful taking exclusive locks for data in the shared container Extension killed if it s suspended while holding an exclusive lock
149 Staying Responsive Task assertions Extensions suspended when no longer in use
150 Staying Responsive Task assertions Extensions suspended when no longer in use Protect serialization and other clean-up tasks with background task assertions
151 Staying Responsive Task assertions let pi = NSProcessInfo.processInfo() pi.performexpiringactivitywithreason("clean-up") { expired in if (!expired) { self.serializedata() } else { self.cleanupserializingdata() } }
152 Staying Responsive Task assertions let pi = NSProcessInfo.processInfo() pi.performexpiringactivitywithreason("clean-up") { expired in if (!expired) { self.serializedata() } else { self.cleanupserializingdata() } }
153 Staying Responsive Task assertions let pi = NSProcessInfo.processInfo() pi.performexpiringactivitywithreason("clean-up") { expired in if (!expired) { self.serializedata() } else { self.cleanupserializingdata() } }
154 Staying Responsive Task assertions let pi = NSProcessInfo.processInfo() pi.performexpiringactivitywithreason("clean-up") { expired in if (!expired) { self.serializedata() } else { self.cleanupserializingdata() } }
155 Staying Responsive Task assertions let pi = NSProcessInfo.processInfo() pi.performexpiringactivitywithreason("clean-up") { expired in if (!expired) { self.serializedata() } else { self.cleanupserializingdata() } } expired == false
156 Staying Responsive Task assertions let pi = NSProcessInfo.processInfo() pi.performexpiringactivitywithreason("clean-up") { expired in if (!expired) { self.serializedata() } else { self.cleanupserializingdata() } } expired == false > perform protected task
157 Staying Responsive Task assertions let pi = NSProcessInfo.processInfo() pi.performexpiringactivitywithreason("clean-up") { expired in if (!expired) { self.serializedata() } else { self.cleanupserializingdata() } } expired == true
158 Staying Responsive Task assertions let pi = NSProcessInfo.processInfo() pi.performexpiringactivitywithreason("clean-up") { expired in if (!expired) { self.serializedata() } else { self.cleanupserializingdata() } } expired == true -> cancel protected task
159 Staying Responsive Task assertions let pi = NSProcessInfo.processInfo() pi.performexpiringactivitywithreason("clean-up") { expired in if (!expired) { self.serializedata() } else { self.cleanupserializingdata() } } exit the block -> task assertion is released
160 Staying Responsive Task assertions let pi = NSProcessInfo.processInfo() pi.performexpiringactivitywithreason("clean-up") { expired in if (!expired) { self.serializedata() } else { self.cleanupserializingdata() } } expired == true
161 Staying Responsive Task assertions let pi = NSProcessInfo.processInfo() pi.performexpiringactivitywithreason("clean-up") { expired in if (!expired) { self.serializedata() } else { self.cleanupserializingdata() } } expired == true -> cancel any work and exit the block
162 Staying Responsive Task assertions Released when your code exits the block
163 Staying Responsive Task assertions Released when your code exits the block Re-entrant execution of callback for expiration
164 Staying Responsive Task assertions Released when your code exits the block Re-entrant execution of callback for expiration Task assertions are not always available for your extension
165 Staying Responsive Working with other queues Task assertion scoped to callback block
166 Staying Responsive Working with other queues Task assertion scoped to callback block Callback block must synchronize with protected work on other queues
167 Staying Responsive Working with other queues Task assertion scoped to callback block Callback block must synchronize with protected work on other queues Example
168 Staying Responsive Working with other queues Task assertion scoped to callback block Callback block must synchronize with protected work on other queues Example Dispatch block to the main queue
169 Staying Responsive Working with the main queue let pi = NSProcessInfo.processInfo() pi.performexpiringactivitywithreason("clean-up") { expired in if (!expired) { dispatch_async(dispatch_get_main_queue(), { self.performinterruptiblework() }) } else { self.canceled = true } }
170 Staying Responsive Working with the main queue let pi = NSProcessInfo.processInfo() pi.performexpiringactivitywithreason("clean-up") { expired in if (!expired) { dispatch_async(dispatch_get_main_queue(), { self.performinterruptiblework() }) } else { self.canceled = true } }
171 Staying Responsive Working with the main queue let pi = NSProcessInfo.processInfo() pi.performexpiringactivitywithreason("clean-up") { expired in if (!expired) { dispatch_sync(dispatch_get_main_queue(), { self.performinterruptiblework() }) } else { self.canceled = true } }
172 Staying Responsive Working with the main queue let pi = NSProcessInfo.processInfo() pi.performexpiringactivitywithreason("clean-up") { expired in if (!expired) { dispatch_sync(dispatch_get_main_queue(), { self.performinterruptiblework() }) } else { self.canceled = true } }
173 Staying Responsive Working with the main queue let pi = NSProcessInfo.processInfo() pi.performexpiringactivitywithreason("clean-up") { expired in if (!expired) { dispatch_sync(dispatch_get_main_queue(), { self.performinterruptiblework() }) } else { self.canceled = true } } Callback block is executing on a private system queue
174 Staying Up to Date Darwin Notification Center Similar to NSNotificationCenter
175 Staying Up to Date Darwin Notification Center Similar to NSNotificationCenter
176 Staying Up to Date Darwin Notification Center Similar to NSNotificationCenter Small number of use-cases
177 Staying Up to Date Darwin Notification Center Similar to NSNotificationCenter Small number of use-cases Example
178 Staying Up to Date Darwin Notification Center Similar to NSNotificationCenter Small number of use-cases Example Hint to your extension to reload the model
179 Staying Up to Date Containing app API let nc = CFNotificationCenterGetDarwinNotifyCenter() CFNotificationCenterPostNotification(nc, "com.example.app-model-updated", nil, nil, CFBooleanGetValue(true))
180 Staying Up to Date Containing app API let nc = CFNotificationCenterGetDarwinNotifyCenter() CFNotificationCenterPostNotification(nc, "com.example.app-model-updated", nil, nil, CFBooleanGetValue(true))
181 Staying Up to Date Containing app API let nc = CFNotificationCenterGetDarwinNotifyCenter() CFNotificationCenterPostNotification(nc, "com.example.app-model-updated", nil, nil, CFBooleanGetValue(true))
182 Staying Up to Date Containing app API let nc = CFNotificationCenterGetDarwinNotifyCenter() CFNotificationCenterPostNotification(nc, "com.example.app-model-updated", nil, nil, CFBooleanGetValue(true))
183 Staying Up to Date Extension API let nc = CFNotificationCenterGetDarwinNotifyCenter() CFNotificationCenterAddObserver(nc, nil, { _ in self.reloadmodel() }, "com.example.app-model-updated", nil,.deliverimmediately)
184 Staying Up to Date Extension API let nc = CFNotificationCenterGetDarwinNotifyCenter() CFNotificationCenterAddObserver(nc, nil, { _ in self.reloadmodel() }, "com.example.app-model-updated", nil,.deliverimmediately)
185 Staying Up to Date Extension API let nc = CFNotificationCenterGetDarwinNotifyCenter() CFNotificationCenterAddObserver(nc, nil, { _ in self.reloadmodel() }, "com.example.app-model-updated", nil,.deliverimmediately)
186 Staying Up to Date Extension API let nc = CFNotificationCenterGetDarwinNotifyCenter() CFNotificationCenterAddObserver(nc, nil, { _ in self.reloadmodel() }, "com.example.app-model-updated", nil,.deliverimmediately)
187 Staying Up to Date Extension API let nc = CFNotificationCenterGetDarwinNotifyCenter() CFNotificationCenterAddObserver(nc, nil, { _ in self.reloadmodel() }, "com.example.app-model-updated", nil,.deliverimmediately)
188 Background Refresh Keeping your widget up to date
189
190 Background Refresh
191 Background Refresh AAPL: $132.12
192
193
194 Background Refresh Updating the widget System opportunistically refreshes content
195 Background Refresh Updating the widget System opportunistically refreshes content View controller conforms to NCWidgetProviding
196 Background Refresh Updating the widget System opportunistically refreshes content View controller conforms to NCWidgetProviding Implements update delegate method
197 Background Refresh Updating the widget System opportunistically refreshes content View controller conforms to NCWidgetProviding Implements update delegate method func widgetperformupdatewithcompletionhandler(completionhandler: ((NCUpdateResult) -> Void)) { let updated = refreshthemodel() if (updated) { view.setneedsdisplay() } completionhandler(updated?.newdata :.NoData) }
198 Background Refresh Updating the widget System opportunistically refreshes content View controller conforms to NCWidgetProviding Implements update delegate method func widgetperformupdatewithcompletionhandler(completionhandler: ((NCUpdateResult) -> Void)) { let updated = refreshthemodel() if (updated) { view.setneedsdisplay() } completionhandler(updated?.newdata :.NoData) }
199 Background Refresh Updating the widget System opportunistically refreshes content View controller conforms to NCWidgetProviding Implements update delegate method func widgetperformupdatewithcompletionhandler(completionhandler: ((NCUpdateResult) -> Void)) { let updated = refreshthemodel() if (updated) { view.setneedsdisplay() } completionhandler(updated?.newdata :.NoData) }
200 Background Refresh Updating the widget System opportunistically refreshes content View controller conforms to NCWidgetProviding Implements update delegate method func widgetperformupdatewithcompletionhandler(completionhandler: ((NCUpdateResult) -> Void)) { let updated = refreshthemodel() if (updated) { view.setneedsdisplay() } completionhandler(updated?.newdata :.NoData) }
201 Background Refresh Updating the widget System opportunistically refreshes content View controller conforms to NCWidgetProviding Implements update delegate method func widgetperformupdatewithcompletionhandler(completionhandler: ((NCUpdateResult) -> Void)) { let updated = refreshthemodel() if (updated) { view.setneedsdisplay() } completionhandler(updated?.newdata :.NoData) }
202
203
204 Networking Background sessions
205 Networking NSURLSession Background sessions
206 Networking NSURLSession Background sessions Task performed by the system
207 Networking NSURLSession Background sessions Task performed by the system Updates delivered to your extension as long as it stays alive
208 Networking NSURLSession Background sessions Task performed by the system Updates delivered to your extension as long as it stays alive Error and event handled by the containing app
209 Networking NSURLSession Background sessions Task performed by the system Updates delivered to your extension as long as it stays alive Error and event handled by the containing app
210 Networking Extension API let sc = NSURLSessionConfiguration.backgroundSessionConfigurationWithIdentifier( "com.example.my-download-session") sc.sharedcontaineridentifier = "group.com.example.my-app" let session = NSURLSession(configuration: sc, delegate: self, delegatequeue: NSOperationQueue.mainQueue()) let request = NSURLRequest(URL: NSURL(string: " let task = session.downloadtaskwithrequest(request) task?.resume()
211 Networking Extension API let sc = NSURLSessionConfiguration.backgroundSessionConfigurationWithIdentifier( "com.example.my-download-session") sc.sharedcontaineridentifier = "group.com.example.my-app" let session = NSURLSession(configuration: sc, delegate: self, delegatequeue: NSOperationQueue.mainQueue()) let request = NSURLRequest(URL: NSURL(string: " let task = session.downloadtaskwithrequest(request) task?.resume()
212 Networking Extension API let sc = NSURLSessionConfiguration.backgroundSessionConfigurationWithIdentifier( "com.example.my-download-session") sc.sharedcontaineridentifier = "group.com.example.my-app" let session = NSURLSession(configuration: sc, delegate: self, delegatequeue: NSOperationQueue.mainQueue()) let request = NSURLRequest(URL: NSURL(string: " let task = session.downloadtaskwithrequest(request) task?.resume()
213 Networking Extension API let sc = NSURLSessionConfiguration.backgroundSessionConfigurationWithIdentifier( "com.example.my-download-session") sc.sharedcontaineridentifier = "group.com.example.my-app" let session = NSURLSession(configuration: sc, delegate: self, delegatequeue: NSOperationQueue.mainQueue()) let request = NSURLRequest(URL: NSURL(string: let task = session.downloadtaskwithrequest(request) task?.resume()
214 Networking Extension API let sc = NSURLSessionConfiguration.backgroundSessionConfigurationWithIdentifier( "com.example.my-download-session") sc.sharedcontaineridentifier = "group.com.example.my-app" let session = NSURLSession(configuration: sc, delegate: self, delegatequeue: NSOperationQueue.mainQueue()) let request = NSURLRequest(URL: NSURL(string: " let task = session.downloadtaskwithrequest(request) task?.resume()
215 Networking Extension API let sc = NSURLSessionConfiguration.backgroundSessionConfigurationWithIdentifier( "com.example.my-download-session") sc.sharedcontaineridentifier = "group.com.example.my-app" let session = NSURLSession(configuration: sc, delegate: self, delegatequeue: NSOperationQueue.mainQueue()) let request = NSURLRequest(URL: NSURL(string: " let task = session.downloadtaskwithrequest(request) task?.resume()
216 Networking Extension API let sc = NSURLSessionConfiguration.backgroundSessionConfigurationWithIdentifier( "com.example.my-download-session") sc.sharedcontaineridentifier = "group.com.example.my-app" let session = NSURLSession(configuration: sc, delegate: self, delegatequeue: NSOperationQueue.mainQueue()) let request = NSURLRequest(URL: NSURL(string: " let task = session.downloadtaskwithrequest(request) task?.resume()
217 Networking Containing app API func application(application: UIApplication, handleeventsforbackgroundurlsession identifier: String, completionhandler: () -> Void) { guard (identifier == "com.example.my-download-session") else { return } let sc = NSURLSessionConfiguration.backgroundSessionConfigurationWithIdentifier(identi fier) sc.sharedcontaineridentifier = "group.com.example.my-app" self.session = NSURLSession(configuration: sc, delegate: self, delegatequeue: NSOperationQueue.mainQueue()) self.completionhandler = completionhandler }
218 Networking Containing app API func application(application: UIApplication, handleeventsforbackgroundurlsession identifier: String, completionhandler: () -> Void) { guard (identifier == "com.example.my-download-session") else { return } let sc = NSURLSessionConfiguration.backgroundSessionConfigurationWithIdentifier(identi fier) sc.sharedcontaineridentifier = "group.com.example.my-app" self.session = NSURLSession(configuration: sc, delegate: self, delegatequeue: NSOperationQueue.mainQueue()) self.completionhandler = completionhandler }
219 Networking Containing app API func application(application: UIApplication, handleeventsforbackgroundurlsession identifier: String, completionhandler: () -> Void) { guard (identifier == "com.example.my-download-session") else { return } let sc = NSURLSessionConfiguration.backgroundSessionConfigurationWithIdentifier(identi fier) sc.sharedcontaineridentifier = "group.com.example.my-app" self.session = NSURLSession(configuration: sc, delegate: self, delegatequeue: NSOperationQueue.mainQueue()) self.completionhandler = completionhandler }
220 Networking Containing app API func application(application: UIApplication, handleeventsforbackgroundurlsession identifier: String, completionhandler: () -> Void) { guard (identifier == "com.example.my-download-session") else { return } let sc = NSURLSessionConfiguration.backgroundSessionConfigurationWithIdentifier(identi fier) sc.sharedcontaineridentifier = "group.com.example.my-app" self.session = NSURLSession(configuration: sc, delegate: self, delegatequeue: NSOperationQueue.mainQueue()) self.completionhandler = completionhandler }
221 Networking Containing app API func application(application: UIApplication, handleeventsforbackgroundurlsession identifier: String, completionhandler: () -> Void) { guard (identifier == "com.example.my-download-session") else { return } let sc = NSURLSessionConfiguration.backgroundSessionConfigurationWithIdentifier(identi fier) sc.sharedcontaineridentifier = "group.com.example.my-app" self.session = NSURLSession(configuration: sc, delegate: self, delegatequeue: NSOperationQueue.mainQueue()) self.completionhandler = completionhandler }
222 Networking Containing app API func application(application: UIApplication, handleeventsforbackgroundurlsession identifier: String, completionhandler: () -> Void) { guard (identifier == "com.example.my-download-session") else { return } let sc = NSURLSessionConfiguration.backgroundSessionConfigurationWithIdentifier(identi fier) sc.sharedcontaineridentifier = "group.com.example.my-app" self.session = NSURLSession(configuration: sc, delegate: self, delegatequeue: NSOperationQueue.mainQueue()) self.completionhandler = completionhandler }
223 Networking Containing app API func URLSessionDidFinishEventsForBackgroundURLSession(session: NSURLSession){ let sc = session.configuration guard (sc.identifier == "com.example.my-download-session") else { return } self.completionhandler!() self.session = nil }
224 Networking Containing app API func URLSessionDidFinishEventsForBackgroundURLSession(session: NSURLSession){ let sc = session.configuration guard (sc.identifier == "com.example.my-download-session") else { return } self.completionhandler!() self.session = nil }
225 Networking Containing app API func URLSessionDidFinishEventsForBackgroundURLSession(session: NSURLSession){ let sc = session.configuration guard (sc.identifier == "com.example.my-download-session") else { return } self.completionhandler!() self.session = nil }
226 Networking Containing app API func URLSessionDidFinishEventsForBackgroundURLSession(session: NSURLSession){ let sc = session.configuration guard (sc.identifier == "com.example.my-download-session") else { return } self.completionhandler!() self.session = nil }
227 Networking Containing app API func URLSessionDidFinishEventsForBackgroundURLSession(session: NSURLSession){ let sc = session.configuration guard (sc.identifier == "com.example.my-download-session") else { return } self.completionhandler!() self.session = nil }
228 Networking watchos Use background task assertions to protect small tasks
229 Networking watchos Use background task assertions to protect small tasks WatchKit Tips and Tricks Presidio Friday 10:00AM
230 Sharing Secrets keychain-access-groups entitlement
231 Sharing Secrets API // Add an item SecItemAdd({ ksecattraccessgroup: "com.example.your-app-group"}, result: NULL)
232 Sharing Secrets API // Add an item SecItemAdd({ ksecattraccessgroup: "com.example.your-app-group"}, result: NULL)
233 Sharing Secrets API // Add an item SecItemAdd({ ksecattraccessgroup: "com.example.your-app-group"}, result: NULL)
234 Sharing Secrets API Automatic search behavior for query API Security and Your Apps Mission Tuesday 4:30PM
235 Sharing Secrets API Automatic search behavior for query API SecItemUpdate Security and Your Apps Mission Tuesday 4:30PM
236 Sharing Secrets API Automatic search behavior for query API SecItemUpdate SecItemDelete Security and Your Apps Mission Tuesday 4:30PM
237 Sharing Secrets API Automatic search behavior for query API SecItemUpdate SecItemDelete SecItemCopyMatching Security and Your Apps Mission Tuesday 4:30PM
238 Sharing Secrets API Automatic search behavior for query API SecItemUpdate SecItemDelete SecItemCopyMatching Security and Your Apps Mission Tuesday 4:30PM
239 Summary Action and Share Extensions
240 Summary Action and Share Extensions Enhanced Today widget
241 Summary Action and Share Extensions Enhanced Today widget General best practices
242 Related Sessions WatchKit Tips and Tricks Presidio Friday 10:00AM Security and Your Apps Mission Tuesday 4:30PM
243 More Information Documentation App Extension Programming Guide Technical Support Apple Developer Forums Developer Technical Support Sample Code Lister Sample Photo Editing Extension app-extensions General Inquiries Curt Rothert, App Frameworks Evangelist
244
Enhancing your apps for the next dimension of touch
App Frameworks #WWDC16 A Peek at 3D Touch Enhancing your apps for the next dimension of touch Session 228 Tyler Fox UIKit Frameworks Engineer Peter Hajas UIKit Frameworks Engineer 2016 Apple Inc. All rights
More informationCocoa Touch Best Practices
App Frameworks #WWDC15 Cocoa Touch Best Practices Session 231 Luke Hiesterman UIKit Engineer 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission
More informationWatchKit In-Depth, Part 2
App Frameworks #WWDC15 WatchKit In-Depth, Part 2 Session 208 Nathan de Vries watchos Engineer Chloe Chang watchos Engineer 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted
More informationMultitasking Support on the ios Platform
Multitasking Support on the ios Platform Priya Rajagopal Invicara (www.invicara.com) @rajagp Multitasking on ios? Multitasking allows apps to perform certain tasks in the background while you're using
More informationWhat s New in Notifications
System Frameworks #WWDC15 What s New in Notifications Session 720 Michele Campeotto ios Notifications Gokul Thirumalai Apple Push Notification Service 2015 Apple Inc. All rights reserved. Redistribution
More informationSeamless Linking to Your App
App Frameworks #WWDC15 Seamless Linking to Your App Session 509 Conrad Shultz Safari and WebKit Software Engineer Jonathan Grynspan Core Services Software Engineer 2015 Apple Inc. All rights reserved.
More informationBuilding Watch Apps #WWDC15. Featured. Session 108. Neil Desai watchos Engineer
Featured #WWDC15 Building Watch Apps Session 108 Neil Desai watchos Engineer 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple. Agenda
More informationMonetize and Promote Your App with iad
Media #WWDC15 Monetize and Promote Your App with iad From design to launch Session 503 Carol Teng Shashank Phadke 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without
More informationQuick Interaction Techniques for watchos
App Frameworks #WWDC16 Quick Interaction Techniques for watchos Session 211 Tom Witkin watchos Engineer Miguel Sanchez watchos Engineer 2016 Apple Inc. All rights reserved. Redistribution or public display
More informationCreating Complications with ClockKit Session 209
App Frameworks #WWDC15 Creating Complications with ClockKit Session 209 Eliza Block watchos Engineer Paul Salzman watchos Engineer 2015 Apple Inc. All rights reserved. Redistribution or public display
More informationData Delivery with Drag and Drop
Session App Frameworks #WWDC17 Data Delivery with Drag and Drop 227 Dave Rahardja, UIKit Tanu Singhal, UIKit 2017 Apple Inc. All rights reserved. Redistribution or public display not permitted without
More informationiphone Application Programming Networking
iphone Application Programming Networking RWTH Aachen University WS 2015/16 http://hci.rwth-aachen.de/iphone Networking on ios There are many ways to network Think about what you need to do first Then
More informationMastering UIKit on tvos
App Frameworks #WWDC16 Mastering UIKit on tvos Session 210 Justin Voss UIKit Engineer 2016 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from
More informationUsing and Extending the Xcode Source Editor
Developer Tools #WWDC16 Using and Extending the Xcode Source Editor Session 414 Mike Swingler Xcode Infrastructure and Editors Chris Hanson Xcode Infrastructure and Editors 2016 Apple Inc. All rights reserved.
More informationNetworking with NSURLSession
System Frameworks #WWDC15 Networking with NSURLSession Session 711 Luke Case Software Engineer Andreas Garkuscha Software Engineer Dan Vinegrad Software Engineer 2015 Apple Inc. All rights reserved. Redistribution
More informationCloudKit Tips And Tricks
System Frameworks #WWDC15 CloudKit Tips And Tricks Session 715 Nihar Sharma CloudKit Engineer 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission
More informationGetting the Most Out of HealthKit
App Frameworks #WWDC16 Getting the Most Out of HealthKit What s new and best practices Session 209 Matthew Salesi ios Software Engineer Joefrey Kibuule ios Software Engineer 2016 Apple Inc. All rights
More informationMastering Drag and Drop
Session App Frameworks #WWDC17 Mastering Drag and Drop 213 Tom Adriaenssen, UIKit Wenson Hsieh, WebKit Robb Böhnke, UIKit 2017 Apple Inc. All rights reserved. Redistribution or public display not permitted
More informationWhat's New in Core Spotlight
Session System Frameworks #WWDC17 What's New in Core Spotlight Search on macos and ios 231 John Hörnkvist, Spotlight Lyn Fong, Spotlight 2017 Apple Inc. All rights reserved. Redistribution or public display
More informationManaging Documents In Your ios Apps
Session #WWDC18 Managing Documents In Your ios Apps 216 Brandon Tennant, Software Engineer Thomas Deniau, Software Engineer Rony Fadel, Software Engineer 2018 Apple Inc. All rights reserved. Redistribution
More informationWriting Energy Efficient Apps
Session App Frameworks #WWDC17 Writing Energy Efficient Apps 238 Daniel Schucker, Software Power Engineer Prajakta Karandikar, Software Power Engineer 2017 Apple Inc. All rights reserved. Redistribution
More informationImplementing UI Designs in Interface Builder
Developer Tools #WWDC15 Implementing UI Designs in Interface Builder Session 407 Kevin Cathey Interface Builder Engineer Tony Ricciardi Interface Builder Engineer 2015 Apple Inc. All rights reserved. Redistribution
More informationCreating Extensions for ios and OS X, Part Two
Frameworks #WWDC14 Creating Extensions for ios and OS X, Part Two Architecture Session 217 Damien Sorresso Overloaded Operator 2014 Apple Inc. All rights reserved. Redistribution or public display not
More informationWhat s New in watchos
Session App Frameworks #WWDC17 What s New in watchos 205 Ian Parks, watchos Engineering 2017 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from
More informationCore Data Best Practices
#WWDC18 Core Data Best Practices Session 224 Scott Perry, Engineer Nick Gillett, Engineer 2018 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission
More informationIntroducing the Photos Frameworks
Media #WWDC14 Introducing the Photos Frameworks Session 511 Adam Swift ios Photos Frameworks 2014 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission
More informationWhat s New in NSCollectionView Session 225
App Frameworks #WWDC15 What s New in NSCollectionView Session 225 Troy Stephens Application Frameworks Engineer 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without
More informationIntroducing On Demand Resources
App Frameworks #WWDC15 Introducing On Demand Resources An element of App Thinning Session 214 Steve Lewallen Frameworks Engineering Tony Parker Cocoa Frameworks 2015 Apple Inc. All rights reserved. Redistribution
More informationAdvances in AVFoundation Playback
Media #WWDC16 Advances in AVFoundation Playback Waiting, looping, switching, widening, optimizing Session 503 Sam Bushell Media Systems Architect 2016 Apple Inc. All rights reserved. Redistribution or
More informationWhat s New in tvos #WWDC16. App Frameworks. Session 206. Hans Kim tvos Engineer
App Frameworks #WWDC16 What s New in tvos Session 206 Hans Kim tvos Engineer 2016 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple. Welcome
More informationDesigning for Apple Watch
Design #WWDC15 Designing for Apple Watch Session 802 Mike Stern User Experience Evangelist 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission
More informationEffective Networking with Swift and ios 8
Effective Networking with Swift and ios 8 Ben Scheirman @subdigital ChaiOne Agenda Old and Crusty NSURLConnection New Hotness Live Demos! HTTP Caching Bonus Round: API Tips NSURLConnection Invented for
More informationios Accessibility Developing for everyone Session 201 Ian Fisch ios Accessibility
App Frameworks #WWDC15 ios Accessibility Developing for everyone Session 201 Ian Fisch ios Accessibility 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without written
More informationWhat s New in imessage Apps
Session App Frameworks #WWDC17 What s New in imessage Apps 234 Eugene Bistolas, Messages Engineer Jay Chae, Messages Engineer Stephen Lottermoser, Messages Engineer 2017 Apple Inc. All rights reserved.
More informationCarPlay Audio and Navigation Apps
#WWDC18 CarPlay Audio and Navigation Apps Tunes and turns Jonathan Hersh, ios Car Experience Albert Wan, ios Car Experience Mike Knippers, ios Car Experience 2018 Apple Inc. All rights reserved. Redistribution
More informationMobile Application Programing: ios. Messaging
Mobile Application Programing: ios Messaging Application Model View Controller (MVC) Application Controller User Action Update View Notify Update Model Messaging Controller User Action Update Notify Update
More informationCore Data. CS 442: Mobile App Development Michael Saelee
Core Data CS 442: Mobile App Development Michael Saelee persistence framework (not just an ORM, as non-relational backends are supported) CD tracks an object graph (possibly disjoint), and
More informationView Controller Advancements for ios8
Frameworks #WWDC14 View Controller Advancements for ios8 Session 214 Bruce D. Nilo Manager, UIKit Fundamentals 2014 Apple Inc. All rights reserved. Redistribution or public display not permitted without
More informationMysteries of Auto Layout, Part 1
App Frameworks #WWDC15 Mysteries of Auto Layout, Part 1 Session 218 Jason Yao Interface Builder Engineer Kasia Wawer ios Keyboards Engineer 2015 Apple Inc. All rights reserved. Redistribution or public
More informationExtending Your Apps with SiriKit
App Frameworks #WWDC16 Extending Your Apps with SiriKit Session 225 Vineet Khosla SiriKit Engineering Diana Huang SiriKit Engineering Scott Andrus SiriKit Engineering 2016 Apple Inc. All rights reserved.
More informationAdvanced Scrollviews and Touch Handling Techniques
Frameworks #WWDC14 Advanced Scrollviews and Touch Handling Techniques Session 235 Josh Shaffer ios Apps and Frameworks Engineer Eliza Block ios Apps and Frameworks Engineer 2014 Apple Inc. All rights reserved.
More informationEnabling Your App for CarPlay
Session App Frameworks #WWDC17 Enabling Your App for CarPlay 719 Albert Wan, CarPlay Engineering 2017 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission
More informationImproving your Existing Apps with Swift
Developer Tools #WWDC15 Improving your Existing Apps with Swift Getting Swifty with It Session 403 Woody L. in the Sea of Swift 2015 Apple Inc. All rights reserved. Redistribution or public display not
More informationLeveraging Touch Input on ios
App Frameworks #WWDC16 Leveraging Touch Input on ios And getting the most out of Apple Pencil Session 220 Dominik Wagner UIKit Engineer 2016 Apple Inc. All rights reserved. Redistribution or public display
More informationIntroducing Search APIs
System Frameworks #WWDC15 Introducing Search APIs Increase app usage and discoverability Session 709 Vipul Ved Prakash Siri Dave Salim Siri Jason Douglas Siri 2015 Apple Inc. All rights reserved. Redistribution
More informationNews- ipad: ios(swift) Application
News- ipad: ios(swift) Application Document Version 1.0.1 Date: 9 th Nov, 2014 2 [NEWS- IPAD: APP DOCUMENTATION] Important Notes:... 6 AppDelegate Class Reference... 7 Tasks... 7 Instance Methods... 7
More informationAdvanced Notifications
System Frameworks #WWDC16 Advanced Notifications Session 708 Michele Campeotto ios Notifications 2016 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission
More informationApple Watch Design Tips and Tricks
Design #WWDC15 Apple Watch Design Tips and Tricks Session 805 Mike Stern User Experience Evangelist Rachel Roth User Experience Evangelist 2015 Apple Inc. All rights reserved. Redistribution or public
More informationCreating Audio Apps for watchos
Session #WWDC18 Creating Audio Apps for watchos 504 Neil Desai, watchos Frameworks Engineer 2018 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission
More informationMedia and Gaming Accessibility
Session System Frameworks #WWDC17 Media and Gaming Accessibility 217 Greg Hughes, Software Engineering Manager Charlotte Hill, Software Engineer 2017 Apple Inc. All rights reserved. Redistribution or public
More informationIntroducing the Contacts Framework
App Frameworks #WWDC15 Introducing the Contacts Framework For OS X, ios, and watchos Session 223 Bruce Stadnyk ios Contacts Engineer Dave Dribin OS X Contacts Engineer Julien Robert ios Contacts Engineer
More informationMobile Application Development
Mobile Application Development Lecture 17 Blocks, Concurrency, Networking 2013/2014 Parma Università degli Studi di Parma Lecture Summary Blocks Concurrency and multithreading Grand Central Dispatch (GCD)
More informationIntroducing the Modern WebKit API
Frameworks #WWDC14 Introducing the Modern WebKit API Session 206 Anders Carlsson Safari and WebKit Engineer 2014 Apple Inc. All rights reserved. Redistribution or public display not permitted without written
More informationWhat's New in UIKit Dynamics and Visual Effects Session 229
App Frameworks #WWDC15 What's New in UIKit Dynamics and Visual Effects Session 229 Michael Turner UIKit Engineer David Duncan UIKit Engineer 2015 Apple Inc. All rights reserved. Redistribution or public
More informationKevin van Vechten Core OS
Kevin van Vechten Core OS 2 3 Bill Bumgarner 4 (lambda (a) (add a d)) 10 timesrepeat:[pen turn:d; draw] z.each { val puts(val + d.to_s)} repeat(10, ^{ putc('0'+ d); }); 5 6 7 8 ^ 9 [myset objectspassingtest:
More informationThread Sanitizer and Static Analysis
Developer Tools #WWDC16 Thread Sanitizer and Static Analysis Help with finding bugs in your code Session 412 Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer, Program Analysis Team 2016
More informationGetting Published in Apple News
Media #WWDC16 Getting Published in Apple News Session 502 Ryan Griggs Apple News 2016 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple.
More informationWhat's New in Foundation Networking
Core OS #WWDC14 What's New in Foundation Networking Session 707 Steve Algernon Senior Wrangler 2014 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission
More informationStream iphone Sensor Data to Adafruit IO
Stream iphone Sensor Data to Adafruit IO Created by Trevor Beaton Last updated on 2019-01-22 04:07:41 PM UTC Guide Contents Guide Contents Overview In this learn guide we will: Before we start... Downloading
More informationlecture 10 UI/UX and Programmatic Design cs : spring 2018
lecture 10 UI/UX and Programmatic Design cs198-001 : spring 2018 1 Announcements custom app progress form due before lab (~1 minute) will be released after lecture only 2 labs left (both very important)
More informationBuilding Faster in Xcode
#WWDC18 Building Faster in Xcode Session 408 David Owens, Xcode Engineer Jordan Rose, Swift Engineer 2018 Apple Inc. All rights reserved. Redistribution or public display not permitted without written
More informationWhat s New in tvos 12
#WWDC18 What s New in tvos 12 Session 208 Hans Kim, tvos Engineering 2018 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple. Agenda Agenda
More informationWhat s New in Testing
#WWDC18 What s New in Testing Session 403 Honza Dvorsky, Xcode Engineer Ethan Vaughan, Xcode Engineer 2018 Apple Inc. All rights reserved. Redistribution or public display not permitted without written
More informationEngineering for Testability
Session Developer Tools #WWDC17 Engineering for Testability 414 Brian Croom, Xcode Engineer Greg Tracy, Xcode Engineer 2017 Apple Inc. All rights reserved. Redistribution or public display not permitted
More informationWhat s New in CloudKit
System Frameworks #WWDC15 What s New in CloudKit Session 704 Olivier Bonnet icloud Client Eric Krugler icloud Server 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted
More informationBuilding for Voice with Siri Shortcuts
#WWDC18 Building for Voice with Siri Shortcuts Session 214 Amit Jain, Siri Ayaka Nonaka, Siri 2018 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission
More informationimessage Apps and Stickers, Part 2
App Frameworks #WWDC16 imessage Apps and Stickers, Part 2 Interactive Messages Session 224 Alex Carter Messages Engineer Stephen Lottermoser Messages Engineer 2016 Apple Inc. All rights reserved. Redistribution
More informationCreating Content with iad JS
Creating Content with iad JS Part 2 The iad JS Framework Antoine Quint iad JS Software Engineer ios Apps and Frameworks 2 Agenda Motivations and Features of iad JS Core JavaScript Enhancements Working
More informationWhat s New in HomeKit
App Frameworks #WWDC15 What s New in HomeKit Session 210 Anush Nadathur HomeKit Engineer Naveen Kommareddi HomeKit Engineer 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted
More informationAccessibility on ios. Developing for everyone. Frameworks #WWDC14. Session 210 Clare Kasemset ios Accessibility
Frameworks #WWDC14 Accessibility on ios Developing for everyone Session 210 Clare Kasemset ios Accessibility 2014 Apple Inc. All rights reserved. Redistribution or public display not permitted without
More informationWhat s New in SiriKit
Session App Frameworks #WWDC17 What s New in SiriKit 214 Sirisha Yerroju, SiriKit Engineer Tin Tran, SiriKit Engineer 2017 Apple Inc. All rights reserved. Redistribution or public display not permitted
More informationOptimizing Swift Performance Session 409
Developer Tools #WWDC15 Optimizing Swift Performance Session 409 Nadav Rotem Manager, Swift Performance Team Michael Gottesman Engineer, Swift Performance Team Joe Grzywacz Engineer, Performance Tools
More informationNew UIKit Support for International User Interfaces
App Frameworks #WWDC15 New UIKit Support for International User Interfaces Session 222 Sara Radi Internationalization Software Engineer Aaltan Ahmad Internationalization Software Engineer Paul Borokhov
More informationWhat s New in Core Data?
Session App Frameworks #WWDC17 What s New in Core? Persisting since 2004 210 Melissa Turner, Core Engineer Rishi Verma, Core Engineer 2017 Apple Inc. All rights reserved. Redistribution or public display
More informationMedia Playback and Recording. CS193W - Spring Lecture 3
Media Playback and Recording CS193W - Spring 2016 - Lecture 3 Today Images and animated images Text input controller Media playback controller Inline video playback Playing extended audio Recording audio
More informationMastering Xcode for iphone OS Development Part 2. Marc Verstaen Sr. Manager, iphone Tools
Mastering Xcode for iphone OS Development Part 2 Marc Verstaen Sr. Manager, iphone Tools 2 Tale of Two Sessions Part 1: Orientation: Tour of complete development cycle Part 2: Mastery: Details of several
More informationCocoa Development Tips
Session App Frameworks #WWDC17 Cocoa Development Tips Twenty-nine things you may not know about Cocoa 236 Rachel Goldeen, Cocoa Engineer Vincent Hittson, Cocoa Engineer 2017 Apple Inc. All rights reserved.
More informationAccessibility on OS X
Frameworks #WWDC14 Accessibility on OS X New Accessibility API Session 207 Patti Hoa Accessibility Engineer! Chris Dolan Accessibility Engineer 2014 Apple Inc. All rights reserved. Redistribution or public
More informationDiscovering WKWebView
Discovering WKWebView Designed to replace UIWebView on ios and WebView on macos. Both ios and macos have the same API Harder to use than UIWebView Multi-process Architecture Multi-process Architecture
More informationMVC & Onwards. CS 442: Mobile App Development Michael Saelee
MVC & Onwards CS 442: Mobile App Development Michael Saelee Agenda - Recap: view-controller communication - Delegation as a general pattern - Observer pattern - Controller responsibilities & MVC - Multiple
More informationKony Visualizer. Wearables Developer's Guide
Kony Visualizer Wearables Developer's Guide Release 7.3 Document Relevance and Accuracy This document is considered relevant to the Release stated on this title page and the document version stated on
More informationModern User Interaction on ios
App Frameworks #WWDC17 Modern User Interaction on ios Mastering the UIKit UIGesture System Session 219 Dominik Wagner, UIKit Engineer Michael Turner, UIKit Engineer Glen Low, UIKit Engineer 2017 Apple
More informationCamera, Events, and Contacts. Dr. Sarah Abraham
Camera, Events, and Contacts Dr. Sarah Abraham University of Texas at Austin CS329e Fall 2016 Camera and Photo Library Using the Camera and Photos UIImagePickerController handles access to camera device,
More informationDesigning Great Apple Watch Experiences
Design #WWDC16 Designing Great Apple Watch Experiences Session 804 Mike Stern User Experience Evangelist 2016 Apple Inc. All rights reserved. Redistribution or public display not permitted without written
More informationSwift API Design Guidelines
Developer Tools #WWDC16 Swift API Design Guidelines The Grand Renaming Session 403 Doug Gregor Swift Engineer Michael Ilseman Swift Engineer 2016 Apple Inc. All rights reserved. Redistribution or public
More informationWhat s New in Xcode App Signing
Developer Tools #WWDC16 What s New in Xcode App Signing Developing and distributing Session 401 Joshua Pennington Tools Engineering Manager Itai Rom Tools Engineer 2016 Apple Inc. All rights reserved.
More informationIntroduction to Siri Shortcuts
#WWDC8 Introduction to Siri Shortcuts Session 2 Ari Weinstein, Siri Willem Mattelaer, Siri 208 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission
More informationVMware AirWatch SDK for ios (Swift) v17.5. Technical Implementation Guide Empowering your enterprise applications with MDM capabilities
VMware AirWatch SDK for ios (Swift) Technical Implementation Guide Empowering your enterprise applications with MDM capabilities VMware AirWatch SDK for ios (Swift) v17.5 Have documentation feedback? Submit
More informationITP 342 Mobile App Dev. Delegates
ITP 342 Mobile App Dev Delegates Protocol A protocol is a declaration of a list of methods Classes that conform to the protocol implement those methods A protocol can declare two kinds of methods: required
More informationCross Platform Nearby Networking
Core OS #WWDC14 Cross Platform Nearby Networking Session 709 Demijan Klinc Software Engineer 2014 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission
More informationStanford CS193p. Developing Applications for ios. Fall CS193p. Fall
Stanford Developing Applications for ios Today More about Documents Demo Use Codable to create a JSON representation of our document Store it in the filesystem Think better of that and let UIDocument store
More informationCreating Great App Previews
Services #WWDC14 Creating Great App Previews Session 304 Paul Turner Sr. Operations Manager itunes Digital Supply Chain Engineering 2014 Apple Inc. All rights reserved. Redistribution or public display
More informationBiometrics & Secure Storage in ios Jason Shapiro, Intertech
Biometrics & Secure Storage in ios Jason Shapiro, Intertech A Training Division Presentation 2012 - All Rights Reserved Welcome Jason S. Shapiro jshapiro@intertech.com Intertech Blog: http://www.intertech.com/blog
More informationAVContentKeySession Best Practices
Session #WWDC18 AVContentKeySession Best Practices 507 Anil Katti, AVFoundation Engineer 2018 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from
More informationios Configuration and APIs for Kiosk and Assessment Apps
Session Systems Framework #WWDC17 ios Configuration and APIs for Kiosk and Assessment Apps 716 Steve Hayman, Consulting Engineer 2017 Apple Inc. All rights reserved. Redistribution or public display not
More informationUniversal Linking Developer s Guide Release
Oracle Responsys Universal Linking Developer s Guide Release 6.29.01 October 2016 Documentation for Oracle Responsys customers who are modifying the ios version of their mobile apps to handle direct links
More informationKony Visualizer. Wearables Developer's Guide
Kony Visualizer Wearables Developer's Guide Release 7.0 Document Relevance and Accuracy This document is considered relevant to the Release stated on this title page and the document version stated on
More informationWhat s New in Energy Debugging
#WWDC18 What s New in Energy Debugging Phillip Azar, Apple/Battery Life David Choi, Apple/Battery Life 2018 Apple Inc. All rights reserved. Redistribution or public display not permitted without written
More informationUsing Grouped Notifications
#WWDC18 Using Grouped Notifications Session 711 Michele Campeotto, ios User Notifications 2018 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission
More informationMVC and Interface Builder IAP 2010
MVC and Interface Builder IAP 2010 iphonedev.csail.mit.edu edward benson / eob@csail.mit.edu Information-Driven Applications Application Flow UIApplication Main NIB Initialized UIAppDelegate - (void)applicationdidfinishlaunching:(uiapplication
More information