Skip to content
Merged
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
6 changes: 6 additions & 0 deletions src/build/dotnet/generator-frameworks.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ partial class Frameworks {
"IOSurface",
"JavaScriptCore",
"LinkPresentation",
"LinkSecurity",
"LocalAuthentication",
"MapKit",
"MediaAccessibility",
Expand Down Expand Up @@ -232,6 +233,7 @@ partial class Frameworks {
"iTunesLibrary",
"JavaScriptCore",
"LinkPresentation",
"LinkSecurity",
"LocalAuthentication",
"LocalAuthenticationEmbeddedUI",
"MailKit",
Expand Down Expand Up @@ -353,6 +355,7 @@ partial class Frameworks {
"IOSurface",
"JavaScriptCore",
"LinkPresentation",
"LinkSecurity",
"MapKit",
"MediaAccessibility",
"MediaPlayer",
Expand Down Expand Up @@ -475,6 +478,7 @@ partial class Frameworks {
"IOSurface",
"JavaScriptCore",
"LinkPresentation",
"LinkSecurity",
"LocalAuthentication",
"MapKit",
"MediaAccessibility",
Expand Down Expand Up @@ -633,6 +637,7 @@ partial class Frameworks {
bool? _iTunesLibrary;
bool? _JavaScriptCore;
bool? _LinkPresentation;
bool? _LinkSecurity;
bool? _LocalAuthentication;
bool? _LocalAuthenticationEmbeddedUI;
bool? _MailKit;
Expand Down Expand Up @@ -811,6 +816,7 @@ partial class Frameworks {
public bool HaveiTunesLibrary { get { if (!_iTunesLibrary.HasValue) _iTunesLibrary = GetValue ("iTunesLibrary"); return _iTunesLibrary.Value; } }
public bool HaveJavaScriptCore { get { if (!_JavaScriptCore.HasValue) _JavaScriptCore = GetValue ("JavaScriptCore"); return _JavaScriptCore.Value; } }
public bool HaveLinkPresentation { get { if (!_LinkPresentation.HasValue) _LinkPresentation = GetValue ("LinkPresentation"); return _LinkPresentation.Value; } }
public bool HaveLinkSecurity { get { if (!_LinkSecurity.HasValue) _LinkSecurity = GetValue ("LinkSecurity"); return _LinkSecurity.Value; } }
public bool HaveLocalAuthentication { get { if (!_LocalAuthentication.HasValue) _LocalAuthentication = GetValue ("LocalAuthentication"); return _LocalAuthentication.Value; } }
public bool HaveLocalAuthenticationEmbeddedUI { get { if (!_LocalAuthenticationEmbeddedUI.HasValue) _LocalAuthenticationEmbeddedUI = GetValue ("LocalAuthenticationEmbeddedUI"); return _LocalAuthenticationEmbeddedUI.Value; } }
public bool HaveMailKit { get { if (!_MailKit.HasValue) _MailKit = GetValue ("MailKit"); return _MailKit.Value; } }
Expand Down
1 change: 1 addition & 0 deletions src/frameworks.sources
Original file line number Diff line number Diff line change
Expand Up @@ -2010,6 +2010,7 @@ COMMON_FRAMEWORKS = \
EnhancedLinkSecurity \
Foundation \
GameKit \
LinkSecurity \
MetalFX \
NaturalLanguage \
Network \
Expand Down
47 changes: 47 additions & 0 deletions src/linksecurity.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#nullable enable

using Foundation;
using ObjCRuntime;

namespace LinkSecurity {

/// <summary>Provides the result of an asynchronous flagged URL check.</summary>
/// <param name="isFlagged"><see langword="true" /> if the URL is flagged for additional security considerations; otherwise, <see langword="false" />.</param>
[iOS (27, 0), TV (27, 0), Mac (27, 0), MacCatalyst (27, 0)]
delegate void LSLinkSecurityManagerCheckIsFlaggedUrlCompletionHandler (bool isFlagged);

/// <summary>Stores URLs that require additional security considerations and checks whether URLs are flagged.</summary>
[iOS (27, 0), TV (27, 0), Mac (27, 0), MacCatalyst (27, 0)]
[BaseType (typeof (NSObject))]
interface LSLinkSecurityManager {
/// <summary>Gets the shared Link Security manager.</summary>
[Static]
[Export ("sharedManager", ArgumentSemantic.Strong)]
LSLinkSecurityManager SharedManager { get; }

/// <summary>Gets a value indicating whether any URLs are currently flagged for additional security considerations.</summary>
[Export ("hasFlaggedURLs")]
bool HasFlaggedUrls { get; }

/// <summary>Flags a URL for additional security considerations.</summary>
/// <param name="url">The URL to flag.</param>
[Export ("addFlaggedURL:")]
void AddFlaggedUrl (NSUrl url);

/// <summary>Flags a collection of URLs for additional security considerations.</summary>
/// <param name="urls">The URLs to flag.</param>
[Export ("addFlaggedURLs:")]
void AddFlaggedUrls (NSUrl [] urls);

/// <summary>Checks whether a URL is flagged for additional security considerations.</summary>
/// <param name="url">The URL to check.</param>
/// <param name="completionHandler">The handler to invoke with the result.</param>
[Async (XmlDocs = """
<summary>Checks whether a URL is flagged for additional security considerations.</summary>
<param name="url">The URL to check.</param>
<returns>A task whose result is <see langword="true" /> if the URL is flagged; otherwise, <see langword="false" />.</returns>
""")]
[Export ("checkIsFlaggedURL:completion:")]
void CheckIsFlaggedUrl (NSUrl url, LSLinkSecurityManagerCheckIsFlaggedUrlCompletionHandler completionHandler);
}
}
1 change: 1 addition & 0 deletions src/rsp/dotnet/ios-defines-dotnet.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
-d:HAS_IOSURFACE
-d:HAS_JAVASCRIPTCORE
-d:HAS_LINKPRESENTATION
-d:HAS_LINKSECURITY
-d:HAS_LOCALAUTHENTICATION
-d:HAS_MAPKIT
-d:HAS_MEDIAACCESSIBILITY
Expand Down
1 change: 1 addition & 0 deletions src/rsp/dotnet/maccatalyst-defines-dotnet.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
-d:HAS_IOSURFACE
-d:HAS_JAVASCRIPTCORE
-d:HAS_LINKPRESENTATION
-d:HAS_LINKSECURITY
-d:HAS_LOCALAUTHENTICATION
-d:HAS_MAPKIT
-d:HAS_MEDIAACCESSIBILITY
Expand Down
1 change: 1 addition & 0 deletions src/rsp/dotnet/macos-defines-dotnet.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
-d:HAS_ITUNESLIBRARY
-d:HAS_JAVASCRIPTCORE
-d:HAS_LINKPRESENTATION
-d:HAS_LINKSECURITY
-d:HAS_LOCALAUTHENTICATION
-d:HAS_LOCALAUTHENTICATIONEMBEDDEDUI
-d:HAS_MAILKIT
Expand Down
1 change: 1 addition & 0 deletions src/rsp/dotnet/tvos-defines-dotnet.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
-d:HAS_IOSURFACE
-d:HAS_JAVASCRIPTCORE
-d:HAS_LINKPRESENTATION
-d:HAS_LINKSECURITY
-d:HAS_MAPKIT
-d:HAS_MEDIAACCESSIBILITY
-d:HAS_MEDIAPLAYER
Expand Down
4 changes: 4 additions & 0 deletions tests/dotnet/UnitTests/ProjectTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3220,6 +3220,7 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl
"/System/Library/Frameworks/IOSurface.framework/IOSurface",
"/System/Library/Frameworks/JavaScriptCore.framework/JavaScriptCore",
"/System/Library/Frameworks/LinkPresentation.framework/LinkPresentation",
"/System/Library/Frameworks/LinkSecurity.framework/LinkSecurity",
"/System/Library/Frameworks/LocalAuthentication.framework/LocalAuthentication",
"/System/Library/Frameworks/MapKit.framework/MapKit",
"/System/Library/Frameworks/MediaAccessibility.framework/MediaAccessibility",
Expand Down Expand Up @@ -3378,6 +3379,7 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl
"/System/Library/Frameworks/IOSurface.framework/IOSurface",
"/System/Library/Frameworks/JavaScriptCore.framework/JavaScriptCore",
"/System/Library/Frameworks/LinkPresentation.framework/LinkPresentation",
"/System/Library/Frameworks/LinkSecurity.framework/LinkSecurity",
"/System/Library/Frameworks/MapKit.framework/MapKit",
"/System/Library/Frameworks/MediaAccessibility.framework/MediaAccessibility",
"/System/Library/Frameworks/MediaPlayer.framework/MediaPlayer",
Expand Down Expand Up @@ -3546,6 +3548,7 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl
"/System/Library/Frameworks/iTunesLibrary.framework/Versions/A/iTunesLibrary",
"/System/Library/Frameworks/JavaScriptCore.framework/Versions/A/JavaScriptCore",
"/System/Library/Frameworks/LinkPresentation.framework/Versions/A/LinkPresentation",
"/System/Library/Frameworks/LinkSecurity.framework/Versions/A/LinkSecurity",
"/System/Library/Frameworks/LocalAuthentication.framework/Versions/A/LocalAuthentication",
"/System/Library/Frameworks/LocalAuthenticationEmbeddedUI.framework/Versions/A/LocalAuthenticationEmbeddedUI",
"/System/Library/Frameworks/MailKit.framework/Versions/A/MailKit",
Expand Down Expand Up @@ -3769,6 +3772,7 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl
"/System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO",
"/System/Library/Frameworks/Intents.framework/Versions/A/Intents",
"/System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface",
"/System/Library/Frameworks/LinkSecurity.framework/Versions/A/LinkSecurity",
"/System/Library/Frameworks/LocalAuthentication.framework/Versions/A/LocalAuthentication",
"/System/Library/Frameworks/MediaAccessibility.framework/Versions/A/MediaAccessibility",
"/System/Library/Frameworks/MediaToolbox.framework/Versions/A/MediaToolbox",
Expand Down
1 change: 1 addition & 0 deletions tests/mtouch/RegistrarTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ public void MT4134 ()
new { Framework = "TouchController", Version = "26.0" },
new { Framework = "AVSystemRouting", Version = "27.0" },
new { Framework = "EnhancedLinkSecurity", Version = "27.0" },
new { Framework = "LinkSecurity", Version = "27.0" },
};
foreach (var framework in invalidFrameworks)
mtouch.AssertError (4134, $"Your application is using the '{framework.Framework}' framework, which isn't included in the iOS SDK you're using to build your app (this framework was introduced in iOS {framework.Version}, while you're building with the iOS {mtouch.Sdk} SDK.) Please select a newer SDK in your app's iOS Build options.");
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

3 changes: 3 additions & 0 deletions tools/common/Frameworks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ public static Frameworks MacFrameworks {

{ "AccessoryAccess", "AccessoryAccess", 27, 0 },
{ "EnhancedLinkSecurity", "EnhancedLinkSecurity", 27, 0 },
{ "LinkSecurity", "LinkSecurity", 27, 0 },
{ "StateReporting", "StateReporting", 27, 0 },
};
}
Expand Down Expand Up @@ -511,6 +512,7 @@ public static Frameworks iOSFrameworks {

{ "AVSystemRouting", "AVSystemRouting", new Version (27, 0), NotAvailableInSimulator },
{ "EnhancedLinkSecurity", "EnhancedLinkSecurity", 27, 0 },
{ "LinkSecurity", "LinkSecurity", 27, 0 },
{ "StateReporting", "StateReporting", 27, 0 },
// the above MUST be kept in sync with simlauncher
// see tools/mtouch/Makefile
Expand Down Expand Up @@ -634,6 +636,7 @@ public static Frameworks TVOSFrameworks {
{ "AVRouting", "AVRouting", 26, 0 },

{ "EnhancedLinkSecurity", "EnhancedLinkSecurity", 27, 0 },
{ "LinkSecurity", "LinkSecurity", 27, 0 },
{ "StateReporting", "StateReporting", 27, 0 },
};
}
Expand Down
Loading