[ThreadNetwork] Added support for Xcode 14.1 b3 (#16196)

This PR adds support for Mac and MacCatalyst. Apple says that these
platforms are now supported; framework's headers does not specify them
but do not deny them either, so let's see what intro says about this.

I'm just creating this PR to test it against intro once we can build the
branch.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
This commit is contained in:
Israel Soto 2022-10-10 09:51:50 -05:00 коммит произвёл GitHub
Родитель b97e797709
Коммит 11b1d1e1c7
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
6 изменённых файлов: 10 добавлений и 44 удалений

Просмотреть файл

@ -106,6 +106,7 @@ namespace Foundation {
static IntPtr un = Dlfcn.dlopen (Constants.UserNotificationsLibrary, 1); static IntPtr un = Dlfcn.dlopen (Constants.UserNotificationsLibrary, 1);
static IntPtr il = Dlfcn.dlopen (Constants.iTunesLibraryLibrary, 1); static IntPtr il = Dlfcn.dlopen (Constants.iTunesLibraryLibrary, 1);
static IntPtr exl = Dlfcn.dlopen (Constants.ExtensionKitLibrary, 1); static IntPtr exl = Dlfcn.dlopen (Constants.ExtensionKitLibrary, 1);
static IntPtr th = Dlfcn.dlopen (Constants.ThreadNetworkLibrary, 1);
#if !NET #if !NET
[Obsolete ("Use PlatformAssembly for easier code sharing across platforms.")] [Obsolete ("Use PlatformAssembly for easier code sharing across platforms.")]

Просмотреть файл

@ -2099,6 +2099,7 @@ MACOS_FRAMEWORKS = \
Social \ Social \
Speech \ Speech \
SystemConfiguration \ SystemConfiguration \
ThreadNetwork \
UserNotifications \ UserNotifications \
UserNotificationsUI \ UserNotificationsUI \
VideoSubscriberAccount \ VideoSubscriberAccount \
@ -2398,6 +2399,7 @@ MACCATALYST_FRAMEWORKS = \
Social \ Social \
Speech \ Speech \
SystemConfiguration \ SystemConfiguration \
ThreadNetwork \
UIKit XKit \ UIKit XKit \
UserNotifications \ UserNotifications \
UserNotificationsUI \ UserNotificationsUI \

Просмотреть файл

@ -6,7 +6,7 @@ using System;
namespace ThreadNetwork { namespace ThreadNetwork {
[iOS (15,0), NoMac, NoMacCatalyst] [iOS (15,0), Mac (13,0), MacCatalyst (16,1), NoWatch, NoTV]
[BaseType (typeof (NSObject))] [BaseType (typeof (NSObject))]
interface THClient interface THClient
{ {
@ -40,7 +40,7 @@ namespace ThreadNetwork {
void CheckPreferredNetwork (NSData activeOperationalDataSet, Action<bool> completion); 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))] [BaseType (typeof (NSObject))]
[DisableDefaultCtor] [DisableDefaultCtor]
interface THCredentials : NSSecureCoding interface THCredentials : NSSecureCoding

Просмотреть файл

@ -1,21 +0,0 @@
!missing-selector! THClient::checkPreferredNetworkForActiveOperationalDataset:completion: not bound
!missing-selector! THClient::deleteCredentialsForBorderAgent:completion: not bound
!missing-selector! THClient::init not bound
!missing-selector! THClient::retrieveAllCredentials: not bound
!missing-selector! THClient::retrieveCredentialsForBorderAgent:completion: not bound
!missing-selector! THClient::retrieveCredentialsForExtendedPANID:completion: not bound
!missing-selector! THClient::retrievePreferredCredentials: not bound
!missing-selector! THClient::storeCredentialsForBorderAgent:activeOperationalDataSet:completion: not bound
!missing-selector! THCredentials::activeOperationalDataSet not bound
!missing-selector! THCredentials::borderAgentID not bound
!missing-selector! THCredentials::channel not bound
!missing-selector! THCredentials::creationDate not bound
!missing-selector! THCredentials::extendedPANID not bound
!missing-selector! THCredentials::lastModificationDate not bound
!missing-selector! THCredentials::networkKey not bound
!missing-selector! THCredentials::networkName not bound
!missing-selector! THCredentials::panID not bound
!missing-selector! THCredentials::PSKC not bound
!missing-selector! THCredentials::setChannel: not bound
!missing-type! THClient not bound
!missing-type! THCredentials not bound

Просмотреть файл

@ -1,21 +0,0 @@
!missing-selector! THClient::checkPreferredNetworkForActiveOperationalDataset:completion: not bound
!missing-selector! THClient::deleteCredentialsForBorderAgent:completion: not bound
!missing-selector! THClient::init not bound
!missing-selector! THClient::retrieveAllCredentials: not bound
!missing-selector! THClient::retrieveCredentialsForBorderAgent:completion: not bound
!missing-selector! THClient::retrieveCredentialsForExtendedPANID:completion: not bound
!missing-selector! THClient::retrievePreferredCredentials: not bound
!missing-selector! THClient::storeCredentialsForBorderAgent:activeOperationalDataSet:completion: not bound
!missing-selector! THCredentials::activeOperationalDataSet not bound
!missing-selector! THCredentials::borderAgentID not bound
!missing-selector! THCredentials::channel not bound
!missing-selector! THCredentials::creationDate not bound
!missing-selector! THCredentials::extendedPANID not bound
!missing-selector! THCredentials::lastModificationDate not bound
!missing-selector! THCredentials::networkKey not bound
!missing-selector! THCredentials::networkName not bound
!missing-selector! THCredentials::panID not bound
!missing-selector! THCredentials::PSKC not bound
!missing-selector! THCredentials::setChannel: not bound
!missing-type! THClient not bound
!missing-type! THCredentials not bound

Просмотреть файл

@ -279,6 +279,7 @@ public class Frameworks : Dictionary<string, Framework> {
{ "HealthKit", "HealthKit", 13,0 }, { "HealthKit", "HealthKit", 13,0 },
{ "SharedWithYouCore", "SharedWithYouCore", 13, 0 }, { "SharedWithYouCore", "SharedWithYouCore", 13, 0 },
{ "ExtensionKit", "ExtensionKit", 13,0 }, { "ExtensionKit", "ExtensionKit", 13,0 },
{ "ThreadNetwork", "ThreadNetwork", 13,0 },
}; };
} }
return mac_frameworks; return mac_frameworks;
@ -645,6 +646,7 @@ public class Frameworks : Dictionary<string, Framework> {
var min = new Version (13, 0); var min = new Version (13, 0);
var v14_0 = new Version (14, 0); var v14_0 = new Version (14, 0);
var v14_2 = new Version (14, 2); var v14_2 = new Version (14, 2);
var v16_1 = new Version (16, 1);
foreach (var f in catalyst_frameworks.Values) { foreach (var f in catalyst_frameworks.Values) {
switch (f.Name) { switch (f.Name) {
// These frameworks were added to Catalyst after they were added to iOS, so we have to adjust the Versions fields // These frameworks were added to Catalyst after they were added to iOS, so we have to adjust the Versions fields
@ -660,6 +662,9 @@ public class Frameworks : Dictionary<string, Framework> {
f.Version = v14_2; f.Version = v14_2;
f.VersionAvailableInSimulator = v14_2; f.VersionAvailableInSimulator = v14_2;
break; break;
case "ThreadNetwork":
f.Version = v16_1;
break;
// These frameworks are not available on Mac Catalyst // These frameworks are not available on Mac Catalyst
case "OpenGLES": case "OpenGLES":
case "NewsstandKit": case "NewsstandKit":