Skip to content

Commit cbb9b2d

Browse files
authored
[SecurityUI] Add this framework, introduced in Xcode 16.3. (#22446)
Update-to-date with Xcode 16.3 beta 3.
1 parent 6eff2f0 commit cbb9b2d

15 files changed

+85
-44
lines changed

src/Foundation/NSObject.mac.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ public partial class NSObject {
116116
static IntPtr be = Dlfcn.dlopen (Constants.BrowserEngineKitLibrary, 1);
117117
static IntPtr ce = Dlfcn.dlopen (Constants.CoreHapticsLibrary, 1);
118118
static IntPtr da = Dlfcn.dlopen (Constants.DataDetectionLibrary, 1);
119+
static IntPtr su = Dlfcn.dlopen (Constants.SecurityUILibrary, 1);
119120

120121
#if !NET
121122
[Obsolete ("Use PlatformAssembly for easier code sharing across platforms.")]

src/build/dotnet/generator-frameworks.g.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ partial class Frameworks {
121121
"SceneKit",
122122
"ScreenTime",
123123
"Security",
124+
"SecurityUI",
124125
"SensitiveContentAnalysis",
125126
"SensorKit",
126127
"SharedWithYou",
@@ -266,6 +267,7 @@ partial class Frameworks {
266267
"ScriptingBridge",
267268
"SearchKit",
268269
"Security",
270+
"SecurityUI",
269271
"SensitiveContentAnalysis",
270272
"ServiceManagement",
271273
"SharedWithYou",
@@ -360,6 +362,7 @@ partial class Frameworks {
360362
"ReplayKit",
361363
"SceneKit",
362364
"Security",
365+
"SecurityUI",
363366
"SharedWithYou",
364367
"SharedWithYouCore",
365368
"ShazamKit",
@@ -487,6 +490,7 @@ partial class Frameworks {
487490
"ScreenCaptureKit",
488491
"ScreenTime",
489492
"Security",
493+
"SecurityUI",
490494
"SensitiveContentAnalysis",
491495
"SensorKit",
492496
"ServiceManagement",
@@ -651,6 +655,7 @@ partial class Frameworks {
651655
bool? _ScriptingBridge;
652656
bool? _SearchKit;
653657
bool? _Security;
658+
bool? _SecurityUI;
654659
bool? _SensitiveContentAnalysis;
655660
bool? _SensorKit;
656661
bool? _ServiceManagement;
@@ -820,6 +825,7 @@ partial class Frameworks {
820825
public bool HaveScriptingBridge { get { if (!_ScriptingBridge.HasValue) _ScriptingBridge = GetValue ("ScriptingBridge"); return _ScriptingBridge.Value; } }
821826
public bool HaveSearchKit { get { if (!_SearchKit.HasValue) _SearchKit = GetValue ("SearchKit"); return _SearchKit.Value; } }
822827
public bool HaveSecurity { get { if (!_Security.HasValue) _Security = GetValue ("Security"); return _Security.Value; } }
828+
public bool HaveSecurityUI { get { if (!_SecurityUI.HasValue) _SecurityUI = GetValue ("SecurityUI"); return _SecurityUI.Value; } }
823829
public bool HaveSensitiveContentAnalysis { get { if (!_SensitiveContentAnalysis.HasValue) _SensitiveContentAnalysis = GetValue ("SensitiveContentAnalysis"); return _SensitiveContentAnalysis.Value; } }
824830
public bool HaveSensorKit { get { if (!_SensorKit.HasValue) _SensorKit = GetValue ("SensorKit"); return _SensorKit.Value; } }
825831
public bool HaveServiceManagement { get { if (!_ServiceManagement.HasValue) _ServiceManagement = GetValue ("ServiceManagement"); return _ServiceManagement.Value; } }

src/frameworks.sources

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2138,6 +2138,7 @@ MACOS_FRAMEWORKS = \
21382138
SensitiveContentAnalysis \
21392139
ServiceManagement \
21402140
Security \
2141+
SecurityUI \
21412142
SharedWithYou \
21422143
SharedWithYouCore \
21432144
Social \
@@ -2250,6 +2251,7 @@ IOS_FRAMEWORKS = \
22502251
SafetyKit \
22512252
ScreenTime \
22522253
Security \
2254+
SecurityUI \
22532255
SensitiveContentAnalysis \
22542256
SensorKit \
22552257
SharedWithYou \
@@ -2320,6 +2322,7 @@ TVOS_FRAMEWORKS = \
23202322
PhotosUI \
23212323
ReplayKit \
23222324
Security \
2325+
SecurityUI \
23232326
SharedWithYou \
23242327
SharedWithYouCore \
23252328
SystemConfiguration \
@@ -2419,6 +2422,7 @@ MACCATALYST_FRAMEWORKS = \
24192422
ScreenCaptureKit \
24202423
ScreenTime \
24212424
Security \
2425+
SecurityUI \
24222426
SensitiveContentAnalysis \
24232427
SensorKit \
24242428
ServiceManagement \

src/rsp/dotnet/ios-defines-dotnet.rsp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@
116116
-d:HAS_SCENEKIT
117117
-d:HAS_SCREENTIME
118118
-d:HAS_SECURITY
119+
-d:HAS_SECURITYUI
119120
-d:HAS_SENSITIVECONTENTANALYSIS
120121
-d:HAS_SENSORKIT
121122
-d:HAS_SHAREDWITHYOU

src/rsp/dotnet/maccatalyst-defines-dotnet.rsp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@
104104
-d:HAS_SCREENCAPTUREKIT
105105
-d:HAS_SCREENTIME
106106
-d:HAS_SECURITY
107+
-d:HAS_SECURITYUI
107108
-d:HAS_SENSITIVECONTENTANALYSIS
108109
-d:HAS_SENSORKIT
109110
-d:HAS_SERVICEMANAGEMENT

src/rsp/dotnet/macos-defines-dotnet.rsp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@
115115
-d:HAS_SCRIPTINGBRIDGE
116116
-d:HAS_SEARCHKIT
117117
-d:HAS_SECURITY
118+
-d:HAS_SECURITYUI
118119
-d:HAS_SENSITIVECONTENTANALYSIS
119120
-d:HAS_SERVICEMANAGEMENT
120121
-d:HAS_SHAREDWITHYOU

src/rsp/dotnet/tvos-defines-dotnet.rsp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
-d:HAS_REPLAYKIT
6969
-d:HAS_SCENEKIT
7070
-d:HAS_SECURITY
71+
-d:HAS_SECURITYUI
7172
-d:HAS_SHAREDWITHYOU
7273
-d:HAS_SHAREDWITHYOUCORE
7374
-d:HAS_SHAZAMKIT

src/securityui.cs

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
using System;
2+
3+
#if HAS_APPKIT
4+
using AppKit;
5+
#endif
6+
7+
using Foundation;
8+
using ObjCRuntime;
9+
using Security;
10+
11+
#if HAS_UIKIT
12+
using UIKit;
13+
#endif
14+
15+
namespace SecurityUI {
16+
[TV (18, 4), MacCatalyst (18, 4), Mac (15, 4), iOS (18, 4)]
17+
[BaseType (typeof (NSObject))]
18+
[DisableDefaultCtor]
19+
interface SFCertificatePresentation {
20+
[Export ("initWithTrust:")]
21+
[DesignatedInitializer]
22+
NativeHandle Constructor (SecTrust trust);
23+
24+
#if __MACOS__
25+
[NoTV, NoiOS, NoMacCatalyst]
26+
[Export ("presentSheetInWindow:dismissHandler:")]
27+
void PresentSheet (NSWindow window, [NullAllowed] Action dismissHandler);
28+
#endif
29+
30+
#if !__MACOS__
31+
[NoMac]
32+
[Export ("presentSheetInViewController:dismissHandler:")]
33+
void PresentSheet (UIViewController viewController, [NullAllowed] Action dismissHandler);
34+
#endif
35+
36+
[Export ("dismissSheet")]
37+
void DismissSheet ();
38+
39+
[Export ("trust", ArgumentSemantic.Assign)]
40+
SecTrust Trust { get; }
41+
42+
[NullAllowed, Export ("title")]
43+
string Title { get; set; }
44+
45+
[NullAllowed, Export ("message")]
46+
string Message { get; set; }
47+
48+
[NullAllowed, Export ("helpURL", ArgumentSemantic.Copy)]
49+
NSUrl HelpUrl { get; set; }
50+
}
51+
}

tests/cecil-tests/Documentation.KnownFailures.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9281,6 +9281,7 @@ F:ObjCRuntime.Constants.ScriptingBridgeLibrary
92819281
F:ObjCRuntime.Constants.SdkVersion
92829282
F:ObjCRuntime.Constants.SearchKitLibrary
92839283
F:ObjCRuntime.Constants.SecurityLibrary
9284+
F:ObjCRuntime.Constants.SecurityUILibrary
92849285
F:ObjCRuntime.Constants.SensitiveContentAnalysisLibrary
92859286
F:ObjCRuntime.Constants.SensorKitLibrary
92869287
F:ObjCRuntime.Constants.ServiceManagementLibrary
@@ -35588,6 +35589,10 @@ M:Security.SslContext.Write(System.Byte[],System.IntPtr@)
3558835589
M:Security.SslStreamConnection.#ctor(System.IO.Stream)
3558935590
M:Security.SslStreamConnection.Read(System.IntPtr,System.IntPtr@)
3559035591
M:Security.SslStreamConnection.Write(System.IntPtr,System.IntPtr@)
35592+
M:SecurityUI.SFCertificatePresentation.#ctor(Security.SecTrust)
35593+
M:SecurityUI.SFCertificatePresentation.DismissSheet
35594+
M:SecurityUI.SFCertificatePresentation.PresentSheet(AppKit.NSWindow,System.Action)
35595+
M:SecurityUI.SFCertificatePresentation.PresentSheet(UIKit.UIViewController,System.Action)
3559135596
M:SensitiveContentAnalysis.SCSensitivityAnalyzer.AnalyzeImageAsync(CoreGraphics.CGImage)
3559235597
M:SensitiveContentAnalysis.SCSensitivityAnalyzer.AnalyzeImageAsync(Foundation.NSUrl)
3559335598
M:SensitiveContentAnalysis.SCSensitivityAnalyzer.AnalyzeVideoAsync(Foundation.NSUrl,Foundation.NSProgress@)
@@ -55913,6 +55918,10 @@ P:Security.SecTrustResultKey.OrganizationName
5591355918
P:Security.SecTrustResultKey.ResultValue
5591455919
P:Security.SecTrustResultKey.RevocationChecked
5591555920
P:Security.SecTrustResultKey.RevocationValidUntilDate
55921+
P:SecurityUI.SFCertificatePresentation.HelpUrl
55922+
P:SecurityUI.SFCertificatePresentation.Message
55923+
P:SecurityUI.SFCertificatePresentation.Title
55924+
P:SecurityUI.SFCertificatePresentation.Trust
5591655925
P:SensitiveContentAnalysis.SCSensitivityAnalysis.Sensitive
5591755926
P:SensorKit.SRSensorReader.Delegate
5591855927
P:SensorKit.SRSensorReader.Sensor
@@ -66943,6 +66952,7 @@ T:Security.SslStreamConnection
6694366952
T:Security.TlsCipherSuite
6694466953
T:Security.TlsCipherSuiteGroup
6694566954
T:Security.TlsProtocolVersion
66955+
T:SecurityUI.SFCertificatePresentation
6694666956
T:SensitiveContentAnalysis.SCSensitivityAnalysisPolicy
6694766957
T:SensorKit.ISRSensorReaderDelegate
6694866958
T:SensorKit.SRAbsoluteTime

tests/dotnet/UnitTests/ProjectTest.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2588,6 +2588,7 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl
25882588
"/System/Library/Frameworks/SceneKit.framework/SceneKit",
25892589
"/System/Library/Frameworks/ScreenTime.framework/ScreenTime",
25902590
"/System/Library/Frameworks/Security.framework/Security",
2591+
"/System/Library/Frameworks/SecurityUI.framework/SecurityUI",
25912592
"/System/Library/Frameworks/SensitiveContentAnalysis.framework/SensitiveContentAnalysis",
25922593
"/System/Library/Frameworks/SensorKit.framework/SensorKit",
25932594
"/System/Library/Frameworks/SharedWithYou.framework/SharedWithYou",
@@ -2722,6 +2723,7 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl
27222723
"/System/Library/Frameworks/ReplayKit.framework/ReplayKit",
27232724
"/System/Library/Frameworks/SceneKit.framework/SceneKit",
27242725
"/System/Library/Frameworks/Security.framework/Security",
2726+
"/System/Library/Frameworks/SecurityUI.framework/SecurityUI",
27252727
"/System/Library/Frameworks/SharedWithYou.framework/SharedWithYou",
27262728
"/System/Library/Frameworks/ShazamKit.framework/ShazamKit",
27272729
"/System/Library/Frameworks/SoundAnalysis.framework/SoundAnalysis",
@@ -2897,6 +2899,7 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl
28972899
"/System/Library/Frameworks/ScreenTime.framework/Versions/A/ScreenTime",
28982900
"/System/Library/Frameworks/ScriptingBridge.framework/Versions/A/ScriptingBridge",
28992901
"/System/Library/Frameworks/Security.framework/Versions/A/Security",
2902+
"/System/Library/Frameworks/SecurityUI.framework/Versions/A/SecurityUI",
29002903
"/System/Library/Frameworks/SensitiveContentAnalysis.framework/Versions/A/SensitiveContentAnalysis",
29012904
"/System/Library/Frameworks/ServiceManagement.framework/Versions/A/ServiceManagement",
29022905
"/System/Library/Frameworks/SharedWithYou.framework/Versions/A/SharedWithYou",
@@ -3091,6 +3094,7 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl
30913094
"/System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore",
30923095
"/System/Library/Frameworks/QuickLookThumbnailing.framework/Versions/A/QuickLookThumbnailing",
30933096
"/System/Library/Frameworks/Security.framework/Versions/A/Security",
3097+
"/System/Library/Frameworks/SecurityUI.framework/Versions/A/SecurityUI",
30943098
"/System/Library/Frameworks/SensitiveContentAnalysis.framework/Versions/A/SensitiveContentAnalysis",
30953099
"/System/Library/Frameworks/SensorKit.framework/Versions/A/SensorKit",
30963100
"/System/Library/Frameworks/ServiceManagement.framework/Versions/A/ServiceManagement",

0 commit comments

Comments
 (0)