-
Notifications
You must be signed in to change notification settings - Fork 520
WebKit macOS xcode16.3 b1
Rolf Bjarne Kvinge edited this page Feb 24, 2025
·
1 revision
#WebKit.framework
diff -ruN /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/DOMCSSRule.h /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/DOMCSSRule.h
--- /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/DOMCSSRule.h 2024-11-20 12:45:20
+++ /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/DOMCSSRule.h 2025-02-11 08:05:39
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2004-2025 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -30,7 +30,6 @@
@class NSString;
enum {
- DOM_UNKNOWN_RULE = 0,
DOM_STYLE_RULE = 1,
DOM_CHARSET_RULE = 2,
DOM_IMPORT_RULE = 3,
diff -ruN /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKDownload.h /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKDownload.h
--- /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKDownload.h 2024-11-20 12:45:19
+++ /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKDownload.h 2025-02-11 08:05:38
@@ -50,10 +50,10 @@
@property (nonatomic, weak) id <WKDownloadDelegate> delegate;
/* @abstract A boolean value indicating whether this download was initiated by the user. */
-@property (nonatomic, readonly, getter=isUserInitiated) BOOL userInitiated API_AVAILABLE(macos(15.2), ios(NA));
+@property (nonatomic, readonly, getter=isUserInitiated) BOOL userInitiated API_AVAILABLE(macos(15.4), ios(NA));
/* @abstract The frame that originated this download. */
-@property (nonatomic, readonly) WKFrameInfo *originatingFrame API_AVAILABLE(macos(15.2), ios(NA));
+@property (nonatomic, readonly) WKFrameInfo *originatingFrame API_AVAILABLE(macos(15.4), ios(NA));
/* @abstract Cancel the download.
@param completionHandler A block to invoke when cancellation is finished.
diff -ruN /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKNavigationAction.h /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKNavigationAction.h
--- /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKNavigationAction.h 2024-11-20 12:45:21
+++ /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKNavigationAction.h 2025-02-11 08:05:40
@@ -26,7 +26,7 @@
#import <WebKit/WKFoundation.h>
#if TARGET_OS_IPHONE
-#import <Foundation/Foundation.h>
+#import <UIKit/UIKit.h>
#else
#import <AppKit/AppKit.h>
#endif
@@ -81,7 +81,17 @@
*/
@property (nonatomic, readonly) BOOL shouldPerformDownload API_AVAILABLE(macos(11.3), ios(14.5));
-#if !TARGET_OS_IPHONE
+#if TARGET_OS_IPHONE
+
+/*! @abstract The modifier keys that were in effect when the navigation was requested.
+ */
+@property (nonatomic, readonly) UIKeyModifierFlags modifierFlags API_AVAILABLE(ios(NA), visionos(NA));
+
+/*! @abstract The button mask of the index of the mouse button causing the navigation to be requested.
+ */
+@property (nonatomic, readonly) UIEventButtonMask buttonNumber API_AVAILABLE(ios(NA), visionos(NA));
+
+#else
/*! @abstract The modifier keys that were in effect when the navigation was requested.
*/
diff -ruN /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKOpenPanelParameters.h /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKOpenPanelParameters.h
--- /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKOpenPanelParameters.h 2024-11-20 12:45:21
+++ /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKOpenPanelParameters.h 2025-02-11 08:05:40
@@ -23,18 +23,15 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#import <Foundation/Foundation.h>
#import <WebKit/WKFoundation.h>
-#if !TARGET_OS_IPHONE
-
-#import <Foundation/Foundation.h>
-
NS_ASSUME_NONNULL_BEGIN
/*! WKOpenPanelParameters contains parameters that a file upload control has specified.
*/
WK_SWIFT_UI_ACTOR
-WK_EXTERN API_AVAILABLE(macos(10.12))
+WK_EXTERN API_AVAILABLE(macos(10.12), ios(NA))
@interface WKOpenPanelParameters : NSObject
/*! @abstract Whether the file upload control supports multiple files.
@@ -43,10 +40,8 @@
/*! @abstract Whether the file upload control supports selecting directories.
*/
-@property (nonatomic, readonly) BOOL allowsDirectories API_AVAILABLE(macos(10.13.4));
+@property (nonatomic, readonly) BOOL allowsDirectories API_AVAILABLE(macos(10.13.4), ios(NA));
@end
NS_ASSUME_NONNULL_END
-
-#endif
diff -ruN /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKPreferences.h /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKPreferences.h
--- /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKPreferences.h 2024-11-20 13:33:09
+++ /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKPreferences.h 2025-02-11 08:16:21
@@ -109,4 +109,6 @@
@property (nonatomic) BOOL javaScriptEnabled API_DEPRECATED("Use WKWebpagePreferences.allowsContentJavaScript to disable content JavaScript on a per-navigation basis", macos(10.10, 11.0), ios(8.0, 14.0));
+
+
@end
diff -ruN /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKUIDelegate.h /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKUIDelegate.h
--- /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKUIDelegate.h 2024-11-20 11:30:09
+++ /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKUIDelegate.h 2025-02-11 08:05:39
@@ -254,7 +254,7 @@
If you do not implement this method, the web view will display the default Lockdown Mode message.
*/
-- (void)webView:(WKWebView *)webView showLockdownModeFirstUseMessage:(NSString *)message completionHandler:(WK_SWIFT_UI_ACTOR void (^)(WKDialogResult))completionHandler API_AVAILABLE(ios(13.0));
+- (void)webView:(WKWebView *)webView showLockdownModeFirstUseMessage:(NSString *)message completionHandler:(WK_SWIFT_UI_ACTOR void (^)(WKDialogResult))completionHandler API_AVAILABLE(ios(16.0));
#endif // TARGET_OS_IOS || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
@@ -278,19 +278,17 @@
#endif // TARGET_OS_IOS || (defined(TARGET_OS_VISION) && TARGET_OS_VISION) || (defined(TARGET_OS_TV) && TARGET_OS_TV)
-#if !TARGET_OS_IPHONE
-
/*! @abstract Displays a file upload panel.
@param webView The web view invoking the delegate method.
@param parameters Parameters describing the file upload control.
@param frame Information about the frame whose file upload control initiated this call.
@param completionHandler The completion handler to call after open panel has been dismissed. Pass the selected URLs if the user chose OK, otherwise nil.
- If you do not implement this method, the web view will behave as if the user selected the Cancel button.
+ If you do not implement this method on macOS, the web view will behave as if the user selected the Cancel button.
+ If you do not implement this method on iOS, the web view will match the file upload behavior of Safari. If you desire
+ the web view to act as if the user selected the Cancel button on iOS, immediately call the completion handler with nil.
*/
-- (void)webView:(WKWebView *)webView runOpenPanelWithParameters:(WKOpenPanelParameters *)parameters initiatedByFrame:(WKFrameInfo *)frame completionHandler:(WK_SWIFT_UI_ACTOR void (^)(NSArray<NSURL *> * _Nullable URLs))completionHandler API_AVAILABLE(macos(10.12));
-
-#endif
+- (void)webView:(WKWebView *)webView runOpenPanelWithParameters:(WKOpenPanelParameters *)parameters initiatedByFrame:(WKFrameInfo *)frame completionHandler:(WK_SWIFT_UI_ACTOR void (^)(NSArray<NSURL *> * _Nullable URLs))completionHandler API_AVAILABLE(macos(10.12), ios(NA));
@end
diff -ruN /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtension.h /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtension.h
--- /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtension.h 1970-01-01 01:00:00
+++ /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtension.h 2025-02-11 08:05:38
@@ -0,0 +1,237 @@
+/*
+ * Copyright (C) 2022-2024 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Foundation/Foundation.h>
+#import <WebKit/WKFoundation.h>
+
+#import <WebKit/WKWebExtensionMatchPattern.h>
+#import <WebKit/WKWebExtensionPermission.h>
+
+#if TARGET_OS_IPHONE
+@class UIImage;
+#else
+@class NSImage;
+#endif
+
+WK_HEADER_AUDIT_BEGIN(nullability, sendability)
+
+/*! @abstract Indicates a ``WKWebExtension`` error. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_EXTERN NSErrorDomain const WKWebExtensionErrorDomain NS_SWIFT_NAME(WKWebExtension.errorDomain) NS_SWIFT_NONISOLATED;
+
+/*!
+ @abstract Constants used by ``NSError`` to indicate errors in the ``WKWebExtension`` domain.
+ @constant WKWebExtensionErrorUnknown Indicates that an unknown error occurred.
+ @constant WKWebExtensionErrorResourceNotFound Indicates that a specified resource was not found on disk.
+ @constant WKWebExtensionErrorInvalidResourceCodeSignature Indicates that a resource failed the bundle's code signature checks.
+ @constant WKWebExtensionErrorInvalidManifest Indicates that an invalid `manifest.json` was encountered.
+ @constant WKWebExtensionErrorUnsupportedManifestVersion Indicates that the manifest version is not supported.
+ @constant WKWebExtensionErrorInvalidManifestEntry Indicates that an invalid manifest entry was encountered.
+ @constant WKWebExtensionErrorInvalidDeclarativeNetRequestEntry Indicates that an invalid declarative net request entry was encountered.
+ @constant WKWebExtensionErrorInvalidBackgroundPersistence Indicates that the extension specified background persistence that was not compatible with the platform or features requested.
+ @constant WKWebExtensionErrorInvalidArchive Indicates that the archive file is invalid or corrupt.
+ */
+typedef NS_ERROR_ENUM(WKWebExtensionErrorDomain, WKWebExtensionError) {
+ WKWebExtensionErrorUnknown = 1,
+ WKWebExtensionErrorResourceNotFound,
+ WKWebExtensionErrorInvalidResourceCodeSignature,
+ WKWebExtensionErrorInvalidManifest,
+ WKWebExtensionErrorUnsupportedManifestVersion,
+ WKWebExtensionErrorInvalidManifestEntry,
+ WKWebExtensionErrorInvalidDeclarativeNetRequestEntry,
+ WKWebExtensionErrorInvalidBackgroundPersistence,
+ WKWebExtensionErrorInvalidArchive,
+} NS_SWIFT_NAME(WKWebExtension.Error) API_AVAILABLE(macos(15.4), ios(NA), visionos(NA));
+
+/*!
+ @abstract A ``WKWebExtension`` object encapsulates a web extension’s resources that are defined by a `manifest.json`` file.
+ @discussion This class handles the reading and parsing of the manifest file along with the supporting resources like icons and localizations.
+ */
+WK_EXTERN API_AVAILABLE(macos(15.4), ios(NA), visionos(NA)) WK_SWIFT_UI_ACTOR
+@interface WKWebExtension : NSObject
+
++ (instancetype)new NS_UNAVAILABLE;
+- (instancetype)init NS_UNAVAILABLE;
+
+/*!
+ @abstract Returns a web extension initialized with a specified app extension bundle.
+ @param appExtensionBundle The bundle to use for the new web extension.
+ @param completionHandler A block to be called with an initialized web extension, or \c nil if the object could not be initialized due to an error.
+ @discussion The app extension bundle must contain a `manifest.json` file in its resources directory. If the manifest is invalid or missing,
+ or the bundle is otherwise improperly configured, an error will be returned.
+ */
++ (void)extensionWithAppExtensionBundle:(NSBundle *)appExtensionBundle completionHandler:(void (^)(WKWebExtension * WK_NULLABLE_RESULT extension, NSError * _Nullable error))completionHandler WK_SWIFT_ASYNC_THROWS_ON_FALSE(1);
+
+/*!
+ @abstract Returns a web extension initialized with a specified resource base URL, which can point to either a directory or a ZIP archive.
+ @param resourceBaseURL The file URL to use for the new web extension.
+ @param completionHandler A block to be called with an initialized web extension, or \c nil if the object could not be initialized due to an error.
+ @discussion The URL must be a file URL that points to either a directory with a `manifest.json` file or a ZIP archive containing a `manifest.json` file.
+ If the manifest is invalid or missing, or the URL points to an unsupported format or invalid archive, an error will be returned.
+ */
++ (void)extensionWithResourceBaseURL:(NSURL *)resourceBaseURL completionHandler:(void (^)(WKWebExtension * WK_NULLABLE_RESULT extension, NSError * _Nullable error))completionHandler WK_SWIFT_ASYNC_THROWS_ON_FALSE(1);
+
+/*!
+ @abstract An array of all errors that occurred during the processing of the extension.
+ @discussion Provides an array of all parse-time errors for the extension, with repeat errors consolidated into a single entry for the original
+ occurrence only. If no errors occurred, an empty array is returned.
+ @note Once the extension is loaded, use the ``errors`` property on an extension context to monitor any runtime errors, as they can occur
+ after the extension is loaded.
+ */
+@property (nonatomic, readonly, copy) NSArray<NSError *> *errors;
+
+/*! @abstract The parsed manifest as a dictionary. */
+@property (nonatomic, readonly, copy) NSDictionary<NSString *, id> *manifest;
+
+/*!
+ @abstract The parsed manifest version, or `0` if there is no version specified in the manifest.
+ @note An ``WKWebExtensionErrorUnsupportedManifestVersion`` error will be reported if the manifest version isn't specified.
+ */
+@property (nonatomic, readonly) double manifestVersion;
+
+/*!
+ @abstract Checks if a manifest version is supported by the extension.
+ @param manifestVersion The version number to check.
+ @result Returns `YES` if the extension specified a manifest version that is greater than or equal to `manifestVersion`.
+ */
+- (BOOL)supportsManifestVersion:(double)manifestVersion;
+
+/*! @abstract The default locale for the extension. Returns `nil` if there was no default locale specified. */
+@property (nonatomic, nullable, readonly, copy) NSLocale *defaultLocale;
+
+/*! @abstract The localized extension name. Returns `nil` if there was no name specified. */
+@property (nonatomic, nullable, readonly, copy) NSString *displayName;
+
+/*! @abstract The localized extension short name. Returns `nil` if there was no short name specified. */
+@property (nonatomic, nullable, readonly, copy) NSString *displayShortName;
+
+/*! @abstract The localized extension display version. Returns `nil` if there was no display version specified. */
+@property (nonatomic, nullable, readonly, copy) NSString *displayVersion;
+
+/*! @abstract The localized extension description. Returns `nil` if there was no description specified. */
+@property (nonatomic, nullable, readonly, copy) NSString *displayDescription;
+
+/*!
+ @abstract The default localized extension action label. Returns `nil` if there was no default action label specified.
+ @discussion This label serves as a default and should be used to represent the extension in contexts like action sheets or toolbars prior to
+ the extension being loaded into an extension context. Once the extension is loaded, use the ``actionForTab:`` API to get the tab-specific label.
+ */
+@property (nonatomic, nullable, readonly, copy) NSString *displayActionLabel;
+
+/*! @abstract The extension version. Returns `nil` if there was no version specified. */
+@property (nonatomic, nullable, readonly, copy) NSString *version;
+
+/*!
+ @abstract Returns the extension's icon image for the specified size.
+ @param size The size to use when looking up the icon.
+ @result The extension's icon image, or `nil` if the icon was unable to be loaded.
+ @discussion This icon should represent the extension in settings or other areas that show the extension. The returned image will be the best
+ match for the specified size that is available in the extension's icon set. If no matching icon can be found, the method will return `nil`.
+ @seealso actionIconForSize:
+ */
+#if TARGET_OS_IPHONE
+- (nullable UIImage *)iconForSize:(CGSize)size;
+#else
+- (nullable NSImage *)iconForSize:(CGSize)size;
+#endif
+
+/*!
+ @abstract Returns the default action icon for the specified size.
+ @param size The size to use when looking up the action icon.
+ @result The action icon, or `nil` if the icon was unable to be loaded.
+ @discussion This icon serves as a default and should be used to represent the extension in contexts like action sheets or toolbars prior to
+ the extension being loaded into an extension context. Once the extension is loaded, use the ``actionForTab:`` API to get the tab-specific icon.
+ The returned image will be the best match for the specified size that is available in the extension's action icon set. If no matching icon is available,
+ the method will fall back to the extension's icon.
+ @seealso iconForSize:
+ */
+#if TARGET_OS_IPHONE
+- (nullable UIImage *)actionIconForSize:(CGSize)size;
+#else
+- (nullable NSImage *)actionIconForSize:(CGSize)size;
+#endif
+
+/*! @abstract The set of permissions that the extension requires for its base functionality. */
+@property (nonatomic, readonly, copy) NSSet<WKWebExtensionPermission> *requestedPermissions;
+
+/*! @abstract The set of permissions that the extension may need for optional functionality. These permissions can be requested by the extension at a later time. */
+@property (nonatomic, readonly, copy) NSSet<WKWebExtensionPermission> *optionalPermissions;
+
+/*! @abstract The set of websites that the extension requires access to for its base functionality. */
+@property (nonatomic, readonly, copy) NSSet<WKWebExtensionMatchPattern *> *requestedPermissionMatchPatterns;
+
+/*! @abstract The set of websites that the extension may need access to for optional functionality. These match patterns can be requested by the extension at a later time. */
+@property (nonatomic, readonly, copy) NSSet<WKWebExtensionMatchPattern *> *optionalPermissionMatchPatterns;
+
+/*! @abstract The set of websites that the extension requires access to for injected content and for receiving messages from websites. */
+@property (nonatomic, readonly, copy) NSSet<WKWebExtensionMatchPattern *> *allRequestedMatchPatterns;
+
+/*!
+ @abstract A Boolean value indicating whether the extension has background content that can run when needed.
+ @discussion If this property is `YES`, the extension can run in the background even when no webpages are open.
+ */
+@property (nonatomic, readonly) BOOL hasBackgroundContent;
+
+/*!
+ @abstract A Boolean value indicating whether the extension has background content that stays in memory as long as the extension is loaded.
+ @note Note that extensions are only allowed to have persistent background content on macOS. An ``WKWebExtensionErrorInvalidBackgroundPersistence``
+ error will be reported on iOS, iPadOS, and visionOS if an attempt is made to load a persistent extension.
+ */
+@property (nonatomic, readonly) BOOL hasPersistentBackgroundContent;
+
+/*!
+ @abstract A Boolean value indicating whether the extension has script or stylesheet content that can be injected into webpages.
+ @discussion If this property is `YES`, the extension has content that can be injected by matching against the extension's requested match patterns.
+ @note Once the extension is loaded, use the ``hasInjectedContent`` property on an extension context, as the injectable content can change after the extension is loaded.
+ */
+@property (nonatomic, readonly) BOOL hasInjectedContent;
+
+/*!
+ @abstract A Boolean value indicating whether the extension has an options page.
+ @discussion If this property is `YES`, the extension includes a dedicated options page where users can customize settings.
+ The app should provide access to this page through a user interface element, which can be accessed via ``optionsPageURL`` on an extension context.
+ */
+@property (nonatomic, readonly) BOOL hasOptionsPage;
+
+/*!
+ @abstract A Boolean value indicating whether the extension provides an alternative to the default new tab page.
+ @discussion If this property is `YES`, the extension can specify a custom page that can be displayed when a new tab is opened in the app, instead of the default new tab page.
+ The app should prompt the user for permission to use the extension's new tab page as the default, which can be accessed via ``overrideNewTabPageURL`` on an extension context.
+ */
+@property (nonatomic, readonly) BOOL hasOverrideNewTabPage;
+
+/*!
+ @abstract A Boolean value indicating whether the extension includes commands that users can invoke.
+ @discussion If this property is `YES`, the extension contains one or more commands that can be performed by the user. These commands should be accessible via keyboard shortcuts,
+ menu items, or other user interface elements provided by the app. The list of commands can be accessed via ``commands`` on an extension context, and invoked via ``performCommand:``.
+ */
+@property (nonatomic, readonly) BOOL hasCommands;
+
+/*! @abstract A boolean value indicating whether the extension includes rules used for content modification or blocking. */
+@property (nonatomic, readonly) BOOL hasContentModificationRules;
+
+@end
+
+WK_HEADER_AUDIT_END(nullability, sendability)
diff -ruN /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionAction.h /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionAction.h
--- /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionAction.h 1970-01-01 01:00:00
+++ /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionAction.h 2025-02-11 08:05:36
@@ -0,0 +1,164 @@
+/*
+ * Copyright (C) 2023-2024 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Foundation/Foundation.h>
+#import <WebKit/WKFoundation.h>
+
+@class WKWebView;
+@class WKWebExtensionContext;
+@protocol WKWebExtensionTab;
+
+#if TARGET_OS_IPHONE
+@class UIImage;
+@class UIMenuElement;
+@class UIViewController;
+#else
+@class NSImage;
+@class NSMenuItem;
+@class NSPopover;
+#endif
+
+WK_HEADER_AUDIT_BEGIN(nullability, sendability)
+
+/*!
+ @abstract A ``WKWebExtensionAction`` object encapsulates the properties for an individual web extension action.
+ @discussion Provides access to action properties such as popup, icon, and title, with tab-specific values.
+ */
+WK_EXTERN API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_SWIFT_UI_ACTOR NS_SWIFT_NAME(WKWebExtension.Action)
+@interface WKWebExtensionAction : NSObject
+
+- (instancetype)init NS_UNAVAILABLE;
+- (instancetype)new NS_UNAVAILABLE;
+
+/*! @abstract The extension context to which this action is related. */
+@property (nonatomic, readonly, weak) WKWebExtensionContext *webExtensionContext;
+
+/*!
+ @abstract The tab that this action is associated with, or `nil` if it is the default action.
+ @discussion When this property is `nil`, it indicates that the action is the default action and not associated with a specific tab.
+ */
+@property (nonatomic, readonly, nullable, weak) id <WKWebExtensionTab> associatedTab;
+
+/*!
+ @abstract Returns the action icon for the specified size.
+ @param size The size to use when looking up the action icon.
+ @result The action icon, or `nil` if the icon was unable to be loaded.
+ @discussion This icon should represent the extension in action sheets or toolbars. The returned image will be the best match for the specified
+ size that is available in the extension's action icon set. If no matching icon is available, the method will fall back to the extension's icon.
+ */
+#if TARGET_OS_IPHONE
+- (nullable UIImage *)iconForSize:(CGSize)size;
+#else
+- (nullable NSImage *)iconForSize:(CGSize)size;
+#endif
+
+/*! @abstract The localized display label for the action. */
+@property (nonatomic, readonly, copy) NSString *label;
+
+/*!
+ @abstract The badge text for the action.
+ @discussion Provides the text that appears on the badge for the action. An empty string signifies that no badge should be shown.
+ */
+@property (nonatomic, readonly, copy) NSString *badgeText;
+
+/*!
+ @abstract A Boolean value indicating whether the badge text is unread.
+ @discussion This property is automatically set to `YES` when ``badgeText`` changes and is not empty. If ``badgeText`` becomes empty or the
+ popup associated with the action is presented, this property is automatically set to `NO`. Additionally, it should be set to `NO` by the app when the badge
+ has been presented to the user. This property is useful for higher-level notification badges when extensions might be hidden behind an action sheet.
+ */
+@property (nonatomic) BOOL hasUnreadBadgeText;
+
+/*!
+ @abstract The name shown when inspecting the popup web view.
+ @discussion This is the text that will appear when inspecting the popup web view.
+ */
+@property (nonatomic, nullable, copy) NSString *inspectionName;
+
+/*! @abstract A Boolean value indicating whether the action is enabled. */
+@property (nonatomic, readonly, getter=isEnabled) BOOL enabled;
+
+/*!
+ @abstract The menu items provided by the extension for this action.
+ @discussion Provides menu items supplied by the extension, allowing the user to perform extension-defined actions.
+ The app is responsible for displaying these menu items, typically in a context menu or a long-press menu on the action in action sheets or toolbars.
+ @note The properties of the menu items, including the items themselves, can change dynamically. Therefore, the app should fetch the menu items
+ on demand immediately before showing them, to ensure that the most current and relevant items are presented.
+ */
+#if TARGET_OS_IPHONE
+@property (nonatomic, readonly, copy) NSArray<UIMenuElement *> *menuItems;
+#else
+@property (nonatomic, readonly, copy) NSArray<NSMenuItem *> *menuItems;
+#endif
+
+/*!
+ @abstract A Boolean value indicating whether the action has a popup.
+ @discussion Use this property to check if the action has a popup before attempting to show any popup views.
+ */
+@property (nonatomic, readonly) BOOL presentsPopup;
+
+#if TARGET_OS_IPHONE
+/*!
+ @abstract A view controller that presents a web view loaded with the popup page for this action, or `nil` if no popup is specified.
+ @discussion The view controller adaptively adjusts its presentation style based on where it is presented from, preferring popover.
+ It contains a web view preloaded with the popup page and automatically adjusts its ``preferredContentSize`` to fit the web view's
+ content size. The ``presentsPopup`` property should be checked to determine the availability of a popup before using this property.
+ Dismissing the view controller will close the popup and unload the web view.
+ @seealso presentsPopup
+ */
+@property (nonatomic, readonly, nullable) UIViewController *popupViewController;
+#endif
+
+#if TARGET_OS_OSX
+/*!
+ @abstract A popover that presents a web view loaded with the popup page for this action, or `nil` if no popup is specified.
+ @discussion This popover contains a view controller with a web view preloaded with the popup page. It automatically adjusts its size to fit
+ the web view's content size. The ``presentsPopup`` property should be checked to determine the availability of a popup before using this
+ property. Dismissing the popover will close the popup and unload the web view.
+ @seealso presentsPopup
+ */
+@property (nonatomic, readonly, nullable) NSPopover *popupPopover;
+#endif
+
+/*!
+ @abstract A web view loaded with the popup page for this action, or `nil` if no popup is specified.
+ @discussion The web view will be preloaded with the popup page upon first access or after it has been unloaded. Use the ``presentsPopup``
+ property to determine whether a popup should be displayed before using this property.
+ @seealso presentsPopup
+ */
+@property (nonatomic, readonly, nullable) WKWebView *popupWebView;
+
+/*!
+ @abstract Triggers the dismissal process of the popup.
+ @discussion Invoke this method to manage the popup's lifecycle, ensuring the web view is unloaded and resources are released once the
+ popup closes. This method is automatically called upon the dismissal of the action's ``UIViewController`` or ``NSPopover``. For custom
+ scenarios where the popup's lifecycle is manually managed, it must be explicitly invoked to ensure proper closure.
+ */
+- (void)closePopup;
+
+@end
+
+WK_HEADER_AUDIT_END(nullability, sendability)
diff -ruN /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionCommand.h /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionCommand.h
--- /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionCommand.h 1970-01-01 01:00:00
+++ /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionCommand.h 2025-02-11 08:05:37
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2023-2024 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Foundation/Foundation.h>
+#import <WebKit/WKFoundation.h>
+
+#if TARGET_OS_IPHONE
+#import <UIKit/UIKeyCommand.h>
+#endif
+
+@class WKWebExtensionContext;
+
+WK_HEADER_AUDIT_BEGIN(nullability, sendability)
+
+/*!
+ @abstract A ``WKWebExtensionCommand`` object encapsulates the properties for an individual web extension command.
+ @discussion Provides access to command properties such as a unique identifier, a descriptive title, and shortcut keys. Commands
+ can be used by a web extension to perform specific actions within a web extension context, such toggling features, or interacting with
+ web content. These commands enhance the functionality of the extension by allowing users to invoke actions quickly.
+ */
+WK_EXTERN API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_SWIFT_UI_ACTOR NS_SWIFT_NAME(WKWebExtension.Command)
+@interface WKWebExtensionCommand : NSObject
+
++ (instancetype)new NS_UNAVAILABLE;
+- (instancetype)init NS_UNAVAILABLE;
+
+/*! @abstract The web extension context associated with the command. */
+@property (nonatomic, readonly, weak) WKWebExtensionContext *webExtensionContext;
+
+/*! @abstract A unique identifier for the command. */
+@property (nonatomic, readonly, copy) NSString *identifier NS_SWIFT_NAME(id);
+
+/*!
+ @abstract Descriptive title for the command aiding discoverability.
+ @discussion This title can be displayed in user interface elements such as keyboard shortcuts lists or menu items to help users understand its purpose.
+ */
+@property (nonatomic, readonly, copy) NSString *title;
+
+/*!
+ @abstract The primary key used to trigger the command, distinct from any modifier flags.
+ @discussion This property can be customized within the app to avoid conflicts with existing shortcuts or to enable user personalization.
+ It should accurately represent the activation key as used by the app, which the extension can use to display the complete shortcut in its interface.
+ If no shortcut is desired for the command, the property should be set to `nil`. This value should be saved and restored as needed by the app.
+ */
+@property (nonatomic, nullable, copy) NSString *activationKey;
+
+/*!
+ @abstract The modifier flags used with the activation key to trigger the command.
+ @discussion This property can be customized within the app to avoid conflicts with existing shortcuts or to enable user personalization. It
+ should accurately represent the modifier keys as used by the app, which the extension can use to display the complete shortcut in its interface.
+ If no modifiers are desired for the command, the property should be set to `0`. This value should be saved and restored as needed by the app.
+ */
+#if TARGET_OS_IPHONE
+@property (nonatomic) UIKeyModifierFlags modifierFlags;
+#else
+@property (nonatomic) NSEventModifierFlags modifierFlags;
+#endif
+
+/*!
+ @abstract A menu item representation of the web extension command for use in menus.
+ @discussion Provides a representation of the web extension command as a menu item to display in the app.
+ Selecting the menu item will perform the command, offering a convenient and visual way for users to execute this web extension command.
+ */
+#if TARGET_OS_IPHONE
+@property (nonatomic, readonly, copy) UIMenuElement *menuItem;
+#else
+@property (nonatomic, readonly, copy) NSMenuItem *menuItem;
+#endif
+
+#if TARGET_OS_IPHONE
+/*!
+ @abstract A key command representation of the web extension command for use in the responder chain.
+ @discussion Provides a ``UIKeyCommand`` instance representing the web extension command, ready for integration in the app.
+ The property is `nil` if no shortcut is defined. Otherwise, the key command is fully configured with the necessary input key and modifier flags
+ to perform the associated command upon activation. It can be included in a view controller or other responder's ``keyCommands`` property, enabling
+ keyboard activation and discoverability of the web extension command.
+ */
+@property (nonatomic, readonly, copy, nullable) UIKeyCommand *keyCommand;
+#endif // TARGET_OS_IPHONE
+
+@end
+
+WK_HEADER_AUDIT_END(nullability, sendability)
diff -ruN /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionContext.h /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionContext.h
--- /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionContext.h 1970-01-01 01:00:00
+++ /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionContext.h 2025-02-11 08:05:41
@@ -0,0 +1,790 @@
+/*
+ * Copyright (C) 2022-2024 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Foundation/Foundation.h>
+#import <WebKit/WKFoundation.h>
+
+#import <WebKit/WKWebExtensionMatchPattern.h>
+#import <WebKit/WKWebExtensionPermission.h>
+#import <WebKit/WKWebExtensionTab.h>
+
+@class WKWebViewConfiguration;
+@class WKWebExtension;
+@class WKWebExtensionAction;
+@class WKWebExtensionCommand;
+@class WKWebExtensionController;
+
+#if TARGET_OS_IPHONE
+@class UIMenuElement;
+@class UIKeyCommand;
+#else
+@class NSEvent;
+@class NSMenuItem;
+#endif
+
+WK_HEADER_AUDIT_BEGIN(nullability, sendability)
+
+/*! @abstract Indicates a ``WKWebExtensionContext`` error. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_EXTERN NSErrorDomain const WKWebExtensionContextErrorDomain NS_SWIFT_NAME(WKWebExtensionContext.errorDomain) NS_SWIFT_NONISOLATED;
+
+/*!
+ @abstract Constants used by ``NSError`` to indicate errors in the ``WKWebExtensionContext`` domain.
+ @constant WKWebExtensionContextErrorUnknown Indicates that an unknown error occurred.
+ @constant WKWebExtensionContextErrorAlreadyLoaded Indicates that the context is already loaded by a ``WKWebExtensionController``.
+ @constant WKWebExtensionContextErrorNotLoaded Indicates that the context is not loaded by a ``WKWebExtensionController``.
+ @constant WKWebExtensionContextErrorBaseURLAlreadyInUse Indicates that another context is already using the specified base URL.
+ @constant WKWebExtensionContextErrorNoBackgroundContent Indicates that the extension does not have background content.
+ @constant WKWebExtensionContextErrorBackgroundContentFailedToLoad Indicates that an error occurred loading the background content.
+ */
+typedef NS_ERROR_ENUM(WKWebExtensionContextErrorDomain, WKWebExtensionContextError) {
+ WKWebExtensionContextErrorUnknown = 1,
+ WKWebExtensionContextErrorAlreadyLoaded,
+ WKWebExtensionContextErrorNotLoaded,
+ WKWebExtensionContextErrorBaseURLAlreadyInUse,
+ WKWebExtensionContextErrorNoBackgroundContent,
+ WKWebExtensionContextErrorBackgroundContentFailedToLoad,
+} NS_SWIFT_NAME(WKWebExtensionContext.Error) API_AVAILABLE(macos(15.4), ios(NA), visionos(NA));
+
+/*! @abstract This notification is sent whenever a ``WKWebExtensionContext`` has new errors or errors were cleared. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_EXTERN NSNotificationName const WKWebExtensionContextErrorsDidUpdateNotification NS_SWIFT_NAME(WKWebExtensionContext.errorsDidUpdateNotification) NS_SWIFT_NONISOLATED;
+
+/*!
+ @abstract Constants used to indicate permission status in ``WKWebExtensionContext``.
+ @constant WKWebExtensionContextPermissionStatusDeniedExplicitly Indicates that the permission was explicitly denied.
+ @constant WKWebExtensionContextPermissionStatusDeniedImplicitly Indicates that the permission was implicitly denied because of another explicitly denied permission.
+ @constant WKWebExtensionContextPermissionStatusRequestedImplicitly Indicates that the permission was implicitly requested because of another explicitly requested permission.
+ @constant WKWebExtensionContextPermissionStatusUnknown Indicates that an unknown permission status.
+ @constant WKWebExtensionContextPermissionStatusRequestedExplicitly Indicates that the permission was explicitly requested.
+ @constant WKWebExtensionContextPermissionStatusGrantedImplicitly Indicates that the permission was implicitly granted because of another explicitly granted permission.
+ @constant WKWebExtensionContextPermissionStatusGrantedExplicitly Indicates that the permission was explicitly granted permission.
+ */
+typedef NS_ENUM(NSInteger, WKWebExtensionContextPermissionStatus) {
+ WKWebExtensionContextPermissionStatusDeniedExplicitly = -3,
+ WKWebExtensionContextPermissionStatusDeniedImplicitly = -2,
+ WKWebExtensionContextPermissionStatusRequestedImplicitly = -1,
+ WKWebExtensionContextPermissionStatusUnknown = 0,
+ WKWebExtensionContextPermissionStatusRequestedExplicitly = 1,
+ WKWebExtensionContextPermissionStatusGrantedImplicitly = 2,
+ WKWebExtensionContextPermissionStatusGrantedExplicitly = 3,
+} NS_SWIFT_NAME(WKWebExtensionContext.PermissionStatus) API_AVAILABLE(macos(15.4), ios(NA), visionos(NA));
+
+/*! @abstract This notification is sent whenever a ``WKWebExtensionContext`` has newly granted permissions. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_EXTERN NSNotificationName const WKWebExtensionContextPermissionsWereGrantedNotification NS_SWIFT_NAME(WKWebExtensionContext.permissionsWereGrantedNotification) NS_SWIFT_NONISOLATED;
+
+/*! @abstract This notification is sent whenever a ``WKWebExtensionContext`` has newly denied permissions. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_EXTERN NSNotificationName const WKWebExtensionContextPermissionsWereDeniedNotification NS_SWIFT_NAME(WKWebExtensionContext.permissionsWereDeniedNotification) NS_SWIFT_NONISOLATED;
+
+/*! @abstract This notification is sent whenever a ``WKWebExtensionContext`` has newly removed granted permissions. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_EXTERN NSNotificationName const WKWebExtensionContextGrantedPermissionsWereRemovedNotification NS_SWIFT_NAME(WKWebExtensionContext.grantedPermissionsWereRemovedNotification) NS_SWIFT_NONISOLATED;
+
+/*! @abstract This notification is sent whenever a ``WKWebExtensionContext`` has newly removed denied permissions. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_EXTERN NSNotificationName const WKWebExtensionContextDeniedPermissionsWereRemovedNotification NS_SWIFT_NAME(WKWebExtensionContext.deniedPermissionsWereRemovedNotification) NS_SWIFT_NONISOLATED;
+
+/*! @abstract This notification is sent whenever a ``WKWebExtensionContext`` has newly granted permission match patterns. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_EXTERN NSNotificationName const WKWebExtensionContextPermissionMatchPatternsWereGrantedNotification NS_SWIFT_NAME(WKWebExtensionContext.permissionMatchPatternsWereGrantedNotification) NS_SWIFT_NONISOLATED;
+
+/*! @abstract This notification is sent whenever a ``WKWebExtensionContext`` has newly denied permission match patterns. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_EXTERN NSNotificationName const WKWebExtensionContextPermissionMatchPatternsWereDeniedNotification NS_SWIFT_NAME(WKWebExtensionContext.permissionMatchPatternsWereDeniedNotification) NS_SWIFT_NONISOLATED;
+
+/*! @abstract This notification is sent whenever a ``WKWebExtensionContext`` has newly removed granted permission match patterns. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_EXTERN NSNotificationName const WKWebExtensionContextGrantedPermissionMatchPatternsWereRemovedNotification NS_SWIFT_NAME(WKWebExtensionContext.grantedPermissionMatchPatternsWereRemovedNotification) NS_SWIFT_NONISOLATED;
+
+/*! @abstract This notification is sent whenever a ``WKWebExtensionContext`` has newly removed denied permission match patterns. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_EXTERN NSNotificationName const WKWebExtensionContextDeniedPermissionMatchPatternsWereRemovedNotification NS_SWIFT_NAME(WKWebExtensionContext.deniedPermissionMatchPatternsWereRemovedNotification) NS_SWIFT_NONISOLATED;
+
+/*! @abstract Constants for specifying ``WKWebExtensionContext`` information in notifications. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+typedef NSString * WKWebExtensionContextNotificationUserInfoKey NS_TYPED_EXTENSIBLE_ENUM NS_SWIFT_NAME(WKWebExtensionContext.NotificationUserInfoKey);
+
+/*! @abstract The corresponding value represents the affected permissions in ``WKWebExtensionContext`` notifications. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_EXTERN WKWebExtensionContextNotificationUserInfoKey const WKWebExtensionContextNotificationUserInfoKeyPermissions NS_SWIFT_NONISOLATED;
+
+/*! @abstract The corresponding value represents the affected permission match patterns in ``WKWebExtensionContext`` notifications. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_EXTERN WKWebExtensionContextNotificationUserInfoKey const WKWebExtensionContextNotificationUserInfoKeyMatchPatterns NS_SWIFT_NONISOLATED;
+
+/*!
+ @abstract A ``WKWebExtensionContext`` object represents the runtime environment for a web extension.
+ @discussion This class provides methods for managing the extension's permissions, allowing it to inject content, run
+ background logic, show popovers, and display other web-based UI to the user.
+ */
+WK_EXTERN API_AVAILABLE(macos(15.4), ios(NA), visionos(NA)) WK_SWIFT_UI_ACTOR
+@interface WKWebExtensionContext : NSObject
+
++ (instancetype)new NS_UNAVAILABLE;
+- (instancetype)init NS_UNAVAILABLE;
+
+/*!
+ @abstract Returns a web extension context initialized with the specified extension.
+ @param extension The extension to use for the new web extension context.
+ @result An initialized web extension context.
+ */
++ (instancetype)contextForExtension:(WKWebExtension *)extension;
+
+/*!
+ @abstract Returns a web extension context initialized with a specified extension.
+ @param extension The extension to use for the new web extension context.
+ @result An initialized web extension context.
+ @discussion This is a designated initializer.
+ */
+- (instancetype)initForExtension:(WKWebExtension *)extension NS_DESIGNATED_INITIALIZER;
+
+/*! @abstract The extension this context represents. */
+@property (nonatomic, readonly, strong) WKWebExtension *webExtension;
+
+/*! @abstract The extension controller this context is loaded in, otherwise `nil` if it isn't loaded. */
+@property (nonatomic, readonly, weak, nullable) WKWebExtensionController *webExtensionController;
+
+/*! @abstract A Boolean value indicating if this context is loaded in an extension controller. */
+@property (nonatomic, readonly, getter=isLoaded) BOOL loaded;
+
+/*!
+ @abstract All errors that occurred in the extension context.
+ @discussion Provides an array of all parse-time and runtime errors for the extension and extension context, with repeat errors
+ consolidated into a single entry for the original occurrence. If no errors occurred, an empty array is returned.
+ */
+@property (nonatomic, readonly, copy) NSArray<NSError *> *errors;
+
+/*!
+ @abstract The base URL the context uses for loading extension resources or injecting content into webpages.
+ @discussion The default value is a unique URL using the `webkit-extension` scheme.
+ The base URL can be set to any URL, but only the scheme and host will be used. The scheme cannot be a scheme that is
+ already supported by ``WKWebView`` (e.g. http, https, etc.) Setting is only allowed when the context is not loaded.
+ */
+@property (nonatomic, copy) NSURL *baseURL;
+
+/*!
+ @abstract A unique identifier used to distinguish the extension from other extensions and target it for messages.
+ @discussion The default value is a unique value that matches the host in the default base URL. The identifier can be any
+ value that is unique. Setting is only allowed when the context is not loaded. This value is accessible by the extension via
+ `browser.runtime.id` and is used for messaging the extension via `browser.runtime.sendMessage()`.
+ */
+@property (nonatomic, copy) NSString *uniqueIdentifier;
+
+/*!
+ @abstract Determines whether Web Inspector can inspect the ``WKWebView`` instances for this context.
+ @discussion A context can control multiple ``WKWebView`` instances, from the background content, to the popover.
+ You should set this to `YES` when needed for debugging purposes. The default value is `NO`.
+*/
+@property (nonatomic, getter=isInspectable) BOOL inspectable;
+
+/*!
+ @abstract The name shown when inspecting the background web view.
+ @discussion This is the text that will appear when inspecting the background web view.
+ */
+@property (nonatomic, nullable, copy) NSString *inspectionName;
+
+/*!
+ @abstract Specifies unsupported APIs for this extension, making them `undefined` in JavaScript.
+ @discussion This property allows the app to specify a subset of web extension APIs that it chooses not to support, effectively making
+ these APIs `undefined` within the extension's JavaScript contexts. This enables extensions to employ feature detection techniques
+ for unsupported APIs, allowing them to adapt their behavior based on the APIs actually supported by the app. Setting is only allowed when
+ the context is not loaded. Only certain APIs can be specified here, particularly those within the `browser` namespace and other dynamic
+ functions and properties, anything else will be silently ignored.
+ @note For example, specifying `"browser.windows.create"` and `"browser.storage"` in this set will result in the
+ `browser.windows.create()` function and `browser.storage` property being `undefined`.
+ */
+@property (nonatomic, null_resettable, copy) NSSet<NSString *> *unsupportedAPIs;
+
+/*!
+ @abstract The web view configuration to use for web views that load pages from this extension.
+ @discussion Returns a customized copy of the configuration, originally set in the web extension controller configuration, for this extension.
+ The app must use this configuration when initializing web views intended to navigate to a URL originating from this extension's base URL.
+ The app must also swap web views in tabs when navigating to and from web extension URLs. This property returns `nil` if the context isn't
+ associated with a web extension controller. The returned configuration copy can be customized prior to web view initialization.
+ @note Navigations will fail if a web view using this configuration attempts to navigate to a URL that doesn't originate from this extension's
+ base URL. Similarly, navigations will be canceled if a web view not configured with this configuration attempts to navigate to a URL that does
+ originate from this extension's base URL.
+ */
+@property (nonatomic, readonly, copy, nullable) WKWebViewConfiguration *webViewConfiguration;
+
+/*!
+ @abstract The URL of the extension's options page, if the extension has one.
+ @discussion Provides the URL for the dedicated options page, if provided by the extension; otherwise `nil` if no page is defined.
+ The app should provide access to this page through a user interface element.
+ @note Navigation to the options page is only possible after this extension has been loaded.
+ @seealso webViewConfiguration
+ */
+@property (nonatomic, readonly, copy, nullable) NSURL *optionsPageURL;
+
+/*!
+ @abstract The URL to use as an alternative to the default new tab page, if the extension has one.
+ @discussion Provides the URL for a new tab page, if provided by the extension; otherwise `nil` if no page is defined.
+ The app should prompt the user for permission to use the extension's new tab page as the default.
+ @note Navigation to the override new tab page is only possible after this extension has been loaded.
+ @seealso webViewConfiguration
+ */
+@property (nonatomic, readonly, copy, nullable) NSURL *overrideNewTabPageURL;
+
+/*!
+ @abstract The currently granted permissions and their expiration dates.
+ @discussion Permissions that don't expire will have a distant future date. This will never include expired entries at time of access.
+ Setting this property will replace all existing entries. Use this property for saving and restoring permission status in bulk.
+ Permissions in this dictionary should be explicitly granted by the user before being added. Any permissions in this collection will not be
+ presented for approval again until they expire. This value should be saved and restored as needed by the app.
+ @seealso setPermissionStatus:forPermission:
+ @seealso setPermissionStatus:forPermission:expirationDate:
+ */
+@property (nonatomic, copy) NSDictionary<WKWebExtensionPermission, NSDate *> *grantedPermissions;
+
+/*!
+ @abstract The currently granted permission match patterns and their expiration dates.
+ @discussion Match patterns that don't expire will have a distant future date. This will never include expired entries at time of access.
+ Setting this property will replace all existing entries. Use this property for saving and restoring permission status in bulk.
+ Match patterns in this dictionary should be explicitly granted by the user before being added. Any match pattern in this collection will not be
+ presented for approval again until they expire. This value should be saved and restored as needed by the app.
+ @seealso setPermissionStatus:forMatchPattern:
+ @seealso setPermissionStatus:forMatchPattern:expirationDate:
+ */
+@property (nonatomic, copy) NSDictionary<WKWebExtensionMatchPattern *, NSDate *> *grantedPermissionMatchPatterns;
+
+/*!
+ @abstract The currently denied permissions and their expiration dates.
+ @discussion Permissions that don't expire will have a distant future date. This will never include expired entries at time of access.
+ Setting this property will replace all existing entries. Use this property for saving and restoring permission status in bulk.
+ Permissions in this dictionary should be explicitly denied by the user before being added. Any match pattern in this collection will not be
+ presented for approval again until they expire. This value should be saved and restored as needed by the app.
+ @seealso setPermissionStatus:forPermission:
+ @seealso setPermissionStatus:forPermission:expirationDate:
+ */
+@property (nonatomic, copy) NSDictionary<WKWebExtensionPermission, NSDate *> *deniedPermissions;
+
+/*!
+ @abstract The currently denied permission match patterns and their expiration dates.
+ @discussion Match patterns that don't expire will have a distant future date. This will never include expired entries at time of access.
+ Setting this property will replace all existing entries. Use this property for saving and restoring permission status in bulk.
+ Match patterns in this dictionary should be explicitly denied by the user before being added. Any match pattern in this collection will not be
+ presented for approval again until they expire. This value should be saved and restored as needed by the app.
+ @seealso setPermissionStatus:forMatchPattern:
+ @seealso setPermissionStatus:forMatchPattern:expirationDate:
+ */
+@property (nonatomic, copy) NSDictionary<WKWebExtensionMatchPattern *, NSDate *> *deniedPermissionMatchPatterns;
+
+/*!
+ @abstract A Boolean value indicating if the extension has requested optional access to all hosts.
+ @discussion If this property is `YES`, the extension has asked for access to all hosts in a call to `browser.runtime.permissions.request()`,
+ and future permission checks will present discrete hosts for approval as being implicitly requested. This value should be saved and restored as needed by the app.
+ */
+@property (nonatomic) BOOL hasRequestedOptionalAccessToAllHosts;
+
+/*!
+ @abstract A Boolean value indicating if the extension has access to private data.
+ @discussion If this property is `YES`, the extension is granted permission to interact with private windows, tabs, and cookies. Access to private data
+ should be explicitly allowed by the user before setting this property. This value should be saved and restored as needed by the app.
+ @note To ensure proper isolation between private and non-private data, web views associated with private data must use a
+ different ``WKUserContentController``. Likewise, to be identified as a private web view and to ensure that cookies and other
+ website data is not shared, private web views must be configured to use a non-persistent ``WKWebsiteDataStore``.
+ */
+@property (nonatomic) BOOL hasAccessToPrivateData;
+
+/*!
+ @abstract The currently granted permissions that have not expired.
+ @seealso grantedPermissions
+ */
+@property (nonatomic, readonly, copy) NSSet<WKWebExtensionPermission> *currentPermissions;
+
+/*!
+ @abstract The currently granted permission match patterns that have not expired.
+ @seealso grantedPermissionMatchPatterns
+ */
+@property (nonatomic, readonly, copy) NSSet<WKWebExtensionMatchPattern *> *currentPermissionMatchPatterns;
+
+/*!
+ @abstract Checks the specified permission against the currently granted permissions.
+ @param permission The permission for which to return the status.
+ @seealso currentPermissions
+ @seealso hasPermission:inTab:
+ @seealso permissionStatusForPermission:
+ @seealso permissionStatusForPermission:inTab:
+*/
+- (BOOL)hasPermission:(WKWebExtensionPermission)permission NS_SWIFT_NAME(hasPermission(_:));
+
+/*!
+ @abstract Checks the specified permission against the currently granted permissions in a specific tab.
+ @param permission The permission for which to return the status.
+ @param tab The tab in which to return the permission status, or \c nil if the tab is not known or the global status is desired.
+ @discussion Permissions can be granted on a per-tab basis. When the tab is known, permission checks should always use this method.
+ @seealso currentPermissions
+ @seealso hasPermission:
+ @seealso permissionStatusForPermission:
+ @seealso permissionStatusForPermission:inTab:
+ */
+- (BOOL)hasPermission:(WKWebExtensionPermission)permission inTab:(nullable id <WKWebExtensionTab>)tab NS_SWIFT_NAME(hasPermission(_:in:));
+
+/*!
+ @abstract Checks the specified URL against the currently granted permission match patterns.
+ @param url The URL for which to return the status.
+ @seealso currentPermissionMatchPatterns
+ @seealso hasAccessToURL:inTab:
+ @seealso permissionStatusForURL:
+ @seealso permissionStatusForURL:inTab:
+ @seealso permissionStatusForMatchPattern:
+ @seealso permissionStatusForMatchPattern:inTab:
+ */
+- (BOOL)hasAccessToURL:(NSURL *)url NS_SWIFT_NAME(hasAccess(to:));
+
+/*!
+ @abstract Checks the specified URL against the currently granted permission match patterns in a specific tab.
+ @param url The URL for which to return the status.
+ @param tab The tab in which to return the permission status, or \c nil if the tab is not known or the global status is desired.
+ @discussion Some match patterns can be granted on a per-tab basis. When the tab is known, access checks should always use this method.
+ @seealso currentPermissionMatchPatterns
+ @seealso hasAccessToURL:
+ @seealso permissionStatusForURL:
+ @seealso permissionStatusForURL:inTab:
+ @seealso permissionStatusForMatchPattern:
+ @seealso permissionStatusForMatchPattern:inTab:
+ */
+- (BOOL)hasAccessToURL:(NSURL *)url inTab:(nullable id <WKWebExtensionTab>)tab NS_SWIFT_NAME(hasAccess(to:in:));
+
+/*!
+ @abstract A Boolean value indicating if the currently granted permission match patterns set contains the `<all_urls>` pattern.
+ @discussion This does not check for any `*` host patterns. In most cases you should use the broader ``hasAccessToAllHosts``.
+ @seealso currentPermissionMatchPatterns
+ @seealso hasAccessToAllHosts
+ */
+@property (nonatomic, readonly) BOOL hasAccessToAllURLs;
+
+/*!
+ @abstract A Boolean value indicating if the currently granted permission match patterns set contains the `<all_urls>` pattern or any `*` host patterns.
+ @seealso currentPermissionMatchPatterns
+ @seealso hasAccessToAllURLs
+ */
+@property (nonatomic, readonly) BOOL hasAccessToAllHosts;
+
+/*!
+ @abstract A Boolean value indicating whether the extension has script or stylesheet content that can be injected into webpages.
+ @discussion If this property is `YES`, the extension has content that can be injected by matching against the extension's requested match patterns.
+ @seealso hasInjectedContentForURL:
+ */
+@property (nonatomic, readonly) BOOL hasInjectedContent;
+
+/*!
+ @abstract Checks if the extension has script or stylesheet content that can be injected into the specified URL.
+ @param url The webpage URL to check.
+ @result Returns `YES` if the extension has content that can be injected by matching the URL against the extension's requested match patterns.
+ @discussion The extension context will still need to be loaded and have granted website permissions for its content to actually be injected.
+ */
+- (BOOL)hasInjectedContentForURL:(NSURL *)url NS_SWIFT_NAME(hasInjectedContent(for:));
+
+/*!
+ @abstract A boolean value indicating whether the extension includes rules used for content modification or blocking.
+ @discussion This includes both static rules available in the extension's manifest and dynamic rules applied during a browsing session.
+ */
+@property (nonatomic, readonly) BOOL hasContentModificationRules;
+
+/*!
+ @abstract Checks the specified permission against the currently denied, granted, and requested permissions.
+ @param permission The permission for which to return the status.
+ @discussion Permissions can be granted on a per-tab basis. When the tab is known, access checks should always use the method that checks in a tab.
+ @seealso permissionStatusForPermission:inTab:
+ @seealso hasPermission:
+*/
+- (WKWebExtensionContextPermissionStatus)permissionStatusForPermission:(WKWebExtensionPermission)permission NS_SWIFT_NAME(permissionStatus(for:));
+
+/*!
+ @abstract Checks the specified permission against the currently denied, granted, and requested permissions.
+ @param permission The permission for which to return the status.
+ @param tab The tab in which to return the permission status, or \c nil if the tab is not known or the global status is desired.
+ @discussion Permissions can be granted on a per-tab basis. When the tab is known, access checks should always specify the tab.
+ @seealso permissionStatusForPermission:
+ @seealso hasPermission:inTab:
+*/
+- (WKWebExtensionContextPermissionStatus)permissionStatusForPermission:(WKWebExtensionPermission)permission inTab:(nullable id <WKWebExtensionTab>)tab NS_SWIFT_NAME(permissionStatus(for:in:));
+
+/*!
+ @abstract Sets the status of a permission with a distant future expiration date.
+ @param status The new permission status to set for the given permission.
+ @param permission The permission for which to set the status.
+ @discussion This method will update ``grantedPermissions`` and ``deniedPermissions``. Use this method for changing a single permission's status.
+ Only ``WKWebExtensionContextPermissionStatusDeniedExplicitly``, ``WKWebExtensionContextPermissionStatusUnknown``, and ``WKWebExtensionContextPermissionStatusGrantedExplicitly``
+ states are allowed to be set using this method.
+ @seealso setPermissionStatus:forPermission:expirationDate:
+ @seealso setPermissionStatus:forPermission:inTab:
+*/
+- (void)setPermissionStatus:(WKWebExtensionContextPermissionStatus)status forPermission:(WKWebExtensionPermission)permission NS_SWIFT_NAME(setPermissionStatus(_:for:));
+
+/*!
+ @abstract Sets the status of a permission with a specific expiration date.
+ @param status The new permission status to set for the given permission.
+ @param permission The permission for which to set the status.
+ @param expirationDate The expiration date for the new permission status, or \c nil for distant future.
+ @discussion This method will update ``grantedPermissions`` and ``deniedPermissions``. Use this method for changing a single permission's status.
+ Passing a `nil` expiration date will be treated as a distant future date. Only ``WKWebExtensionContextPermissionStatusDeniedExplicitly``, ``WKWebExtensionContextPermissionStatusUnknown``,
+ and ``WKWebExtensionContextPermissionStatusGrantedExplicitly`` states are allowed to be set using this method.
+ @seealso setPermissionStatus:forPermission:
+ @seealso setPermissionStatus:forPermission:inTab:
+*/
+- (void)setPermissionStatus:(WKWebExtensionContextPermissionStatus)status forPermission:(WKWebExtensionPermission)permission expirationDate:(nullable NSDate *)expirationDate NS_SWIFT_NAME(setPermissionStatus(_:for:expirationDate:));
+
+/*!
+ @abstract Checks the specified URL against the currently denied, granted, and requested permission match patterns.
+ @param url The URL for which to return the status.
+ @discussion URLs and match patterns can be granted on a per-tab basis. When the tab is known, access checks should always use the method that checks in a tab.
+ @seealso permissionStatusForURL:inTab:
+ @seealso hasAccessToURL:
+*/
+- (WKWebExtensionContextPermissionStatus)permissionStatusForURL:(NSURL *)url NS_SWIFT_NAME(permissionStatus(for:));
+
+/*!
+ @abstract Checks the specified URL against the currently denied, granted, and requested permission match patterns.
+ @param url The URL for which to return the status.
+ @param tab The tab in which to return the permission status, or \c nil if the tab is not known or the global status is desired.
+ @discussion URLs and match patterns can be granted on a per-tab basis. When the tab is known, access checks should always use this method.
+ @seealso permissionStatusForURL:
+ @seealso hasAccessToURL:inTab:
+*/
+- (WKWebExtensionContextPermissionStatus)permissionStatusForURL:(NSURL *)url inTab:(nullable id <WKWebExtensionTab>)tab NS_SWIFT_NAME(permissionStatus(for:in:));
+
+/*!
+ @abstract Sets the permission status of a URL with a distant future expiration date.
+ @param status The new permission status to set for the given URL.
+ @param url The URL for which to set the status.
+ @discussion The URL is converted into a match pattern and will update ``grantedPermissionMatchPatterns`` and ``deniedPermissionMatchPatterns``. Use this method for changing a single URL's status.
+ Only ``WKWebExtensionContextPermissionStatusDeniedExplicitly``, ``WKWebExtensionContextPermissionStatusUnknown``, and ``WKWebExtensionContextPermissionStatusGrantedExplicitly``
+ states are allowed to be set using this method.
+ @seealso setPermissionStatus:forURL:expirationDate:
+ @seealso setPermissionStatus:forURL:inTab:
+*/
+- (void)setPermissionStatus:(WKWebExtensionContextPermissionStatus)status forURL:(NSURL *)url NS_SWIFT_NAME(setPermissionStatus(_:for:));
+
+/*!
+ @abstract Sets the permission status of a URL with a distant future expiration date.
+ @param status The new permission status to set for the given URL.
+ @param url The URL for which to set the status.
+ @param expirationDate The expiration date for the new permission status, or \c nil for distant future.
+ @discussion The URL is converted into a match pattern and will update ``grantedPermissionMatchPatterns`` and ``deniedPermissionMatchPatterns``. Use this method for changing a single URL's status.
+ Passing a `nil` expiration date will be treated as a distant future date. Only ``WKWebExtensionContextPermissionStatusDeniedExplicitly``, ``WKWebExtensionContextPermissionStatusUnknown``,
+ and ``WKWebExtensionContextPermissionStatusGrantedExplicitly`` states are allowed to be set using this method.
+ @seealso setPermissionStatus:forURL:
+ @seealso setPermissionStatus:forURL:inTab:
+*/
+- (void)setPermissionStatus:(WKWebExtensionContextPermissionStatus)status forURL:(NSURL *)url expirationDate:(nullable NSDate *)expirationDate NS_SWIFT_NAME(setPermissionStatus(_:for:expirationDate:));
+
+/*!
+ @abstract Checks the specified match pattern against the currently denied, granted, and requested permission match patterns.
+ @param pattern The pattern for which to return the status.
+ @discussion Match patterns can be granted on a per-tab basis. When the tab is known, access checks should always use the method that checks in a tab.
+ @seealso permissionStatusForMatchPattern:inTab:
+ @seealso hasAccessToURL:inTab:
+*/
+- (WKWebExtensionContextPermissionStatus)permissionStatusForMatchPattern:(WKWebExtensionMatchPattern *)pattern NS_SWIFT_NAME(permissionStatus(for:));
+
+/*!
+ @abstract Checks the specified match pattern against the currently denied, granted, and requested permission match patterns.
+ @param pattern The pattern for which to return the status.
+ @param tab The tab in which to return the permission status, or \c nil if the tab is not known or the global status is desired.
+ @discussion Match patterns can be granted on a per-tab basis. When the tab is known, access checks should always use this method.
+ @seealso permissionStatusForMatchPattern:
+ @seealso hasAccessToURL:inTab:
+*/
+- (WKWebExtensionContextPermissionStatus)permissionStatusForMatchPattern:(WKWebExtensionMatchPattern *)pattern inTab:(nullable id <WKWebExtensionTab>)tab NS_SWIFT_NAME(permissionStatus(for:in:));
+
+/*!
+ @abstract Sets the status of a match pattern with a distant future expiration date.
+ @param status The new permission status to set for the given match pattern.
+ @param pattern The match pattern for which to set the status.
+ @discussion This method will update ``grantedPermissionMatchPatterns`` and ``deniedPermissionMatchPatterns``. Use this method for changing a single match pattern's status.
+ Only ``WKWebExtensionContextPermissionStatusDeniedExplicitly``, ``WKWebExtensionContextPermissionStatusUnknown``, and ``WKWebExtensionContextPermissionStatusGrantedExplicitly``
+ states are allowed to be set using this method.
+ @seealso setPermissionStatus:forMatchPattern:expirationDate:
+ @seealso setPermissionStatus:forMatchPattern:inTab:
+*/
+- (void)setPermissionStatus:(WKWebExtensionContextPermissionStatus)status forMatchPattern:(WKWebExtensionMatchPattern *)pattern NS_SWIFT_NAME(setPermissionStatus(_:for:));
+
+/*!
+ @abstract Sets the status of a match pattern with a specific expiration date.
+ @param status The new permission status to set for the given match pattern.
+ @param pattern The match pattern for which to set the status.
+ @param expirationDate The expiration date for the new permission status, or \c nil for distant future.
+ @discussion This method will update ``grantedPermissionMatchPatterns`` and ``deniedPermissionMatchPatterns``. Use this method for changing a single match pattern's status.
+ Passing a `nil` expiration date will be treated as a distant future date. Only ``WKWebExtensionContextPermissionStatusDeniedExplicitly``, ``WKWebExtensionContextPermissionStatusUnknown``,
+ and ``WKWebExtensionContextPermissionStatusGrantedExplicitly`` states are allowed to be set using this method.
+ @seealso setPermissionStatus:forMatchPattern:
+ @seealso setPermissionStatus:forMatchPattern:inTab:
+*/
+- (void)setPermissionStatus:(WKWebExtensionContextPermissionStatus)status forMatchPattern:(WKWebExtensionMatchPattern *)pattern expirationDate:(nullable NSDate *)expirationDate NS_SWIFT_NAME(setPermissionStatus(_:for:expirationDate:));
+
+/*!
+ @abstract Loads the background content if needed for the extension.
+ @param completionHandler A block to be called upon completion of the loading process, with an optional error.
+ @discussion This method forces the loading of the background content for the extension that will otherwise be loaded on-demand during specific events.
+ It is useful when the app requires the background content to be loaded for other reasons. If the background content is already loaded, the completion handler
+ will be called immediately. An error will occur if the extension does not have any background content to load or loading fails.
+ */
+- (void)loadBackgroundContentWithCompletionHandler:(void (^)(NSError * _Nullable error))completionHandler NS_SWIFT_NAME(loadBackgroundContent(completionHandler:));
+
+/*!
+ @abstract Retrieves the extension action for a given tab, or the default action if `nil` is passed.
+ @param tab The tab for which to retrieve the extension action, or `nil` to get the default action.
+ @discussion The returned object represents the action specific to the tab when provided; otherwise, it returns the default action. The default
+ action is useful when the context is unrelated to a specific tab. When possible, specify the tab to get the most context-relevant action.
+ @seealso performActionForTab:
+ */
+- (nullable WKWebExtensionAction *)actionForTab:(nullable id <WKWebExtensionTab>)tab NS_SWIFT_NAME(action(for:));
+
+/*!
+ @abstract Performs the extension action associated with the specified tab or performs the default action if `nil` is passed.
+ @param tab The tab for which to perform the extension action, or `nil` to perform the default action.
+ @discussion Performing the action will mark the tab, if specified, as having an active user gesture. When the ``tab`` parameter is `nil`,
+ the default action is performed. The action can either trigger an event or display a popup, depending on how the extension is configured.
+ If the action is configured to display a popup, implementing the appropriate web extension controller delegate method is required; otherwise,
+ no action is performed for popup actions.
+ */
+- (void)performActionForTab:(nullable id <WKWebExtensionTab>)tab NS_SWIFT_NAME(performAction(for:));
+
+/*!
+ @abstract The commands associated with the extension.
+ @discussion Provides all commands registered within the extension. Each command represents an action or behavior available for the web extension.
+ @seealso performCommand:
+ */
+@property (nonatomic, readonly, copy) NSArray<WKWebExtensionCommand *> *commands;
+
+/*!
+ @abstract Performs the specified command, triggering events specific to this extension.
+ @param command The command to be performed.
+ @discussion This method performs the given command as if it was triggered by a user gesture within the context of the focused window and active tab.
+ */
+- (void)performCommand:(WKWebExtensionCommand *)command NS_SWIFT_NAME(performCommand(_:));
+
+#if TARGET_OS_IPHONE
+/*!
+ @abstract Performs the command associated with the given key command.
+ @discussion This method checks for a command corresponding to the provided ``UIKeyCommand`` and performs it, if available. The app should use this method to perform
+ any extension commands at an appropriate time in the app's responder object that handles the ``performWebExtensionCommandForKeyCommand:`` action.
+ @param keyCommand The key command received by the first responder.
+ @result Returns `YES` if a command corresponding to the UIKeyCommand was found and performed, `NO` otherwise.
+ */
+- (BOOL)performCommandForKeyCommand:(UIKeyCommand *)keyCommand NS_SWIFT_NAME(performCommand(for:));
+#endif
+
+#if TARGET_OS_OSX
+/*!
+ @abstract Performs the command associated with the given event.
+ @discussion This method checks for a command corresponding to the provided event and performs it, if available. The app should use this method to perform
+ any extension commands at an appropriate time in the app's event handling, like in ``sendEvent:`` of ``NSApplication`` or ``NSWindow`` subclasses.
+ @param event The event representing the user input.
+ @result Returns `YES` if a command corresponding to the event was found and performed, `NO` otherwise.
+ */
+- (BOOL)performCommandForEvent:(NSEvent *)event NS_SWIFT_NAME(performCommand(for:));
+
+/*!
+ @abstract Retrieves the command associated with the given event without performing it.
+ @discussion Returns the command that corresponds to the provided event, if such a command exists. This provides a way to programmatically
+ determine what action would occur for a given event, without triggering the command.
+ @param event The event for which to retrieve the corresponding command.
+ @result The command associated with the event, or `nil` if there is no such command.
+ */
+- (nullable WKWebExtensionCommand *)commandForEvent:(NSEvent *)event NS_SWIFT_NAME(command(for:));
+#endif // TARGET_OS_OSX
+
+/*!
+ @abstract Retrieves the menu items for a given tab.
+ @param tab The tab for which to retrieve the menu items.
+ @discussion Returns menu items provided by the extension, allowing the user to perform extension-defined actions on the tab.
+ The app is responsible for displaying these menu items, typically in a context menu or a long-press menu on the tab.
+ @note The properties of the menu items, including the items themselves, can change dynamically. Therefore, the app should fetch the menu items immediately
+ before showing them, to ensure that the most current and relevant items are presented.
+ */
+#if TARGET_OS_IPHONE
+- (NSArray<UIMenuElement *> *)menuItemsForTab:(id <WKWebExtensionTab>)tab NS_SWIFT_NAME(menuItems(for:));
+#else
+- (NSArray<NSMenuItem *> *)menuItemsForTab:(id <WKWebExtensionTab>)tab NS_SWIFT_NAME(menuItems(for:));
+#endif
+
+/*!
+ @abstract Should be called by the app when a user gesture is performed in a specific tab.
+ @param tab The tab in which the user gesture was performed.
+ @discussion When a user gesture is performed in a tab, this method should be called to update the extension context.
+ This enables the extension to be aware of the user gesture, potentially granting it access to features that require user interaction,
+ such as `activeTab`. Not required if using ``performActionForTab:``.
+ @seealso hasActiveUserGestureInTab:
+ */
+- (void)userGesturePerformedInTab:(id <WKWebExtensionTab>)tab NS_SWIFT_NAME(userGesturePerformed(in:));
+
+/*!
+ @abstract Indicates if a user gesture is currently active in the specified tab.
+ @param tab The tab for which to check for an active user gesture.
+ @discussion An active user gesture may influence the availability of certain permissions, such as `activeTab`. User gestures can
+ be triggered by various user interactions with the web extension, including clicking on extension menu items, executing extension commands,
+ or interacting with extension actions. A tab as having an active user gesture enables the extension to access features that require user interaction.
+ @seealso userGesturePerformedInTab:
+ */
+- (BOOL)hasActiveUserGestureInTab:(id <WKWebExtensionTab>)tab NS_SWIFT_NAME(hasActiveUserGesture(in:));
+
+/*!
+ @abstract Should be called by the app to clear a user gesture in a specific tab.
+ @param tab The tab from which the user gesture should be cleared.
+ @discussion When a user gesture is no longer relevant in a tab, this method should be called to update the extension context.
+ This will revoke the extension's access to features that require active user interaction, such as `activeTab`. User gestures are
+ automatically cleared during navigation in certain scenarios; this method is needed if the app intends to clear the gesture more aggressively.
+ @seealso userGesturePerformedInTab:
+ */
+- (void)clearUserGestureInTab:(id <WKWebExtensionTab>)tab NS_SWIFT_NAME(clearUserGesture(in:));
+
+/*!
+ @abstract The open windows that are exposed to this extension.
+ @discussion Provides the windows that are open and visible to the extension, as updated by the ``didOpenWindow:`` and ``didCloseWindow:`` methods.
+ Initially populated by the windows returned by the extension controller delegate method ``webExtensionController:openWindowsForExtensionContext:``.
+ @seealso didOpenWindow:
+ @seealso didCloseWindow:
+ */
+@property (nonatomic, readonly, copy) NSArray<id <WKWebExtensionWindow>> *openWindows;
+
+/*!
+ @abstract The window that currently has focus for this extension.
+ @discussion Provides the window that currently has focus, as set by the ``didFocusWindow:`` method.
+ It will be `nil` if no window has focus or if a window has focus that is not visible to the extension. Initially populated by the window
+ returned by the extension controller delegate method ``webExtensionController:focusedWindowForExtensionContext:``.
+ @seealso didFocusWindow:
+ */
+@property (nonatomic, readonly, weak, nullable) id <WKWebExtensionWindow> focusedWindow;
+
+/*!
+ @abstract A set of open tabs in all open windows that are exposed to this extension.
+ @discussion Provides a set of tabs in all open windows that are visible to the extension, as updated by the ``didOpenTab:`` and ``didCloseTab:`` methods.
+ Initially populated by the tabs in the windows returned by the extension controller delegate method ``webExtensionController:openWindowsForExtensionContext:``.
+ @seealso didOpenTab:
+ @seealso didCloseTab:
+ */
+@property (nonatomic, readonly, copy) NSSet<id <WKWebExtensionTab>> *openTabs;
+
+/*!
+ @abstract Should be called by the app when a new window is opened to fire appropriate events with only this extension.
+ @param newWindow The newly opened window.
+ @discussion This method informs only the specific extension of the opening of a new window. If the intention is to inform all loaded
+ extensions consistently, you should use the respective method on the extension controller instead.
+ @seealso didCloseWindow:
+ @seealso openWindows
+ */
+- (void)didOpenWindow:(id <WKWebExtensionWindow>)newWindow NS_SWIFT_NAME(didOpenWindow(_:));
+
+/*!
+ @abstract Should be called by the app when a window is closed to fire appropriate events with only this extension.
+ @param newWindow The window that was closed.
+ @discussion This method informs only the specific extension of the closure of a window. If the intention is to inform all loaded
+ extensions consistently, you should use the respective method on the extension controller instead.
+ @seealso didOpenWindow:
+ @seealso openWindows
+ */
+- (void)didCloseWindow:(id <WKWebExtensionWindow>)closedWindow NS_SWIFT_NAME(didCloseWindow(_:));
+
+/*!
+ @abstract Should be called by the app when a window gains focus to fire appropriate events with only this extension.
+ @param focusedWindow The window that gained focus, or \c nil if no window has focus or a window has focus that is not visible to this extension.
+ @discussion This method informs only the specific extension that a window has gained focus. If the intention is to inform all loaded
+ extensions consistently, you should use the respective method on the extension controller instead.
+ */
+- (void)didFocusWindow:(nullable id <WKWebExtensionWindow>)focusedWindow NS_SWIFT_NAME(didFocusWindow(_:));
+
+/*!
+ @abstract Should be called by the app when a new tab is opened to fire appropriate events with only this extension.
+ @param newTab The newly opened tab.
+ @discussion This method informs only the specific extension of the opening of a new tab. If the intention is to inform all loaded
+ extensions consistently, you should use the respective method on the extension controller instead.
+ @seealso didCloseTab:
+ @seealso openTabs
+ */
+- (void)didOpenTab:(id <WKWebExtensionTab>)newTab NS_SWIFT_NAME(didOpenTab(_:));
+
+/*!
+ @abstract Should be called by the app when a tab is closed to fire appropriate events with only this extension.
+ @param closedTab The tab that was closed.
+ @param windowIsClosing A boolean value indicating whether the window containing the tab is also closing.
+ @discussion This method informs only the specific extension of the closure of a tab. If the intention is to inform all loaded
+ extensions consistently, you should use the respective method on the extension controller instead.
+ @seealso didOpenTab:
+ @seealso openTabs
+ */
+- (void)didCloseTab:(id <WKWebExtensionTab>)closedTab windowIsClosing:(BOOL)windowIsClosing NS_REFINED_FOR_SWIFT;
+
+/*!
+ @abstract Should be called by the app when a tab is activated to notify only this specific extension.
+ @param activatedTab The tab that has become active.
+ @param previousTab The tab that was active before. This parameter can be \c nil if there was no previously active tab.
+ @discussion This method informs only the specific extension of the tab activation. If the intention is to inform all loaded
+ extensions consistently, you should use the respective method on the extension controller instead.
+ */
+- (void)didActivateTab:(id<WKWebExtensionTab>)activatedTab previousActiveTab:(nullable id<WKWebExtensionTab>)previousTab NS_REFINED_FOR_SWIFT;
+
+/*!
+ @abstract Should be called by the app when tabs are selected to fire appropriate events with only this extension.
+ @param selectedTabs The set of tabs that were selected.
+ @discussion This method informs only the specific extension that tabs have been selected. If the intention is to inform all loaded
+ extensions consistently, you should use the respective method on the extension controller instead.
+ */
+- (void)didSelectTabs:(NSArray<id <WKWebExtensionTab>> *)selectedTabs NS_SWIFT_NAME(didSelectTabs(_:));
+
+/*!
+ @abstract Should be called by the app when tabs are deselected to fire appropriate events with only this extension.
+ @param deselectedTabs The set of tabs that were deselected.
+ @discussion This method informs only the specific extension that tabs have been deselected. If the intention is to inform all loaded
+ extensions consistently, you should use the respective method on the extension controller instead.
+ */
+- (void)didDeselectTabs:(NSArray<id <WKWebExtensionTab>> *)deselectedTabs NS_SWIFT_NAME(didDeselectTabs(_:));
+
+/*!
+ @abstract Should be called by the app when a tab is moved to fire appropriate events with only this extension.
+ @param movedTab The tab that was moved.
+ @param index The old index of the tab within the window.
+ @param oldWindow The window that the tab was moved from, or \c nil if the tab is moving from no open window.
+ @discussion If the window is staying the same, the current window should be specified. This method informs only the specific extension
+ that a tab has been moved. If the intention is to inform all loaded extensions consistently, you should use the respective method on
+ the extension controller instead.
+ */
+- (void)didMoveTab:(id <WKWebExtensionTab>)movedTab fromIndex:(NSUInteger)index inWindow:(nullable id <WKWebExtensionWindow>)oldWindow NS_REFINED_FOR_SWIFT;
+
+/*!
+ @abstract Should be called by the app when a tab is replaced by another tab to fire appropriate events with only this extension.
+ @param oldTab The tab that was replaced.
+ @param newTab The tab that replaced the old tab.
+ @discussion This method informs only the specific extension that a tab has been replaced. If the intention is to inform all loaded
+ extensions consistently, you should use the respective method on the extension controller instead.
+ */
+- (void)didReplaceTab:(id <WKWebExtensionTab>)oldTab withTab:(id <WKWebExtensionTab>)newTab NS_SWIFT_NAME(didReplaceTab(_:with:));
+
+/*!
+ @abstract Should be called by the app when the properties of a tab are changed to fire appropriate events with only this extension.
+ @param properties The properties of the tab that were changed.
+ @param changedTab The tab whose properties were changed.
+ @discussion This method informs only the specific extension of the changes to a tab's properties. If the intention is to inform all loaded
+ extensions consistently, you should use the respective method on the extension controller instead.
+ */
+- (void)didChangeTabProperties:(WKWebExtensionTabChangedProperties)properties forTab:(id <WKWebExtensionTab>)changedTab NS_SWIFT_NAME(didChangeTabProperties(_:for:));
+
+@end
+
+WK_HEADER_AUDIT_END(nullability, sendability)
diff -ruN /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionController.h /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionController.h
--- /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionController.h 1970-01-01 01:00:00
+++ /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionController.h 2025-02-11 08:05:36
@@ -0,0 +1,255 @@
+/*
+ * Copyright (C) 2022-2024 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Foundation/Foundation.h>
+#import <WebKit/WKFoundation.h>
+
+#import <WebKit/WKWebExtensionControllerDelegate.h>
+#import <WebKit/WKWebExtensionDataType.h>
+#import <WebKit/WKWebExtensionTab.h>
+#import <WebKit/WKWebExtensionWindow.h>
+
+@class WKWebExtension;
+@class WKWebExtensionContext;
+@class WKWebExtensionControllerConfiguration;
+@class WKWebExtensionDataRecord;
+
+WK_HEADER_AUDIT_BEGIN(nullability, sendability)
+
+/*!
+ @abstract A ``WKWebExtensionController`` object manages a set of loaded extension contexts.
+ @discussion You can have one or more extension controller instances, allowing different parts of the app to use different sets of extensions.
+ A controller is associated with ``WKWebView`` via the ``webExtensionController`` property on ``WKWebViewConfiguration``.
+ */
+WK_EXTERN API_AVAILABLE(macos(15.4), ios(NA), visionos(NA)) WK_SWIFT_UI_ACTOR
+@interface WKWebExtensionController : NSObject
+
+/*!
+ @abstract Returns a web extension controller initialized with the default configuration.
+ @result An initialized web extension controller, or nil if the object could not be initialized.
+ @discussion This is a designated initializer. You can use ``initWithConfiguration:`` to
+ initialize an instance with a configuration.
+ @seealso initWithConfiguration:
+*/
+- (instancetype)init NS_DESIGNATED_INITIALIZER;
+
+/*!
+ @abstract Returns a web extension controller initialized with the specified configuration.
+ @param configuration The configuration for the new web extension controller.
+ @result An initialized web extension controller, or nil if the object could not be initialized.
+ @discussion This is a designated initializer. You can use ``init:`` to initialize an
+ instance with the default configuration. The initializer copies the specified configuration, so mutating
+ the configuration after invoking the initializer has no effect on the web extension controller.
+ @seealso init
+*/
+- (instancetype)initWithConfiguration:(WKWebExtensionControllerConfiguration *)configuration NS_DESIGNATED_INITIALIZER;
+
+/*! @abstract The extension controller delegate. */
+@property (nonatomic, weak) id <WKWebExtensionControllerDelegate> delegate;
+
+/*!
+ @abstract A copy of the configuration with which the web extension controller was initialized.
+ @discussion Mutating the configuration has no effect on the web extension controller.
+*/
+@property (nonatomic, readonly, copy) WKWebExtensionControllerConfiguration *configuration;
+
+/*!
+ @abstract Loads the specified extension context.
+ @discussion Causes the context to start, loading any background content, and injecting any content into relevant tabs.
+ @param error Set to \c nil or an \c NSError instance if an error occurred.
+ @result A Boolean value indicating if the context was successfully loaded.
+ @seealso loadExtensionContext:
+*/
+- (BOOL)loadExtensionContext:(WKWebExtensionContext *)extensionContext error:(NSError **)error NS_SWIFT_NAME(load(_:));
+
+/*!
+ @abstract Unloads the specified extension context.
+ @discussion Causes the context to stop running.
+ @param error Set to \c nil or an \c NSError instance if an error occurred.
+ @result A Boolean value indicating if the context was successfully unloaded.
+ @seealso unloadExtensionContext:
+*/
+- (BOOL)unloadExtensionContext:(WKWebExtensionContext *)extensionContext error:(NSError **)error NS_SWIFT_NAME(unload(_:));
+
+/*!
+ @abstract Returns a loaded extension context for the specified extension.
+ @param extension An extension to lookup.
+ @result An extension context or `nil` if no match was found.
+ @seealso extensions
+*/
+- (nullable WKWebExtensionContext *)extensionContextForExtension:(WKWebExtension *)extension NS_SWIFT_NAME(extensionContext(for:));
+
+/*!
+ @abstract Returns a loaded extension context matching the specified URL.
+ @param URL The URL to lookup.
+ @result An extension context or `nil` if no match was found.
+ @discussion This method is useful for determining the extension context to use when about to navigate to an extension URL. For example,
+ you could use this method to retrieve the appropriate extension context and then use its ``webViewConfiguration`` property to configure a
+ web view for loading that URL.
+ */
+- (nullable WKWebExtensionContext *)extensionContextForURL:(NSURL *)URL NS_SWIFT_NAME(extensionContext(for:));
+
+/*!
+ @abstract A set of all the currently loaded extensions.
+ @seealso extensionContexts
+*/
+@property (nonatomic, readonly, copy) NSSet<WKWebExtension *> *extensions;
+
+/*!
+ @abstract A set of all the currently loaded extension contexts.
+ @seealso extensions
+*/
+@property (nonatomic, readonly, copy) NSSet<WKWebExtensionContext *> *extensionContexts;
+
+/*! @abstract Returns a set of all available extension data types. */
+@property (class, nonatomic, readonly, copy) NSSet<WKWebExtensionDataType> *allExtensionDataTypes;
+
+/*!
+ @abstract Fetches data records containing the given extension data types for all known extensions.
+ @param dataTypes The extension data types to fetch records for.
+ @param completionHandler A block to invoke when the data records have been fetched.
+ @note The extension does not need to be loaded to be included in the result.
+*/
+- (void)fetchDataRecordsOfTypes:(NSSet<WKWebExtensionDataType> *)dataTypes completionHandler:(void (^)(NSArray<WKWebExtensionDataRecord *> *))completionHandler NS_SWIFT_NAME(fetchDataRecords(ofTypes:completionHandler:)) WK_SWIFT_ASYNC_NAME(dataRecords(ofTypes:));
+
+/*!
+ @abstract Fetches a data record containing the given extension data types for a specific known web extension context.
+ @param dataTypes The extension data types to fetch records for.
+ @param extensionContext The specific web extension context to fetch records for.
+ @param completionHandler A block to invoke when the data record has been fetched.
+ @note The extension does not need to be loaded to be included in the result.
+*/
+- (void)fetchDataRecordOfTypes:(NSSet<WKWebExtensionDataType> *)dataTypes forExtensionContext:(WKWebExtensionContext *)extensionContext completionHandler:(void (^)(WKWebExtensionDataRecord * _Nullable))completionHandler NS_SWIFT_NAME(fetchDataRecord(ofTypes:for:completionHandler:)) WK_SWIFT_ASYNC_NAME(dataRecord(ofTypes:for:));
+
+/*!
+ @abstract Removes extension data of the given types for the given data records.
+ @param dataTypes The extension data types that should be removed.
+ @param dataRecords The extension data records to delete data from.
+ @param completionHandler A block to invoke when the data has been removed.
+*/
+- (void)removeDataOfTypes:(NSSet<WKWebExtensionDataType> *)dataTypes fromDataRecords:(NSArray<WKWebExtensionDataRecord *> *)dataRecords completionHandler:(void (^)(void))completionHandler NS_SWIFT_NAME(removeData(ofTypes:from:completionHandler:));
+
+/*!
+ @abstract Should be called by the app when a new window is opened to fire appropriate events with all loaded web extensions.
+ @param newWindow The newly opened window.
+ @discussion This method informs all loaded extensions of the opening of a new window, ensuring consistent understanding across extensions.
+ If the intention is to inform only a specific extension, you should use the respective method on that extension's context instead.
+ @seealso didCloseWindow:
+ */
+- (void)didOpenWindow:(id <WKWebExtensionWindow>)newWindow NS_SWIFT_NAME(didOpenWindow(_:));
+
+/*!
+ @abstract Should be called by the app when a window is closed to fire appropriate events with all loaded web extensions.
+ @param newWindow The window that was closed.
+ @discussion This method informs all loaded extensions of the closure of a window, ensuring consistent understanding across extensions.
+ If the intention is to inform only a specific extension, you should use the respective method on that extension's context instead.
+ @seealso didOpenWindow:
+ */
+- (void)didCloseWindow:(id <WKWebExtensionWindow>)closedWindow NS_SWIFT_NAME(didCloseWindow(_:));
+
+/*!
+ @abstract Should be called by the app when a window gains focus to fire appropriate events with all loaded web extensions.
+ @param focusedWindow The window that gained focus, or \c nil if no window has focus or a window has focus that is not visible to extensions.
+ @discussion This method informs all loaded extensions of the focused window, ensuring consistent understanding across extensions.
+ If the intention is to inform only a specific extension, you should use the respective method on that extension's context instead.
+ */
+- (void)didFocusWindow:(nullable id <WKWebExtensionWindow>)focusedWindow NS_SWIFT_NAME(didFocusWindow(_:));
+
+/*!
+ @abstract Should be called by the app when a new tab is opened to fire appropriate events with all loaded web extensions.
+ @param newTab The newly opened tab.
+ @discussion This method informs all loaded extensions of the opening of a new tab, ensuring consistent understanding across extensions.
+ If the intention is to inform only a specific extension, you should use the respective method on that extension's context instead.
+ @seealso didCloseTab:
+ */
+- (void)didOpenTab:(id <WKWebExtensionTab>)newTab NS_SWIFT_NAME(didOpenTab(_:));
+
+/*!
+ @abstract Should be called by the app when a tab is closed to fire appropriate events with all loaded web extensions.
+ @param closedTab The tab that was closed.
+ @param windowIsClosing A boolean value indicating whether the window containing the tab is also closing.
+ @discussion This method informs all loaded extensions of the closing of a tab, ensuring consistent understanding across extensions.
+ If the intention is to inform only a specific extension, you should use the respective method on that extension's context instead.
+ @seealso didOpenTab:
+ */
+- (void)didCloseTab:(id <WKWebExtensionTab>)closedTab windowIsClosing:(BOOL)windowIsClosing NS_REFINED_FOR_SWIFT;
+
+/*!
+ @abstract Should be called by the app when a tab is activated to notify all loaded web extensions.
+ @param activatedTab The tab that has become active.
+ @param previousTab The tab that was active before. This parameter can be \c nil if there was no previously active tab.
+ @discussion This method informs all loaded extensions of the tab activation, ensuring consistent state awareness across extensions.
+ If the intention is to inform only a specific extension, use the respective method on that extension's context instead.
+ */
+- (void)didActivateTab:(id<WKWebExtensionTab>)activatedTab previousActiveTab:(nullable id<WKWebExtensionTab>)previousTab NS_REFINED_FOR_SWIFT;
+
+/*!
+ @abstract Should be called by the app when tabs are selected to fire appropriate events with all loaded web extensions.
+ @param selectedTabs The set of tabs that were selected.
+ @discussion This method informs all loaded extensions that tabs have been selected, ensuring consistent understanding across extensions.
+ If the intention is to inform only a specific extension, you should use the respective method on that extension's context instead.
+ */
+- (void)didSelectTabs:(NSArray<id <WKWebExtensionTab>> *)selectedTabs NS_SWIFT_NAME(didSelectTabs(_:));
+
+/*!
+ @abstract Should be called by the app when tabs are deselected to fire appropriate events with all loaded web extensions.
+ @param deselectedTabs The set of tabs that were deselected.
+ @discussion This method informs all loaded extensions that tabs have been deselected, ensuring consistent understanding across extensions.
+ If the intention is to inform only a specific extension, you should use the respective method on that extension's context instead.
+ */
+- (void)didDeselectTabs:(NSArray<id <WKWebExtensionTab>> *)deselectedTabs NS_SWIFT_NAME(didDeselectTabs(_:));
+
+/*!
+ @abstract Should be called by the app when a tab is moved to fire appropriate events with all loaded web extensions.
+ @param movedTab The tab that was moved.
+ @param index The old index of the tab within the window.
+ @param oldWindow The window that the tab was moved from, or \c nil if the tab is moving from no open window.
+ @discussion This method informs all loaded extensions of the movement of a tab, ensuring consistent understanding across extensions.
+ If the window is staying the same, the current window should be specified. If the intention is to inform only a specific extension,
+ use the respective method on that extension's context instead.
+ */
+- (void)didMoveTab:(id <WKWebExtensionTab>)movedTab fromIndex:(NSUInteger)index inWindow:(nullable id <WKWebExtensionWindow>)oldWindow NS_REFINED_FOR_SWIFT;
+
+/*!
+ @abstract Should be called by the app when a tab is replaced by another tab to fire appropriate events with all loaded web extensions.
+ @param oldTab The tab that was replaced.
+ @param newTab The tab that replaced the old tab.
+ @discussion This method informs all loaded extensions of the replacement of a tab, ensuring consistent understanding across extensions.
+ If the intention is to inform only a specific extension, you should use the respective method on that extension's context instead.
+ */
+- (void)didReplaceTab:(id <WKWebExtensionTab>)oldTab withTab:(id <WKWebExtensionTab>)newTab NS_SWIFT_NAME(didReplaceTab(_:with:));
+
+/*!
+ @abstract Should be called by the app when the properties of a tab are changed to fire appropriate events with all loaded web extensions.
+ @param properties The properties of the tab that were changed.
+ @param changedTab The tab whose properties were changed.
+ @discussion This method informs all loaded extensions of changes to tab properties, ensuring a unified understanding across extensions.
+ If the intention is to inform only a specific extension, you should use the respective method on that extension's context instead.
+ */
+- (void)didChangeTabProperties:(WKWebExtensionTabChangedProperties)properties forTab:(id <WKWebExtensionTab>)changedTab NS_SWIFT_NAME(didChangeTabProperties(_:for:));
+
+@end
+
+WK_HEADER_AUDIT_END(nullability, sendability)
diff -ruN /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionControllerConfiguration.h /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionControllerConfiguration.h
--- /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionControllerConfiguration.h 1970-01-01 01:00:00
+++ /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionControllerConfiguration.h 2025-02-11 08:05:41
@@ -0,0 +1,89 @@
+/*
+ * Copyright (C) 2022-2024 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Foundation/Foundation.h>
+#import <WebKit/WKFoundation.h>
+
+WK_HEADER_AUDIT_BEGIN(nullability, sendability)
+
+@class WKWebViewConfiguration;
+@class WKWebsiteDataStore;
+@class WKWebExtensionController;
+
+/*!
+ @abstract A ``WKWebExtensionControllerConfiguration`` object with which to initialize a web extension controller.
+ @discussion Contains properties used to configure a ``WKWebExtensionController``.
+*/
+WK_EXTERN API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_SWIFT_UI_ACTOR NS_SWIFT_NAME(WKWebExtensionController.Configuration)
+@interface WKWebExtensionControllerConfiguration : NSObject <NSSecureCoding, NSCopying>
+
++ (instancetype)new NS_UNAVAILABLE;
+- (instancetype)init NS_UNAVAILABLE;
+
+/*!
+ @abstract Returns a new default configuration that is persistent and not unique.
+ @discussion If a ``WKWebExtensionController`` is associated with a persistent configuration,
+ data will be written to the file system in a common location. When using multiple extension controllers, each
+ controller should use a unique configuration to avoid conflicts.
+ @seealso configurationWithIdentifier:
+*/
++ (instancetype)defaultConfiguration;
+
+/*!
+ @abstract Returns a new non-persistent configuration.
+ @discussion If a ``WKWebExtensionController`` is associated with a non-persistent configuration,
+ no data will be written to the file system. This is useful for extensions in "private browsing" situations.
+*/
++ (instancetype)nonPersistentConfiguration;
+
+/*!
+ @abstract Returns a new configuration that is persistent and unique for the specified identifier.
+ @discussion If a ``WKWebExtensionController`` is associated with a unique persistent configuration,
+ data will be written to the file system in a unique location based on the specified identifier.
+ @seealso defaultConfiguration
+*/
++ (instancetype)configurationWithIdentifier:(NSUUID *)identifier;
+
+/*! @abstract A Boolean value indicating if this context will write data to the the file system. */
+@property (nonatomic, readonly, getter=isPersistent) BOOL persistent;
+
+/*! @abstract The unique identifier used for persistent configuration storage, or `nil` when it is the default or not persistent. */
+@property (nonatomic, nullable, readonly, copy) NSUUID *identifier;
+
+/*! @abstract The web view configuration to be used as a basis for configuring web views in extension contexts. */
+@property (nonatomic, null_resettable, copy) WKWebViewConfiguration *webViewConfiguration;
+
+/*!
+ @abstract The default data store for website data and cookie access in extension contexts.
+ @discussion This property sets the primary data store for managing website data, including cookies, which extensions can access,
+ subject to the granted permissions within the extension contexts. Defaults to ``WKWebsiteDataStore.defaultDataStore``.
+ @note In addition to this data store, extensions can also access other data stores, such as non-persistent ones, for any open tabs.
+ */
+@property (nonatomic, null_resettable, retain) WKWebsiteDataStore *defaultWebsiteDataStore;
+
+@end
+
+WK_HEADER_AUDIT_END(nullability, sendability)
diff -ruN /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionControllerDelegate.h /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionControllerDelegate.h
--- /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionControllerDelegate.h 1970-01-01 01:00:00
+++ /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionControllerDelegate.h 2025-02-11 08:05:38
@@ -0,0 +1,207 @@
+/*
+ * Copyright (C) 2022-2024 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Foundation/Foundation.h>
+#import <WebKit/WKFoundation.h>
+
+#import <WebKit/WKWebExtensionPermission.h>
+
+@class WKWebExtensionAction;
+@class WKWebExtensionContext;
+@class WKWebExtensionController;
+@class WKWebExtensionMatchPattern;
+@class WKWebExtensionMessagePort;
+@class WKWebExtensionTabConfiguration;
+@class WKWebExtensionWindowConfiguration;
+@protocol WKWebExtensionTab;
+@protocol WKWebExtensionWindow;
+
+WK_HEADER_AUDIT_BEGIN(nullability, sendability)
+
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA)) WK_SWIFT_UI_ACTOR
+@protocol WKWebExtensionControllerDelegate <NSObject>
+@optional
+
+/*!
+ @abstract Called when an extension context requests the list of ordered open windows.
+ @param controller The web extension controller that is managing the extension.
+ @param extensionContext The context in which the web extension is running.
+ @return The array of ordered open windows.
+ @discussion This method should be implemented by the app to provide the extension with the ordered open windows. Depending on your
+ app's requirements, you may return different windows for each extension or the same windows for all extensions. The first window in the returned
+ array must correspond to the currently focused window and match the result of ``webExtensionController:focusedWindowForExtensionContext:``.
+ If ``webExtensionController:focusedWindowForExtensionContext:`` returns `nil`, indicating that no window has focus or the focused
+ window is not visible to the extension, the first window in the list returned by this method will be considered the presumed focused window. An empty result
+ indicates no open windows are available for the extension. Defaults to an empty array if not implemented.
+ @seealso webExtensionController:focusedWindowForExtensionContext:
+ */
+- (NSArray<id <WKWebExtensionWindow>> *)webExtensionController:(WKWebExtensionController *)controller openWindowsForExtensionContext:(WKWebExtensionContext *)extensionContext NS_SWIFT_NAME(webExtensionController(_:openWindowsFor:));
+
+/*!
+ @abstract Called when an extension context requests the currently focused window.
+ @param controller The web extension controller that is managing the extension.
+ @param extensionContext The context in which the web extension is running.
+ @return The window that is currently focused, or `nil` if no window is focused or the focused window is not visible to the extension.
+ @discussion This method can be optionally implemented by the app to designate the window currently in focus to the extension.
+ If not implemented, the first window in the result of ``webExtensionController:openWindowsForExtensionContext:`` is used.
+ @seealso webExtensionController:openWindowsForExtensionContext:
+ */
+- (nullable id <WKWebExtensionWindow>)webExtensionController:(WKWebExtensionController *)controller focusedWindowForExtensionContext:(WKWebExtensionContext *)extensionContext NS_SWIFT_NAME(webExtensionController(_:focusedWindowFor:));
+
+/*!
+ @abstract Called when an extension context requests a new window to be opened.
+ @param controller The web extension controller that is managing the extension.
+ @param configuration The configuration specifying how the new window should be created.
+ @param extensionContext The context in which the web extension is running.
+ @param completionHandler A block to be called with the newly created window or \c nil if the window wasn't created. An error should be
+ provided if any errors occurred.
+ @discussion This method should be implemented by the app to handle requests to open new windows. The app can decide how to handle the
+ process based on the provided configuration and existing windows. Once handled, the app should call the completion handler with the opened window
+ or `nil` if the request was declined or failed. If not implemented, the extension will be unable to open new windows.
+ */
+- (void)webExtensionController:(WKWebExtensionController *)controller openNewWindowUsingConfiguration:(WKWebExtensionWindowConfiguration *)configuration forExtensionContext:(WKWebExtensionContext *)extensionContext completionHandler:(void (^)(id <WKWebExtensionWindow> WK_NULLABLE_RESULT newWindow, NSError * _Nullable error))completionHandler NS_SWIFT_NAME(webExtensionController(_:openNewWindowUsing:for:completionHandler:));
+
+/*!
+ @abstract Called when an extension context requests a new tab to be opened.
+ @param controller The web extension controller that is managing the extension.
+ @param configuration The configuration specifying how the new tab should be created.
+ @param extensionContext The context in which the web extension is running.
+ @param completionHandler A block to be called with the newly created tab or \c nil if the tab wasn't created. An error should be
+ provided if any errors occurred.
+ @discussion This method should be implemented by the app to handle requests to open new tabs. The app can decide how to handle the
+ process based on the provided configuration and existing tabs. Once handled, the app should call the completion handler with the opened tab
+ or `nil` if the request was declined or failed. If not implemented, the extension will be unable to open new tabs.
+ */
+- (void)webExtensionController:(WKWebExtensionController *)controller openNewTabUsingConfiguration:(WKWebExtensionTabConfiguration *)configuration forExtensionContext:(WKWebExtensionContext *)extensionContext completionHandler:(void (^)(id <WKWebExtensionTab> WK_NULLABLE_RESULT newTab, NSError * _Nullable error))completionHandler NS_SWIFT_NAME(webExtensionController(_:openNewTabUsing:for:completionHandler:));
+
+/*!
+ @abstract Called when an extension context requests its options page to be opened.
+ @param controller The web extension controller that is managing the extension.
+ @param extensionContext The context in which the web extension is running.
+ @param completionHandler A block to be called once the options page has been displayed or with an error if the page could not be shown.
+ @discussion This method should be implemented by the app to handle requests to display the extension's options page. The app can decide
+ how and where to display the options page (e.g., in a new tab or a separate window). The app should call the completion handler once the options
+ page is visible to the user, or with an error if the operation was declined or failed. If not implemented, the options page will be opened in a new tab
+ using the ``webExtensionController:openNewTabUsingConfiguration:forExtensionContext:completionHandler:`` delegate method.
+ */
+- (void)webExtensionController:(WKWebExtensionController *)controller openOptionsPageForExtensionContext:(WKWebExtensionContext *)extensionContext completionHandler:(void (^)(NSError * _Nullable error))completionHandler NS_SWIFT_NAME(webExtensionController(_:openOptionsPageFor:completionHandler:));
+
+/*!
+ @abstract Called when an extension context requests permissions.
+ @param controller The web extension controller that is managing the extension.
+ @param permissions The set of permissions being requested by the extension.
+ @param tab The tab in which the extension is running, or \c nil if the request is not specific to a tab.
+ @param extensionContext The context in which the web extension is running.
+ @param completionHandler A block to be called with the set of allowed permissions and an optional expiration date.
+ @discussion This method should be implemented by the app to prompt the user for permission and call the completion handler with the
+ set of permissions that were granted and an optional expiration date. If not implemented or the completion handler is not called within a reasonable
+ amount of time, the request is assumed to have been denied. The expiration date can be used to specify when the permissions expire. If `nil`,
+ permissions are assumed to not expire.
+ */
+- (void)webExtensionController:(WKWebExtensionController *)controller promptForPermissions:(NSSet<WKWebExtensionPermission> *)permissions inTab:(nullable id <WKWebExtensionTab>)tab forExtensionContext:(WKWebExtensionContext *)extensionContext completionHandler:(void (^)(NSSet<WKWebExtensionPermission> *allowedPermissions, NSDate * _Nullable expirationDate))completionHandler NS_SWIFT_NAME(webExtensionController(_:promptForPermissions:in:for:completionHandler:));
+
+/*!
+ @abstract Called when an extension context requests access to a set of URLs.
+ @param controller The web extension controller that is managing the extension.
+ @param urls The set of URLs that the extension is requesting access to.
+ @param tab The tab in which the extension is running, or \c nil if the request is not specific to a tab.
+ @param extensionContext The context in which the web extension is running.
+ @param completionHandler A block to be called with the set of allowed URLs and an optional expiration date.
+ @discussion This method should be implemented by the app to prompt the user for permission and call the completion handler with the
+ set of URLs that were granted access to and an optional expiration date. If not implemented or the completion handler is not called within a
+ reasonable amount of time, the request is assumed to have been denied. The expiration date can be used to specify when the URLs expire.
+ If `nil`, URLs are assumed to not expire.
+ */
+- (void)webExtensionController:(WKWebExtensionController *)controller promptForPermissionToAccessURLs:(NSSet<NSURL *> *)urls inTab:(nullable id <WKWebExtensionTab>)tab forExtensionContext:(WKWebExtensionContext *)extensionContext completionHandler:(void (^)(NSSet<NSURL *> *allowedURLs, NSDate * _Nullable expirationDate))completionHandler NS_SWIFT_NAME(webExtensionController(_:promptForPermissionToAccess:in:for:completionHandler:));
+
+/*!
+ @abstract Called when an extension context requests access to a set of match patterns.
+ @param controller The web extension controller that is managing the extension.
+ @param matchPatterns The set of match patterns that the extension is requesting access to.
+ @param tab The tab in which the extension is running, or \c nil if the request is not specific to a tab.
+ @param extensionContext The context in which the web extension is running.
+ @param completionHandler A block to be called with the set of allowed match patterns and an optional expiration date.
+ @discussion This method should be implemented by the app to prompt the user for permission and call the completion handler with the
+ set of match patterns that were granted access to and an optional expiration date. If not implemented or the completion handler is not called
+ within a reasonable amount of time, the request is assumed to have been denied. The expiration date can be used to specify when the match
+ patterns expire. If `nil`, match patterns are assumed to not expire.
+ */
+- (void)webExtensionController:(WKWebExtensionController *)controller promptForPermissionMatchPatterns:(NSSet<WKWebExtensionMatchPattern *> *)matchPatterns inTab:(nullable id <WKWebExtensionTab>)tab forExtensionContext:(WKWebExtensionContext *)extensionContext completionHandler:(void (^)(NSSet<WKWebExtensionMatchPattern *> *allowedMatchPatterns, NSDate * _Nullable expirationDate))completionHandler NS_SWIFT_NAME(webExtensionController(_:promptForPermissionMatchPatterns:in:for:completionHandler:));
+
+/*!
+ @abstract Called when an action's properties are updated.
+ @param controller The web extension controller initiating the request.
+ @param action The web extension action whose properties are updated.
+ @param context The context within which the web extension is running.
+ @discussion This method is called when an action's properties are updated and should be reflected in the app's user interface.
+ The app should ensure that any visible changes, such as icons and labels, are updated accordingly.
+ */
+- (void)webExtensionController:(WKWebExtensionController *)controller didUpdateAction:(WKWebExtensionAction *)action forExtensionContext:(WKWebExtensionContext *)context NS_SWIFT_NAME(webExtensionController(_:didUpdate:forExtensionContext:));
+
+/*!
+ @abstract Called when a popup is requested to be displayed for a specific action.
+ @param controller The web extension controller initiating the request.
+ @param action The action for which the popup is requested.
+ @param context The context within which the web extension is running.
+ @param completionHandler A block to be called once the popup display operation is completed.
+ @discussion This method is called in response to the extension's scripts or when invoking ``performActionForTab:`` if the action has a popup.
+ The associated tab, if applicable, can be located through the ``associatedTab`` property of the ``action`` parameter. This delegate method is
+ called when the web view for the popup is fully loaded and ready to display. Implementing this method is needed if the app intends to support
+ programmatically showing the popup by the extension, although it is recommended for handling both programmatic and user-initiated cases.
+ */
+- (void)webExtensionController:(WKWebExtensionController *)controller presentPopupForAction:(WKWebExtensionAction *)action forExtensionContext:(WKWebExtensionContext *)context completionHandler:(void (^)(NSError * _Nullable error))completionHandler NS_SWIFT_NAME(webExtensionController(_:presentActionPopup:for:completionHandler:));
+
+/*!
+ @abstract Called when an extension context wants to send a one-time message to an application.
+ @param controller The web extension controller that is managing the extension.
+ @param message The message to be sent.
+ @param applicationIdentifier The unique identifier for the application, or \c nil if none was specified.
+ @param extensionContext The context in which the web extension is running.
+ @param replyHandler A block to be called with a JSON-serializable reply message or an error.
+ @discussion This method should be implemented by the app to handle one-off messages to applications.
+ If not implemented, the default behavior is to pass the message to the app extension handler within the extension's bundle,
+ if the extension was loaded from an app extension bundle; otherwise, no action is performed if not implemented.
+ @note The reply message must be JSON-serializable according to ``NSJSONSerialization``.
+ */
+- (void)webExtensionController:(WKWebExtensionController *)controller sendMessage:(id)message toApplicationWithIdentifier:(nullable NSString *)applicationIdentifier forExtensionContext:(WKWebExtensionContext *)extensionContext replyHandler:(void (^)(id WK_NULLABLE_RESULT replyMessage, NSError * _Nullable error))replyHandler NS_SWIFT_NAME(webExtensionController(_:sendMessage:toApplicationWithIdentifier:for:replyHandler:)) WK_SWIFT_ASYNC(5);
+
+/*!
+ @abstract Called when an extension context wants to establish a persistent connection to an application.
+ @param controller The web extension controller that is managing the extension.
+ @param extensionContext The context in which the web extension is running.
+ @param port A port object for handling the message exchange.
+ @param completionHandler A block to be called when the connection is ready to use, taking an optional error.
+ If the connection is successfully established, the error should be \c nil.
+ @discussion This method should be implemented by the app to handle establishing connections to applications.
+ The provided ``WKWebExtensionPort`` object can be used to handle message sending, receiving, and disconnection.
+ You should retain the port object for as long as the connection remains active. Releasing the port will disconnect it.
+ If not implemented, the default behavior is to pass the messages to the app extension handler within the extension's bundle,
+ if the extension was loaded from an app extension bundle; otherwise, no action is performed if not implemented.
+ */
+- (void)webExtensionController:(WKWebExtensionController *)controller connectUsingMessagePort:(WKWebExtensionMessagePort *)port forExtensionContext:(WKWebExtensionContext *)extensionContext completionHandler:(void (^)(NSError * _Nullable error))completionHandler NS_SWIFT_NAME(webExtensionController(_:connectUsing:for:completionHandler:));
+
+@end
+
+WK_HEADER_AUDIT_END(nullability, sendability)
diff -ruN /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionDataRecord.h /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionDataRecord.h
--- /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionDataRecord.h 1970-01-01 01:00:00
+++ /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionDataRecord.h 2025-02-11 08:05:35
@@ -0,0 +1,90 @@
+/*
+ * Copyright (C) 2024 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Foundation/Foundation.h>
+#import <WebKit/WKFoundation.h>
+
+#import <WebKit/WKWebExtensionDataType.h>
+
+WK_HEADER_AUDIT_BEGIN(nullability, sendability)
+
+/*! @abstract Indicates a ``WKWebExtensionDataRecord`` error. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_EXTERN NSErrorDomain const WKWebExtensionDataRecordErrorDomain NS_SWIFT_NAME(WKWebExtensionDataRecord.errorDomain) NS_SWIFT_NONISOLATED;
+
+/*!
+ @abstract Constants used by ``NSError`` to indicate errors in the ``WKWebExtensionDataRecord`` domain.
+ @constant WKWebExtensionDataRecordErrorUnknown Indicates that an unknown error occurred.
+ @constant WKWebExtensionDataRecordErrorLocalStorageFailed Indicates a failure occurred when either deleting or calculating local storage.
+ @constant WKWebExtensionDataRecordErrorSessionStorageFailed Indicates a failure occurred when either deleting or calculating session storage.
+ @constant WKWebExtensionDataRecordErrorSynchronizedStorageFailed Indicates a failure occurred when either deleting or calculating synchronized storage.
+ */
+typedef NS_ERROR_ENUM(WKWebExtensionDataRecordErrorDomain, WKWebExtensionDataRecordError) {
+ WKWebExtensionDataRecordErrorUnknown = 1,
+ WKWebExtensionDataRecordErrorLocalStorageFailed,
+ WKWebExtensionDataRecordErrorSessionStorageFailed,
+ WKWebExtensionDataRecordErrorSynchronizedStorageFailed,
+} NS_SWIFT_NAME(WKWebExtensionDataRecord.Error) API_AVAILABLE(macos(15.4), ios(NA), visionos(NA));
+
+/*!
+ @abstract A ``WKWebExtensionDataRecord`` object represents a record of stored data for a specific web extension context.
+ @discussion Contains properties and methods to query the data types and sizes.
+*/
+WK_EXTERN API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_SWIFT_UI_ACTOR NS_SWIFT_NAME(WKWebExtension.DataRecord)
+@interface WKWebExtensionDataRecord : NSObject
+
++ (instancetype)new NS_UNAVAILABLE;
+- (instancetype)init NS_UNAVAILABLE;
+
+/*! @abstract The display name for the web extension to which this data record belongs. */
+@property (nonatomic, readonly, copy) NSString *displayName;
+
+/*! @abstract Unique identifier for the web extension context to which this data record belongs. */
+@property (nonatomic, readonly, copy) NSString *uniqueIdentifier;
+
+/*! @abstract The set of data types contained in this data record. */
+@property (nonatomic, readonly, copy) NSSet<WKWebExtensionDataType> *containedDataTypes;
+
+/*! @abstract An array of errors that may have occurred when either calculating or deleting storage. */
+@property (nonatomic, readonly, copy) NSArray<NSError *> *errors;
+
+/*!
+ @abstract The total size in bytes of all data types contained in this data record.
+ @seealso sizeInBytesOfTypes:
+ */
+@property (nonatomic, readonly) NSUInteger totalSizeInBytes;
+
+/*!
+ @abstract Retrieves the size in bytes of the specific data types in this data record.
+ @param dataTypes The set of data types to measure the size for.
+ @return The total size of the specified data types.
+ @seealso totalSizeInBytes
+ */
+- (NSUInteger)sizeInBytesOfTypes:(NSSet<WKWebExtensionDataType> *)dataTypes NS_SWIFT_NAME(sizeInBytes(ofTypes:));
+
+@end
+
+WK_HEADER_AUDIT_END(nullability, sendability)
diff -ruN /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionDataType.h /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionDataType.h
--- /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionDataType.h 1970-01-01 01:00:00
+++ /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionDataType.h 2025-02-11 08:05:39
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2024 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Foundation/Foundation.h>
+#import <WebKit/WKFoundation.h>
+
+/*! @abstract Constants for specifying data types for a ``WKWebExtensionDataRecord``. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+typedef NSString * WKWebExtensionDataType NS_TYPED_ENUM NS_SWIFT_NAME(WKWebExtension.DataType);
+
+/*! @abstract Specifies local storage, including `browser.storage.local`. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_EXTERN WKWebExtensionDataType const WKWebExtensionDataTypeLocal NS_SWIFT_NONISOLATED;
+
+/*! @abstract Specifies session storage, including `browser.storage.session`. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_EXTERN WKWebExtensionDataType const WKWebExtensionDataTypeSession NS_SWIFT_NONISOLATED;
+
+/*! @abstract Specifies synchronized storage, including `browser.storage.sync`. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_EXTERN WKWebExtensionDataType const WKWebExtensionDataTypeSynchronized NS_SWIFT_NONISOLATED;
diff -ruN /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionMatchPattern.h /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionMatchPattern.h
--- /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionMatchPattern.h 1970-01-01 01:00:00
+++ /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionMatchPattern.h 2025-02-11 08:05:36
@@ -0,0 +1,175 @@
+/*
+ * Copyright (C) 2022-2024 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Foundation/Foundation.h>
+#import <WebKit/WKFoundation.h>
+
+WK_HEADER_AUDIT_BEGIN(nullability, sendability)
+
+@class WKWebExtension;
+
+/*! @abstract Indicates a ``WKWebExtensionMatchPattern`` error. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_EXTERN NSErrorDomain const WKWebExtensionMatchPatternErrorDomain NS_SWIFT_NAME(WKWebExtensionMatchPattern.errorDomain) NS_SWIFT_NONISOLATED;
+
+/*!
+ @abstract Constants used by ``NSError`` to indicate errors in the ``WKWebExtensionMatchPattern`` domain.
+ @constant WKWebExtensionMatchPatternErrorUnknown Indicates that an unknown error occurred.
+ @constant WKWebExtensionMatchPatternErrorInvalidScheme Indicates that the scheme component was invalid.
+ @constant WKWebExtensionMatchPatternErrorInvalidHost Indicates that the host component was invalid.
+ @constant WKWebExtensionMatchPatternErrorInvalidPath Indicates that the path component was invalid.
+ */
+typedef NS_ERROR_ENUM(WKWebExtensionMatchPatternErrorDomain, WKWebExtensionMatchPatternError) {
+ WKWebExtensionMatchPatternErrorUnknown = 1,
+ WKWebExtensionMatchPatternErrorInvalidScheme,
+ WKWebExtensionMatchPatternErrorInvalidHost,
+ WKWebExtensionMatchPatternErrorInvalidPath,
+} NS_SWIFT_NAME(WKWebExtensionMatchPattern.Error) API_AVAILABLE(macos(15.4), ios(NA), visionos(NA));
+
+/*!
+ @abstract Constants used by ``WKWebExtensionMatchPattern`` to indicate matching options.
+ @constant WKWebExtensionMatchPatternOptionsNone Indicates no special matching options.
+ @constant WKWebExtensionMatchPatternOptionsIgnoreSchemes Indicates that the scheme components should be ignored while matching.
+ @constant WKWebExtensionMatchPatternOptionsIgnorePaths Indicates that the host components should be ignored while matching.
+ @constant WKWebExtensionMatchPatternOptionsMatchBidirectionally Indicates that two patterns should be checked in either direction while matching (A matches B, or B matches A). Invalid for matching URLs.
+ */
+typedef NS_OPTIONS(NSUInteger, WKWebExtensionMatchPatternOptions) {
+ WKWebExtensionMatchPatternOptionsNone = 0,
+ WKWebExtensionMatchPatternOptionsIgnoreSchemes = 1 << 0,
+ WKWebExtensionMatchPatternOptionsIgnorePaths = 1 << 1,
+ WKWebExtensionMatchPatternOptionsMatchBidirectionally = 1 << 2,
+} NS_SWIFT_NAME(WKWebExtensionMatchPattern.Options) API_AVAILABLE(macos(15.4), ios(NA), visionos(NA));
+
+/*!
+ @abstract A ``WKWebExtensionMatchPattern`` object represents a way to specify groups of URLs.
+ @discussion All match patterns are specified as strings. Apart from the special `<all_urls>` pattern, match patterns
+ consist of three parts: scheme, host, and path.
+ */
+WK_EXTERN API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_SWIFT_UI_ACTOR NS_SWIFT_NAME(WKWebExtension.MatchPattern)
+@interface WKWebExtensionMatchPattern : NSObject <NSSecureCoding, NSCopying>
+
++ (instancetype)new NS_UNAVAILABLE;
+- (instancetype)init NS_UNAVAILABLE;
+
+/*!
+ @abstract Registers a custom URL scheme that can be used in match patterns.
+ @discussion This method should be used to register any custom URL schemes used by the app for the extension base URLs,
+ other than `webkit-extension`, or if extensions should have access to other supported URL schemes when using `<all_urls>`.
+ @param urlScheme The custom URL scheme to register.
+*/
++ (void)registerCustomURLScheme:(NSString *)urlScheme;
+
+/*! @abstract Returns a pattern object for `<all_urls>`. */
++ (instancetype)allURLsMatchPattern;
+
+/*! @abstract Returns a pattern object that has `*` for scheme, host, and path. */
++ (instancetype)allHostsAndSchemesMatchPattern;
+
+/*!
+ @abstract Returns a pattern object for the specified pattern string.
+ @result Returns `nil` if the pattern string is invalid.
+ @seealso initWithString:error:
+ */
++ (nullable instancetype)matchPatternWithString:(NSString *)string;
+
+/*!
+ @abstract Returns a pattern object for the specified scheme, host, and path strings.
+ @result A pattern object, or `nil` if any of the strings are invalid.
+ @seealso initWithScheme:host:path:error:
+ */
++ (nullable instancetype)matchPatternWithScheme:(NSString *)scheme host:(NSString *)host path:(NSString *)path;
+
+/*!
+ @abstract Returns a pattern object for the specified pattern string.
+ @param error Set to \c nil or an error instance if an error occurred.
+ @result A pattern object, or `nil` if the pattern string is invalid and an error will be set.
+ @seealso initWithString:
+ */
+- (nullable instancetype)initWithString:(NSString *)string error:(NSError **)error NS_DESIGNATED_INITIALIZER;
+
+/*!
+ @abstract Returns a pattern object for the specified scheme, host, and path strings.
+ @param error Set to \c nil or an error instance if an error occurred.
+ @result A pattern object, or `nil` if any of the strings are invalid and an error will be set.
+ @seealso initWithScheme:host:path:
+ */
+- (nullable instancetype)initWithScheme:(NSString *)scheme host:(NSString *)host path:(NSString *)path error:(NSError **)error NS_DESIGNATED_INITIALIZER;
+
+/*! @abstract The original pattern string. */
+@property (nonatomic, readonly, copy) NSString *string;
+
+/*! @abstract The scheme part of the pattern string, unless ``matchesAllURLs`` is `YES`. */
+@property (nonatomic, nullable, readonly, copy) NSString *scheme;
+
+/*! @abstract The host part of the pattern string, unless ``matchesAllURLs`` is `YES`. */
+@property (nonatomic, nullable, readonly, copy) NSString *host;
+
+/*! @abstract The path part of the pattern string, unless ``matchesAllURLs`` is `YES`. */
+@property (nonatomic, nullable, readonly, copy) NSString *path;
+
+/*! @abstract If the pattern is `<all_urls>`. */
+@property (nonatomic, readonly) BOOL matchesAllURLs;
+
+/*! @abstract If the pattern is `<all_urls>` or has `*` as the host. */
+@property (nonatomic, readonly) BOOL matchesAllHosts;
+
+/*!
+ @abstract Matches the reciever pattern against the specified URL.
+ @param url The URL to match the against the reciever pattern.
+ @result A Boolean value indicating if pattern matches the specified URL.
+ @seealso matchesURL:options:
+ */
+- (BOOL)matchesURL:(nullable NSURL *)url NS_SWIFT_NAME(matches(_:));
+
+/*!
+ @abstract Matches the reciever pattern against the specified URL with options.
+ @param url The URL to match the against the reciever pattern.
+ @param options The options to use while matching.
+ @result A Boolean value indicating if pattern matches the specified URL.
+ @seealso matchesURL:
+ */
+- (BOOL)matchesURL:(nullable NSURL *)url options:(WKWebExtensionMatchPatternOptions)options NS_SWIFT_NAME(matches(_:options:));
+
+/*!
+ @abstract Matches the receiver pattern against the specified pattern.
+ @param pattern The pattern to match against the receiver pattern.
+ @result A Boolean value indicating if receiver pattern matches the specified pattern.
+ @seealso matchesPattern:options:
+ */
+- (BOOL)matchesPattern:(nullable WKWebExtensionMatchPattern *)pattern NS_SWIFT_NAME(matches(_:));
+
+/*!
+ @abstract Matches the receiver pattern against the specified pattern with options.
+ @param pattern The pattern to match against the receiver pattern.
+ @param options The options to use while matching.
+ @result A Boolean value indicating if receiver pattern matches the specified pattern.
+ @seealso matchesPattern:
+ */
+- (BOOL)matchesPattern:(nullable WKWebExtensionMatchPattern *)pattern options:(WKWebExtensionMatchPatternOptions)options NS_SWIFT_NAME(matches(_:options:));
+
+@end
+
+WK_HEADER_AUDIT_END(nullability, sendability)
diff -ruN /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionMessagePort.h /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionMessagePort.h
--- /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionMessagePort.h 1970-01-01 01:00:00
+++ /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionMessagePort.h 2025-02-11 08:05:40
@@ -0,0 +1,99 @@
+/*
+ * Copyright (C) 2023-2024 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Foundation/Foundation.h>
+#import <WebKit/WKFoundation.h>
+
+WK_HEADER_AUDIT_BEGIN(nullability, sendability)
+
+/*! @abstract Indicates a ``WKWebExtensionMessagePort`` error. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_EXTERN NSErrorDomain const WKWebExtensionMessagePortErrorDomain NS_SWIFT_NAME(WKWebExtensionMessagePort.errorDomain) NS_SWIFT_NONISOLATED;
+
+/*!
+ @abstract Constants used by ``NSError`` to indicate errors in the ``WKWebExtensionMessagePort`` domain.
+ @constant WKWebExtensionMessagePortErrorUnknown Indicates that an unknown error occurred.
+ @constant WKWebExtensionMessagePortErrorNotConnected Indicates that the message port is disconnected.
+ @constant WKWebExtensionMessagePortErrorMessageInvalid Indicates that the message is invalid. The message must be an object that is JSON-serializable.
+ */
+typedef NS_ERROR_ENUM(WKWebExtensionMessagePortErrorDomain, WKWebExtensionMessagePortError) {
+ WKWebExtensionMessagePortErrorUnknown = 1,
+ WKWebExtensionMessagePortErrorNotConnected,
+ WKWebExtensionMessagePortErrorMessageInvalid,
+} NS_SWIFT_NAME(WKWebExtensionMessagePort.Error) API_AVAILABLE(macos(15.4), ios(NA), visionos(NA));
+
+/*!
+ @abstract A ``WKWebExtensionMessagePort`` object manages message-based communication with a web extension.
+ @discussion Contains properties and methods to handle message exchanges with a web extension.
+*/
+WK_EXTERN API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_SWIFT_UI_ACTOR NS_SWIFT_NAME(WKWebExtension.MessagePort)
+@interface WKWebExtensionMessagePort : NSObject
+
++ (instancetype)new NS_UNAVAILABLE;
+- (instancetype)init NS_UNAVAILABLE;
+
+/*!
+ @abstract The unique identifier for the app to which this port should be connected.
+ @discussion This identifier is provided by the web extension and may or may not be used by the app.
+ It's up to the app to decide how to interpret this identifier.
+ */
+@property (nonatomic, readonly, nullable) NSString *applicationIdentifier;
+
+/*!
+ @abstract The block to be executed when a message is received from the web extension.
+ @discussion An optional block to be invoked when a message is received, taking two parameters: the message and an optional error.
+ */
+@property (nonatomic, copy, nullable) void (^messageHandler)(id _Nullable message, NSError * _Nullable error);
+
+/*!
+ @abstract The block to be executed when the port disconnects.
+ @discussion An optional block to be invoked when the port disconnects, taking an optional error that indicates if the disconnection was caused by an error.
+ */
+@property (nonatomic, copy, nullable) void (^disconnectHandler)(NSError * _Nullable error);
+
+/*! @abstract Indicates whether the message port is disconnected. */
+@property (nonatomic, readonly, getter=isDisconnected) BOOL disconnected;
+
+/*!
+ @abstract Sends a message to the connected web extension.
+ @param message The JSON-serializable message to be sent.
+ @param completionHandler An optional block to be invoked after the message is sent, taking an optional error.
+ @note The message must be JSON-serializable according to ``NSJSONSerialization``.
+ */
+- (void)sendMessage:(nullable id)message completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler NS_SWIFT_NAME(sendMessage(_:completionHandler:));
+
+/*! @abstract Disconnects the port, terminating all further messages. */
+- (void)disconnect;
+
+/*!
+ @abstract Disconnects the port, terminating all further messages with an optional error.
+ @param error An optional error indicating the reason for disconnection.
+ */
+- (void)disconnectWithError:(nullable NSError *)error NS_SWIFT_NAME(disconnect(throwing:));
+
+@end
+
+WK_HEADER_AUDIT_END(nullability, sendability)
diff -ruN /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionPermission.h /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionPermission.h
--- /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionPermission.h 1970-01-01 01:00:00
+++ /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionPermission.h 2025-02-11 08:05:38
@@ -0,0 +1,95 @@
+/*
+ * Copyright (C) 2022-2024 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Foundation/Foundation.h>
+#import <WebKit/WKFoundation.h>
+
+/*! @abstract Constants for specifying permission in a ``WKWebExtensionContext``. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+typedef NSString * WKWebExtensionPermission NS_TYPED_EXTENSIBLE_ENUM NS_SWIFT_NAME(WKWebExtension.Permission);
+
+/*! @abstract The `activeTab` permission requests that when the user interacts with the extension, the extension is granted extra permissions for the active tab only. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_EXTERN WKWebExtensionPermission const WKWebExtensionPermissionActiveTab NS_SWIFT_NONISOLATED;
+
+/*! @abstract The `alarms` permission requests access to the `browser.alarms` APIs. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_EXTERN WKWebExtensionPermission const WKWebExtensionPermissionAlarms NS_SWIFT_NONISOLATED;
+
+/*! @abstract The `clipboardWrite` permission requests access to write to the clipboard. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_EXTERN WKWebExtensionPermission const WKWebExtensionPermissionClipboardWrite NS_SWIFT_NONISOLATED;
+
+/*! @abstract The `contextMenus` permission requests access to the `browser.contextMenus` APIs. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_EXTERN WKWebExtensionPermission const WKWebExtensionPermissionContextMenus NS_SWIFT_NONISOLATED;
+
+/*! @abstract The `cookies` permission requests access to the `browser.cookies` APIs. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_EXTERN WKWebExtensionPermission const WKWebExtensionPermissionCookies NS_SWIFT_NONISOLATED;
+
+/*! @abstract The `declarativeNetRequest` permission requests access to the `browser.declarativeNetRequest` APIs. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_EXTERN WKWebExtensionPermission const WKWebExtensionPermissionDeclarativeNetRequest NS_SWIFT_NONISOLATED;
+
+/*! @abstract The `declarativeNetRequestFeedback` permission requests access to the `browser.declarativeNetRequest` APIs with extra information on matched rules. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_EXTERN WKWebExtensionPermission const WKWebExtensionPermissionDeclarativeNetRequestFeedback NS_SWIFT_NONISOLATED;
+
+/*! @abstract The `declarativeNetRequestWithHostAccess` permission requests access to the `browser.declarativeNetRequest` APIs with the ability to modify or redirect requests. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_EXTERN WKWebExtensionPermission const WKWebExtensionPermissionDeclarativeNetRequestWithHostAccess NS_SWIFT_NONISOLATED;
+
+/*! @abstract The `menus` permission requests access to the `browser.menus` APIs. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_EXTERN WKWebExtensionPermission const WKWebExtensionPermissionMenus NS_SWIFT_NONISOLATED;
+
+/*! @abstract The `nativeMessaging` permission requests access to send messages to the App Extension bundle. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_EXTERN WKWebExtensionPermission const WKWebExtensionPermissionNativeMessaging NS_SWIFT_NONISOLATED;
+
+/*! @abstract The `scripting` permission requests access to the `browser.scripting` APIs. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_EXTERN WKWebExtensionPermission const WKWebExtensionPermissionScripting NS_SWIFT_NONISOLATED;
+
+/*! @abstract The `storage` permission requests access to the `browser.storage` APIs. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_EXTERN WKWebExtensionPermission const WKWebExtensionPermissionStorage NS_SWIFT_NONISOLATED;
+
+/*! @abstract The `tabs` permission requests access extra information on the `browser.tabs` APIs. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_EXTERN WKWebExtensionPermission const WKWebExtensionPermissionTabs NS_SWIFT_NONISOLATED;
+
+/*! @abstract The `unlimitedStorage` permission requests access to an unlimited quota on the `browser.storage.local` APIs. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_EXTERN WKWebExtensionPermission const WKWebExtensionPermissionUnlimitedStorage NS_SWIFT_NONISOLATED;
+
+/*! @abstract The `webNavigation` permission requests access to the `browser.webNavigation` APIs. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_EXTERN WKWebExtensionPermission const WKWebExtensionPermissionWebNavigation NS_SWIFT_NONISOLATED;
+
+/*! @abstract The `webRequest` permission requests access to the `browser.webRequest` APIs. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_EXTERN WKWebExtensionPermission const WKWebExtensionPermissionWebRequest NS_SWIFT_NONISOLATED;
diff -ruN /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionTab.h /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionTab.h
--- /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionTab.h 1970-01-01 01:00:00
+++ /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionTab.h 2025-02-11 08:05:37
@@ -0,0 +1,396 @@
+/*
+ * Copyright (C) 2022-2024 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Foundation/Foundation.h>
+#import <WebKit/WKFoundation.h>
+
+@class WKSnapshotConfiguration;
+@class WKWebView;
+@class WKWebExtensionContext;
+@class WKWebExtensionTabConfiguration;
+@protocol WKWebExtensionWindow;
+
+#if TARGET_OS_IPHONE
+@class UIImage;
+#else
+@class NSImage;
+#endif
+
+WK_HEADER_AUDIT_BEGIN(nullability, sendability)
+
+/*!
+ @abstract Constants used by ``WKWebExtensionController @/link and @link WKWebExtensionContext`` to indicate tab changes.
+ @constant WKWebExtensionTabChangedPropertiesNone Indicates nothing changed.
+ @constant WKWebExtensionTabChangedPropertiesLoading Indicates the loading state changed.
+ @constant WKWebExtensionTabChangedPropertiesMuted Indicates the muted state changed.
+ @constant WKWebExtensionTabChangedPropertiesPinned Indicates the pinned state changed.
+ @constant WKWebExtensionTabChangedPropertiesPlayingAudio Indicates the audio playback state changed.
+ @constant WKWebExtensionTabChangedPropertiesReaderMode Indicates the reader mode state changed.
+ @constant WKWebExtensionTabChangedPropertiesSize Indicates the size changed.
+ @constant WKWebExtensionTabChangedPropertiesTitle Indicates the title changed.
+ @constant WKWebExtensionTabChangedPropertiesURL Indicates the URL changed.
+ @constant WKWebExtensionTabChangedPropertiesZoomFactor Indicates the zoom factor changed.
+ */
+typedef NS_OPTIONS(NSUInteger, WKWebExtensionTabChangedProperties) {
+ WKWebExtensionTabChangedPropertiesNone = 0,
+ WKWebExtensionTabChangedPropertiesLoading = 1 << 1,
+ WKWebExtensionTabChangedPropertiesMuted = 1 << 2,
+ WKWebExtensionTabChangedPropertiesPinned = 1 << 3,
+ WKWebExtensionTabChangedPropertiesPlayingAudio = 1 << 4,
+ WKWebExtensionTabChangedPropertiesReaderMode = 1 << 5,
+ WKWebExtensionTabChangedPropertiesSize = 1 << 6,
+ WKWebExtensionTabChangedPropertiesTitle = 1 << 7,
+ WKWebExtensionTabChangedPropertiesURL = 1 << 8,
+ WKWebExtensionTabChangedPropertiesZoomFactor = 1 << 9,
+} NS_SWIFT_NAME(WKWebExtension.TabChangedProperties) API_AVAILABLE(macos(15.4), ios(NA), visionos(NA));
+
+/*! @abstract A class conforming to the ``WKWebExtensionTab`` protocol represents a tab to web extensions. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA)) WK_SWIFT_UI_ACTOR
+@protocol WKWebExtensionTab <NSObject>
+@optional
+
+/*!
+ @abstract Called when the window containing the tab is needed.
+ @param context The context in which the web extension is running.
+ @return The window containing the tab.
+ @discussion Defaults to `nil` if not implemented.
+ */
+- (nullable id <WKWebExtensionWindow>)windowForWebExtensionContext:(WKWebExtensionContext *)context NS_SWIFT_NAME(window(for:));
+
+/*!
+ @abstract Called when the index of the tab in the window is needed.
+ @param context The context in which the web extension is running.
+ @return The index of the tab in the window, or ``NSNotFound`` if the tab is not currently in a window.
+ @discussion This method should be implemented for better performance. Defaults to the window's
+ ``tabsForWebExtensionContext:`` method to find the index if not implemented.
+ */
+- (NSUInteger)indexInWindowForWebExtensionContext:(WKWebExtensionContext *)context NS_SWIFT_NAME(indexInWindow(for:));
+
+/*!
+ @abstract Called when the parent tab for the tab is needed.
+ @param context The context in which the web extension is running.
+ @return The parent tab of the tab, if the tab was opened from another tab.
+ @discussion Defaults to `nil` if not implemented.
+ @seealso setParentTab:forWebExtensionContext:completionHandler:
+ */
+- (nullable id <WKWebExtensionTab>)parentTabForWebExtensionContext:(WKWebExtensionContext *)context NS_SWIFT_NAME(parentTab(for:));
+
+/*!
+ @abstract Called to set or clear the parent tab for the tab.
+ @param parentTab The tab that should be set as the parent of the tab. If \c nil is provided, the current
+ parent tab should be cleared.
+ @param context The context in which the web extension is running.
+ @param completionHandler A block that must be called upon completion. It takes a single error argument,
+ which should be provided if any errors occurred.
+ @discussion No action is performed if not implemented.
+ @seealso parentTabForWebExtensionContext:
+ */
+- (void)setParentTab:(nullable id <WKWebExtensionTab>)parentTab forWebExtensionContext:(WKWebExtensionContext *)context completionHandler:(void (^)(NSError * _Nullable error))completionHandler NS_SWIFT_NAME(setParentTab(_:for:completionHandler:));
+
+/*!
+ @abstract Called when the web view for the tab is needed.
+ @param context The context in which the web extension is running.
+ @return The web view for the tab.
+ @discussion The web view's ``WKWebViewConfiguration`` must have its ``webExtensionController`` property set to match
+ the controller of the given context; otherwise `nil` will be used. Defaults to `nil` if not implemented. If `nil`, some critical features
+ will not be available for this tab, such as content injection or modification.
+ */
+- (nullable WKWebView *)webViewForWebExtensionContext:(WKWebExtensionContext *)context NS_SWIFT_NAME(webView(for:));
+
+/*!
+ @abstract Called when the title of the tab is needed.
+ @param context The context in which the web extension is running.
+ @return The title of the tab.
+ @discussion Defaults to ``title`` of the tab's web view if not implemented.
+ */
+- (nullable NSString *)titleForWebExtensionContext:(WKWebExtensionContext *)context NS_SWIFT_NAME(title(for:));
+
+/*!
+ @abstract Called when the pinned state of the tab is needed.
+ @param context The context in which the web extension is running.
+ @return `YES` if the tab is pinned, `NO` otherwise.
+ @discussion Defaults to `NO` if not implemented.
+ @seealso setPinned:forWebExtensionContext:completionHandler:
+ */
+- (BOOL)isPinnedForWebExtensionContext:(WKWebExtensionContext *)context NS_SWIFT_NAME(isPinned(for:));
+
+/*!
+ @abstract Called to set the pinned state of the tab.
+ @param pinned A boolean value indicating whether to pin the tab.
+ @param context The context in which the web extension is running.
+ @param completionHandler A block that must be called upon completion. It takes a single error argument,
+ which should be provided if any errors occurred.
+ @discussion This is equivalent to the user selecting to pin or unpin the tab through a menu item. When a tab is pinned,
+ it should be moved to the front of the tab bar and usually reduced in size. When a tab is unpinned, it should be restored
+ to a normal size and position in the tab bar. No action is performed if not implemented.
+ @seealso isPinnedForWebExtensionContext:
+ */
+- (void)setPinned:(BOOL)pinned forWebExtensionContext:(WKWebExtensionContext *)context completionHandler:(void (^)(NSError * _Nullable error))completionHandler NS_SWIFT_NAME(setPinned(_:for:completionHandler:));
+
+/*!
+ @abstract Called to check if reader mode is available for the tab.
+ @param context The context in which the web extension is running.
+ @return `YES` if reader mode is available for the tab, `NO` otherwise.
+ @discussion Defaults to `NO` if not implemented.
+ @seealso isReaderModeActiveForWebExtensionContext:
+ */
+- (BOOL)isReaderModeAvailableForWebExtensionContext:(WKWebExtensionContext *)context NS_SWIFT_NAME(isReaderModeAvailable(for:));
+
+/*!
+ @abstract Called to check if the tab is currently showing reader mode.
+ @param context The context in which the web extension is running.
+ @return `YES` if the tab is showing reader mode, `NO` otherwise.
+ @discussion Defaults to `NO` if not implemented.
+ @seealso isReaderModeAvailableForWebExtensionContext:
+ */
+- (BOOL)isReaderModeActiveForWebExtensionContext:(WKWebExtensionContext *)context NS_SWIFT_NAME(isReaderModeActive(for:));
+
+/*!
+ @abstract Called to set the reader mode for the tab.
+ @param active A boolean value indicating whether to activate reader mode.
+ @param context The context in which the web extension is running.
+ @param completionHandler A block that must be called upon completion. It takes a single error argument,
+ which should be provided if any errors occurred.
+ @discussion No action is performed if not implemented.
+ @seealso isReaderModeAvailableForWebExtensionContext:
+ @seealso isReaderModeActiveForWebExtensionContext:
+ */
+- (void)setReaderModeActive:(BOOL)active forWebExtensionContext:(WKWebExtensionContext *)context completionHandler:(void (^)(NSError * _Nullable error))completionHandler NS_SWIFT_NAME(setReaderModeActive(_:for:completionHandler:));
+
+/*!
+ @abstract Called to check if the tab is currently playing audio.
+ @param context The context in which the web extension is running.
+ @return `YES` if the tab is playing audio, `NO` otherwise.
+ @discussion Defaults to `NO` if not implemented.
+ */
+- (BOOL)isPlayingAudioForWebExtensionContext:(WKWebExtensionContext *)context NS_SWIFT_NAME(isPlayingAudio(for:));
+
+/*!
+ @abstract Called to check if the tab is currently muted.
+ @param context The context in which the web extension is running.
+ @return `YES` if the tab is muted, `NO` otherwise.
+ @discussion Defaults to `NO` if not implemented.
+ @seealso setMuted:forWebExtensionContext:completionHandler:
+ */
+- (BOOL)isMutedForWebExtensionContext:(WKWebExtensionContext *)context NS_SWIFT_NAME(isMuted(for:));
+
+/*!
+ @abstract Called to set the mute state of the tab.
+ @param muted A boolean indicating whether the tab should be muted.
+ @param context The context in which the web extension is running.
+ @param completionHandler A block that must be called upon completion. It takes a single error argument,
+ which should be provided if any errors occurred.
+ @discussion No action is performed if not implemented.
+ @seealso isMutedForWebExtensionContext:
+ */
+- (void)setMuted:(BOOL)muted forWebExtensionContext:(WKWebExtensionContext *)context completionHandler:(void (^)(NSError * _Nullable error))completionHandler NS_SWIFT_NAME(setMuted(_:for:completionHandler:));
+
+/*!
+ @abstract Called when the size of the tab is needed.
+ @param context The context in which the web extension is running.
+ @return The size of the tab.
+ @discussion Defaults to size of the tab's web view if not implemented.
+ */
+- (CGSize)sizeForWebExtensionContext:(WKWebExtensionContext *)context NS_SWIFT_NAME(size(for:));
+
+/*!
+ @abstract Called when the zoom factor of the tab is needed.
+ @param context The context in which the web extension is running.
+ @return The zoom factor of the tab.
+ @discussion Defaults to ``pageZoom`` of the tab's web view if not implemented.
+ @seealso setZoomFactor:forWebExtensionContext:completionHandler:
+ */
+- (double)zoomFactorForWebExtensionContext:(WKWebExtensionContext *)context NS_SWIFT_NAME(zoomFactor(for:));
+
+/*!
+ @abstract Called to set the zoom factor of the tab.
+ @param zoomFactor The desired zoom factor for the tab.
+ @param context The context in which the web extension is running.
+ @param completionHandler A block that must be called upon completion. It takes a single error argument,
+ which should be provided if any errors occurred.
+ @discussion Sets ``pageZoom`` of the tab's web view if not implemented.
+ @seealso zoomFactorForWebExtensionContext:
+ */
+- (void)setZoomFactor:(double)zoomFactor forWebExtensionContext:(WKWebExtensionContext *)context completionHandler:(void (^)(NSError * _Nullable error))completionHandler NS_SWIFT_NAME(setZoomFactor(_:for:completionHandler:));
+
+/*!
+ @abstract Called when the URL of the tab is needed.
+ @param context The context in which the web extension is running.
+ @return The URL of the tab.
+ @discussion Defaults to `URL` of the tab's web view if not implemented.
+ */
+- (nullable NSURL *)urlForWebExtensionContext:(WKWebExtensionContext *)context NS_SWIFT_NAME(url(for:));
+
+/*!
+ @abstract Called when the pending URL of the tab is needed.
+ @param context The context in which the web extension is running.
+ @return The pending URL of the tab.
+ @discussion The pending URL is the URL of a page that is in the process of loading. If there is no pending URL, return `nil`.
+ Defaults to `nil` if not implemented.
+ */
+- (nullable NSURL *)pendingURLForWebExtensionContext:(WKWebExtensionContext *)context NS_SWIFT_NAME(pendingURL(for:));
+
+/*!
+ @abstract Called to check if the tab has finished loading.
+ @param context The context in which the web extension is running.
+ @return `YES` if the tab has finished loading, `NO` otherwise.
+ @discussion Defaults to ``isLoading`` of the tab's web view if not implemented.
+ */
+- (BOOL)isLoadingCompleteForWebExtensionContext:(WKWebExtensionContext *)context NS_SWIFT_NAME(isLoadingComplete(for:));
+
+/*!
+ @abstract Called to detect the locale of the webpage currently loaded in the tab.
+ @param context The context in which the web extension is running.
+ @param completionHandler A block that must be called upon completion. The block takes two arguments:
+ the detected locale (or \c nil if the locale is unknown) and an error, which should be provided if any errors occurred.
+ @discussion No action is performed if not implemented.
+ */
+- (void)detectWebpageLocaleForWebExtensionContext:(WKWebExtensionContext *)context completionHandler:(void (^)(NSLocale * WK_NULLABLE_RESULT locale, NSError * _Nullable error))completionHandler NS_SWIFT_NAME(detectWebpageLocale(for:completionHandler:));
+
+/*!
+ @abstract Called to capture a snapshot of the current webpage as an image.
+ @param configuration An object that specifies how the snapshot is configured.
+ @param context The context in which the web extension is running.
+ @param completionHandler A block that must be called upon completion. The block takes two arguments:
+ the captured image of the webpage (or \c nil if capturing failed) and an error, which should be provided if any errors occurred.
+ @discussion Defaults to capturing the visible area of the tab's web view if not implemented.
+ */
+#if TARGET_OS_IPHONE
+- (void)takeSnapshotUsingConfiguration:(WKSnapshotConfiguration *)configuration forWebExtensionContext:(WKWebExtensionContext *)context completionHandler:(void (^)(UIImage * WK_NULLABLE_RESULT webpageImage, NSError * _Nullable error))completionHandler NS_SWIFT_NAME(takeSnapshot(using:for:completionHandler:)) WK_SWIFT_ASYNC_NAME(snapshot(using:for:));
+#else
+- (void)takeSnapshotUsingConfiguration:(WKSnapshotConfiguration *)configuration forWebExtensionContext:(WKWebExtensionContext *)context completionHandler:(void (^)(NSImage * WK_NULLABLE_RESULT webpageImage, NSError * _Nullable error))completionHandler NS_SWIFT_NAME(takeSnapshot(using:for:completionHandler:)) WK_SWIFT_ASYNC_NAME(snapshot(using:for:));
+#endif
+
+/*!
+ @abstract Called to load a URL in the tab.
+ @param url The URL to be loaded in the tab.
+ @param context The context in which the web extension is running.
+ @param completionHandler A block that must be called upon completion. It takes a single error argument,
+ which should be provided if any errors occurred.
+ @discussion If the tab is already loading a page, calling this method should stop the current page from loading and start
+ loading the new URL. Loads the URL in the tab's web view via ``loadRequest:`` if not implemented.
+ */
+- (void)loadURL:(NSURL *)url forWebExtensionContext:(WKWebExtensionContext *)context completionHandler:(void (^)(NSError * _Nullable error))completionHandler NS_SWIFT_NAME(loadURL(_:for:completionHandler:));
+
+/*!
+ @abstract Called to reload the current page in the tab.
+ @param fromOrigin A boolean value indicating whether to reload the tab from the origin, bypassing the cache.
+ @param context The context in which the web extension is running.
+ @param completionHandler A block that must be called upon completion. It takes a single error argument,
+ which should be provided if any errors occurred.
+ @discussion Reloads the tab's web view via ``reload`` or ``reloadFromOrigin`` if not implemented.
+ */
+- (void)reloadFromOrigin:(BOOL)fromOrigin forWebExtensionContext:(WKWebExtensionContext *)context completionHandler:(void (^)(NSError * _Nullable error))completionHandler NS_SWIFT_NAME(reload(fromOrigin:for:completionHandler:));
+
+/*!
+ @abstract Called to navigate the tab to the previous page in its history.
+ @param context The context in which the web extension is running.
+ @param completionHandler A block that must be called upon completion. It takes a single error argument,
+ which should be provided if any errors occurred.
+ @discussion Navigates to the previous page in the tab's web view via ``goBack`` if not implemented.
+ */
+- (void)goBackForWebExtensionContext:(WKWebExtensionContext *)context completionHandler:(void (^)(NSError * _Nullable error))completionHandler NS_SWIFT_NAME(goBack(for:completionHandler:));
+
+/*!
+ @abstract Called to navigate the tab to the next page in its history.
+ @param context The context in which the web extension is running.
+ @param completionHandler A block that must be called upon completion. It takes a single error argument,
+ which should be provided if any errors occurred.
+ @discussion Navigates to the next page in the tab's web view via ``goForward`` if not implemented.
+ */
+- (void)goForwardForWebExtensionContext:(WKWebExtensionContext *)context completionHandler:(void (^)(NSError * _Nullable error))completionHandler NS_SWIFT_NAME(goForward(for:completionHandler:));
+
+/*!
+ @abstract Called to activate the tab, making it frontmost.
+ @param context The context in which the web extension is running.
+ @param completionHandler A block that must be called upon completion. It takes a single error argument,
+ which should be provided if any errors occurred.
+ @discussion Upon activation, the tab should become the frontmost and either be the sole selected tab or
+ be included among the selected tabs. No action is performed if not implemented.
+ @seealso setSelected:forWebExtensionContext:completionHandler:
+ */
+- (void)activateForWebExtensionContext:(WKWebExtensionContext *)context completionHandler:(void (^)(NSError * _Nullable error))completionHandler NS_SWIFT_NAME(activate(for:completionHandler:));
+
+/*!
+ @abstract Called when the selected state of the tab is needed.
+ @param context The context in which the web extension is running.
+ @return `YES` if the tab is selected, `NO` otherwise.
+ @discussion Defaults to `YES` for the active tab and `NO` for other tabs if not implemented.
+ */
+- (BOOL)isSelectedForWebExtensionContext:(WKWebExtensionContext *)context NS_SWIFT_NAME(isSelected(for:));
+
+/*!
+ @abstract Called to set the selected state of the tab.
+ @param selected A boolean value indicating whether to select the tab.
+ @param context The context in which the web extension is running.
+ @param completionHandler A block that must be called upon completion. It takes a single error argument,
+ which should be provided if any errors occurred.
+ @discussion This is equivalent to the user command-clicking on the tab to add it to or remove it from a selection.
+ The method should update the tab's selection state without changing the active tab. No action is performed if not implemented.
+ @seealso isSelectedForWebExtensionContext:
+ */
+- (void)setSelected:(BOOL)selected forWebExtensionContext:(WKWebExtensionContext *)context completionHandler:(void (^)(NSError * _Nullable error))completionHandler NS_SWIFT_NAME(setSelected(_:for:completionHandler:));
+
+/*!
+ @abstract Called to duplicate the tab.
+ @param configuration The tab configuration influencing the duplicated tab's properties.
+ @param context The context in which the web extension is running.
+ @param completionHandler A block that must be called upon completion. It takes two arguments:
+ the duplicated tab (or \c nil if no tab was created) and an error, which should be provided if any errors occurred.
+ @discussion This is equivalent to the user selecting to duplicate the tab through a menu item, with the specified configuration.
+ No action is performed if not implemented.
+ */
+- (void)duplicateUsingConfiguration:(WKWebExtensionTabConfiguration *)configuration forWebExtensionContext:(WKWebExtensionContext *)context completionHandler:(void (^)(id <WKWebExtensionTab> WK_NULLABLE_RESULT duplicatedTab, NSError * _Nullable error))completionHandler NS_SWIFT_NAME(duplicate(using:for:completionHandler:));
+
+/*!
+ @abstract Called to close the tab.
+ @param context The context in which the web extension is running.
+ @param completionHandler A block that must be called upon completion. It takes a single error argument,
+ which should be provided if any errors occurred.
+ @discussion No action is performed if not implemented.
+ */
+- (void)closeForWebExtensionContext:(WKWebExtensionContext *)context completionHandler:(void (^)(NSError * _Nullable error))completionHandler NS_SWIFT_NAME(close(for:completionHandler:));
+
+/*!
+ @abstract Called to determine if permissions should be granted for the tab on user gesture.
+ @param context The context in which the web extension is running.
+ @return `YES` if permissions should be granted to the tab, `NO` otherwise.
+ @discussion This method allows the app to control granting of permissions on a per-tab basis when triggered by a user
+ gesture. Implementing this method enables the app to dynamically manage `activeTab` permissions based on the tab's
+ current state, the content being accessed, or other custom criteria.
+ */
+- (BOOL)shouldGrantPermissionsOnUserGestureForWebExtensionContext:(WKWebExtensionContext *)context NS_SWIFT_NAME(shouldGrantPermissionsOnUserGesture(for:));
+
+/*!
+ @abstract Called to determine if the tab should bypass host permission checks.
+ @param context The context in which the web extension is running.
+ @return `YES` to bypass host permission checks, `NO` to enforce them.
+ @discussion This method allows the app to dynamically control whether a tab can bypass standard host permission checks.
+ */
+- (BOOL)shouldBypassPermissionsForWebExtensionContext:(WKWebExtensionContext *)context NS_SWIFT_NAME(shouldBypassPermissions(for:));
+
+@end
+
+WK_HEADER_AUDIT_END(nullability, sendability)
diff -ruN /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionTabConfiguration.h /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionTabConfiguration.h
--- /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionTabConfiguration.h 1970-01-01 01:00:00
+++ /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionTabConfiguration.h 2025-02-11 08:05:40
@@ -0,0 +1,94 @@
+/*
+ * Copyright (C) 2023-2024 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Foundation/Foundation.h>
+#import <WebKit/WKFoundation.h>
+
+@protocol WKWebExtensionTab;
+@protocol WKWebExtensionWindow;
+
+WK_HEADER_AUDIT_BEGIN(nullability, sendability)
+
+/*!
+ @abstract A ``WKWebExtensionTabConfiguration`` object encapsulates configuration options for a tab in an extension.
+ @discussion This class holds various options that influence the behavior and initial state of a tab.
+ The app retains the discretion to disregard any or all of these options, or even opt not to create a tab.
+ */
+WK_EXTERN API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_SWIFT_UI_ACTOR NS_SWIFT_NAME(WKWebExtension.TabConfiguration)
+@interface WKWebExtensionTabConfiguration : NSObject
+
++ (instancetype)new NS_UNAVAILABLE;
+- (instancetype)init NS_UNAVAILABLE;
+
+/*!
+ @abstract Indicates the window where the tab should be opened.
+ @discussion If this property is `nil`, no window was specified.
+ */
+@property (nonatomic, nullable, readonly, strong) id <WKWebExtensionWindow> window;
+
+/*! @abstract Indicates the position where the tab should be opened within the window. */
+@property (nonatomic, readonly) NSUInteger index;
+
+/*!
+ @abstract Indicates the parent tab with which the tab should be related.
+ @discussion If this property is `nil`, no parent tab was specified.
+ */
+@property (nonatomic, nullable, readonly, strong) id <WKWebExtensionTab> parentTab;
+
+/*!
+ @abstract Indicates the initial URL for the tab.
+ @discussion If this property is `nil`, the app's default "start page" should appear in the tab.
+ */
+@property (nonatomic, nullable, readonly, copy) NSURL *url;
+
+/*!
+ @abstract Indicates whether the tab should be the active tab.
+ @discussion If this property is `YES`, the tab should be made active in the window, ensuring it is
+ the frontmost tab. Being active implies the tab is also selected. If this property is `NO`, the tab shouldn't
+ affect the currently active tab.
+ */
+@property (nonatomic, readonly) BOOL shouldBeActive;
+
+/*!
+ @abstract Indicates whether the tab should be added to the current tab selection.
+ @discussion If this property is `YES`, the tab should be part of the current selection, but not necessarily
+ become the active tab unless ``shouldBeActive`` is also `YES`. If this property is `NO`, the tab shouldn't
+ be part of the current selection.
+ */
+@property (nonatomic, readonly) BOOL shouldAddToSelection;
+
+/*! @abstract Indicates whether the tab should be pinned. */
+@property (nonatomic, readonly) BOOL shouldBePinned;
+
+/*! @abstract Indicates whether the tab should be muted. */
+@property (nonatomic, readonly) BOOL shouldBeMuted;
+
+/*! @abstract Indicates whether reader mode in the tab should be active. */
+@property (nonatomic, readonly) BOOL shouldReaderModeBeActive;
+
+@end
+
+WK_HEADER_AUDIT_END(nullability, sendability)
diff -ruN /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionWindow.h /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionWindow.h
--- /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionWindow.h 1970-01-01 01:00:00
+++ /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionWindow.h 2025-02-11 08:05:36
@@ -0,0 +1,170 @@
+/*
+ * Copyright (C) 2022-2024 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Foundation/Foundation.h>
+#import <WebKit/WKFoundation.h>
+
+@class WKWebExtensionContext;
+@protocol WKWebExtensionTab;
+
+WK_HEADER_AUDIT_BEGIN(nullability, sendability)
+
+/*!
+ @abstract Constants used by ``WKWebExtensionWindow`` to indicate the type of a window.
+ @constant WKWebExtensionWindowTypeNormal Indicates a normal window.
+ @constant WKWebExtensionWindowTypePopup Indicates a popup window.
+ */
+typedef NS_ENUM(NSInteger, WKWebExtensionWindowType) {
+ WKWebExtensionWindowTypeNormal,
+ WKWebExtensionWindowTypePopup,
+} NS_SWIFT_NAME(WKWebExtension.WindowType) API_AVAILABLE(macos(15.4), ios(NA), visionos(NA));
+
+/*!
+ @abstract Constants used by ``WKWebExtensionWindow`` to indicate possible states of a window.
+ @constant WKWebExtensionWindowStateNormal Indicates a window is in its normal state.
+ @constant WKWebExtensionWindowStateMinimized Indicates a window is minimized.
+ @constant WKWebExtensionWindowStateMaximized Indicates a window is maximized.
+ @constant WKWebExtensionWindowStateFullscreen Indicates a window is in fullscreen mode.
+ */
+typedef NS_ENUM(NSInteger, WKWebExtensionWindowState) {
+ WKWebExtensionWindowStateNormal,
+ WKWebExtensionWindowStateMinimized,
+ WKWebExtensionWindowStateMaximized,
+ WKWebExtensionWindowStateFullscreen,
+} NS_SWIFT_NAME(WKWebExtension.WindowState) API_AVAILABLE(macos(15.4), ios(NA), visionos(NA));
+
+/*! @abstract A class conforming to the ``WKWebExtensionWindow`` protocol represents a window to web extensions. */
+API_AVAILABLE(macos(15.4), ios(NA), visionos(NA)) WK_SWIFT_UI_ACTOR
+@protocol WKWebExtensionWindow <NSObject>
+@optional
+
+/*!
+ @abstract Called when the tabs are needed for the window.
+ @param context The context in which the web extension is running.
+ @return An array of tabs in the window.
+ @discussion Defaults to an empty array if not implemented.
+ */
+- (NSArray<id <WKWebExtensionTab>> *)tabsForWebExtensionContext:(WKWebExtensionContext *)context NS_SWIFT_NAME(tabs(for:));
+
+/*!
+ @abstract Called when the active tab is needed for the window.
+ @param context The context in which the web extension is running.
+ @return The active tab in the window, which represents the frontmost tab currently in view.
+ @discussion Defaults to `nil` if not implemented.
+ */
+- (nullable id <WKWebExtensionTab>)activeTabForWebExtensionContext:(WKWebExtensionContext *)context NS_SWIFT_NAME(activeTab(for:));
+
+/*!
+ @abstract Called when the type of the window is needed.
+ @param context The context in which the web extension is running.
+ @return The type of the window.
+ @discussion Defaults to``WKWebExtensionWindowTypeNormal`` if not implemented.
+ */
+- (WKWebExtensionWindowType)windowTypeForWebExtensionContext:(WKWebExtensionContext *)context NS_SWIFT_NAME(windowType(for:));
+
+/*!
+ @abstract Called when the state of the window is needed.
+ @param context The context in which the web extension is running.
+ @return The state of the window.
+ @discussion Defaults to``WKWebExtensionWindowStateNormal`` if not implemented.
+ */
+- (WKWebExtensionWindowState)windowStateForWebExtensionContext:(WKWebExtensionContext *)context NS_SWIFT_NAME(windowState(for:));
+
+/*!
+ @abstract Called to set the state of the window.
+ @param context The context in which the web extension is running.
+ @param state The new state of the window.
+ @param completionHandler A block that must be called upon completion. It takes a single error argument,
+ which should be provided if any errors occurred.
+ @discussion The implementation of ``windowStateForWebExtensionContext:`` is a prerequisite.
+ Without it, this method will not be called.
+ @seealso windowStateForWebExtensionContext:
+ */
+- (void)setWindowState:(WKWebExtensionWindowState)state forWebExtensionContext:(WKWebExtensionContext *)context completionHandler:(void (^)(NSError * _Nullable error))completionHandler NS_SWIFT_NAME(setWindowState(_:for:completionHandler:));
+
+/*!
+ @abstract Called when the private state of the window is needed.
+ @param context The context in which the web extension is running.
+ @return `YES` if the window is private, `NO` otherwise.
+ @discussion Defaults to `NO` if not implemented. This value is cached and will not change for the duration of the window or its contained tabs.
+ @note To ensure proper isolation between private and non-private data, web views associated with private data must use a
+ different ``WKUserContentController``. Likewise, to be identified as a private web view and to ensure that cookies and other
+ website data is not shared, private web views must be configured to use a non-persistent ``WKWebsiteDataStore``.
+ */
+- (BOOL)isPrivateForWebExtensionContext:(WKWebExtensionContext *)context NS_SWIFT_NAME(isPrivate(for:));
+
+#if TARGET_OS_OSX
+/*!
+ @abstract Called when the screen frame containing the window is needed.
+ @param context The context associated with the running web extension.
+ @return The frame for the screen containing the window.
+ @discussion Defaults to ``CGRectNull`` if not implemented.
+ */
+- (CGRect)screenFrameForWebExtensionContext:(WKWebExtensionContext *)context NS_SWIFT_NAME(screenFrame(for:));
+#endif // TARGET_OS_OSX
+
+/*!
+ @abstract Called when the frame of the window is needed.
+ @param context The context in which the web extension is running.
+ @return The frame of the window, in screen coordinates
+ @discussion Defaults to ``CGRectNull`` if not implemented.
+ */
+- (CGRect)frameForWebExtensionContext:(WKWebExtensionContext *)context NS_SWIFT_NAME(frame(for:));
+
+/*!
+ @abstract Called to set the frame of the window.
+ @param context The context in which the web extension is running.
+ @param frame The new frame of the window, in screen coordinates.
+ @param completionHandler A block that must be called upon completion. It takes a single error argument,
+ which should be provided if any errors occurred.
+ @discussion On macOS, the implementation of both ``frameForWebExtensionContext:`` and ``screenFrameForWebExtensionContext:``
+ are prerequisites. On iOS, iPadOS, and visionOS, only ``frameForWebExtensionContext:`` is a prerequisite. Without the respective method(s),
+ this method will not be called.
+ @seealso frameForWebExtensionContext:
+ @seealso screenFrameForWebExtensionContext:
+ */
+- (void)setFrame:(CGRect)frame forWebExtensionContext:(WKWebExtensionContext *)context completionHandler:(void (^)(NSError * _Nullable error))completionHandler NS_SWIFT_NAME(setFrame(_:for:completionHandler:));
+
+/*!
+ @abstract Called to focus the window.
+ @param context The context in which the web extension is running.
+ @param completionHandler A block that must be called upon completion. It takes a single error argument,
+ which should be provided if any errors occurred.
+ @discussion No action is performed if not implemented.
+ */
+- (void)focusForWebExtensionContext:(WKWebExtensionContext *)context completionHandler:(void (^)(NSError * _Nullable error))completionHandler NS_SWIFT_NAME(focus(for:completionHandler:));
+
+/*!
+ @abstract Called to close the window.
+ @param context The context in which the web extension is running.
+ @param completionHandler A block that must be called upon completion. It takes a single error argument,
+ which should be provided if any errors occurred.
+ @discussion No action is performed if not implemented.
+ */
+- (void)closeForWebExtensionContext:(WKWebExtensionContext *)context completionHandler:(void (^)(NSError * _Nullable error))completionHandler NS_SWIFT_NAME(close(for:completionHandler:));
+
+@end
+
+WK_HEADER_AUDIT_END(nullability, sendability)
diff -ruN /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionWindowConfiguration.h /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionWindowConfiguration.h
--- /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionWindowConfiguration.h 1970-01-01 01:00:00
+++ /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionWindowConfiguration.h 2025-02-11 08:05:39
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2023-2024 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Foundation/Foundation.h>
+#import <WebKit/WKFoundation.h>
+
+#import <WebKit/WKWebExtensionWindow.h>
+
+@protocol WKWebExtensionTab;
+
+WK_HEADER_AUDIT_BEGIN(nullability, sendability)
+
+/*!
+ @abstract A ``WKWebExtensionWindowConfiguration`` object encapsulates configuration options for a window in an extension.
+ @discussion This class holds various options that influence the behavior and initial state of a window.
+ The app retains the discretion to disregard any or all of these options, or even opt not to create a window.
+ */
+WK_EXTERN API_AVAILABLE(macos(15.4), ios(NA), visionos(NA))
+WK_SWIFT_UI_ACTOR NS_SWIFT_NAME(WKWebExtension.WindowConfiguration)
+@interface WKWebExtensionWindowConfiguration : NSObject
+
++ (instancetype)new NS_UNAVAILABLE;
+- (instancetype)init NS_UNAVAILABLE;
+
+/*! @abstract Indicates the window type for the window. */
+@property (nonatomic, readonly) WKWebExtensionWindowType windowType;
+
+/*! @abstract Indicates the window state for the window. */
+@property (nonatomic, readonly) WKWebExtensionWindowState windowState;
+
+/*!
+ @abstract Indicates the frame where the window should be positioned on the main screen.
+ @discussion This frame should override the app's default window position and size.
+ Individual components (e.g., `origin.x`, `size.width`) will be `NaN` if not specified.
+ */
+@property (nonatomic, readonly) CGRect frame;
+
+/*!
+ @abstract Indicates the URLs that the window should initially load as tabs.
+ @discussion If ``tabURLs`` and ``tabs`` are both empty, the app's default "start page" should appear in a tab.
+ @seealso tabs
+ */
+@property (nonatomic, readonly, copy) NSArray<NSURL *> *tabURLs;
+
+/*!
+ @abstract Indicates the existing tabs that should be moved to the window.
+ @discussion If ``tabs`` and ``tabURLs`` are both empty, the app's default "start page" should appear in a tab.
+ @seealso tabURLs
+ */
+@property (nonatomic, readonly, copy) NSArray<id <WKWebExtensionTab>> *tabs;
+
+/*! @abstract Indicates whether the window should be focused. */
+@property (nonatomic, readonly) BOOL shouldBeFocused;
+
+/*!
+ @abstract Indicates whether the window should be private.
+ @note To ensure proper isolation between private and non-private data, web views associated with private data must use a
+ different ``WKUserContentController``. Likewise, to be identified as a private web view and to ensure that cookies and other
+ website data is not shared, private web views must be configured to use a non-persistent ``WKWebsiteDataStore``.
+ */
+@property (nonatomic, readonly) BOOL shouldBePrivate;
+
+@end
+
+WK_HEADER_AUDIT_END(nullability, sendability)
diff -ruN /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebView.h /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebView.h
--- /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebView.h 2024-11-20 13:18:35
+++ /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebView.h 2025-02-11 07:54:44
@@ -251,7 +251,7 @@
- A `frame` value of `nil` to represent the main frame
- A `contentWorld` value of `WKContentWorld.pageWorld`
*/
-- (void)evaluateJavaScript:(NSString *)javaScriptString completionHandler:(WK_SWIFT_UI_ACTOR void (^ _Nullable)(_Nullable id, NSError * _Nullable error))completionHandler;
+- (void)evaluateJavaScript:(NSString *)javaScriptString completionHandler:(WK_SWIFT_UI_ACTOR void (^ _Nullable)(id WK_NULLABLE_RESULT, NSError * _Nullable error))completionHandler;
/* @abstract Evaluates the given JavaScript string.
@param javaScriptString The JavaScript string to evaluate.
@@ -268,12 +268,12 @@
No matter which WKContentWorld you use to evaluate your JavaScript string, you can make changes to the underlying web content. (e.g. the Document and its DOM structure)
Such changes will be visible to script executing in all WKContentWorlds.
- Evaluating your JavaScript string can leave behind other changes to global state visibile to JavaScript. (e.g. `window.myVariable = 1;`)
- Those changes will only be visibile to scripts executed in the same WKContentWorld.
+ Evaluating your JavaScript string can leave behind other changes to global state visible to JavaScript. (e.g. `window.myVariable = 1;`)
+ Those changes will only be visible to scripts executed in the same WKContentWorld.
evaluateJavaScript: is a great way to set up global state for future JavaScript execution in a given world. (e.g. Importing libraries/utilities that future JavaScript execution will rely on)
Once your global state is set up, consider using callAsyncJavaScript: for more flexible interaction with the JavaScript programming model.
*/
-- (void)evaluateJavaScript:(NSString *)javaScriptString inFrame:(nullable WKFrameInfo *)frame inContentWorld:(WKContentWorld *)contentWorld completionHandler:(WK_SWIFT_UI_ACTOR void (^ _Nullable)(_Nullable id, NSError * _Nullable error))completionHandler NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(11.0), ios(14.0));
+- (void)evaluateJavaScript:(NSString *)javaScriptString inFrame:(nullable WKFrameInfo *)frame inContentWorld:(WKContentWorld *)contentWorld completionHandler:(WK_SWIFT_UI_ACTOR void (^ _Nullable)(id WK_NULLABLE_RESULT, NSError * _Nullable error))completionHandler NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(11.0), ios(14.0));
/* @abstract Calls the given JavaScript string as an async JavaScript function, passing the given named arguments to that function.
@param functionBody The JavaScript string to use as the function body.
@@ -444,7 +444,7 @@
It can be used to represent web content on a pasteboard, loaded into a WKWebView directly, and saved to a file for later use.
The uniform type identifier kUTTypeWebArchive can be used get the related pasteboard type and MIME type.
*/
-- (void)createWebArchiveDataWithCompletionHandler:(WK_SWIFT_UI_ACTOR void (^)(NSData *, NSError *))completionHandler NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(11.0), ios(14.0));
+- (void)createWebArchiveDataWithCompletionHandler:(WK_SWIFT_UI_ACTOR void (^)(NSData * _Nullable, NSError * _Nullable))completionHandler NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(11.0), ios(14.0));
/*! @abstract A Boolean value indicating whether horizontal swipe gestures
will trigger back-forward list navigations.
@@ -664,7 +664,7 @@
/*! @abstract A Boolean value indicating whether Writing Tools is active for the view.
@discussion @link WKWebView @/link is key-value observing (KVO) compliant for this property.
*/
-@property (nonatomic, readonly, getter=isWritingToolsActive) BOOL writingToolsActive API_AVAILABLE(macos(15.0), ios(18.0)) API_UNAVAILABLE(visionos);
+@property (nonatomic, readonly, getter=isWritingToolsActive) BOOL writingToolsActive API_AVAILABLE(macos(15.0), ios(18.0), visionos(NA));
@end
diff -ruN /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebViewConfiguration.h /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebViewConfiguration.h
--- /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebViewConfiguration.h 2024-11-20 12:45:18
+++ /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebViewConfiguration.h 2025-02-11 08:05:36
@@ -117,6 +117,10 @@
*/
@property (nonatomic, strong) WKUserContentController *userContentController;
+/*! @abstract The web extension controller to associate with the web view.
+*/
+@property (nullable, nonatomic, strong) WKWebExtensionController *webExtensionController API_AVAILABLE(macos(15.4), ios(NA), visionos(NA));
+
/*! @abstract The website data store to be used by the web view.
*/
@property (nonatomic, strong) WKWebsiteDataStore *websiteDataStore API_AVAILABLE(macos(10.11), ios(9.0));
@@ -228,11 +232,11 @@
*/
@property (nonatomic) BOOL supportsAdaptiveImageGlyph API_AVAILABLE(macos(15.0), ios(18.0), visionos(2.0));
-#if (TARGET_OS_IOS && !TARGET_OS_VISION) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 180000
+#if (TARGET_OS_IOS && __IPHONE_OS_VERSION_MAX_ALLOWED >= 180000) || (defined(TARGET_OS_VISION) && TARGET_OS_VISION && __has_include(<GameKit/GKReleaseState.h>))
/*! @abstract The preferred behavior of Writing Tools.
@discussion The default behavior is equivalent to `UIWritingToolsBehaviorLimited`.
*/
-@property (nonatomic) UIWritingToolsBehavior writingToolsBehavior API_AVAILABLE(ios(18.0));
+@property (nonatomic) UIWritingToolsBehavior writingToolsBehavior API_AVAILABLE(ios(18.0), visionos(NA));
#elif TARGET_OS_OSX && __MAC_OS_X_VERSION_MAX_ALLOWED >= 150000
/*! @abstract The preferred behavior of Writing Tools.
@discussion The default behavior is equivalent to `NSWritingToolsBehaviorLimited`.
diff -ruN /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebpagePreferences.h /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebpagePreferences.h
--- /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebpagePreferences.h 2024-11-20 12:45:19
+++ /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebpagePreferences.h 2025-02-11 08:05:37
@@ -56,7 +56,7 @@
WKWebpagePreferencesUpgradeToHTTPSPolicyAutomaticFallbackToHTTP,
WKWebpagePreferencesUpgradeToHTTPSPolicyUserMediatedFallbackToHTTP,
WKWebpagePreferencesUpgradeToHTTPSPolicyErrorOnFailure
-} NS_SWIFT_NAME(WKWebpagePreferences.UpgradeToHTTPSPolicy) API_AVAILABLE(macos(15.2), ios(NA), visionos(NA));
+} NS_SWIFT_NAME(WKWebpagePreferences.UpgradeToHTTPSPolicy) API_AVAILABLE(macos(15.4), ios(NA), visionos(NA));
/*! A WKWebpagePreferences object is a collection of properties that
determine the preferences to use when loading and rendering a page.
@@ -101,6 +101,6 @@
system configuration. The upgradeKnownHostsToHTTPS property on WKWebViewConfiguration
supercedes this policy for known hosts.
*/
-@property (nonatomic) WKWebpagePreferencesUpgradeToHTTPSPolicy preferredHTTPSNavigationPolicy API_AVAILABLE(macos(15.2), ios(NA), visionos(NA));
+@property (nonatomic) WKWebpagePreferencesUpgradeToHTTPSPolicy preferredHTTPSNavigationPolicy API_AVAILABLE(macos(15.4), ios(NA), visionos(NA));
@end
diff -ruN /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WebKit.h /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WebKit.h
--- /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WebKit.h 2024-11-20 12:45:14
+++ /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WebKit.h 2025-02-11 08:05:32
@@ -59,6 +59,22 @@
#import <WebKit/WKURLSchemeTask.h>
#import <WebKit/WKUserContentController.h>
#import <WebKit/WKUserScript.h>
+#import <WebKit/WKWebExtension.h>
+#import <WebKit/WKWebExtensionAction.h>
+#import <WebKit/WKWebExtensionCommand.h>
+#import <WebKit/WKWebExtensionContext.h>
+#import <WebKit/WKWebExtensionController.h>
+#import <WebKit/WKWebExtensionControllerConfiguration.h>
+#import <WebKit/WKWebExtensionControllerDelegate.h>
+#import <WebKit/WKWebExtensionDataRecord.h>
+#import <WebKit/WKWebExtensionDataType.h>
+#import <WebKit/WKWebExtensionMatchPattern.h>
+#import <WebKit/WKWebExtensionMessagePort.h>
+#import <WebKit/WKWebExtensionPermission.h>
+#import <WebKit/WKWebExtensionTab.h>
+#import <WebKit/WKWebExtensionTabConfiguration.h>
+#import <WebKit/WKWebExtensionWindow.h>
+#import <WebKit/WKWebExtensionWindowConfiguration.h>
#import <WebKit/WKWebView.h>
#import <WebKit/WKWebViewConfiguration.h>
#import <WebKit/WKWebpagePreferences.h>
diff -ruN /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WebKitLegacy.h /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WebKitLegacy.h
--- /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WebKitLegacy.h 2024-11-20 12:45:13
+++ /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/WebKit.framework/Headers/WebKitLegacy.h 2025-02-11 08:05:30
@@ -6,13 +6,13 @@
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
+ * documentation and/or other materials provided with the distribution.
* 3. Neither the name of Apple Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED