WWDC Videos (List of all Videos)
- WatchKit-in-depth 1 & WatchKit-in-depth 2
- WatchKit Tips & Tricks *
- Layout & Animation for WatchKit
- Introducing WatchKit for watchOS2 (Intro WatchKit, Connectivity & ClockKit)
Other Watch videos:
- Creating Complications with ClockKit
- Apple Watch Accessibility
- Introducing Watch Connectivity
- Performance on iOS & watchOS
- Building Watch Apps
- Achieving All-day Battery Life
Design for Watch:
1. New architecture (comparing architectures in watch OS2 vs OS1):
- Watch Extension now must be implemented using WatchOS SDK (limited System frameworks)
- Networking now done on the Watch itself (Watch can use WIFI even outside of Phone range!)
- Communication with Phone app: Extension object & Delegate
2. Watch Connectivity: Two-way communication between your Watch app and the Phone app.
4 modes of communicating to iPhone app: (Apple Link) 1. Application context mode:
Use this mode to send small amounts of state information to a counterpart app. The receiving app should use the information to synchronize its behavior or update its interface. For example, a Watch app might use the data to update the contents of its glance. 2. User information transfer mode:
Use this mode to send messages in the background. The receiving process need not be running for the data to be transferred. Data is transferred in the background and queued for delivery.
3. File transfer mode:
Use this mode to transfer files between apps. The receiving app must move the file to a new location if it intends to keep it. Files not moved in the
session:didReceiveFile:method are deleted after that method returns. 4. Interactive messaging mode:
Use this mode to send data immediately to a counterpart app. If you do not want a response, you may specify
nil for the replyHandler parameter.
The counterpart app must be reachable before calling this method. The iOS app is always considered reachable, and calling this method from your Watch app wakes up the iOS app in the background as needed. The Watch app is considered reachable only while it is installed and running.
3. System Frameworks available for Watch OS 2
4. New UI: Complications & PickerView
4.2 Complications (CLOCK KIT)
Complication is like widget – a small element that can be placed on the Clock face. Need to add ClockKit framework. There are many types of complications – we can choose a Face template and so provide data for it. We don’t have control over placement of the complications. ClockKit will call methods of complication data-source (CLKComplicationDataSource protocol) to get the meta-information & past, present and future data (entries) to display.
The Entries contain DATA and the TEMPLATE – and the TIME to display it. Using Digital Crown, we can go TIME TRAVEL mode to visit the entries.
5. Animation API
– Attribute ‘animate‘ – YES means the animated background image will start automatically after being loaded.
- animateWithDuration:animations: (New in watchOS 2.0) will perform animation. To use completionBlock for this function, use this trick : put animation in a NSOperation, then completionBlock on another NSOperation, add a dependancy so this block depends on the other block. See Video Advanced NSOperations
- Multi-taslking: Slide Over, Split View, Picture in Picture
- Search: Deep Link (NSUserActivity API), Content Indexing (Core Spotlight API)
- Games: SceneKit, SpriteKit, Metal new stuffs. GameplayKit (StateMachine). ReplayKit (Record video). Model I/O (physics)
- App Thinning: app optimized for downloader’s devices. Smaller, more convenient update.
- Stack Layout
- UI Automation Bundle
- HomeKit: More types of accessories supported.
- MapKit: Transit & FlyOver
- CloudKit: CloudKit JS – web interface for same data!
- Safari: app extension for Safari.
- News Publisher: Apple News create magazines!
- Free Provisioning: anyone can test on device now, not required Apple Developer account.
- One Account for Mac, iOS and Safari development !
- App Crash Report: either TestFlight, AppleStore or uploaded, crash logs will be de-symbolicated and links to actual code.
OS X El Capitan
- Swift 2: becomes Open Source. New enhancements.
- Metal API: GPU-CPU cooperation.
- ForceTouch API: pressure detection using ForceTouch trackpad.
- Photos Extension: access to custom filters/ editing tools from Photos.
- App Distribution
Some other features will also work better with new iOS 9:
- App Extension