Skip to content

Commit b9cbca7

Browse files
[SafariServices] Update bindings to Xcode 26 beta 1-4. (#23377)
Co-authored-by: Alex Soto <alex@soto.dev>
1 parent 732e90f commit b9cbca7

File tree

6 files changed

+31
-22
lines changed

6 files changed

+31
-22
lines changed

src/SafariServices/SSEnums.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ public enum SFErrorCode : long {
5656
NoAttachmentFound = 2,
5757
/// <summary>An error occurred that prevented the blocker or extension from loading.</summary>
5858
LoadingInterrupted = 3,
59+
/// <summary>An internal error occurred.</summary>
60+
InternalError = 4,
61+
/// <summary>The app is missing an entitlement.</summary>
62+
MissingEntitlement = 5,
5963
}
6064

6165
[NoMac]

src/safariservices.cs

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -220,25 +220,17 @@ interface SFSafariViewController {
220220
[Wrap ("WeakDelegate")]
221221
ISFSafariViewControllerDelegate Delegate { get; set; }
222222

223-
/// <summary>To be added.</summary>
224-
/// <value>
225-
/// <para>(More documentation for this node is coming)</para>
226-
/// <para tool="nullallowed">This value can be <see langword="null" />.</para>
227-
/// </value>
228-
/// <remarks>To be added.</remarks>
223+
[Deprecated (PlatformName.iOS, 26, 0, message: "Interferes with system-provided background effects")]
224+
[Deprecated (PlatformName.MacCatalyst, 26, 0, message: "Interferes with system-provided background effects")]
229225
[MacCatalyst (13, 1)]
230226
[NullAllowed]
231227
[Export ("preferredBarTintColor", ArgumentSemantic.Assign)]
232228
UIColor PreferredBarTintColor { get; set; }
233229

234-
/// <summary>To be added.</summary>
235-
/// <value>
236-
/// <para>(More documentation for this node is coming)</para>
237-
/// <para tool="nullallowed">This value can be <see langword="null" />.</para>
238-
/// </value>
239-
/// <remarks>To be added.</remarks>
240230
[MacCatalyst (13, 1)]
241231
[NullAllowed]
232+
[Deprecated (PlatformName.iOS, 26, 0, message: "Interferes with system-provided background effects")]
233+
[Deprecated (PlatformName.MacCatalyst, 26, 0, message: "Interferes with system-provided background effects")]
242234
[Export ("preferredControlTintColor", ArgumentSemantic.Assign)]
243235
UIColor PreferredControlTintColor { get; set; }
244236

@@ -914,4 +906,17 @@ interface SFAddToHomeScreenInfo : NSCopying {
914906
[Export ("websiteCookies", ArgumentSemantic.Copy)]
915907
NSHttpCookie [] WebsiteCookies { get; set; }
916908
}
909+
910+
delegate void SFSafariSettingsOpenExportBrowsingDataSettingsCompletionHandler ([NullAllowed] NSError error);
911+
912+
[NoTV, NoMacCatalyst, iOS (26, 0), NoMac]
913+
[BaseType (typeof (NSObject))]
914+
[DisableDefaultCtor]
915+
interface SFSafariSettings {
916+
[Async]
917+
[Static]
918+
[Export ("openExportBrowsingDataSettingsWithCompletionHandler:")]
919+
void OpenExportBrowsingDataSettings ([NullAllowed] SFSafariSettingsOpenExportBrowsingDataSettingsCompletionHandler completionHandler);
920+
}
921+
917922
}

tests/cecil-tests/Documentation.KnownFailures.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15803,6 +15803,8 @@ M:SafariServices.SFSafariPage.GetContainingTabAsync
1580315803
M:SafariServices.SFSafariPage.GetPagePropertiesAsync
1580415804
M:SafariServices.SFSafariPage.GetScreenshotOfVisibleArea(System.Action{AppKit.NSImage})
1580515805
M:SafariServices.SFSafariPage.GetScreenshotOfVisibleAreaAsync
15806+
M:SafariServices.SFSafariSettings.OpenExportBrowsingDataSettingsWithCompletionHandler(SafariServices.SFSafariSettingsOpenExportBrowsingDataSettingsCompletionHandler)
15807+
M:SafariServices.SFSafariSettings.OpenExportBrowsingDataSettingsWithCompletionHandlerAsync
1580615808
M:SafariServices.SFSafariTab.ActivateAsync
1580715809
M:SafariServices.SFSafariTab.Close
1580815810
M:SafariServices.SFSafariTab.GetActivePageAsync
@@ -23985,6 +23987,8 @@ P:SafariServices.ISFAddToHomeScreenActivityItem.Title
2398523987
P:SafariServices.ISFAddToHomeScreenActivityItem.Url
2398623988
P:SafariServices.SFAddToHomeScreenInfo.Manifest
2398723989
P:SafariServices.SFAddToHomeScreenInfo.WebsiteCookies
23990+
P:SafariServices.SFSafariViewController.PreferredBarTintColor
23991+
P:SafariServices.SFSafariViewController.PreferredControlTintColor
2398823992
P:SafariServices.SFSafariViewControllerActivityButton.ExtensionIdentifier
2398923993
P:SafariServices.SFSafariViewControllerActivityButton.TemplateImage
2399023994
P:SafariServices.SFSafariViewControllerConfiguration.ActivityButton
@@ -28573,6 +28577,8 @@ T:SafariServices.SFSafariExtensionHandler
2857328577
T:SafariServices.SFSafariExtensionViewController
2857428578
T:SafariServices.SFSafariPage
2857528579
T:SafariServices.SFSafariPageProperties
28580+
T:SafariServices.SFSafariSettings
28581+
T:SafariServices.SFSafariSettingsOpenExportBrowsingDataSettingsCompletionHandler
2857628582
T:SafariServices.SFSafariTab
2857728583
T:SafariServices.SFSafariToolbarItem
2857828584
T:SafariServices.SFSafariViewControllerActivityButton

tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-SafariServices.todo

Lines changed: 0 additions & 2 deletions
This file was deleted.

tests/xtro-sharpie/api-annotations-dotnet/iOS-SafariServices.todo

Lines changed: 0 additions & 8 deletions
This file was deleted.

tests/xtro-sharpie/api-annotations-dotnet/macOS-SafariServices.ignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@
55
!missing-selector! SFSafariExtensionState::isEnabled not bound
66
!missing-type! SFSafariExtensionManager not bound
77
!missing-type! SFSafariExtensionState not bound
8+
9+
# these values are not listed in the macOS headers, but it's an error enum, so we're keeping the same values across all platforms.
10+
!extra-enum-value! Managed value 4 for SFErrorCode.InternalError not found in native headers
11+
!extra-enum-value! Managed value 5 for SFErrorCode.MissingEntitlement not found in native headers

0 commit comments

Comments
 (0)