Dela via


Additional watchOS 3 Frameworks Changes

This article covers additional, minor changes or enhancements to existing frameworks for watchOS 3.

In addition to the major changes to iOS, Apple has made modifications and improvements to several existing frameworks in watchOS 3.

Core Data

The following enhancements have be made to the Core Data framework for watch OS 3:

  • Root NSManagedObjectContext objects supports concurrent faulting and fetching without serialization.
  • The NSPersistentStoreCoordinator class maintains a pool of SQLite data stores.
  • The NSManagedObjectContext objects with SQLite data stores in the WAL Journal Mode support the new query generation feature where Managed Object Contexts (MOC) can be pinned to specific database versions for future fetching and faulting transactions.
  • Using the high-level NSPersistenceContainer to reference the NSPersistentStoreCoordinator, NSManagedObjectModel and other Core Data configuration resources.
  • Several new convenience methods have been added to NSManagedObject making it easier to perform fetches and create subclasses.

For more information, please see Apple's Core Data Framework Reference.

Core Motion

The following enhancements have be made to the Core Motion framework for watch OS 3:

  • The new Device Motion event uses the accelerometer and gyroscope to provide motion and orientation updates. The app can register for this update (at rates of up to 100Hz).
  • The new Pedometer event enables fast, real-time notifications when the user pauses and resumes running. Use the CMPedometer to register for foreground or background pedometer events.

Foundation

The following enhancements have be made to the Foundation framework for watch OS 3:

  • Use the new NSDateInterval class to make date and time interval calculations such as durations, for comparing intervals and testing for interval intersections.
  • Several new properties have been added to the NSLocal class to acquire local information and the available display formats.
  • Use the new NSMeasurement class to convert between different Units of Measure (UOM) or perform calculations on values in different UOMs.
  • Use the new NSMeasurementFormatter class to format localized measurements for displaying to the end user.
  • Use the new NSUnit and NSDimension classes for representing specific UOMs.

HealthKit

The following enhancements have be made to the HealthKit framework for watch OS 3:

  • Use the new HKWorkoutConfiguration class to specify the ActivityType and LocationType of a workout.
  • The new HKWheelchairUseObject and the WheelchairUse method of the HKHealthStore class have been added for working with wheelchair related health data.
  • New metadata keys have been added for weather types (such as HKWeatherConditionClear and HKWeatherConditionCloudy) and workout types (such as HKWorkoutActivityTypeFlexibility and HKWorkoutActivityTypeWheelchairRunPace) have been added.

HomeKit

The following enhancements have be made to the HomeKit framework for watch OS 3:

  • Added the ability to view and interact with HomeKit connected IP cameras.
  • Added several new services and characteristics.
  • Added more context and configuration of the accessories of primary services and link services.

PassKit

The following enhancements have be made to the PassKit framework for watch OS 3:

UIKit

The following enhancements have be made to the UIKit framework for watch OS 3:

  • To support Dynamic Type in labels, text fields and text boxes use the new PreferredFontForTextStyle method of the UIFont class.
  • The ColorWithDisplayP3 method was added to support Wide Color.