Skip to content

WatchKit watchOS xcode14.1 b1

Israel Soto edited this page Sep 21, 2022 · 3 revisions

#WatchKit.framework https://github.com/xamarin/xamarin-macios/pull/16061

diff -ruN /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/WatchKit.framework/Headers/WKApplication.h /Applications/Xcode_14.1.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/WatchKit.framework/Headers/WKApplication.h
--- /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/WatchKit.framework/Headers/WKApplication.h	2022-08-05 13:47:40.000000000 -0400
+++ /Applications/Xcode_14.1.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/WatchKit.framework/Headers/WKApplication.h	2022-09-09 11:37:10.000000000 -0400
@@ -71,7 +71,7 @@
 // app crashed while in a workout
 - (void)handleActiveWorkoutRecovery;
 
-// app had a WKExtendedRuntimeSession already running or scheduled at the time it was launched. To recover the session, set a delegate on it before this method returns. If no delegate is set, the session will be ended.
+// app had a WKExtendedRuntimeSession already running or scheduled at the time it was launched, or the app was registered as the default responder for this session. To recover the session or start the session as the session default provider, set a delegate on it before this method returns. If no delegate is set, the session will be ended.
 - (void)handleExtendedRuntimeSession:(WKExtendedRuntimeSession *)extendedRuntimeSession;
 
 // app brought frontmost due to auto-launching audio apps
diff -ruN /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/WatchKit.framework/Headers/WKExtendedRuntimeSession.h /Applications/Xcode_14.1.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/WatchKit.framework/Headers/WKExtendedRuntimeSession.h
--- /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/WatchKit.framework/Headers/WKExtendedRuntimeSession.h	2022-08-05 13:46:19.000000000 -0400
+++ /Applications/Xcode_14.1.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/WatchKit.framework/Headers/WKExtendedRuntimeSession.h	2022-09-09 11:35:31.000000000 -0400
@@ -61,8 +61,15 @@
     WKExtendedRuntimeSessionErrorBARDisabled = 6, // the BAR switch for the application is disabled
     WKExtendedRuntimeSessionErrorNotApprovedToStartSession = 7, // the app is missing a valid plist key or entitlement in order to start a session
     WKExtendedRuntimeSessionErrorNotApprovedToSchedule = 8, // the app does not have appropriate permissions to call startAtDate
+    WKExtendedRuntimeSessionErrorMustBeActiveToPrompt WK_AVAILABLE_WATCHOS_ONLY(9.0) = 9, // the app requested auto launch authorization but was not foreground active
+    WKExtendedRuntimeSessionErrorUnsupportedSessionType WK_AVAILABLE_WATCHOS_ONLY(9.0) = 10, // auto launch authorization is not available for the app's session type
 } WK_AVAILABLE_WATCHOS_ONLY(6.0);
 
+typedef NS_ENUM(NSInteger, WKExtendedRuntimeSessionAutoLaunchAuthorizationStatus) {
+    WKExtendedRuntimeSessionAutoLaunchAuthorizationStatusUnknown,  // Returned in error cases
+    WKExtendedRuntimeSessionAutoLaunchAuthorizationStatusInactive, // The application is not the default responder for its supported session type
+    WKExtendedRuntimeSessionAutoLaunchAuthorizationStatusActive,   // The application is the default responder for its supported session type
+} WK_AVAILABLE_WATCHOS_ONLY(9.0);
 
 @protocol WKExtendedRuntimeSessionDelegate;
 
@@ -76,6 +83,15 @@
  */
 + (WKExtendedRuntimeSession *)session;
 
+/**
+ * @method requestAutoLaunchAuthorizationStatusWithCompletion:
+ * @discussion Request auto-launch authorization for the current app. This may trigger prompt to the user asking if they
+ *             want to make the current app the app to launch automatically when system conditions are met for the app's
+ *             supported session type. This prompt will only be shown to the user once per application.
+ *             The completion handler will be called with an error if the application's session type does not support auto-launch,
+ *             or if the app is not foreground and has not yet triggered a prompt.
+ */
++ (void)requestAutoLaunchAuthorizationStatusWithCompletion:(void(^)(WKExtendedRuntimeSessionAutoLaunchAuthorizationStatus authorizationStatus, NSError * _Nullable error))completion WK_AVAILABLE_WATCHOS_ONLY(9.0);
 
 /**
  * Setting a delegate on the session provides you with updates on when the session begins,
diff -ruN /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/WatchKit.framework/Headers/WKExtension.h /Applications/Xcode_14.1.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/WatchKit.framework/Headers/WKExtension.h
--- /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/WatchKit.framework/Headers/WKExtension.h	2022-08-05 13:46:20.000000000 -0400
+++ /Applications/Xcode_14.1.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/WatchKit.framework/Headers/WKExtension.h	2022-09-09 11:37:11.000000000 -0400
@@ -88,7 +88,7 @@
 // app crashed while in a workout
 - (void)handleActiveWorkoutRecovery WK_AVAILABLE_WATCHOS_ONLY(5.0);
 
-// app had a WKExtendedRuntimeSession already running or scheduled at the time it was launched. To recover the session, set a delegate on it before this method returns. If no delegate is set, the session will be ended.
+// app had a WKExtendedRuntimeSession already running or scheduled at the time it was launched, or the app was registered as the default responder for this session. To recover the session or start the session as the session default provider, set a delegate on it before this method returns. If no delegate is set, the session will be ended.
 - (void)handleExtendedRuntimeSession:(WKExtendedRuntimeSession *)extendedRuntimeSession WK_AVAILABLE_WATCHOS_ONLY(6.0);
 
 // app brought frontmost due to auto-launching audio apps
diff -ruN /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/WatchKit.framework/Headers/WKInterfaceDevice.h /Applications/Xcode_14.1.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/WatchKit.framework/Headers/WKInterfaceDevice.h
--- /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/WatchKit.framework/Headers/WKInterfaceDevice.h	2022-08-05 13:47:40.000000000 -0400
+++ /Applications/Xcode_14.1.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/WatchKit.framework/Headers/WKInterfaceDevice.h	2022-09-09 11:35:31.000000000 -0400
@@ -27,6 +27,9 @@
     WKHapticTypeNavigationLeftTurn WK_AVAILABLE_WATCHOS_ONLY(7.0),
     WKHapticTypeNavigationRightTurn WK_AVAILABLE_WATCHOS_ONLY(7.0),
     WKHapticTypeNavigationGenericManeuver WK_AVAILABLE_WATCHOS_ONLY(7.0),
+    // The following types can only be used while the app has an active underwater depth session running:
+    WKHapticTypeUnderwaterDepthPrompt WK_AVAILABLE_WATCHOS_ONLY(9.0),
+    WKHapticTypeUnderwaterDepthCriticalPrompt WK_AVAILABLE_WATCHOS_ONLY(9.0),
 } WK_AVAILABLE_WATCHOS_ONLY(2.0);
 
 typedef NS_ENUM(NSInteger, WKInterfaceLayoutDirection) {
@@ -55,6 +58,7 @@
 typedef NS_ENUM(NSInteger, WKWaterResistanceRating) {
     WKWaterResistanceRatingIPX7 NS_SWIFT_NAME(ipx7),
     WKWaterResistanceRatingWR50 NS_SWIFT_NAME(wr50),
+    WKWaterResistanceRatingWR100 NS_SWIFT_NAME(wr100) WK_AVAILABLE_WATCHOS_ONLY(9.0),
 } WK_AVAILABLE_WATCHOS_ONLY(3.0);
 
 typedef NS_ENUM(NSInteger, WKInterfaceDeviceBatteryState) {
Clone this wiki locally