Skip to content

WebKit iOS xcode14.0 beta5

Manuel de la Pena edited this page Aug 18, 2022 · 3 revisions

#WebKit.framework https://github.com/xamarin/xamarin-macios/pull/15700

diff -ruN /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKUIDelegate.h /Applications/Xcode_14.0.0-beta5.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKUIDelegate.h
--- /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKUIDelegate.h	2022-07-22 10:03:25.000000000 -0400
+++ /Applications/Xcode_14.0.0-beta5.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKUIDelegate.h	2022-08-05 13:39:21.000000000 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2014-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -57,6 +57,18 @@
     WKMediaCaptureTypeCameraAndMicrophone,
 } API_AVAILABLE(macos(12.0), ios(15.0));
 
+/*! @enum WKDialogResult
+@abstract Constants returned by showLockdownModeFirstUseMessage to indicate how WebKit should treat first use.
+@constant WKDialogResultShowDefault Indicates that the client did not display a first use message. WebKit should show the default.
+@constant WKDialogResultAskAgain Indicates the client handled the message, but wants to be checked if other WKWebViews are used.
+@constant WKDialogResultHandled Indicates the client handled the message and no further checks are needed.
+*/
+typedef NS_ENUM(NSInteger, WKDialogResult) {
+    WKDialogResultShowDefault = 1,
+    WKDialogResultAskAgain,
+    WKDialogResultHandled
+} API_AVAILABLE(ios(16.0));
+
 /*! A class conforming to the WKUIDelegate protocol provides methods for
  presenting native UI on behalf of a webpage.
  */
@@ -232,6 +244,16 @@
 
 - (void)webView:(WKWebView *)webView contextMenuDidEndForElement:(WKContextMenuElementInfo *)elementInfo API_AVAILABLE(ios(13.0));
 
+/*! @abstract Displays a Lockdown Mode warning panel.
+ @param webView The web view invoking the delegate method.
+ @param message The message WebKit would display if this delegate were not invoked.
+ @param completionHandler The completion handler you must invoke to resume after the first use message is displayed.
+ @discussion The panel should have a single OK button.
+
+ 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:(void (^)(WKDialogResult))completionHandler API_AVAILABLE(ios(13.0));
+
 #endif // TARGET_OS_IOS
 
 #if !TARGET_OS_IPHONE
diff -ruN /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebpagePreferences.h /Applications/Xcode_14.0.0-beta5.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebpagePreferences.h
--- /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebpagePreferences.h	2022-07-25 15:35:04.000000000 -0400
+++ /Applications/Xcode_14.0.0-beta5.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebpagePreferences.h	2022-08-05 16:54:36.000000000 -0400
@@ -71,11 +71,10 @@
 */
 @property (nonatomic) BOOL allowsContentJavaScript API_AVAILABLE(macos(11.0), ios(14.0));
 
-/*! @abstract A boolean indicating whether lockdown mode is enabled. \
- @discussion This mode trades off performance and compatibility in favor of security. \
- The default value depends on the system setting. \
- */ \
+/*! @abstract A boolean indicating whether lockdown mode is enabled.
+ @discussion This mode trades off performance and compatibility in favor of security.
+ The default value depends on the system setting.
+ */
 @property (nonatomic, getter=isLockdownModeEnabled) BOOL lockdownModeEnabled API_AVAILABLE(macos(13.0), ios(16.0));
 
-
 @end
Clone this wiki locally