Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ThreadNetwork] Added support for Xcode 14.1 b3 #16196

Merged
merged 4 commits into from
Oct 10, 2022
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
1 change: 1 addition & 0 deletions src/Foundation/NSObject.mac.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ public partial class NSObject {
static IntPtr un = Dlfcn.dlopen (Constants.UserNotificationsLibrary, 1);
static IntPtr il = Dlfcn.dlopen (Constants.iTunesLibraryLibrary, 1);
static IntPtr exl = Dlfcn.dlopen (Constants.ExtensionKitLibrary, 1);
static IntPtr th = Dlfcn.dlopen (Constants.ThreadNetworkLibrary, 1);

#if !NET
[Obsolete ("Use PlatformAssembly for easier code sharing across platforms.")]
Expand Down
2 changes: 2 additions & 0 deletions src/frameworks.sources
Original file line number Diff line number Diff line change
Expand Up @@ -2099,6 +2099,7 @@ MACOS_FRAMEWORKS = \
Social \
Speech \
SystemConfiguration \
ThreadNetwork \
UserNotifications \
UserNotificationsUI \
VideoSubscriberAccount \
Expand Down Expand Up @@ -2398,6 +2399,7 @@ MACCATALYST_FRAMEWORKS = \
Social \
Speech \
SystemConfiguration \
ThreadNetwork \
UIKit XKit \
UserNotifications \
UserNotificationsUI \
Expand Down
4 changes: 2 additions & 2 deletions src/threadnetwork.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace ThreadNetwork {

[iOS (15,0), NoMac, NoMacCatalyst]
[iOS (15,0), Mac (13,0), MacCatalyst (16,1), NoWatch, NoTV]
[BaseType (typeof (NSObject))]
interface THClient
{
Expand Down Expand Up @@ -40,7 +40,7 @@ interface THClient
void CheckPreferredNetwork (NSData activeOperationalDataSet, Action<bool> completion);
}

[iOS (15,0), NoMac, NoMacCatalyst]
[iOS (15,0), Mac (13,0), MacCatalyst (16,1), NoWatch, NoTV]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface THCredentials : NSSecureCoding
Expand Down
21 changes: 0 additions & 21 deletions tests/xtro-sharpie/api-annotations-dotnet/macOS-ThreadNetwork.todo

This file was deleted.

21 changes: 0 additions & 21 deletions tests/xtro-sharpie/macOS-ThreadNetwork.todo

This file was deleted.

5 changes: 5 additions & 0 deletions tools/common/Frameworks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ public static Frameworks MacFrameworks {
{ "HealthKit", "HealthKit", 13,0 },
{ "SharedWithYouCore", "SharedWithYouCore", 13, 0 },
{ "ExtensionKit", "ExtensionKit", 13,0 },
{ "ThreadNetwork", "ThreadNetwork", 13,0 },
};
}
return mac_frameworks;
Expand Down Expand Up @@ -645,6 +646,7 @@ public static Frameworks GetMacCatalystFrameworks ()
var min = new Version (13, 0);
var v14_0 = new Version (14, 0);
var v14_2 = new Version (14, 2);
var v16_1 = new Version (16, 1);
foreach (var f in catalyst_frameworks.Values) {
switch (f.Name) {
// These frameworks were added to Catalyst after they were added to iOS, so we have to adjust the Versions fields
Expand All @@ -660,6 +662,9 @@ public static Frameworks GetMacCatalystFrameworks ()
f.Version = v14_2;
f.VersionAvailableInSimulator = v14_2;
break;
case "ThreadNetwork":
f.Version = v16_1;
break;
// These frameworks are not available on Mac Catalyst
case "OpenGLES":
case "NewsstandKit":
Expand Down