Challenge
Your challenge is to keep watching this video series and find your challenge in the next video!
- Update all three targets to use your own Team
- Create an App Group and register it with both the iOS app and the WatchKit Extension, as shown in the video
- Update CoreDataStack.swift to use the App Group you created
- Update the Bundle Identifier of all three targets
- Open the info.plist file of the WatchKit Extension, find the NSExtension\NSExtensionAttributes\WKAppBundleIdentifier key and update that to match the bundle identifier of your Watch app
- Open the info.plist file of the Watch App, find the WKCompanionAppBundleIdentifier key and update that to match the bundle identifier of your iOS app
Note: Please note that the completed project we’ve provided will not run out-of-the-box. You will need to make the following changes before you Build and Run:
- Update all three targets to use your own Team
- Create an App Group and register it with both the iOS app and the WatchKit Extension, as shown in the video
- Update CoreDataStack.swift to use the App Group you created
- Update the Bundle Identifier of all three targets
- Open the info.plist file of the WatchKit Extension, find the NSExtension\NSExtensionAttributes\WKAppBundleIdentifier key and update that to match the bundle identifier of your Watch app
- Open the info.plist file of the Watch App, find the WKCompanionAppBundleIdentifier key and update that to match the bundle identifier of your iOS app
Download lecture slides
Download demo starter
Download demo finished
View previous video: Part 11: Page-Based Interfaces II
View next video: Part 13: Glances
Errata
- The video states that
containerURLForSecurityApplicationGroupIdentifier(_:)
was introduced as part of iOS 8. The method was actually introduced as part of iOS 7, which means you could use App Groups prior to App Extensions and WatchKit