Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/SafariServices/SSEnums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ public enum SFErrorCode : long {
InternalError = 4,
/// <summary>The app is missing an entitlement.</summary>
MissingEntitlement = 5,
/// <summary>The maximum number of allowed attempts to load the extension has been exceeded.</summary>
MaximumAttemptsExceeded = 6,
}

[NoMac]
Expand Down
32 changes: 32 additions & 0 deletions src/safariservices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -899,6 +899,9 @@ interface SFAddToHomeScreenInfo : NSCopying {

delegate void SFSafariSettingsOpenExportBrowsingDataSettingsCompletionHandler ([NullAllowed] NSError error);

[NoTV, NoMacCatalyst, iOS (26, 2), NoMac]
delegate void SFSafariSettingsOpenExtensionsSettingsCompletionHandler ([NullAllowed] NSError error);

[NoTV, NoMacCatalyst, iOS (26, 0), NoMac]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
Expand All @@ -907,6 +910,35 @@ interface SFSafariSettings {
[Static]
[Export ("openExportBrowsingDataSettingsWithCompletionHandler:")]
void OpenExportBrowsingDataSettings ([NullAllowed] SFSafariSettingsOpenExportBrowsingDataSettingsCompletionHandler completionHandler);

[Async]
[iOS (26, 2)]
[Static]
[Export ("openExtensionsSettingsForIdentifiers:completionHandler:")]
void OpenExtensionsSettings (string [] extensionIdentifiers, [NullAllowed] SFSafariSettingsOpenExtensionsSettingsCompletionHandler completionHandler);
}

[NoTV, iOS (26, 2), MacCatalyst (26, 2), NoMac]
delegate void SFSafariExtensionManagerHandler ([NullAllowed] SFSafariExtensionState state, [NullAllowed] NSError error);

[NoTV, iOS (26, 2), MacCatalyst (26, 2), NoMac]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface SFSafariExtensionManager {

[Async]
[Static]
[Export ("getStateOfExtensionWithIdentifier:completionHandler:")]
void GetState (string identifier, SFSafariExtensionManagerHandler completionHandler);
}

[NoTV, iOS (26, 2), MacCatalyst (26, 2), NoMac]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface SFSafariExtensionState {

[Export ("enabled")]
bool Enabled { [Bind ("isEnabled")] get; }
}

}
9 changes: 9 additions & 0 deletions tests/cecil-tests/Documentation.KnownFailures.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15960,6 +15960,8 @@ M:SafariServices.SFSafariExtensionHandling_Extensions.ContentBlocker(SafariServi
M:SafariServices.SFSafariExtensionHandling_Extensions.ValidateContextMenuItemAsync(SafariServices.ISFSafariExtensionHandling,System.String,SafariServices.SFSafariPage,Foundation.NSDictionary{Foundation.NSString,Foundation.NSObject})
M:SafariServices.SFSafariExtensionHandling_Extensions.ValidateToolbarItemAsync(SafariServices.ISFSafariExtensionHandling,SafariServices.SFSafariWindow)
M:SafariServices.SFSafariExtensionHandling_Extensions.WillNavigate(SafariServices.ISFSafariExtensionHandling,SafariServices.SFSafariPage,Foundation.NSUrl)
M:SafariServices.SFSafariExtensionManager.GetState(System.String,SafariServices.SFSafariExtensionManagerHandler)
M:SafariServices.SFSafariExtensionManager.GetStateAsync(System.String)
M:SafariServices.SFSafariExtensionViewController.DismissPopover
M:SafariServices.SFSafariPage.GetContainingTab(System.Action{SafariServices.SFSafariTab})
M:SafariServices.SFSafariPage.GetContainingTabAsync
Expand All @@ -15968,6 +15970,8 @@ M:SafariServices.SFSafariPage.GetScreenshotOfVisibleArea(System.Action{AppKit.NS
M:SafariServices.SFSafariPage.GetScreenshotOfVisibleAreaAsync
M:SafariServices.SFSafariSettings.OpenExportBrowsingDataSettings(SafariServices.SFSafariSettingsOpenExportBrowsingDataSettingsCompletionHandler)
M:SafariServices.SFSafariSettings.OpenExportBrowsingDataSettingsAsync
M:SafariServices.SFSafariSettings.OpenExtensionsSettings(System.String[],SafariServices.SFSafariSettingsOpenExtensionsSettingsCompletionHandler)
M:SafariServices.SFSafariSettings.OpenExtensionsSettingsAsync(System.String[])
M:SafariServices.SFSafariTab.ActivateAsync
M:SafariServices.SFSafariTab.Close
M:SafariServices.SFSafariTab.GetActivePageAsync
Expand Down Expand Up @@ -23521,6 +23525,7 @@ P:SafariServices.ISFAddToHomeScreenActivityItem.Title
P:SafariServices.ISFAddToHomeScreenActivityItem.Url
P:SafariServices.SFAddToHomeScreenInfo.Manifest
P:SafariServices.SFAddToHomeScreenInfo.WebsiteCookies
P:SafariServices.SFSafariExtensionState.Enabled
P:SafariServices.SFSafariViewController.PreferredBarTintColor
P:SafariServices.SFSafariViewController.PreferredControlTintColor
P:SafariServices.SFSafariViewControllerActivityButton.ExtensionIdentifier
Expand Down Expand Up @@ -28285,11 +28290,15 @@ T:SafariServices.SFExtensionValidationHandler
T:SafariServices.SFSafariApplication
T:SafariServices.SFSafariExtension
T:SafariServices.SFSafariExtensionHandler
T:SafariServices.SFSafariExtensionManager
T:SafariServices.SFSafariExtensionManagerHandler
T:SafariServices.SFSafariExtensionState
T:SafariServices.SFSafariExtensionViewController
T:SafariServices.SFSafariPage
T:SafariServices.SFSafariPageProperties
T:SafariServices.SFSafariSettings
T:SafariServices.SFSafariSettingsOpenExportBrowsingDataSettingsCompletionHandler
T:SafariServices.SFSafariSettingsOpenExtensionsSettingsCompletionHandler
T:SafariServices.SFSafariTab
T:SafariServices.SFSafariToolbarItem
T:SafariServices.SFSafariViewControllerActivityButton
Expand Down
6 changes: 6 additions & 0 deletions tests/introspection/iOSApiProtocolTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,9 @@ protected override bool Skip (Type type, string protocolName)
case "CPMessageGridItemConfiguration": // Conformance not in headers
case "PKAddIdentityDocumentMetadata": // Conformance not in headers
return true;
// Xcode 26.2
case "SFSafariExtensionState": // Conformance not in headers
return true;
}
break;
case "NSSecureCoding":
Expand Down Expand Up @@ -661,6 +664,9 @@ protected override bool Skip (Type type, string protocolName)
case "CPMessageGridItemConfiguration": // Conformance not in headers
case "PKAddIdentityDocumentMetadata": // Conformance not in headers
return true;
// Xcode 26.2
case "SFSafariExtensionState": // Conformance not in headers
return true;
}
break;
case "NSCopying":
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
# 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.
!extra-enum-value! Managed value 4 for SFErrorCode.InternalError not found in native headers
!extra-enum-value! Managed value 5 for SFErrorCode.MissingEntitlement not found in native headers
!extra-enum-value! Managed value 6 for SFErrorCode.MaximumAttemptsExceeded not found in native headers