Skip to content

IntentsUI macOS xcode13.0 beta1

Rachel Kang edited this page Oct 20, 2021 · 3 revisions

#IntentsUI.framework https://github.com/xamarin/xamarin-macios/pull/13056

diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IntentsUI.framework/Headers/INUIAddVoiceShortcutButton.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IntentsUI.framework/Headers/INUIAddVoiceShortcutButton.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IntentsUI.framework/Headers/INUIAddVoiceShortcutButton.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IntentsUI.framework/Headers/INUIAddVoiceShortcutButton.h	2021-06-02 11:05:03.000000000 -0400
@@ -0,0 +1,51 @@
+//
+//  INUIAddVoiceShortcutButton
+//  IntentsUI
+//
+//  Copyright © 2021 Apple Inc. All rights reserved.
+//
+
+#import <AppKit/AppKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+typedef NS_ENUM(NSUInteger, INUIAddVoiceShortcutButtonStyle) {
+    INUIAddVoiceShortcutButtonStyleWhite = 0,
+    INUIAddVoiceShortcutButtonStyleWhiteOutline,
+    INUIAddVoiceShortcutButtonStyleBlack,
+    INUIAddVoiceShortcutButtonStyleBlackOutline,
+    INUIAddVoiceShortcutButtonStyleAutomatic,
+    INUIAddVoiceShortcutButtonStyleAutomaticOutline,
+} API_AVAILABLE(macos(12.0)) API_UNAVAILABLE(ios, watchos, tvos);
+
+@class INShortcut, INUIAddVoiceShortcutButton, INUIAddVoiceShortcutViewController, INUIEditVoiceShortcutViewController;
+
+API_AVAILABLE(macos(12.0))
+API_UNAVAILABLE(ios, watchos, tvos)
+@protocol INUIAddVoiceShortcutButtonDelegate <NSObject>
+
+- (void)presentAddVoiceShortcutViewController:(INUIAddVoiceShortcutViewController *)addVoiceShortcutViewController forAddVoiceShortcutButton:(INUIAddVoiceShortcutButton *)addVoiceShortcutButton;
+- (void)presentEditVoiceShortcutViewController:(INUIEditVoiceShortcutViewController *)editVoiceShortcutViewController forAddVoiceShortcutButton:(INUIAddVoiceShortcutButton *)addVoiceShortcutButton;
+
+@end
+
+API_AVAILABLE(macos(12.0))
+IB_DESIGNABLE @interface INUIAddVoiceShortcutButton : NSButton
+
+- (instancetype)initWithStyle:(INUIAddVoiceShortcutButtonStyle)style NS_DESIGNATED_INITIALIZER;
+- (instancetype)init NS_UNAVAILABLE;
+- (instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE;
+
+@property (nonatomic) INUIAddVoiceShortcutButtonStyle style;
+@property (nonatomic, weak) id<INUIAddVoiceShortcutButtonDelegate> delegate;
+@property (nonatomic, strong, nullable) INShortcut *shortcut;
+
+/*!
+ @abstract A custom corner radius for the @c INUIAddVoiceShortcutButton.
+ @discussion If the provided corner radius is greater than half of the button’s height, it will be capped at half of the button’s height.
+ */
+@property (nonatomic, assign) IBInspectable CGFloat cornerRadius;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IntentsUI.framework/Headers/INUIAddVoiceShortcutViewController.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IntentsUI.framework/Headers/INUIAddVoiceShortcutViewController.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IntentsUI.framework/Headers/INUIAddVoiceShortcutViewController.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IntentsUI.framework/Headers/INUIAddVoiceShortcutViewController.h	2021-06-02 11:05:03.000000000 -0400
@@ -0,0 +1,52 @@
+//
+//  INUIAddVoiceShortcutViewController.h
+//  IntentsUI
+//
+//  Copyright © 2021 Apple Inc. All rights reserved.
+//
+
+#import <AppKit/AppKit.h>
+
+@class INShortcut;
+@class INVoiceShortcut;
+@protocol INUIAddVoiceShortcutViewControllerDelegate;
+
+NS_ASSUME_NONNULL_BEGIN
+
+/*!
+ @abstract A view controller that will take the user through the setup flow to add a shortcut to Siri.
+ @discussion First create the @c INShortcut object that represents the shortcut the user wants to perform. Then create an @c INUIAddVoiceShortcutViewController object and set its delegate. Then, present the view controller modally from another view controller in your app. The delegate must dismiss the view controller when the user completes the set up.
+ */
+API_AVAILABLE(macos(12.0))
+@interface INUIAddVoiceShortcutViewController : NSViewController
+
+@property (nonatomic, nullable, weak) id<INUIAddVoiceShortcutViewControllerDelegate> delegate;
+
+/*!
+ @param shortcut The shortcut is what will be run when the resulting voice shortcut is invoked. It also provides the suggested invocation phrase, via the @c suggestedInvocationPhrase property on the intent or user activity.
+ */
+- (instancetype)initWithShortcut:(INShortcut *)shortcut;
+
+- (instancetype)init NS_UNAVAILABLE;
+- (instancetype)initWithNibName:(nullable NSString *)nibNameOrNil bundle:(nullable NSBundle *)nibBundleOrNil NS_UNAVAILABLE;
+
+@end
+
+API_AVAILABLE(macos(12.0))
+@protocol INUIAddVoiceShortcutViewControllerDelegate <NSObject>
+
+/*!
+ @abstract Called after the user finishes the setup flow for the voice shortcut, with either the successfully-added voice shortcut, or an error.
+ @discussion Your implementation of this method should dismiss the view controller.
+ */
+- (void)addVoiceShortcutViewController:(INUIAddVoiceShortcutViewController *)controller didFinishWithVoiceShortcut:(nullable INVoiceShortcut *)voiceShortcut error:(nullable NSError *)error;
+
+/*!
+ @abstract Called if the user cancels the setup flow; the voice shortcut was not added.
+ @discussion Your implementation of this method should dismiss the view controller.
+ */
+- (void)addVoiceShortcutViewControllerDidCancel:(INUIAddVoiceShortcutViewController *)controller;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IntentsUI.framework/Headers/INUIEditVoiceShortcutViewController.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IntentsUI.framework/Headers/INUIEditVoiceShortcutViewController.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IntentsUI.framework/Headers/INUIEditVoiceShortcutViewController.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IntentsUI.framework/Headers/INUIEditVoiceShortcutViewController.h	2021-06-02 11:05:03.000000000 -0400
@@ -0,0 +1,57 @@
+//
+//  INUIEditVoiceShortcutViewController.h
+//  IntentsUI
+//
+//  Copyright © 2021 Apple Inc. All rights reserved.
+//
+
+#import <AppKit/AppKit.h>
+
+@class INVoiceShortcut;
+@protocol INUIEditVoiceShortcutViewControllerDelegate;
+
+NS_ASSUME_NONNULL_BEGIN
+
+/*!
+ @abstract A view controller that shows the details of a voice shortcut, and lets the user edit the phrase.
+ @discussion To have the user edit a voice shortcut, create an @c INUIEditVoiceShortcutViewController object with the @c INVoiceShortcut that they wish to edit, and set its delegate. Then, present the view controller modally from another view controller in your app. Your delegate must dismiss the view controller when the user finishes editing.
+ */
+API_AVAILABLE(macos(12.0))
+@interface INUIEditVoiceShortcutViewController : NSViewController
+
+@property (nonatomic, nullable, weak) id<INUIEditVoiceShortcutViewControllerDelegate> delegate;
+
+/*!
+ @param voiceShortcut The voice shortcut to be edited.
+ */
+- (instancetype)initWithVoiceShortcut:(INVoiceShortcut *)voiceShortcut;
+
+- (instancetype)init NS_UNAVAILABLE;
+- (instancetype)initWithNibName:(nullable NSString *)nibNameOrNil bundle:(nullable NSBundle *)nibBundleOrNil NS_UNAVAILABLE;
+
+@end
+
+API_AVAILABLE(macos(12.0))
+@protocol INUIEditVoiceShortcutViewControllerDelegate <NSObject>
+
+/*!
+ @abstract Called if the user updates the voice shortcut, with either the successfully-updated voice shortcut, or an error.
+ @discussion Your implementation of this method should dismiss the view controller.
+ */
+- (void)editVoiceShortcutViewController:(INUIEditVoiceShortcutViewController *)controller didUpdateVoiceShortcut:(nullable INVoiceShortcut *)voiceShortcut error:(nullable NSError *)error;
+
+/*!
+ @abstract Called if the user deletes the voice shortcut.
+ @discussion Your implementation of this method should dismiss the view controller.
+ */
+- (void)editVoiceShortcutViewController:(INUIEditVoiceShortcutViewController *)controller didDeleteVoiceShortcutWithIdentifier:(NSUUID *)deletedVoiceShortcutIdentifier;
+
+/*!
+ @abstract Called if the user cancelled; no changes were made to the voice shortcut.
+ @discussion Your implementation of this method should dismiss the view controller.
+ */
+- (void)editVoiceShortcutViewControllerDidCancel:(INUIEditVoiceShortcutViewController *)controller;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IntentsUI.framework/Headers/INUIHostedViewControlling.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IntentsUI.framework/Headers/INUIHostedViewControlling.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IntentsUI.framework/Headers/INUIHostedViewControlling.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IntentsUI.framework/Headers/INUIHostedViewControlling.h	2021-06-02 12:42:46.000000000 -0400
@@ -0,0 +1,74 @@
+//
+//  INUIHostedViewControlling.h
+//  Intents
+//
+//  Copyright (c) 2016 Apple Inc. All rights reserved.
+//
+
+#import <CoreGraphics/CoreGraphics.h>
+
+#import <Foundation/Foundation.h>
+
+@class INInteraction;
+
+@class INParameter;
+
+typedef NS_ENUM(NSUInteger, INUIHostedViewContext) {
+    INUIHostedViewContextSiriSnippet,
+    INUIHostedViewContextMapsCard,
+} API_AVAILABLE(ios(10.0)) API_UNAVAILABLE(watchos, tvos);
+
+typedef NS_ENUM(NSUInteger, INUIInteractiveBehavior) {
+    INUIInteractiveBehaviorNone,
+    INUIInteractiveBehaviorNextView, // Show UI representing navigation to a new view, such as a navigation chevron
+    INUIInteractiveBehaviorLaunch, // Show UI representing a launch to leave the context, such as a button
+    INUIInteractiveBehaviorGenericAction, // Show UI representing a generic follow-on action within the context, such as a large tap target
+} API_AVAILABLE(ios(11.0)) API_UNAVAILABLE(watchos, tvos);
+
+NS_ASSUME_NONNULL_BEGIN
+
+API_AVAILABLE(ios(10.0))
+API_UNAVAILABLE(watchos, tvos)
+@protocol INUIHostedViewControlling <NSObject>
+
+@optional
+
+/*!
+ @abstract Perform configuration of UI based on the provided INInteraction object.
+ @discussion When configuration is complete for the given interaction, the hosted view controller should call the completion block with its view's desired size. This size will be constrained between hostedViewMinimumAllowedSize and hostedViewMaximumAllowedSize of the extension context.
+ 
+ @param  interaction The input interaction
+ @param  context The hosting context for this interaction. The hosted view will be displayed alongside this context -- for instance, a Siri result snippet, or a place card within Maps.
+ @param  completion The response handling block takes one parameter corresponding the optional desiredSize property of the INUIHostedViewControlling protocol
+ 
+ @see  INInteraction
+ */
+- (void)configureWithInteraction:(INInteraction *)interaction context:(INUIHostedViewContext)context completion:(void (^)(CGSize desiredSize))completion;
+
+/*!
+ @abstract Perform configuration of UI based on the provided INInteraction and INParameter objects.
+ @discussion When configuration is complete for the given parameters and interaction, the hosted view controller should call the completion block with whether it was successful, the parameters it configured itself with, and its view's desired size. The size of the view will ultimately be constrained between hostedViewMinimumAllowedSize and hostedViewMaximumAllowedSize of the extension context.
+ 
+ @param  parameters The parameters of the interaction for which to configure the view
+ @param  interaction The input interaction
+ @param  interactiveBehavior The behavior that will be driven by user interaction of this view
+ @param  context The hosting context for this interaction. The hosted view will be displayed within/alongside this context -- for instance, a Siri result snippet, or a place card within Maps.
+ @param  completion The response handling block takes the following: A) a success boolean, which tells the hosted view context if this view was successfully configured, B) the set of parameters that this view was successfully configured for, and C) a desiredSize for this view to be sized at within the hosted view context.
+ 
+ @see  INParameter
+ @see  INInteraction
+ */
+- (void)configureViewForParameters:(NSSet <INParameter *> *)parameters ofInteraction:(INInteraction *)interaction interactiveBehavior:(INUIInteractiveBehavior)interactiveBehavior context:(INUIHostedViewContext)context completion:(void (^)(BOOL success, NSSet <INParameter *> *configuredParameters, CGSize desiredSize))completion API_AVAILABLE(ios(11.0));
+
+@end
+
+@interface NSExtensionContext (INUIHostedViewControlling)
+
+@property (nonatomic, assign, readonly) CGSize hostedViewMinimumAllowedSize API_AVAILABLE(ios(10.0)) API_UNAVAILABLE(macosx, watchos, tvos);
+@property (nonatomic, assign, readonly) CGSize hostedViewMaximumAllowedSize API_AVAILABLE(ios(10.0)) API_UNAVAILABLE(macosx, watchos, tvos);
+
+- (NSString *)interfaceParametersDescription API_AVAILABLE(ios(11.0)) API_UNAVAILABLE(macosx, watchos, tvos);
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IntentsUI.framework/Headers/INUIHostedViewSiriProviding.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IntentsUI.framework/Headers/INUIHostedViewSiriProviding.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IntentsUI.framework/Headers/INUIHostedViewSiriProviding.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IntentsUI.framework/Headers/INUIHostedViewSiriProviding.h	2021-06-02 11:05:04.000000000 -0400
@@ -0,0 +1,25 @@
+//
+//  INUIHostedViewSiriProviding.h
+//  Intents
+//
+//  Copyright (c) 2016 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+API_AVAILABLE(ios(10.0))
+API_UNAVAILABLE(macosx, watchos, tvos)
+@protocol INUIHostedViewSiriProviding <NSObject>
+
+@optional
+
+@property (nonatomic, assign, readonly) BOOL displaysMap;
+@property (nonatomic, assign, readonly) BOOL displaysMessage;
+@property (nonatomic, assign, readonly) BOOL displaysPaymentTransaction;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IntentsUI.framework/Headers/IntentsUI.apinotes /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IntentsUI.framework/Headers/IntentsUI.apinotes
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IntentsUI.framework/Headers/IntentsUI.apinotes	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IntentsUI.framework/Headers/IntentsUI.apinotes	2021-06-01 21:10:27.000000000 -0400
@@ -0,0 +1,40 @@
+---
+Name: IntentsUI
+SwiftVersions:
+- Version: 3
+  Classes:
+  - Name: INImage
+    Methods:
+    - Selector: 'imageWithCGImage:'
+      MethodKind: Class
+      NullabilityOfRet: U
+      Nullability:
+      - U
+      Parameters:
+      - Position: 0
+        Nullability: U
+    - Selector: 'imageWithUIImage:'
+      MethodKind: Class
+      NullabilityOfRet: U
+      Nullability:
+      - U
+      Parameters:
+      - Position: 0
+        Nullability: U
+    - Selector: 'imageSizeForIntentResponse:'
+      MethodKind: Class
+      Parameters:
+      - Position: 0
+        Nullability: U
+  Protocols:
+  - Name: INUIHostedViewControlling
+    Methods:
+    - Selector: 'configureWithInteraction:context:completion:'
+      MethodKind: Instance
+      Parameters:
+      - Position: 0
+        Nullability: U
+      - Position: 2
+        Nullability: U
+
+
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IntentsUI.framework/Headers/IntentsUI.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IntentsUI.framework/Headers/IntentsUI.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IntentsUI.framework/Headers/IntentsUI.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IntentsUI.framework/Headers/IntentsUI.h	2021-06-01 21:13:48.000000000 -0400
@@ -0,0 +1,20 @@
+//
+//  IntentsUI.h
+//  IntentsUI
+//
+//  Copyright (c) 2020 Apple Inc. All rights reserved.
+//
+
+#import <AppKit/AppKit.h>
+
+//! Project version number for IntentsUI.
+FOUNDATION_EXPORT double IntentsUIVersionNumber;
+
+//! Project version string for IntentsUI.
+FOUNDATION_EXPORT const unsigned char IntentsUIVersionString[];
+
+#import <IntentsUI/INUIHostedViewControlling.h>
+#import <IntentsUI/INUIHostedViewSiriProviding.h>
+#import <IntentsUI/INUIAddVoiceShortcutButton.h>
+#import <IntentsUI/INUIAddVoiceShortcutViewController.h>
+#import <IntentsUI/INUIEditVoiceShortcutViewController.h>
Clone this wiki locally