From 2e7f7c8c576de9c2e370cfce459179a2a79c828a Mon Sep 17 00:00:00 2001 From: Josh Yaganeh <319444+jyaganeh@users.noreply.github.com> Date: Tue, 25 Jul 2023 16:08:09 -0700 Subject: [PATCH 01/28] Add .vscode dir to .gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 5afc8311..ac7576ea 100644 --- a/.gitignore +++ b/.gitignore @@ -243,3 +243,6 @@ binderator/output # Idea folder .idea + +# VSCode folder +.vscode From 59af6282b9aa37459d2224aa4e59e95646148239 Mon Sep 17 00:00:00 2001 From: Josh Yaganeh <319444+jyaganeh@users.noreply.github.com> Date: Tue, 25 Jul 2023 16:26:11 -0700 Subject: [PATCH 02/28] Bump to Android SDK 17.0.3, cross-platform 18.0.0 --- airship.properties | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/airship.properties b/airship.properties index e40412d3..a41b44a0 100644 --- a/airship.properties +++ b/airship.properties @@ -1,12 +1,12 @@ # Airship native SDK versions iosVersion = 16.12.3 -androidVersion = 16.11.1 +androidVersion = 17.0.3 # Airship.Net cross-platform version -crossPlatformVersion = 17.1.0 +crossPlatformVersion = 18.0.0 # Filename of the iOS SDK zip file -iosFrameworkZip = Airship-Xcode14.zip +iosFrameworkZip = Airship.zip # NuGet package revision numbers # If > 0, the revision number will be added to the versions From 53104ffe681444760ec8e8186eb81fd655889819 Mon Sep 17 00:00:00 2001 From: Josh Yaganeh <319444+jyaganeh@users.noreply.github.com> Date: Tue, 25 Jul 2023 17:06:18 -0700 Subject: [PATCH 03/28] Checkpoint: android sdk 17 building --- Directory.Build.props | 8 ++--- binderator/config.json | 30 +++++++++---------- src/Airship.Net/IAirship.cs | 6 ++-- src/Airship.Net/Platforms/Android/Airship.cs | 18 ----------- src/Airship.Net/Platforms/iOS/Airship.cs | 16 ---------- .../StructsAndEnums.cs | 6 ++-- src/SharedAssemblyInfo.Common.cs | 2 +- src/SharedAssemblyInfo.CrossPlatform.cs | 2 +- src/SharedAssemblyInfo.iOS.cs | 2 +- 9 files changed, 28 insertions(+), 62 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 7f8d1b65..3db5a2a7 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -5,15 +5,15 @@ - 16.11.1 - 16.11.1 + 17.0.3 + 17.0.3 16.12.3 16.12.3 - 17.1.0 - 17.1.0 + 18.0.0 + 18.0.0 diff --git a/binderator/config.json b/binderator/config.json index 8b070fb2..14440a42 100644 --- a/binderator/config.json +++ b/binderator/config.json @@ -17,56 +17,56 @@ { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-adm", - "version": "16.11.1", - "nugetVersion": "16.11.1", + "version": "17.0.3", + "nugetVersion": "17.0.3", "nugetId": "Airship.Net.Android.Adm", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-automation", - "version": "16.11.1", - "nugetVersion": "16.11.1", + "version": "17.0.3", + "nugetVersion": "17.0.3", "nugetId": "Airship.Net.Android.Automation", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-core", - "version": "16.11.1", - "nugetVersion": "16.11.1", + "version": "17.0.3", + "nugetVersion": "17.0.3", "nugetId": "Airship.Net.Android.Core", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-fcm", - "version": "16.11.1", - "nugetVersion": "16.11.1", + "version": "17.0.3", + "nugetVersion": "17.0.3", "nugetId": "Airship.Net.Android.Fcm", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-layout", - "version": "16.11.1", - "nugetVersion": "16.11.1", + "version": "17.0.3", + "nugetVersion": "17.0.3", "nugetId": "Airship.Net.Android.Layout", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-message-center", - "version": "16.11.1", - "nugetVersion": "16.11.1", + "version": "17.0.3", + "nugetVersion": "17.0.3", "nugetId": "Airship.Net.Android.MessageCenter", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-preference-center", - "version": "16.11.1", - "nugetVersion": "16.11.1", + "version": "17.0.3", + "nugetVersion": "17.0.3", "nugetId": "Airship.Net.Android.PreferenceCenter", "dependencyOnly": false }, @@ -169,7 +169,7 @@ { "groupId": "androidx.room", "artifactId": "room-runtime", - "version": "2.5.0", + "version": "2.5.1", "nugetVersion": "2.5.0", "nugetId": "Xamarin.AndroidX.Room.Runtime", "dependencyOnly": true diff --git a/src/Airship.Net/IAirship.cs b/src/Airship.Net/IAirship.cs index 73911850..5555bc6b 100644 --- a/src/Airship.Net/IAirship.cs +++ b/src/Airship.Net/IAirship.cs @@ -53,12 +53,12 @@ public enum Features InAppAutomation = 1 << 0, MessageCenter = 1 << 1, Push = 1 << 2, - Chat = 1 << 3, + //RETIRED: Chat = 1 << 3, Analytics = 1 << 4, TagsAndAttributes = 1 << 5, Contacts = 1 << 6, - Location = 1 << 7, - All = InAppAutomation | MessageCenter | Push | Chat | Analytics | TagsAndAttributes | Contacts | Location + //RETIRED: Location = 1 << 7, + All = InAppAutomation | MessageCenter | Push | Analytics | TagsAndAttributes | Contacts } /// diff --git a/src/Airship.Net/Platforms/Android/Airship.cs b/src/Airship.Net/Platforms/Android/Airship.cs index a9ae357a..7ce80b6f 100644 --- a/src/Airship.Net/Platforms/Android/Airship.cs +++ b/src/Airship.Net/Platforms/Android/Airship.cs @@ -115,10 +115,6 @@ private static int[] UaFeaturesFromFeatures(Features features) { uAFeatures.Add(PrivacyManager.FeaturePush); } - if (features.HasFlag(Features.Chat)) - { - uAFeatures.Add(PrivacyManager.FeatureChat); - } if (features.HasFlag(Features.Analytics)) { uAFeatures.Add(PrivacyManager.FeatureAnalytics); @@ -131,10 +127,6 @@ private static int[] UaFeaturesFromFeatures(Features features) { uAFeatures.Add(PrivacyManager.FeatureContacts); } - if (features.HasFlag(Features.Location)) - { - uAFeatures.Add(PrivacyManager.FeatureLocation); - } return uAFeatures.ToArray(); } @@ -158,11 +150,6 @@ private static Features FeaturesFromUAFeatures(int uAFeatures) features |= Features.Push; } - if ((uAFeatures & PrivacyManager.FeatureChat) == PrivacyManager.FeatureChat) - { - features |= Features.Chat; - } - if ((uAFeatures & PrivacyManager.FeatureAnalytics) == PrivacyManager.FeatureAnalytics) { features |= Features.Analytics; @@ -178,11 +165,6 @@ private static Features FeaturesFromUAFeatures(int uAFeatures) features |= Features.Contacts; } - if ((uAFeatures & PrivacyManager.FeatureLocation) == PrivacyManager.FeatureLocation) - { - features |= Features.Location; - } - return features; } diff --git a/src/Airship.Net/Platforms/iOS/Airship.cs b/src/Airship.Net/Platforms/iOS/Airship.cs index a69fe4f7..730b74e0 100644 --- a/src/Airship.Net/Platforms/iOS/Airship.cs +++ b/src/Airship.Net/Platforms/iOS/Airship.cs @@ -135,10 +135,6 @@ private static UAFeatures UaFeaturesFromFeatures(Features features) { uAFeatures |= UAFeatures.Push; } - if (features.HasFlag(Features.Chat)) - { - uAFeatures |= UAFeatures.Chat; - } if (features.HasFlag(Features.Analytics)) { uAFeatures |= UAFeatures.Analytics; @@ -151,10 +147,6 @@ private static UAFeatures UaFeaturesFromFeatures(Features features) { uAFeatures |= UAFeatures.Contacts; } - if (features.HasFlag(Features.Location)) - { - uAFeatures |= UAFeatures.Location; - } return uAFeatures; } @@ -175,10 +167,6 @@ private static Features FeaturesFromUAFeatures(UAFeatures uAFeatures) { features |= Features.Push; } - if (uAFeatures.HasFlag(UAFeatures.Chat)) - { - features |= Features.Chat; - } if (uAFeatures.HasFlag(UAFeatures.Analytics)) { features |= Features.Analytics; @@ -191,10 +179,6 @@ private static Features FeaturesFromUAFeatures(UAFeatures uAFeatures) { features |= Features.Contacts; } - if (uAFeatures.HasFlag(UAFeatures.Location)) - { - features |= Features.Location; - } return features; } diff --git a/src/AirshipBindings.iOS.Basement/StructsAndEnums.cs b/src/AirshipBindings.iOS.Basement/StructsAndEnums.cs index 94c53f13..2d6b8077 100644 --- a/src/AirshipBindings.iOS.Basement/StructsAndEnums.cs +++ b/src/AirshipBindings.iOS.Basement/StructsAndEnums.cs @@ -52,12 +52,12 @@ public enum UAFeatures : ulong InAppAutomation = (1 << 0), MessageCenter = (1 << 1), Push = (1 << 2), - Chat = (1 << 3), + //RETIRED: Chat = (1 << 3), Analytics = (1 << 4), TagsAndAttributes = (1 << 5), Contacts = (1 << 6), - Location = (1 << 7), - All = (InAppAutomation | MessageCenter | Push | Chat | Analytics | TagsAndAttributes | Contacts | Location) + //RETIRED: Location = (1 << 7), + All = (InAppAutomation | MessageCenter | Push | Analytics | TagsAndAttributes | Contacts ) } [Native] diff --git a/src/SharedAssemblyInfo.Common.cs b/src/SharedAssemblyInfo.Common.cs index fc6ad942..cd8f1a30 100644 --- a/src/SharedAssemblyInfo.Common.cs +++ b/src/SharedAssemblyInfo.Common.cs @@ -6,4 +6,4 @@ // Change them to the values specific to your project. // Cross-platform version of the plugin -[assembly: UACrossPlatformVersion ("17.1.0")] +[assembly: UACrossPlatformVersion ("18.0.0")] diff --git a/src/SharedAssemblyInfo.CrossPlatform.cs b/src/SharedAssemblyInfo.CrossPlatform.cs index cea6acd9..0a21597a 100644 --- a/src/SharedAssemblyInfo.CrossPlatform.cs +++ b/src/SharedAssemblyInfo.CrossPlatform.cs @@ -12,5 +12,5 @@ // The form "{Major}.{Minor}.*" will automatically update the build and revision, // and "{Major}.{Minor}.{Build}.*" will update just the revision. -[assembly: AssemblyVersion ("17.1.0")] +[assembly: AssemblyVersion ("18.0.0")] diff --git a/src/SharedAssemblyInfo.iOS.cs b/src/SharedAssemblyInfo.iOS.cs index 1a4e5075..140fc12f 100644 --- a/src/SharedAssemblyInfo.iOS.cs +++ b/src/SharedAssemblyInfo.iOS.cs @@ -17,4 +17,4 @@ // The form "{Major}.{Minor}.*" will automatically update the build and revision, // and "{Major}.{Minor}.{Build}.*" will update just the revision. -[assembly: AssemblyVersion ("17.1.0")] +[assembly: AssemblyVersion ("18.0.0")] From 021919d2c882cfd66ad58267452369ae703a049d Mon Sep 17 00:00:00 2001 From: Josh Yaganeh <319444+jyaganeh@users.noreply.github.com> Date: Tue, 8 Aug 2023 15:32:57 -0700 Subject: [PATCH 04/28] Bump Android SDK to 17.1.0, add bindings for live-update and feature-flag modules --- Directory.Build.props | 4 +- airship.properties | 2 +- binderator/config.json | 52 ++++++++++++++----- binderator/source/AndroidProject.cshtml | 6 +++ .../Transforms/EnumFields.xml | 2 + .../Transforms/EnumMethods.xml | 2 + .../Transforms/Metadata.xml | 3 ++ .../Transforms/EnumFields.xml | 2 + .../Transforms/EnumMethods.xml | 2 + .../Transforms/Metadata.xml | 4 ++ 10 files changed, 62 insertions(+), 17 deletions(-) create mode 100644 binderator/source/com.urbanairship.android/urbanairship-feature-flag/Transforms/EnumFields.xml create mode 100644 binderator/source/com.urbanairship.android/urbanairship-feature-flag/Transforms/EnumMethods.xml create mode 100644 binderator/source/com.urbanairship.android/urbanairship-feature-flag/Transforms/Metadata.xml create mode 100644 binderator/source/com.urbanairship.android/urbanairship-live-update/Transforms/EnumFields.xml create mode 100644 binderator/source/com.urbanairship.android/urbanairship-live-update/Transforms/EnumMethods.xml create mode 100644 binderator/source/com.urbanairship.android/urbanairship-live-update/Transforms/Metadata.xml diff --git a/Directory.Build.props b/Directory.Build.props index 3db5a2a7..18409bec 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -5,8 +5,8 @@ - 17.0.3 - 17.0.3 + 17.1.0 + 17.1.0 16.12.3 16.12.3 diff --git a/airship.properties b/airship.properties index a41b44a0..ee6ea276 100644 --- a/airship.properties +++ b/airship.properties @@ -1,6 +1,6 @@ # Airship native SDK versions iosVersion = 16.12.3 -androidVersion = 17.0.3 +androidVersion = 17.1.0 # Airship.Net cross-platform version crossPlatformVersion = 18.0.0 diff --git a/binderator/config.json b/binderator/config.json index 14440a42..9cad58a9 100644 --- a/binderator/config.json +++ b/binderator/config.json @@ -17,56 +17,72 @@ { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-adm", - "version": "17.0.3", - "nugetVersion": "17.0.3", + "version": "17.1.0", + "nugetVersion": "17.1.0", "nugetId": "Airship.Net.Android.Adm", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-automation", - "version": "17.0.3", - "nugetVersion": "17.0.3", + "version": "17.1.0", + "nugetVersion": "17.1.0", "nugetId": "Airship.Net.Android.Automation", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-core", - "version": "17.0.3", - "nugetVersion": "17.0.3", + "version": "17.1.0", + "nugetVersion": "17.1.0", "nugetId": "Airship.Net.Android.Core", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-fcm", - "version": "17.0.3", - "nugetVersion": "17.0.3", + "version": "17.1.0", + "nugetVersion": "17.1.0", "nugetId": "Airship.Net.Android.Fcm", "dependencyOnly": false }, + { + "groupId": "com.urbanairship.android", + "artifactId": "urbanairship-feature-flag", + "version": "17.1.0", + "nugetVersion": "17.1.0", + "nugetId": "Airship.Net.Android.FeatureFlag", + "dependencyOnly": false + }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-layout", - "version": "17.0.3", - "nugetVersion": "17.0.3", + "version": "17.1.0", + "nugetVersion": "17.1.0", "nugetId": "Airship.Net.Android.Layout", "dependencyOnly": false }, + { + "groupId": "com.urbanairship.android", + "artifactId": "urbanairship-live-update", + "version": "17.1.0", + "nugetVersion": "17.1.0", + "nugetId": "Airship.Net.Android.LiveUpdate", + "dependencyOnly": false + }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-message-center", - "version": "17.0.3", - "nugetVersion": "17.0.3", + "version": "17.1.0", + "nugetVersion": "17.1.0", "nugetId": "Airship.Net.Android.MessageCenter", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-preference-center", - "version": "17.0.3", - "nugetVersion": "17.0.3", + "version": "17.1.0", + "nugetVersion": "17.1.0", "nugetId": "Airship.Net.Android.PreferenceCenter", "dependencyOnly": false }, @@ -166,6 +182,14 @@ "nugetId": "Xamarin.AndroidX.RecyclerView", "dependencyOnly": true }, + { + "groupId": "androidx.room", + "artifactId": "room-ktx", + "version": "2.5.1", + "nugetVersion": "2.5.0", + "nugetId": "Xamarin.AndroidX.Room.Room.Ktx", + "dependencyOnly": true + }, { "groupId": "androidx.room", "artifactId": "room-runtime", diff --git a/binderator/source/AndroidProject.cshtml b/binderator/source/AndroidProject.cshtml index 78da2883..5a790bea 100644 --- a/binderator/source/AndroidProject.cshtml +++ b/binderator/source/AndroidProject.cshtml @@ -39,6 +39,12 @@ case "urbanairship-automation": title += " - Automation"; break; + case "urbanairship-live-update": + title += " - Live Updates"; + break; + case "urbanairship-feature-flag": + title += " - Feature Flags"; + break; case "urbanairship-layout": case "urbanairship-core": // Use default title diff --git a/binderator/source/com.urbanairship.android/urbanairship-feature-flag/Transforms/EnumFields.xml b/binderator/source/com.urbanairship.android/urbanairship-feature-flag/Transforms/EnumFields.xml new file mode 100644 index 00000000..e54ee5d7 --- /dev/null +++ b/binderator/source/com.urbanairship.android/urbanairship-feature-flag/Transforms/EnumFields.xml @@ -0,0 +1,2 @@ + + diff --git a/binderator/source/com.urbanairship.android/urbanairship-feature-flag/Transforms/EnumMethods.xml b/binderator/source/com.urbanairship.android/urbanairship-feature-flag/Transforms/EnumMethods.xml new file mode 100644 index 00000000..daf6aa04 --- /dev/null +++ b/binderator/source/com.urbanairship.android/urbanairship-feature-flag/Transforms/EnumMethods.xml @@ -0,0 +1,2 @@ + + diff --git a/binderator/source/com.urbanairship.android/urbanairship-feature-flag/Transforms/Metadata.xml b/binderator/source/com.urbanairship.android/urbanairship-feature-flag/Transforms/Metadata.xml new file mode 100644 index 00000000..eadc4685 --- /dev/null +++ b/binderator/source/com.urbanairship.android/urbanairship-feature-flag/Transforms/Metadata.xml @@ -0,0 +1,3 @@ + + + diff --git a/binderator/source/com.urbanairship.android/urbanairship-live-update/Transforms/EnumFields.xml b/binderator/source/com.urbanairship.android/urbanairship-live-update/Transforms/EnumFields.xml new file mode 100644 index 00000000..e54ee5d7 --- /dev/null +++ b/binderator/source/com.urbanairship.android/urbanairship-live-update/Transforms/EnumFields.xml @@ -0,0 +1,2 @@ + + diff --git a/binderator/source/com.urbanairship.android/urbanairship-live-update/Transforms/EnumMethods.xml b/binderator/source/com.urbanairship.android/urbanairship-live-update/Transforms/EnumMethods.xml new file mode 100644 index 00000000..daf6aa04 --- /dev/null +++ b/binderator/source/com.urbanairship.android/urbanairship-live-update/Transforms/EnumMethods.xml @@ -0,0 +1,2 @@ + + diff --git a/binderator/source/com.urbanairship.android/urbanairship-live-update/Transforms/Metadata.xml b/binderator/source/com.urbanairship.android/urbanairship-live-update/Transforms/Metadata.xml new file mode 100644 index 00000000..edd7d696 --- /dev/null +++ b/binderator/source/com.urbanairship.android/urbanairship-live-update/Transforms/Metadata.xml @@ -0,0 +1,4 @@ + + + + From bc9b680743ab4680b62de482cd9b6665d8e6b23c Mon Sep 17 00:00:00 2001 From: Josh Yaganeh <319444+jyaganeh@users.noreply.github.com> Date: Thu, 10 Aug 2023 13:52:36 -0700 Subject: [PATCH 05/28] Wire up push notification status listener on Android --- MauiSample.sln | 38 +++++++++-- MauiSample/HomePageViewModel.cs | 7 +- MauiSample/MauiSample.csproj | 14 +++- src/Airship.Net/IAirship.cs | 70 ++++++++++++++++++-- src/Airship.Net/Platforms/Android/Airship.cs | 19 ++++-- src/Airship.Net/Platforms/iOS/Airship.cs | 14 ++-- 6 files changed, 133 insertions(+), 29 deletions(-) diff --git a/MauiSample.sln b/MauiSample.sln index 2e6e10b2..6517acd4 100644 --- a/MauiSample.sln +++ b/MauiSample.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 17.0.31611.283 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MauiSample", "MauiSample\MauiSample.csproj", "{470DEC7C-2A77-4E92-8A30-DA52911D9FB2}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MauiSample", "MauiSample\MauiSample.csproj", "{470DEC7C-2A77-4E92-8A30-DA52911D9FB2}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.Android.Core", "binderator\generated\Airship.Net.Android.Core\Airship.Net.Android.Core.csproj", "{F4969C3B-C442-4450-9A4D-D810B200573C}" EndProject @@ -15,19 +15,27 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.Android.Automat EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.Android.Fcm", "binderator\generated\Airship.Net.Android.Fcm\Airship.Net.Android.Fcm.csproj", "{1E429BBE-C098-4608-BE2E-5BCFBD50D6E5}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.iOS.Basement", "src\AirshipBindings.iOS.Basement\AirshipBindings.iOS.Basement.csproj", "{5E85A7FD-8C42-4DE6-B002-E3CC2DA529C7}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirshipBindings.iOS.Basement", "src\AirshipBindings.iOS.Basement\AirshipBindings.iOS.Basement.csproj", "{5E85A7FD-8C42-4DE6-B002-E3CC2DA529C7}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.iOS.Core", "src\AirshipBindings.iOS.Core\AirshipBindings.iOS.Core.csproj", "{7F49C0FA-F958-44CF-9246-8B8577748E6F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirshipBindings.iOS.Core", "src\AirshipBindings.iOS.Core\AirshipBindings.iOS.Core.csproj", "{7F49C0FA-F958-44CF-9246-8B8577748E6F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.iOS.Automation", "src\AirshipBindings.iOS.Automation\AirshipBindings.iOS.Automation.csproj", "{70434FB5-A468-4777-9478-DD2AB80BE0E2}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirshipBindings.iOS.Automation", "src\AirshipBindings.iOS.Automation\AirshipBindings.iOS.Automation.csproj", "{70434FB5-A468-4777-9478-DD2AB80BE0E2}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.iOS.MessageCenter", "src\AirshipBindings.iOS.MessageCenter\AirshipBindings.iOS.MessageCenter.csproj", "{AC22EEC5-DCA6-49D3-8B37-533B5565E2CF}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirshipBindings.iOS.MessageCenter", "src\AirshipBindings.iOS.MessageCenter\AirshipBindings.iOS.MessageCenter.csproj", "{AC22EEC5-DCA6-49D3-8B37-533B5565E2CF}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.iOS.ExtendedActions", "src\AirshipBindings.iOS.ExtendedActions\AirshipBindings.iOS.ExtendedActions.csproj", "{BFFFE653-04CD-4563-BF2D-B6F31349F30D}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirshipBindings.iOS.ExtendedActions", "src\AirshipBindings.iOS.ExtendedActions\AirshipBindings.iOS.ExtendedActions.csproj", "{BFFFE653-04CD-4563-BF2D-B6F31349F30D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.Android.PreferenceCenter", "binderator\generated\Airship.Net.Android.PreferenceCenter\Airship.Net.Android.PreferenceCenter.csproj", "{D20DD1BB-7DF5-49C8-B8C1-E0905D273203}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.iOS.PreferenceCenter", "src\AirshipBindings.iOS.PreferenceCenter\AirshipBindings.iOS.PreferenceCenter.csproj", "{13E9ACF2-4FE5-4FA6-96C4-BDFB6FF7C3A0}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirshipBindings.iOS.PreferenceCenter", "src\AirshipBindings.iOS.PreferenceCenter\AirshipBindings.iOS.PreferenceCenter.csproj", "{13E9ACF2-4FE5-4FA6-96C4-BDFB6FF7C3A0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.Android.LiveUpdate", "binderator\generated\Airship.Net.Android.LiveUpdate\Airship.Net.Android.LiveUpdate.csproj", "{A7F248E6-9C79-4267-9779-2CB3AEFAD359}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.Android.FeatureFlag", "binderator\generated\Airship.Net.Android.FeatureFlag\Airship.Net.Android.FeatureFlag.csproj", "{16AA94F3-6A70-49EB-A82C-FDD7BBC9DFD8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net", "src\Airship.Net\Airship.Net.csproj", "{C5F41BE2-E93A-40DA-BB41-5095249363F7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.MessageCenter", "src\Airship.Net.MessageCenter\Airship.Net.MessageCenter.csproj", "{4E15CB6E-1C86-47DF-8A8E-5BA7949E04B9}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -89,6 +97,22 @@ Global {13E9ACF2-4FE5-4FA6-96C4-BDFB6FF7C3A0}.Debug|Any CPU.Build.0 = Debug|Any CPU {13E9ACF2-4FE5-4FA6-96C4-BDFB6FF7C3A0}.Release|Any CPU.ActiveCfg = Release|Any CPU {13E9ACF2-4FE5-4FA6-96C4-BDFB6FF7C3A0}.Release|Any CPU.Build.0 = Release|Any CPU + {A7F248E6-9C79-4267-9779-2CB3AEFAD359}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A7F248E6-9C79-4267-9779-2CB3AEFAD359}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A7F248E6-9C79-4267-9779-2CB3AEFAD359}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A7F248E6-9C79-4267-9779-2CB3AEFAD359}.Release|Any CPU.Build.0 = Release|Any CPU + {16AA94F3-6A70-49EB-A82C-FDD7BBC9DFD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {16AA94F3-6A70-49EB-A82C-FDD7BBC9DFD8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {16AA94F3-6A70-49EB-A82C-FDD7BBC9DFD8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {16AA94F3-6A70-49EB-A82C-FDD7BBC9DFD8}.Release|Any CPU.Build.0 = Release|Any CPU + {C5F41BE2-E93A-40DA-BB41-5095249363F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C5F41BE2-E93A-40DA-BB41-5095249363F7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C5F41BE2-E93A-40DA-BB41-5095249363F7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C5F41BE2-E93A-40DA-BB41-5095249363F7}.Release|Any CPU.Build.0 = Release|Any CPU + {4E15CB6E-1C86-47DF-8A8E-5BA7949E04B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4E15CB6E-1C86-47DF-8A8E-5BA7949E04B9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4E15CB6E-1C86-47DF-8A8E-5BA7949E04B9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4E15CB6E-1C86-47DF-8A8E-5BA7949E04B9}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/MauiSample/HomePageViewModel.cs b/MauiSample/HomePageViewModel.cs index aaeb5d71..1b6929ad 100644 --- a/MauiSample/HomePageViewModel.cs +++ b/MauiSample/HomePageViewModel.cs @@ -62,7 +62,7 @@ public HomePageViewModel() OnPrefCenterButtonClicked = new Command(PerformOnPrefCenterButtonClicked); Airship.Instance.OnChannelCreation += OnChannelEvent; - Airship.Instance.OnChannelUpdate += OnChannelEvent; + Airship.Instance.OnPushNotificationStatusUpdate += OnPushNotificationStatusEvent; Refresh(); } @@ -70,11 +70,12 @@ public HomePageViewModel() ~HomePageViewModel() { Airship.Instance.OnChannelCreation -= OnChannelEvent; - Airship.Instance.OnChannelUpdate -= OnChannelEvent; } private void OnChannelEvent(object sender, EventArgs e) => Refresh(); - + + private void OnPushNotificationStatusEvent(object sender, EventArgs e) => Refresh(); + public void Refresh() { ChannelId = Airship.Instance.ChannelId; diff --git a/MauiSample/MauiSample.csproj b/MauiSample/MauiSample.csproj index d0897cff..cce7ec19 100644 --- a/MauiSample/MauiSample.csproj +++ b/MauiSample/MauiSample.csproj @@ -47,11 +47,19 @@ - false + true + + true + false + 4 + + + 2G + @@ -73,6 +81,8 @@ + + @@ -98,6 +108,8 @@ + + diff --git a/src/Airship.Net/IAirship.cs b/src/Airship.Net/IAirship.cs index 5555bc6b..67b3fe79 100644 --- a/src/Airship.Net/IAirship.cs +++ b/src/Airship.Net/IAirship.cs @@ -1,5 +1,6 @@ /* Copyright Airship and Contributors */ +using System; using AirshipDotNet.Attributes; using AirshipDotNet.Channel; @@ -7,7 +8,7 @@ namespace AirshipDotNet { /// - /// Arguments for Channel creation and update events. + /// Arguments for Channel creation events. /// public class ChannelEventArgs : EventArgs { @@ -19,6 +20,67 @@ public ChannelEventArgs(string channelId) } } + /// + /// Arguments for push notification status update events. + /// + public class PushNotificationStatusEventArgs : EventArgs + { + /// + /// Indicatees whether user notifications are enabled via PushManager. + /// + /// + /// true if user notifications are enabled, else false. + /// + public bool IsUserNotificationsEnabled { get; private set; } + + /// + /// Indicates whether notifications are allowed for the application at the system level. + /// + /// + /// true if notifications are allowed, else false. + /// + public bool AreNotificationsAllowed { get; private set; } + + /// + /// Indicates whether Features.Push is enabled via PrivacyManager. + /// + /// + /// true if the push feature is enabled, else false. + /// + public bool IsPushPrivacyFeatureEnabled { get; private set; } + + /// + /// Indicates whether the application has successfully registered a push token. + /// + /// + /// true if a token was received and registered, else false. + /// + public bool IsPushTokenRegistered { get; private set; } + + /// + /// Checks if IsUserNotificationsEnabled, AreNotificationsAllowed, and IsPushPrivacyFeatureEnabled is enabled. + /// + public bool IsUserOptedIn { get; private set; } + + /// + /// Checks if IsUserOptedIn and IsPushTokenRegistered is enabled. + /// + public bool IsOptIn { get; private set; } + + /// + /// Creates push notification status event args. + /// + public PushNotificationStatusEventArgs(bool isUserNotificationsEnabled, bool areNotificationsAllowed, bool isPushPrivacyFeatureEnabled, bool isPushTokenRegistered, bool isUserOptedIn, bool isOptIn) + { + IsUserNotificationsEnabled = isUserNotificationsEnabled; + AreNotificationsAllowed = areNotificationsAllowed; + IsPushPrivacyFeatureEnabled = isPushPrivacyFeatureEnabled; + IsPushTokenRegistered = isPushTokenRegistered; + IsUserOptedIn = isUserOptedIn; + IsOptIn = isOptIn; + } + } + /// /// Arguments for deep link events. /// @@ -128,10 +190,10 @@ public interface IAirship event EventHandler OnChannelCreation; /// - /// Add/remove the channel update event listener. + /// Add/remove the push notification status listener. /// - /// The channel update event listener. - event EventHandler OnChannelUpdate; + /// The push notification status listener. + event EventHandler OnPushNotificationStatusUpdate; /// /// Add/remove the deep link event listener. diff --git a/src/Airship.Net/Platforms/Android/Airship.cs b/src/Airship.Net/Platforms/Android/Airship.cs index 7ce80b6f..41875263 100644 --- a/src/Airship.Net/Platforms/Android/Airship.cs +++ b/src/Airship.Net/Platforms/Android/Airship.cs @@ -7,6 +7,7 @@ using UrbanAirship.Actions; using UrbanAirship.Channel; using UrbanAirship.MessageCenter; +using UrbanAirship.Push; using AttributeEditor = AirshipDotNet.Attributes.AttributeEditor; namespace AirshipDotNet @@ -14,7 +15,7 @@ namespace AirshipDotNet /// /// Provides cross-platform access to a common subset of functionality between the iOS and Android SDKs /// - public class Airship : Java.Lang.Object, IDeepLinkListener, IAirship, IInboxListener, MessageCenterClass.IOnShowMessageCenterListener, IAirshipChannelListener + public class Airship : Java.Lang.Object, IDeepLinkListener, IAirship, IInboxListener, MessageCenterClass.IOnShowMessageCenterListener, IAirshipChannelListener, IPushNotificationStatusListener { private static readonly Lazy sharedAirship = new(() => { @@ -29,11 +30,13 @@ private void Init() //Adding Inbox updated listener MessageCenterClass.Shared().Inbox.AddListener(this); + + UAirship.Shared().PushManager.AddNotificationStatusListener(this); } public event EventHandler? OnChannelCreation; - public event EventHandler? OnChannelUpdate; + public event EventHandler? OnPushNotificationStatusUpdate; private EventHandler? onDeepLinkReceived; public event EventHandler OnDeepLinkReceived @@ -473,7 +476,15 @@ public bool OnShowMessageCenter(string? messageId) public void OnInboxUpdated() => OnMessageCenterUpdated?.Invoke(this, EventArgs.Empty); public void OnChannelCreated(string channelId) => OnChannelCreation?.Invoke(this, new ChannelEventArgs(channelId)); - - public void OnChannelUpdated(string channelId) => OnChannelUpdate?.Invoke(this, new ChannelEventArgs(channelId)); + + public void OnChange(PushNotificationStatus status) => OnPushNotificationStatusUpdate?.Invoke(this, + new PushNotificationStatusEventArgs( + status.IsUserNotificationsEnabled, + status.AreNotificationsAllowed, + status.IsPushPrivacyFeatureEnabled, + status.IsPushTokenRegistered, + status.IsUserOptedIn, + status.IsOptIn) + ); } } diff --git a/src/Airship.Net/Platforms/iOS/Airship.cs b/src/Airship.Net/Platforms/iOS/Airship.cs index 730b74e0..3f499410 100644 --- a/src/Airship.Net/Platforms/iOS/Airship.cs +++ b/src/Airship.Net/Platforms/iOS/Airship.cs @@ -35,15 +35,9 @@ private void Initialize() } }); - NSNotificationCenter.DefaultCenter.AddObserver(aName: (NSString)UAChannel.ChannelUpdatedEvent, (NSNotification notification) => - { - var userInfo = notification.UserInfo; - if (userInfo is not null) - { - var channelID = userInfo[UAChannel.ChannelIdentifierKey].ToString(); - OnChannelUpdate?.Invoke(this, new ChannelEventArgs(channelID)); - } - }); + // TODO(18.0.0): Observe updates from Push notificationStatusPublisher and + // wire up to OnPushNotificationStatusUpdate once iOS SDK bindings have been updated + //Adding Inbox updated Listener NSNotificationCenter.DefaultCenter.AddObserver(aName: (NSString)"com.urbanairship.notification.message_list_updated", (notification) => @@ -54,7 +48,7 @@ private void Initialize() public event EventHandler? OnChannelCreation; - public event EventHandler? OnChannelUpdate; + public event EventHandler? OnPushNotificationStatusUpdate; private EventHandler? onDeepLinkReceived; public event EventHandler OnDeepLinkReceived From 0842452ac56dd959c5b7bfe34811613f45bf45b9 Mon Sep 17 00:00:00 2001 From: Josh Yaganeh <319444+jyaganeh@users.noreply.github.com> Date: Thu, 10 Aug 2023 14:17:17 -0700 Subject: [PATCH 06/28] Revert UseProjectReferences setting in MauiSample.csproj --- MauiSample/MauiSample.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MauiSample/MauiSample.csproj b/MauiSample/MauiSample.csproj index cce7ec19..7fa33d96 100644 --- a/MauiSample/MauiSample.csproj +++ b/MauiSample/MauiSample.csproj @@ -47,7 +47,7 @@ - true + false From 94577a21a9ed8a1a0c18ad1bfc7745f9c7dbbf15 Mon Sep 17 00:00:00 2001 From: khmMouna Date: Fri, 20 Oct 2023 14:22:58 +0200 Subject: [PATCH 07/28] Update to latest SDK version --- Cartfile | 2 +- Directory.Build.props | 8 ++++---- airship.properties | 4 ++-- binderator/config.json | 36 ++++++++++++++++++------------------ 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Cartfile b/Cartfile index 855e37f8..43f46aed 100644 --- a/Cartfile +++ b/Cartfile @@ -1 +1 @@ -github "urbanairship/ios-library" == 16.12.3 +github "urbanairship/ios-library" == 17.5.1 diff --git a/Directory.Build.props b/Directory.Build.props index 18409bec..3ba9f176 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -5,11 +5,11 @@ - 17.1.0 - 17.1.0 + 17.4.0 + 17.4.0 - 16.12.3 - 16.12.3 + 17.5.1 + 17.5.1 18.0.0 diff --git a/airship.properties b/airship.properties index ee6ea276..ce392560 100644 --- a/airship.properties +++ b/airship.properties @@ -1,6 +1,6 @@ # Airship native SDK versions -iosVersion = 16.12.3 -androidVersion = 17.1.0 +iosVersion = 17.5.1 +androidVersion = 17.4.0 # Airship.Net cross-platform version crossPlatformVersion = 18.0.0 diff --git a/binderator/config.json b/binderator/config.json index 9cad58a9..27db2174 100644 --- a/binderator/config.json +++ b/binderator/config.json @@ -17,72 +17,72 @@ { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-adm", - "version": "17.1.0", - "nugetVersion": "17.1.0", + "version": "17.4.0", + "nugetVersion": "17.4.0", "nugetId": "Airship.Net.Android.Adm", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-automation", - "version": "17.1.0", - "nugetVersion": "17.1.0", + "version": "17.4.0", + "nugetVersion": "17.4.0", "nugetId": "Airship.Net.Android.Automation", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-core", - "version": "17.1.0", - "nugetVersion": "17.1.0", + "version": "17.4.0", + "nugetVersion": "17.4.0", "nugetId": "Airship.Net.Android.Core", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-fcm", - "version": "17.1.0", - "nugetVersion": "17.1.0", + "version": "17.4.0", + "nugetVersion": "17.4.0", "nugetId": "Airship.Net.Android.Fcm", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-feature-flag", - "version": "17.1.0", - "nugetVersion": "17.1.0", + "version": "17.4.0", + "nugetVersion": "17.4.0", "nugetId": "Airship.Net.Android.FeatureFlag", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-layout", - "version": "17.1.0", - "nugetVersion": "17.1.0", + "version": "17.4.0", + "nugetVersion": "17.4.0", "nugetId": "Airship.Net.Android.Layout", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-live-update", - "version": "17.1.0", - "nugetVersion": "17.1.0", + "version": "17.4.0", + "nugetVersion": "17.4.0", "nugetId": "Airship.Net.Android.LiveUpdate", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-message-center", - "version": "17.1.0", - "nugetVersion": "17.1.0", + "version": "17.4.0", + "nugetVersion": "17.4.0", "nugetId": "Airship.Net.Android.MessageCenter", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-preference-center", - "version": "17.1.0", - "nugetVersion": "17.1.0", + "version": "17.4.0", + "nugetVersion": "17.4.0", "nugetId": "Airship.Net.Android.PreferenceCenter", "dependencyOnly": false }, From 1e79002e149e810771355c9e0e2ba0d3b5926155 Mon Sep 17 00:00:00 2001 From: khmMouna Date: Fri, 20 Oct 2023 15:44:58 +0200 Subject: [PATCH 08/28] Update iOS binding Remove ExtededActions module Update sample app --- MauiSample.sln | 6 - MauiSample/AppShell.xaml | 7 + MauiSample/FeaturesViewController.xaml | 58 + MauiSample/FeaturesViewController.xaml.cs | 95 + MauiSample/MauiSample.csproj | 4 +- MauiSample/MessageCenterPage.xaml.cs | 21 +- MauiSample/PushSettingsViewController.xaml | 72 + MauiSample/PushSettingsViewController.xaml.cs | 86 + .../Handlers/MessageViewHandler.iOS.cs | 120 +- .../ChannelSubscriptionListsEditor.cs | 67 + .../ContactSubscriptionListEditor.cs | 75 + src/Airship.Net/IAirship.cs | 64 +- src/Airship.Net/Platforms/Android/Airship.cs | 240 +- src/Airship.Net/Platforms/iOS/Airship.cs | 447 +- .../ApiDefinitions.cs | 43 +- .../ApiDefinitions.cs | 295 +- .../StructsAndEnums.cs | 15 +- .../ApiDefinitions.cs | 6170 ++++++++--------- .../StructsAndEnums.cs | 159 +- ...AirshipBindings.iOS.ExtendedActions.csproj | 61 - .../AirshipBindings.iOS.ExtendedActions.sln | 29 - .../AirshipExtendedActions.cs | 17 - .../ApiDefinitions.cs | 44 - .../StructsAndEnums.cs | 11 - .../build.gradle | 22 - .../ApiDefinitions.cs | 723 +- .../StructsAndEnums.cs | 17 +- .../ApiDefinitions.cs | 948 +-- .../StructsAndEnums.cs | 53 +- 29 files changed, 4787 insertions(+), 5182 deletions(-) create mode 100644 MauiSample/FeaturesViewController.xaml create mode 100644 MauiSample/FeaturesViewController.xaml.cs create mode 100644 MauiSample/PushSettingsViewController.xaml create mode 100644 MauiSample/PushSettingsViewController.xaml.cs create mode 100644 src/Airship.Net/ChannelSubscriptionListsEditor.cs create mode 100644 src/Airship.Net/ContactSubscriptionListEditor.cs delete mode 100644 src/AirshipBindings.iOS.ExtendedActions/AirshipBindings.iOS.ExtendedActions.csproj delete mode 100644 src/AirshipBindings.iOS.ExtendedActions/AirshipBindings.iOS.ExtendedActions.sln delete mode 100644 src/AirshipBindings.iOS.ExtendedActions/AirshipExtendedActions.cs delete mode 100644 src/AirshipBindings.iOS.ExtendedActions/ApiDefinitions.cs delete mode 100644 src/AirshipBindings.iOS.ExtendedActions/StructsAndEnums.cs delete mode 100644 src/AirshipBindings.iOS.ExtendedActions/build.gradle diff --git a/MauiSample.sln b/MauiSample.sln index 6517acd4..dd922ee4 100644 --- a/MauiSample.sln +++ b/MauiSample.sln @@ -23,8 +23,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirshipBindings.iOS.Automat EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirshipBindings.iOS.MessageCenter", "src\AirshipBindings.iOS.MessageCenter\AirshipBindings.iOS.MessageCenter.csproj", "{AC22EEC5-DCA6-49D3-8B37-533B5565E2CF}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirshipBindings.iOS.ExtendedActions", "src\AirshipBindings.iOS.ExtendedActions\AirshipBindings.iOS.ExtendedActions.csproj", "{BFFFE653-04CD-4563-BF2D-B6F31349F30D}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.Android.PreferenceCenter", "binderator\generated\Airship.Net.Android.PreferenceCenter\Airship.Net.Android.PreferenceCenter.csproj", "{D20DD1BB-7DF5-49C8-B8C1-E0905D273203}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirshipBindings.iOS.PreferenceCenter", "src\AirshipBindings.iOS.PreferenceCenter\AirshipBindings.iOS.PreferenceCenter.csproj", "{13E9ACF2-4FE5-4FA6-96C4-BDFB6FF7C3A0}" @@ -85,10 +83,6 @@ Global {AC22EEC5-DCA6-49D3-8B37-533B5565E2CF}.Debug|Any CPU.Build.0 = Debug|Any CPU {AC22EEC5-DCA6-49D3-8B37-533B5565E2CF}.Release|Any CPU.ActiveCfg = Release|Any CPU {AC22EEC5-DCA6-49D3-8B37-533B5565E2CF}.Release|Any CPU.Build.0 = Release|Any CPU - {BFFFE653-04CD-4563-BF2D-B6F31349F30D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BFFFE653-04CD-4563-BF2D-B6F31349F30D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BFFFE653-04CD-4563-BF2D-B6F31349F30D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BFFFE653-04CD-4563-BF2D-B6F31349F30D}.Release|Any CPU.Build.0 = Release|Any CPU {D20DD1BB-7DF5-49C8-B8C1-E0905D273203}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D20DD1BB-7DF5-49C8-B8C1-E0905D273203}.Debug|Any CPU.Build.0 = Debug|Any CPU {D20DD1BB-7DF5-49C8-B8C1-E0905D273203}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/MauiSample/AppShell.xaml b/MauiSample/AppShell.xaml index 604af4b2..d6aaab44 100644 --- a/MauiSample/AppShell.xaml +++ b/MauiSample/AppShell.xaml @@ -19,6 +19,13 @@ Icon="icon_inbox.png" ContentTemplate="{DataTemplate local:MessageCenterPage}" Route="Inbox" /> + + + diff --git a/MauiSample/FeaturesViewController.xaml b/MauiSample/FeaturesViewController.xaml new file mode 100644 index 00000000..6cdc942d --- /dev/null +++ b/MauiSample/FeaturesViewController.xaml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MauiSample/FeaturesViewController.xaml.cs b/MauiSample/FeaturesViewController.xaml.cs new file mode 100644 index 00000000..6d454f38 --- /dev/null +++ b/MauiSample/FeaturesViewController.xaml.cs @@ -0,0 +1,95 @@ +using AirshipDotNet; + +namespace MauiSample; + +public partial class FeaturesViewController : ContentPage +{ + public FeaturesViewController() + { + InitializeComponent(); + } + + protected override void OnAppearing() + { + base.OnAppearing(); + enabledPushFeatureSwitch.On = Airship.Instance.IsFeatureEnabled(Features.Push); + enableMessageCenterFeatureSwitch.On = Airship.Instance.IsFeatureEnabled(Features.MessageCenter); + enableInAppAutomationFeatureSwitch.On = Airship.Instance.IsFeatureEnabled(Features.InAppAutomation); + EnableAnalyticsFeatureSwitch.On = Airship.Instance.IsFeatureEnabled(Features.Analytics); + enableTagsAndAttributesFeatureSwitch.On = Airship.Instance.IsFeatureEnabled(Features.TagsAndAttributes); + enableContactsFeatureSwitch.On = Airship.Instance.IsFeatureEnabled(Features.Contacts); + } + + void enablePushFeature_OnChanged(object sender, EventArgs e) + { + if (enabledPushFeatureSwitch.On) + { + Airship.Instance.EnableFeatures(Features.Push); + } + else + { + Airship.Instance.DisableFeatures(Features.Push); + } + } + + void enableMessageCenterFeature_OnChanged(object sender, EventArgs e) + { + if (enableMessageCenterFeatureSwitch.On) + { + Airship.Instance.EnableFeatures(Features.MessageCenter); + } + else + { + Airship.Instance.DisableFeatures(Features.MessageCenter); + } + } + + void enableInAppAutomationFeature_OnChanged(object sender, EventArgs e) + { + if (enableInAppAutomationFeatureSwitch.On) + { + Airship.Instance.EnableFeatures(Features.InAppAutomation); + } + else + { + Airship.Instance.DisableFeatures(Features.InAppAutomation); + } + } + + void enableAnalyticsFeature_OnChanged(object sender, EventArgs e) + { + if (EnableAnalyticsFeatureSwitch.On) + { + Airship.Instance.EnableFeatures(Features.Analytics); + } + else + { + Airship.Instance.DisableFeatures(Features.Analytics); + } + } + + void enableTagsAndAttributesFeature_OnChanged(object sender, EventArgs e) + { + if (enableTagsAndAttributesFeatureSwitch.On) + { + Airship.Instance.EnableFeatures(Features.TagsAndAttributes); + } + else + { + Airship.Instance.DisableFeatures(Features.TagsAndAttributes); + } + } + + void enableContactsFeature_OnChanged(object sender, EventArgs e) + { + if (enableContactsFeatureSwitch.On) + { + Airship.Instance.EnableFeatures(Features.Contacts); + } + else + { + Airship.Instance.DisableFeatures(Features.Contacts); + } + } + +} diff --git a/MauiSample/MauiSample.csproj b/MauiSample/MauiSample.csproj index 7fa33d96..903a5ef6 100644 --- a/MauiSample/MauiSample.csproj +++ b/MauiSample/MauiSample.csproj @@ -17,8 +17,8 @@ 1.0 1 - 13.0 - 21.0 + 14.0 + 31.0 True diff --git a/MauiSample/MessageCenterPage.xaml.cs b/MauiSample/MessageCenterPage.xaml.cs index 9ccbed3a..3501ac4c 100644 --- a/MauiSample/MessageCenterPage.xaml.cs +++ b/MauiSample/MessageCenterPage.xaml.cs @@ -2,6 +2,7 @@ using AirshipDotNet; using AirshipDotNet.MessageCenter; using AirshipDotNet.MessageCenter.Controls; +using Microsoft.Maui.Controls; namespace MauiSample; @@ -10,14 +11,14 @@ public partial class MessageCenterPage : ContentPage public ICommand RefreshCommand { private set; get; } public MessageCenterPage() - { - InitializeComponent(); + { + InitializeComponent(); - RefreshCommand = new Command( - execute: () => Refresh(), - canExecute: () => !refreshView.IsRefreshing - ); - } + RefreshCommand = new Command( + execute: () => Refresh(), + canExecute: () => !refreshView.IsRefreshing + ); + } protected override void OnAppearing() { @@ -27,9 +28,9 @@ protected override void OnAppearing() public void Refresh() { - Airship.Instance.FetchInboxMessages(success => + Airship.Instance.InboxMessages(messages => { - listView.ItemsSource = Airship.Instance.InboxMessages; + listView.ItemsSource = messages; refreshView.IsRefreshing = false; }); } @@ -70,4 +71,4 @@ private void onLoadFailed(object sender, MessageLoadFailedEventArgs e) { Console.WriteLine("MessageCenterPage onLoadFailed was reached."); } -} +} \ No newline at end of file diff --git a/MauiSample/PushSettingsViewController.xaml b/MauiSample/PushSettingsViewController.xaml new file mode 100644 index 00000000..7e84d4c6 --- /dev/null +++ b/MauiSample/PushSettingsViewController.xaml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + CapitalizeNone + + + + + + + + + + + + + + CapitalizeNone + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MauiSample/PushSettingsViewController.xaml.cs b/MauiSample/PushSettingsViewController.xaml.cs new file mode 100644 index 00000000..74526ca9 --- /dev/null +++ b/MauiSample/PushSettingsViewController.xaml.cs @@ -0,0 +1,86 @@ +using AirshipDotNet; + +namespace MauiSample; + +public partial class PushSettingsViewController : ContentPage +{ + public PushSettingsViewController() + { + InitializeComponent(); + } + + protected override void OnAppearing() + { + base.OnAppearing(); + enabledPushSwitch.On = Airship.Instance.UserNotificationsEnabled; + channelId.Detail = Airship.Instance.ChannelId != null ? Airship.Instance.ChannelId : ""; + UpdateNamedUser(); + UpdateTagsCell(); + } + + void displayFeatures(object sender, EventArgs e) + { + Navigation.PushAsync(new FeaturesViewController()); + } + + void enablePush_OnChanged(object sender, EventArgs e) + { + Airship.Instance.UserNotificationsEnabled = enabledPushSwitch.On; + } + + void CopyChannelID(object sender, EventArgs e) + { + if (Airship.Instance.ChannelId != null) + { + Clipboard.Default.SetTextAsync(Airship.Instance.ChannelId); + DisplayAlert("Alert", "Channel ID copied to clipboard!", "OK"); + } + } + + void AddNamedUser(object sender, EventArgs e) + { + if (namedUserLabel.Text == null) + { + Airship.Instance.ResetContact(); + } + else + { + Airship.Instance.IdentifyContact(namedUserLabel.Text); + } + UpdateNamedUser(); + DisplayAlert("Alert", "Named user added successufully", "OK"); + } + + void AddTag(object sender, EventArgs e) + { + string tagToAdd = tagLabel.Text; + Airship.Instance.EditDeviceTags() + .AddTags(new string[] { tagToAdd }) + .Apply(); + UpdateTagsCell(); + } + + void UpdateTagsCell() + { + tagLabel.Text = ""; + IEnumerable tags = Airship.Instance.Tags; + + string str = ""; + foreach (string tag in tags) + { + str = str + tag + "\n"; + } + tagsList.Text = str; + } + + void UpdateNamedUser() + { + namedUserLabel.Text = ""; + Airship.Instance.GetNamedUser(namedUser => + { + Device.BeginInvokeOnMainThread(() => { + namedUserLabel.Placeholder = namedUser != null ? namedUser : "named user"; + }); + }); + } +} \ No newline at end of file diff --git a/src/Airship.Net.MessageCenter/Handlers/MessageViewHandler.iOS.cs b/src/Airship.Net.MessageCenter/Handlers/MessageViewHandler.iOS.cs index 2f574ac7..7042157c 100644 --- a/src/Airship.Net.MessageCenter/Handlers/MessageViewHandler.iOS.cs +++ b/src/Airship.Net.MessageCenter/Handlers/MessageViewHandler.iOS.cs @@ -6,6 +6,7 @@ using Foundation; using UrbanAirship; using AirshipDotNet.MessageCenter.Controls; +using Vision; namespace AirshipDotNet.MessageCenter.Handlers; @@ -20,24 +21,35 @@ public partial class MessageViewHandler : ViewHandler [nameof(IMessageView.MessageId)] = MapMessageId }; - private readonly NativeBridgeDelegate nativeBridgeDelegate; - private readonly NavigationDelegate navigationDelegate; - private readonly UANativeBridge nativeBridge; - private readonly UAMessageCenterNativeBridgeExtension nativeBridgeExtension; + private NativeBridgeDelegate nativeBridgeDelegate; + private NavigationDelegate navigationDelegate; + private UANativeBridge nativeBridge; + private UAMessageCenterNativeBridgeExtension nativeBridgeExtension; private string messageId; + private UAMessageCenterMessage message; + private UAMessageCenterUser user; public MessageViewHandler() : base(MessageViewMapper) { - nativeBridgeDelegate = new(this); - navigationDelegate = new(this); - nativeBridgeExtension = new UAMessageCenterNativeBridgeExtension(); - - nativeBridge = new() + UAMessageCenter.Shared.Inbox.GetUser(currentUser => { - ForwardNavigationDelegate = navigationDelegate, - NativeBridgeDelegate = nativeBridgeDelegate, - NativeBridgeExtensionDelegate = nativeBridgeExtension - }; + UAMessageCenter.Shared.Inbox.MessageForID(messageId, currentMmessage => + { + user = currentUser; + message = currentMmessage; + + nativeBridgeDelegate = new(this); + navigationDelegate = new(this); + + nativeBridge = new() + { + ForwardNavigationDelegate = navigationDelegate, + NativeBridgeDelegate = nativeBridgeDelegate, + NativeBridgeExtensionDelegate = new UAMessageCenterNativeBridgeExtension(message, user) + }; + + }); + }); } protected override WKWebView CreatePlatformView() @@ -54,61 +66,68 @@ private static void MapMessageId(MessageViewHandler handler, IMessageView entry) { if (entry.MessageId != null) { - handler.LoadMessage(entry.MessageId); + handler.LoadMessage(entry.MessageId, result => + { + }); } } - protected void LoadMessage(string? messageId) + public void LoadMessage(string messageId, Action result) { - if (messageId == null) return; - var message = UAMessageCenter.Shared.MessageList.Message(messageId); if (message != null) { - LoadMessageBody(message); + LoadMessageBody(message, result); } else { - UAMessageCenter.Shared.MessageList.RetrieveMessageList(() => + UAMessageCenter.Shared.Inbox.RefreshMessages(refresh => + { + if (refresh == true) { - message = UAMessageCenter.Shared.MessageList.Message(messageId); - if (message != null && !message.IsExpired()) - { - LoadMessageBody(message); - } - else + UAMessageCenter.Shared.Inbox.MessageForID(messageId, newMessage => { - VirtualView.OnLoadFailed(messageId, false, MessageFailureStatus.Unavailable); - } - }, - () => VirtualView.OnLoadFailed(messageId, false, MessageFailureStatus.FetchFailed) - ); + message = newMessage; + if (message != null && !message.IsExpired) + { + LoadMessageBody(message, result); + } + else + { + VirtualView.OnLoadFailed(messageId, false, MessageFailureStatus.Unavailable); + result(false); + } + }); + } + else + { + VirtualView.OnLoadFailed(messageId, false, MessageFailureStatus.FetchFailed); + result(false); + } + }); } - } - protected void LoadMessageBody(UAInboxMessage message) + protected void LoadMessageBody(UAMessageCenterMessage message, Action result) { - messageId = message.MessageID; - - UAMessageCenter.Shared.User.GetUserData((UAUserData userData) => + if (user == null) { - if (userData == null) return; + result(false); + } - var auth = UAUtils.AuthHeaderString(userData.Username, userData.Password); - NSMutableDictionary dict = new NSMutableDictionary - { - { new NSString("Authorization"), new NSString(auth) } - }; - var request = new NSMutableUrlRequest(message.MessageBodyURL) { - Headers = dict - }; + var auth = UAUtils.AuthHeaderString(user.Username, user.Password); - MainThread.BeginInvokeOnMainThread(() => - PlatformView.LoadRequest(request) - ); + NSMutableDictionary dict = new NSMutableDictionary(); + dict.Add(new NSString("Authorization"), new NSString(auth)); - VirtualView.OnLoadStarted(message.MessageID); - }); + var request = new NSMutableUrlRequest(message.BodyURL); + request.Headers = dict; + + MainThread.BeginInvokeOnMainThread(() => + PlatformView.LoadRequest(request) + ); + + VirtualView.OnLoadStarted(messageId); + result(true); } private class NavigationDelegate : NSObject, IUANavigationDelegate @@ -175,5 +194,4 @@ public void Close() Handler.VirtualView.OnClosed(Handler.messageId); } } -} - +} \ No newline at end of file diff --git a/src/Airship.Net/ChannelSubscriptionListsEditor.cs b/src/Airship.Net/ChannelSubscriptionListsEditor.cs new file mode 100644 index 00000000..1f51a2dd --- /dev/null +++ b/src/Airship.Net/ChannelSubscriptionListsEditor.cs @@ -0,0 +1,67 @@ +/* Copyright Airship and Contributors */ + +namespace AirshipDotNet.Channel +{ + /// + /// Interface used to subscribe/unsubscribe from a list. + /// + public class SubscriptionListEditor + { + private readonly List operations = new(); + private readonly Action> onApply; + + //@cond IGNORE + public SubscriptionListEditor(Action> onApply) + { + this.onApply = onApply; + } + //@endcond + + /// + /// ASubscribe to a given tag list. + /// + /// The subscriotion list editor. + /// The subscription list identifier to subscribe to. + public SubscriptionListEditor Subscribe(string list) + { + operations.Add(new SubscriptionListOperation(OperationType.SUBSCRIBE, list)); + return this; + + } + + /// + /// Unsubscribe from a given list. + /// + /// The subscriotion list editor. + /// The subscription list identifier to unsubscribe from. + public SubscriptionListEditor Unsubscribe(string list) + { + operations.Add(new SubscriptionListOperation(OperationType.UNSUBSCRIBE, list)); + return this; + } + + /// + /// Apply the tag group changes. + /// + public void Apply() + { + onApply?.Invoke(operations); + } + + //@cond IGNORE + public class SubscriptionListOperation + { + public OperationType OperationType; + public string List; + + internal SubscriptionListOperation(OperationType operation, string list) + { + OperationType = operation; + List = list; + } + } + + public enum OperationType { SUBSCRIBE, UNSUBSCRIBE } + //@endcond + } +} diff --git a/src/Airship.Net/ContactSubscriptionListEditor.cs b/src/Airship.Net/ContactSubscriptionListEditor.cs new file mode 100644 index 00000000..7898e0da --- /dev/null +++ b/src/Airship.Net/ContactSubscriptionListEditor.cs @@ -0,0 +1,75 @@ +/* Copyright Airship and Contributors */ + +using System; +using System.Collections.Generic; + + +namespace AirshipDotNet.Contact +{ + /// + /// Interface used to subscribe/unsubscribe from a list. + /// + public class SubscriptionListEditor + { + private readonly List operations = new(); + private readonly Action> onApply; + + //@cond IGNORE + public SubscriptionListEditor(Action> onApply) + { + this.onApply = onApply; + } + //@endcond + + /// + /// ASubscribe to a given tag list. + /// + /// The subscriotion list editor. + /// The subscription list identifier to subscribe to. + /// scope to subscribe scope. + public SubscriptionListEditor Subscribe(string list, String scope) + { + operations.Add(new SubscriptionListOperation(OperationType.SUBSCRIBE, list, scope)); + return this; + + } + + /// + /// Unsubscribe from a given list. + /// + /// The subscriotion list editor. + /// The subscription list identifier to unsubscribe from. + /// scope to scope. + public SubscriptionListEditor Unsubscribe(string list, String scope) + { + operations.Add(new SubscriptionListOperation(OperationType.UNSUBSCRIBE, list, scope)); + return this; + } + + /// + /// Apply the tag group changes. + /// + public void Apply() + { + onApply?.Invoke(operations); + } + + //@cond IGNORE + public class SubscriptionListOperation + { + public OperationType OperationType; + public string List; + public string Scope; + + internal SubscriptionListOperation(OperationType operation, string list, String scope) + { + OperationType = operation; + List = list; + Scope = scope; + } + } + + public enum OperationType { SUBSCRIBE, UNSUBSCRIBE } + //@endcond + } +} diff --git a/src/Airship.Net/IAirship.cs b/src/Airship.Net/IAirship.cs index 67b3fe79..ec58508d 100644 --- a/src/Airship.Net/IAirship.cs +++ b/src/Airship.Net/IAirship.cs @@ -1,14 +1,16 @@ /* Copyright Airship and Contributors */ -using System; using AirshipDotNet.Attributes; using AirshipDotNet.Channel; +using AirshipDotNet.Contact; +using ChannelSubscriptionListEditor = AirshipDotNet.Channel.SubscriptionListEditor; +using ContactSubscriptionListEditor = AirshipDotNet.Contact.SubscriptionListEditor; namespace AirshipDotNet { /// - /// Arguments for Channel creation events. + /// Arguments for Channel creation and update events. /// public class ChannelEventArgs : EventArgs { @@ -115,11 +117,11 @@ public enum Features InAppAutomation = 1 << 0, MessageCenter = 1 << 1, Push = 1 << 2, - //RETIRED: Chat = 1 << 3, + // RETIRED: Chat = 1 << 3, Analytics = 1 << 4, TagsAndAttributes = 1 << 5, Contacts = 1 << 6, - //RETIRED: Location = 1 << 7, + // RETIRED: Location = 1 << 7, All = InAppAutomation | MessageCenter | Push | Analytics | TagsAndAttributes | Contacts } @@ -175,13 +177,24 @@ public interface IAirship /// Get the channel ID for the device. /// /// The channel identifier. - string? ChannelId { get; } + string ChannelId { get; } /// - /// Gets or sets the named user ID. + /// Gets the named user ID. /// /// The named user ID. - string? NamedUser { get; set; } + void GetNamedUser(Action namedUser); + + /// + /// Reset Contacts. + /// + void ResetContact(); + + /// + /// Sets the named user ID. + /// + /// The named user ID. + void IdentifyContact(string namedUserId); /// /// Add/remove the channel creation event listener. @@ -192,7 +205,6 @@ public interface IAirship /// /// Add/remove the push notification status listener. /// - /// The push notification status listener. event EventHandler OnPushNotificationStatusUpdate; /// @@ -269,32 +281,26 @@ public interface IAirship /// Get the message center unread count. /// /// The message center unread count. - int MessageCenterUnreadCount { get; } + void MessageCenterUnreadCount(Action unreadMessageCount); /// /// Get the total count of message center messages. /// /// The message center count. - int MessageCenterCount { get; } + void MessageCenterCount(Action messageCount); /// /// Get the list of messages contained in the messages center. /// /// The list of message. - List InboxMessages { get; } - - /// - /// Displays a specific message. - /// - /// Action that will be called on completion, with a boolean flag indicating success. - void FetchInboxMessages(Action onComplete); + void InboxMessages(Action> messages); /// /// Returns an editor for named user tag groups. /// /// A TagGroupsEditor /// for named user tag groups. - TagGroupsEditor EditNamedUserTagGroups(); + TagGroupsEditor EditContactTagGroups(); /// /// Returns an editor for channel tag groups. @@ -311,11 +317,25 @@ public interface IAirship AttributeEditor EditChannelAttributes(); /// - /// Edit named user attributes. + /// Edit contact attributes. /// /// An AttributeEditor - /// for named user attributes. - AttributeEditor EditNamedUserAttributes(); + /// for contact attributes. + AttributeEditor EditContactAttributes(); + + /// + /// Edit channel subscription lists. + /// + /// An SubscriptionListsEditor + /// for channel subscription lists. + ChannelSubscriptionListEditor EditChannelSubscriptionLists(); + + /// + /// Edit contact subscription list. + /// + /// An SubscriptionListsEditor + /// for contact subscription lists. + ContactSubscriptionListEditor EditContactSubscriptionLists(); /// /// Gets or sets whether In-App Automation is paused. @@ -329,4 +349,4 @@ public interface IAirship /// The display interval. TimeSpan InAppAutomationDisplayInterval { get; set; } } -} +} \ No newline at end of file diff --git a/src/Airship.Net/Platforms/Android/Airship.cs b/src/Airship.Net/Platforms/Android/Airship.cs index 41875263..0ea475a4 100644 --- a/src/Airship.Net/Platforms/Android/Airship.cs +++ b/src/Airship.Net/Platforms/Android/Airship.cs @@ -6,16 +6,19 @@ using UrbanAirship.Automation; using UrbanAirship.Actions; using UrbanAirship.Channel; +//using Urbanairship.Contacts; using UrbanAirship.MessageCenter; using UrbanAirship.Push; using AttributeEditor = AirshipDotNet.Attributes.AttributeEditor; +using ChannelSubscriptionListEditor = AirshipDotNet.Channel.SubscriptionListEditor; +using ContactSubscriptionListEditor = AirshipDotNet.Contact.SubscriptionListEditor; namespace AirshipDotNet { /// /// Provides cross-platform access to a common subset of functionality between the iOS and Android SDKs /// - public class Airship : Java.Lang.Object, IDeepLinkListener, IAirship, IInboxListener, MessageCenterClass.IOnShowMessageCenterListener, IAirshipChannelListener, IPushNotificationStatusListener + public class Airship : Java.Lang.Object, IDeepLinkListener, IAirship, IInboxListener, MessageCenterClass.IOnShowMessageCenterListener, UrbanAirship.Channel.IAirshipChannelListener, IPushNotificationStatusListener { private static readonly Lazy sharedAirship = new(() => { @@ -27,18 +30,29 @@ public class Airship : Java.Lang.Object, IDeepLinkListener, IAirship, IInboxList private void Init() { UAirship.Shared().Channel.AddChannelListener(this); - - //Adding Inbox updated listener - MessageCenterClass.Shared().Inbox.AddListener(this); + //Adding Push notification status listener UAirship.Shared().PushManager.AddNotificationStatusListener(this); + + //Adding Inbox updated listener + MessageCenterClass.Shared().Inbox.AddListener(this); } + /// + /// Add/remove the channel creation listener. + /// public event EventHandler? OnChannelCreation; + /// + /// Add/remove the push notification status listener. + /// public event EventHandler? OnPushNotificationStatusUpdate; private EventHandler? onDeepLinkReceived; + + /// + /// Add/remove the deep link listener. + /// public event EventHandler OnDeepLinkReceived { add @@ -58,9 +72,16 @@ public event EventHandler OnDeepLinkReceived } } + /// + /// Add/remove the Message Center updated listener. + /// public event EventHandler? OnMessageCenterUpdated; private EventHandler? onMessageCenterDisplay; + + /// + /// Add/remove the Message Center display listener. + /// public event EventHandler OnMessageCenterDisplay { add @@ -176,21 +197,11 @@ private static Features FeaturesFromUAFeatures(int uAFeatures) public string? ChannelId => UAirship.Shared().Channel.Id; - public string? NamedUser - { - get => UAirship.Shared().Contact.NamedUserId; + public void GetNamedUser(Action namedUser) => namedUser(UAirship.Shared().Contact.NamedUserId); - set { - if (value != null) - { - UAirship.Shared().Contact.Identify(value); - } - else - { - UAirship.Shared().Contact.Reset(); - } - } - } + public void ResetContact() => UAirship.Shared().Contact.Reset(); + + public void IdentifyContact(string namedUserId) => UAirship.Shared().Contact.Identify(namedUserId); public Channel.TagEditor EditDeviceTags() { @@ -224,7 +235,8 @@ public void AddCustomEvent(Analytics.CustomEvent customEvent) var builder = new UrbanAirship.Analytics.CustomEvent.Builder(eventName); - if (eventValue is not null) { + if (eventValue is not null) + { builder.SetEventValue((double)eventValue); } @@ -276,53 +288,41 @@ public void AssociateIdentifier(string key, string identifier) public void DeleteMessage(string messageId) => MessageCenterClass.Shared().Inbox.DeleteMessages(new List { messageId }); - public int MessageCenterUnreadCount => MessageCenterClass.Shared().Inbox.UnreadCount; + public void MessageCenterUnreadCount(Action messageCount) => messageCount(MessageCenterClass.Shared().Inbox.UnreadCount); - public int MessageCenterCount => MessageCenterClass.Shared().Inbox.Count; + public void MessageCenterCount(Action messageCount) => messageCount(MessageCenterClass.Shared().Inbox.Count); - public List InboxMessages + public void InboxMessages(Action> listMessages) { - get + var messagesList = new List(); + var messages = MessageCenterClass.Shared().Inbox.Messages; + foreach (var message in messages) { - var messagesList = new List(); - var messages = MessageCenterClass.Shared().Inbox.Messages; - foreach (var message in messages) + var extras = new Dictionary(); + foreach (var key in message.Extras.KeySet()) { - var extras = new Dictionary(); - var keySet = message.Extras.KeySet(); - if (keySet is not null) - { - foreach (var key in keySet) - { - var value = message.Extras.Get(key)?.ToString(); - extras.Add(key, value); - } - } - DateTime? sentDate = FromDate(message.SentDate); - DateTime? expirationDate = FromDate(message.ExpirationDate); - - var inboxMessage = new MessageCenter.Message( - message.MessageId, - message.Title, - sentDate, - expirationDate, - message.IsRead, - message.ListIconUrl, - extras); - - messagesList.Add(inboxMessage); + extras.Add(key, message.Extras.Get(key).ToString()); } - return messagesList; + DateTime? sentDate = FromDate(message.SentDate); + DateTime? expirationDate = FromDate(message.ExpirationDate); + + var inboxMessage = new MessageCenter.Message( + message.MessageId, + message.Title, + sentDate, + expirationDate, + message.IsRead, + message.ListIconUrl, + extras); + + messagesList.Add(inboxMessage); } - } - public void FetchInboxMessages(Action onComplete) - { - MessageCenterClass.Shared().Inbox.FetchMessages(onComplete); + listMessages(messagesList); } - private static Date? FromDateTime(DateTime? dateTime) + private Date FromDateTime(DateTime dateTime) { if (dateTime == null) { @@ -332,7 +332,7 @@ public void FetchInboxMessages(Action onComplete) return new Date(epochSeconds * 1000); } - private static DateTime? FromDate(Date? date) + private static DateTime? FromDate(Date date) { if (date == null) { @@ -342,21 +342,25 @@ public void FetchInboxMessages(Action onComplete) return epoch.AddMilliseconds(date.Time); } - public Channel.TagGroupsEditor EditNamedUserTagGroups() => - new((List payload) => + public Channel.TagGroupsEditor EditContactTagGroups() + { + return new Channel.TagGroupsEditor((List payload) => { - TagGroupsEditor editor = UAirship.Shared().Contact.EditTagGroups()!; + var editor = UAirship.Shared().Contact.EditTagGroups(); TagGroupHelper(payload, editor); editor.Apply(); }); + } - public Channel.TagGroupsEditor EditChannelTagGroups() => - new((List payload) => + public Channel.TagGroupsEditor EditChannelTagGroups() + { + return new Channel.TagGroupsEditor((List payload) => { var editor = UAirship.Shared().Channel.EditTagGroups(); TagGroupHelper(payload, editor); editor.Apply(); }); + } public AttributeEditor EditAttributes() => EditChannelAttributes(); @@ -368,15 +372,36 @@ public AttributeEditor EditChannelAttributes() => editor.Apply(); }); - public AttributeEditor EditNamedUserAttributes() => + /// + public AttributeEditor EditContactAttributes() => new((List operations) => { - var editor = UAirship.Shared().Contact.EditAttributes()!; + var editor = UAirship.Shared().Contact.EditAttributes(); ApplyAttributesOperations(editor, operations); editor.Apply(); }); - private static void ApplyAttributesOperations(UrbanAirship.Channel.AttributeEditor editor, List operations) + public ChannelSubscriptionListEditor EditChannelSubscriptionLists() + { + return new Channel.SubscriptionListEditor((List payload) => + { + var editor = UAirship.Shared().Channel.EditSubscriptionLists(); + ApplyChannelSubscriptionListHelper(payload, editor); + editor.Apply(); + }); + } + + public ContactSubscriptionListEditor EditContactSubscriptionLists() + { + return new Contact.SubscriptionListEditor((List payload) => + { + //var editor = UAirship.Shared().Contact.EditSubscriptionLists(); + ApplyContactSubscriptionListHelper(payload); + //editor.Apply(); + }); + } + + private void ApplyAttributesOperations(UrbanAirship.Channel.AttributeEditor editor, List operations) { foreach (var operation in operations) { @@ -404,7 +429,7 @@ private static void ApplyAttributesOperations(UrbanAirship.Channel.AttributeEdit { editor.SetAttribute(doubleOperation.Key, doubleOperation.Value); } - + if (operation is AttributeEditor.SetAttributeOperation dateOperation) { var date = FromDateTime(dateOperation.Value); @@ -440,6 +465,86 @@ private static void TagGroupHelper(List pa } } + private void ApplyChannelSubscriptionListHelper(List operations, UrbanAirship.Channel.SubscriptionListEditor editor) + { + foreach (Channel.SubscriptionListEditor.SubscriptionListOperation operation in operations) + { + if (!Enum.IsDefined(typeof(Channel.SubscriptionListEditor.OperationType), operation.OperationType)) + { + continue; + } + + switch (operation.OperationType) + { + case Channel.SubscriptionListEditor.OperationType.SUBSCRIBE: + editor.Subscribe(operation.List); + break; + case Channel.SubscriptionListEditor.OperationType.UNSUBSCRIBE: + editor.Unsubscribe(operation.List); + break; + } + } + } + + //private void ApplyContactSubscriptionListHelper(List operations, ScopedSubscriptionListEditor editor) + private void ApplyContactSubscriptionListHelper(List operations) + { + + foreach (Contact.SubscriptionListEditor.SubscriptionListOperation operation in operations) + { + if (!Enum.IsDefined(typeof(Contact.SubscriptionListEditor.OperationType), operation.OperationType)) + { + continue; + } + + //string scope = operation.scope; + //string[] scopes = { "app", "web", "email", "sms" }; + //if (scopes.Any(scope.Contains)) + //{ + // Scope channelScope = Scope.App; + // if (operation.Scope == "app") + // { + // channelScope = Scope.App; + // } + // else if (operation.scope == "web") + // { + // channelScope = Scope.Web; + // } + // else if (operation.Scope == "email") + // { + // channelScope = Scope.Email; + // } + // else if (operation.Scope == "sms") + // { + // channelScope = Scope.Sms; + // } + + // switch (operation.OperationType) + // { + // case Contact.SubscriptionListEditor.OperationType.SUBSCRIBE: + // editor.Subscribe(operation.List, channelScope); + // break; + // case Contact.SubscriptionListEditor.OperationType.UNSUBSCRIBE: + // editor.Unsubscribe(operation.List, channelScope); + // break; + // } + //} + } + } + + public bool InAppAutomationEnabled + { + get + { + return InAppAutomation.Shared().Enabled; + } + + set + { + InAppAutomation.Shared().Enabled = value; + } + } + public bool InAppAutomationPaused { get => InAppAutomation.Shared().Paused; @@ -454,7 +559,8 @@ public TimeSpan InAppAutomationDisplayInterval public bool OnDeepLink(string deepLink) { - if (onDeepLinkReceived != null) { + if (onDeepLinkReceived != null) + { onDeepLinkReceived(this, new DeepLinkEventArgs(deepLink)); return true; } @@ -487,4 +593,4 @@ public void OnChange(PushNotificationStatus status) => OnPushNotificationStatusU status.IsOptIn) ); } -} +} \ No newline at end of file diff --git a/src/Airship.Net/Platforms/iOS/Airship.cs b/src/Airship.Net/Platforms/iOS/Airship.cs index 3f499410..dc204549 100644 --- a/src/Airship.Net/Platforms/iOS/Airship.cs +++ b/src/Airship.Net/Platforms/iOS/Airship.cs @@ -23,21 +23,26 @@ private void Initialize() { // Load unreferenced modules AirshipAutomation.Init(); - AirshipExtendedActions.Init(); - NSNotificationCenter.DefaultCenter.AddObserver(aName: (NSString)UAChannel.ChannelCreatedEvent, (NSNotification notification) => + NSNotificationCenter.DefaultCenter.AddObserver(aName: (NSString)UAChannel.ChannelCreatedEvent, (notification) => { - var userInfo = notification.UserInfo; - if (userInfo is not null) - { - var channelID = userInfo[UAChannel.ChannelIdentifierKey].ToString(); - OnChannelCreation?.Invoke(this, new ChannelEventArgs(channelID)); - } + string channelID = notification.UserInfo[UAChannel.ChannelIdentifierKey].ToString(); + OnChannelCreation?.Invoke(this, new ChannelEventArgs(channelID)); }); - // TODO(18.0.0): Observe updates from Push notificationStatusPublisher and - // wire up to OnPushNotificationStatusUpdate once iOS SDK bindings have been updated - + NSNotificationCenter.DefaultCenter.AddObserver(aName: (NSString)UAPush.NotificationStatusUpdateEvent, (notification) => + { + OnPushNotificationStatusUpdate?.Invoke(this, + new PushNotificationStatusEventArgs( + notification.UserInfo[UAPush.IsUserNotificationsEnabled].Equals((NSNumber)1), + notification.UserInfo[UAPush.AreNotificationsAllowed].Equals((NSNumber)1), + notification.UserInfo[UAPush.IsPushPrivacyFeatureEnabled].Equals((NSNumber)1), + notification.UserInfo[UAPush.IsPushTokenRegistered].Equals((NSNumber)1), + notification.UserInfo[UAPush.IsUserOptedIn].Equals((NSNumber)1), + notification.UserInfo[UAPush.IsOptedIn].Equals((NSNumber)1) + ) + ); + }); //Adding Inbox updated Listener NSNotificationCenter.DefaultCenter.AddObserver(aName: (NSString)"com.urbanairship.notification.message_list_updated", (notification) => @@ -46,11 +51,21 @@ private void Initialize() }); } + /// + /// Add/remove the channel creation listener. + /// public event EventHandler? OnChannelCreation; + /// + /// Add/remove the push notification status listener. + /// public event EventHandler? OnPushNotificationStatusUpdate; private EventHandler? onDeepLinkReceived; + + /// + /// Add/remove the deep link listener. + /// public event EventHandler OnDeepLinkReceived { add @@ -68,9 +83,17 @@ public event EventHandler OnDeepLinkReceived } } } + + /// + /// Add/remove the Message Center updated listener. + /// public event EventHandler? OnMessageCenterUpdated; private EventHandler? onMessageCenterDisplay; + + /// + /// Add/remove the Message Center display listener. + /// public event EventHandler OnMessageCenterDisplay { add @@ -178,24 +201,14 @@ private static Features FeaturesFromUAFeatures(UAFeatures uAFeatures) } public IEnumerable Tags => UAirship.Channel.Tags; - + public string? ChannelId => UAirship.Channel.Identifier; - public string? NamedUser - { - get => UAirship.Contact.NamedUserID; - set - { - if (value is not null) - { - UAirship.Contact.Identify(value); - } - else - { - UAirship.Contact.Reset(); - } - } - } + public void GetNamedUser(Action namedUser) => UAirship.Contact.GetNamedUserID(namedUser); + + public void ResetContact() => UAirship.Contact.Reset(); + + public void IdentifyContact(string namedUserId) => UAirship.Contact.Identify(namedUserId); public Channel.TagEditor EditDeviceTags() => new(DeviceTagHelper); @@ -263,11 +276,12 @@ public void AddCustomEvent(CustomEvent customEvent) { propertyDictionary.SetValueForKey(value, key); } - + } if (propertyDictionary.Count > 0) { - uaEvent.Properties = new NSDictionary(propertyDictionary.Keys, propertyDictionary.Values); + //TODO: + //uaEvent.Properties = new NSDictionary(propertyDictionary.Keys, propertyDictionary.Values); } } @@ -278,7 +292,7 @@ public void AddCustomEvent(CustomEvent customEvent) public void AssociateIdentifier(string key, string identifier) { - UAAssociatedIdentifiers identifiers = UAirship.Analytics.CurrentAssociatedDeviceIdentifiers; + UAAssociatedIdentifiers identifiers = UAirship.Analytics.CurrentAssociatedDeviceIdentifiers(); identifiers.SetIdentifier(identifier, key); UAirship.Analytics.AssociateDeviceIdentifiers(identifiers); } @@ -289,57 +303,49 @@ public void AssociateIdentifier(string key, string identifier) public void MarkMessageRead(string messageId) { - var message = UAMessageCenter.Shared.MessageList.Message(messageId); - if (message is not null) - { - var toRead = new UAInboxMessage[1]; - toRead[0] = message; - UAMessageCenter.Shared.MessageList.MarkMessagesRead(toRead, null); - } - + string[] toRead = { messageId }; + UAMessageCenter.Shared.Inbox.MarkReadWithMessageIDs(toRead, null); } public void DeleteMessage(string messageId) { - var message = UAMessageCenter.Shared.MessageList.Message(messageId); - if (message is not null) - { - var toDelete = new UAInboxMessage[1]; - toDelete[0] = message; - UAMessageCenter.Shared.MessageList.MarkMessagesDeleted(toDelete, null); - } + string[] toDelete = { messageId }; + UAMessageCenter.Shared.Inbox.DeleteWithMessageIDs(toDelete, null); } - public int MessageCenterUnreadCount => (int)UAMessageCenter.Shared.MessageList.UnreadCount; + public void MessageCenterUnreadCount(Action messageCount) + { + UAMessageCenter.Shared.Inbox.GetUnreadCount(messageCount); + } - public int MessageCenterCount => (int)UAMessageCenter.Shared.MessageList.MessageCount(); + public void MessageCenterCount(Action messageCount) + { + UAMessageCenter.Shared.Inbox.GetMessages(messages => + { + messageCount(messages.Length); + }); + } - public List InboxMessages + public void InboxMessages(Action> listMessages) { - get + var messagesList = new List(); + UAMessageCenter.Shared.Inbox.GetMessages(messages => { - var messagesList = new List(); - var messages = UAMessageCenter.Shared.MessageList.Messages; foreach (var message in messages) { - var extras = new Dictionary(); + var extras = new Dictionary(); foreach (var key in message.Extra.Keys) { extras.Add(key.ToString(), message.Extra[key].ToString()); } - DateTime? sentDate = FromNSDate(message.MessageSent); - DateTime? expirationDate = FromNSDate(message.MessageExpiration); + DateTime? sentDate = FromNSDate(message.SentDate); + DateTime? expirationDate = FromNSDate(message.ExpirationDate); - string? iconUrl = null; - var icons = (NSDictionary)message.RawMessageObject.ValueForKey(new NSString("icons")); - if (icons != null) - { - iconUrl = icons.ValueForKey(new NSString("list_icon")).ToString(); - } + string iconUrl = message.ListIcon; var inboxMessage = new MessageCenter.Message( - message.MessageID, + message.Id, message.Title, sentDate, expirationDate, @@ -350,16 +356,8 @@ public List InboxMessages messagesList.Add(inboxMessage); } - return messagesList; - } - } - - public void FetchInboxMessages(Action onComplete) - { - UAMessageCenter.Shared.MessageList.RetrieveMessageList( - () => onComplete.Invoke(true), - () => onComplete.Invoke(false) - ); + listMessages(messagesList); + }); } private static NSDate? FromDateTime(DateTime? dateTime) @@ -387,108 +385,285 @@ public void FetchInboxMessages(Action onComplete) return epoch.AddSeconds(date.SecondsSince1970); } - public Channel.TagGroupsEditor EditNamedUserTagGroups() => - new((List payload) => + + public Channel.TagGroupsEditor EditChannelTagGroups() + { + return new((List payload) => { - TagGroupHelper(payload, true); - UAirship.NamedUser.UpdateTags(); + ChannelTagGroupHelper(payload, () => + { + UAirship.Push.UpdateRegistration(); + }); }); + } - public Channel.TagGroupsEditor EditChannelTagGroups() => - new((List payload) => + public Channel.TagGroupsEditor EditContactTagGroups() + { + return new((List payload) => { - TagGroupHelper(payload, false); - UAirship.Push.UpdateRegistration(); + ContactTagGroupHelper(payload); }); + } + public AttributeEditor EditAttributes() => EditChannelAttributes(); - public AttributeEditor EditChannelAttributes() => - new((List operations) => + public AttributeEditor EditChannelAttributes() + { + return new((List operations) => { - var mutations = UAAttributeMutations.Mutations; - ApplyAttributesOperations(mutations, operations); - UAirship.Channel.ApplyAttributeMutations(mutations); + ApplyChannelAttributesOperations(operations); }); + } - public AttributeEditor EditNamedUserAttributes() => - new((List operations) => + public AttributeEditor EditContactAttributes() + { + return new((List operations) => { - var mutations = UAAttributeMutations.Mutations; - ApplyAttributesOperations(mutations, operations); - UAirship.NamedUser.ApplyAttributeMutations(mutations); + ApplyContactAttributesOperations(operations); }); + } + - private static void ApplyAttributesOperations(UAAttributeMutations mutations, List operations) + public Channel.SubscriptionListEditor EditChannelSubscriptionLists() { - foreach (var operation in operations) + return new Channel.SubscriptionListEditor((List payload) => { - if (operation is AttributeEditor.SetAttributeOperation stringOperation) - { - mutations.SetString(stringOperation.Value, stringOperation.Key); - } + ApplyChannelSubscriptionListHelper(payload); + }); + } + + public Contact.SubscriptionListEditor EditContactSubscriptionLists() + { + return new Contact.SubscriptionListEditor((List payload) => + { + ApplyContactSubscriptionListHelper(payload); + }); + } - if (operation is AttributeEditor.SetAttributeOperation intOperation) + private void ApplyChannelAttributesOperations(List operations) + { + UAirship.Channel.EditAttributes(editor => + { + foreach (var operation in operations) { - mutations.SetNumber(intOperation.Value, intOperation.Key); + if (operation is AttributeEditor.SetAttributeOperation stringOperation) + { + editor.SetString(stringOperation.Value, stringOperation.Key); + } + + if (operation is AttributeEditor.SetAttributeOperation intOperation) + { + editor.SetNumber(intOperation.Value, intOperation.Key); + } + + if (operation is AttributeEditor.SetAttributeOperation longOperation) + { + editor.SetNumber(longOperation.Value, longOperation.Key); + } + + if (operation is AttributeEditor.SetAttributeOperation floatOperation) + { + editor.SetNumber(floatOperation.Value, floatOperation.Key); + } + + if (operation is AttributeEditor.SetAttributeOperation doubleOperation) + { + editor.SetNumber(doubleOperation.Value, doubleOperation.Key); + } + + if (operation is AttributeEditor.SetAttributeOperation dateOperation) + { + NSDate date = FromDateTime(dateOperation.Value); + editor.SetDate(date, dateOperation.Key); + } + + if (operation is AttributeEditor.RemoveAttributeOperation removeOperation) + { + editor.RemoveAttribute(removeOperation.Key); + } } + editor.Apply(); + }); - if (operation is AttributeEditor.SetAttributeOperation longOperation) + } + + private void ApplyContactAttributesOperations(List operations) + { + UAirship.Contact.EditAttributes(editor => + { + foreach (var operation in operations) { - mutations.SetNumber(longOperation.Value, longOperation.Key); + if (operation is AttributeEditor.SetAttributeOperation stringOperation) + { + editor.SetString(stringOperation.Value, stringOperation.Key); + } + + if (operation is AttributeEditor.SetAttributeOperation intOperation) + { + editor.SetNumber(intOperation.Value, intOperation.Key); + } + + if (operation is AttributeEditor.SetAttributeOperation longOperation) + { + editor.SetNumber(longOperation.Value, longOperation.Key); + } + + if (operation is AttributeEditor.SetAttributeOperation floatOperation) + { + editor.SetNumber(floatOperation.Value, floatOperation.Key); + } + + if (operation is AttributeEditor.SetAttributeOperation doubleOperation) + { + editor.SetNumber(doubleOperation.Value, doubleOperation.Key); + } + + if (operation is AttributeEditor.SetAttributeOperation dateOperation) + { + NSDate date = FromDateTime(dateOperation.Value); + editor.SetDate(date, dateOperation.Key); + } + + if (operation is AttributeEditor.RemoveAttributeOperation removeOperation) + { + editor.RemoveAttribute(removeOperation.Key); + } } + editor.Apply(); + }); + + } - if (operation is AttributeEditor.SetAttributeOperation floatOperation) + private void ContactTagGroupHelper(List operations) + { + UAirship.Contact.EditTagGroups(editor => + { + var contactActions = new Dictionary>() { - mutations.SetNumber(floatOperation.Value, floatOperation.Key); - } + { Channel.TagGroupsEditor.OperationType.ADD, (group, t) => editor.AddTags(t, group) }, + { Channel.TagGroupsEditor.OperationType.REMOVE, (group, t) => editor.RemoveTags(t, group) }, + { Channel.TagGroupsEditor.OperationType.SET, (group, t) => editor.SetTags(t, group) } + }; - if (operation is AttributeEditor.SetAttributeOperation doubleOperation) + foreach (Channel.TagGroupsEditor.TagOperation operation in operations) { - mutations.SetNumber(doubleOperation.Value, doubleOperation.Key); + if (!Enum.IsDefined(typeof(Channel.TagGroupsEditor.OperationType), operation.operationType)) + { + continue; + } + + string[] tagArray = new string[operation.tags.Count]; + operation.tags.CopyTo(tagArray, 0); + contactActions[operation.operationType](operation.group, tagArray); } - if (operation is AttributeEditor.SetAttributeOperation dateOperation) + editor.Apply(); + }); + } + + private void ChannelTagGroupHelper(List operations, Action finished) + { + UAirship.Channel.EditTagGroups(editor => + { + var channelActions = new Dictionary>() { - var date = FromDateTime(dateOperation.Value); - mutations.SetDate(date, dateOperation.Key); - } + { Channel.TagGroupsEditor.OperationType.ADD, (group, t) => editor.AddTags(t, group) }, + { Channel.TagGroupsEditor.OperationType.REMOVE, (group, t) => editor.RemoveTags(t, group) }, + { Channel.TagGroupsEditor.OperationType.SET, (group, t) => editor.SetTags(t, group) } + }; - if (operation is AttributeEditor.RemoveAttributeOperation removeOperation) + foreach (Channel.TagGroupsEditor.TagOperation operation in operations) { - mutations.RemoveAttribute(removeOperation.Key); + if (!Enum.IsDefined(typeof(Channel.TagGroupsEditor.OperationType), operation.operationType)) + { + continue; + } + + string[] tagArray = new string[operation.tags.Count]; + operation.tags.CopyTo(tagArray, 0); + channelActions[operation.operationType](operation.group, tagArray); } - } + + editor.Apply(); + finished(); + }); } - private static void TagGroupHelper(List operations, bool namedUser) + private void ApplyChannelSubscriptionListHelper(List operations) { - var namedUserActions = new Dictionary>() - { - { Channel.TagGroupsEditor.OperationType.ADD, (group, t) => UAirship.NamedUser.AddTags(t, group) }, - { Channel.TagGroupsEditor.OperationType.REMOVE, (group, t) => UAirship.NamedUser.RemoveTags(t, group) }, - { Channel.TagGroupsEditor.OperationType.SET, (group, t) => UAirship.NamedUser.SetTags(t, group) } - }; - var channelActions = new Dictionary>() + UAirship.Channel.EditSubscriptionLists(editor => { - { Channel.TagGroupsEditor.OperationType.ADD, (group, t) => UAirship.Channel.AddTags(t, group) }, - { Channel.TagGroupsEditor.OperationType.REMOVE, (group, t) => UAirship.Channel.RemoveTags(t, group) }, - { Channel.TagGroupsEditor.OperationType.SET, (group, t) => UAirship.Channel.SetTags(t, group) } - }; + foreach (Channel.SubscriptionListEditor.SubscriptionListOperation operation in operations) + { + if (!Enum.IsDefined(typeof(Channel.SubscriptionListEditor.OperationType), operation.OperationType)) + { + continue; + } - var actions = namedUser ? namedUserActions : channelActions; + switch (operation.OperationType) + { + case Channel.SubscriptionListEditor.OperationType.SUBSCRIBE: + editor.Subscribe(operation.List); + break; + case Channel.SubscriptionListEditor.OperationType.UNSUBSCRIBE: + editor.Unsubscribe(operation.List); + break; + } + } - foreach (Channel.TagGroupsEditor.TagOperation operation in operations) + editor.Apply(); + }); + } + + private void ApplyContactSubscriptionListHelper(List operations) + { + UAirship.Contact.EditSubscriptionLists(editor => { - if (!Enum.IsDefined(typeof(Channel.TagGroupsEditor.OperationType), operation.operationType)) + + foreach (Contact.SubscriptionListEditor.SubscriptionListOperation operation in operations) { - continue; + if (!Enum.IsDefined(typeof(Contact.SubscriptionListEditor.OperationType), operation.OperationType)) + { + continue; + } + + string scope = operation.Scope; + string[] scopes = { "app", "web", "email", "sms" }; + if (scopes.Any(scope.Contains)) + { + UAChannelScope channelScope = UAChannelScope.App; + if (operation.Scope == "app") + { + channelScope = UAChannelScope.App; + } + else if (operation.Scope == "web") + { + channelScope = UAChannelScope.Web; + } + else if (operation.Scope == "email") + { + channelScope = UAChannelScope.Email; + } + else if (operation.Scope == "sms") + { + channelScope = UAChannelScope.Sms; + } + + switch (operation.OperationType) + { + case Contact.SubscriptionListEditor.OperationType.SUBSCRIBE: + editor.Subscribe(operation.List, channelScope); + break; + case Contact.SubscriptionListEditor.OperationType.UNSUBSCRIBE: + editor.Unsubscribe(operation.List, channelScope); + break; + } + } } - string[] tagArray = new string[operation.tags.Count]; - operation.tags.CopyTo(tagArray, 0); - actions[operation.operationType](operation.group, tagArray); - } + editor.Apply(); + }); } override public void ReceivedDeepLink(NSUrl url, Action completionHandler) @@ -497,14 +672,12 @@ override public void ReceivedDeepLink(NSUrl url, Action completionHandler) completionHandler(); } - public void DisplayMessageCenter(string messageID, bool animated) => - onMessageCenterDisplay?.Invoke(this, new MessageCenterEventArgs(messageID)); - + public void OnDisplayMessageCenter(string messageID) => onMessageCenterDisplay?.Invoke(this, new MessageCenterEventArgs(messageID)); - public void DisplayMessageCenterAnimated(bool animated) => - onMessageCenterDisplay?.Invoke(this, new MessageCenterEventArgs()); + public void OnDisplayMessageCenter() => onMessageCenterDisplay?.Invoke(this, new MessageCenterEventArgs()); - public void DismissMessageCenterAnimated(bool animated) { + public void OnDismissMessageCenter() + { } public bool InAppAutomationPaused diff --git a/src/AirshipBindings.iOS.Automation/ApiDefinitions.cs b/src/AirshipBindings.iOS.Automation/ApiDefinitions.cs index 009da07a..673d9d53 100644 --- a/src/AirshipBindings.iOS.Automation/ApiDefinitions.cs +++ b/src/AirshipBindings.iOS.Automation/ApiDefinitions.cs @@ -6,6 +6,7 @@ Copyright Airship and Contributors using Foundation; using ObjCRuntime; using System; +using System.Runtime.InteropServices; using UIKit; using UserNotifications; using WebKit; @@ -466,7 +467,7 @@ interface UAAutomationResources // @interface UACancelSchedulesAction : NSObject [BaseType(typeof(NSObject))] - interface UACancelSchedulesAction : IUAAction + interface UACancelSchedulesAction { } @@ -1846,7 +1847,7 @@ interface IUALandingPageBuilderExtender { } // @interface UALandingPageAction : NSObject [BaseType(typeof(NSObject))] - interface UALandingPageAction : IUAAction + interface UALandingPageAction { // @property (nonatomic, assign, unsafe_unretained, readwrite, nullable) NSNumber *borderRadiusPoints; [NullAllowed, Export("borderRadiusPoints", ArgumentSemantic.Assign)] @@ -2108,7 +2109,7 @@ interface UASchedule // @interface UAScheduleAction : NSObject [BaseType(typeof(NSObject))] - interface UAScheduleAction : IUAAction + interface UAScheduleAction { } @@ -2476,4 +2477,40 @@ interface UATagSelector [Export("apply:")] bool Apply (string[] tags); } + + // @interface UAPadding : NSObject + [BaseType(typeof(NSObject))] + interface UAPadding + { + // @property (nonatomic, strong, readwrite, nullable) NSNumber *top; + [NullAllowed, Export("top", ArgumentSemantic.Strong)] + NSNumber Top { get; set; } + + // @property (nonatomic, strong, readwrite, nullable) NSNumber *bottom; + [NullAllowed, Export("bottom", ArgumentSemantic.Strong)] + NSNumber Bottom { get; set; } + + // @property (nonatomic, strong, readwrite, nullable) NSNumber *trailing; + [NullAllowed, Export("trailing", ArgumentSemantic.Strong)] + NSNumber Trailing { get; set; } + + // @property (nonatomic, strong, readwrite, nullable) NSNumber *leading; + [NullAllowed, Export("leading", ArgumentSemantic.Strong)] + NSNumber Leading { get; set; } + + // - (nonnull instancetype)initWithTop:(nullable NSNumber *)top bottom:(nullable NSNumber *)bottom leading:(nullable NSNumber *)leading trailing:(nullable NSNumber *)trailing; + [Export("initWithTop:bottom:leading:trailing:")] + IntPtr Constructor([NullAllowed] NSNumber top, [NullAllowed] NSNumber bottom, [NullAllowed] NSNumber leading, [NullAllowed] NSNumber trailing); + + // + (nonnull instancetype)paddingWithTop:(nullable NSNumber *)top bottom:(nullable NSNumber *)bottom leading:(nullable NSNumber *)leading trailing:(nullable NSNumber *)trailing; + [Static] + [Export("paddingWithTop:bottom:leading:trailing:")] + UAPadding Padding([NullAllowed] NSNumber top, [NullAllowed] NSNumber bottom, [NullAllowed] NSNumber leading, [NullAllowed] NSNumber trailing); + + // + (nonnull instancetype)paddingWithDictionary: (nullable NSDictionary *)paddingDict; + [Static] + [Export("paddingWithDictionary:")] + UAPadding Padding([NullAllowed] NSDictionary paddingDict); + } + } diff --git a/src/AirshipBindings.iOS.Basement/ApiDefinitions.cs b/src/AirshipBindings.iOS.Basement/ApiDefinitions.cs index b100d39c..c39bdd09 100644 --- a/src/AirshipBindings.iOS.Basement/ApiDefinitions.cs +++ b/src/AirshipBindings.iOS.Basement/ApiDefinitions.cs @@ -5,168 +5,11 @@ Copyright Airship and Contributors using Foundation; using ObjCRuntime; using System; +using System.ComponentModel.DataAnnotations; using WebKit; -namespace UrbanAirship { - - [Static] - partial interface Constants - { - // extern NSString *const _Nonnull UAActionMetadataForegroundPresentationKey - [Field("UAActionMetadataForegroundPresentationKey", "__Internal")] - NSString UAActionMetadataForegroundPresentationKey { get; } - - // extern NSString *const _Nonnull UAActionMetadataInboxMessageIDKey - [Field("UAActionMetadataInboxMessageIDKey", "__Internal")] - NSString UAActionMetadataInboxMessageIDKey { get; } - - // extern NSString *const _Nonnull UAActionMetadataPushPayloadKey - [Field("UAActionMetadataPushPayloadKey", "__Internal")] - NSString UAActionMetadataPushPayloadKey { get; } - - // extern NSString *const _Nonnull UAActionMetadataRegisteredName - [Field("UAActionMetadataRegisteredName", "__Internal")] - NSString UAActionMetadataRegisteredName { get; } - - // extern NSString *const _Nonnull UAActionMetadataResponseInfoKey - [Field("UAActionMetadataResponseInfoKey", "__Internal")] - NSString UAActionMetadataResponseInfoKey { get; } - - // extern NSString *const _Nonnull UAActionMetadataUserNotificationActionIDKey - [Field("UAActionMetadataUserNotificationActionIDKey", "__Internal")] - NSString UAActionMetadataUserNotificationActionIDKey { get; } - } - - // typedef BOOL (^UAActionPredicate)(UAActionArguments *_Nonnull) - delegate bool UAActionPredicate (UAActionArguments arg0); - - // typedef void (^UAActionCompletionHandler)(UAActionResult *_Nonnull) - delegate void UAActionCompletionHandler (UAActionResult arg0); - - // typedef void (^UAActionBlock)(UAActionArguments *_Nonnull, UAActionCompletionHandler _Nonnull) - delegate void UAActionBlock (UAActionArguments arg0, [BlockCallback] UAActionCompletionHandler arg1); - - // @protocol UAAction - [Protocol, Model] - [BaseType(typeof(NSObject))] - interface UAAction - { - // - (BOOL)acceptsArguments:(nonnull UAActionArguments *)arguments; - [Abstract] - [Export("acceptsArguments:")] - bool AcceptsArguments (UAActionArguments arguments); - - // - (void)performWithArguments:(nonnull UAActionArguments *)arguments completionHandler: (nonnull UAActionCompletionHandler)completionHandler; - [Abstract] - [Export("performWithArguments:completionHandler:")] - void Perform (UAActionArguments arguments, UAActionCompletionHandler completionHandler); - - // - (void)willPerformWithArguments:(nonnull UAActionArguments *)arguments; - [Export("willPerformWithArguments:")] - void WillPerform (UAActionArguments arguments); - - // - (void)didPerformWithArguments:(nonnull UAActionArguments *)arguments withResult:(nonnull UAActionResult *)result; - [Export("didPerformWithArguments:withResult:")] - void DidPerform (UAActionArguments arguments, UAActionResult result); - } - - partial interface IUAAction { } - - // @interface UAActionArguments : NSObject - [BaseType(typeof(NSObject))] - interface UAActionArguments - { - // @property (nonatomic, assign, unsafe_unretained, readonly) UASituation situation; - [Export("situation", ArgumentSemantic.Assign)] - UASituation Situation { get; } - - // @property (nonatomic, strong, readonly, nullable) id value; - [NullAllowed, Export("value", ArgumentSemantic.Strong)] - NSObject Value { get; } - - // @property (nonatomic, copy, readonly, nullable) NSDictionary *metadata; - [NullAllowed, Export("metadata", ArgumentSemantic.Copy)] - NSDictionary Metadata { get; } - - // + (nonnull instancetype)argumentsWithValue:(nullable id)value withSituation:(UASituation)situation; - [Static] - [Export("argumentsWithValue:withSituation:")] - UAActionArguments Arguments ([NullAllowed] NSObject value, UASituation situation); - - // + (nonnull instancetype)argumentsWithValue:(nullable id)value withSituation:(UASituation)situation metadata:(nullable NSDictionary *)metadata; - [Static] - [Export("argumentsWithValue:withSituation:metadata:")] - UAActionArguments Arguments ([NullAllowed] NSObject value, UASituation situation, [NullAllowed] NSDictionary metadata); - } - - // @protocol UAActionPredicateProtocol - [Protocol, Model] - [BaseType(typeof(NSObject))] - interface UAActionPredicateProtocol - { - // - (BOOL)applyActionArguments:(nonnull UAActionArguments *)args; - [Abstract] - [Export("applyActionArguments:")] - bool ApplyActionArguments (UAActionArguments args); - } - - partial interface IUAActionPredicateProtocol { } - - // @interface UAActionResult : NSObject - [BaseType(typeof(NSObject))] - interface UAActionResult - { - // @property (nonatomic, strong, readonly, nullable) id value; - [NullAllowed, Export("value", ArgumentSemantic.Strong)] - NSObject Value { get; } - - // @property (nonatomic, assign, unsafe_unretained, readonly) UAActionFetchResult fetchResult; - [Export("fetchResult", ArgumentSemantic.Assign)] - UAActionFetchResult FetchResult { get; } - - // @property (nonatomic, strong, readonly, nullable) NSError *error; - [NullAllowed, Export("error", ArgumentSemantic.Strong)] - NSError Error { get; } - - // @property (nonatomic, assign, unsafe_unretained, readonly) UAActionStatus status; - [Export("status", ArgumentSemantic.Assign)] - UAActionStatus Status { get; } - - // + (nonnull instancetype)resultWithValue:(nullable id)value; - [Static] - [Export("resultWithValue:")] - UAActionResult Result ([NullAllowed] NSObject value); - - // + (nonnull instancetype)resultWithValue:(nullable id)result withFetchResult:(UAActionFetchResult)fetchResult; - [Static] - [Export("resultWithValue:withFetchResult:")] - UAActionResult Result ([NullAllowed] NSObject result, UAActionFetchResult fetchResult); - - // + (nonnull instancetype)emptyResult; - [Static] - [Export("emptyResult")] - UAActionResult EmptyResult (); - - // + (nonnull instancetype)resultWithError:(nonnull NSError *)error; - [Static] - [Export("resultWithError:")] - UAActionResult Result (NSError error); - - // + (nonnull instancetype)resultWithError:(nonnull NSError *)error withFetchResult:(UAActionFetchResult)fetchResult; - [Static] - [Export("resultWithError:withFetchResult:")] - UAActionResult Result (NSError error, UAActionFetchResult fetchResult); - - // + (nonnull instancetype)rejectedArgumentsResult; - [Static] - [Export("rejectedArgumentsResult")] - UAActionResult RejectedArgumentsResult (); - - // + (nonnull instancetype)actionNotFoundResult; - [Static] - [Export("actionNotFoundResult")] - UAActionResult ActionNotFoundResult (); - } +namespace UrbanAirship +{ // @protocol UAComponent [Protocol, Model] @@ -175,7 +18,7 @@ interface UAComponent { // - (BOOL)deepLink:(nonnull NSURL *)deepLink; [Export("deepLink:")] - bool DeepLink (NSUrl deepLink); + bool DeepLink(NSUrl deepLink); } partial interface IUAComponent { } @@ -186,12 +29,12 @@ interface UADisposable { // - (nonnull instancetype)init:(nonnull void (^)(void))disposalBlock; [Export("init:")] - IntPtr Constructor (Action disposalBlock); + IntPtr Constructor(Action disposalBlock); // - (void)dispose; [Export("dispose")] [New] - void Dispose (); + void Dispose(); } // @protocol UAEvent @@ -201,130 +44,8 @@ interface UAEvent { // - (BOOL)isValid; [Export("isValid")] - bool IsValid (); + bool IsValid(); } partial interface IUAEvent { } - - // @interface UAJavaScriptCommand : NSObject - [BaseType(typeof(NSObject))] - interface UAJavaScriptCommand - { - // @property (nonatomic, copy, readonly, nullable) NSString *name; - [NullAllowed, Export("name")] - string Name { get; } - - // @property (nonatomic, strong, readonly) NSArray *_Nonnull arguments; - [Export("arguments", ArgumentSemantic.Strong)] - string[] Arguments { get; } - - // @property (nonatomic, strong, readonly) NSDictionary *_Nonnull options; - [Export("options", ArgumentSemantic.Strong)] - NSDictionary Options { get; } - - // @property (nonatomic, strong, readonly) NSURL *_Nonnull URL; - [Export("URL", ArgumentSemantic.Strong)] - NSUrl URL { get; } - - // + (nonnull instancetype)commandForURL:(nonnull NSURL *)URL; - [Static] - [Export("commandForURL:")] - UAJavaScriptCommand Command (NSUrl URL); - - // - (instancetype)initWithURL:(NSURL *)URL; - [Export("initWithURL:")] - IntPtr Constructor (NSUrl URL); - } - - // @protocol UAJavaScriptCommandDelegate - [Protocol, Model] - [BaseType(typeof(NSObject))] - interface UAJavaScriptCommandDelegate - { - // - (BOOL)performCommand:(nonnull UAJavaScriptCommand *)command webView:(nonnull WKWebView *)webView; - [Abstract] - [Export("performCommand:webView:")] - bool PerformCommand (UAJavaScriptCommand command, WKWebView webView); - } - - partial interface IUAJavaScriptCommandDelegate { } - - // @protocol UAJavaScriptEnvironmentProtocol /** * Adds a getter to the `UAirship` JavaScript instance. * @param methodName The getter's name. * @param value The getter's value. */ - (void)addStringGetter:(NSString *)methodName value:(nullable NSString *)value NS_SWIFT_NAME(add(_:string:)); /** * Adds a getter to the `UAirship` JavaScript instance. * @param methodName The getter's name. * @param value The getter's value. A nil value will return `-1` in the JavaScript environment. */ - (void)addNumberGetter:(NSString *)methodName value:(nullable NSNumber *)value NS_SWIFT_NAME(add(_:number:)); /** * Adds a getter to the `UAirship` JavaScript instance. * @param methodName The getter's name. * @param value The getter's value. */ - (void)addDictionaryGetter:(NSString *)methodName value:(nullable NSDictionary *)value NS_SWIFT_NAME(add(_:dictionary:)); /** * Builds the script that can be injected into a web view. * @return The script. */ - (NSString *)build; @end - [Protocol, Model] - [BaseType(typeof(NSObject))] - interface UAJavaScriptEnvironmentProtocol - { - // - (void)addStringGetter:(nonnull NSString *)methodName value:(nullable NSString *)value; - [Abstract] - [Export("addStringGetter:value:")] - void AddStringGetter (string methodName, [NullAllowed] string value); - - // - (void)addNumberGetter:(nonnull NSString *)methodName value:(nullable NSNumber *)value; - [Abstract] - [Export("addNumberGetter:value:")] - void AddNumberGetter (string methodName, [NullAllowed] NSNumber value); - - // - (void)addDictionaryGetter:(nonnull NSString *)methodName value:(nullable NSDictionary *)value; - [Abstract] - [Export("addDictionaryGetter:value:")] - void AddDictionaryGetter (string methodName, [NullAllowed] NSDictionary value); - - // - (nonnull NSString *)build; - [Abstract] - [Export("build")] - string Build (); - } - - partial interface IUAJavaScriptEnvironmentProtocol { } - - // @protocol UANativeBridgeExtensionDelegate - [Protocol, Model] - [BaseType(typeof(NSObject))] - interface UANativeBridgeExtensionDelegate - { - // - (nonnull NSDictionary *) actionsMetadataForCommand:(nonnull UAJavaScriptCommand *)command webView:(nonnull WKWebView *)webView; - [Export("actionsMetadataForCommand:webView:")] - NSDictionary ActionsMetadata (UAJavaScriptCommand command, WKWebView webView); - - // - (void)extendJavaScriptEnvironment: (nonnull id)js webView:(nonnull WKWebView *)webView; - [Export("extendJavascriptEnvironment:webView:")] - void ExtendJavaScriptEnvironment(IUAJavaScriptEnvironmentProtocol js, WKWebView webView); - } - - partial interface IUANativeBridgeExtensionDelegate { } - - // @interface UAPadding : NSObject - [BaseType(typeof(NSObject))] - interface UAPadding - { - // @property (nonatomic, strong, readwrite, nullable) NSNumber *top; - [NullAllowed, Export("top", ArgumentSemantic.Strong)] - NSNumber Top { get; set; } - - // @property (nonatomic, strong, readwrite, nullable) NSNumber *bottom; - [NullAllowed, Export("bottom", ArgumentSemantic.Strong)] - NSNumber Bottom { get; set; } - - // @property (nonatomic, strong, readwrite, nullable) NSNumber *trailing; - [NullAllowed, Export("trailing", ArgumentSemantic.Strong)] - NSNumber Trailing { get; set; } - - // @property (nonatomic, strong, readwrite, nullable) NSNumber *leading; - [NullAllowed, Export("leading", ArgumentSemantic.Strong)] - NSNumber Leading { get; set; } - - // - (nonnull instancetype)initWithTop:(nullable NSNumber *)top bottom:(nullable NSNumber *)bottom leading:(nullable NSNumber *)leading trailing:(nullable NSNumber *)trailing; - [Export("initWithTop:bottom:leading:trailing:")] - IntPtr Constructor ([NullAllowed] NSNumber top, [NullAllowed] NSNumber bottom, [NullAllowed] NSNumber leading, [NullAllowed] NSNumber trailing); - - // + (nonnull instancetype)paddingWithTop:(nullable NSNumber *)top bottom:(nullable NSNumber *)bottom leading:(nullable NSNumber *)leading trailing:(nullable NSNumber *)trailing; - [Static] - [Export("paddingWithTop:bottom:leading:trailing:")] - UAPadding Padding ([NullAllowed] NSNumber top, [NullAllowed] NSNumber bottom, [NullAllowed] NSNumber leading, [NullAllowed] NSNumber trailing); - - // + (nonnull instancetype)paddingWithDictionary: (nullable NSDictionary *)paddingDict; - [Static] - [Export("paddingWithDictionary:")] - UAPadding Padding ([NullAllowed] NSDictionary paddingDict); - } -} +} \ No newline at end of file diff --git a/src/AirshipBindings.iOS.Basement/StructsAndEnums.cs b/src/AirshipBindings.iOS.Basement/StructsAndEnums.cs index 2d6b8077..c8539d36 100644 --- a/src/AirshipBindings.iOS.Basement/StructsAndEnums.cs +++ b/src/AirshipBindings.iOS.Basement/StructsAndEnums.cs @@ -5,10 +5,11 @@ Copyright Airship and Contributors using System; using UIKit; -namespace UrbanAirship { +namespace UrbanAirship +{ [Native] - public enum UASituation : long + public enum UAActionSituation : long { ManualInvocation = 0, LaunchedFromPush = 1, @@ -52,12 +53,12 @@ public enum UAFeatures : ulong InAppAutomation = (1 << 0), MessageCenter = (1 << 1), Push = (1 << 2), - //RETIRED: Chat = (1 << 3), + Chat = (1 << 3), Analytics = (1 << 4), TagsAndAttributes = (1 << 5), Contacts = (1 << 6), - //RETIRED: Location = (1 << 7), - All = (InAppAutomation | MessageCenter | Push | Analytics | TagsAndAttributes | Contacts ) + Location = (1 << 7), + All = (InAppAutomation | MessageCenter | Push | Chat | Analytics | TagsAndAttributes | Contacts | Location) } [Native] @@ -73,7 +74,7 @@ public enum UANotificationOptions : ulong Provisional = (1 << 6), Announcement = (1 << 7) } - + [Native] public enum UAAuthorizedNotificationSettings : ulong { @@ -107,4 +108,4 @@ public enum UAURLAllowListScope : ulong OpenURL = 1 << 1, All = JavaScriptInterface | OpenURL } -} +} \ No newline at end of file diff --git a/src/AirshipBindings.iOS.Core/ApiDefinitions.cs b/src/AirshipBindings.iOS.Core/ApiDefinitions.cs index 9cf70341..19983fbe 100644 --- a/src/AirshipBindings.iOS.Core/ApiDefinitions.cs +++ b/src/AirshipBindings.iOS.Core/ApiDefinitions.cs @@ -6,3187 +6,3107 @@ Copyright Airship and Contributors using Foundation; using ObjCRuntime; using System; +using System.Runtime.InteropServices; using UIKit; using UserNotifications; using WebKit; -namespace UrbanAirship { - // @interface UAAccountEventTemplate : NSObject - [BaseType(typeof(NSObject))] - [DisableDefaultCtor] - interface UAAccountEventTemplate - { - // @property (nonatomic, strong) NSNumber * _Nullable eventValue; - [NullAllowed, Export("eventValue", ArgumentSemantic.Strong)] - NSNumber EventValue { get; set; } - - // @property (copy, nonatomic) NSString * _Nullable transactionID; - [NullAllowed, Export("transactionID")] - string TransactionID { get; set; } - - // @property (copy, nonatomic) NSString * _Nullable userID; - [NullAllowed, Export("userID")] - string UserID { get; set; } - - // @property (copy, nonatomic) NSString * _Nullable category; - [NullAllowed, Export("category")] - string Category { get; set; } - - // @property (copy, nonatomic) NSString * _Nullable type; - [NullAllowed, Export("type")] - string Type { get; set; } - - // +(UAAccountEventTemplate * _Nonnull)registeredTemplate __attribute__((warn_unused_result(""))); - [Static] - [Export("registeredTemplate")] - UAAccountEventTemplate RegisteredTemplate(); - - // +(UAAccountEventTemplate * _Nonnull)registeredTemplateWithValueFromString:(NSString * _Nullable)valueString __attribute__((warn_unused_result(""))); - [Static] - [Export("registeredTemplateWithValueFromString:")] - UAAccountEventTemplate RegisteredTemplate([NullAllowed] string valueString); - - // +(UAAccountEventTemplate * _Nonnull)registeredTemplateWithValue:(NSNumber * _Nullable)value __attribute__((warn_unused_result(""))); - [Static] - [Export("registeredTemplateWithValue:")] - UAAccountEventTemplate RegisteredTemplate([NullAllowed] NSNumber value); - - // +(UAAccountEventTemplate * _Nonnull)loggedInTemplate __attribute__((warn_unused_result(""))); - [Static] - [Export("loggedInTemplate")] - UAAccountEventTemplate LoggedInTemplate(); - - // +(UAAccountEventTemplate * _Nonnull)loggedInTemplateWithValueFromString:(NSString * _Nullable)valueString __attribute__((warn_unused_result(""))); - [Static] - [Export("loggedInTemplateWithValueFromString:")] - UAAccountEventTemplate LoggedInTemplate([NullAllowed] string valueString); - - // +(UAAccountEventTemplate * _Nonnull)loggedInTemplateWithValue:(NSNumber * _Nullable)value __attribute__((warn_unused_result(""))); - [Static] - [Export("loggedInTemplateWithValue:")] - UAAccountEventTemplate LoggedInTemplate([NullAllowed] NSNumber value); - - // +(UAAccountEventTemplate * _Nonnull)loggedOutTemplate __attribute__((warn_unused_result(""))); - [Static] - [Export("loggedOutTemplate")] - UAAccountEventTemplate LoggedOutTemplate(); - - // +(UAAccountEventTemplate * _Nonnull)loggedOutTemplateWithValueFromString:(NSString * _Nullable)valueString __attribute__((warn_unused_result(""))); - [Static] - [Export("loggedOutTemplateWithValueFromString:")] - UAAccountEventTemplate LoggedOutTemplate([NullAllowed] string valueString); - - // +(UAAccountEventTemplate * _Nonnull)loggedOutTemplateWithValue:(NSNumber * _Nullable)value __attribute__((warn_unused_result(""))); - [Static] - [Export("loggedOutTemplateWithValue:")] - UAAccountEventTemplate LoggedOutTemplate([NullAllowed] NSNumber value); - - // -(UACustomEvent * _Nullable)createEvent __attribute__((warn_unused_result(""))); - [Export("createEvent")] - [return: NullAllowed] - UACustomEvent CreateEvent(); - } - - // @interface UAActionRegistry : NSObject - [BaseType(typeof(NSObject))] - interface UAActionRegistry - { - // @property (readonly, copy, nonatomic) NSSet< *> * _Nonnull registeredEntries; - [Export("registeredEntries", ArgumentSemantic.Copy)] - NSSet RegisteredEntries { get; } - - // +(UAActionRegistry * _Nonnull)defaultRegistry __attribute__((warn_unused_result(""))); - [Static] - [Export("defaultRegistry")] - UAActionRegistry DefaultRegistry { get; } - - // -(BOOL)registerAction:(id _Nonnull)action names:(NSArray * _Nonnull)names; - [Export("registerAction:names:")] - bool RegisterAction(IUAAction action, string[] names); - - // -(BOOL)registerAction:(id _Nonnull)action name:(NSString * _Nonnull)name; - [Export("registerAction:name:")] - bool RegisterAction(IUAAction action, string name); - - // -(BOOL)registerAction:(id _Nonnull)action name:(NSString * _Nonnull)name predicate:(UAActionPredicate _Nullable)predicate; - [Export("registerAction:name:predicate:")] - bool RegisterAction(IUAAction action, string name, [NullAllowed] Action predicate); - - // -(BOOL)registerAction:(id _Nonnull)action names:(NSArray * _Nonnull)names predicate:(UAActionPredicate _Nullable)predicate; - [Export("registerAction:names:predicate:")] - bool RegisterAction(IUAAction action, string[] names, [NullAllowed] Action predicate); - - // -(BOOL)registerActionClass:(Class _Nonnull)actionClass names:(NSArray * _Nonnull)names; - [Export("registerActionClass:names:")] - bool RegisterActionClass(Class actionClass, string[] names); +namespace UrbanAirship +{ + // @interface UAAccountEventTemplate : NSObject + [BaseType(typeof(NSObject))] + [DisableDefaultCtor] + interface UAAccountEventTemplate + { + // @property (nonatomic, strong) NSNumber * _Nullable eventValue; + [NullAllowed, Export("eventValue", ArgumentSemantic.Strong)] + NSNumber EventValue { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable transactionID; + [NullAllowed, Export("transactionID")] + string TransactionID { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable userID; + [NullAllowed, Export("userID")] + string UserID { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable category; + [NullAllowed, Export("category")] + string Category { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable type; + [NullAllowed, Export("type")] + string Type { get; set; } + + // +(UAAccountEventTemplate * _Nonnull)registeredTemplate __attribute__((warn_unused_result(""))); + [Static] + [Export("registeredTemplate")] + UAAccountEventTemplate RegisteredTemplate(); - // -(BOOL)registerActionClass:(Class _Nonnull)actionClass name:(NSString * _Nonnull)name; - [Export("registerActionClass:name:")] - bool RegisterActionClass(Class actionClass, string name); + // +(UAAccountEventTemplate * _Nonnull)registeredTemplateWithValueFromString:(NSString * _Nullable)valueString __attribute__((warn_unused_result(""))); + [Static] + [Export("registeredTemplateWithValueFromString:")] + UAAccountEventTemplate RegisteredTemplate([NullAllowed] string valueString); + + // +(UAAccountEventTemplate * _Nonnull)registeredTemplateWithValue:(NSNumber * _Nullable)value __attribute__((warn_unused_result(""))); + [Static] + [Export("registeredTemplateWithValue:")] + UAAccountEventTemplate RegisteredTemplate([NullAllowed] NSNumber value); - // -(BOOL)registerActionClass:(Class _Nonnull)actionClass name:(NSString * _Nonnull)name predicate:(UAActionPredicate _Nullable)predicate; - [Export("registerActionClass:name:predicate:")] - bool RegisterActionClass(Class actionClass, string name, [NullAllowed] Action predicate); + // +(UAAccountEventTemplate * _Nonnull)loggedInTemplate __attribute__((warn_unused_result(""))); + [Static] + [Export("loggedInTemplate")] + UAAccountEventTemplate LoggedInTemplate(); - // -(BOOL)registerActionClass:(Class _Nonnull)actionClass names:(NSArray * _Nonnull)names predicate:(UAActionPredicate _Nullable)predicate; - [Export("registerActionClass:names:predicate:")] - bool RegisterActionClass(Class actionClass, string[] names, [NullAllowed] Action predicate); + // +(UAAccountEventTemplate * _Nonnull)loggedInTemplateWithValueFromString:(NSString * _Nullable)valueString __attribute__((warn_unused_result(""))); + [Static] + [Export("loggedInTemplateWithValueFromString:")] + UAAccountEventTemplate LoggedInTemplate([NullAllowed] string valueString); - // -(void)removeEntryWithName:(NSString * _Nonnull)name; - [Export("removeEntryWithName:")] - void RemoveEntry(string name); + // +(UAAccountEventTemplate * _Nonnull)loggedInTemplateWithValue:(NSNumber * _Nullable)value __attribute__((warn_unused_result(""))); + [Static] + [Export("loggedInTemplateWithValue:")] + UAAccountEventTemplate LoggedInTemplate([NullAllowed] NSNumber value); - // -(void)removeName:(NSString * _Nonnull)name; - [Export("removeName:")] - void RemoveName(string name); + // +(UAAccountEventTemplate * _Nonnull)loggedOutTemplate __attribute__((warn_unused_result(""))); + [Static] + [Export("loggedOutTemplate")] + UAAccountEventTemplate LoggedOutTemplate(); - // -(BOOL)addName:(NSString * _Nonnull)name forEntryWithName:(NSString * _Nonnull)entryName; - [Export("addName:forEntryWithName:")] - bool AddName(string name, string entryName); + // +(UAAccountEventTemplate * _Nonnull)loggedOutTemplateWithValueFromString:(NSString * _Nullable)valueString __attribute__((warn_unused_result(""))); + [Static] + [Export("loggedOutTemplateWithValueFromString:")] + UAAccountEventTemplate LoggedOutTemplate([NullAllowed] string valueString); - // -(BOOL)addSituationOverride:(enum UASituation)situation forEntryWithName:(NSString * _Nonnull)name action:(id _Nullable)action; - [Export("addSituationOverride:forEntryWithName:action:")] - bool AddSituationOverride(UASituation situation, string name, [NullAllowed] UAAction action); + // +(UAAccountEventTemplate * _Nonnull)loggedOutTemplateWithValue:(NSNumber * _Nullable)value __attribute__((warn_unused_result(""))); + [Static] + [Export("loggedOutTemplateWithValue:")] + UAAccountEventTemplate LoggedOutTemplate([NullAllowed] NSNumber value); - // -(UAActionRegistryEntry * _Nullable)registryEntryWithName:(NSString * _Nonnull)name __attribute__((warn_unused_result(""))); - [Export("registryEntryWithName:")] + // -(UACustomEvent * _Nullable)createEvent __attribute__((warn_unused_result(""))); + [Export("createEvent")] [return: NullAllowed] - UAActionRegistryEntry RegistryEntry(string name); - - // -(BOOL)updatePredicate:(UAActionPredicate _Nullable)predicate forEntryWithName:(NSString * _Nonnull)name; - [Export("updatePredicate:forEntryWithName:")] - bool UpdatePredicate([NullAllowed] Action predicate, string name); - - // -(BOOL)updateAction:(id _Nonnull)action forEntryWithName:(NSString * _Nonnull)name; - [Export("updateAction:forEntryWithName:")] - bool UpdateAction(IUAAction action, string name); - - // -(BOOL)updateActionClass:(Class _Nonnull)actionClass forEntryWithName:(NSString * _Nonnull)name; - [Export("updateActionClass:forEntryWithName:")] - bool UpdateActionClass(Class actionClass, string name); - - // -(void)registerActionsFromFile:(NSString * _Nonnull)path; - [Export("registerActionsFromFile:")] - void RegisterActions(string path); - } - - // @interface UAActionRegistryEntry : NSObject - [BaseType(typeof(NSObject))] - [DisableDefaultCtor] - interface UAActionRegistryEntry - { - // @property (readonly, copy, nonatomic) NSArray * _Nonnull names; - [Export("names", ArgumentSemantic.Copy)] - string[] Names { get; } - - // @property (readonly, copy, nonatomic) UAActionPredicate _Nullable predicate; - [NullAllowed, Export("predicate", ArgumentSemantic.Copy)] - Action Predicate { get; } - - // @property (readonly, nonatomic, strong) id _Nonnull action; - [Export("action", ArgumentSemantic.Strong)] - IUAAction Action { get; } - - // -(id _Nonnull)actionForSituation:(enum UASituation)situation __attribute__((warn_unused_result(""))); - [Export("actionForSituation:")] - IUAAction ActionForSituation(UASituation situation); - } - - // @interface UAActionRunner : NSObject - [BaseType(typeof(NSObject))] - interface UAActionRunner - { - // +(void)runActionWithName:(NSString * _Nonnull)actionName value:(id _Nullable)value situation:(enum UASituation)situation; - [Static] - [Export("runActionWithName:value:situation:")] - void RunAction(string actionName, [NullAllowed] NSObject value, UASituation situation); - - // +(void)runActionWithName:(NSString * _Nonnull)actionName value:(id _Nullable)value situation:(enum UASituation)situation metadata:(NSDictionary * _Nullable)metadata; - [Static] - [Export("runActionWithName:value:situation:metadata:")] - void RunAction(string actionName, [NullAllowed] NSObject value, UASituation situation, [NullAllowed] NSDictionary metadata); - - // +(void)runActionWithName:(NSString * _Nonnull)actionName value:(id _Nullable)value situation:(enum UASituation)situation completionHandler:(UAActionCompletionHandler _Nullable)completionHandler; - [Static] - [Export("runActionWithName:value:situation:completionHandler:")] - void RunAction(string actionName, [NullAllowed] NSObject value, UASituation situation, [NullAllowed] UAActionCompletionHandler completionHandler); - - // +(void)runActionWithName:(NSString * _Nonnull)actionName value:(id _Nullable)value situation:(enum UASituation)situation metadata:(NSDictionary * _Nullable)metadata completionHandler:(UAActionCompletionHandler _Nullable)completionHandler; - [Static] - [Export("runActionWithName:value:situation:metadata:completionHandler:")] - void RunAction(string actionName, [NullAllowed] NSObject value, UASituation situation, [NullAllowed] NSDictionary metadata, [NullAllowed] UAActionCompletionHandler completionHandler); - - // +(void)runAction:(id _Nonnull)action value:(id _Nullable)value situation:(enum UASituation)situation; - [Static] - [Export("runAction:value:situation:")] - void RunAction(IUAAction action, [NullAllowed] NSObject value, UASituation situation); - - // +(void)runAction:(id _Nonnull)action value:(id _Nullable)value situation:(enum UASituation)situation metadata:(NSDictionary * _Nullable)metadata; - [Static] - [Export("runAction:value:situation:metadata:")] - void RunAction(IUAAction action, [NullAllowed] NSObject value, UASituation situation, [NullAllowed] NSDictionary metadata); - - // +(void)runAction:(id _Nonnull)action value:(id _Nullable)value situation:(enum UASituation)situation completionHandler:(UAActionCompletionHandler _Nullable)completionHandler; - [Static] - [Export("runAction:value:situation:completionHandler:")] - void RunAction(IUAAction action, [NullAllowed] NSObject value, UASituation situation, [NullAllowed] UAActionCompletionHandler completionHandler); - - // +(void)runAction:(id _Nonnull)action value:(id _Nullable)value situation:(enum UASituation)situation metadata:(NSDictionary * _Nullable)metadata completionHandler:(UAActionCompletionHandler _Nullable)completionHandler; - [Static] - [Export("runAction:value:situation:metadata:completionHandler:")] - void RunAction(IUAAction action, [NullAllowed] NSObject value, UASituation situation, [NullAllowed] NSDictionary metadata, [NullAllowed] UAActionCompletionHandler completionHandler); - - // +(void)runActionsWithActionValues:(NSDictionary * _Nonnull)actionValues situation:(enum UASituation)situation metadata:(NSDictionary * _Nullable)metadata completionHandler:(UAActionCompletionHandler _Nullable)completionHandler; - [Static] - [Export("runActionsWithActionValues:situation:metadata:completionHandler:")] - void RunActions(NSDictionary actionValues, UASituation situation, [NullAllowed] NSDictionary metadata, [NullAllowed] UAActionCompletionHandler completionHandler); - } - - // @interface UAActivityViewController : UIActivityViewController - [BaseType(typeof(UIActivityViewController))] - interface UAActivityViewController : IUIPopoverControllerDelegate, IUIPopoverPresentationControllerDelegate - { - // @property (copy, nonatomic) void (^ _Nullable)(void) dismissalBlock; - [NullAllowed, Export("dismissalBlock", ArgumentSemantic.Copy)] - Action DismissalBlock { get; set; } - - // -(CGRect)sourceRect __attribute__((warn_unused_result(""))); - [Export("sourceRect")] - CGRect SourceRect { get; } - - // -(instancetype _Nonnull)initWithActivityItems:(NSArray * _Nonnull)activityItems applicationActivities:(NSArray * _Nullable)applicationActivities __attribute__((objc_designated_initializer)); - [Export("initWithActivityItems:applicationActivities:")] - [DesignatedInitializer] - IntPtr Constructor(NSObject[] activityItems, [NullAllowed] UIActivity[] applicationActivities); - } - - // @interface UAAddCustomEventAction : NSObject - [BaseType(typeof(NSObject))] - interface UAAddCustomEventAction : IUAAction - { - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull name; - [Static] - [Export("name")] - string Name { get; } - } - - // @interface UAAddCustomEventActionPredicate : NSObject - [BaseType(typeof(NSObject))] - interface UAAddCustomEventActionPredicate : IUAActionPredicateProtocol - { - } - - // @interface UAModifyTagsAction : NSObject - [BaseType(typeof(NSObject))] - interface UAModifyTagsAction : IUAAction - { - } - - // @interface UAAddTagsAction : UAModifyTagsAction - [BaseType(typeof(UAModifyTagsAction))] - interface UAAddTagsAction - { - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull name; - [Static] - [Export("name")] - string Name { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull shortName; - [Static] - [Export("shortName")] - string ShortName { get; } - } - - // @interface UAAggregateActionResult : UAActionResult - [BaseType(typeof(UAActionResult))] - interface UAAggregateActionResult - { - // -(void)addResult:(UAActionResult * _Nonnull)result forAction:(NSString * _Nonnull)actionName; - [Export("addResult:forAction:")] - void AddResult(UAActionResult result, string actionName); - - // -(UAActionResult * _Nullable)resultForAction:(NSString * _Nonnull)actionName __attribute__((warn_unused_result(""))); - [Export("resultForAction:")] - [return: NullAllowed] - UAActionResult ResultForAction(string actionName); - } - - // @interface UAirship : NSObject - [BaseType(typeof(NSObject))] - [DisableDefaultCtor] - interface UAirship - { - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull deepLinkScheme; - [Static] - [Export("deepLinkScheme")] - string DeepLinkScheme { get; } - - // @property (readonly, nonatomic, class) NSNotificationName _Nonnull airshipReadyNotification; - [Static] - [Export("airshipReadyNotification")] - string AirshipReadyNotification { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull airshipReadyChannelIdentifier; - [Static] - [Export("airshipReadyChannelIdentifier")] - string AirshipReadyChannelIdentifier { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull airshipReadyAppKey; - [Static] - [Export("airshipReadyAppKey")] - string AirshipReadyAppKey { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull airshipReadyPayloadVersion; - [Static] - [Export("airshipReadyPayloadVersion")] - string AirshipReadyPayloadVersion { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull resetKeyChainKey; - [Static] - [Export("resetKeyChainKey")] - string ResetKeyChainKey { get; } - - // @property (readonly, nonatomic, class) BOOL isFlying; - [Static] - [Export("isFlying")] - bool IsFlying { get; } - - // @property (readonly, nonatomic, strong) UARuntimeConfig * _Nonnull config; - [Export("config", ArgumentSemantic.Strong)] - UARuntimeConfig Config { get; } - - // @property (readonly, nonatomic, strong) UAActionRegistry * _Nonnull actionRegistry; - [Export("actionRegistry", ArgumentSemantic.Strong)] - UAActionRegistry ActionRegistry { get; } + UACustomEvent CreateEvent(); + } + + // @interface UAActionRunner : NSObject + [BaseType(typeof(NSObject))] + interface UAActionRunner + { + // +(void)runActions:(NSDictionary)actionsPayload situation:(enum UAActionSituation)situation completionHandler:(void (^ _Nonnull)(void))completionHandler; + [Static] + [Export("runActions:situation:completionHandler:")] + void RunActions(NSDictionary actionsPayload, UAActionSituation situation, Action completionHandler); + } + + // @interface UAActivityViewController : UIActivityViewController + [BaseType(typeof(NSObject))] + interface UAActivityViewController : IUIPopoverControllerDelegate, IUIPopoverPresentationControllerDelegate + { + // @property (copy, nonatomic) void (^ _Nullable)(void) dismissalBlock; + [NullAllowed, Export("dismissalBlock", ArgumentSemantic.Copy)] + Action DismissalBlock { get; set; } + + // -(CGRect)sourceRect __attribute__((warn_unused_result(""))); + [Export("sourceRect")] + CGRect SourceRect(); + + // -(instancetype _Nonnull)initWithActivityItems:(NSArray * _Nonnull)activityItems applicationActivities:(NSArray * _Nullable)applicationActivities __attribute__((objc_designated_initializer)); + [Export("initWithActivityItems:applicationActivities:")] + [DesignatedInitializer] + IntPtr Constructor(NSObject[] activityItems, [NullAllowed] UIActivity[] applicationActivities); + } + + // @interface UAirship : NSObject + [BaseType(typeof(NSObject))] + [DisableDefaultCtor] + interface UAirship + { + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull deepLinkScheme; + [Static] + [Export("deepLinkScheme")] + string DeepLinkScheme { get; } + + // @property (readonly, nonatomic, class) NSNotificationName _Nonnull airshipReadyNotification; + [Static] + [Export("airshipReadyNotification")] + string AirshipReadyNotification { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull airshipReadyChannelIdentifier; + [Static] + [Export("airshipReadyChannelIdentifier")] + string AirshipReadyChannelIdentifier { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull airshipReadyAppKey; + [Static] + [Export("airshipReadyAppKey")] + string AirshipReadyAppKey { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull airshipReadyPayloadVersion; + [Static] + [Export("airshipReadyPayloadVersion")] + string AirshipReadyPayloadVersion { get; } + + // @property (readonly, nonatomic, class) BOOL isFlying; + [Static] + [Export("isFlying")] + bool IsFlying { get; } + + // @property (readonly, nonatomic, strong) UARuntimeConfig * _Nonnull config; + [Export("config", ArgumentSemantic.Strong)] + UARuntimeConfig Config { get; } // @property (readonly, nonatomic, strong) UAApplicationMetrics * _Nonnull applicationMetrics; [Export("applicationMetrics", ArgumentSemantic.Strong)] - UAApplicationMetrics ApplicationMetrics { get; } - - [Wrap("WeakJavaScriptCommandDelegate")] - [NullAllowed] - IUAJavaScriptCommandDelegate JavaScriptCommandDelegate { get; set; } - - // @property (nonatomic, weak) id _Nullable javaScriptCommandDelegate; - [NullAllowed, Export("javaScriptCommandDelegate", ArgumentSemantic.Weak)] - NSObject WeakJavaScriptCommandDelegate { get; set; } - - // @property (readonly, nonatomic, strong) UAChannelCapture * _Nonnull channelCapture; - [Export("channelCapture", ArgumentSemantic.Strong)] - UAChannelCapture ChannelCapture { get; } - - [Wrap("WeakDeepLinkDelegate")] - [NullAllowed] - IUADeepLinkDelegate DeepLinkDelegate { get; set; } - - // @property (nonatomic, weak) id _Nullable deepLinkDelegate; - [NullAllowed, Export("deepLinkDelegate", ArgumentSemantic.Weak)] - NSObject WeakDeepLinkDelegate { get; set; } - - // @property (readonly, nonatomic, strong) UAURLAllowList * _Nonnull URLAllowList; - [Export("URLAllowList", ArgumentSemantic.Strong)] - UAURLAllowList URLAllowList { get; } - - // @property (readonly, nonatomic, strong) UALocaleManager * _Nonnull localeManager; - [Export("localeManager", ArgumentSemantic.Strong)] - UALocaleManager LocaleManager { get; } - - // @property (readonly, nonatomic, strong) UAPrivacyManager * _Nonnull privacyManager; - [Export("privacyManager", ArgumentSemantic.Strong)] - UAPrivacyManager PrivacyManager { get; } - - // @property (readonly, copy, nonatomic) NSArray> * _Nonnull components; - [Export("components", ArgumentSemantic.Copy)] - IUAComponent[] Components { get; } - - // @property (readonly, nonatomic, strong, class) UAirship * _Nonnull shared; - [Static] - [Export("shared", ArgumentSemantic.Strong)] - UAirship Shared { get; } - - // @property (readonly, nonatomic, strong, class) UAPush * _Nonnull push; - [Static] - [Export("push", ArgumentSemantic.Strong)] - UAPush Push { get; } - - // @property (readonly, nonatomic, strong, class) UAContact * _Nonnull contact; - [Static] - [Export("contact", ArgumentSemantic.Strong)] - UAContact Contact { get; } - - // @property (readonly, nonatomic, strong, class) UAAnalytics * _Nonnull analytics; - [Static] - [Export("analytics", ArgumentSemantic.Strong)] - UAAnalytics Analytics { get; } - - // @property (readonly, nonatomic, strong, class) UAChannel * _Nonnull channel; - [Static] - [Export("channel", ArgumentSemantic.Strong)] - UAChannel Channel { get; } - - // @property (readonly, nonatomic, strong, class) UANamedUser * _Nonnull namedUser; - [Static] - [Export("namedUser", ArgumentSemantic.Strong)] - UANamedUser NamedUser { get; } - - // +(void)takeOffWithLaunchOptions:(NSDictionary * _Nullable)launchOptions; - [Static] - [Export("takeOffWithLaunchOptions:")] - void TakeOff([NullAllowed] NSDictionary launchOptions); - - // +(void)takeOff:(UAConfig * _Nullable)config launchOptions:(NSDictionary * _Nullable)launchOptions; - [Static] - [Export("takeOff:launchOptions:")] - void TakeOff([NullAllowed] UAConfig config, [NullAllowed] NSDictionary launchOptions); - - // @property (nonatomic, class) enum UALogLevel logLevel; - [Static] - [Export("logLevel", ArgumentSemantic.Assign)] - UALogLevel LogLevel { get; set; } - - // +(id _Nullable)componentForClassName:(NSString * _Nonnull)className __attribute__((warn_unused_result(""))); - [Static] - [Export("componentForClassName:")] - [return: NullAllowed] - IUAComponent ComponentForClassName(string className); - - // -(void)deepLink:(NSURL * _Nonnull)deepLink completionHandler:(void (^ _Nonnull)(BOOL))completionHandler; - [Export("deepLink:completionHandler:")] - void DeepLink(NSUrl deepLink, Action completionHandler); - } - - // @interface UAirshipCoreResources : NSObject - [BaseType(typeof(NSObject))] - interface UAirshipCoreResources - { - // @property (readonly, nonatomic, strong, class) NSBundle * _Nonnull bundle; - [Static] - [Export("bundle", ArgumentSemantic.Strong)] - NSBundle Bundle { get; } - } - - // @interface UAirshipErrors : NSObject - [BaseType(typeof(NSObject))] - interface UAirshipErrors - { - // +(NSError * _Nonnull)parseError:(NSString * _Nonnull)message __attribute__((warn_unused_result(""))); - [Static] - [Export("parseError:")] - NSError ParseError(string message); - - // +(NSError * _Nonnull)error:(NSString * _Nonnull)message __attribute__((warn_unused_result(""))); - [Static] - [Export("error:")] - NSError Error(string message); - } - - // @interface UAirshipVersion : NSObject - [BaseType(typeof(NSObject))] - interface UAirshipVersion - { - // +(NSString * _Nonnull)get __attribute__((warn_unused_result(""))); - [Static] - [Export("get")] - string Get { get; } - } - - // @interface UAAnalytics : NSObject - [BaseType(typeof(UAComponent))] - [DisableDefaultCtor] - interface UAAnalytics : IUAComponent - { - // @property (readonly, nonatomic, strong, class) UAAnalytics * _Nonnull shared; - [Static] - [Export("shared", ArgumentSemantic.Strong)] - UAAnalytics Shared { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull screenKey; - [Static] - [Export("screenKey")] - string ScreenKey { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull eventKey; - [Static] - [Export("eventKey")] - string EventKey { get; } - - // @property (readonly, nonatomic, class) NSNotificationName _Nonnull customEventAdded; - [Static] - [Export("customEventAdded")] - string CustomEventAdded { get; } - - // @property (readonly, nonatomic, class) NSNotificationName _Nonnull regionEventAdded; - [Static] - [Export("regionEventAdded")] - string RegionEventAdded { get; } - - // @property (readonly, nonatomic, class) NSNotificationName _Nonnull screenTracked; - [Static] - [Export("screenTracked")] - string ScreenTracked { get; } - - // @property (copy, nonatomic) NSString * _Nullable conversionSendID; - [NullAllowed, Export("conversionSendID")] - string ConversionSendID { get; set; } - - // @property (copy, nonatomic) NSString * _Nullable conversionPushMetadata; - [NullAllowed, Export("conversionPushMetadata")] - string ConversionPushMetadata { get; set; } - - // @property (readonly, copy, nonatomic) NSString * _Nullable sessionID; - [NullAllowed, Export("sessionID")] - string SessionID { get; } - - // @property (getter = isComponentEnabled, nonatomic) BOOL componentEnabled; - [Export("componentEnabled")] - bool ComponentEnabled { [Bind("isComponentEnabled")] get; set; } - - // -(void)addEvent:(id _Nonnull)event; - [Export("addEvent:")] - void AddEvent(IUAEvent @event); - - // -(void)associateDeviceIdentifiers:(UAAssociatedIdentifiers * _Nonnull)associatedIdentifiers; - [Export("associateDeviceIdentifiers:")] - void AssociateDeviceIdentifiers(UAAssociatedIdentifiers associatedIdentifiers); - - // -(UAAssociatedIdentifiers * _Nonnull)currentAssociatedDeviceIdentifiers __attribute__((warn_unused_result(""))); - [Export("currentAssociatedDeviceIdentifiers")] - UAAssociatedIdentifiers CurrentAssociatedDeviceIdentifiers { get; } - - // -(void)trackScreen:(NSString * _Nullable)screen; - [Export("trackScreen:")] - void TrackScreen([NullAllowed] string screen); - - // -(void)scheduleUpload; - [Export("scheduleUpload")] - void ScheduleUpload(); + UAApplicationMetrics ApplicationMetrics { get; } + + [Wrap("WeakJavaScriptCommandDelegate")] + [NullAllowed] + IUAJavaScriptCommandDelegate JavaScriptCommandDelegate { get; set; } + + // @property (nonatomic, weak) id _Nullable javaScriptCommandDelegate; + [NullAllowed, Export("javaScriptCommandDelegate", ArgumentSemantic.Weak)] + NSObject WeakJavaScriptCommandDelegate { get; set; } + + // @property (readonly, nonatomic, strong) UAPermissionsManager * _Nonnull permissionsManager; + [Export("permissionsManager", ArgumentSemantic.Strong)] + UAPermissionsManager PermissionsManager { get; } + + // @property (readonly, nonatomic, strong) UAChannelCapture * _Nonnull channelCapture; + [Export("channelCapture", ArgumentSemantic.Strong)] + UAChannelCapture ChannelCapture { get; } + + [Wrap("WeakDeepLinkDelegate")] + [NullAllowed] + IUADeepLinkDelegate DeepLinkDelegate { get; set; } + + // @property (nonatomic, weak) id _Nullable deepLinkDelegate; + [NullAllowed, Export("deepLinkDelegate", ArgumentSemantic.Weak)] + NSObject WeakDeepLinkDelegate { get; set; } + + // @property (readonly, nonatomic, strong) UAURLAllowList * _Nonnull URLAllowList; + [Export("URLAllowList", ArgumentSemantic.Strong)] + UAURLAllowList URLAllowList { get; } + + // @property (readonly, nonatomic, strong) UALocaleManager * _Nonnull localeManager; + [Export("localeManager", ArgumentSemantic.Strong)] + UALocaleManager LocaleManager { get; } + + // @property (readonly, nonatomic, strong) UAPrivacyManager * _Nonnull privacyManager; + [Export("privacyManager", ArgumentSemantic.Strong)] + UAPrivacyManager PrivacyManager { get; } + + // @property (readonly, nonatomic, strong, class) UAirship * _Nonnull shared; + [Static] + [Export("shared", ArgumentSemantic.Strong)] + UAirship Shared { get; } + + // @property (readonly, nonatomic, strong, class) UAPush * _Nonnull push; + [Static] + [Export("push", ArgumentSemantic.Strong)] + UAPush Push { get; } + + // @property (readonly, nonatomic, strong, class) UAContact * _Nonnull contact; + [Static] + [Export("contact", ArgumentSemantic.Strong)] + UAContact Contact { get; } + + // @property (readonly, nonatomic, strong, class) UAAnalytics * _Nonnull analytics; + [Static] + [Export("analytics", ArgumentSemantic.Strong)] + UAAnalytics Analytics { get; } + + // @property (readonly, nonatomic, strong, class) UAChannel * _Nonnull channel; + [Static] + [Export("channel", ArgumentSemantic.Strong)] + UAChannel Channel { get; } + + // +(void)takeOffWithLaunchOptions:(NSDictionary * _Nullable)launchOptions; + [Static] + [Export("takeOffWithLaunchOptions:")] + void TakeOff([NullAllowed] NSDictionary launchOptions); + + // +(void)takeOff:(UAConfig * _Nullable)config launchOptions:(NSDictionary * _Nullable)launchOptions; + [Static] + [Export("takeOff:launchOptions:")] + void TakeOff([NullAllowed] UAConfig config, [NullAllowed] NSDictionary launchOptions); + + // @property (nonatomic, strong, class) id _Nonnull logHandler; + [Static] + [Export("logHandler", ArgumentSemantic.Strong)] + UAirshipLogHandler LogHandler { get; set; } + + // @property (nonatomic, class) enum UALogLevel logLevel; + [Static] + [Export("logLevel", ArgumentSemantic.Assign)] + UALogLevel LogLevel { get; set; } + + // +(id _Nullable)componentForClassName:(NSString * _Nonnull)className __attribute__((warn_unused_result(""))); + [Static] + [Export("componentForClassName:")] + [return: NullAllowed] + IUAComponent ComponentForClassName(string className); + + // -(void)deepLink:(NSURL * _Nonnull)deepLink completionHandler:(void (^ _Nonnull)(BOOL))completionHandler; + [Export("deepLink:completionHandler:")] + void DeepLink(NSUrl deepLink, Action completionHandler); + } + + // @interface UAirshipCoreResources : NSObject + [BaseType(typeof(NSObject))] + interface UAirshipCoreResources + { + // @property (readonly, nonatomic, strong, class) NSBundle * _Nonnull bundle; + [Static] + [Export("bundle", ArgumentSemantic.Strong)] + NSBundle Bundle { get; } + } + + // @interface UAirshipErrors : NSObject + [BaseType(typeof(NSObject))] + interface UAirshipErrors + { + // +(NSError * _Nonnull)parseError:(NSString * _Nonnull)message __attribute__((warn_unused_result(""))); + [Static] + [Export("parseError:")] + NSError ParseError(string message); + + // +(NSError * _Nonnull)error:(NSString * _Nonnull)message __attribute__((warn_unused_result(""))); + [Static] + [Export("error:")] + NSError Error(string message); + } + + // @interface UAirshipVersion : NSObject + [BaseType(typeof(NSObject))] + interface UAirshipVersion + { + // +(NSString * _Nonnull)get __attribute__((warn_unused_result(""))); + [Static] + [Export("get")] + string Get(); + } + + // @interface UAAnalytics : NSObject + [BaseType(typeof(UAComponent))] + [DisableDefaultCtor] + interface UAAnalytics : IUAComponent + { + // @property (readonly, nonatomic, strong, class) UAAnalytics * _Nonnull shared; + [Static] + [Export("shared", ArgumentSemantic.Strong)] + UAAnalytics Shared { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull screenKey; + [Static] + [Export("screenKey")] + string ScreenKey { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull eventKey; + [Static] + [Export("eventKey")] + string EventKey { get; } + + // @property (readonly, nonatomic, class) NSNotificationName _Nonnull customEventAdded; + [Static] + [Export("customEventAdded")] + string CustomEventAdded { get; } + + // @property (readonly, nonatomic, class) NSNotificationName _Nonnull regionEventAdded; + [Static] + [Export("regionEventAdded")] + string RegionEventAdded { get; } + + // @property (readonly, nonatomic, class) NSNotificationName _Nonnull screenTracked; + [Static] + [Export("screenTracked")] + string ScreenTracked { get; } + + // @property (copy, nonatomic) NSString * _Nullable conversionSendID; + [NullAllowed, Export("conversionSendID")] + string ConversionSendID { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable conversionPushMetadata; + [NullAllowed, Export("conversionPushMetadata")] + string ConversionPushMetadata { get; set; } + + // @property (readonly, copy, nonatomic) NSString * _Nullable sessionID; + [NullAllowed, Export("sessionID")] + string SessionID { get; } + + // @property (getter = isComponentEnabled, nonatomic) BOOL componentEnabled; + [Export("componentEnabled")] + bool ComponentEnabled { [Bind("isComponentEnabled")] get; set; } + + // -(void)addEvent:(id _Nonnull)event; + [Export("addEvent:")] + void AddEvent(IUAEvent @event); + + // -(void)associateDeviceIdentifiers:(UAAssociatedIdentifiers * _Nonnull)associatedIdentifiers; + [Export("associateDeviceIdentifiers:")] + void AssociateDeviceIdentifiers(UAAssociatedIdentifiers associatedIdentifiers); + + // -(UAAssociatedIdentifiers * _Nonnull)currentAssociatedDeviceIdentifiers __attribute__((warn_unused_result(""))); + [Export("currentAssociatedDeviceIdentifiers")] + UAAssociatedIdentifiers CurrentAssociatedDeviceIdentifiers(); + + // -(void)trackScreen:(NSString * _Nullable)screen; + [Export("trackScreen:")] + void TrackScreen([NullAllowed] string screen); + + // -(void)scheduleUpload; + [Export("scheduleUpload")] + void ScheduleUpload(); // -(void)registerSDKExtension:(enum UASDKExtension)ext version:(NSString * _Nonnull)version; [Export("registerSDKExtension:version:")] void RegisterSDKExtension(UASDKExtension ext, string version); - // -(void)launchedFromNotification:(NSDictionary * _Nonnull)notification; - [Export("launchedFromNotification:")] - void LaunchedFromNotification(NSDictionary notification); - } - - // @interface UAAppIntegration : NSObject - [BaseType(typeof(NSObject))] - interface UAAppIntegration - { - // @property (nonatomic, strong, class) id _Nullable integrationDelegate; - [Static] - [NullAllowed, Export("integrationDelegate", ArgumentSemantic.Strong)] - NSObject WeakIntegrationDelegate { get; set; } - - // +(void)applicatin:(UIApplication * _Nonnull)application performFetchWithCompletionHandler:(void (^ _Nonnull)(UIBackgroundFetchResult))completionHandler __attribute__((deprecated("Use application(_:performFetchWithCompletionHandler:) instead"))); - [Static] - [Export("applicatin:performFetchWithCompletionHandler:")] - void PerformFetch(UIApplication application, Action completionHandler); - - // +(void)application:(UIApplication * _Nonnull)application performFetchWithCompletionHandler:(void (^ _Nonnull)(UIBackgroundFetchResult))completionHandler; - [Static] - [Export("application:performFetchWithCompletionHandler:")] - void Application(UIApplication application, Action completionHandler); - - // +(void)application:(UIApplication * _Nonnull)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData * _Nonnull)deviceToken; - [Static] - [Export("application:didRegisterForRemoteNotificationsWithDeviceToken:")] - void DidRegisterForRemoteNotifications(UIApplication application, NSData deviceToken); - - // +(void)application:(UIApplication * _Nonnull)application didFailToRegisterForRemoteNotificationsWithError:(NSError * _Nonnull)error; - [Static] - [Export("application:didFailToRegisterForRemoteNotificationsWithError:")] - void DidFailToRegisterForRemoteNotifications(UIApplication application, NSError error); - - // +(void)application:(UIApplication * _Nonnull)application didReceiveRemoteNotification:(NSDictionary * _Nonnull)userInfo fetchCompletionHandler:(void (^ _Nonnull)(UIBackgroundFetchResult))completionHandler; - [Static] - [Export("application:didReceiveRemoteNotification:fetchCompletionHandler:")] - void DidReceiveRemoteNotification(UIApplication application, NSDictionary userInfo, Action completionHandler); - - // +(void)userNotificationCenterWithCenter:(UNUserNotificationCenter * _Nonnull)center willPresentNotification:(UNNotification * _Nonnull)notification withCompletionHandler:(void (^ _Nonnull)(UNNotificationPresentationOptions))completionHandler __attribute__((deprecated("Use userNotificationCenter(_:willPresent:withCompletionHandler:) instead"))); - [Static] - [Export("userNotificationCenterWithCenter:willPresentNotification:withCompletionHandler:")] - void WillPresentNotification(UNUserNotificationCenter center, UNNotification notification, Action completionHandler); - - // +(void)userNotificationCenter:(UNUserNotificationCenter * _Nonnull)center willPresentNotification:(UNNotification * _Nonnull)notification withCompletionHandler:(void (^ _Nonnull)(UNNotificationPresentationOptions))completionHandler; - [Static] - [Export("userNotificationCenter:willPresentNotification:withCompletionHandler:")] - void UserNotificationCenter(UNUserNotificationCenter center, UNNotification notification, Action completionHandler); - - // +(void)userNotificationCenterWithCenter:(UNUserNotificationCenter * _Nonnull)center didReceiveNotificationResponse:(UNNotificationResponse * _Nonnull)response withCompletionHandler:(void (^ _Nonnull)(void))completionHandler __attribute__((deprecated("Use userNotificationCenter(_:didReceive:withCompletionHandler:) instead"))); - [Static] - [Export("userNotificationCenterWithCenter:didReceiveNotificationResponse:withCompletionHandler:")] - void DidReceiveNotificationResponse(UNUserNotificationCenter center, UNNotificationResponse response, Action completionHandler); - - // +(void)userNotificationCenter:(UNUserNotificationCenter * _Nonnull)center didReceiveNotificationResponse:(UNNotificationResponse * _Nonnull)response withCompletionHandler:(void (^ _Nonnull)(void))completionHandler; - [Static] - [Export("userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:")] - void UserNotificationCenter(UNUserNotificationCenter center, UNNotificationResponse response, Action completionHandler); - - } - - // @interface UAApplicationMetrics : NSObject - [BaseType(typeof(NSObject))] - [DisableDefaultCtor] - interface UAApplicationMetrics - { - // @property (readonly, nonatomic) BOOL isAppVersionUpdated; - [Export("isAppVersionUpdated")] - bool IsAppVersionUpdated { get; } - - // @property (readonly, copy, nonatomic) NSDate * _Nullable lastApplicationOpenDate; - [NullAllowed, Export("lastApplicationOpenDate", ArgumentSemantic.Copy)] - NSDate LastApplicationOpenDate { get; } - - // @property (readonly, copy, nonatomic) NSString * _Nullable currentAppVersion; - [NullAllowed, Export("currentAppVersion")] - string CurrentAppVersion { get; } - } - - // @interface UAAssociatedIdentifiers : NSObject - [BaseType(typeof(NSObject))] - interface UAAssociatedIdentifiers - { - // @property (readonly, nonatomic, class) NSInteger maxCount; - [Static] - [Export("maxCount")] - nint MaxCount { get; } - - // @property (readonly, nonatomic, class) NSInteger maxCharacterCount; - [Static] - [Export("maxCharacterCount")] - nint MaxCharacterCount { get; } - - // @property (copy, nonatomic) NSString * _Nullable advertisingID; - [NullAllowed, Export("advertisingID")] - string AdvertisingID { get; set; } - - // @property (copy, nonatomic) NSString * _Nullable vendorID; - [NullAllowed, Export("vendorID")] - string VendorID { get; set; } - - // @property (nonatomic) BOOL advertisingTrackingEnabled; - [Export("advertisingTrackingEnabled")] - bool AdvertisingTrackingEnabled { get; set; } - - // @property (readonly, copy, nonatomic) NSDictionary * _Nonnull allIDs; - [Export("allIDs", ArgumentSemantic.Copy)] - NSDictionary AllIDs { get; } - - // -(instancetype _Nonnull)initWithIdentifiers:(NSDictionary * _Nullable)identifiers __attribute__((objc_designated_initializer)); - [Export("initWithIdentifiers:")] - [DesignatedInitializer] - IntPtr Constructor([NullAllowed] NSDictionary identifiers); - - // +(UAAssociatedIdentifiers * _Nonnull)identifiers __attribute__((warn_unused_result(""))); - [Static] - [Export("identifiers")] - UAAssociatedIdentifiers Identifiers(); - - // +(UAAssociatedIdentifiers * _Nonnull)identifiersWithDictionary:(NSDictionary * _Nullable)identifiers __attribute__((warn_unused_result(""))); - [Static] - [Export("identifiersWithDictionary:")] - UAAssociatedIdentifiers Identifiers([NullAllowed] NSDictionary identifiers); - - // -(void)setIdentifier:(NSString * _Nullable)identifier forKey:(NSString * _Nonnull)key; - [Export("setIdentifier:forKey:")] - void SetIdentifier([NullAllowed] string identifier, string key); - } - - // @interface UAAttributeMutations : NSObject - [BaseType(typeof(NSObject))] - interface UAAttributeMutations - { - // -(void)setString:(NSString * _Nonnull)string forAttribute:(NSString * _Nonnull)forAttribute; - [Export("setString:forAttribute:")] - void SetString(string @string, string forAttribute); - - // -(void)setNumber:(NSNumber * _Nonnull)number forAttribute:(NSString * _Nonnull)forAttribute; - [Export("setNumber:forAttribute:")] - void SetNumber(NSNumber number, string forAttribute); - - // -(void)setDate:(NSDate * _Nonnull)date forAttribute:(NSString * _Nonnull)forAttribute; - [Export("setDate:forAttribute:")] - void SetDate(NSDate date, string forAttribute); - - // -(void)removeAttribute:(NSString * _Nonnull)attribute; - [Export("removeAttribute:")] - void RemoveAttribute(string attribute); - - // +(UAAttributeMutations * _Nonnull)mutations __attribute__((warn_unused_result(""))); - [Static] - [Export("mutations")] - UAAttributeMutations Mutations { get; } - - // -(void)applyMutationsWithEditor:(UAAttributesEditor * _Nonnull)editor; - [Export("applyMutationsWithEditor:")] - void ApplyMutations(UAAttributesEditor editor); - } - - // @interface UAAttributes : NSObject - [BaseType(typeof(NSObject))] - interface UAAttributes - { - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull title; - [Static] - [Export("title")] - string Title { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull firstName; - [Static] - [Export("firstName")] - string FirstName { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull lastName; - [Static] - [Export("lastName")] - string LastName { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull fullName; - [Static] - [Export("fullName")] - string FullName { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull gender; - [Static] - [Export("gender")] - string Gender { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull zipCode; - [Static] - [Export("zipCode")] - string ZipCode { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull city; - [Static] - [Export("city")] - string City { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull region; - [Static] - [Export("region")] - string Region { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull country; - [Static] - [Export("country")] - string Country { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull birthdate; - [Static] - [Export("birthdate")] - string Birthdate { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull age; - [Static] - [Export("age")] - string Age { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull mobilePhone; - [Static] - [Export("mobilePhone")] - string MobilePhone { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull homePhone; - [Static] - [Export("homePhone")] - string HomePhone { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull workPhone; - [Static] - [Export("workPhone")] - string WorkPhone { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull loyaltyTier; - [Static] - [Export("loyaltyTier")] - string LoyaltyTier { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull company; - [Static] - [Export("company")] - string Company { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull username; - [Static] - [Export("username")] - string Username { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull accountCreation; - [Static] - [Export("accountCreation")] - string AccountCreation { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull email; - [Static] - [Export("email")] - string Email { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull advertisingId; - [Static] - [Export("advertisingId")] - string AdvertisingId { get; } - } - - // @interface UAAttributesActionPredicate : NSObject - [BaseType(typeof(NSObject))] - interface UAAttributesActionPredicate : IUAActionPredicateProtocol - { + // -(void)airshipReady; + [Export("airshipReady")] + void AirshipReady(); } - // @interface UAAttributesEditor : NSObject + // @interface UAAppIntegration : NSObject [BaseType(typeof(NSObject))] - [DisableDefaultCtor] - interface UAAttributesEditor - { - // -(void)removeAttribute:(NSString * _Nonnull)attribute; - [Export("removeAttribute:")] - void RemoveAttribute(string attribute); - - // -(void)setDate:(NSDate * _Nonnull)date attribute:(NSString * _Nonnull)attribute; - [Export("setDate:attribute:")] - void SetDate(NSDate date, string attribute); - - // -(void)setNumber:(NSNumber * _Nonnull)number attribute:(NSString * _Nonnull)attribute; - [Export("setNumber:attribute:")] - void SetNumber(NSNumber number, string attribute); - - // -(void)setString:(NSString * _Nonnull)string attribute:(NSString * _Nonnull)attribute; - [Export("setString:attribute:")] - void SetString(string @string, string attribute); - - // -(void)apply; - [Export("apply")] - void Apply(); - } - - // @interface UABespokeCloseView : UIView - [BaseType(typeof(UIView))] - interface UABespokeCloseView - { - // -(instancetype _Nonnull)initWithFrame:(CGRect)frame __attribute__((objc_designated_initializer)); - [Export("initWithFrame:")] - [DesignatedInitializer] - IntPtr Constructor(CGRect frame); - - // -(void)drawRect:(CGRect)rect; - [Export("drawRect:")] - void DrawRect(CGRect rect); - } - - // @interface UABeveledLoadingIndicator : UIView - [BaseType(typeof(UIView))] - interface UABeveledLoadingIndicator - { - // -(void)show; - [Export("show")] - void Show(); - - // -(void)hide; - [Export("hide")] - void Hide(); - } - - delegate bool IUAActionPredicate(UAActionArguments arg0); - delegate void IUAActionCompletionHandler(UAActionResult arg0); - delegate void IUAActionBlock(UAActionArguments arg0, [BlockCallback] IUAActionCompletionHandler arg1); - - // @interface UABlockAction : NSObject - [BaseType(typeof(NSObject))] - [DisableDefaultCtor] - interface UABlockAction : IUAAction - { - // -(instancetype _Nonnull)initWithPredicate:(UAActionPredicate _Nullable)predicate block:(UAActionBlock _Nonnull)block __attribute__((objc_designated_initializer)); - [Export("initWithPredicate:block:")] - [DesignatedInitializer] - IntPtr Constructor([NullAllowed] IUAActionPredicate predicate, IUAActionBlock block); - - // -(instancetype _Nonnull)initWithBlock:(UAActionBlock _Nonnull)block; - [Export("initWithBlock:")] - IntPtr Constructor(IUAActionBlock block); - } - - // @interface UAChannel : NSObject - [BaseType(typeof(NSObject))] - [DisableDefaultCtor] - interface UAChannel : IUAComponent - { - // @property (readonly, nonatomic, class) NSNotificationName _Nonnull channelCreatedEvent; - [Static] - [Export("channelCreatedEvent")] - string ChannelCreatedEvent { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull channelIdentifierKey; - [Static] - [Export("channelIdentifierKey")] - string ChannelIdentifierKey { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull channelExistingKey; - [Static] - [Export("channelExistingKey")] - string ChannelExistingKey { get; } - - // @property (readonly, nonatomic, class) NSNotificationName _Nonnull channelUpdatedEvent; - [Static] - [Export("channelUpdatedEvent")] - string ChannelUpdatedEvent { get; } - - // @property (readonly, nonatomic, class) NSNotificationName _Nonnull channelRegistrationFailedEvent; - [Static] - [Export("channelRegistrationFailedEvent")] - string ChannelRegistrationFailedEvent { get; } - - // @property (readonly, nonatomic, class) NSNotificationName _Nonnull audienceUpdatedEvent; - [Static] - [Export("audienceUpdatedEvent")] - string AudienceUpdatedEvent { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull audienceTagsKey; - [Static] - [Export("audienceTagsKey")] - string AudienceTagsKey { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull audienceAttributesKey; - [Static] - [Export("audienceAttributesKey")] - string AudienceAttributesKey { get; } - - // @property (readonly, nonatomic) BOOL isChannelCreationEnabled; - [Export("isChannelCreationEnabled")] - bool IsChannelCreationEnabled { get; } - - // @property (readonly, copy, nonatomic) NSString * _Nullable identifier; - [NullAllowed, Export("identifier")] - string Identifier { get; } - - // @property (readonly, copy, nonatomic) NSArray * _Nonnull pendingTagGroupUpdates; - [Export("pendingTagGroupUpdates", ArgumentSemantic.Copy)] - UATagGroupUpdate[] PendingTagGroupUpdates { get; } - - // @property (copy, nonatomic) NSArray * _Nonnull tags; - [Export("tags", ArgumentSemantic.Copy)] - string[] Tags { get; set; } - - // @property (nonatomic) BOOL isChannelTagRegistrationEnabled; - [Export("isChannelTagRegistrationEnabled")] - bool IsChannelTagRegistrationEnabled { get; set; } - - // @property (getter = isComponentEnabled, nonatomic) BOOL componentEnabled; - [Export("componentEnabled")] - bool ComponentEnabled { [Bind("isComponentEnabled")] get; set; } - - // @property (readonly, nonatomic, strong, class) UAChannel * _Nonnull shared; - [Static] - [Export("shared", ArgumentSemantic.Strong)] - UAChannel Shared { get; } - - // -(UATagEditor * _Nonnull)editTags __attribute__((warn_unused_result(""))); - [Export("editTags")] - UATagEditor EditTags { get; } - - // -(void)editTags:(void (^ _Nonnull)(UATagEditor * _Nonnull))editorBlock; - [Export("editTags:")] - void EditTagsAsync(Action editorBlock); - - // -(UATagGroupsEditor * _Nonnull)editTagGroups __attribute__((warn_unused_result(""))); - [Export("editTagGroups")] - UATagGroupsEditor EditTagGroups { get; } - - // -(void)editTagGroups:(void (^ _Nonnull)(UATagGroupsEditor * _Nonnull))editorBlock; - [Export("editTagGroups:")] - void EditTagGroupsAsync(Action editorBlock); - - // -(UASubscriptionListEditor * _Nonnull)editSubscriptionLists __attribute__((warn_unused_result(""))); - [Export("editSubscriptionLists")] - UASubscriptionListEditor EditSubscriptionLists { get; } - - // -(void)editSubscriptionLists:(void (^ _Nonnull)(UASubscriptionListEditor * _Nonnull))editorBlock; - [Export("editSubscriptionLists:")] - void EditSubscriptionListsAsync(Action editorBlock); - - // -(UADisposable * _Nonnull)fetchSubscriptionListsWithCompletionHandler:(void (^ _Nonnull)(NSArray * _Nullable, NSError * _Nullable))completionHandler; - [Export("fetchSubscriptionListsWithCompletionHandler:")] - UADisposable FetchSubscriptionLists(Action, NSError> completionHandler); + interface UAAppIntegration + { + // @property (nonatomic, strong, class) id _Nullable integrationDelegate; + [Static] + [NullAllowed, Export("integrationDelegate", ArgumentSemantic.Strong)] + NSObject WeakIntegrationDelegate { get; set; } - // -(UAAttributesEditor * _Nonnull)editAttributes __attribute__((warn_unused_result(""))); - [Export("editAttributes")] - UAAttributesEditor EditAttributes { get; } - - // -(void)editAttributes:(void (^ _Nonnull)(UAAttributesEditor * _Nonnull))editorBlock; - [Export("editAttributes:")] - void EditAttributesAsync(Action editorBlock); - - // -(void)addTag:(NSString * _Nonnull)tag __attribute__((deprecated("Use editTags instead."))); - [Export("addTag:")] - void AddTag(string tag); - - // -(void)addTags:(NSArray * _Nonnull)tags __attribute__((deprecated("Use editTags instead."))); - [Export("addTags:")] - void AddTags(string[] tags); - - // -(void)removeTag:(NSString * _Nonnull)tag __attribute__((deprecated("Use editTags instead."))); - [Export("removeTag:")] - void RemoveTag(string tag); - - // -(void)removeTags:(NSArray * _Nonnull)tags __attribute__((deprecated("Use editTags instead."))); - [Export("removeTags:")] - void RemoveTags(string[] tags); - - // -(void)addTags:(NSArray * _Nonnull)tags group:(NSString * _Nonnull)group __attribute__((deprecated("Use editTagGroups instead."))); - [Export("addTags:group:")] - void AddTags(string[] tags, string group); - - // -(void)removeTags:(NSArray * _Nonnull)tags group:(NSString * _Nonnull)group __attribute__((deprecated("Use editTagGroups instead."))); - [Export("removeTags:group:")] - void RemoveTags(string[] tags, string group); - - // -(void)setTags:(NSArray * _Nonnull)tags group:(NSString * _Nonnull)group __attribute__((deprecated("Use editTagGroups instead."))); - [Export("setTags:group:")] - void SetTags(string[] tags, string group); - - // -(void)applyAttributeMutations:(UAAttributeMutations * _Nonnull)mutations __attribute__((deprecated("Use editAttributes instead."))); - [Export("applyAttributeMutations:")] - void ApplyAttributeMutations(UAAttributeMutations mutations); - - // -(void)enableChannelCreation; - [Export("enableChannelCreation")] - void EnableChannelCreation(); - - // -(void)updateRegistration; - [Export("updateRegistration")] - void UpdateRegistration(); - - // -(void)updateRegistrationForcefully:(BOOL)forcefully; - [Export("updateRegistrationForcefully:")] - void UpdateRegistrationForcefully(bool forcefully); - } - - // @interface UAChannelCapture : NSObject - [NoTV] - [BaseType(typeof(NSObject))] - [DisableDefaultCtor] - interface UAChannelCapture - { - // @property (nonatomic) BOOL enabled; - [Export("enabled")] - bool Enabled { get; set; } - } - - // @interface UACircularRegion : NSObject - [BaseType(typeof(NSObject))] - [DisableDefaultCtor] - interface UACircularRegion - { - // -(instancetype _Nullable)initWithRadius:(double)radius latitude:(double)latitude longitude:(double)longitude __attribute__((objc_designated_initializer)); - [Export("initWithRadius:latitude:longitude:")] - [DesignatedInitializer] - IntPtr Constructor(double radius, double latitude, double longitude); - - // +(UACircularRegion * _Nullable)circularRegionWithRadius:(double)radius latitude:(double)latitude longitude:(double)longitude __attribute__((warn_unused_result(""))); - [Static] - [Export("circularRegionWithRadius:latitude:longitude:")] - [return: NullAllowed] - UACircularRegion CircularRegion(double radius, double latitude, double longitude); - } - - // @interface UAConfig : NSObject - [BaseType(typeof(NSObject))] - interface UAConfig : INSCopying - { - // @property (copy, nonatomic) NSString * _Nullable developmentAppKey; - [NullAllowed, Export("developmentAppKey")] - string DevelopmentAppKey { get; set; } - - // @property (copy, nonatomic) NSString * _Nullable developmentAppSecret; - [NullAllowed, Export("developmentAppSecret")] - string DevelopmentAppSecret { get; set; } - - // @property (copy, nonatomic) NSString * _Nullable productionAppKey; - [NullAllowed, Export("productionAppKey")] - string ProductionAppKey { get; set; } - - // @property (copy, nonatomic) NSString * _Nullable productionAppSecret; - [NullAllowed, Export("productionAppSecret")] - string ProductionAppSecret { get; set; } - - // @property (nonatomic) enum UALogLevel developmentLogLevel; - [Export("developmentLogLevel", ArgumentSemantic.Assign)] - UALogLevel DevelopmentLogLevel { get; set; } - - // @property (nonatomic) enum UALogLevel productionLogLevel; - [Export("productionLogLevel", ArgumentSemantic.Assign)] - UALogLevel ProductionLogLevel { get; set; } - - // @property (nonatomic) enum UACloudSite site; - [Export("site", ArgumentSemantic.Assign)] - UACloudSite Site { get; set; } - - // @property (nonatomic) UAFeatures enabledFeatures; - [Export("enabledFeatures", ArgumentSemantic.Assign)] - UAFeatures EnabledFeatures { get; set; } - - // @property (copy, nonatomic) NSString * _Nonnull defaultAppKey; - [Export("defaultAppKey")] - string DefaultAppKey { get; set; } - - // @property (copy, nonatomic) NSString * _Nonnull defaultAppSecret; - [Export("defaultAppSecret")] - string DefaultAppSecret { get; set; } - - // @property (nonatomic) BOOL inProduction; - [Export("inProduction")] - bool InProduction { get; set; } - - // @property (nonatomic) BOOL detectProvisioningMode; - [Export("detectProvisioningMode")] - bool DetectProvisioningMode { get; set; } - - // @property (copy, nonatomic) NSString * _Nullable profilePath; - [NullAllowed, Export("profilePath")] - string ProfilePath { get; set; } - - // @property (nonatomic) BOOL isAutomaticSetupEnabled; - [Export("isAutomaticSetupEnabled")] - bool IsAutomaticSetupEnabled { get; set; } - - // @property (copy, nonatomic) NSArray * _Nonnull URLAllowList; - [Export("URLAllowList", ArgumentSemantic.Copy)] - string[] URLAllowList { get; set; } - - // @property (copy, nonatomic) NSArray * _Nonnull URLAllowListScopeJavaScriptInterface; - [Export("URLAllowListScopeJavaScriptInterface", ArgumentSemantic.Copy)] - string[] URLAllowListScopeJavaScriptInterface { get; set; } - - // @property (copy, nonatomic) NSArray * _Nonnull URLAllowListScopeOpenURL; - [Export("URLAllowListScopeOpenURL", ArgumentSemantic.Copy)] - string[] URLAllowListScopeOpenURL { get; set; } - - // @property (nonatomic) BOOL suppressAllowListError; - [Export("suppressAllowListError")] - bool SuppressAllowListError { get; set; } - - // @property (copy, nonatomic) NSString * _Nullable itunesID; - [NullAllowed, Export("itunesID")] - string ItunesID { get; set; } - - // @property (nonatomic) BOOL isAnalyticsEnabled; - [Export("isAnalyticsEnabled")] - bool IsAnalyticsEnabled { get; set; } - - // @property (copy, nonatomic) NSString * _Nullable messageCenterStyleConfig; - [NullAllowed, Export("messageCenterStyleConfig")] - string MessageCenterStyleConfig { get; set; } - - // @property (nonatomic) BOOL clearUserOnAppRestore; - [Export("clearUserOnAppRestore")] - bool ClearUserOnAppRestore { get; set; } - - // @property (nonatomic) BOOL clearNamedUserOnAppRestore; - [Export("clearNamedUserOnAppRestore")] - bool ClearNamedUserOnAppRestore { get; set; } - - // @property (nonatomic) BOOL isChannelCaptureEnabled; - [Export("isChannelCaptureEnabled")] - bool IsChannelCaptureEnabled { get; set; } - - // @property (nonatomic) BOOL isChannelCreationDelayEnabled; - [Export("isChannelCreationDelayEnabled")] - bool IsChannelCreationDelayEnabled { get; set; } - - // @property (nonatomic) BOOL isExtendedBroadcastsEnabled; - [Export("isExtendedBroadcastsEnabled")] - bool IsExtendedBroadcastsEnabled { get; set; } - - // @property (copy, nonatomic) NSDictionary * _Nonnull customConfig; - [Export("customConfig", ArgumentSemantic.Copy)] - NSDictionary CustomConfig { get; set; } - - // @property (nonatomic) BOOL requestAuthorizationToUseNotifications; - [Export("requestAuthorizationToUseNotifications")] - bool RequestAuthorizationToUseNotifications { get; set; } - - // @property (nonatomic) BOOL requireInitialRemoteConfigEnabled; - [Export("requireInitialRemoteConfigEnabled")] - bool RequireInitialRemoteConfigEnabled { get; set; } - - // @property (copy, nonatomic) NSString * _Nullable deviceAPIURL; - [NullAllowed, Export("deviceAPIURL")] - string DeviceAPIURL { get; set; } - - // @property (copy, nonatomic) NSString * _Nullable analyticsURL; - [NullAllowed, Export("analyticsURL")] - string AnalyticsURL { get; set; } - - // @property (copy, nonatomic) NSString * _Nullable remoteDataAPIURL; - [NullAllowed, Export("remoteDataAPIURL")] - string RemoteDataAPIURL { get; set; } - - // @property (copy, nonatomic) NSString * _Nullable chatURL; - [NullAllowed, Export("chatURL")] - string ChatURL { get; set; } - - // @property (copy, nonatomic) NSString * _Nullable chatWebSocketURL; - [NullAllowed, Export("chatWebSocketURL")] - string ChatWebSocketURL { get; set; } - - // @property (readonly, copy, nonatomic) NSString * _Nonnull appKey; - [Export("appKey")] - string AppKey { get; } - - // @property (readonly, copy, nonatomic) NSString * _Nonnull appSecret; - [Export("appSecret")] - string AppSecret { get; } - - // @property (readonly, nonatomic) enum UALogLevel logLevel; - [Export("logLevel")] - UALogLevel LogLevel { get; } - - // +(UAConfig * _Nonnull)defaultConfig __attribute__((warn_unused_result(""))); - [Static] - [Export("defaultConfig")] - UAConfig DefaultConfig(); - - // +(UAConfig * _Nonnull)configWithContentsOfFile:(NSString * _Nullable)path __attribute__((warn_unused_result(""))); - [Static] - [Export("configWithContentsOfFile:")] - UAConfig Config([NullAllowed] string path); - - // +(UAConfig * _Nonnull)config __attribute__((warn_unused_result(""))); - [Static] - [Export("config")] - UAConfig Config(); - - // -(instancetype _Nonnull)initWithContentsOfFile:(NSString * _Nullable)path; - [Export("initWithContentsOfFile:")] - IntPtr Constructor([NullAllowed] string path); - - // -(BOOL)validate __attribute__((warn_unused_result(""))); - [Export("validate")] - bool Validate (); - - // +(BOOL)isProductionProvisioningProfile:(NSString * _Nonnull)profilePath __attribute__((warn_unused_result(""))); - [Static] - [Export("isProductionProvisioningProfile:")] - bool IsProductionProvisioningProfile(string profilePath); - } - - // @interface UAConnectionType : NSObject - [BaseType(typeof(NSObject))] - interface UAConnectionType - { - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull none; - [Static] - [Export("none")] - string None { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull cell; - [Static] - [Export("cell")] - string Cell { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull wifi; - [Static] - [Export("wifi")] - string Wifi { get; } - } - - // @interface UAContact : NSObject - [BaseType(typeof(NSObject))] - [DisableDefaultCtor] - interface UAContact : IUAComponent - { - // @property (readonly, nonatomic, class) NSNotificationName _Nonnull contactChangedEvent; - [Static] - [Export("contactChangedEvent")] - string ContactChangedEvent { get; } - - // @property (readonly, nonatomic, class) NSNotificationName _Nonnull audienceUpdatedEvent; - [Static] - [Export("audienceUpdatedEvent")] - string AudienceUpdatedEvent { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull tagsKey; - [Static] - [Export("tagsKey")] - string TagsKey { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull attributesKey; - [Static] - [Export("attributesKey")] - string AttributesKey { get; } - - // @property (readonly, nonatomic, class) NSInteger maxNamedUserIDLength; - [Static] - [Export("maxNamedUserIDLength")] - nint MaxNamedUserIDLength { get; } - - [Wrap("WeakConflictDelegate")] - [NullAllowed] - IUAContactConflictDelegate ConflictDelegate { get; set; } - - // @property (nonatomic, weak) id _Nullable conflictDelegate; - [NullAllowed, Export("conflictDelegate", ArgumentSemantic.Weak)] - NSObject WeakConflictDelegate { get; set; } - - // @property (readonly, copy, nonatomic) NSString * _Nullable namedUserID; - [NullAllowed, Export("namedUserID")] - string NamedUserID { get; } - - // @property (getter = isComponentEnabled, nonatomic) BOOL componentEnabled; - [Export("componentEnabled")] - bool ComponentEnabled { [Bind("isComponentEnabled")] get; set; } - - // @property (readonly, nonatomic, strong, class) UAContact * _Nonnull shared; - [Static] - [Export("shared", ArgumentSemantic.Strong)] - UAContact Shared { get; } - - // -(void)identify:(NSString * _Nonnull)namedUserID; - [Export("identify:")] - void Identify(string namedUserID); - - // -(void)reset; - [Export("reset")] - void Reset(); - - // -(UATagGroupsEditor * _Nonnull)editTagGroups __attribute__((warn_unused_result(""))); - [Export("editTagGroups")] - UATagGroupsEditor EditTagGroups (); - - // -(void)editTagGroups:(void (^ _Nonnull)(UATagGroupsEditor * _Nonnull))editorBlock; - [Export("editTagGroups:")] - void EditTagGroups(Action editorBlock); - - // -(UAAttributesEditor * _Nonnull)editAttributes __attribute__((warn_unused_result(""))); - [Export("editAttributes")] - UAAttributesEditor EditAttributes (); - - // -(void)editAttributes:(void (^ _Nonnull)(UAAttributesEditor * _Nonnull))editorBlock; - [Export("editAttributes:")] - void EditAttributes(Action editorBlock); - } - - // @protocol UAContactConflictDelegate - [Protocol, Model] - [BaseType(typeof(NSObject))] - interface UAContactConflictDelegate - { - // @required -(void)onConflictWithAnonymousContactData:(UAContactData * _Nonnull)anonymousContactData namedUserID:(NSString * _Nullable)namedUserID; - [Abstract] - [Export("onConflictWithAnonymousContactData:namedUserID:")] - void OnConflict(UAContactData anonymousContactData, [NullAllowed] string namedUserID); - } - - interface IUAContactConflictDelegate { }; - - // @interface UAContactData : NSObject - [BaseType(typeof(NSObject))] - [DisableDefaultCtor] - interface UAContactData - { - // @property (readonly, copy, nonatomic) NSDictionary *> * _Nonnull tags; - [Export("tags", ArgumentSemantic.Copy)] - NSDictionary> Tags { get; } - - // @property (readonly, copy, nonatomic) NSDictionary * _Nonnull attributes; - [Export("attributes", ArgumentSemantic.Copy)] - NSDictionary Attributes { get; } - - // -(instancetype _Nonnull)initWithTags:(NSDictionary *> * _Nonnull)tags attributes:(NSDictionary * _Nonnull)attributes __attribute__((objc_designated_initializer)); - [Export("initWithTags:attributes:")] - [DesignatedInitializer] - IntPtr Constructor(NSDictionary> tags, NSDictionary attributes); - } - - // @interface UACustomEvent : NSObject - [BaseType(typeof(NSObject))] - [DisableDefaultCtor] - interface UACustomEvent : IUAEvent - { - // @property (readonly, nonatomic, class) NSInteger maxPropertiesSize; - [Static] - [Export("maxPropertiesSize")] - nint MaxPropertiesSize { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull eventNameKey; - [Static] - [Export("eventNameKey")] - string EventNameKey { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull eventValueKey; - [Static] - [Export("eventValueKey")] - string EventValueKey { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull eventPropertiesKey; - [Static] - [Export("eventPropertiesKey")] - string EventPropertiesKey { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull eventTransactionIDKey; - [Static] - [Export("eventTransactionIDKey")] - string EventTransactionIDKey { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull eventInteractionIDKey; - [Static] - [Export("eventInteractionIDKey")] - string EventInteractionIDKey { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull eventInteractionTypeKey; - [Static] - [Export("eventInteractionTypeKey")] - string EventInteractionTypeKey { get; } - - // @property (copy, nonatomic) NSString * _Nullable conversionSendID; - [NullAllowed, Export("conversionSendID")] - string ConversionSendID { get; set; } - - // @property (copy, nonatomic) NSString * _Nullable conversionPushMetadata; - [NullAllowed, Export("conversionPushMetadata")] - string ConversionPushMetadata { get; set; } - - // @property (copy, nonatomic) NSString * _Nullable templateType; - [NullAllowed, Export("templateType")] - string TemplateType { get; set; } - - // @property (nonatomic, strong) NSNumber * _Nullable eventValue; - [NullAllowed, Export("eventValue", ArgumentSemantic.Strong)] - NSNumber EventValue { get; set; } - - // @property (copy, nonatomic) NSString * _Nullable eventName; - [NullAllowed, Export("eventName")] - string EventName { get; set; } - - // @property (copy, nonatomic) NSString * _Nullable transactionID; - [NullAllowed, Export("transactionID")] - string TransactionID { get; set; } - - // @property (copy, nonatomic) NSString * _Nullable interactionType; - [NullAllowed, Export("interactionType")] - string InteractionType { get; set; } - - // @property (copy, nonatomic) NSString * _Nullable interactionID; - [NullAllowed, Export("interactionID")] - string InteractionID { get; set; } - - // @property (copy, nonatomic) NSDictionary * _Nonnull properties; - [Export("properties", ArgumentSemantic.Copy)] - NSDictionary Properties { get; set; } - - // @property (readonly, copy, nonatomic) NSString * _Nonnull eventType; - [Export("eventType")] - string EventType { get; } - - // -(instancetype _Nonnull)initWithName:(NSString * _Nonnull)name value:(NSNumber * _Nullable)value __attribute__((objc_designated_initializer)); - [Export("initWithName:value:")] - [DesignatedInitializer] - IntPtr Constructor(string name, [NullAllowed] NSNumber value); - - // -(instancetype _Nonnull)initWithName:(NSString * _Nonnull)name stringValue:(NSString * _Nullable)stringValue; - [Export("initWithName:stringValue:")] - IntPtr Constructor(string name, [NullAllowed] string stringValue); - - // +(UACustomEvent * _Nonnull)eventWithName:(NSString * _Nonnull)name __attribute__((warn_unused_result(""))); - [Static] - [Export("eventWithName:")] - UACustomEvent Event(string name); - - // +(UACustomEvent * _Nonnull)eventWithName:(NSString * _Nonnull)name valueFromString:(NSString * _Nullable)string __attribute__((warn_unused_result(""))); - [Static] - [Export("eventWithName:valueFromString:")] - UACustomEvent Event(string name, [NullAllowed] string @string); - - // +(UACustomEvent * _Nonnull)eventWithName:(NSString * _Nonnull)name value:(NSNumber * _Nullable)value __attribute__((warn_unused_result(""))); - [Static] - [Export("eventWithName:value:")] - UACustomEvent Event(string name, [NullAllowed] NSNumber value); - - // -(BOOL)isValid __attribute__((warn_unused_result(""))); - [Export("isValid")] - bool IsValid (); - - // -(void)setInteractionFromMessageCenterMessage:(NSString * _Nullable)messageID; - [Export("setInteractionFromMessageCenterMessage:")] - void SetInteractionFromMessageCenterMessage([NullAllowed] string messageID); - - // @property (readonly, copy, nonatomic) NSDictionary * _Nonnull data; - [Export("data", ArgumentSemantic.Copy)] - NSDictionary Data { get; } - - // @property (readonly, copy, nonatomic) NSDictionary * _Nonnull payload; - [Export("payload", ArgumentSemantic.Copy)] - NSDictionary Payload { get; } - - // -(void)track; - [Export("track")] - void Track(); - } - - // @interface UADeepLinkAction : NSObject - [BaseType(typeof(NSObject))] - interface UADeepLinkAction : IUAAction - { - } - - // @protocol UADeepLinkDelegate - [Protocol, Model] - [BaseType(typeof(NSObject))] - interface UADeepLinkDelegate - { - // @required -(void)receivedDeepLink:(NSURL * _Nonnull)deepLink completionHandler:(void (^ _Nonnull)(void))completionHandler; - [Abstract] - [Export("receivedDeepLink:completionHandler:")] - void ReceivedDeepLink(NSUrl deepLink, Action completionHandler); - } - - interface IUADeepLinkDelegate { }; - - // @interface UAEmptyAction : NSObject - [BaseType(typeof(NSObject))] - interface UAEmptyAction : IUAAction - { - } - - // @interface UAEnableFeatureAction : NSObject - [BaseType(typeof(NSObject))] - interface UAEnableFeatureAction : IUAAction - { - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull name; - [Static] - [Export("name")] - string Name { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull shortName; - [Static] - [Export("shortName")] - string ShortName { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull userNotificationsActionValue; - [Static] - [Export("userNotificationsActionValue")] - string UserNotificationsActionValue { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull locationActionValue; - [Static] - [Export("locationActionValue")] - string LocationActionValue { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull backgroundLocationActionValue; - [Static] - [Export("backgroundLocationActionValue")] - string BackgroundLocationActionValue { get; } - } - - // @interface UAEnableFeatureActionPredicate : NSObject - [BaseType(typeof(NSObject))] - interface UAEnableFeatureActionPredicate : IUAActionPredicateProtocol - { - } - - // @interface UAFetchDeviceInfoAction : NSObject - [BaseType(typeof(NSObject))] - interface UAFetchDeviceInfoAction : IUAAction - { - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull name; - [Static] - [Export("name")] - string Name { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull shortName; - [Static] - [Export("shortName")] - string ShortName { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull channelID; - [Static] - [Export("channelID")] - string ChannelID { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull namedUser; - [Static] - [Export("namedUser")] - string NamedUser { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull tags; - [Static] - [Export("tags")] - string Tags { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull pushOptIn; - [Static] - [Export("pushOptIn")] - string PushOptIn { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull locationEnabled; - [Static] - [Export("locationEnabled")] - string LocationEnabled { get; } - } - - // @interface UAFetchDeviceInfoActionPredicate : NSObject - [BaseType(typeof(NSObject))] - interface UAFetchDeviceInfoActionPredicate : IUAActionPredicateProtocol + // +(void)applicatin:(UIApplication * _Nonnull)application performFetchWithCompletionHandler:(void (^ _Nonnull)(UIBackgroundFetchResult))completionHandler __attribute__((deprecated("Use application(_:performFetchWithCompletionHandler:) instead"))); + [Static] + [Export("applicatin:performFetchWithCompletionHandler:")] + void PerformFetch(UIApplication application, Action completionHandler); + + // +(void)application:(UIApplication * _Nonnull)application performFetchWithCompletionHandler:(void (^ _Nonnull)(UIBackgroundFetchResult))completionHandler; + [Static] + [Export("application:performFetchWithCompletionHandler:")] + void Application(UIApplication application, Action completionHandler); + + // +(void)application:(UIApplication * _Nonnull)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData * _Nonnull)deviceToken; + [Static] + [Export("application:didRegisterForRemoteNotificationsWithDeviceToken:")] + void DidRegisterForRemoteNotifications(UIApplication application, NSData deviceToken); + + // +(void)application:(UIApplication * _Nonnull)application didFailToRegisterForRemoteNotificationsWithError:(NSError * _Nonnull)error; + [Static] + [Export("application:didFailToRegisterForRemoteNotificationsWithError:")] + void DidFailToRegisterForRemoteNotifications(UIApplication application, NSError error); + + // +(void)application:(UIApplication * _Nonnull)application didReceiveRemoteNotification:(NSDictionary * _Nonnull)userInfo fetchCompletionHandler:(void (^ _Nonnull)(UIBackgroundFetchResult))completionHandler; + [Static] + [Export("application:didReceiveRemoteNotification:fetchCompletionHandler:")] + void DidReceiveRemoteNotification(UIApplication application, NSDictionary userInfo, Action completionHandler); + + // +(void)userNotificationCenterWithCenter:(UNUserNotificationCenter * _Nonnull)center willPresentNotification:(UNNotification * _Nonnull)notification withCompletionHandler:(void (^ _Nonnull)(UNNotificationPresentationOptions))completionHandler __attribute__((deprecated("Use userNotificationCenter(_:willPresent:withCompletionHandler:) instead"))); + [Static] + [Export("userNotificationCenterWithCenter:willPresentNotification:withCompletionHandler:")] + void WillPresentNotification(UNUserNotificationCenter center, UNNotification notification, Action completionHandler); + + // +(void)userNotificationCenter:(UNUserNotificationCenter * _Nonnull)center willPresentNotification:(UNNotification * _Nonnull)notification withCompletionHandler:(void (^ _Nonnull)(UNNotificationPresentationOptions))completionHandler; + [Static] + [Export("userNotificationCenter:willPresentNotification:withCompletionHandler:")] + void UserNotificationCenter(UNUserNotificationCenter center, UNNotification notification, Action completionHandler); + + // +(void)userNotificationCenterWithCenter:(UNUserNotificationCenter * _Nonnull)center didReceiveNotificationResponse:(UNNotificationResponse * _Nonnull)response withCompletionHandler:(void (^ _Nonnull)(void))completionHandler __attribute__((deprecated("Use userNotificationCenter(_:didReceive:withCompletionHandler:) instead"))); + [Static] + [Export("userNotificationCenterWithCenter:didReceiveNotificationResponse:withCompletionHandler:")] + void DidReceiveNotificationResponse(UNUserNotificationCenter center, UNNotificationResponse response, Action completionHandler); + + // +(void)userNotificationCenter:(UNUserNotificationCenter * _Nonnull)center didReceiveNotificationResponse:(UNNotificationResponse * _Nonnull)response withCompletionHandler:(void (^ _Nonnull)(void))completionHandler; + [Static] + [Export("userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:")] + void UserNotificationCenter(UNUserNotificationCenter center, UNNotificationResponse response, Action completionHandler); + } + + // @interface UAApplicationMetrics : NSObject + [BaseType(typeof(NSObject))] + [DisableDefaultCtor] + interface UAApplicationMetrics { + // @property (readonly, nonatomic) BOOL isAppVersionUpdated; + [Export("isAppVersionUpdated")] + bool IsAppVersionUpdated { get; } + + // @property (readonly, copy, nonatomic) NSDate * _Nullable lastApplicationOpenDate; + [NullAllowed, Export("lastApplicationOpenDate", ArgumentSemantic.Copy)] + NSDate LastApplicationOpenDate { get; } + + // @property (readonly, copy, nonatomic) NSString * _Nullable currentAppVersion; + [NullAllowed, Export("currentAppVersion")] + string CurrentAppVersion { get; } } - // @interface UAInstallAttributionEvent : NSObject + // @interface UAAssociatedIdentifiers : NSObject [BaseType(typeof(NSObject))] - interface UAInstallAttributionEvent : IUAEvent - { - // @property (readonly, copy, nonatomic) NSString * _Nonnull eventType; - [Export("eventType")] - string EventType { get; } - - // @property (readonly, copy, nonatomic) NSDictionary * _Nonnull data; - [Export("data", ArgumentSemantic.Copy)] - NSDictionary Data { get; } - - // -(instancetype _Nonnull)initWithAppPurchaseDate:(NSDate * _Nonnull)appPurchaseDate iAdImpressionDate:(NSDate * _Nonnull)iAdImpressionDate __attribute__((objc_designated_initializer)); - [Export("initWithAppPurchaseDate:iAdImpressionDate:")] - [DesignatedInitializer] - IntPtr Constructor(NSDate appPurchaseDate, NSDate iAdImpressionDate); - - // +(UAInstallAttributionEvent * _Nonnull)eventWithAppPurchaseDate:(NSDate * _Nonnull)appPurchaseDate iAdImpressionDate:(NSDate * _Nonnull)iAdImpressionDate __attribute__((warn_unused_result(""))); - [Static] - [Export("eventWithAppPurchaseDate:iAdImpressionDate:")] - UAInstallAttributionEvent Event(NSDate appPurchaseDate, NSDate iAdImpressionDate); - - // +(UAInstallAttributionEvent * _Nonnull)event __attribute__((warn_unused_result(""))); - [Static] - [Export("event")] - UAInstallAttributionEvent Event(); - } - - // @interface UAInteractiveNotificationEvent : NSObject - [NoTV] - [BaseType(typeof(NSObject))] - [DisableDefaultCtor] - interface UAInteractiveNotificationEvent : IUAEvent - { - // @property (readonly, copy, nonatomic) NSString * _Nonnull eventType; - [Export("eventType")] - string EventType { get; } - - // @property (readonly, copy, nonatomic) NSDictionary * _Nonnull data; - [Export("data", ArgumentSemantic.Copy)] - NSDictionary Data { get; } - - // -(instancetype _Nonnull)initWithAction:(UNNotificationAction * _Nonnull)action category:(NSString * _Nonnull)category notification:(NSDictionary * _Nonnull)notification responseText:(NSString * _Nullable)responseText __attribute__((objc_designated_initializer)); - [Export("initWithAction:category:notification:responseText:")] - [DesignatedInitializer] - IntPtr Constructor(UNNotificationAction action, string category, NSDictionary notification, [NullAllowed] string responseText); - } - - // @interface UAJSONMatcher : NSObject - [BaseType(typeof(NSObject))] - [DisableDefaultCtor] - interface UAJSONMatcher - { - // -(instancetype _Nonnull)initWithValueMatcher:(UAJSONValueMatcher * _Nonnull)valueMatcher; - [Export("initWithValueMatcher:")] - IntPtr Constructor(UAJSONValueMatcher valueMatcher); - - // -(instancetype _Nonnull)initWithValueMatcher:(UAJSONValueMatcher * _Nonnull)valueMatcher scope:(NSArray * _Nonnull)scope; - [Export("initWithValueMatcher:scope:")] - IntPtr Constructor(UAJSONValueMatcher valueMatcher, string[] scope); - - // -(instancetype _Nonnull)initWithValueMatcher:(UAJSONValueMatcher * _Nonnull)valueMatcher ignoreCase:(BOOL)ignoreCase; - [Export("initWithValueMatcher:ignoreCase:")] - IntPtr Constructor(UAJSONValueMatcher valueMatcher, bool ignoreCase); - - // -(instancetype _Nonnull)initWithValueMatcher:(UAJSONValueMatcher * _Nonnull)valueMatcher key:(NSString * _Nonnull)key; - [Export("initWithValueMatcher:key:")] - IntPtr Constructor(UAJSONValueMatcher valueMatcher, string key); - - // -(instancetype _Nonnull)initWithValueMatcher:(UAJSONValueMatcher * _Nonnull)valueMatcher key:(NSString * _Nonnull)key scope:(NSArray * _Nonnull)scope; - [Export("initWithValueMatcher:key:scope:")] - IntPtr Constructor(UAJSONValueMatcher valueMatcher, string key, string[] scope); - - // -(instancetype _Nonnull)initWithValueMatcher:(UAJSONValueMatcher * _Nonnull)valueMatcher scope:(NSArray * _Nonnull)scope ignoreCase:(BOOL)ignoreCase; - [Export("initWithValueMatcher:scope:ignoreCase:")] - IntPtr Constructor(UAJSONValueMatcher valueMatcher, string[] scope, bool ignoreCase); - - // -(instancetype _Nullable)initWithJSON:(id _Nullable)json error:(NSError * _Nullable * _Nullable)error; - [Export("initWithJSON:error:")] - IntPtr Constructor([NullAllowed] NSObject json, [NullAllowed] out NSError error); - - // -(NSDictionary * _Nonnull)payload __attribute__((warn_unused_result(""))); - [Export("payload")] - NSDictionary Payload { get; } - - // -(BOOL)evaluateObject:(id _Nullable)value __attribute__((warn_unused_result(""))); - [Export("evaluateObject:")] - bool EvaluateObject([NullAllowed] NSObject value); - - // -(BOOL)evaluateObject:(id _Nullable)value ignoreCase:(BOOL)ignoreCase __attribute__((warn_unused_result(""))); - [Export("evaluateObject:ignoreCase:")] - bool EvaluateObject([NullAllowed] NSObject value, bool ignoreCase); - } - - // @interface UAJSONPredicate : NSObject - [BaseType(typeof(NSObject))] - [DisableDefaultCtor] - interface UAJSONPredicate - { - // -(instancetype _Nullable)initWithJSON:(id _Nullable)json error:(NSError * _Nullable * _Nullable)error; - [Export("initWithJSON:error:")] - IntPtr Constructor([NullAllowed] NSObject json, [NullAllowed] out NSError error); - - // -(NSDictionary * _Nonnull)payload __attribute__((warn_unused_result(""))); - [Export("payload")] - NSDictionary Payload { get; } - - // -(BOOL)evaluateObject:(id _Nullable)object __attribute__((warn_unused_result(""))); - [Export("evaluateObject:")] - bool EvaluateObject([NullAllowed] NSObject @object); - - // -(instancetype _Nonnull)initWithJSONMatcher:(UAJSONMatcher * _Nullable)matcher; - [Export("initWithJSONMatcher:")] - IntPtr Constructor([NullAllowed] UAJSONMatcher matcher); - - // +(UAJSONPredicate * _Nonnull)andPredicateWithSubpredicates:(NSArray * _Nullable)subpredicates __attribute__((warn_unused_result(""))); - [Static] - [Export("andPredicateWithSubpredicates:")] - UAJSONPredicate AndPredicate([NullAllowed] UAJSONPredicate[] subpredicates); - - // +(UAJSONPredicate * _Nonnull)orPredicateWithSubpredicates:(NSArray * _Nullable)subpredicates __attribute__((warn_unused_result(""))); - [Static] - [Export("orPredicateWithSubpredicates:")] - UAJSONPredicate OrPredicate([NullAllowed] UAJSONPredicate[] subpredicates); - - // +(UAJSONPredicate * _Nonnull)notPredicateWithSubpredicate:(UAJSONPredicate * _Nonnull)subpredicate __attribute__((warn_unused_result(""))); - [Static] - [Export("notPredicateWithSubpredicate:")] - UAJSONPredicate NotPredicate(UAJSONPredicate subpredicate); - } - - // @interface UAJSONValueMatcher : NSObject - [BaseType(typeof(NSObject))] - interface UAJSONValueMatcher - { - // -(NSDictionary * _Nonnull)payload __attribute__((warn_unused_result(""))); - [Export("payload")] - NSDictionary Payload { get; } - - // -(BOOL)evaluateObject:(id _Nullable)value __attribute__((warn_unused_result(""))); - [Export("evaluateObject:")] - bool EvaluateObject([NullAllowed] NSObject value); - - // -(BOOL)evaluateObject:(id _Nullable)value ignoreCase:(BOOL)ignoreCase __attribute__((warn_unused_result(""))); - [Export("evaluateObject:ignoreCase:")] - bool EvaluateObject([NullAllowed] NSObject value, bool ignoreCase); - - // -(BOOL)value:(id _Nullable)valueOne isEqualToValue:(id _Nullable)valueTwo ignoreCase:(BOOL)ignoreCase __attribute__((warn_unused_result(""))); - [Export("value:isEqualToValue:ignoreCase:")] - bool Value([NullAllowed] NSObject valueOne, [NullAllowed] NSObject valueTwo, bool ignoreCase); - - // +(UAJSONValueMatcher * _Nonnull)matcherWhereNumberAtLeast:(NSNumber * _Nonnull)number __attribute__((warn_unused_result(""))); - [Static] - [Export("matcherWhereNumberAtLeast:")] - UAJSONValueMatcher MatcherWhereNumberAtLeast(NSNumber number); - - // +(UAJSONValueMatcher * _Nonnull)matcherWhereNumberAtLeast:(NSNumber * _Nonnull)lowerNumber atMost:(NSNumber * _Nonnull)higherNumber __attribute__((warn_unused_result(""))); - [Static] - [Export("matcherWhereNumberAtLeast:atMost:")] - UAJSONValueMatcher MatcherWhereNumberAtLeast(NSNumber lowerNumber, NSNumber higherNumber); - - // +(UAJSONValueMatcher * _Nonnull)matcherWhereNumberAtMost:(NSNumber * _Nonnull)number __attribute__((warn_unused_result(""))); - [Static] - [Export("matcherWhereNumberAtMost:")] - UAJSONValueMatcher MatcherWhereNumberAtMost(NSNumber number); - - // +(UAJSONValueMatcher * _Nonnull)matcherWhereNumberEquals:(NSNumber * _Nonnull)number __attribute__((warn_unused_result(""))); - [Static] - [Export("matcherWhereNumberEquals:")] - UAJSONValueMatcher MatcherWhereNumberEquals(NSNumber number); - - // +(UAJSONValueMatcher * _Nonnull)matcherWhereBooleanEquals:(BOOL)boolean __attribute__((warn_unused_result(""))); - [Static] - [Export("matcherWhereBooleanEquals:")] - UAJSONValueMatcher MatcherWhereBooleanEquals(bool boolean); - - // +(UAJSONValueMatcher * _Nonnull)matcherWhereStringEquals:(NSString * _Nonnull)string __attribute__((warn_unused_result(""))); - [Static] - [Export("matcherWhereStringEquals:")] - UAJSONValueMatcher MatcherWhereStringEquals(string @string); - - // +(UAJSONValueMatcher * _Nonnull)matcherWhereValueIsPresent:(BOOL)present __attribute__((warn_unused_result(""))); - [Static] - [Export("matcherWhereValueIsPresent:")] - UAJSONValueMatcher MatcherWhereValueIsPresent(bool present); - - // +(UAJSONValueMatcher * _Nullable)matcherWithVersionConstraint:(NSString * _Nonnull)versionConstraint __attribute__((warn_unused_result(""))); - [Static] - [Export("matcherWithVersionConstraint:")] - [return: NullAllowed] - UAJSONValueMatcher Matcher(string versionConstraint); - - // +(UAJSONValueMatcher * _Nullable)matcherWithArrayContainsPredicate:(UAJSONPredicate * _Nonnull)predicate __attribute__((warn_unused_result(""))); - [Static] - [Export("matcherWithArrayContainsPredicate:")] - [return: NullAllowed] - UAJSONValueMatcher Matcher(UAJSONPredicate predicate); - - // +(UAJSONValueMatcher * _Nullable)matcherWithArrayContainsPredicate:(UAJSONPredicate * _Nonnull)predicate atIndex:(NSInteger)index __attribute__((warn_unused_result(""))); - [Static] - [Export("matcherWithArrayContainsPredicate:atIndex:")] - [return: NullAllowed] - UAJSONValueMatcher Matcher(UAJSONPredicate predicate, nint index); - - // +(UAJSONValueMatcher * _Nullable)matcherWithJSON:(id _Nullable)json error:(NSError * _Nullable * _Nullable)error __attribute__((warn_unused_result(""))); - [Static] - [Export("matcherWithJSON:error:")] - [return: NullAllowed] - UAJSONValueMatcher Matcher([NullAllowed] NSObject json, [NullAllowed] out NSError error); - } - - // @interface UAJavaScriptEnvironment : NSObject - [BaseType(typeof(NSObject))] - interface UAJavaScriptEnvironment : IUAJavaScriptEnvironmentProtocol - { - // -(void)addStringGetter:(NSString * _Nonnull)getter value:(NSString * _Nullable)string __attribute__((swift_name("add(_:string:)"))); - [Export("addStringGetter:value:")] - new void AddStringGetter(string getter, [NullAllowed] string @string); - - // -(void)addNumberGetter:(NSString * _Nonnull)getter value:(NSNumber * _Nullable)number __attribute__((swift_name("add(_:number:)"))); - [Export("addNumberGetter:value:")] - new void AddNumberGetter(string getter, [NullAllowed] NSNumber number); - - // -(void)addDictionaryGetter:(NSString * _Nonnull)getter value:(NSDictionary * _Nullable)dictionary __attribute__((swift_name("add(_:dictionary:)"))); - [Export("addDictionaryGetter:value:")] - new void AddDictionaryGetter(string getter, [NullAllowed] NSDictionary dictionary); - - // -(NSString * _Nonnull)build __attribute__((warn_unused_result(""))); - [Export("build")] - new string Build (); - } - - // @interface UALocaleManager : NSObject - [BaseType(typeof(NSObject))] - [DisableDefaultCtor] - interface UALocaleManager - { - // @property (readonly, nonatomic, class) NSNotificationName _Nonnull localeUpdatedEvent; - [Static] - [Export("localeUpdatedEvent")] - string LocaleUpdatedEvent { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull localeEventKey; - [Static] - [Export("localeEventKey")] - string LocaleEventKey { get; } - - // @property (copy, nonatomic) NSLocale * _Nonnull currentLocale; - [Export("currentLocale", ArgumentSemantic.Copy)] - NSLocale CurrentLocale { get; set; } - - // -(void)clearLocale; - [Export("clearLocale")] - void ClearLocale(); - } - - // @interface UAMediaEventTemplate : NSObject - [BaseType(typeof(NSObject))] - [DisableDefaultCtor] - interface UAMediaEventTemplate - { - // @property (copy, nonatomic) NSString * _Nullable identifier; - [NullAllowed, Export("identifier")] - string Identifier { get; set; } - - // @property (copy, nonatomic) NSString * _Nullable category; - [NullAllowed, Export("category")] - string Category { get; set; } - - // @property (copy, nonatomic) NSString * _Nullable type; - [NullAllowed, Export("type")] - string Type { get; set; } - - // @property (copy, nonatomic) NSString * _Nullable eventDescription; - [NullAllowed, Export("eventDescription")] - string EventDescription { get; set; } - - // @property (nonatomic) BOOL isFeature; - [Export("isFeature")] - bool IsFeature { get; set; } - - // @property (copy, nonatomic) NSString * _Nullable author; - [NullAllowed, Export("author")] - string Author { get; set; } - - // @property (copy, nonatomic) NSString * _Nullable publishedDate; - [NullAllowed, Export("publishedDate")] - string PublishedDate { get; set; } - - // +(UAMediaEventTemplate * _Nonnull)browsedTemplate __attribute__((warn_unused_result(""))); - [Static] - [Export("browsedTemplate")] - UAMediaEventTemplate BrowsedTemplate (); - - // +(UAMediaEventTemplate * _Nonnull)starredTemplate __attribute__((warn_unused_result(""))); - [Static] - [Export("starredTemplate")] - UAMediaEventTemplate StarredTemplate (); - - // +(UAMediaEventTemplate * _Nonnull)sharedTemplate __attribute__((warn_unused_result(""))); - [Static] - [Export("sharedTemplate")] - UAMediaEventTemplate SharedTemplate (); - - // +(UAMediaEventTemplate * _Nonnull)sharedTemplateWithSource:(NSString * _Nullable)source withMedium:(NSString * _Nullable)medium __attribute__((warn_unused_result(""))); - [Static] - [Export("sharedTemplateWithSource:withMedium:")] - UAMediaEventTemplate SharedTemplate([NullAllowed] string source, [NullAllowed] string medium); - - // +(UAMediaEventTemplate * _Nonnull)consumedTemplate __attribute__((warn_unused_result(""))); - [Static] - [Export("consumedTemplate")] - UAMediaEventTemplate ConsumedTemplate(); - - // +(UAMediaEventTemplate * _Nonnull)consumedTemplateWithValueFromString:(NSString * _Nullable)valueString __attribute__((warn_unused_result(""))); - [Static] - [Export("consumedTemplateWithValueFromString:")] - UAMediaEventTemplate ConsumedTemplate([NullAllowed] string valueString); - - // +(UAMediaEventTemplate * _Nonnull)consumedTemplateWithValue:(NSNumber * _Nullable)value __attribute__((warn_unused_result(""))); - [Static] - [Export("consumedTemplateWithValue:")] - UAMediaEventTemplate ConsumedTemplate([NullAllowed] NSNumber value); - - // -(UACustomEvent * _Nonnull)createEvent __attribute__((warn_unused_result(""))); - [Export("createEvent")] - UACustomEvent CreateEvent (); - } - - // @interface UAModifyAttributesAction : NSObject - [BaseType(typeof(NSObject))] - interface UAModifyAttributesAction : IUAAction - { - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull name; - [Static] - [Export("name")] - string Name { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull shortName; - [Static] - [Export("shortName")] - string ShortName { get; } - } - - // @interface UANamedUser : NSObject - [BaseType(typeof(NSObject))] - [DisableDefaultCtor] - interface UANamedUser : IUAComponent - { - // @property (copy, nonatomic) SWIFT_DEPRECATED_MSG("Use Contact#identify or Contact#reset instead.") NSString * identifier __attribute__((deprecated("Use Contact#identify or Contact#reset instead."))); - [Export("identifier")] - string Identifier { get; set; } - - // @property (getter = isComponentEnabled, nonatomic) BOOL componentEnabled; - [Export("componentEnabled")] - bool ComponentEnabled { [Bind("isComponentEnabled")] get; set; } - - // @property (readonly, nonatomic, strong, class) UANamedUser * _Null_unspecified shared __attribute__((deprecated("Use contact instead."))); - [Static] - [Export("shared", ArgumentSemantic.Strong)] - UANamedUser Shared { get; } - - // -(void)forceUpdate __attribute__((deprecated("No longer required."))); - [Export("forceUpdate")] - void ForceUpdate(); - - // -(void)updateTags __attribute__((deprecated("No longer required."))); - [Export("updateTags")] - void UpdateTags(); - - // -(void)addTags:(NSArray * _Nonnull)tags group:(NSString * _Nonnull)group __attribute__((deprecated("Use Contact#editTagGroups instead."))); - [Export("addTags:group:")] - void AddTags(string[] tags, string group); - - // -(void)setTags:(NSArray * _Nonnull)tags group:(NSString * _Nonnull)group __attribute__((deprecated("Use Contact#editTagGroups instead."))); - [Export("setTags:group:")] - void SetTags(string[] tags, string group); - - // -(void)removeTags:(NSArray * _Nonnull)tags group:(NSString * _Nonnull)group __attribute__((deprecated("Use Contact#editTagGroups instead."))); - [Export("removeTags:group:")] - void RemoveTags(string[] tags, string group); - - // -(void)applyAttributeMutations:(UAAttributeMutations * _Nonnull)mutations __attribute__((deprecated("Use Contact#editAttributes instead."))); - [Export("applyAttributeMutations:")] - void ApplyAttributeMutations(UAAttributeMutations mutations); - } - - // @interface UANativeBridge : NSObject - [BaseType(typeof(NSObject))] - interface UANativeBridge : IWKNavigationDelegate - { - [Wrap("WeakNativeBridgeDelegate")] - [NullAllowed] - IUANativeBridgeDelegate NativeBridgeDelegate { get; set; } - - // @property (nonatomic, weak) id _Nullable nativeBridgeDelegate; - [NullAllowed, Export("nativeBridgeDelegate", ArgumentSemantic.Weak)] - NSObject WeakNativeBridgeDelegate { get; set; } - - [Wrap("WeakForwardNavigationDelegate")] - [NullAllowed] - IUANavigationDelegate ForwardNavigationDelegate { get; set; } - - // @property (nonatomic, weak) id _Nullable forwardNavigationDelegate; - [NullAllowed, Export("forwardNavigationDelegate", ArgumentSemantic.Weak)] - NSObject WeakForwardNavigationDelegate { get; set; } - - [Wrap("WeakJavaScriptCommandDelegate")] - [NullAllowed] - IUAJavaScriptCommandDelegate JavaScriptCommandDelegate { get; set; } - - // @property (nonatomic, weak) id _Nullable javaScriptCommandDelegate; - [NullAllowed, Export("javaScriptCommandDelegate", ArgumentSemantic.Weak)] - NSObject WeakJavaScriptCommandDelegate { get; set; } - - [Wrap("WeakNativeBridgeExtensionDelegate")] - [NullAllowed] - IUANativeBridgeExtensionDelegate NativeBridgeExtensionDelegate { get; set; } - - // @property (nonatomic, weak) id _Nullable nativeBridgeExtensionDelegate; - [NullAllowed, Export("nativeBridgeExtensionDelegate", ArgumentSemantic.Weak)] - NSObject WeakNativeBridgeExtensionDelegate { get; set; } - } - - // @protocol UANativeBridgeDelegate - [Protocol, Model] - [BaseType(typeof(NSObject))] - interface UANativeBridgeDelegate - { - // @required -(void)close; - [Abstract] - [Export("close")] - void Close(); - } - - interface IUANativeBridgeDelegate { }; - - // @interface UANetworkMonitor : NSObject - [BaseType(typeof(NSObject))] - interface UANetworkMonitor - { - // @property (copy, nonatomic) void (^ _Nullable)(BOOL) connectionUpdates; - [NullAllowed, Export("connectionUpdates", ArgumentSemantic.Copy)] - Action ConnectionUpdates { get; set; } - - // @property (readonly, nonatomic) BOOL isConnected; - [Export("isConnected")] - bool IsConnected { get; } - } - - // @interface UANotificationCategories : NSObject - [BaseType(typeof(NSObject))] - interface UANotificationCategories - { - // +(NSSet * _Nonnull)defaultCategories __attribute__((warn_unused_result(""))); - [Static] - [Export("defaultCategories")] - NSSet DefaultCategories (); - - // +(NSSet * _Nonnull)defaultCategoriesWithRequireAuth:(BOOL)requireAuth __attribute__((warn_unused_result(""))); - [Static] - [Export("defaultCategoriesWithRequireAuth:")] - NSSet DefaultCategories(bool requireAuth); - - // +(NSSet * _Nonnull)createCategoriesFromFile:(NSString * _Nonnull)path __attribute__((warn_unused_result(""))); - [Static] - [Export("createCategoriesFromFile:")] - NSSet CreateCategoriesFromFile(string path); - - // +(UNNotificationCategory * _Nullable)createCategory:(NSString * _Nonnull)categoryId actions:(NSArray * _Nonnull)actionDefinitions __attribute__((warn_unused_result(""))); - [Static] - [Export("createCategory:actions:")] - [return: NullAllowed] - UNNotificationCategory CreateCategory(string categoryId, NSDictionary[] actionDefinitions); - - // +(UNNotificationCategory * _Nullable)createCategory:(NSString * _Nonnull)categoryId actions:(NSArray * _Nonnull)actionDefinitions hiddenPreviewsBodyPlaceholder:(NSString * _Nonnull)hiddenPreviewsBodyPlaceholder __attribute__((warn_unused_result(""))); - [Static] - [Export("createCategory:actions:hiddenPreviewsBodyPlaceholder:")] - [return: NullAllowed] - UNNotificationCategory CreateCategory(string categoryId, NSDictionary[] actionDefinitions, string hiddenPreviewsBodyPlaceholder); - } - - // @interface UAOpenExternalURLAction : NSObject - [BaseType(typeof(NSObject))] - interface UAOpenExternalURLAction : IUAAction - { - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull name; - [Static] - [Export("name")] - string Name { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull shortName; - [Static] - [Export("shortName")] - string ShortName { get; } - } - - // @interface UAPasteboardAction : NSObject - [NoTV] - [BaseType(typeof(NSObject))] - interface UAPasteboardAction : IUAAction - { - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull name; - [Static] - [Export("name")] - string Name { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull shortname; - [Static] - [Export("shortname")] - string Shortname { get; } - } - - // @interface UAPrivacyManager : NSObject - [BaseType(typeof(NSObject))] - [DisableDefaultCtor] - interface UAPrivacyManager - { - // @property (readonly, nonatomic, class) NSNotificationName _Nonnull changeEvent; - [Static] - [Export("changeEvent")] - string ChangeEvent { get; } - - // @property (nonatomic) UAFeatures enabledFeatures; - [Export("enabledFeatures", ArgumentSemantic.Assign)] - UAFeatures EnabledFeatures { get; set; } - - // -(void)enableFeatures:(UAFeatures)features; - [Export("enableFeatures:")] - void EnableFeatures(UAFeatures features); - - // -(void)disableFeatures:(UAFeatures)features; - [Export("disableFeatures:")] - void DisableFeatures(UAFeatures features); - - // -(BOOL)isEnabled:(UAFeatures)feature __attribute__((warn_unused_result(""))); - [Export("isEnabled:")] - bool IsEnabled(UAFeatures feature); - - // -(BOOL)isAnyFeatureEnabled __attribute__((warn_unused_result(""))); - [Export("isAnyFeatureEnabled")] - bool IsAnyFeatureEnabled { get; } - } - - // @interface UAProximityRegion : NSObject - [BaseType(typeof(NSObject))] - [DisableDefaultCtor] - interface UAProximityRegion - { - // +(UAProximityRegion * _Nullable)proximityRegionWithID:(NSString * _Nonnull)proximityID major:(double)major minor:(double)minor __attribute__((warn_unused_result(""))); - [Static] - [Export("proximityRegionWithID:major:minor:")] - [return: NullAllowed] - UAProximityRegion ProximityRegion(string proximityID, double major, double minor); - - // +(UAProximityRegion * _Nullable)proximityRegionWithID:(NSString * _Nonnull)proximityID major:(double)major minor:(double)minor rssi:(double)rssi __attribute__((warn_unused_result(""))); - [Static] - [Export("proximityRegionWithID:major:minor:rssi:")] - [return: NullAllowed] - UAProximityRegion ProximityRegion(string proximityID, double major, double minor, double rssi); - - // +(UAProximityRegion * _Nullable)proximityRegionWithID:(NSString * _Nonnull)proximityID major:(double)major minor:(double)minor latitude:(double)latitude longitude:(double)longitude __attribute__((warn_unused_result(""))); - [Static] - [Export("proximityRegionWithID:major:minor:latitude:longitude:")] - [return: NullAllowed] - UAProximityRegion ProximityRegion(string proximityID, double major, double minor, double latitude, double longitude); - - // +(UAProximityRegion * _Nullable)proximityRegionWithID:(NSString * _Nonnull)proximityID major:(double)major minor:(double)minor rssi:(double)rssi latitude:(double)latitude longitude:(double)longitude __attribute__((warn_unused_result(""))); - [Static] - [Export("proximityRegionWithID:major:minor:rssi:latitude:longitude:")] - [return: NullAllowed] - UAProximityRegion ProximityRegion(string proximityID, double major, double minor, double rssi, double latitude, double longitude); - } - - // @interface UAChannelScopes : NSObject - [BaseType(typeof(NSObject))] - [DisableDefaultCtor] - interface UAChannelScopes - { - // @property (readonly, copy, nonatomic) NSArray * _Nonnull values; - [Export("values", ArgumentSemantic.Copy)] - NSNumber[] Values { get; } - - // @property (readonly, copy, nonatomic) NSString * _Nonnull description; - [Export("description")] - string Description { get; } - - // -(BOOL)isEqual:(id _Nullable)object __attribute__((warn_unused_result(""))); - [Export("isEqual:")] - bool IsEqual([NullAllowed] NSObject @object); - - // @property (readonly, nonatomic) NSUInteger hash; - [Export("hash")] - nuint Hash { get; } - } - - // @interface UAPush : NSObject - [BaseType(typeof(NSObject))] - [DisableDefaultCtor] - interface UAPush : IUAComponent - { - // @property (readonly, nonatomic, strong, class) UAPush * _Nonnull shared; - [Static] - [Export("shared", ArgumentSemantic.Strong)] - UAPush Shared { get; } - - // @property (readonly, nonatomic, class) NSNotificationName _Nonnull receivedNotificationResponseEvent; - [Static] - [Export("receivedNotificationResponseEvent")] - string ReceivedNotificationResponseEvent { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull receivedNotificationResponseEventResponseKey; - [Static] - [Export("receivedNotificationResponseEventResponseKey")] - string ReceivedNotificationResponseEventResponseKey { get; } - - // @property (readonly, nonatomic, class) NSNotificationName _Nonnull receivedForegroundNotificationEvent; - [Static] - [Export("receivedForegroundNotificationEvent")] - string ReceivedForegroundNotificationEvent { get; } - - // @property (readonly, nonatomic, class) NSNotificationName _Nonnull receivedBackgroundNotificationEvent; - [Static] - [Export("receivedBackgroundNotificationEvent")] - string ReceivedBackgroundNotificationEvent { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull quietTimeStartKey; - [Static] - [Export("quietTimeStartKey")] - string QuietTimeStartKey { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull quietTimeEndKey; - [Static] - [Export("quietTimeEndKey")] - string QuietTimeEndKey { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull legacyTagsSettingsKey; - [Static] - [Export("legacyTagsSettingsKey")] - string LegacyTagsSettingsKey { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull tagsMigratedToChannelTagsKey; - [Static] - [Export("tagsMigratedToChannelTagsKey")] - string TagsMigratedToChannelTagsKey { get; } - - // @property (getter = isComponentEnabled, nonatomic) BOOL componentEnabled; - [Export("componentEnabled")] - bool ComponentEnabled { [Bind("isComponentEnabled")] get; set; } - - // -(void)migratePushTagsToChannelTags; - [Export("migratePushTagsToChannelTags")] - void MigratePushTagsToChannelTags(); - - // @property (nonatomic) BOOL backgroundPushNotificationsEnabled; - [Export("backgroundPushNotificationsEnabled")] - bool BackgroundPushNotificationsEnabled { get; set; } - - // @property (nonatomic) BOOL userPushNotificationsEnabled; - [Export("userPushNotificationsEnabled")] - bool UserPushNotificationsEnabled { get; set; } - - // @property (nonatomic) BOOL extendedPushNotificationPermissionEnabled; - [Export("extendedPushNotificationPermissionEnabled")] - bool ExtendedPushNotificationPermissionEnabled { get; set; } - - // @property (readonly, copy, nonatomic) NSString * _Nullable deviceToken; - [NullAllowed, Export("deviceToken")] - string DeviceToken { get; } - - // @property (nonatomic) UANotificationOptions notificationOptions; - [Export("notificationOptions", ArgumentSemantic.Assign)] - UANotificationOptions NotificationOptions { get; set; } - - // @property (copy, nonatomic) NSSet * _Nonnull customCategories; - [Export("customCategories", ArgumentSemantic.Copy)] - NSSet CustomCategories { get; set; } - - // @property (readonly, copy, nonatomic) NSSet * _Nonnull combinedCategories; - [Export("combinedCategories", ArgumentSemantic.Copy)] - NSSet CombinedCategories { get; } - - // @property (copy, nonatomic) NSSet * _Nonnull accengageCategories; - [Export("accengageCategories", ArgumentSemantic.Copy)] - NSSet AccengageCategories { get; set; } - - // @property (nonatomic) BOOL requireAuthorizationForDefaultCategories; - [Export("requireAuthorizationForDefaultCategories")] - bool RequireAuthorizationForDefaultCategories { get; set; } - - [Wrap("WeakPushNotificationDelegate")] - [NullAllowed] - IUAPushNotificationDelegate PushNotificationDelegate { get; set; } - - // @property (nonatomic, weak) id _Nullable pushNotificationDelegate; - [NullAllowed, Export("pushNotificationDelegate", ArgumentSemantic.Weak)] - NSObject WeakPushNotificationDelegate { get; set; } - - [Wrap("WeakRegistrationDelegate")] - [NullAllowed] - IUARegistrationDelegate RegistrationDelegate { get; set; } - - // @property (nonatomic, weak) id _Nullable registrationDelegate; - [NullAllowed, Export("registrationDelegate", ArgumentSemantic.Weak)] - NSObject WeakRegistrationDelegate { get; set; } - - // @property (readonly, nonatomic, strong) UNNotificationResponse * _Nullable launchNotificationResponse; - [NullAllowed, Export("launchNotificationResponse", ArgumentSemantic.Strong)] - UNNotificationResponse LaunchNotificationResponse { get; } - - // @property (readonly, nonatomic) UAAuthorizedNotificationSettings authorizedNotificationSettings; - [Export("authorizedNotificationSettings")] - UAAuthorizedNotificationSettings AuthorizedNotificationSettings { get; } - - // @property (readonly, nonatomic) UAAuthorizationStatus authorizationStatus; - [Export("authorizationStatus")] - UAAuthorizationStatus AuthorizationStatus { get; } - - // @property (readonly, nonatomic) BOOL userPromptedForNotifications; - [Export("userPromptedForNotifications")] - bool UserPromptedForNotifications { get; } - - // @property (nonatomic) UNNotificationPresentationOptions defaultPresentationOptions; - [Export("defaultPresentationOptions", ArgumentSemantic.Assign)] - UNNotificationPresentationOptions DefaultPresentationOptions { get; set; } - - // -(void)enableUserPushNotifications:(void (^ _Nonnull)(BOOL))completionHandler; - [Export("enableUserPushNotifications:")] - void EnableUserPushNotifications(Action completionHandler); - - // @property (readonly, nonatomic) BOOL isPushNotificationsOptedIn; - [Export("isPushNotificationsOptedIn")] - bool IsPushNotificationsOptedIn { get; } - - // @property (nonatomic) NSInteger badgeNumber; - [Export("badgeNumber")] - nint BadgeNumber { get; set; } - - // @property (nonatomic) BOOL autobadgeEnabled; - [Export("autobadgeEnabled")] - bool AutobadgeEnabled { get; set; } - - // -(void)resetBadge; - [Export("resetBadge")] - void ResetBadge(); - - // @property (readonly, copy, nonatomic) NSDictionary * _Nullable quietTime; - [NullAllowed, Export("quietTime", ArgumentSemantic.Copy)] - NSDictionary QuietTime { get; } - - // @property (nonatomic, strong) NSTimeZone * _Nullable timeZone; - [NullAllowed, Export("timeZone", ArgumentSemantic.Strong)] - NSTimeZone TimeZone { get; set; } - - // @property (nonatomic) BOOL quietTimeEnabled; - [Export("quietTimeEnabled")] - bool QuietTimeEnabled { get; set; } - - // -(void)setQuietTimeStartHour:(NSInteger)startHour startMinute:(NSInteger)startMinute endHour:(NSInteger)endHour endMinute:(NSInteger)endMinute; - [Export("setQuietTimeStartHour:startMinute:endHour:endMinute:")] - void SetQuietTimeStartHour(nint startHour, nint startMinute, nint endHour, nint endMinute); - - // -(void)updateRegistration; - [Export("updateRegistration")] - void UpdateRegistration(); - } - - // @protocol UAPushNotificationDelegate - [Protocol, Model] - [BaseType(typeof(NSObject))] - interface UAPushNotificationDelegate - { - // @optional -(void)receivedForegroundNotification:(NSDictionary * _Nonnull)userInfo completionHandler:(void (^ _Nonnull)(void))completionHandler; - [Export("receivedForegroundNotification:completionHandler:")] - void ReceivedForegroundNotification(NSDictionary userInfo, Action completionHandler); - - // @optional -(void)receivedBackgroundNotification:(NSDictionary * _Nonnull)userInfo completionHandler:(void (^ _Nonnull)(UIBackgroundFetchResult))completionHandler; - [Export("receivedBackgroundNotification:completionHandler:")] - void ReceivedBackgroundNotification(NSDictionary userInfo, Action completionHandler); - - // @optional -(void)receivedNotificationResponse:(UNNotificationResponse * _Nonnull)notificationResponse completionHandler:(void (^ _Nonnull)(void))completionHandler; - [Export("receivedNotificationResponse:completionHandler:")] - void ReceivedNotificationResponse(UNNotificationResponse notificationResponse, Action completionHandler); - - // @optional -(UNNotificationPresentationOptions)extendPresentationOptions:(UNNotificationPresentationOptions)options notification:(UNNotification * _Nonnull)notification __attribute__((warn_unused_result(""))); - [Export("extendPresentationOptions:notification:")] - UNNotificationPresentationOptions ExtendPresentationOptions(UNNotificationPresentationOptions options, UNNotification notification); - } - - interface IUAPushNotificationDelegate { }; - - // @interface UARegionEvent : NSObject - [BaseType(typeof(NSObject))] - [DisableDefaultCtor] - interface UARegionEvent : IUAEvent - { - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull regionIDKey; - [Static] - [Export("regionIDKey")] - string RegionIDKey { get; } - - // @property (readonly, copy, nonatomic) NSString * _Nonnull regionID; - [Export("regionID")] - string RegionID { get; } - - // @property (readonly, copy, nonatomic) NSString * _Nonnull source; - [Export("source")] - string Source { get; } - - // @property (readonly, nonatomic, strong) UACircularRegion * _Nullable circularRegion; - [NullAllowed, Export("circularRegion", ArgumentSemantic.Strong)] - UACircularRegion CircularRegion { get; } - - // @property (readonly, nonatomic, strong) UAProximityRegion * _Nullable proximityRegion; - [NullAllowed, Export("proximityRegion", ArgumentSemantic.Strong)] - UAProximityRegion ProximityRegion { get; } - - // @property (readonly, copy, nonatomic) NSString * _Nonnull eventType; - [Export("eventType")] - string EventType { get; } - - // @property (readonly, copy, nonatomic) NSDictionary * _Nonnull data; - [Export("data", ArgumentSemantic.Copy)] - NSDictionary Data { get; } - - // @property (readonly, copy, nonatomic) NSDictionary * _Nonnull payload; - [Export("payload", ArgumentSemantic.Copy)] - NSDictionary Payload { get; } - - // +(UARegionEvent * _Nullable)regionEventWithRegionID:(NSString * _Nonnull)regionID source:(NSString * _Nonnull)source boundaryEvent:(enum UABoundaryEvent)boundaryEvent __attribute__((warn_unused_result(""))); - [Static] - [Export("regionEventWithRegionID:source:boundaryEvent:")] - [return: NullAllowed] - UARegionEvent RegionEvent(string regionID, string source, UABoundaryEvent boundaryEvent); - - // +(UARegionEvent * _Nullable)regionEventWithRegionID:(NSString * _Nonnull)regionID source:(NSString * _Nonnull)source boundaryEvent:(enum UABoundaryEvent)boundaryEvent circularRegion:(UACircularRegion * _Nullable)circularRegion proximityRegion:(UAProximityRegion * _Nullable)proximityRegion __attribute__((warn_unused_result(""))); - [Static] - [Export("regionEventWithRegionID:source:boundaryEvent:circularRegion:proximityRegion:")] - [return: NullAllowed] - UARegionEvent RegionEvent(string regionID, string source, UABoundaryEvent boundaryEvent, [NullAllowed] UACircularRegion circularRegion, [NullAllowed] UAProximityRegion proximityRegion); - } - - // @protocol UARegistrationDelegate - [Protocol, Model] - [BaseType(typeof(NSObject))] - interface UARegistrationDelegate - { - // @optional -(void)notificationRegistrationFinishedWithAuthorizedSettings:(UAAuthorizedNotificationSettings)authorizedSettings categories:(NSSet * _Nonnull)categories status:(UAAuthorizationStatus)status; - [Export("notificationRegistrationFinishedWithAuthorizedSettings:categories:status:")] - void NotificationRegistrationFinished(UAAuthorizedNotificationSettings authorizedSettings, NSSet categories, UAAuthorizationStatus status); - - // @optional -(void)notificationRegistrationFinishedWithAuthorizedSettings:(UAAuthorizedNotificationSettings)authorizedSettings status:(UAAuthorizationStatus)status; - [Export("notificationRegistrationFinishedWithAuthorizedSettings:status:")] - void NotificationRegistrationFinished(UAAuthorizedNotificationSettings authorizedSettings, UAAuthorizationStatus status); - - // @optional -(void)notificationAuthorizedSettingsDidChange:(UAAuthorizedNotificationSettings)authorizedSettings; - [Export("notificationAuthorizedSettingsDidChange:")] - void NotificationAuthorizedSettingsDidChange(UAAuthorizedNotificationSettings authorizedSettings); - - // @optional -(void)apnsRegistrationSucceededWithDeviceToken:(NSData * _Nonnull)deviceToken; - [Export("apnsRegistrationSucceededWithDeviceToken:")] - void ApnsRegistrationSucceeded(NSData deviceToken); - - // @optional -(void)apnsRegistrationFailedWithError:(NSError * _Nonnull)error; - [Export("apnsRegistrationFailedWithError:")] - void ApnsRegistrationFailed(NSError error); - } - - interface IUARegistrationDelegate { }; - - // @interface UARemoveTagsAction : UAModifyTagsAction - [BaseType(typeof(UAModifyTagsAction))] - interface UARemoveTagsAction - { - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull name; - [Static] - [Export("name")] - string Name { get; } - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull shortName; - [Static] - [Export("shortName")] - string ShortName { get; } - } - - // @interface UARetailEventTemplate : NSObject - [BaseType(typeof(NSObject))] - [DisableDefaultCtor] - interface UARetailEventTemplate - { - // @property (nonatomic, strong) NSNumber * _Nullable eventValue; - [NullAllowed, Export("eventValue", ArgumentSemantic.Strong)] - NSNumber EventValue { get; set; } - - // @property (copy, nonatomic) NSString * _Nullable transactionID; - [NullAllowed, Export("transactionID")] - string TransactionID { get; set; } - - // @property (copy, nonatomic) NSString * _Nullable identifier; - [NullAllowed, Export("identifier")] - string Identifier { get; set; } - - // @property (copy, nonatomic) NSString * _Nullable category; - [NullAllowed, Export("category")] - string Category { get; set; } - - // @property (copy, nonatomic) NSString * _Nullable eventDescription; - [NullAllowed, Export("eventDescription")] - string EventDescription { get; set; } - - // @property (copy, nonatomic) NSString * _Nullable brand; - [NullAllowed, Export("brand")] - string Brand { get; set; } - - // @property (nonatomic) BOOL isNewItem; - [Export("isNewItem")] - bool IsNewItem { get; set; } - - // +(UARetailEventTemplate * _Nonnull)browsedTemplate __attribute__((warn_unused_result(""))); - [Static] - [Export("browsedTemplate")] - UARetailEventTemplate BrowsedTemplate(); - - // +(UARetailEventTemplate * _Nonnull)browsedTemplateWithValueFromString:(NSString * _Nullable)valueString __attribute__((warn_unused_result(""))); - [Static] - [Export("browsedTemplateWithValueFromString:")] - UARetailEventTemplate BrowsedTemplate([NullAllowed] string valueString); - - // +(UARetailEventTemplate * _Nonnull)browsedTemplateWithValue:(NSNumber * _Nullable)value __attribute__((warn_unused_result(""))); - [Static] - [Export("browsedTemplateWithValue:")] - UARetailEventTemplate BrowsedTemplate([NullAllowed] NSNumber value); - - // +(UARetailEventTemplate * _Nonnull)addedToCartTemplate __attribute__((warn_unused_result(""))); - [Static] - [Export("addedToCartTemplate")] - UARetailEventTemplate AddedToCartTemplate(); - - // +(UARetailEventTemplate * _Nonnull)addedToCartTemplateWithValueFromString:(NSString * _Nullable)valueString __attribute__((warn_unused_result(""))); - [Static] - [Export("addedToCartTemplateWithValueFromString:")] - UARetailEventTemplate AddedToCartTemplate([NullAllowed] string valueString); - - // +(UARetailEventTemplate * _Nonnull)addedToCartTemplateWithValue:(NSNumber * _Nullable)value __attribute__((warn_unused_result(""))); - [Static] - [Export("addedToCartTemplateWithValue:")] - UARetailEventTemplate AddedToCartTemplate([NullAllowed] NSNumber value); - - // +(UARetailEventTemplate * _Nonnull)starredProductTemplate __attribute__((warn_unused_result(""))); - [Static] - [Export("starredProductTemplate")] - UARetailEventTemplate StarredProductTemplate(); - - // +(UARetailEventTemplate * _Nonnull)starredProductTemplateWithValueFromString:(NSString * _Nullable)valueString __attribute__((warn_unused_result(""))); - [Static] - [Export("starredProductTemplateWithValueFromString:")] - UARetailEventTemplate StarredProductTemplate([NullAllowed] string valueString); - - // +(UARetailEventTemplate * _Nonnull)starredProductTemplateWithValue:(NSNumber * _Nullable)value __attribute__((warn_unused_result(""))); - [Static] - [Export("starredProductTemplateWithValue:")] - UARetailEventTemplate StarredProductTemplate([NullAllowed] NSNumber value); - - // +(UARetailEventTemplate * _Nonnull)purchasedTemplate __attribute__((warn_unused_result(""))); - [Static] - [Export("purchasedTemplate")] - UARetailEventTemplate PurchasedTemplate(); - - // +(UARetailEventTemplate * _Nonnull)purchasedTemplateWithValueFromString:(NSString * _Nullable)valueString __attribute__((warn_unused_result(""))); - [Static] - [Export("purchasedTemplateWithValueFromString:")] - UARetailEventTemplate PurchasedTemplate([NullAllowed] string valueString); - - // +(UARetailEventTemplate * _Nonnull)purchasedTemplateWithValue:(NSNumber * _Nullable)value __attribute__((warn_unused_result(""))); - [Static] - [Export("purchasedTemplateWithValue:")] - UARetailEventTemplate PurchasedTemplate([NullAllowed] NSNumber value); - - // +(UARetailEventTemplate * _Nonnull)sharedProductTemplate __attribute__((warn_unused_result(""))); - [Static] - [Export("sharedProductTemplate")] - UARetailEventTemplate SharedProductTemplate(); - - // +(UARetailEventTemplate * _Nonnull)sharedProductTemplateWithValueFromString:(NSString * _Nullable)valueString __attribute__((warn_unused_result(""))); - [Static] - [Export("sharedProductTemplateWithValueFromString:")] - UARetailEventTemplate SharedProductTemplate([NullAllowed] string valueString); - - // +(UARetailEventTemplate * _Nonnull)sharedProductTemplateWithValue:(NSNumber * _Nullable)value __attribute__((warn_unused_result(""))); - [Static] - [Export("sharedProductTemplateWithValue:")] - UARetailEventTemplate SharedProductTemplate([NullAllowed] NSNumber value); - - // +(UARetailEventTemplate * _Nonnull)sharedProductTemplateWithSource:(NSString * _Nullable)source withMedium:(NSString * _Nullable)medium __attribute__((warn_unused_result(""))); - [Static] - [Export("sharedProductTemplateWithSource:withMedium:")] - UARetailEventTemplate SharedProductTemplate([NullAllowed] string source, [NullAllowed] string medium); - - // +(UARetailEventTemplate * _Nonnull)sharedProductTemplateWithValueFromString:(NSString * _Nullable)valueString withSource:(NSString * _Nullable)source withMedium:(NSString * _Nullable)medium __attribute__((warn_unused_result(""))); - [Static] - [Export("sharedProductTemplateWithValueFromString:withSource:withMedium:")] - UARetailEventTemplate SharedProductTemplate([NullAllowed] string valueString, [NullAllowed] string source, [NullAllowed] string medium); - - // +(UARetailEventTemplate * _Nonnull)sharedProductTemplateWithValue:(NSNumber * _Nullable)value withSource:(NSString * _Nullable)source withMedium:(NSString * _Nullable)medium __attribute__((warn_unused_result(""))); - [Static] - [Export("sharedProductTemplateWithValue:withSource:withMedium:")] - UARetailEventTemplate SharedProductTemplate([NullAllowed] NSNumber value, [NullAllowed] string source, [NullAllowed] string medium); - - // +(UARetailEventTemplate * _Nonnull)wishlistTemplate __attribute__((warn_unused_result(""))); - [Static] - [Export("wishlistTemplate")] - UARetailEventTemplate WishlistTemplate(); - - // +(UARetailEventTemplate * _Nonnull)wishlistTemplateWithName:(NSString * _Nullable)name wishlistID:(NSString * _Nullable)wishlistID __attribute__((warn_unused_result(""))); - [Static] - [Export("wishlistTemplateWithName:wishlistID:")] - UARetailEventTemplate WishlistTemplate([NullAllowed] string name, [NullAllowed] string wishlistID); - - // -(UACustomEvent * _Nonnull)createEvent __attribute__((warn_unused_result(""))); - [Export("createEvent")] - UACustomEvent CreateEvent(); - } - - // @interface UARuntimeConfig : NSObject - [BaseType(typeof(NSObject))] - [DisableDefaultCtor] - interface UARuntimeConfig - { - // @property (readonly, nonatomic, class) NSNotificationName _Nonnull configUpdatedEvent; - [Static] - [Export("configUpdatedEvent")] - string ConfigUpdatedEvent { get; } - - // @property (readonly, copy, nonatomic) NSString * _Nonnull appKey; - [Export("appKey")] - string AppKey { get; } - - // @property (readonly, copy, nonatomic) NSString * _Nonnull appSecret; - [Export("appSecret")] - string AppSecret { get; } - - // @property (readonly, nonatomic) enum UALogLevel logLevel; - [Export("logLevel")] - UALogLevel LogLevel { get; } - - // @property (readonly, nonatomic) BOOL inProduction; - [Export("inProduction")] - bool InProduction { get; } - - // @property (readonly, copy, nonatomic) NSDictionary * _Nullable customConfig; - [NullAllowed, Export("customConfig", ArgumentSemantic.Copy)] - NSDictionary CustomConfig { get; } - - // @property (readonly, nonatomic) BOOL isAutomaticSetupEnabled; - [Export("isAutomaticSetupEnabled")] - bool IsAutomaticSetupEnabled { get; } - - // @property (readonly, copy, nonatomic) NSArray * _Nullable URLAllowList; - [NullAllowed, Export("URLAllowList", ArgumentSemantic.Copy)] - string[] URLAllowList { get; } - - // @property (readonly, copy, nonatomic) NSArray * _Nullable URLAllowListScopeJavaScriptInterface; - [NullAllowed, Export("URLAllowListScopeJavaScriptInterface", ArgumentSemantic.Copy)] - string[] URLAllowListScopeJavaScriptInterface { get; } - - // @property (readonly, copy, nonatomic) NSArray * _Nullable URLAllowListScopeOpenURL; - [NullAllowed, Export("URLAllowListScopeOpenURL", ArgumentSemantic.Copy)] - string[] URLAllowListScopeOpenURL { get; } - - // @property (readonly, nonatomic) BOOL suppressAllowListError; - [Export("suppressAllowListError")] - bool SuppressAllowListError { get; } - - // @property (readonly, nonatomic) BOOL isAnalyticsEnabled; - [Export("isAnalyticsEnabled")] - bool IsAnalyticsEnabled { get; } - - // @property (readonly, copy, nonatomic) NSString * _Nullable messageCenterStyleConfig; - [NullAllowed, Export("messageCenterStyleConfig")] - string MessageCenterStyleConfig { get; } - - // @property (readonly, copy, nonatomic) NSString * _Nullable itunesID; - [NullAllowed, Export("itunesID")] - string ItunesID { get; } - - // @property (readonly, nonatomic) BOOL clearUserOnAppRestore; - [Export("clearUserOnAppRestore")] - bool ClearUserOnAppRestore { get; } - - // @property (readonly, nonatomic) BOOL clearNamedUserOnAppRestore; - [Export("clearNamedUserOnAppRestore")] - bool ClearNamedUserOnAppRestore { get; } - - // @property (readonly, nonatomic) BOOL isChannelCaptureEnabled; - [Export("isChannelCaptureEnabled")] - bool IsChannelCaptureEnabled { get; } - - // @property (readonly, nonatomic) BOOL isChannelCreationDelayEnabled; - [Export("isChannelCreationDelayEnabled")] - bool IsChannelCreationDelayEnabled { get; } - - // @property (readonly, nonatomic) BOOL isExtendedBroadcastsEnabled; - [Export("isExtendedBroadcastsEnabled")] - bool IsExtendedBroadcastsEnabled { get; } - - // @property (readonly, nonatomic) BOOL requestAuthorizationToUseNotifications; - [Export("requestAuthorizationToUseNotifications")] - bool RequestAuthorizationToUseNotifications { get; } - - // @property (readonly, nonatomic) BOOL requireInitialRemoteConfigEnabled; - [Export("requireInitialRemoteConfigEnabled")] - bool RequireInitialRemoteConfigEnabled { get; } - - // @property (readonly, nonatomic) UAFeatures enabledFeatures; - [Export("enabledFeatures")] - UAFeatures EnabledFeatures { get; } - - // @property (readonly, copy, nonatomic) NSString * _Nullable deviceAPIURL; - [NullAllowed, Export("deviceAPIURL")] - string DeviceAPIURL { get; } - - // @property (readonly, copy, nonatomic) NSString * _Nullable remoteDataAPIURL; - [NullAllowed, Export("remoteDataAPIURL")] - string RemoteDataAPIURL { get; } - - // @property (readonly, copy, nonatomic) NSString * _Nullable analyticsURL; - [NullAllowed, Export("analyticsURL")] - string AnalyticsURL { get; } - - // @property (readonly, copy, nonatomic) NSString * _Nullable chatURL; - [NullAllowed, Export("chatURL")] - string ChatURL { get; } + interface UAAssociatedIdentifiers + { + // @property (readonly, nonatomic, class) NSInteger maxCount; + [Static] + [Export("maxCount")] + nint MaxCount { get; } + + // @property (readonly, nonatomic, class) NSInteger maxCharacterCount; + [Static] + [Export("maxCharacterCount")] + nint MaxCharacterCount { get; } - // @property (readonly, copy, nonatomic) NSString * _Nullable chatWebSocketURL; - [NullAllowed, Export("chatWebSocketURL")] - string ChatWebSocketURL { get; } - } + // @property (copy, nonatomic) NSString * _Nullable advertisingID; + [NullAllowed, Export("advertisingID")] + string AdvertisingID { get; set; } + // @property (copy, nonatomic) NSString * _Nullable vendorID; + [NullAllowed, Export("vendorID")] + string VendorID { get; set; } - // @interface SearchEventTemplate : NSObject - [BaseType(typeof(NSObject))] - [DisableDefaultCtor] - interface SearchEventTemplate - { - // @property (nonatomic, strong) NSNumber * _Nullable eventValue; - [NullAllowed, Export("eventValue", ArgumentSemantic.Strong)] - NSNumber EventValue { get; set; } + // @property (nonatomic) BOOL advertisingTrackingEnabled; + [Export("advertisingTrackingEnabled")] + bool AdvertisingTrackingEnabled { get; set; } - // @property (copy, nonatomic) NSString * _Nullable type; - [NullAllowed, Export("type")] - string Type { get; set; } + // @property (readonly, copy, nonatomic) NSDictionary * _Nonnull allIDs; + [Export("allIDs", ArgumentSemantic.Copy)] + NSDictionary AllIDs { get; } - // @property (copy, nonatomic) NSString * _Nullable identifier; - [NullAllowed, Export("identifier")] - string Identifier { get; set; } + // -(instancetype _Nonnull)initWithIdentifiers:(NSDictionary * _Nullable)identifiers __attribute__((objc_designated_initializer)); + [Export("initWithIdentifiers:")] + [DesignatedInitializer] + IntPtr Constructor([NullAllowed] NSDictionary identifiers); - // @property (copy, nonatomic) NSString * _Nullable category; - [NullAllowed, Export("category")] - string Category { get; set; } + // +(UAAssociatedIdentifiers * _Nonnull)identifiers __attribute__((warn_unused_result(""))); + [Static] + [Export("identifiers")] + UAAssociatedIdentifiers Identifiers(); - // @property (copy, nonatomic) NSString * _Nullable query; - [NullAllowed, Export("query")] - string Query { get; set; } + // +(UAAssociatedIdentifiers * _Nonnull)identifiersWithDictionary:(NSDictionary * _Nullable)identifiers __attribute__((warn_unused_result(""))); + [Static] + [Export("identifiersWithDictionary:")] + UAAssociatedIdentifiers Identifiers([NullAllowed] NSDictionary identifiers); - // @property (nonatomic) NSInteger totalResults; - [Export("totalResults")] - nint TotalResults { get; set; } + // -(void)setIdentifier:(NSString * _Nullable)identifier forKey:(NSString * _Nonnull)key; + [Export("setIdentifier:forKey:")] + void SetIdentifier([NullAllowed] string identifier, string key); + } - // +(SearchEventTemplate * _Nonnull)templateWithValue:(NSNumber * _Nonnull)value __attribute__((warn_unused_result(""))); - [Static] - [Export("templateWithValue:")] - SearchEventTemplate Template(NSNumber value); + // @interface UAAttributeMutations : NSObject + [BaseType(typeof(NSObject))] + interface UAAttributeMutations + { + // -(void)setString:(NSString * _Nonnull)string forAttribute:(NSString * _Nonnull)forAttribute; + [Export("setString:forAttribute:")] + void SetString(string @string, string forAttribute); - // +(SearchEventTemplate * _Nonnull)template __attribute__((warn_unused_result(""))); - [Static] - [Export("template")] - SearchEventTemplate Template(); + // -(void)setNumber:(NSNumber * _Nonnull)number forAttribute:(NSString * _Nonnull)forAttribute; + [Export("setNumber:forAttribute:")] + void SetNumber(NSNumber number, string forAttribute); - // -(UACustomEvent * _Nonnull)createEvent __attribute__((warn_unused_result(""))); - [Export("createEvent")] - UACustomEvent CreateEvent(); - } + // -(void)setDate:(NSDate * _Nonnull)date forAttribute:(NSString * _Nonnull)forAttribute; + [Export("setDate:forAttribute:")] + void SetDate(NSDate date, string forAttribute); - // @interface UAShareAction : NSObject - [BaseType(typeof(NSObject))] - interface UAShareAction : IUAAction - { - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull name; - [Static] - [Export("name")] - string Name { get; } + // -(void)removeAttribute:(NSString * _Nonnull)attribute; + [Export("removeAttribute:")] + void RemoveAttribute(string attribute); - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull shortName; - [Static] - [Export("shortName")] - string ShortName { get; } - } + // +(UAAttributeMutations * _Nonnull)mutations __attribute__((warn_unused_result(""))); + [Static] + [Export("mutations")] + UAAttributeMutations Mutations(); + } - // @interface UAShareActionPredicate : NSObject + // @interface UAAttributes : NSObject [BaseType(typeof(NSObject))] - interface UAShareActionPredicate : IUAActionPredicateProtocol + interface UAAttributes { + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull title; + [Static] + [Export("title")] + string Title { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull firstName; + [Static] + [Export("firstName")] + string FirstName { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull lastName; + [Static] + [Export("lastName")] + string LastName { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull fullName; + [Static] + [Export("fullName")] + string FullName { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull gender; + [Static] + [Export("gender")] + string Gender { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull zipCode; + [Static] + [Export("zipCode")] + string ZipCode { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull city; + [Static] + [Export("city")] + string City { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull region; + [Static] + [Export("region")] + string Region { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull country; + [Static] + [Export("country")] + string Country { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull birthdate; + [Static] + [Export("birthdate")] + string Birthdate { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull age; + [Static] + [Export("age")] + string Age { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull mobilePhone; + [Static] + [Export("mobilePhone")] + string MobilePhone { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull homePhone; + [Static] + [Export("homePhone")] + string HomePhone { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull workPhone; + [Static] + [Export("workPhone")] + string WorkPhone { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull loyaltyTier; + [Static] + [Export("loyaltyTier")] + string LoyaltyTier { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull company; + [Static] + [Export("company")] + string Company { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull username; + [Static] + [Export("username")] + string Username { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull accountCreation; + [Static] + [Export("accountCreation")] + string AccountCreation { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull email; + [Static] + [Export("email")] + string Email { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull advertisingId; + [Static] + [Export("advertisingId")] + string AdvertisingId { get; } } - // @interface UASubscriptionListEditor : NSObject + // @interface UAAttributesEditor : NSObject + [DisableDefaultCtor] [BaseType(typeof(NSObject))] - [DisableDefaultCtor] - interface UASubscriptionListEditor - { - // -(void)subscribe:(NSString * _Nonnull)subscriptionListID; - [Export("subscribe:")] - void Subscribe(string subscriptionListID); - - // -(void)unsubscribe:(NSString * _Nonnull)subscriptionListID; - [Export("unsubscribe:")] - void Unsubscribe(string subscriptionListID); - - // -(void)apply; - [Export("apply")] - void Apply(); - } - - // @interface UASystemVersion : NSObject - [BaseType(typeof(NSObject))] - interface UASystemVersion - { - // @property (readonly, copy, nonatomic) NSString * _Nonnull currentSystemVersion; - [Export("currentSystemVersion")] - string CurrentSystemVersion { get; } - - // -(BOOL)isGreaterOrEqual:(NSString * _Nonnull)version __attribute__((warn_unused_result(""))); - [Export("isGreaterOrEqual:")] - bool IsGreaterOrEqual(string version); - } - - // @interface UATagEditor : NSObject - [BaseType(typeof(NSObject))] - [DisableDefaultCtor] - interface UATagEditor - { - // -(void)addTags:(NSArray * _Nonnull)tags; - [Export("addTags:")] - void AddTags(string[] tags); - - // -(void)addTag:(NSString * _Nonnull)tag; - [Export("addTag:")] - void AddTag(string tag); - - // -(void)removeTags:(NSArray * _Nonnull)tags; - [Export("removeTags:")] - void RemoveTags(string[] tags); - - // -(void)removeTag:(NSString * _Nonnull)tag; - [Export("removeTag:")] - void RemoveTag(string tag); - - // -(void)setTags:(NSArray * _Nonnull)tags; - [Export("setTags:")] - void SetTags(string[] tags); - - // -(void)clearTags; - [Export("clearTags")] - void ClearTags(); - - // -(void)apply; - [Export("apply")] - void Apply(); - } - - // @interface UATagGroupUpdate : NSObject - [BaseType(typeof(NSObject))] - [DisableDefaultCtor] - interface UATagGroupUpdate - { - // @property (readonly, copy, nonatomic) NSString * _Nonnull group; - [Export("group")] - string Group { get; } - - // @property (readonly, copy, nonatomic) NSArray * _Nonnull tags; - [Export("tags", ArgumentSemantic.Copy)] - string[] Tags { get; } - - // @property (readonly, nonatomic) enum UATagGroupUpdateType type; - [Export("type")] - UATagGroupUpdateType Type { get; } - - // -(instancetype _Nonnull)initWithGroup:(NSString * _Nonnull)group tags:(NSArray * _Nonnull)tags type:(enum UATagGroupUpdateType)type __attribute__((objc_designated_initializer)); - [Export("initWithGroup:tags:type:")] - [DesignatedInitializer] - IntPtr Constructor(string group, string[] tags, UATagGroupUpdateType type); - } - - // @interface UATagGroupsEditor : NSObject - [BaseType(typeof(NSObject))] - [DisableDefaultCtor] - interface UATagGroupsEditor - { - // -(void)addTags:(NSArray * _Nonnull)tags group:(NSString * _Nonnull)group; - [Export("addTags:group:")] - void AddTags(string[] tags, string group); - - // -(void)removeTags:(NSArray * _Nonnull)tags group:(NSString * _Nonnull)group; - [Export("removeTags:group:")] - void RemoveTags(string[] tags, string group); - - // -(void)setTags:(NSArray * _Nonnull)tags group:(NSString * _Nonnull)group; - [Export("setTags:group:")] - void SetTags(string[] tags, string group); - - // -(void)apply; - [Export("apply")] - void Apply(); - } - - // @interface UATagsActionPredicate : NSObject - [NoTV] + interface UAAttributesEditor + { + // -(void)removeAttribute:(NSString * _Nonnull)attribute; + [Export("removeAttribute:")] + void RemoveAttribute(string attribute); + + // -(void)setDate:(NSDate * _Nonnull)date attribute:(NSString * _Nonnull)attribute; + [Export("setDate:attribute:")] + void SetDate(NSDate date, string attribute); + + // -(void)setNumber:(NSNumber * _Nonnull)number attribute:(NSString * _Nonnull)attribute; + [Export("setNumber:attribute:")] + void SetNumber(NSNumber number, string attribute); + + // -(void)setString:(NSString * _Nonnull)string attribute:(NSString * _Nonnull)attribute; + [Export("setString:attribute:")] + void SetString(string @string, string attribute); + + // -(void)apply; + [Export("apply")] + void Apply(); + } + + // @interface UABeveledLoadingIndicator : UIView [BaseType(typeof(NSObject))] - interface UATagsActionPredicate : IUAActionPredicateProtocol + interface UABeveledLoadingIndicator { + // @property (getter = isHidden, nonatomic) BOOL hidden; + [Export("hidden")] + bool Hidden { [Bind("isHidden")] get; set; } + + // -(void)show; + [Export("show")] + void Show(); + + // -(void)hide; + [Export("hide")] + void Hide(); } - // @protocol UANavigationDelegate - [Protocol, Model] - [BaseType(typeof(NSObject))] - interface UANavigationDelegate : IWKNavigationDelegate - { - // @optional -(void)closeWindow:(BOOL)animated; - [Export("closeWindow:")] - void CloseWindow(bool animated); - } + // @interface UAChannel : NSObject + [BaseType(typeof(NSObject))] + [DisableDefaultCtor] + interface UAChannel : IUAComponent + { + // @property (readonly, nonatomic, class) NSNotificationName _Nonnull channelCreatedEvent; + [Static] + [Export("channelCreatedEvent")] + string ChannelCreatedEvent { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull channelIdentifierKey; + [Static] + [Export("channelIdentifierKey")] + string ChannelIdentifierKey { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull channelExistingKey; + [Static] + [Export("channelExistingKey")] + string ChannelExistingKey { get; } + + // @property (readonly, nonatomic, class) NSNotificationName _Nonnull channelUpdatedEvent; + [Static] + [Export("channelUpdatedEvent")] + string ChannelUpdatedEvent { get; } + + // @property (copy, nonatomic) NSArray * _Nonnull tags; + [Export("tags", ArgumentSemantic.Copy)] + string[] Tags { get; set; } + + // @property (readonly, copy, nonatomic) NSString * _Nullable identifier; + [NullAllowed, Export("identifier")] + string Identifier { get; } + + // @property (nonatomic) BOOL isChannelTagRegistrationEnabled; + [Export("isChannelTagRegistrationEnabled")] + bool IsChannelTagRegistrationEnabled { get; set; } + + // @property (readonly, nonatomic, strong, class) UAChannel * _Nonnull shared; + [Static] + [Export("shared", ArgumentSemantic.Strong)] + UAChannel Shared { get; } + + // -(UATagEditor * _Nonnull)editTags __attribute__((warn_unused_result(""))); + [Export("editTags")] + UATagEditor EditTags(); + + // -(void)editTags:(void (^ _Nonnull)(UATagEditor * _Nonnull))editorBlock; + [Export("editTags:")] + void EditTags(Action editorBlock); + + // -(UATagGroupsEditor * _Nonnull)editTagGroups __attribute__((warn_unused_result(""))); + [Export("editTagGroups")] + UATagGroupsEditor EditTagGroups(); - interface IUANavigationDelegate { }; + // -(void)editTagGroups:(void (^ _Nonnull)(UATagGroupsEditor * _Nonnull))editorBlock; + [Export("editTagGroups:")] + void EditTagGroups(Action editorBlock); - // @interface UAURLActionPredicate : NSObject + // -(UASubscriptionListEditor * _Nonnull)editSubscriptionLists __attribute__((warn_unused_result(""))); + [Export("editSubscriptionLists")] + UASubscriptionListEditor EditSubscriptionLists(); + + // -(void)editSubscriptionLists:(void (^ _Nonnull)(UASubscriptionListEditor * _Nonnull))editorBlock; + [Export("editSubscriptionLists:")] + void EditSubscriptionLists(Action editorBlock); + + // -(void)fetchSubscriptionListsWithCompletionHandler:(void (^ _Nonnull)(NSArray * _Nullable, NSError * _Nullable))completionHandler; + [Export("fetchSubscriptionListsWithCompletionHandler:")] + void FetchSubscriptionLists(Action completionHandler); + + // -(UAAttributesEditor * _Nonnull)editAttributes __attribute__((warn_unused_result(""))); + [Export("editAttributes")] + UAAttributesEditor EditAttributes(); + + // -(void)editAttributes:(void (^ _Nonnull)(UAAttributesEditor * _Nonnull))editorBlock; + [Export("editAttributes:")] + void EditAttributes(Action editorBlock); + + // -(void)addTag:(NSString * _Nonnull)tag __attribute__((deprecated("Use editTags instead."))); + [Export("addTag:")] + void AddTag(string tag); + + // -(void)addTags:(NSArray *)tags __attribute__((deprecated("Use editTags instead."))); + [Export("addTags:")] + void AddTags(string[] tags); + + // -(void)removeTag:(NSString * _Nonnull)tag __attribute__((deprecated("Use editTags instead."))); + [Export("removeTag:")] + void RemoveTag(string tag); + + // -(void)removeTags:(NSArray * _Nonnull)tags __attribute__((deprecated("Use editTags instead."))); + [Export("removeTags:")] + void RemoveTags(string[] tags); + + // -(void)addTags:(NSArray * _Nonnull)tags group:(NSString * _Nonnull)group __attribute__((deprecated("Use editTagGroups instead."))); + [Export("addTags:group:")] + void AddTags(string[] tags, string group); + + // -(void)removeTags:(NSArray * _Nonnull)tags group:(NSString * _Nonnull)group __attribute__((deprecated("Use editTagGroups instead."))); + [Export("removeTags:group:")] + void RemoveTags(string[] tags, string group); + + // -(void)setTags:(NSArray * _Nonnull)tags group:(NSString * _Nonnull)group __attribute__((deprecated("Use editTagGroups instead."))); + [Export("setTags:group:")] + void SetTags(string[] tags, string group); + + // -(void)applyAttributeMutations:(UAAttributeMutations * _Nonnull)mutations __attribute__((deprecated("Use editAttributes instead."))); + [Export("applyAttributeMutations:")] + void ApplyAttributeMutations(UAAttributeMutations mutations); + + // -(void)enableChannelCreation; + [Export("enableChannelCreation")] + void EnableChannelCreation(); + } + + // @interface UAChannelCapture : NSObject + [NoTV] [BaseType(typeof(NSObject))] - interface UAURLActionPredicate : IUAActionPredicateProtocol + [DisableDefaultCtor] + interface UAChannelCapture { + // @property (nonatomic) BOOL enabled; + [Export("enabled")] + bool Enabled { get; set; } } - // @interface UAURLAllowList : NSObject + // @interface UACircularRegion : NSObject + [BaseType(typeof(NSObject))] + [DisableDefaultCtor] + interface UACircularRegion + { + // -(instancetype _Nullable)initWithRadius:(double)radius latitude:(double)latitude longitude:(double)longitude __attribute__((objc_designated_initializer)); + [Export("initWithRadius:latitude:longitude:")] + [DesignatedInitializer] + IntPtr Constructor(double radius, double latitude, double longitude); + + // +(UACircularRegion * _Nullable)circularRegionWithRadius:(double)radius latitude:(double)latitude longitude:(double)longitude __attribute__((warn_unused_result(""))); + [Static] + [Export("circularRegionWithRadius:latitude:longitude:")] + [return: NullAllowed] + UACircularRegion CircularRegion(double radius, double latitude, double longitude); + } + + // @interface UAConfig : NSObject [BaseType(typeof(NSObject))] - interface UAURLAllowList - { - // +(UAURLAllowList * _Nonnull)allowListWithConfig:(UARuntimeConfig * _Nonnull)config __attribute__((warn_unused_result(""))); - [Static] - [Export("allowListWithConfig:")] - UAURLAllowList AllowList(UARuntimeConfig config); - - [Wrap("WeakDelegate")] - [NullAllowed] - IUAURLAllowListDelegate Delegate { get; set; } - - // @property (nonatomic, weak) id _Nullable delegate; - [NullAllowed, Export("delegate", ArgumentSemantic.Weak)] - NSObject WeakDelegate { get; set; } - - // -(BOOL)addEntry:(NSString * _Nonnull)patternString __attribute__((warn_unused_result(""))); - [Export("addEntry:")] - bool AddEntry(string patternString); - - // -(BOOL)addEntry:(NSString * _Nonnull)patternString scope:(UAURLAllowListScope)scope __attribute__((warn_unused_result(""))); - [Export("addEntry:scope:")] - bool AddEntry(string patternString, UAURLAllowListScope scope); - - // -(BOOL)isAllowed:(NSURL * _Nullable)url __attribute__((warn_unused_result(""))); - [Export("isAllowed:")] - bool IsAllowed([NullAllowed] NSUrl url); - - // -(BOOL)isAllowed:(NSURL * _Nullable)url scope:(UAURLAllowListScope)scope __attribute__((warn_unused_result(""))); - [Export("isAllowed:scope:")] - bool IsAllowed([NullAllowed] NSUrl url, UAURLAllowListScope scope); - } - - // @protocol UAURLAllowListDelegate - [Protocol, Model] - [BaseType(typeof(NSObject))] - interface UAURLAllowListDelegate - { - // @required -(BOOL)allowURL:(NSURL * _Nonnull)url scope:(UAURLAllowListScope)scope __attribute__((warn_unused_result(""))); - [Abstract] - [Export("allowURL:scope:")] - bool Scope(NSUrl url, UAURLAllowListScope scope); - } - - interface IUAURLAllowListDelegate { }; - - // @interface UAUtils : NSObject - [BaseType(typeof(NSObject))] - interface UAUtils - { - // +(BOOL)float:(CGFloat)float1 isEqualToFloat:(CGFloat)float2 withAccuracy:(CGFloat)accuracy __attribute__((warn_unused_result(""))); - [Static] - [Export("float:isEqualToFloat:withAccuracy:")] - bool Float(nfloat float1, nfloat float2, nfloat accuracy); - - // +(NSString * _Nullable)deviceModelName __attribute__((warn_unused_result(""))); - [Static] - [Export("deviceModelName")] - [return: NullAllowed] - string DeviceModelName(); - - // +(NSString * _Nullable)bundleShortVersionString __attribute__((warn_unused_result(""))); - [Static] - [Export("bundleShortVersionString")] - [return: NullAllowed] - string BundleShortVersionString(); - - // +(NSString * _Nullable)carrierName __attribute__((warn_unused_result(""))); - [Static] - [Export("carrierName")] - [return: NullAllowed] - string CarrierName(); - - // +(NSString * _Nonnull)connectionType __attribute__((warn_unused_result(""))); - [Static] - [Export("connectionType")] - string ConnectionType(); - - // +(enum NSComparisonResult)compareVersion:(NSString * _Nonnull)fromVersion toVersion:(NSString * _Nonnull)toVersion __attribute__((warn_unused_result(""))); - [Static] - [Export("compareVersion:toVersion:")] - NSComparisonResult CompareVersion(string fromVersion, string toVersion); - - // +(NSDateFormatter * _Nonnull)ISODateFormatterUTC __attribute__((warn_unused_result(""))); - [Static] - [Export("ISODateFormatterUTC")] - NSDateFormatter ISODateFormatterUTC(); - - // +(NSDateFormatter * _Nonnull)ISODateFormatterUTCWithDelimiter __attribute__((warn_unused_result(""))); - [Static] - [Export("ISODateFormatterUTCWithDelimiter")] - NSDateFormatter ISODateFormatterUTCWithDelimiter(); - - // +(NSDate * _Nullable)parseISO8601DateFromString:(NSString * _Nonnull)from __attribute__((warn_unused_result(""))); - [Static] - [Export("parseISO8601DateFromString:")] - [return: NullAllowed] - NSDate ParseISO8601DateFromString(string from); - - // +(UIWindow * _Nullable)mainWindow __attribute__((warn_unused_result(""))) __attribute__((availability(macos_app_extension, unavailable))) __attribute__((availability(tvos_app_extension, unavailable))) __attribute__((availability(watchos_app_extension, unavailable))) __attribute__((availability(ios_app_extension, unavailable))); - [Static] - [Export("mainWindow")] - [return: NullAllowed] - UIWindow MainWindow(); - - // +(UIWindow * _Nullable)mainWindow:(UIWindowScene * _Nonnull)scene __attribute__((warn_unused_result(""))) __attribute__((availability(tvos_app_extension, unavailable))) __attribute__((availability(tvos, introduced=13.0))) __attribute__((availability(ios, introduced=13))); - [Static] - [Export("mainWindow:")] - [return: NullAllowed] - UIWindow MainWindow(UIWindowScene scene); - - // +(UIWindow * _Nullable)windowForView:(UIView * _Nonnull)view __attribute__((warn_unused_result(""))); - [Static] - [Export("windowForView:")] - [return: NullAllowed] - UIWindow WindowForView(UIView view); - - // +(UIViewController * _Nullable)topController __attribute__((warn_unused_result(""))) __attribute__((availability(tvos_app_extension, unavailable))); - [Static] - [Export("topController")] - [return: NullAllowed] - UIViewController TopController(); - - // +(UIBackgroundFetchResult)mergeFetchResults:(NSArray * _Nonnull)results __attribute__((warn_unused_result(""))); - [Static] - [Export("mergeFetchResults:")] - UIBackgroundFetchResult MergeFetchResults(NSNumber[] results); - - // +(BOOL)isSilentPush:(NSDictionary * _Nonnull)notification __attribute__((warn_unused_result(""))); - [Static] - [Export("isSilentPush:")] - bool IsSilentPush(NSDictionary notification); - - // +(BOOL)isAlertingPush:(NSDictionary * _Nonnull)notification __attribute__((warn_unused_result(""))); - [Static] - [Export("isAlertingPush:")] - bool IsAlertingPush(NSDictionary notification); - - // +(NSString * _Nonnull)deviceTokenStringFromDeviceToken:(NSData * _Nonnull)token __attribute__((warn_unused_result(""))); - [Static] - [Export("deviceTokenStringFromDeviceToken:")] - string DeviceTokenStringFromDeviceToken(NSData token); - - // +(NSData * _Nonnull)sha256DigestWithString:(NSString * _Nonnull)input __attribute__((warn_unused_result(""))); - [Static] - [Export("sha256DigestWithString:")] - NSData Sha256Digest(string input); - - // +(NSString * _Nonnull)sha256HashWithString:(NSString * _Nonnull)input __attribute__((warn_unused_result(""))); - [Static] - [Export("sha256HashWithString:")] - string Sha256Hash(string input); - - // +(NSString * _Nullable)authHeaderStringWithName:(NSString * _Nonnull)username password:(NSString * _Nonnull)password __attribute__((warn_unused_result(""))); - [Static] - [Export("authHeaderStringWithName:password:")] - [return: NullAllowed] - string AuthHeaderString(string username, string password); - } - - // @interface UAVersionMatcher : NSObject - [BaseType(typeof(NSObject))] - [DisableDefaultCtor] - interface UAVersionMatcher - { - // -(instancetype _Nullable)initWithVersionConstraint:(NSString * _Nonnull)versionConstraint __attribute__((objc_designated_initializer)); - [Export("initWithVersionConstraint:")] - [DesignatedInitializer] - IntPtr Constructor(string versionConstraint); - - // +(UAVersionMatcher * _Nullable)matcherWithVersionConstraint:(NSString * _Nonnull)versionConstraint __attribute__((warn_unused_result(""))); - [Static] - [Export("matcherWithVersionConstraint:")] - [return: NullAllowed] - UAVersionMatcher Matcher(string versionConstraint); - - // -(BOOL)evaluateObject:(id _Nullable)value __attribute__((warn_unused_result(""))); - [Export("evaluateObject:")] - bool EvaluateObject([NullAllowed] NSObject value); - - // +(BOOL)isExactVersion:(NSString * _Nonnull)versionConstraint __attribute__((warn_unused_result(""))); - [Static] - [Export("isExactVersion:")] - bool IsExactVersion(string versionConstraint); - - // +(BOOL)isSubVersion:(NSString * _Nonnull)versionConstraint __attribute__((warn_unused_result(""))); - [Static] - [Export("isSubVersion:")] - bool IsSubVersion(string versionConstraint); - - // +(BOOL)isVersionRange:(NSString * _Nonnull)versionConstraint __attribute__((warn_unused_result(""))); - [Static] - [Export("isVersionRange:")] - bool IsVersionRange(string versionConstraint); - } - - // @interface UAViewUtils : NSObject - [BaseType(typeof(NSObject))] - interface UAViewUtils - { - // +(void)applyContainerConstraintsToContainer:(UIView * _Nullable)container containedView:(UIView * _Nullable)contained; - [Static] - [Export("applyContainerConstraintsToContainer:containedView:")] - void ApplyContainerConstraintsToContainer([NullAllowed] UIView container, [NullAllowed] UIView contained); - } - - // @interface UAWalletAction : UAOpenExternalURLAction - [BaseType(typeof(UAOpenExternalURLAction))] - interface UAWalletAction - { - } - - // @interface UAWebView : WKWebView - [NoTV] - [BaseType(typeof(WKWebView))] - interface UAWebView - { - } -} + interface UAConfig : INSCopying + { + // @property (copy, nonatomic) NSString * _Nullable developmentAppKey; + [NullAllowed, Export("developmentAppKey")] + string DevelopmentAppKey { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable developmentAppSecret; + [NullAllowed, Export("developmentAppSecret")] + string DevelopmentAppSecret { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable productionAppKey; + [NullAllowed, Export("productionAppKey")] + string ProductionAppKey { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable productionAppSecret; + [NullAllowed, Export("productionAppSecret")] + string ProductionAppSecret { get; set; } + + // @property (nonatomic) enum UALogLevel developmentLogLevel; + [Export("developmentLogLevel", ArgumentSemantic.Assign)] + UALogLevel DevelopmentLogLevel { get; set; } + + // @property (nonatomic) enum UALogLevel productionLogLevel; + [Export("productionLogLevel", ArgumentSemantic.Assign)] + UALogLevel ProductionLogLevel { get; set; } + + // @property (nonatomic) BOOL autoPauseInAppAutomationOnLaunch; + [Export("autoPauseInAppAutomationOnLaunch")] + bool AutoPauseInAppAutomationOnLaunch { get; set; } + + // @property (nonatomic) enum UACloudSite site; + [Export("site", ArgumentSemantic.Assign)] + UACloudSite Site { get; set; } + + // @property (nonatomic) UAFeatures enabledFeatures; + [Export("enabledFeatures", ArgumentSemantic.Assign)] + UAFeatures EnabledFeatures { get; set; } + + // @property (copy, nonatomic) NSString * _Nonnull defaultAppKey; + [Export("defaultAppKey")] + string DefaultAppKey { get; set; } + + // @property (copy, nonatomic) NSString * _Nonnull defaultAppSecret; + [Export("defaultAppSecret")] + string DefaultAppSecret { get; set; } + + // @property (nonatomic) BOOL inProduction; + [Export("inProduction")] + bool InProduction { get; set; } + + // @property (nonatomic) BOOL detectProvisioningMode; + [Export("detectProvisioningMode")] + bool DetectProvisioningMode { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable profilePath; + [NullAllowed, Export("profilePath")] + string ProfilePath { get; set; } + + // @property (nonatomic) BOOL isAutomaticSetupEnabled; + [Export("isAutomaticSetupEnabled")] + bool IsAutomaticSetupEnabled { get; set; } + + // @property (copy, nonatomic) NSArray * _Nonnull URLAllowList; + [Export("URLAllowList", ArgumentSemantic.Copy)] + string[] URLAllowList { get; set; } + + // @property (copy, nonatomic) NSArray * _Nonnull URLAllowListScopeJavaScriptInterface; + [Export("URLAllowListScopeJavaScriptInterface", ArgumentSemantic.Copy)] + string[] URLAllowListScopeJavaScriptInterface { get; set; } + + // @property (copy, nonatomic) NSArray * _Nonnull URLAllowListScopeOpenURL; + [Export("URLAllowListScopeOpenURL", ArgumentSemantic.Copy)] + string[] URLAllowListScopeOpenURL { get; set; } + + // @property (nonatomic) BOOL suppressAllowListError; + [Export("suppressAllowListError")] + bool SuppressAllowListError { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable itunesID; + [NullAllowed, Export("itunesID")] + string ItunesID { get; set; } + + // @property (nonatomic) BOOL isAnalyticsEnabled; + [Export("isAnalyticsEnabled")] + bool IsAnalyticsEnabled { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable messageCenterStyleConfig; + [NullAllowed, Export("messageCenterStyleConfig")] + string MessageCenterStyleConfig { get; set; } + + // @property (nonatomic) BOOL clearUserOnAppRestore; + [Export("clearUserOnAppRestore")] + bool ClearUserOnAppRestore { get; set; } + + // @property (nonatomic) BOOL clearNamedUserOnAppRestore; + [Export("clearNamedUserOnAppRestore")] + bool ClearNamedUserOnAppRestore { get; set; } + + // @property (nonatomic) BOOL isChannelCaptureEnabled; + [Export("isChannelCaptureEnabled")] + bool IsChannelCaptureEnabled { get; set; } + + // @property (nonatomic) BOOL isChannelCreationDelayEnabled; + [Export("isChannelCreationDelayEnabled")] + bool IsChannelCreationDelayEnabled { get; set; } + + // @property (nonatomic) BOOL isExtendedBroadcastsEnabled; + [Export("isExtendedBroadcastsEnabled")] + bool IsExtendedBroadcastsEnabled { get; set; } + + // @property (nonatomic) BOOL requestAuthorizationToUseNotifications; + [Export("requestAuthorizationToUseNotifications")] + bool RequestAuthorizationToUseNotifications { get; set; } + + // @property (nonatomic) BOOL requireInitialRemoteConfigEnabled; + [Export("requireInitialRemoteConfigEnabled")] + bool RequireInitialRemoteConfigEnabled { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable initialConfigURL; + [NullAllowed, Export("initialConfigURL")] + string InitialConfigURL { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable deviceAPIURL; + [NullAllowed, Export("deviceAPIURL")] + string DeviceAPIURL { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable analyticsURL; + [NullAllowed, Export("analyticsURL")] + string AnalyticsURL { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable remoteDataAPIURL; + [NullAllowed, Export("remoteDataAPIURL")] + string RemoteDataAPIURL { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable chatURL; + [NullAllowed, Export("chatURL")] + string ChatURL { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable chatWebSocketURL; + [NullAllowed, Export("chatWebSocketURL")] + string ChatWebSocketURL { get; set; } + + // @property (readonly, copy, nonatomic) NSString * _Nonnull appKey; + [Export("appKey")] + string AppKey { get; } + + // @property (readonly, copy, nonatomic) NSString * _Nonnull appSecret; + [Export("appSecret")] + string AppSecret { get; } + + // @property (readonly, nonatomic) enum UALogLevel logLevel; + [Export("logLevel")] + UALogLevel LogLevel { get; } + + // +(UAConfig * _Nonnull)defaultConfig __attribute__((warn_unused_result(""))); + [Static] + [Export("defaultConfig")] + UAConfig DefaultConfig(); + + // +(UAConfig * _Nonnull)configWithContentsOfFile:(NSString * _Nullable)path __attribute__((warn_unused_result(""))); + [Static] + [Export("configWithContentsOfFile:")] + UAConfig Config([NullAllowed] string path); + + // +(UAConfig * _Nonnull)config __attribute__((warn_unused_result(""))); + [Static] + [Export("config")] + UAConfig Config(); + + // -(instancetype _Nonnull)initWithContentsOfFile:(NSString * _Nullable)path; + [Export("initWithContentsOfFile:")] + IntPtr Constructor([NullAllowed] string path); + + // -(BOOL)validate __attribute__((warn_unused_result(""))); + [Export("validate")] + bool Validate(); + + // +(BOOL)isProductionProvisioningProfile:(NSString * _Nonnull)profilePath __attribute__((warn_unused_result(""))); + [Static] + [Export("isProductionProvisioningProfile:")] + bool IsProductionProvisioningProfile(string profilePath); + } + + // @interface UAConnectionType : NSObject + [BaseType(typeof(NSObject))] + interface UAConnectionType + { + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull none; + [Static] + [Export("none")] + string None { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull cell; + [Static] + [Export("cell")] + string Cell { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull wifi; + [Static] + [Export("wifi")] + string Wifi { get; } + } + + // @interface UAContact : NSObject + [BaseType(typeof(NSObject))] + [DisableDefaultCtor] + interface UAContact : IUAComponent + { + // @property (readonly, nonatomic, class) NSNotificationName _Nonnull contactConflictEvent; + [Static] + [Export("contactConflictEvent")] + string ContactConflictEvent { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull contactConflictEventKey; + [Static] + [Export("contactConflictEventKey")] + string ContactConflictEventKey { get; } + + // @property (readonly, nonatomic, class) NSInteger maxNamedUserIDLength; + [Static] + [Export("maxNamedUserIDLength")] + nint MaxNamedUserIDLength { get; } + + // -(void)getNamedUserIDWithCompletionHandler:(void (^ _Nonnull)(NSString * _Nullable))completionHandler; + [Export("getNamedUserIDWithCompletionHandler:")] + void GetNamedUserID(Action completionHandler); + + // @property (readonly, nonatomic, strong, class) UAContact * _Nonnull shared; + [Static] + [Export("shared", ArgumentSemantic.Strong)] + UAContact Shared { get; } + + // -(void)identify:(NSString * _Nonnull)namedUserID; + [Export("identify:")] + void Identify(string namedUserID); + + // -(void)reset; + [Export("reset")] + void Reset(); + + // -(UATagGroupsEditor * _Nonnull)editTagGroups __attribute__((warn_unused_result(""))); + [Export("editTagGroups")] + UATagGroupsEditor EditTagGroups(); + + // -(void)editTagGroups:(void (^ _Nonnull)(UATagGroupsEditor * _Nonnull))editorBlock; + [Export("editTagGroups:")] + void EditTagGroups(Action editorBlock); + + // -(UAAttributesEditor * _Nonnull)editAttributes __attribute__((warn_unused_result(""))); + [Export("editAttributes")] + UAAttributesEditor EditAttributes(); + + // -(void)editAttributes:(void (^ _Nonnull)(UAAttributesEditor * _Nonnull))editorBlock; + [Export("editAttributes:")] + void EditAttributes(Action editorBlock); + + // -(void)registerEmail:(NSString * _Nonnull)address options:(UAEmailRegistrationOptions * _Nonnull)options; + [Export("registerEmail:options:")] + void RegisterEmail(string address, UAEmailRegistrationOptions options); + + // -(void)registerSMS:(NSString * _Nonnull)msisdn options:(UASMSRegistrationOptions * _Nonnull)options; + [Export("registerSMS:options:")] + void RegisterSMS(string msisdn, UASMSRegistrationOptions options); + + // -(void)registerOpen:(NSString * _Nonnull)address options:(UAOpenRegistrationOptions * _Nonnull)options; + [Export("registerOpen:options:")] + void RegisterOpen(string address, UAOpenRegistrationOptions options); + + // -(void)associateChannel:(NSString * _Nonnull)channelID type:(enum UAChannelType)type; + [Export("associateChannel:type:")] + void AssociateChannel(string channelID, UAChannelType type); + + // -(UAScopedSubscriptionListEditor * _Nonnull)editSubscriptionLists __attribute__((warn_unused_result(""))); + [Export("editSubscriptionLists")] + UAScopedSubscriptionListEditor EditSubscriptionLists(); + + // -(void)editSubscriptionLists:(void (^ _Nonnull)(UAScopedSubscriptionListEditor * _Nonnull))editorBlock; + [Export("editSubscriptionLists:")] + void EditSubscriptionLists(Action editorBlock); + + // -(void)fetchSubscriptionListsWithCompletionHandler:(void (^ _Nonnull)(NSDictionary *))completionHandler; + [Export("fetchSubscriptionListsWithCompletionHandler:")] + void FetchSubscriptionLists(Action completionHandler); + } + + // @interface UACustomEvent : NSObject + [BaseType(typeof(NSObject))] + [DisableDefaultCtor] + interface UACustomEvent : IUAEvent + { + // @property (readonly, nonatomic, class) NSInteger maxPropertiesSize; + [Static] + [Export("maxPropertiesSize")] + nint MaxPropertiesSize { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull eventNameKey; + [Static] + [Export("eventNameKey")] + string EventNameKey { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull eventValueKey; + [Static] + [Export("eventValueKey")] + string EventValueKey { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull eventPropertiesKey; + [Static] + [Export("eventPropertiesKey")] + string EventPropertiesKey { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull eventTransactionIDKey; + [Static] + [Export("eventTransactionIDKey")] + string EventTransactionIDKey { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull eventInteractionIDKey; + [Static] + [Export("eventInteractionIDKey")] + string EventInteractionIDKey { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull eventInteractionTypeKey; + [Static] + [Export("eventInteractionTypeKey")] + string EventInteractionTypeKey { get; } + + // @property (copy, nonatomic) NSString * _Nullable conversionSendID; + [NullAllowed, Export("conversionSendID")] + string ConversionSendID { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable conversionPushMetadata; + [NullAllowed, Export("conversionPushMetadata")] + string ConversionPushMetadata { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable templateType; + [NullAllowed, Export("templateType")] + string TemplateType { get; set; } + + // @property (nonatomic, strong) NSNumber * _Nullable eventValue; + [NullAllowed, Export("eventValue", ArgumentSemantic.Strong)] + NSNumber EventValue { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable eventName; + [NullAllowed, Export("eventName")] + string EventName { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable transactionID; + [NullAllowed, Export("transactionID")] + string TransactionID { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable interactionType; + [NullAllowed, Export("interactionType")] + string InteractionType { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable interactionID; + [NullAllowed, Export("interactionID")] + string InteractionID { get; set; } + + // @property (copy, nonatomic) NSDictionary * _Nonnull properties; + [Export("properties", ArgumentSemantic.Copy)] + NSDictionary Properties { get; set; } + + // @property (readonly, copy, nonatomic) NSString * _Nonnull eventType; + [Export("eventType")] + string EventType { get; } + + // @property (readonly, nonatomic) UAEventPriority priority; + //[Export("priority")] + //UAEventPriority Priority { get; } + + // -(instancetype _Nonnull)initWithName:(NSString * _Nonnull)name value:(NSNumber * _Nullable)value __attribute__((objc_designated_initializer)); + [Export("initWithName:value:")] + [DesignatedInitializer] + IntPtr Constructor(string name, [NullAllowed] NSNumber value); + + // -(instancetype _Nonnull)initWithName:(NSString * _Nonnull)name stringValue:(NSString * _Nullable)stringValue; + [Export("initWithName:stringValue:")] + IntPtr Constructor(string name, [NullAllowed] string stringValue); + + // +(UACustomEvent * _Nonnull)eventWithName:(NSString * _Nonnull)name __attribute__((warn_unused_result(""))); + [Static] + [Export("eventWithName:")] + UACustomEvent Event(string name); + + // +(UACustomEvent * _Nonnull)eventWithName:(NSString * _Nonnull)name valueFromString:(NSString * _Nullable)string __attribute__((warn_unused_result(""))); + [Static] + [Export("eventWithName:valueFromString:")] + UACustomEvent Event(string name, [NullAllowed] string @string); + + // +(UACustomEvent * _Nonnull)eventWithName:(NSString * _Nonnull)name value:(NSNumber * _Nullable)value __attribute__((warn_unused_result(""))); + [Static] + [Export("eventWithName:value:")] + UACustomEvent Event(string name, [NullAllowed] NSNumber value); + + // -(BOOL)isValid __attribute__((warn_unused_result(""))); + [Export("isValid")] + bool IsValid(); + + // -(void)setInteractionFromMessageCenterMessage:(NSString * _Nullable)messageID; + [Export("setInteractionFromMessageCenterMessage:")] + void SetInteractionFromMessageCenterMessage([NullAllowed] string messageID); + + // @property (readonly, copy, nonatomic) NSDictionary * _Nonnull data; + [Export("data", ArgumentSemantic.Copy)] + NSDictionary Data { get; } + + // @property (readonly, copy, nonatomic) NSDictionary * _Nonnull payload; + [Export("payload", ArgumentSemantic.Copy)] + NSDictionary Payload { get; } + + // -(void)track; + [Export("track")] + void Track(); + } + + // @protocol UADeepLinkDelegate + [Protocol, Model] + [BaseType(typeof(NSObject))] + interface UADeepLinkDelegate + { + // @required -(void)receivedDeepLink:(NSURL * _Nonnull)deepLink completionHandler:(void (^ _Nonnull)(void))completionHandler; + [Abstract] + [Export("receivedDeepLink:completionHandler:")] + void ReceivedDeepLink(NSUrl deepLink, Action completionHandler); + } + + interface IUADeepLinkDelegate { }; + + // @interface UAInstallAttributionEvent : NSObject + [BaseType(typeof(NSObject))] + interface UAInstallAttributionEvent : IUAEvent + { + // @property (readonly, copy, nonatomic) NSString * _Nonnull eventType; + [Export("eventType")] + string EventType { get; } + + // @property (readonly, copy, nonatomic) NSDictionary * _Nonnull data; + [Export("data", ArgumentSemantic.Copy)] + NSDictionary Data { get; } + + // @property (readonly, nonatomic) UAEventPriority priority; + [Export("priority")] + UAEventPriority Priority { get; } + + // -(instancetype _Nonnull)initWithAppPurchaseDate:(NSDate * _Nonnull)appPurchaseDate iAdImpressionDate:(NSDate * _Nonnull)iAdImpressionDate __attribute__((objc_designated_initializer)); + [Export("initWithAppPurchaseDate:iAdImpressionDate:")] + [DesignatedInitializer] + IntPtr Constructor(NSDate appPurchaseDate, NSDate iAdImpressionDate); + + // +(UAInstallAttributionEvent * _Nonnull)eventWithAppPurchaseDate:(NSDate * _Nonnull)appPurchaseDate iAdImpressionDate:(NSDate * _Nonnull)iAdImpressionDate __attribute__((warn_unused_result(""))); + [Static] + [Export("eventWithAppPurchaseDate:iAdImpressionDate:")] + UAInstallAttributionEvent Event(NSDate appPurchaseDate, NSDate iAdImpressionDate); + + // +(UAInstallAttributionEvent * _Nonnull)event __attribute__((warn_unused_result(""))); + [Static] + [Export("event")] + UAInstallAttributionEvent Event(); + } + + // @interface UAJSONMatcher : NSObject + [BaseType(typeof(NSObject))] + [DisableDefaultCtor] + interface UAJSONMatcher + { + // -(instancetype _Nonnull)initWithValueMatcher:(UAJSONValueMatcher * _Nonnull)valueMatcher; + [Export("initWithValueMatcher:")] + IntPtr Constructor(UAJSONValueMatcher valueMatcher); + + // -(instancetype _Nonnull)initWithValueMatcher:(UAJSONValueMatcher * _Nonnull)valueMatcher scope:(NSArray * _Nonnull)scope; + [Export("initWithValueMatcher:scope:")] + IntPtr Constructor(UAJSONValueMatcher valueMatcher, string[] scope); + + // -(instancetype _Nonnull)initWithValueMatcher:(UAJSONValueMatcher * _Nonnull)valueMatcher ignoreCase:(BOOL)ignoreCase; + [Export("initWithValueMatcher:ignoreCase:")] + IntPtr Constructor(UAJSONValueMatcher valueMatcher, bool ignoreCase); + + // -(instancetype _Nonnull)initWithValueMatcher:(UAJSONValueMatcher * _Nonnull)valueMatcher key:(NSString * _Nonnull)key; + [Export("initWithValueMatcher:key:")] + IntPtr Constructor(UAJSONValueMatcher valueMatcher, string key); + + // -(instancetype _Nonnull)initWithValueMatcher:(UAJSONValueMatcher * _Nonnull)valueMatcher key:(NSString * _Nonnull)key scope:(NSArray * _Nonnull)scope; + [Export("initWithValueMatcher:key:scope:")] + IntPtr Constructor(UAJSONValueMatcher valueMatcher, string key, string[] scope); + + // -(instancetype _Nonnull)initWithValueMatcher:(UAJSONValueMatcher * _Nonnull)valueMatcher scope:(NSArray * _Nonnull)scope ignoreCase:(BOOL)ignoreCase; + [Export("initWithValueMatcher:scope:ignoreCase:")] + IntPtr Constructor(UAJSONValueMatcher valueMatcher, string[] scope, bool ignoreCase); + + // -(instancetype _Nullable)initWithJSON:(id _Nullable)json error:(NSError * _Nullable * _Nullable)error; + [Export("initWithJSON:error:")] + IntPtr Constructor([NullAllowed] NSObject json, [NullAllowed] out NSError error); + + // -(NSDictionary * _Nonnull)payload __attribute__((warn_unused_result(""))); + [Export("payload")] + NSDictionary Payload { get; } + + // -(BOOL)evaluateObject:(id _Nullable)value __attribute__((warn_unused_result(""))); + [Export("evaluateObject:")] + bool EvaluateObject([NullAllowed] NSObject value); + + // -(BOOL)evaluateObject:(id _Nullable)value ignoreCase:(BOOL)ignoreCase __attribute__((warn_unused_result(""))); + [Export("evaluateObject:ignoreCase:")] + bool EvaluateObject([NullAllowed] NSObject value, bool ignoreCase); + } + + // @interface UAJSONPredicate : NSObject + [BaseType(typeof(NSObject))] + [DisableDefaultCtor] + interface UAJSONPredicate + { + // -(instancetype _Nullable)initWithJSON:(id _Nullable)json error:(NSError * _Nullable * _Nullable)error; + [Export("initWithJSON:error:")] + IntPtr Constructor([NullAllowed] NSObject json, [NullAllowed] out NSError error); + + // -(NSDictionary * _Nonnull)payload __attribute__((warn_unused_result(""))); + [Export("payload")] + NSDictionary Payload { get; } + + // -(BOOL)evaluateObject:(id _Nullable)object __attribute__((warn_unused_result(""))); + [Export("evaluateObject:")] + bool EvaluateObject([NullAllowed] NSObject @object); + + // -(instancetype _Nonnull)initWithJSONMatcher:(UAJSONMatcher * _Nullable)matcher; + [Export("initWithJSONMatcher:")] + IntPtr Constructor([NullAllowed] UAJSONMatcher matcher); + + // +(UAJSONPredicate * _Nonnull)andPredicateWithSubpredicates:(NSArray * _Nullable)subpredicates __attribute__((warn_unused_result(""))); + [Static] + [Export("andPredicateWithSubpredicates:")] + UAJSONPredicate AndPredicate([NullAllowed] UAJSONPredicate[] subpredicates); + + // +(UAJSONPredicate * _Nonnull)orPredicateWithSubpredicates:(NSArray * _Nullable)subpredicates __attribute__((warn_unused_result(""))); + [Static] + [Export("orPredicateWithSubpredicates:")] + UAJSONPredicate OrPredicate([NullAllowed] UAJSONPredicate[] subpredicates); + + // +(UAJSONPredicate * _Nonnull)notPredicateWithSubpredicate:(UAJSONPredicate * _Nonnull)subpredicate __attribute__((warn_unused_result(""))); + [Static] + [Export("notPredicateWithSubpredicate:")] + UAJSONPredicate NotPredicate(UAJSONPredicate subpredicate); + } + + // @interface UAJSONValueMatcher : NSObject + [BaseType(typeof(NSObject))] + interface UAJSONValueMatcher + { + // -(NSDictionary * _Nonnull)payload __attribute__((warn_unused_result(""))); + [Export("payload")] + NSDictionary Payload { get; } + + // -(BOOL)evaluateObject:(id _Nullable)value __attribute__((warn_unused_result(""))); + [Export("evaluateObject:")] + bool EvaluateObject([NullAllowed] NSObject value); + + // -(BOOL)evaluateObject:(id _Nullable)value ignoreCase:(BOOL)ignoreCase __attribute__((warn_unused_result(""))); + [Export("evaluateObject:ignoreCase:")] + bool EvaluateObject([NullAllowed] NSObject value, bool ignoreCase); + + // -(BOOL)value:(id _Nullable)valueOne isEqualToValue:(id _Nullable)valueTwo ignoreCase:(BOOL)ignoreCase __attribute__((warn_unused_result(""))); + [Export("value:isEqualToValue:ignoreCase:")] + bool Value([NullAllowed] NSObject valueOne, [NullAllowed] NSObject valueTwo, bool ignoreCase); + + // +(UAJSONValueMatcher * _Nonnull)matcherWhereNumberAtLeast:(NSNumber * _Nonnull)number __attribute__((warn_unused_result(""))); + [Static] + [Export("matcherWhereNumberAtLeast:")] + UAJSONValueMatcher MatcherWhereNumberAtLeast(NSNumber number); + + // +(UAJSONValueMatcher * _Nonnull)matcherWhereNumberAtLeast:(NSNumber * _Nonnull)lowerNumber atMost:(NSNumber * _Nonnull)higherNumber __attribute__((warn_unused_result(""))); + [Static] + [Export("matcherWhereNumberAtLeast:atMost:")] + UAJSONValueMatcher MatcherWhereNumberAtLeast(NSNumber lowerNumber, NSNumber higherNumber); + + // +(UAJSONValueMatcher * _Nonnull)matcherWhereNumberAtMost:(NSNumber * _Nonnull)number __attribute__((warn_unused_result(""))); + [Static] + [Export("matcherWhereNumberAtMost:")] + UAJSONValueMatcher MatcherWhereNumberAtMost(NSNumber number); + + // +(UAJSONValueMatcher * _Nonnull)matcherWhereNumberEquals:(NSNumber * _Nonnull)number __attribute__((warn_unused_result(""))); + [Static] + [Export("matcherWhereNumberEquals:")] + UAJSONValueMatcher MatcherWhereNumberEquals(NSNumber number); + + // +(UAJSONValueMatcher * _Nonnull)matcherWhereBooleanEquals:(BOOL)boolean __attribute__((warn_unused_result(""))); + [Static] + [Export("matcherWhereBooleanEquals:")] + UAJSONValueMatcher MatcherWhereBooleanEquals(bool boolean); + + // +(UAJSONValueMatcher * _Nonnull)matcherWhereStringEquals:(NSString * _Nonnull)string __attribute__((warn_unused_result(""))); + [Static] + [Export("matcherWhereStringEquals:")] + UAJSONValueMatcher MatcherWhereStringEquals(string @string); + + // +(UAJSONValueMatcher * _Nonnull)matcherWhereValueIsPresent:(BOOL)present __attribute__((warn_unused_result(""))); + [Static] + [Export("matcherWhereValueIsPresent:")] + UAJSONValueMatcher MatcherWhereValueIsPresent(bool present); + + // +(UAJSONValueMatcher * _Nullable)matcherWithVersionConstraint:(NSString * _Nonnull)versionConstraint __attribute__((warn_unused_result(""))); + [Static] + [Export("matcherWithVersionConstraint:")] + [return: NullAllowed] + UAJSONValueMatcher Matcher(string versionConstraint); + + // +(UAJSONValueMatcher * _Nullable)matcherWithArrayContainsPredicate:(UAJSONPredicate * _Nonnull)predicate __attribute__((warn_unused_result(""))); + [Static] + [Export("matcherWithArrayContainsPredicate:")] + [return: NullAllowed] + UAJSONValueMatcher Matcher(UAJSONPredicate predicate); + + // +(UAJSONValueMatcher * _Nullable)matcherWithArrayContainsPredicate:(UAJSONPredicate * _Nonnull)predicate atIndex:(NSInteger)index __attribute__((warn_unused_result(""))); + [Static] + [Export("matcherWithArrayContainsPredicate:atIndex:")] + [return: NullAllowed] + UAJSONValueMatcher Matcher(UAJSONPredicate predicate, nint index); + + // +(UAJSONValueMatcher * _Nullable)matcherWithJSON:(id _Nullable)json error:(NSError * _Nullable * _Nullable)error __attribute__((warn_unused_result(""))); + [Static] + [Export("matcherWithJSON:error:")] + [return: NullAllowed] + UAJSONValueMatcher Matcher([NullAllowed] NSObject json, [NullAllowed] out NSError error); + } + + // @interface UAJavaScriptEnvironment : NSObject + [BaseType(typeof(NSObject))] + interface UAJavaScriptEnvironment : IUAJavaScriptEnvironmentProtocol + { + // -(void)addStringGetter:(NSString * _Nonnull)getter value:(NSString * _Nullable)string __attribute__((swift_name("add(_:string:)"))); + [Export("addStringGetter:value:")] + new void AddStringGetter(string getter, [NullAllowed] string @string); + + // -(void)addNumberGetter:(NSString * _Nonnull)getter value:(NSNumber * _Nullable)number __attribute__((swift_name("add(_:number:)"))); + [Export("addNumberGetter:value:")] + new void AddNumberGetter(string getter, [NullAllowed] NSNumber number); + + // -(void)addDictionaryGetter:(NSString * _Nonnull)getter value:(NSDictionary * _Nullable)dictionary __attribute__((swift_name("add(_:dictionary:)"))); + [Export("addDictionaryGetter:value:")] + new void AddDictionaryGetter(string getter, [NullAllowed] NSDictionary dictionary); + + // -(NSString * _Nonnull)build __attribute__((warn_unused_result(""))); + [Export("build")] + new string Build(); + } + + // @interface UALocaleManager : NSObject + [BaseType(typeof(NSObject))] + [DisableDefaultCtor] + interface UALocaleManager : IUALocaleManagerProtocol + { + // @property (readonly, nonatomic, class) NSNotificationName _Nonnull localeUpdatedEvent; + [Static] + [Export("localeUpdatedEvent")] + string LocaleUpdatedEvent { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull localeEventKey; + [Static] + [Export("localeEventKey")] + string LocaleEventKey { get; } + + // @property (copy, nonatomic) NSLocale * _Nonnull currentLocale; + [Export("currentLocale", ArgumentSemantic.Copy)] + NSLocale CurrentLocale { get; set; } + + // -(void)clearLocale; + [Export("clearLocale")] + void ClearLocale(); + } + + interface IUALocaleManagerProtocol { }; + + // @interface UAMediaEventTemplate : NSObject + [BaseType(typeof(NSObject))] + [DisableDefaultCtor] + interface UAMediaEventTemplate + { + // @property (copy, nonatomic) NSString * _Nullable identifier; + [NullAllowed, Export("identifier")] + string Identifier { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable category; + [NullAllowed, Export("category")] + string Category { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable type; + [NullAllowed, Export("type")] + string Type { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable eventDescription; + [NullAllowed, Export("eventDescription")] + string EventDescription { get; set; } + + // @property (nonatomic) BOOL isFeature; + [Export("isFeature")] + bool IsFeature { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable author; + [NullAllowed, Export("author")] + string Author { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable publishedDate; + [NullAllowed, Export("publishedDate")] + string PublishedDate { get; set; } + + // +(UAMediaEventTemplate * _Nonnull)browsedTemplate __attribute__((warn_unused_result(""))); + [Static] + [Export("browsedTemplate")] + UAMediaEventTemplate BrowsedTemplate(); + + // +(UAMediaEventTemplate * _Nonnull)starredTemplate __attribute__((warn_unused_result(""))); + [Static] + [Export("starredTemplate")] + UAMediaEventTemplate StarredTemplate(); + + // +(UAMediaEventTemplate * _Nonnull)sharedTemplate __attribute__((warn_unused_result(""))); + [Static] + [Export("sharedTemplate")] + UAMediaEventTemplate SharedTemplate(); + + // +(UAMediaEventTemplate * _Nonnull)sharedTemplateWithSource:(NSString * _Nullable)source withMedium:(NSString * _Nullable)medium __attribute__((warn_unused_result(""))); + [Static] + [Export("sharedTemplateWithSource:withMedium:")] + UAMediaEventTemplate SharedTemplate([NullAllowed] string source, [NullAllowed] string medium); + + // +(UAMediaEventTemplate * _Nonnull)consumedTemplate __attribute__((warn_unused_result(""))); + [Static] + [Export("consumedTemplate")] + UAMediaEventTemplate ConsumedTemplate(); + + // +(UAMediaEventTemplate * _Nonnull)consumedTemplateWithValueFromString:(NSString * _Nullable)valueString __attribute__((warn_unused_result(""))); + [Static] + [Export("consumedTemplateWithValueFromString:")] + UAMediaEventTemplate ConsumedTemplate([NullAllowed] string valueString); + + // +(UAMediaEventTemplate * _Nonnull)consumedTemplateWithValue:(NSNumber * _Nullable)value __attribute__((warn_unused_result(""))); + [Static] + [Export("consumedTemplateWithValue:")] + UAMediaEventTemplate ConsumedTemplate([NullAllowed] NSNumber value); + + // -(UACustomEvent * _Nonnull)createEvent __attribute__((warn_unused_result(""))); + [Export("createEvent")] + UACustomEvent CreateEvent(); + } + + // @interface UANativeBridge : NSObject + [BaseType(typeof(NSObject))] + interface UANativeBridge : IWKNavigationDelegate + { + [Wrap("WeakNativeBridgeDelegate")] + [NullAllowed] + IUANativeBridgeDelegate NativeBridgeDelegate { get; set; } + + // @property (nonatomic, weak) id _Nullable nativeBridgeDelegate; + [NullAllowed, Export("nativeBridgeDelegate", ArgumentSemantic.Weak)] + NSObject WeakNativeBridgeDelegate { get; set; } + + [Wrap("WeakForwardNavigationDelegate")] + [NullAllowed] + IUANavigationDelegate ForwardNavigationDelegate { get; set; } + + // @property (nonatomic, weak) id _Nullable forwardNavigationDelegate; + [NullAllowed, Export("forwardNavigationDelegate", ArgumentSemantic.Weak)] + NSObject WeakForwardNavigationDelegate { get; set; } + + [Wrap("WeakJavaScriptCommandDelegate")] + [NullAllowed] + IUAJavaScriptCommandDelegate JavaScriptCommandDelegate { get; set; } + + // @property (nonatomic, weak) id _Nullable javaScriptCommandDelegate; + [NullAllowed, Export("javaScriptCommandDelegate", ArgumentSemantic.Weak)] + NSObject WeakJavaScriptCommandDelegate { get; set; } + + [Wrap("WeakNativeBridgeExtensionDelegate")] + [NullAllowed] + IUANativeBridgeExtensionDelegate NativeBridgeExtensionDelegate { get; set; } + + // @property (nonatomic, weak) id _Nullable nativeBridgeExtensionDelegate; + [NullAllowed, Export("nativeBridgeExtensionDelegate", ArgumentSemantic.Weak)] + NSObject WeakNativeBridgeExtensionDelegate { get; set; } + } + + // @protocol UANativeBridgeDelegate + [Protocol, Model] + [BaseType(typeof(NSObject))] + interface UANativeBridgeDelegate + { + // @required -(void)close; + [Abstract] + [Export("close")] + void Close(); + } + + interface IUANativeBridgeDelegate { }; + + // @interface UANotificationCategories : NSObject + [BaseType(typeof(NSObject))] + interface UANotificationCategories + { + // +(NSSet * _Nonnull)defaultCategories __attribute__((warn_unused_result(""))); + [Static] + [Export("defaultCategories")] + NSSet DefaultCategories(); + + // +(NSSet * _Nonnull)defaultCategoriesWithRequireAuth:(BOOL)requireAuth __attribute__((warn_unused_result(""))); + [Static] + [Export("defaultCategoriesWithRequireAuth:")] + NSSet DefaultCategories(bool requireAuth); + + // +(NSSet * _Nonnull)createCategoriesFromFile:(NSString * _Nonnull)path __attribute__((warn_unused_result(""))); + [Static] + [Export("createCategoriesFromFile:")] + NSSet CreateCategoriesFromFile(string path); + + // +(UNNotificationCategory * _Nullable)createCategory:(NSString * _Nonnull)categoryId actions:(NSArray * _Nonnull)actionDefinitions __attribute__((warn_unused_result(""))); + [Static] + [Export("createCategory:actions:")] + [return: NullAllowed] + UNNotificationCategory CreateCategory(string categoryId, NSDictionary[] actionDefinitions); + + // +(UNNotificationCategory * _Nullable)createCategory:(NSString * _Nonnull)categoryId actions:(NSArray * _Nonnull)actionDefinitions hiddenPreviewsBodyPlaceholder:(NSString * _Nonnull)hiddenPreviewsBodyPlaceholder __attribute__((warn_unused_result(""))); + [Static] + [Export("createCategory:actions:hiddenPreviewsBodyPlaceholder:")] + [return: NullAllowed] + UNNotificationCategory CreateCategory(string categoryId, NSDictionary[] actionDefinitions, string hiddenPreviewsBodyPlaceholder); + } + + // @interface UAPrivacyManager : NSObject + [BaseType(typeof(NSObject))] + [DisableDefaultCtor] + interface UAPrivacyManager + { + // @property (readonly, nonatomic, class) NSNotificationName _Nonnull changeEvent; + [Static] + [Export("changeEvent")] + string ChangeEvent { get; } + + // @property (nonatomic) UAFeatures enabledFeatures; + [Export("enabledFeatures", ArgumentSemantic.Assign)] + UAFeatures EnabledFeatures { get; set; } + + // -(void)enableFeatures:(UAFeatures)features; + [Export("enableFeatures:")] + void EnableFeatures(UAFeatures features); + + // -(void)disableFeatures:(UAFeatures)features; + [Export("disableFeatures:")] + void DisableFeatures(UAFeatures features); + + // -(BOOL)isEnabled:(UAFeatures)feature __attribute__((warn_unused_result(""))); + [Export("isEnabled:")] + bool IsEnabled(UAFeatures feature); + + // -(BOOL)isAnyFeatureEnabled __attribute__((warn_unused_result(""))); + [Export("isAnyFeatureEnabled")] + bool IsAnyFeatureEnabled { get; } + } + + // @interface UAProximityRegion : NSObject + [BaseType(typeof(NSObject))] + [DisableDefaultCtor] + interface UAProximityRegion + { + // +(UAProximityRegion * _Nullable)proximityRegionWithID:(NSString * _Nonnull)proximityID major:(double)major minor:(double)minor __attribute__((warn_unused_result(""))); + [Static] + [Export("proximityRegionWithID:major:minor:")] + [return: NullAllowed] + UAProximityRegion ProximityRegion(string proximityID, double major, double minor); + + // +(UAProximityRegion * _Nullable)proximityRegionWithID:(NSString * _Nonnull)proximityID major:(double)major minor:(double)minor rssi:(double)rssi __attribute__((warn_unused_result(""))); + [Static] + [Export("proximityRegionWithID:major:minor:rssi:")] + [return: NullAllowed] + UAProximityRegion ProximityRegion(string proximityID, double major, double minor, double rssi); + + // +(UAProximityRegion * _Nullable)proximityRegionWithID:(NSString * _Nonnull)proximityID major:(double)major minor:(double)minor latitude:(double)latitude longitude:(double)longitude __attribute__((warn_unused_result(""))); + [Static] + [Export("proximityRegionWithID:major:minor:latitude:longitude:")] + [return: NullAllowed] + UAProximityRegion ProximityRegion(string proximityID, double major, double minor, double latitude, double longitude); + + // +(UAProximityRegion * _Nullable)proximityRegionWithID:(NSString * _Nonnull)proximityID major:(double)major minor:(double)minor rssi:(double)rssi latitude:(double)latitude longitude:(double)longitude __attribute__((warn_unused_result(""))); + [Static] + [Export("proximityRegionWithID:major:minor:rssi:latitude:longitude:")] + [return: NullAllowed] + UAProximityRegion ProximityRegion(string proximityID, double major, double minor, double rssi, double latitude, double longitude); + } + + // @interface UAChannelScopes : NSObject + [BaseType(typeof(NSObject))] + [DisableDefaultCtor] + interface UAChannelScopes + { + // @property (readonly, copy, nonatomic) NSArray * _Nonnull values; + [Export("values", ArgumentSemantic.Copy)] + NSNumber[] Values { get; } + } + + // @interface UAPush : NSObject + [BaseType(typeof(NSObject))] + [DisableDefaultCtor] + interface UAPush : IUAComponent + { + // @property (readonly, nonatomic, class) NSNotificationName _Nonnull notificationStatusUpdateEvent; + [Static] + [Export("notificationStatusUpdateEvent")] + string NotificationStatusUpdateEvent { get; } + + // @property (readonly, nonatomic, strong, class) UAPush * _Nonnull shared; + [Static] + [Export("shared", ArgumentSemantic.Strong)] + UAPush Shared { get; } + + // @property (readonly, nonatomic, class) NSNotificationName _Nonnull receivedNotificationResponseEvent; + [Static] + [Export("receivedNotificationResponseEvent")] + string ReceivedNotificationResponseEvent { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull receivedNotificationResponseEventResponseKey; + [Static] + [Export("receivedNotificationResponseEventResponseKey")] + string ReceivedNotificationResponseEventResponseKey { get; } + + // @property (readonly, nonatomic, class) NSNotificationName _Nonnull receivedForegroundNotificationEvent; + [Static] + [Export("receivedForegroundNotificationEvent")] + string ReceivedForegroundNotificationEvent { get; } + + // @property (readonly, nonatomic, class) NSNotificationName _Nonnull receivedBackgroundNotificationEvent; + [Static] + [Export("receivedBackgroundNotificationEvent")] + string ReceivedBackgroundNotificationEvent { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull quietTimeStartKey; + [Static] + [Export("quietTimeStartKey")] + string QuietTimeStartKey { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull quietTimeEndKey; + [Static] + [Export("quietTimeEndKey")] + string QuietTimeEndKey { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull areNotificationsAllowed; + [Static] + [Export("areNotificationsAllowed")] + string AreNotificationsAllowed { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull isOptedIn; + [Static] + [Export("isOptedIn")] + string IsOptedIn { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull isPushPrivacyFeatureEnabled; + [Static] + [Export("isPushPrivacyFeatureEnabled")] + string IsPushPrivacyFeatureEnabled { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull isPushTokenRegistered; + [Static] + [Export("isPushTokenRegistered")] + string IsPushTokenRegistered { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull isUserNotificationsEnabled; + [Static] + [Export("isUserNotificationsEnabled")] + string IsUserNotificationsEnabled { get; } + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull isUserOptedIn; + [Static] + [Export("isUserOptedIn")] + string IsUserOptedIn { get; } + + // @property (getter = isComponentEnabled, nonatomic) BOOL componentEnabled; + [Export("componentEnabled")] + bool ComponentEnabled { [Bind("isComponentEnabled")] get; set; } + + // @property (nonatomic) BOOL backgroundPushNotificationsEnabled; + [Export("backgroundPushNotificationsEnabled")] + bool BackgroundPushNotificationsEnabled { get; set; } + + // @property (nonatomic) BOOL userPushNotificationsEnabled; + [Export("userPushNotificationsEnabled")] + bool UserPushNotificationsEnabled { get; set; } + + // @property (nonatomic) BOOL requestExplicitPermissionWhenEphemeral; + [Export("requestExplicitPermissionWhenEphemeral")] + bool RequestExplicitPermissionWhenEphemeral { get; set; } + + // @property (readonly, copy, nonatomic) NSString * _Nullable deviceToken; + [NullAllowed, Export("deviceToken")] + string DeviceToken { get; } + + // @property (nonatomic) UANotificationOptions notificationOptions; + [Export("notificationOptions", ArgumentSemantic.Assign)] + UANotificationOptions NotificationOptions { get; set; } + + // @property (copy, nonatomic) NSSet * _Nonnull customCategories; + [Export("customCategories", ArgumentSemantic.Copy)] + NSSet CustomCategories { get; set; } + + // @property (readonly, copy, nonatomic) NSSet * _Nonnull combinedCategories; + [Export("combinedCategories", ArgumentSemantic.Copy)] + NSSet CombinedCategories { get; } + + // @property (nonatomic) BOOL requireAuthorizationForDefaultCategories; + [Export("requireAuthorizationForDefaultCategories")] + bool RequireAuthorizationForDefaultCategories { get; set; } + + [Wrap("WeakPushNotificationDelegate")] + [NullAllowed] + IUAPushNotificationDelegate PushNotificationDelegate { get; set; } + + // @property (nonatomic, weak) id _Nullable pushNotificationDelegate; + [NullAllowed, Export("pushNotificationDelegate", ArgumentSemantic.Weak)] + NSObject WeakPushNotificationDelegate { get; set; } + + [Wrap("WeakRegistrationDelegate")] + [NullAllowed] + IUARegistrationDelegate RegistrationDelegate { get; set; } + + // @property (nonatomic, weak) id _Nullable registrationDelegate; + [NullAllowed, Export("registrationDelegate", ArgumentSemantic.Weak)] + NSObject WeakRegistrationDelegate { get; set; } + + // @property (readonly, nonatomic, strong) UNNotificationResponse * _Nullable launchNotificationResponse; + [NullAllowed, Export("launchNotificationResponse", ArgumentSemantic.Strong)] + UNNotificationResponse LaunchNotificationResponse { get; } + + // @property (readonly, nonatomic) UAAuthorizedNotificationSettings authorizedNotificationSettings; + [Export("authorizedNotificationSettings")] + UAAuthorizedNotificationSettings AuthorizedNotificationSettings { get; } + + // @property (readonly, nonatomic) UAAuthorizationStatus authorizationStatus; + [Export("authorizationStatus")] + UAAuthorizationStatus AuthorizationStatus { get; } + + // @property (readonly, nonatomic) BOOL userPromptedForNotifications; + [Export("userPromptedForNotifications")] + bool UserPromptedForNotifications { get; } + + // @property (nonatomic) UNNotificationPresentationOptions defaultPresentationOptions; + [Export("defaultPresentationOptions", ArgumentSemantic.Assign)] + UNNotificationPresentationOptions DefaultPresentationOptions { get; set; } + + // -(void)enableUserPushNotificationsWithCompletionHandler:(void (^ _Nonnull)(BOOL))completionHandler; + [Export("enableUserPushNotificationsWithCompletionHandler:")] + void EnableUserPushNotifications(Action completionHandler); + + // @property (readonly, nonatomic) BOOL isPushNotificationsOptedIn; + [Export("isPushNotificationsOptedIn")] + bool IsPushNotificationsOptedIn { get; } + + // @property (nonatomic) NSInteger badgeNumber; + [Export("badgeNumber")] + nint BadgeNumber { get; set; } + + // @property (nonatomic) BOOL autobadgeEnabled; + [Export("autobadgeEnabled")] + bool AutobadgeEnabled { get; set; } + + // -(void)resetBadge; + [Export("resetBadge")] + void ResetBadge(); + + // @property (readonly, copy, nonatomic) NSDictionary * _Nullable quietTime; + [NullAllowed, Export("quietTime", ArgumentSemantic.Copy)] + NSDictionary QuietTime { get; } + + // @property (nonatomic, strong) NSTimeZone * _Nullable timeZone; + [NullAllowed, Export("timeZone", ArgumentSemantic.Strong)] + NSTimeZone TimeZone { get; set; } + + // @property (nonatomic) BOOL quietTimeEnabled; + [Export("quietTimeEnabled")] + bool QuietTimeEnabled { get; set; } + + // -(void)setQuietTimeStartHour:(NSInteger)startHour startMinute:(NSInteger)startMinute endHour:(NSInteger)endHour endMinute:(NSInteger)endMinute; + [Export("setQuietTimeStartHour:startMinute:endHour:endMinute:")] + void SetQuietTimeStartHour(nint startHour, nint startMinute, nint endHour, nint endMinute); + + // -(void)updateRegistration; + [Export("updateRegistration")] + void UpdateRegistration(); + } + + // @protocol UAPushNotificationDelegate + [Protocol, Model] + [BaseType(typeof(NSObject))] + interface UAPushNotificationDelegate + { + // @optional -(void)receivedForegroundNotification:(NSDictionary * _Nonnull)userInfo completionHandler:(void (^ _Nonnull)(void))completionHandler; + [Export("receivedForegroundNotification:completionHandler:")] + void ReceivedForegroundNotification(NSDictionary userInfo, Action completionHandler); + + // @optional -(void)receivedBackgroundNotification:(NSDictionary * _Nonnull)userInfo completionHandler:(void (^ _Nonnull)(UIBackgroundFetchResult))completionHandler; + [Export("receivedBackgroundNotification:completionHandler:")] + void ReceivedBackgroundNotification(NSDictionary userInfo, Action completionHandler); + + // @optional -(void)receivedNotificationResponse:(UNNotificationResponse * _Nonnull)notificationResponse completionHandler:(void (^ _Nonnull)(void))completionHandler; + [Export("receivedNotificationResponse:completionHandler:")] + void ReceivedNotificationResponse(UNNotificationResponse notificationResponse, Action completionHandler); + + // @optional -(UNNotificationPresentationOptions)extendPresentationOptions:(UNNotificationPresentationOptions)options notification:(UNNotification * _Nonnull)notification __attribute__((warn_unused_result(""))); + [Export("extendPresentationOptions:notification:")] + UNNotificationPresentationOptions ExtendPresentationOptions(UNNotificationPresentationOptions options, UNNotification notification); + + // @optional -(UNNotificationPresentationOptions)extendPresentationOptions:(UNNotificationPresentationOptions)options notification:(UNNotification * _Nonnull)notification completionHandler:(void (^ _Nonnull)(UNNotificationPresentationOptions))completionHandler; + [Export("extendPresentationOptions:notification:completionHandler:")] + UNNotificationPresentationOptions ExtendPresentationOptions(UNNotificationPresentationOptions options, UNNotification notification, Action completionHandler); + } + + interface IUAPushNotificationDelegate { }; + + // @interface UARegionEvent : NSObject + [BaseType(typeof(NSObject))] + [DisableDefaultCtor] + interface UARegionEvent : IUAEvent + { + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull regionIDKey; + [Static] + [Export("regionIDKey")] + string RegionIDKey { get; } + + // @property (readonly, copy, nonatomic) NSString * _Nonnull regionID; + [Export("regionID")] + string RegionID { get; } + + // @property (readonly, copy, nonatomic) NSString * _Nonnull source; + [Export("source")] + string Source { get; } + + // @property (readonly, nonatomic, strong) UACircularRegion * _Nullable circularRegion; + [NullAllowed, Export("circularRegion", ArgumentSemantic.Strong)] + UACircularRegion CircularRegion { get; } + + // @property (readonly, nonatomic, strong) UAProximityRegion * _Nullable proximityRegion; + [NullAllowed, Export("proximityRegion", ArgumentSemantic.Strong)] + UAProximityRegion ProximityRegion { get; } + + // @property (readonly, copy, nonatomic) NSString * _Nonnull eventType; + [Export("eventType")] + string EventType { get; } + + // @property (readonly, nonatomic) UAEventPriority priority; + [Export("priority")] + UAEventPriority Priority { get; } + + // @property (readonly, copy, nonatomic) NSDictionary * _Nonnull data; + [Export("data", ArgumentSemantic.Copy)] + NSDictionary Data { get; } + + // @property (readonly, copy, nonatomic) NSDictionary * _Nonnull payload; + [Export("payload", ArgumentSemantic.Copy)] + NSDictionary Payload { get; } + + // +(UARegionEvent * _Nullable)regionEventWithRegionID:(NSString * _Nonnull)regionID source:(NSString * _Nonnull)source boundaryEvent:(enum UABoundaryEvent)boundaryEvent __attribute__((warn_unused_result(""))); + [Static] + [Export("regionEventWithRegionID:source:boundaryEvent:")] + [return: NullAllowed] + UARegionEvent RegionEvent(string regionID, string source, UABoundaryEvent boundaryEvent); + + // +(UARegionEvent * _Nullable)regionEventWithRegionID:(NSString * _Nonnull)regionID source:(NSString * _Nonnull)source boundaryEvent:(enum UABoundaryEvent)boundaryEvent circularRegion:(UACircularRegion * _Nullable)circularRegion proximityRegion:(UAProximityRegion * _Nullable)proximityRegion __attribute__((warn_unused_result(""))); + [Static] + [Export("regionEventWithRegionID:source:boundaryEvent:circularRegion:proximityRegion:")] + [return: NullAllowed] + UARegionEvent RegionEvent(string regionID, string source, UABoundaryEvent boundaryEvent, [NullAllowed] UACircularRegion circularRegion, [NullAllowed] UAProximityRegion proximityRegion); + } + + // @protocol UARegistrationDelegate + [Protocol, Model] + [BaseType(typeof(NSObject))] + interface UARegistrationDelegate + { + // @optional -(void)notificationRegistrationFinishedWithAuthorizedSettings:(UAAuthorizedNotificationSettings)authorizedSettings categories:(NSSet * _Nonnull)categories status:(UAAuthorizationStatus)status; + [Export("notificationRegistrationFinishedWithAuthorizedSettings:categories:status:")] + void NotificationRegistrationFinished(UAAuthorizedNotificationSettings authorizedSettings, NSSet categories, UAAuthorizationStatus status); + + // @optional -(void)notificationRegistrationFinishedWithAuthorizedSettings:(UAAuthorizedNotificationSettings)authorizedSettings status:(UAAuthorizationStatus)status; + [Export("notificationRegistrationFinishedWithAuthorizedSettings:status:")] + void NotificationRegistrationFinished(UAAuthorizedNotificationSettings authorizedSettings, UAAuthorizationStatus status); + + // @optional -(void)notificationAuthorizedSettingsDidChange:(UAAuthorizedNotificationSettings)authorizedSettings; + [Export("notificationAuthorizedSettingsDidChange:")] + void NotificationAuthorizedSettingsDidChange(UAAuthorizedNotificationSettings authorizedSettings); + + // @optional -(void)apnsRegistrationSucceededWithDeviceToken:(NSData * _Nonnull)deviceToken; + [Export("apnsRegistrationSucceededWithDeviceToken:")] + void ApnsRegistrationSucceeded(NSData deviceToken); + + // @optional -(void)apnsRegistrationFailedWithError:(NSError * _Nonnull)error; + [Export("apnsRegistrationFailedWithError:")] + void ApnsRegistrationFailed(NSError error); + } + + interface IUARegistrationDelegate { }; + + // @interface UARetailEventTemplate : NSObject + [BaseType(typeof(NSObject))] + [DisableDefaultCtor] + interface UARetailEventTemplate + { + // @property (nonatomic, strong) NSNumber * _Nullable eventValue; + [NullAllowed, Export("eventValue", ArgumentSemantic.Strong)] + NSNumber EventValue { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable transactionID; + [NullAllowed, Export("transactionID")] + string TransactionID { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable identifier; + [NullAllowed, Export("identifier")] + string Identifier { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable category; + [NullAllowed, Export("category")] + string Category { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable eventDescription; + [NullAllowed, Export("eventDescription")] + string EventDescription { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable brand; + [NullAllowed, Export("brand")] + string Brand { get; set; } + + // @property (nonatomic) BOOL isNewItem; + [Export("isNewItem")] + bool IsNewItem { get; set; } + + // +(UARetailEventTemplate * _Nonnull)browsedTemplate __attribute__((warn_unused_result(""))); + [Static] + [Export("browsedTemplate")] + UARetailEventTemplate BrowsedTemplate(); + + // +(UARetailEventTemplate * _Nonnull)browsedTemplateWithValueFromString:(NSString * _Nullable)valueString __attribute__((warn_unused_result(""))); + [Static] + [Export("browsedTemplateWithValueFromString:")] + UARetailEventTemplate BrowsedTemplate([NullAllowed] string valueString); + + // +(UARetailEventTemplate * _Nonnull)browsedTemplateWithValue:(NSNumber * _Nullable)value __attribute__((warn_unused_result(""))); + [Static] + [Export("browsedTemplateWithValue:")] + UARetailEventTemplate BrowsedTemplate([NullAllowed] NSNumber value); + + // +(UARetailEventTemplate * _Nonnull)addedToCartTemplate __attribute__((warn_unused_result(""))); + [Static] + [Export("addedToCartTemplate")] + UARetailEventTemplate AddedToCartTemplate(); + + // +(UARetailEventTemplate * _Nonnull)addedToCartTemplateWithValueFromString:(NSString * _Nullable)valueString __attribute__((warn_unused_result(""))); + [Static] + [Export("addedToCartTemplateWithValueFromString:")] + UARetailEventTemplate AddedToCartTemplate([NullAllowed] string valueString); + + // +(UARetailEventTemplate * _Nonnull)addedToCartTemplateWithValue:(NSNumber * _Nullable)value __attribute__((warn_unused_result(""))); + [Static] + [Export("addedToCartTemplateWithValue:")] + UARetailEventTemplate AddedToCartTemplate([NullAllowed] NSNumber value); + + // +(UARetailEventTemplate * _Nonnull)starredProductTemplate __attribute__((warn_unused_result(""))); + [Static] + [Export("starredProductTemplate")] + UARetailEventTemplate StarredProductTemplate(); + + // +(UARetailEventTemplate * _Nonnull)starredProductTemplateWithValueFromString:(NSString * _Nullable)valueString __attribute__((warn_unused_result(""))); + [Static] + [Export("starredProductTemplateWithValueFromString:")] + UARetailEventTemplate StarredProductTemplate([NullAllowed] string valueString); + + // +(UARetailEventTemplate * _Nonnull)starredProductTemplateWithValue:(NSNumber * _Nullable)value __attribute__((warn_unused_result(""))); + [Static] + [Export("starredProductTemplateWithValue:")] + UARetailEventTemplate StarredProductTemplate([NullAllowed] NSNumber value); + + // +(UARetailEventTemplate * _Nonnull)purchasedTemplate __attribute__((warn_unused_result(""))); + [Static] + [Export("purchasedTemplate")] + UARetailEventTemplate PurchasedTemplate(); + + // +(UARetailEventTemplate * _Nonnull)purchasedTemplateWithValueFromString:(NSString * _Nullable)valueString __attribute__((warn_unused_result(""))); + [Static] + [Export("purchasedTemplateWithValueFromString:")] + UARetailEventTemplate PurchasedTemplate([NullAllowed] string valueString); + + // +(UARetailEventTemplate * _Nonnull)purchasedTemplateWithValue:(NSNumber * _Nullable)value __attribute__((warn_unused_result(""))); + [Static] + [Export("purchasedTemplateWithValue:")] + UARetailEventTemplate PurchasedTemplate([NullAllowed] NSNumber value); + + // +(UARetailEventTemplate * _Nonnull)sharedProductTemplate __attribute__((warn_unused_result(""))); + [Static] + [Export("sharedProductTemplate")] + UARetailEventTemplate SharedProductTemplate(); + + // +(UARetailEventTemplate * _Nonnull)sharedProductTemplateWithValueFromString:(NSString * _Nullable)valueString __attribute__((warn_unused_result(""))); + [Static] + [Export("sharedProductTemplateWithValueFromString:")] + UARetailEventTemplate SharedProductTemplate([NullAllowed] string valueString); + + // +(UARetailEventTemplate * _Nonnull)sharedProductTemplateWithValue:(NSNumber * _Nullable)value __attribute__((warn_unused_result(""))); + [Static] + [Export("sharedProductTemplateWithValue:")] + UARetailEventTemplate SharedProductTemplate([NullAllowed] NSNumber value); + + // +(UARetailEventTemplate * _Nonnull)sharedProductTemplateWithSource:(NSString * _Nullable)source withMedium:(NSString * _Nullable)medium __attribute__((warn_unused_result(""))); + [Static] + [Export("sharedProductTemplateWithSource:withMedium:")] + UARetailEventTemplate SharedProductTemplate([NullAllowed] string source, [NullAllowed] string medium); + + // +(UARetailEventTemplate * _Nonnull)sharedProductTemplateWithValueFromString:(NSString * _Nullable)valueString withSource:(NSString * _Nullable)source withMedium:(NSString * _Nullable)medium __attribute__((warn_unused_result(""))); + [Static] + [Export("sharedProductTemplateWithValueFromString:withSource:withMedium:")] + UARetailEventTemplate SharedProductTemplate([NullAllowed] string valueString, [NullAllowed] string source, [NullAllowed] string medium); + + // +(UARetailEventTemplate * _Nonnull)sharedProductTemplateWithValue:(NSNumber * _Nullable)value withSource:(NSString * _Nullable)source withMedium:(NSString * _Nullable)medium __attribute__((warn_unused_result(""))); + [Static] + [Export("sharedProductTemplateWithValue:withSource:withMedium:")] + UARetailEventTemplate SharedProductTemplate([NullAllowed] NSNumber value, [NullAllowed] string source, [NullAllowed] string medium); + + // +(UARetailEventTemplate * _Nonnull)wishlistTemplate __attribute__((warn_unused_result(""))); + [Static] + [Export("wishlistTemplate")] + UARetailEventTemplate WishlistTemplate(); + + // +(UARetailEventTemplate * _Nonnull)wishlistTemplateWithName:(NSString * _Nullable)name wishlistID:(NSString * _Nullable)wishlistID __attribute__((warn_unused_result(""))); + [Static] + [Export("wishlistTemplateWithName:wishlistID:")] + UARetailEventTemplate WishlistTemplate([NullAllowed] string name, [NullAllowed] string wishlistID); + + // -(UACustomEvent * _Nonnull)createEvent __attribute__((warn_unused_result(""))); + [Export("createEvent")] + UACustomEvent CreateEvent(); + } + + // @interface UARuntimeConfig : NSObject + [BaseType(typeof(NSObject))] + [DisableDefaultCtor] + interface UARuntimeConfig + { + // @property (readonly, nonatomic, class) NSNotificationName _Nonnull configUpdatedEvent; + [Static] + [Export("configUpdatedEvent")] + string ConfigUpdatedEvent { get; } + + // @property (readonly, copy, nonatomic) NSString * _Nonnull appKey; + [Export("appKey")] + string AppKey { get; } + + // @property (readonly, copy, nonatomic) NSString * _Nonnull appSecret; + [Export("appSecret")] + string AppSecret { get; } + + // @property (readonly, nonatomic) enum UALogLevel logLevel; + [Export("logLevel")] + UALogLevel LogLevel { get; } + + // @property (readonly, nonatomic) BOOL inProduction; + [Export("inProduction")] + bool InProduction { get; } + + // @property (readonly, nonatomic) BOOL autoPauseInAppAutomationOnLaunch; + [Export("autoPauseInAppAutomationOnLaunch")] + bool AutoPauseInAppAutomationOnLaunch { get; } + + // @property (readonly, nonatomic) BOOL isAutomaticSetupEnabled; + [Export("isAutomaticSetupEnabled")] + bool IsAutomaticSetupEnabled { get; } + + // @property (readonly, copy, nonatomic) NSArray * _Nullable URLAllowList; + [NullAllowed, Export("URLAllowList", ArgumentSemantic.Copy)] + string[] URLAllowList { get; } + + // @property (readonly, copy, nonatomic) NSArray * _Nullable URLAllowListScopeJavaScriptInterface; + [NullAllowed, Export("URLAllowListScopeJavaScriptInterface", ArgumentSemantic.Copy)] + string[] URLAllowListScopeJavaScriptInterface { get; } + + // @property (readonly, copy, nonatomic) NSArray * _Nullable URLAllowListScopeOpenURL; + [NullAllowed, Export("URLAllowListScopeOpenURL", ArgumentSemantic.Copy)] + string[] URLAllowListScopeOpenURL { get; } + + // @property (readonly, nonatomic) BOOL suppressAllowListError; + [Export("suppressAllowListError")] + bool SuppressAllowListError { get; } + + // @property (readonly, nonatomic) BOOL isAnalyticsEnabled; + [Export("isAnalyticsEnabled")] + bool IsAnalyticsEnabled { get; } + + // @property (readonly, copy, nonatomic) NSString * _Nullable messageCenterStyleConfig; + [NullAllowed, Export("messageCenterStyleConfig")] + string MessageCenterStyleConfig { get; } + + // @property (readonly, copy, nonatomic) NSString * _Nullable itunesID; + [NullAllowed, Export("itunesID")] + string ItunesID { get; } + + // @property (readonly, nonatomic) BOOL clearUserOnAppRestore; + [Export("clearUserOnAppRestore")] + bool ClearUserOnAppRestore { get; } + + // @property (readonly, nonatomic) BOOL clearNamedUserOnAppRestore; + [Export("clearNamedUserOnAppRestore")] + bool ClearNamedUserOnAppRestore { get; } + + // @property (readonly, nonatomic) BOOL isChannelCaptureEnabled; + [Export("isChannelCaptureEnabled")] + bool IsChannelCaptureEnabled { get; } + + // @property (readonly, nonatomic) BOOL isChannelCreationDelayEnabled; + [Export("isChannelCreationDelayEnabled")] + bool IsChannelCreationDelayEnabled { get; } + + // @property (readonly, nonatomic) BOOL isExtendedBroadcastsEnabled; + [Export("isExtendedBroadcastsEnabled")] + bool IsExtendedBroadcastsEnabled { get; } + + // @property (readonly, nonatomic) BOOL requestAuthorizationToUseNotifications; + [Export("requestAuthorizationToUseNotifications")] + bool RequestAuthorizationToUseNotifications { get; } + + // @property (readonly, nonatomic) BOOL requireInitialRemoteConfigEnabled; + [Export("requireInitialRemoteConfigEnabled")] + bool RequireInitialRemoteConfigEnabled { get; } + + // @property (readonly, nonatomic) UAFeatures enabledFeatures; + [Export("enabledFeatures")] + UAFeatures EnabledFeatures { get; } + + // @property (readonly, copy, nonatomic) NSString * _Nullable deviceAPIURL; + [NullAllowed, Export("deviceAPIURL")] + string DeviceAPIURL { get; } + + // @property (readonly, copy, nonatomic) NSString * _Nullable remoteDataAPIURL; + [NullAllowed, Export("remoteDataAPIURL")] + string RemoteDataAPIURL { get; } + + // @property (readonly, copy, nonatomic) NSString * _Nullable analyticsURL; + [NullAllowed, Export("analyticsURL")] + string AnalyticsURL { get; } + + // @property (readonly, copy, nonatomic) NSString * _Nullable chatURL; + [NullAllowed, Export("chatURL")] + string ChatURL { get; } + + // @property (readonly, copy, nonatomic) NSString * _Nullable chatWebSocketURL; + [NullAllowed, Export("chatWebSocketURL")] + string ChatWebSocketURL { get; } + } + + + // @interface SearchEventTemplate : NSObject + [BaseType(typeof(NSObject))] + [DisableDefaultCtor] + interface SearchEventTemplate + { + // @property (nonatomic, strong) NSNumber * _Nullable eventValue; + [NullAllowed, Export("eventValue", ArgumentSemantic.Strong)] + NSNumber EventValue { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable type; + [NullAllowed, Export("type")] + string Type { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable identifier; + [NullAllowed, Export("identifier")] + string Identifier { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable category; + [NullAllowed, Export("category")] + string Category { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable query; + [NullAllowed, Export("query")] + string Query { get; set; } + + // @property (nonatomic) NSInteger totalResults; + [Export("totalResults")] + nint TotalResults { get; set; } + + // +(SearchEventTemplate * _Nonnull)templateWithValue:(NSNumber * _Nonnull)value __attribute__((warn_unused_result(""))); + [Static] + [Export("templateWithValue:")] + SearchEventTemplate Template(NSNumber value); + + // +(SearchEventTemplate * _Nonnull)template __attribute__((warn_unused_result(""))); + [Static] + [Export("template")] + SearchEventTemplate Template(); + + // -(UACustomEvent * _Nonnull)createEvent __attribute__((warn_unused_result(""))); + [Export("createEvent")] + UACustomEvent CreateEvent(); + } + + // @interface UASubscriptionListEditor : NSObject + [BaseType(typeof(NSObject))] + [DisableDefaultCtor] + interface UASubscriptionListEditor + { + // -(void)subscribe:(NSString * _Nonnull)subscriptionListID; + [Export("subscribe:")] + void Subscribe(string subscriptionListID); + + // -(void)unsubscribe:(NSString * _Nonnull)subscriptionListID; + [Export("unsubscribe:")] + void Unsubscribe(string subscriptionListID); + + // -(void)apply; + [Export("apply")] + void Apply(); + } + + // @interface UATagEditor : NSObject + [BaseType(typeof(NSObject))] + [DisableDefaultCtor] + interface UATagEditor + { + // -(void)addTags:(NSArray * _Nonnull)tags; + [Export("addTags:")] + void AddTags(string[] tags); + + // -(void)addTag:(NSString * _Nonnull)tag; + [Export("addTag:")] + void AddTag(string tag); + + // -(void)removeTags:(NSArray * _Nonnull)tags; + [Export("removeTags:")] + void RemoveTags(string[] tags); + + // -(void)removeTag:(NSString * _Nonnull)tag; + [Export("removeTag:")] + void RemoveTag(string tag); + + // -(void)setTags:(NSArray * _Nonnull)tags; + [Export("setTags:")] + void SetTags(string[] tags); + + // -(void)clearTags; + [Export("clearTags")] + void ClearTags(); + + // -(void)apply; + [Export("apply")] + void Apply(); + } + + // @interface UATagGroupsEditor : NSObject + [BaseType(typeof(NSObject))] + [DisableDefaultCtor] + interface UATagGroupsEditor + { + // -(void)addTags:(NSArray * _Nonnull)tags group:(NSString * _Nonnull)group; + [Export("addTags:group:")] + void AddTags(string[] tags, string group); + + // -(void)removeTags:(NSArray * _Nonnull)tags group:(NSString * _Nonnull)group; + [Export("removeTags:group:")] + void RemoveTags(string[] tags, string group); + + // -(void)setTags:(NSArray * _Nonnull)tags group:(NSString * _Nonnull)group; + [Export("setTags:group:")] + void SetTags(string[] tags, string group); + + // -(void)apply; + [Export("apply")] + void Apply(); + } + + // @protocol UANavigationDelegate + [Protocol, Model] + [BaseType(typeof(NSObject))] + interface UANavigationDelegate : IWKNavigationDelegate + { + // @optional -(void)closeWindow:(BOOL)animated; + [Export("closeWindow:")] + void CloseWindow(bool animated); + } + + interface IUANavigationDelegate { }; + + // @interface UAURLAllowList : NSObject + [BaseType(typeof(NSObject))] + interface UAURLAllowList + { + // +(UAURLAllowList * _Nonnull)allowListWithConfig:(UARuntimeConfig * _Nonnull)config __attribute__((warn_unused_result(""))); + [Static] + [Export("allowListWithConfig:")] + UAURLAllowList AllowList(UARuntimeConfig config); + + [Wrap("WeakDelegate")] + [NullAllowed] + IUAURLAllowListDelegate Delegate { get; set; } + + // @property (nonatomic, weak) id _Nullable delegate; + [NullAllowed, Export("delegate", ArgumentSemantic.Weak)] + NSObject WeakDelegate { get; set; } + + // -(BOOL)addEntry:(NSString * _Nonnull)patternString __attribute__((warn_unused_result(""))); + [Export("addEntry:")] + bool AddEntry(string patternString); + + // -(BOOL)addEntry:(NSString * _Nonnull)patternString scope:(UAURLAllowListScope)scope __attribute__((warn_unused_result(""))); + [Export("addEntry:scope:")] + bool AddEntry(string patternString, UAURLAllowListScope scope); + + // -(BOOL)isAllowed:(NSURL * _Nullable)url __attribute__((warn_unused_result(""))); + [Export("isAllowed:")] + bool IsAllowed([NullAllowed] NSUrl url); + + // -(BOOL)isAllowed:(NSURL * _Nullable)url scope:(UAURLAllowListScope)scope __attribute__((warn_unused_result(""))); + [Export("isAllowed:scope:")] + bool IsAllowed([NullAllowed] NSUrl url, UAURLAllowListScope scope); + } + + // @protocol UAURLAllowListDelegate + [Protocol, Model] + [BaseType(typeof(NSObject))] + interface UAURLAllowListDelegate + { + // @required -(BOOL)allowURL:(NSURL * _Nonnull)url scope:(UAURLAllowListScope)scope __attribute__((warn_unused_result(""))); + [Abstract] + [Export("allowURL:scope:")] + bool Scope(NSUrl url, UAURLAllowListScope scope); + } + + interface IUAURLAllowListDelegate { }; + + // @interface UAUtils : NSObject + [BaseType(typeof(NSObject))] + interface UAUtils + { + // +(BOOL)float:(CGFloat)float1 isEqualToFloat:(CGFloat)float2 withAccuracy:(CGFloat)accuracy __attribute__((warn_unused_result(""))); + [Static] + [Export("float:isEqualToFloat:withAccuracy:")] + bool Float(nfloat float1, nfloat float2, nfloat accuracy); + + // +(NSString * _Nullable)deviceModelName __attribute__((warn_unused_result(""))); + [Static] + [Export("deviceModelName")] + [return: NullAllowed] + string DeviceModelName(); + + // +(NSString * _Nullable)bundleShortVersionString __attribute__((warn_unused_result(""))); + [Static] + [Export("bundleShortVersionString")] + [return: NullAllowed] + string BundleShortVersionString(); + + // +(NSString * _Nullable)carrierName __attribute__((warn_unused_result(""))); + [Static] + [Export("carrierName")] + [return: NullAllowed] + string CarrierName(); + + // +(NSString * _Nonnull)connectionType __attribute__((warn_unused_result(""))); + [Static] + [Export("connectionType")] + string ConnectionType(); + + // +(enum NSComparisonResult)compareVersion:(NSString * _Nonnull)fromVersion toVersion:(NSString * _Nonnull)toVersion __attribute__((warn_unused_result(""))); + [Static] + [Export("compareVersion:toVersion:")] + NSComparisonResult CompareVersion(string fromVersion, string toVersion); + + // +(NSDateFormatter * _Nonnull)ISODateFormatterUTC __attribute__((warn_unused_result(""))); + [Static] + [Export("ISODateFormatterUTC")] + NSDateFormatter ISODateFormatterUTC(); + + // +(NSDateFormatter * _Nonnull)ISODateFormatterUTCWithDelimiter __attribute__((warn_unused_result(""))); + [Static] + [Export("ISODateFormatterUTCWithDelimiter")] + NSDateFormatter ISODateFormatterUTCWithDelimiter(); + + // +(NSDate * _Nullable)parseISO8601DateFromString:(NSString * _Nonnull)from __attribute__((warn_unused_result(""))); + [Static] + [Export("parseISO8601DateFromString:")] + [return: NullAllowed] + NSDate ParseISO8601DateFromString(string from); + + // +(UIWindow * _Nullable)mainWindow __attribute__((warn_unused_result(""))) __attribute__((availability(macos_app_extension, unavailable))) __attribute__((availability(tvos_app_extension, unavailable))) __attribute__((availability(watchos_app_extension, unavailable))) __attribute__((availability(ios_app_extension, unavailable))); + [Static] + [Export("mainWindow")] + [return: NullAllowed] + UIWindow MainWindow(); + + // +(UIWindow * _Nullable)mainWindow:(UIWindowScene * _Nonnull)scene __attribute__((warn_unused_result(""))) __attribute__((availability(tvos_app_extension, unavailable))) __attribute__((availability(tvos, introduced=13.0))) __attribute__((availability(ios, introduced=13))); + [Static] + [Export("mainWindow:")] + [return: NullAllowed] + UIWindow MainWindow(UIWindowScene scene); + + // +(UIWindow * _Nullable)windowForView:(UIView * _Nonnull)view __attribute__((warn_unused_result(""))); + [Static] + [Export("windowForView:")] + [return: NullAllowed] + UIWindow WindowForView(UIView view); + + // +(UIBackgroundFetchResult)mergeFetchResults:(NSArray * _Nonnull)results __attribute__((warn_unused_result(""))); + [Static] + [Export("mergeFetchResults:")] + UIBackgroundFetchResult MergeFetchResults(NSNumber[] results); + + // +(BOOL)isSilentPush:(NSDictionary * _Nonnull)notification __attribute__((warn_unused_result(""))); + [Static] + [Export("isSilentPush:")] + bool IsSilentPush(NSDictionary notification); + + // +(BOOL)isAlertingPush:(NSDictionary * _Nonnull)notification __attribute__((warn_unused_result(""))); + [Static] + [Export("isAlertingPush:")] + bool IsAlertingPush(NSDictionary notification); + + // +(NSString * _Nonnull)deviceTokenStringFromDeviceToken:(NSData * _Nonnull)token __attribute__((warn_unused_result(""))); + [Static] + [Export("deviceTokenStringFromDeviceToken:")] + string DeviceTokenStringFromDeviceToken(NSData token); + + // +(NSData * _Nonnull)sha256DigestWithString:(NSString * _Nonnull)input __attribute__((warn_unused_result(""))); + [Static] + [Export("sha256DigestWithString:")] + NSData Sha256Digest(string input); + + // +(NSString * _Nonnull)sha256HashWithString:(NSString * _Nonnull)input __attribute__((warn_unused_result(""))); + [Static] + [Export("sha256HashWithString:")] + string Sha256Hash(string input); + + // +(NSString * _Nullable)authHeaderStringWithName:(NSString * _Nonnull)username password:(NSString * _Nonnull)password __attribute__((warn_unused_result(""))); + [Static] + [Export("authHeaderStringWithName:password:")] + [return: NullAllowed] + string AuthHeaderString(string username, string password); + + // +(NSURL * _Nullable)parseURL:(NSString * _Nonnull)value __attribute__((warn_unused_result(""))); + [Static] + [Export("parseURL:")] + [return: NullAllowed] + NSUrl ParseURL(string value); + + // +(NSString * _Nonnull)permissionString:(enum UAPermission)permission __attribute__((warn_unused_result(""))); + [Static] + [Export("permissionString:")] + string PermissionString(UAPermission permission); + + // +(NSString * _Nonnull)permissionStatusString:(enum UAPermissionStatus)status __attribute__((warn_unused_result(""))); + [Static] + [Export("permissionStatusString:")] + string PermissionStatusString(UAPermissionStatus status); + } + + // @interface UAVersionMatcher : NSObject + [BaseType(typeof(NSObject))] + [DisableDefaultCtor] + interface UAVersionMatcher + { + // -(instancetype _Nullable)initWithVersionConstraint:(NSString * _Nonnull)versionConstraint __attribute__((objc_designated_initializer)); + [Export("initWithVersionConstraint:")] + [DesignatedInitializer] + IntPtr Constructor(string versionConstraint); + + // +(UAVersionMatcher * _Nullable)matcherWithVersionConstraint:(NSString * _Nonnull)versionConstraint __attribute__((warn_unused_result(""))); + [Static] + [Export("matcherWithVersionConstraint:")] + [return: NullAllowed] + UAVersionMatcher Matcher(string versionConstraint); + + // -(BOOL)evaluateObject:(id _Nullable)value __attribute__((warn_unused_result(""))); + [Export("evaluateObject:")] + bool EvaluateObject([NullAllowed] NSObject value); + + // +(BOOL)isExactVersion:(NSString * _Nonnull)versionConstraint __attribute__((warn_unused_result(""))); + [Static] + [Export("isExactVersion:")] + bool IsExactVersion(string versionConstraint); + + // +(BOOL)isSubVersion:(NSString * _Nonnull)versionConstraint __attribute__((warn_unused_result(""))); + [Static] + [Export("isSubVersion:")] + bool IsSubVersion(string versionConstraint); + + // +(BOOL)isVersionRange:(NSString * _Nonnull)versionConstraint __attribute__((warn_unused_result(""))); + [Static] + [Export("isVersionRange:")] + bool IsVersionRange(string versionConstraint); + } + + + // @interface UAWebView : WKWebView + [NoTV] + [BaseType(typeof(NSObject))] + interface UAWebView + { + // -(WKNavigation * _Nullable)loadRequest:(NSURLRequest * _Nonnull)request; + [Export("loadRequest:")] + [return: NullAllowed] + WKNavigation LoadRequest(NSUrlRequest request); + } + + // @protocol UAAutomationAudienceCheckerProtocol + [Protocol, Model] + [BaseType(typeof(NSObject))] + interface UAAutomationAudienceCheckerProtocol + { + // @required -(void)evaluateWithAudience:(id _Nonnull)audience isNewUserEvaluationDate:(NSDate * _Nonnull)isNewUserEvaluationDate contactID:(NSString * _Nullable)contactID completionHandler:(void (^ _Nonnull)(BOOL))completionHandler; + [Abstract] + [Export("evaluateWithAudience:isNewUserEvaluationDate:contactID:completionHandler:")] + void IsNewUserEvaluationDate(NSObject audience, NSDate isNewUserEvaluationDate, [NullAllowed] string contactID, Action completionHandler); + } + + interface IUAAutomationAudienceCheckerProtocol { }; + + // @interface UAAutomationAudienceChecker + interface UAAutomationAudienceChecker : IUAAutomationAudienceCheckerProtocol + { + // -(void)evaluateWithAudience:(id _Nonnull)audience isNewUserEvaluationDate:(NSDate * _Nonnull)isNewUserEvaluationDate contactID:(NSString * _Nullable)contactID completionHandler:(void (^ _Nonnull)(BOOL))completionHandler; + [Export("evaluateWithAudience:isNewUserEvaluationDate:contactID:completionHandler:")] + void Evaluate(NSObject audience, NSDate isNewUserEvaluationDate, [NullAllowed] string contactID, Action completionHandler); + } + + // @protocol UAPushableComponent + [Protocol, Model] + [BaseType(typeof(NSObject))] + interface UAPushableComponent + { + // @optional -(void)receivedRemoteNotification:(NSDictionary * _Nonnull)notification completionHandler:(void (^ _Nonnull)(UIBackgroundFetchResult))completionHandler; + [Export("receivedRemoteNotification:completionHandler:")] + void ReceivedRemoteNotification(NSDictionary notification, Action completionHandler); + + // @optional -(void)receivedNotificationResponse:(UNNotificationResponse * _Nonnull)response completionHandler:(void (^ _Nonnull)(void))completionHandler; + [Export("receivedNotificationResponse:completionHandler:")] + void ReceivedNotificationResponse(UNNotificationResponse response, Action completionHandler); + + // @optional -(UNNotificationPresentationOptions)presentationOptionsForNotification:(UNNotification * _Nonnull)notification defaultPresentationOptions:(UNNotificationPresentationOptions)options __attribute__((warn_unused_result(""))); + [Export("presentationOptionsForNotification:defaultPresentationOptions:")] + UNNotificationPresentationOptions PresentationOptionsForNotification(UNNotification notification, UNNotificationPresentationOptions options); + } + + interface IUAPushableComponent { }; + + // @protocol UAirshipLogHandler + [Protocol, Model] + [BaseType(typeof(NSObject))] + interface UAirshipLogHandler + { + // @required -(void)logWithLogLevel:(enum UALogLevel)logLevel message:(NSString * _Nonnull)message fileID:(NSString * _Nonnull)fileID line:(NSInterger)line function:(NSString * _Nonnull)function; + [Abstract] + [Export("logWithLogLevel:message:fileID:line:function:")] + void Message(UALogLevel logLevel, string message, string fileID, nint line, string function); + } + + // @protocol UAAirshipPermissionDelegate + [Protocol, Model] + [BaseType(typeof(NSObject))] + interface UAAirshipPermissionDelegate + { + // @required -(void)checkPermissionStatusWithCompletionHandler:(void (^ _Nonnull)(enum UAPermissionStatus))completionHandler; + [Abstract] + [Export("checkPermissionStatusWithCompletionHandler:")] + void CheckPermissionStatus(Action completionHandler); + + // @required -(void)requestPermissionWithCompletionHandler:(void (^ _Nonnull)(enum UAPermissionStatus))completionHandler; + [Abstract] + [Export("requestPermissionWithCompletionHandler:")] + void RequestPermission(Action completionHandler); + } + + // @interface UAPermissionsManager + [BaseType(typeof(NSObject))] + interface UAPermissionsManager + { + // -(void)permissionStatusMapWithCompletionHandler:(void (^ _Nonnull)(int))completionHandler; + [Export("permissionStatusMapWithCompletionHandler:")] + void PermissionStatusMap(Action completionHandler); + + // -(void)setDelegate:(id _Nullable)delegate permission:(enum UAPermission)permission; + [Export("setDelegate:permission:")] + void SetDelegate([NullAllowed] UAAirshipPermissionDelegate @delegate, UAPermission permission); + + // -(void)requestPermission:(enum UAPermission)permission completionHandler:(void (^ _Nonnull)(enum UAPermissionStatus))completionHandler; + [Export("requestPermission:completionHandler:")] + void RequestPermission(UAPermission permission, Action completionHandler); + + // -(void)requestPermission:(enum UAPermission)permission enableAirshipUsageOnGrant:(BOOL)enableAirshipUsageOnGrant completionHandler:(void (^ _Nonnull)(enum UAPermissionStatus))completionHandler; + [Export("requestPermission:enableAirshipUsageOnGrant:completionHandler:")] + void RequestPermission(UAPermission permission, bool enableAirshipUsageOnGrant, Action completionHandler); + } + + // @interface UAAppStateTracker + [DisableDefaultCtor] + [BaseType(typeof(NSObject))] + interface UAAppStateTracker + { + // @property (readonly, nonatomic, class) NSNotificationName _Nonnull didBecomeActiveNotification; + [Static] + [Export("didBecomeActiveNotification")] + string DidBecomeActiveNotification { get; } + + // @property (readonly, nonatomic, class) NSNotificationName _Nonnull willEnterForegroundNotification; + [Static] + [Export("willEnterForegroundNotification")] + string WillEnterForegroundNotification { get; } + + // @property (readonly, nonatomic, class) NSNotificationName _Nonnull didEnterBackgroundNotification; + [Static] + [Export("didEnterBackgroundNotification")] + string DidEnterBackgroundNotification { get; } + + // @property (readonly, nonatomic, class) NSNotificationName _Nonnull willResignActiveNotification; + [Static] + [Export("willResignActiveNotification")] + string WillResignActiveNotification { get; } + + // @property (readonly, nonatomic, class) NSNotificationName _Nonnull willTerminateNotification; + [Static] + [Export("willTerminateNotification")] + string WillTerminateNotification { get; } + + // @property (readonly, nonatomic, class) NSNotification _Nonnull didTransitionToBackground; + [Static] + [Export("didTransitionToBackground")] + string DidTransitionToBackground { get; } + + // @property (readonly, nonatomic, class) NSNotificationName _Nonnull didTransitionToForeground; + [Static] + [Export("didTransitionToForeground")] + string DidTransitionToForeground { get; } + + // @property (readonly, nonatomic, strong, class) UAAppStateTracker * _Nonnull shared; + [Static] + [Export("shared", ArgumentSemantic.Strong)] + UAAppStateTracker Shared { get; } + + // @property (readonly, nonatomic) enum UAApplicationState state; + [Export("state")] + UAApplicationState State { get; } + } + + // @interface UAAssociatedChannel + [DisableDefaultCtor] + [BaseType(typeof(NSObject))] + interface UAAssociatedChannel + { + // @property (readonly, nonatomic) enum UAChannelType channelType; + [Export("channelType")] + UAChannelType ChannelType { get; } + + // @property (readonly, copy, nonatomic) NSString * _Nonnull channelID; + [Export("channelID")] + string ChannelID { get; } + + // -(instancetype _Nonnull)initWithChannelType:(enum UAChannelType)channelType channelID:(NSString * _Nonnull)channelID __attribute__((objc_designated_initializer)); + [Export("initWithChannelType:channelID:")] + [DesignatedInitializer] + IntPtr Constructor(UAChannelType channelType, string channelID); + } + + // @protocol UAChannelProtocol + [Protocol, Model] + [BaseType(typeof(NSObject))] + interface UAChannelProtocol + { + // @required @property (readonly, copy, nonatomic) NSString * _Nullable identifier; + [Abstract] + [NullAllowed, Export("identifier")] + string Identifier { get; } + + // @required @property (nonatomic) BOOL isChannelTagRegistrationEnabled; + [Abstract] + [Export("isChannelTagRegistrationEnabled")] + bool IsChannelTagRegistrationEnabled { get; set; } + + // @required -(UATagEditor * _Nonnull)editTags __attribute__((warn_unused_result(""))); + [Abstract] + [Export("editTags")] + UATagEditor EditTags(); + + // @required -(void)editTags:(void (^ _Nonnull)(UATagEditor * _Nonnull))editorBlock; + [Abstract] + [Export("editTags:")] + void EditTags(Action editorBlock); + + // @required -(UATagGroupsEditor * _Nonnull)editTagGroups __attribute__((warn_unused_result(""))); + [Abstract] + [Export("editTagGroups")] + UATagGroupsEditor EditTagGroups(); + + // @required -(void)editTagGroups:(void (^ _Nonnull)(UATagGroupsEditor * _Nonnull))editorBlock; + [Abstract] + [Export("editTagGroups:")] + void EditTagGroups(Action editorBlock); + + // @required -(UASubscriptionListEditor * _Nonnull)editSubscriptionLists __attribute__((warn_unused_result(""))); + [Abstract] + [Export("editSubscriptionLists")] + UASubscriptionListEditor EditSubscriptionLists(); + + // @required -(void)editSubscriptionLists:(void (^ _Nonnull)(UASubscriptionListEditor * _Nonnull))editorBlock; + [Abstract] + [Export("editSubscriptionLists:")] + void EditSubscriptionLists(Action editorBlock); + + // @required -(void)fetchSubscriptionListsWithCompletionHandler:(void (^ _Nonnull)(NSArray *))completionHandler; + [Abstract] + [Export("fetchSubscriptionListsWithCompletionHandler:")] + void FetchSubscriptionLists(Action completionHandler); + + // @required -(UAAttributesEditor * _Nonnull)editAttributes __attribute__((warn_unused_result(""))); + [Abstract] + [Export("editAttributes")] + UAAttributesEditor EditAttributes(); + + // @required -(void)editAttributes:(void (^ _Nonnull)(UAAttributesEditor * _Nonnull))editorBlock; + [Abstract] + [Export("editAttributes:")] + void EditAttributes(Action editorBlock); + + // @required -(void)enableChannelCreation; + [Abstract] + [Export("enableChannelCreation")] + void EnableChannelCreation(); + } + + // @protocol UAPushProtocol + [Protocol, Model] + interface UAPushProtocol + { + // @required @property (readonly, nonatomic) BOOL isPushNotificationsOptedIn; + [Abstract] + [Export("isPushNotificationsOptedIn")] + bool IsPushNotificationsOptedIn { get; } + + // @required @property (nonatomic) BOOL backgroundPushNotificationsEnabled; + [Abstract] + [Export("backgroundPushNotificationsEnabled")] + bool BackgroundPushNotificationsEnabled { get; set; } + + // @required @property (nonatomic) BOOL userPushNotificationsEnabled; + [Abstract] + [Export("userPushNotificationsEnabled")] + bool UserPushNotificationsEnabled { get; set; } + + // @required @property (nonatomic) BOOL requestExplicitPermissionWhenEphemeral; + [Abstract] + [Export("requestExplicitPermissionWhenEphemeral")] + bool RequestExplicitPermissionWhenEphemeral { get; set; } + + // @required @property (readonly, copy, nonatomic) NSString * _Nullable deviceToken; + [Abstract] + [NullAllowed, Export("deviceToken")] + string DeviceToken { get; } + + // @required @property (nonatomic) UANotificationOptions notificationOptions; + [Abstract] + [Export("notificationOptions")] + UANotificationOptions NotificationOptions { get; set; } + + // @required @property (nonatomic) BOOL requireAuthorizationForDefaultCategories; + [Abstract] + [Export("requireAuthorizationForDefaultCategories")] + bool RequireAuthorizationForDefaultCategories { get; set; } + + [Wrap("WeakPushNotificationDelegate"), Abstract] + [NullAllowed] + UAPushNotificationDelegate PushNotificationDelegate { get; set; } + + // @required @property (nonatomic, weak) id _Nullable pushNotificationDelegate; + [Abstract] + [NullAllowed, Export("pushNotificationDelegate", ArgumentSemantic.Weak)] + NSObject WeakPushNotificationDelegate { get; set; } + + [Wrap("WeakRegistrationDelegate"), Abstract] + [NullAllowed] + UARegistrationDelegate RegistrationDelegate { get; set; } + + // @required @property (nonatomic, weak) id _Nullable registrationDelegate; + [Abstract] + [NullAllowed, Export("registrationDelegate", ArgumentSemantic.Weak)] + NSObject WeakRegistrationDelegate { get; set; } + + // @required @property (readonly, nonatomic, strong) UNNotificationResponse * _Nullable launchNotificationResponse; + [Abstract] + [NullAllowed, Export("launchNotificationResponse", ArgumentSemantic.Strong)] + UNNotificationResponse LaunchNotificationResponse { get; } + + // @required @property (readonly, nonatomic) UAAuthorizedNotificationSettings authorizedNotificationSettings; + [Abstract] + [Export("authorizedNotificationSettings")] + UAAuthorizedNotificationSettings AuthorizedNotificationSettings { get; } + + // @required @property (readonly, nonatomic) UAAuthorizationStatus authorizationStatus; + [Abstract] + [Export("authorizationStatus")] + UAAuthorizationStatus AuthorizationStatus { get; } + + // @required @property (readonly, nonatomic) BOOL userPromptedForNotifications; + [Abstract] + [Export("userPromptedForNotifications")] + bool UserPromptedForNotifications { get; } + + // @required @property (nonatomic) UNNotificationPresentationOptions defaultPresentationOptions; + [Abstract] + [Export("defaultPresentationOptions")] + UNNotificationPresentationOptions DefaultPresentationOptions { get; set; } + + // @required @property (nonatomic) NSInteger badgeNumber; + [Abstract] + [Export("badgeNumber")] + nint BadgeNumber { get; set; } + } + + // @interface UAContactConflictEvent + [DisableDefaultCtor] + [BaseType(typeof(NSObject))] + interface UAContactConflictEvent + { + // @property (readonly, copy, nonatomic) NSString * _Nullable conflictingNamedUserID; + [NullAllowed, Export("conflictingNamedUserID")] + string ConflictingNamedUserID { get; } + } + + // @interface UAEmailRegistrationOptions + [DisableDefaultCtor] + [BaseType(typeof(NSObject))] + interface UAEmailRegistrationOptions + { + // +(UAEmailRegistrationOptions * _Nonnull)commercialOptionsWithTransactionalOptedIn:(NSDate * _Nullable)transactionalOptedIn commercialOptedIn:(NSDate * _Nullable)commercialOptedIn properties:(NSDictionary * _Nullable)properties __attribute__((warn_unused_result(""))); + [Static] + [Export("commercialOptionsWithTransactionalOptedIn:commercialOptedIn:properties:")] + UAEmailRegistrationOptions CommercialOptionsWithTransactionalOptedIn([NullAllowed] NSDate transactionalOptedIn, [NullAllowed] NSDate commercialOptedIn, [NullAllowed] NSDictionary properties); + + // +(UAEmailRegistrationOptions * _Nonnull)optionsWithTransactionalOptedIn:(NSDate * _Nullable)transactionalOptedIn properties:(NSDictionary * _Nullable)properties doubleOptIn:(BOOL)doubleOptIn __attribute__((warn_unused_result(""))); + [Static] + [Export("optionsWithTransactionalOptedIn:properties:doubleOptIn:")] + UAEmailRegistrationOptions OptionsWithTransactionalOptedIn([NullAllowed] NSDate transactionalOptedIn, [NullAllowed] NSDictionary properties, bool doubleOptIn); + + // +(UAEmailRegistrationOptions * _Nonnull)optionsWithProperties:(NSDictionary * _Nullable)properties doubleOptIn:(BOOL)doubleOptIn __attribute__((warn_unused_result(""))); + [Static] + [Export("optionsWithProperties:doubleOptIn:")] + UAEmailRegistrationOptions OptionsWithProperties([NullAllowed] NSDictionary properties, bool doubleOptIn); + } + + // @interface UAJSONUtils + [BaseType(typeof(NSObject))] + interface UAJSONUtils + { + // +(NSData * _Nullable)dataWithObject:(id _Nonnull)obj options:(id)options error:(id)error __attribute__((warn_unused_result(""))); + [Static] + [Export("dataWithObject:options:error:")] + [return: NullAllowed] + NSData DataWithObject(NSObject obj, NSObject options, NSObject error); + + // +(NSString * _Nullable)stringWithObject:(id _Nonnull)obj options:(id)options error:(id)error __attribute__((warn_unused_result(""))); + [Static] + [Export("stringWithObject:options:error:")] + [return: NullAllowed] + string StringWithObject(NSObject obj, NSObject options, NSObject error); + + // +(NSString * _Nullable)stringWithObject:(id _Nonnull)obj __attribute__((warn_unused_result(""))); + [Static] + [Export("stringWithObject:")] + [return: NullAllowed] + string StringWithObject(NSObject obj); + + // +(id _Nullable)objectWithString:(NSString * _Nonnull)string __attribute__((warn_unused_result(""))); + [Static] + [Export("objectWithString:")] + [return: NullAllowed] + NSObject ObjectWithString(string @string); + + // +(id _Nullable)objectWithString:(NSString * _Nonnull)string options:(id)options error:(id)error __attribute__((warn_unused_result(""))); + [Static] + [Export("objectWithString:options:error:")] + [return: NullAllowed] + NSObject ObjectWithString(string @string, NSObject options, NSObject error); + } + + // @interface UAJavaScriptCommand : NSObject + [DisableDefaultCtor] + [BaseType(typeof(NSObject))] + interface UAJavaScriptCommand + { + // @property (readonly, copy, nonatomic) NSString * _Nullable name; + [NullAllowed, Export("name")] + string Name { get; } + + // @property (nonatomic, strong, readonly) NSArray *_Nonnull arguments; + [Export("arguments", ArgumentSemantic.Strong)] + string[] Arguments { get; } + + // @property (nonatomic, strong, readonly) NSDictionary *_Nonnull options; + [Export("options", ArgumentSemantic.Strong)] + NSDictionary Options { get; } + + // @property (readonly, copy, nonatomic) NSURL * _Nonnull URL; + [Export("URL", ArgumentSemantic.Copy)] + NSUrl URL { get; } + + // -(instancetype _Nonnull)initWithURL:(NSURL * _Nonnull)url __attribute__((objc_designated_initializer)); + [Export("initWithURL:")] + [DesignatedInitializer] + IntPtr Constructor(NSUrl url); + } + + // @protocol UAJavaScriptCommandDelegate + [Protocol, Model] + [BaseType(typeof(NSObject))] + interface UAJavaScriptCommandDelegate + { + // @required -(id)performCommand:(UAJavaScriptCommand * _Nonnull)command webView:(WKWebView * _Nonnull)webView __attribute__((warn_unused_result(""))); + [Abstract] + [Export("performCommand:webView:")] + NSObject performCommand(UAJavaScriptCommand command, WKWebView webView); + } + + interface IUAJavaScriptCommandDelegate { } + + // @protocol UAJavaScriptEnvironmentProtocol + [Protocol, Model] + [BaseType(typeof(NSObject))] + interface UAJavaScriptEnvironmentProtocol + { + // @required -(void)addStringGetter:(NSString * _Nonnull)getter value:(NSString * _Nullable)string; + [Abstract] + [Export("addStringGetter:value:")] + void AddStringGetter(string getter, [NullAllowed] string @string); + + // @required -(void)addNumberGetter:(NSString * _Nonnull)getter value:(NSNumber * _Nullable)number; + [Abstract] + [Export("addNumberGetter:value:")] + void AddNumberGetter(string getter, [NullAllowed] NSNumber number); + + // @required -(void)addDictionaryGetter:(NSString * _Nonnull)getter value:(id)dictionary; + [Abstract] + [Export("addDictionaryGetter:value:")] + void AddDictionaryGetter(string getter, NSObject dictionary); + + // @required -(void)buildWithCompletionHandler:(void (^ _Nonnull)(NSString * _Nonnull))completionHandler; + [Abstract] + [Export("buildWithCompletionHandler:")] + void Build(Action completionHandler); + } + + interface IUAJavaScriptEnvironmentProtocol { } + + // @protocol UANativeBridgeExtensionDelegate + [Protocol, Model] + [BaseType(typeof(NSObject))] + interface UANativeBridgeExtensionDelegate + { + // @required -(NSDictionary *)actionsMetadataForCommand:(UAJavaScriptCommand * _Nonnull)command webView:(WKWebView * _Nonnull)webView __attribute__((warn_unused_result(""))); + [Abstract] + [Export("actionsMetadataForCommand:webView:")] + NSDictionary ActionsMetadataForCommand(UAJavaScriptCommand command, WKWebView webView); + + // @required -(void)extendJavaScriptEnvironment:(id _Nonnull)js webView:(WKWebView * _Nonnull)webView completionHandler:(void (^ _Nonnull)(void))completionHandler; + [Abstract] + [Export("extendJavaScriptEnvironment:webView:completionHandler:")] + void ExtendJavaScriptEnvironment(UAJavaScriptEnvironmentProtocol js, WKWebView webView, Action completionHandler); + } + + interface IUANativeBridgeExtensionDelegate { }; + + // @interface UAOpenRegistrationOptions + [DisableDefaultCtor] + [BaseType(typeof(NSObject))] + interface UAOpenRegistrationOptions + { + // +(UAOpenRegistrationOptions * _Nonnull)optInPlatformName:(NSString * _Nonnull)platformName identifiers:(id)identifiers __attribute__((warn_unused_result(""))); + [Static] + [Export("optInPlatformName:identifiers:")] + UAOpenRegistrationOptions OptInPlatformName(string platformName, NSObject identifiers); + } + + // @interface UASMSRegistrationOptions + [DisableDefaultCtor] + [BaseType(typeof(NSObject))] + interface UASMSRegistrationOptions + { + // +(UASMSRegistrationOptions * _Nonnull)optInSenderID:(NSString * _Nonnull)senderID __attribute__((warn_unused_result(""))); + [Static] + [Export("optInSenderID:")] + UASMSRegistrationOptions OptInSenderID(string senderID); + } + + // @interface UAScopedSubscriptionListEditor + [DisableDefaultCtor] + [BaseType(typeof(NSObject))] + interface UAScopedSubscriptionListEditor + { + // -(void)subscribe:(NSString * _Nonnull)subscriptionListID scope:(enum UAChannelScope)scope; + [Export("subscribe:scope:")] + void Subscribe(string subscriptionListID, UAChannelScope scope); + + // -(void)unsubscribe:(NSString * _Nonnull)subscriptionListID scope:(enum UAChannelScope)scope; + [Export("unsubscribe:scope:")] + void Unsubscribe(string subscriptionListID, UAChannelScope scope); + + // -(void)apply; + [Export("apply")] + void Apply(); + } +} \ No newline at end of file diff --git a/src/AirshipBindings.iOS.Core/StructsAndEnums.cs b/src/AirshipBindings.iOS.Core/StructsAndEnums.cs index df471291..57e6dffd 100644 --- a/src/AirshipBindings.iOS.Core/StructsAndEnums.cs +++ b/src/AirshipBindings.iOS.Core/StructsAndEnums.cs @@ -7,63 +7,49 @@ Copyright Airship and Contributors namespace UrbanAirship { - [Native] - public enum UAApplicationState : ulong - { - Active = 0, - Inactive = 1, - Background = 2 - } - - [Native] - public enum UAAttributeUpdateType : ulong - { - Remove = 0, - Set = 1 - } - - [Native] - public enum UAChannelScope : ulong - { - App = 0, - Web = 1, - Email = 2, - Sms = 3 - } + [Native] + public enum UAApplicationState : ulong + { + Active = 0, + Inactive = 1, + Background = 2 + } - [Native] - public enum UAChannelType : ulong - { - Email = 0, - Sms = 1, - Open = 2 - } + [Native] + public enum UAChannelScope : ulong + { + App = 0, + Web = 1, + Email = 2, + Sms = 3 + } - [Native] - public enum UACloudSite : ulong - { - Us = 0, - Eu = 1 - } + [Native] + public enum UAChannelType : ulong + { + Email = 0, + Sms = 1, + Open = 2 + } - [Native] - public enum UADispatcherTimeBase : ulong - { - Wall = 0, - System = 1 - } + [Native] + public enum UACloudSite : ulong + { + Us = 0, + Eu = 1 + } - [Native] - public enum UALogLevel : long - { - Undefined = -1, - None = 0, - Error = 1, - Warn = 2, - Info = 3, - Debug = 4, - Trace = 5 - } + [Native] + public enum UALogLevel : long + { + Undefined = -1, + None = 0, + Error = 1, + Warn = 2, + Info = 3, + Debug = 4, + Trace = 5 + } [Native] public enum UASDKExtension : ulong @@ -77,41 +63,40 @@ public enum UASDKExtension : ulong } [Native] - public enum UATagGroupUpdateType : ulong - { - Add = 0, - Remove = 1, - Set = 2 - } + public enum UABoundaryEvent : ulong + { + Enter = 1, + Exit = 2 + } - [Native] - public enum UABoundaryEvent : ulong - { - Enter = 1, - Exit = 2 - } + [Native] + public enum URLType : ulong + { + Web = 0, + Video = 1, + Image = 2 + } - [Native] - public enum UATaskConflictPolicy : ulong - { - Keep = 0, - Replace = 1, - Append = 2 - } + [Native] + public enum UrlTypes : ulong + { + Image = 0, + Video = 1, + Web = 2 + } - [Native] - public enum URLType : ulong - { - Web = 0, - Video = 1, - Image = 2 - } + [Native] + public enum UAPermissionStatus : ulong + { + notDetermined = 0, + granted = 1, + denied = 2 + } - [Native] - public enum UrlTypes : ulong - { - Image = 0, - Video = 1, - Web = 2 - } -} + [Native] + public enum UAPermission : ulong + { + displayNotifications = 0, + location = 1 + } +} \ No newline at end of file diff --git a/src/AirshipBindings.iOS.ExtendedActions/AirshipBindings.iOS.ExtendedActions.csproj b/src/AirshipBindings.iOS.ExtendedActions/AirshipBindings.iOS.ExtendedActions.csproj deleted file mode 100644 index 88ca08f4..00000000 --- a/src/AirshipBindings.iOS.ExtendedActions/AirshipBindings.iOS.ExtendedActions.csproj +++ /dev/null @@ -1,61 +0,0 @@ - - - true - Debug - AnyCPU - {BFFFE653-04CD-4563-BF2D-B6F31349F30D} - Library - AirshipBindings.iOS.ExtendedActions - Airship.Net.iOS.ExtendedActions - Airship iOS SDK - ExtendedActions - Extended actions support for Airship SDK - net6.0-ios - enable - true - true - false - $(AirshipIosVersion) - $(AirshipIosNugetVersion) - Resources - 13.0 - - - - true - full - false - bin\Debug - DEBUG; - prompt - 4 - true - - - - full - true - bin\Release - prompt - 4 - true - - - - - - - - - - Framework - False - - - - - - - - - - diff --git a/src/AirshipBindings.iOS.ExtendedActions/AirshipBindings.iOS.ExtendedActions.sln b/src/AirshipBindings.iOS.ExtendedActions/AirshipBindings.iOS.ExtendedActions.sln deleted file mode 100644 index 6b4b581e..00000000 --- a/src/AirshipBindings.iOS.ExtendedActions/AirshipBindings.iOS.ExtendedActions.sln +++ /dev/null @@ -1,29 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirshipBindings.iOS.ExtendedActions", "AirshipBindings.iOS.ExtendedActions.csproj", "{BFFFE653-04CD-4563-BF2D-B6F31349F30D}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirshipBindings.iOS.Core", "..\AirshipBindings.iOS.Core\AirshipBindings.iOS.Core.csproj", "{7F49C0FA-F958-44CF-9246-8B8577748E6F}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirshipBindings.iOS.Basement", "..\AirshipBindings.iOS.Basement\AirshipBindings.iOS.Basement.csproj", "{5E85A7FD-8C42-4DE6-B002-E3CC2DA529C7}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {BFFFE653-04CD-4563-BF2D-B6F31349F30D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BFFFE653-04CD-4563-BF2D-B6F31349F30D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BFFFE653-04CD-4563-BF2D-B6F31349F30D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BFFFE653-04CD-4563-BF2D-B6F31349F30D}.Release|Any CPU.Build.0 = Release|Any CPU - {7F49C0FA-F958-44CF-9246-8B8577748E6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7F49C0FA-F958-44CF-9246-8B8577748E6F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7F49C0FA-F958-44CF-9246-8B8577748E6F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7F49C0FA-F958-44CF-9246-8B8577748E6F}.Release|Any CPU.Build.0 = Release|Any CPU - {5E85A7FD-8C42-4DE6-B002-E3CC2DA529C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5E85A7FD-8C42-4DE6-B002-E3CC2DA529C7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5E85A7FD-8C42-4DE6-B002-E3CC2DA529C7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5E85A7FD-8C42-4DE6-B002-E3CC2DA529C7}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection -EndGlobal diff --git a/src/AirshipBindings.iOS.ExtendedActions/AirshipExtendedActions.cs b/src/AirshipBindings.iOS.ExtendedActions/AirshipExtendedActions.cs deleted file mode 100644 index 8aeaedd1..00000000 --- a/src/AirshipBindings.iOS.ExtendedActions/AirshipExtendedActions.cs +++ /dev/null @@ -1,17 +0,0 @@ -/* - Copyright Airship and Contributors -*/ - -namespace UrbanAirship -{ - /// - /// Entry point for initializing AirshipExtendedActions - /// - public class AirshipExtendedActions - { - /// - /// Initializes AirshipExtendedActions. - /// - public static void Init() { } - } -} diff --git a/src/AirshipBindings.iOS.ExtendedActions/ApiDefinitions.cs b/src/AirshipBindings.iOS.ExtendedActions/ApiDefinitions.cs deleted file mode 100644 index 274bcd49..00000000 --- a/src/AirshipBindings.iOS.ExtendedActions/ApiDefinitions.cs +++ /dev/null @@ -1,44 +0,0 @@ -/* - Copyright Airship and Contributors -*/ - -using Foundation; - -namespace UrbanAirship { - - [Static] - partial interface Constants - { - // extern NSString *const UARateAppActionDefaultRegistryAlias - [Field("UARateAppActionDefaultRegistryAlias", "__Internal")] - NSString UARateAppActionDefaultRegistryAlias { get; } - - // extern NSString *const UARateAppActionDefaultRegistryName - [Field("UARateAppActionDefaultRegistryName", "__Internal")] - NSString UARateAppActionDefaultRegistryName { get; } - - // extern NSString *const UARateAppItunesIDKey - [Field("UARateAppItunesIDKey", "__Internal")] - NSString UARateAppItunesIDKey { get; } - - // extern NSString *const UARateAppShowLinkPromptKey - [Field("UARateAppShowLinkPromptKey", "__Internal")] - NSString UARateAppShowLinkPromptKey { get; } - } - - // @interface UAExtendedActionsResources : NSObject - [BaseType(typeof(NSObject))] - interface UAExtendedActionsResources - { - // + (nonnull NSBundle *)bundle; - [Static] - [Export("bundle")] - NSBundle Bundle (); - } - - // @interface UARateAppAction : NSObject - [BaseType(typeof(NSObject))] - interface UARateAppAction : IUAAction - { - } -} diff --git a/src/AirshipBindings.iOS.ExtendedActions/StructsAndEnums.cs b/src/AirshipBindings.iOS.ExtendedActions/StructsAndEnums.cs deleted file mode 100644 index 6258f2a6..00000000 --- a/src/AirshipBindings.iOS.ExtendedActions/StructsAndEnums.cs +++ /dev/null @@ -1,11 +0,0 @@ -/* - Copyright Airship and Contributors -*/ -using ObjCRuntime; -using System; -using UIKit; - -namespace UrbanAirship { - - -} diff --git a/src/AirshipBindings.iOS.ExtendedActions/build.gradle b/src/AirshipBindings.iOS.ExtendedActions/build.gradle deleted file mode 100644 index d4f14705..00000000 --- a/src/AirshipBindings.iOS.ExtendedActions/build.gradle +++ /dev/null @@ -1,22 +0,0 @@ -ext { - pod = 'UrbanAirship-iOS-SDK' - iosSdkModuleName = 'AirshipExtendedActions' -} - -apply from: "../ios-common-build.gradle" - -task clean(type: Delete) { - doLast() { - project.delete "bin" - project.delete "obj" - project.delete "$buildDir" - } -} - -task carthageUpdate { - doLast() { - exec { - commandLine "strip", "-S", "-x", "../../Carthage/Build/iOS/AirshipExtendedActions.framework/AirshipExtendedActions" - } - } -} diff --git a/src/AirshipBindings.iOS.MessageCenter/ApiDefinitions.cs b/src/AirshipBindings.iOS.MessageCenter/ApiDefinitions.cs index 3e5ed73d..bfdc76d3 100644 --- a/src/AirshipBindings.iOS.MessageCenter/ApiDefinitions.cs +++ b/src/AirshipBindings.iOS.MessageCenter/ApiDefinitions.cs @@ -12,640 +12,255 @@ Copyright Airship and Contributors namespace UrbanAirship { - [Static] - partial interface Constants - { - // extern NSString *const _Nonnull UAInboxMessageListUpdatedNotification - [Field("UAInboxMessageListUpdatedNotification", "__Internal")] - NSString UAInboxMessageListUpdatedNotification { get; } - - // extern NSString *const _Nonnull UAInboxMessageListWillUpdateNotification - [Field("UAInboxMessageListWillUpdateNotification", "__Internal")] - NSString UAInboxMessageListWillUpdateNotification { get; } - - // extern NSString *const _Nonnull UAMessageCenterMessageLoadErrorDomain - [Field("UAMessageCenterMessageLoadErrorDomain", "__Internal")] - NSString UAMessageCenterMessageLoadErrorDomain { get; } - - // extern NSString *const _Nonnull UAMessageCenterMessageLoadErrorHTTPStatusKey - [Field("UAMessageCenterMessageLoadErrorHTTPStatusKey", "__Internal")] - NSString UAMessageCenterMessageLoadErrorHTTPStatusKey { get; } - - // extern NSString *const _Nonnull UAMessageDataScheme - [Field("UAMessageDataScheme", "__Internal")] - NSString UAMessageDataScheme { get; } - - // extern NSString *const UANavigationBarStyleBlackKey - [Field("UANavigationBarStyleBlackKey", "__Internal")] - NSString UANavigationBarStyleBlackKey { get; } - - // extern NSString *const UANavigationBarStyleDefaultKey - [Field("UANavigationBarStyleDefaultKey", "__Internal")] - NSString UANavigationBarStyleDefaultKey { get; } - - // extern NSString * const UAUserCreatedNotification - [Field("UAUserCreatedNotification", "__Internal")] - NSString UAUserCreatedNotification { get; } - } - - // @interface UADefaultMessageCenterListViewController : UIViewController - [BaseType(typeof(UIViewController))] - interface UADefaultMessageCenterListViewController : IUITableViewDelegate, IUITableViewDataSource, IUIScrollViewDelegate - { - // @property (nonatomic, strong, readwrite) UAMessageCenterStyle *_Nonnull messageCenterStyle; - [Export("messageCenterStyle", ArgumentSemantic.Strong)] - UAMessageCenterStyle MessageCenterStyle { get; set; } - - // @property (nonatomic, strong, readwrite) NSPredicate *_Nonnull filter; - [Export("filter", ArgumentSemantic.Strong)] - NSPredicate Filter { get; set; } - - // @property (nonatomic, weak, readwrite) id _Nullable delegate; - [NullAllowed, Export("delegate", ArgumentSemantic.Assign)] - NSObject WeakDelegate { get; set; } - - [Wrap("WeakDelegate")] - [NullAllowed] - IUAMessageCenterListViewDelegate Delegate { get; set; } - - // @property (nonatomic, strong, readwrite, nullable) NSIndexPath *selectedIndexPath; - [NullAllowed, Export("selectedIndexPath", ArgumentSemantic.Strong)] - NSIndexPath SelectedIndexPath { get; set; } - - // @property (nonatomic, copy, readwrite, nullable) NSString *selectedMessageID; - [NullAllowed, Export("selectedMessageID")] - string SelectedMessageID { get; set; } - } - - // @interface UADefaultMessageCenterMessageViewController : UIViewController - [BaseType(typeof(UIViewController))] - interface UADefaultMessageCenterMessageViewController - { - // @property (nonatomic, weak, readwrite, nullable) id delegate; - [NullAllowed, Export("delegate", ArgumentSemantic.Assign)] - NSObject WeakDelegate { get; set; } - - [Wrap("WeakDelegate")] - [NullAllowed] - IUAMessageCenterMessageViewDelegate Delegate { get; set; } - - // @property (nonatomic, readonly, nullable) UAInboxMessage *message; - [NullAllowed, Export("message")] - UAInboxMessage Message { get; } - - // @property (nonatomic, assign, unsafe_unretained, readwrite) BOOL disableMessageLinkPreviewAndCallouts; - [Export("disableMessageLinkPreviewAndCallouts")] - bool DisableMessageLinkPreviewAndCallouts { get; set; } - - // - (void)loadMessageForID:(nullable NSString *)messageID; - [Export("loadMessageForID:")] - void LoadMessage ([NullAllowed] string messageID); - - // - (void)clearMessage; - [Export("clearMessage")] - void ClearMessage (); - } - - // @interface UADefaultMessageCenterSplitViewController : UISplitViewController - [BaseType(typeof(UISplitViewController))] - interface UADefaultMessageCenterSplitViewController : IUAMessageCenterListViewDelegate, IUAMessageCenterMessageViewDelegate - { - // @property (nonatomic, strong, readwrite) NSPredicate *_Nonnull filter; - [Export("filter", ArgumentSemantic.Strong)] - NSPredicate Filter { get; set; } - - // @property (nonatomic, strong, readwrite) UAMessageCenterStyle *_Nonnull messageCenterStyle; - [Export("messageCenterStyle", ArgumentSemantic.Strong)] - UAMessageCenterStyle MessageCenterStyle { get; set; } - - // @property (nonatomic, readonly) UADefaultMessageCenterListViewController *_Nonnull listViewController; - [Export("listViewController")] - UADefaultMessageCenterListViewController ListViewController { get; } - - // @property (nonatomic, readonly) UADefaultMessageCenterMessageViewController *_Nonnull messageViewController; - [Export("messageViewController")] - UADefaultMessageCenterMessageViewController MessageViewController { get; } - - // @property (nonatomic, assign, unsafe_unretained, readwrite) BOOL disableMessageLinkPreviewAndCallouts; - [Export("disableMessageLinkPreviewAndCallouts")] - bool DisableMessageLinkPreviewAndCallouts { get; set; } - - // - (void)displayMessageForID:(nonnull NSString *)messageID; - [Export("displayMessageForID:")] - void DisplayMessage (string messageID); - } - - // @interface UADefaultMessageCenterSplitViewDelegate : NSObject + // @interface UAMessageCenter + [DisableDefaultCtor] [BaseType(typeof(NSObject))] - interface UADefaultMessageCenterSplitViewDelegate : IUISplitViewControllerDelegate + interface UAMessageCenter { - // - (instancetype)initWithListViewController:(UADefaultMessageCenterListViewController *)listViewController; - [Export("initWithListViewController:")] - IntPtr Constructor (UADefaultMessageCenterListViewController listViewController); - } - - // @interface UADefaultMessageCenterUI : NSObject - [BaseType(typeof(NSObject))] - interface UADefaultMessageCenterUI : IUAMessageCenterDisplayDelegate - { - // @property (nonatomic, copy, readwrite) NSString *_Nonnull title; - [Export("title")] - string Title { get; set; } - - // @property (nonatomic, strong, readwrite) UAMessageCenterStyle *_Nonnull messageCenterStyle; - [Export("messageCenterStyle", ArgumentSemantic.Strong)] - UAMessageCenterStyle MessageCenterStyle { get; set; } - - // @property (nonatomic, strong, readwrite) NSPredicate *_Nonnull filter; - [Export("filter", ArgumentSemantic.Strong)] - NSPredicate Filter { get; set; } - - // @property (nonatomic, assign, unsafe_unretained, readwrite) BOOL disableMessageLinkPreviewAndCallouts; - [Export("disableMessageLinkPreviewAndCallouts")] - bool DisableMessageLinkPreviewAndCallouts { get; set; } - } - - // typedef void (^UAInboxMessageCallbackBlock)(UAInboxMessage *message) - delegate void UAInboxMessageCallbackBlock (UAInboxMessage arg0); - - // @interface UAInboxMessage : NSObject - [BaseType(typeof(NSObject))] - interface UAInboxMessage - { - // @property (nonatomic, readonly) NSString *_Nonnull messageID; - [Export("messageID")] - string MessageID { get; } - - // @property (nonatomic, readonly) NSURL *_Nonnull messageBodyURL; - [Export("messageBodyURL")] - NSUrl MessageBodyURL { get; } - - // @property (nonatomic, readonly) NSURL *_Nonnull messageURL; - [Export("messageURL")] - NSUrl MessageURL { get; } - - // @property (nonatomic, readonly) NSString *_Nonnull contentType; - [Export("contentType")] - string ContentType { get; } - - // @property (nonatomic, readonly) BOOL unread; - [Export("unread")] - bool Unread { get; } + [Wrap("WeakDisplayDelegate")] + [NullAllowed] + IUAMessageCenterDisplayDelegate DisplayDelegate { get; set; } - // @property (nonatomic, readonly) BOOL deleted; - [Export("deleted")] - bool Deleted { get; } + // @property (nonatomic, weak, readwrite) id _Nullable displayDelegate; + [NullAllowed, Export("displayDelegate", ArgumentSemantic.Assign)] + NSObject WeakDisplayDelegate { get; set; } - // @property (nonatomic, readonly) NSDate *_Nonnull messageSent; - [Export("messageSent")] - NSDate MessageSent { get; } + // @property (nonatomic, strong) UAMessageCenterInbox * _Nonnull inbox; + [Export("inbox", ArgumentSemantic.Strong)] + UAMessageCenterInbox Inbox { get; set; } - // @property (nonatomic, readonly, nullable) NSDate *messageExpiration; - [NullAllowed, Export("messageExpiration")] - NSDate MessageExpiration { get; } + // -(void)setThemeFromPlist:(NSString * _Nonnull)plist error:(NSError * _Nonnull)error; + [Export("setThemeFromPlist:error:")] + void SetThemeFromPlist(string plist, NSError error); - // @property (nonatomic, readonly) NSString *_Nonnull title; - [Export("title")] - string Title { get; } - - // @property (nonatomic, readonly) NSDictionary *_Nonnull extra; - [Export("extra")] - NSDictionary Extra { get; } - - // @property (nonatomic, readonly) NSDictionary *_Nonnull rawMessageObject; - [Export("rawMessageObject")] - NSDictionary RawMessageObject { get; } + // @property (class, nonatomic, readonly, null_unspecified) UAMessageCenter *shared; + [Static] + [Export("shared")] + UAMessageCenter Shared { get; } - // @property (nonatomic, weak, readonly) UAInboxMessageList *_Nullable messageList; - [NullAllowed, Export("messageList")] - UAInboxMessageList MessageList { get; } + // -(void)display; + [Export("display")] + void Display(); - // - (nullable UADisposable *)markMessageReadWithCompletionHandler: (nullable UAInboxMessageCallbackBlock)completionHandler; - [Export("markMessageReadWithCompletionHandler:")] - [return: NullAllowed] - UADisposable MarkMessageRead ([NullAllowed] UAInboxMessageCallbackBlock completionHandler); + // -(void)displayWithMessageID:(NSString * _Nonnull)messageID; + [Export("displayWithMessageID:")] + void DisplayMessage(string messageID); - // - (BOOL)isExpired; - [Export("isExpired")] - bool IsExpired (); + // -(void)dismiss; + [Export("dismiss")] + void Dismiss(); } - // typedef void (^UAInboxMessageListCallbackBlock)(void) - delegate void UAInboxMessageListCallbackBlock (); - - // @interface UAInboxMessageList : NSObject + // @interface UAMessageCenterController [BaseType(typeof(NSObject))] - interface UAInboxMessageList + interface UAMessageCenterController { - // @property (nonatomic, copy, readonly) NSArray *_Nonnull messages; - [Export("messages", ArgumentSemantic.Copy)] - UAInboxMessage[] Messages { get; } - - // @property (atomic, assign, unsafe_unretained, readwrite) NSInteger unreadCount; - [Export("unreadCount", ArgumentSemantic.Assign)] - nint UnreadCount { get; set; } - - // @property (atomic, readonly) BOOL isRetrieving; - [Export("isRetrieving")] - bool IsRetrieving { get; } - - // @property (atomic, readonly) BOOL isBatchUpdating; - [Export("isBatchUpdating")] - bool IsBatchUpdating { get; } - - // - (nullable UADisposable *) retrieveMessageListWithSuccessBlock: (nullable UAInboxMessageListCallbackBlock)successBlock withFailureBlock: (nullable UAInboxMessageListCallbackBlock) failureBlock; - [Export("retrieveMessageListWithSuccessBlock:withFailureBlock:")] - [return: NullAllowed] - UADisposable RetrieveMessageList ([NullAllowed] UAInboxMessageListCallbackBlock successBlock, [NullAllowed] UAInboxMessageListCallbackBlock failureBlock); - - // - (nullable UADisposable *)markMessagesRead:(nonnull NSArray *)messages completionHandler: (nullable UAInboxMessageListCallbackBlock) completionHandler; - [Export("markMessagesRead:completionHandler:")] - [return: NullAllowed] - UADisposable MarkMessagesRead (NSObject[] messages, [NullAllowed] UAInboxMessageListCallbackBlock completionHandler); - - // - (nullable UADisposable *)markMessagesDeleted:(nonnull NSArray *)messages completionHandler: (nullable UAInboxMessageListCallbackBlock) completionHandler; - [Export("markMessagesDeleted:completionHandler:")] - [return: NullAllowed] - UADisposable MarkMessagesDeleted (NSObject[] messages, [NullAllowed] UAInboxMessageListCallbackBlock completionHandler); - - // - (nonnull NSArray *)messagesFilteredUsingPredicate: (nonnull NSPredicate *)predicate; - [Export("messagesFilteredUsingPredicate:")] - UAInboxMessage[] MessagesFilteredUsingPredicate (NSPredicate predicate); - - // - (NSUInteger)messageCount; - [Export("messageCount")] - nuint MessageCount (); - - // - (nullable UAInboxMessage *)messageForBodyURL:(nonnull NSURL *)url; - [Export("messageForBodyURL:")] - [return: NullAllowed] - UAInboxMessage Message (NSUrl url); - - // - (nullable UAInboxMessage *)messageForID:(nonnull NSString *)messageID; - [Export("messageForID:")] - [return: NullAllowed] - UAInboxMessage Message (string messageID); + // -(void)navigateWithMessageID:(NSString * _Nullable)messageID; + [Export("navigateWithMessageID:")] + void NavigateWithMessageID([NullAllowed] string messageID); } - // @interface UAInboxUtils : NSObject - [BaseType(typeof(NSObject))] - interface UAInboxUtils - { - // + (nullable NSString *)inboxMessageIDFromNotification: (nonnull NSDictionary *)notification; - [Static] - [Export("inboxMessageIDFromNotification:")] - [return: NullAllowed] - string InboxMessageID (NSDictionary notification); - - // + (nullable NSString *)inboxMessageIDFromValue:(nonnull id)values; - [Static] - [Export("inboxMessageIDFromValue:")] - [return: NullAllowed] - string InboxMessageID (NSObject values); - // + (nonnull NSString *)userAuthHeaderString:(nonnull UAUserData *)userData; - [Static] - [Export("userAuthHeaderString:")] - string UserAuthHeaderString (UAUserData userData); - } - - // @protocol UAMessageCenterDisplayDelegate + // @protocol UAMessageCenterDisplayDelegate [Protocol, Model] [BaseType(typeof(NSObject))] interface UAMessageCenterDisplayDelegate { - // - (void)displayMessageCenterForMessageID:(nonnull NSString *)messageID animated:(BOOL)animated; + // @required -(void)displayMessageCenterForMessageID:(NSString * _Nonnull)messageID; [Abstract] - [Export("displayMessageCenterForMessageID:animated:")] - void DisplayMessageCenter (string messageID, bool animated); + [Export("displayMessageCenterForMessageID:")] + void OnDisplayMessageCenter(string messageID); - // - (void)displayMessageCenterAnimated:(BOOL)animated; + // @required -(void)displayMessageCenter; [Abstract] - [Export("displayMessageCenterAnimated:")] - void DisplayMessageCenterAnimated (bool animated); + [Export("displayMessageCenter")] + void OnDisplayMessageCenter(); - // - (void)dismissMessageCenterAnimated:(BOOL)animated; + // @required -(void)dismissMessageCenter; [Abstract] - [Export("dismissMessageCenterAnimated:")] - void DismissMessageCenterAnimated (bool animated); + [Export("dismissMessageCenter")] + void OnDismissMessageCenter(); } interface IUAMessageCenterDisplayDelegate { } - // @interface UAMessageCenter : NSObject + // @interface UAMessageCenterInbox + [DisableDefaultCtor] [BaseType(typeof(NSObject))] - interface UAMessageCenter : IUAComponent + interface UAMessageCenterInbox { - // @property (nonatomic, weak, readwrite) id _Nullable displayDelegate; - [NullAllowed, Export("displayDelegate", ArgumentSemantic.Assign)] - NSObject WeakDisplayDelegate { get; set; } + // -(void)getMessagesWithCompletionHandler:(void (^ _Nonnull)(int))completionHandler; + [Export("getMessagesWithCompletionHandler:")] + void GetMessages(Action completionHandler); - [Wrap("WeakDisplayDelegate")] - [NullAllowed] - IUAMessageCenterDisplayDelegate DisplayDelegate { get; set; } - - // @property (nonatomic, readonly) UADefaultMessageCenterUI *_Nonnull defaultUI; - [Export("defaultUI")] - UADefaultMessageCenterUI DefaultUI { get; } - - // @property (nonatomic, readonly) UAInboxMessageList *_Nonnull messageList; - [Export("messageList")] - UAInboxMessageList MessageList { get; } - - // @property (nonatomic, readonly) UAUser *_Nonnull user; - [Export("user")] - UAUser User { get; } - - // @property (class, nonatomic, readonly, null_unspecified) UAMessageCenter *shared; - [Static] - [Export("shared")] - UAMessageCenter Shared { get; } - - // - (void)display:(BOOL)animated; - [Export("display:")] - void Display (bool animated); - - // - (void)display; - [Export("display")] - void Display (); - - // - (void)displayMessageForID:(nonnull NSString *)messageID animated:(BOOL)animated; - [Export("displayMessageForID:animated:")] - void DisplayMessage (string messageID, bool animated); - - // - (void)displayMessageForID:(nonnull NSString *)messageID; - [Export("displayMessageForID:")] - void DisplayMessage (string messageID); - - // - (void)dismiss:(BOOL)animated; - [Export("dismiss:")] - void Dismiss (bool animated); - - // - (void)dismiss; - [Export("dismiss")] - void Dismiss (); - } + // -(void)getUserWithCompletionHandler:(void (^ _Nonnull)(UAMessageCenterUser * _Nullable))completionHandler; + [Export("getUserWithCompletionHandler:")] + void GetUser(Action completionHandler); - // @interface UAMessageCenterAction : NSObject - [BaseType(typeof(NSObject))] - interface UAMessageCenterAction : IUAAction - { - } + // -(void)getUnreadCountWithCompletionHandler:(id)completionHandler; + [Export("getUnreadCountWithCompletionHandler:")] + void GetUnreadCount(Action completionHandler); - // @interface UAMessageCenterDateUtils : NSObject - [BaseType(typeof(NSObject))] - interface UAMessageCenterDateUtils - { - // + (NSString *)formattedDateRelativeToNow:(NSDate *)date; - [Static] - [Export("formattedDateRelativeToNow:")] - string FormattedDateRelativeToNow (NSDate date); - } + // -(void)refreshMessagesWithCompletionHandler:(Bool)completionHandler; + [Export("refreshMessagesWithCompletionHandler:")] + void RefreshMessages(Action completionHandler); - // @interface UAMessageCenterListCell : UITableViewCell - [BaseType(typeof(UITableViewCell))] - interface UAMessageCenterListCell - { - // @property (nonatomic, strong, readwrite) UAMessageCenterStyle *messageCenterStyle; - [Export("messageCenterStyle", ArgumentSemantic.Strong)] - UAMessageCenterStyle MessageCenterStyle { get; set; } + // -(void)markReadWithMessages:(nonnull NSArray *)messages completionHandler:(void (^ _Nonnull)(void))completionHandler; + [Export("markReadWithMessages:completionHandler:")] + void MarkReadWithMessages(UAMessageCenterMessage[] messages, Action completionHandler); - // @property (nonatomic, weak, readwrite) UILabel *date; - [Export("date")] - UILabel Date { get; set; } + // -(void)markReadWithMessageIDs:(nonnull NSArray *)messageIDs completionHandler:(void (^ _Nonnull)(void))completionHandler; + [Export("markReadWithMessageIDs:completionHandler:")] + void MarkReadWithMessageIDs(string[] messageIDs, Action completionHandler); - // @property (nonatomic, weak, readwrite) UILabel *title; - [Export("title")] - UILabel Title { get; set; } + // -(void)deleteWithMessages:(nonnull NSArray *)messages completionHandler:(void (^ _Nonnull)(void))completionHandler; + [Export("deleteWithMessages:completionHandler:")] + void DeleteWithMessages(UAMessageCenterMessage[] messages, Action completionHandler); - // @property (nonatomic, weak, readwrite) UIView *unreadIndicator; - [Export("unreadIndicator")] - UIView UnreadIndicator { get; set; } + // -(void)deleteWithMessageIDs:(nonnull NSArray *)messageIDs completionHandler:(void (^ _Nonnull)(void))completionHandler; + [Export("deleteWithMessageIDs:completionHandler:")] + void DeleteWithMessageIDs(string[] messageIDs, Action completionHandler); - // @property (nonatomic, weak, readwrite) UIImageView *listIconView; - [Export("listIconView")] - UIImageView ListIconView { get; set; } + // -(void)messageForBodyURL:(NSURL * _Nonnull)bodyURL completionHandler:(void (^ _Nonnull)(UAMessageCenterMessage * _Nullable))completionHandler; + [Export("messageForBodyURL:completionHandler:")] + void MessageForBodyURL(NSUrl bodyURL, Action completionHandler); - // - (void)setData:(UAInboxMessage *)message; - [Export("setData:")] - void SetData (UAInboxMessage message); + // -(void)messageForID:(NSString * _Nonnull)messageID completionHandler:(void (^ _Nonnull)(UAMessageCenterMessage * _Nullable))completionHandler; + [Export("messageForID:completionHandler:")] + void MessageForID(string messageID, Action completionHandler); } - // @protocol UAMessageCenterListViewDelegate + // @protocol UAMessageCenterInboxBaseProtocol [Protocol, Model] [BaseType(typeof(NSObject))] - interface UAMessageCenterListViewDelegate + interface UAMessageCenterInboxBaseProtocol { - // - (BOOL)shouldClearSelectionOnViewWillAppear; - [Export("shouldClearSelectionOnViewWillAppear")] - NSObject ShouldClearSelectionOnViewWillAppear(); + // @required -(void)getMessagesWithCompletionHandler:(void (^ _Nonnull)(int))completionHandler; + [Abstract] + [Export("getMessagesWithCompletionHandler:")] + void GetMessages(Action completionHandler); - // - (void)didSelectMessageWithID:(nullable NSString *)messageID; - [Export("didSelectMessageWithID:")] - void DidSelectMessage(NSObject messageID); - } + // @required -(void)getUserWithCompletionHandler:(void (^ _Nonnull)(UAMessageCenterUser * _Nullable))completionHandler; + [Abstract] + [Export("getUserWithCompletionHandler:")] + void GetUser(Action completionHandler); - interface IUAMessageCenterListViewDelegate { } + // @required -(void)getUnreadCountWithCompletionHandler:(id)completionHandler; + [Abstract] + [Export("getUnreadCountWithCompletionHandler:")] + void GetUnreadCount(Action completionHandler); - // @protocol UAMessageCenterMessageViewDelegate - [Protocol, Model] - [BaseType(typeof(NSObject))] - interface UAMessageCenterMessageViewDelegate - { - // - (void)messageLoadStarted:(nonnull NSString *)messageID; + // @required -(void)refreshMessagesWithCompletionHandler:(Bool)completionHandler; [Abstract] - [Export("messageLoadStarted:")] - void MessageLoadStarted (string messageID); + [Export("refreshMessagesWithCompletionHandler:")] + void RefreshMessages(Action completionHandler); - // - (void)messageLoadSucceeded:(nonnull NSString *)messageID; + // @required -(void)markReadWithMessages:(nonnull NSArray *)messages completionHandler:(void (^ _Nonnull)(void))completionHandler; [Abstract] - [Export("messageLoadSucceeded:")] - void MessageLoadSucceeded (string messageID); + [Export("markReadWithMessages:completionHandler:")] + void MarkRead(UAMessageCenterMessage[] messages, Action completionHandler); - // - (void)messageLoadFailed:(nonnull NSString *)messageID error:(nonnull NSError *)error; + // @required -(void)markReadWithMessageIDs:(nonnull NSArray *)messageIDs completionHandler:(void (^ _Nonnull)(void))completionHandler; [Abstract] - [Export("messageLoadFailed:error:")] - void MessageLoadFailed (string messageID, NSError error); + [Export("markReadWithMessageIDs:completionHandler:")] + void MarkRead(string[] messageIDs, Action completionHandler); - // - (void)messageClosed:(nonnull NSString *)messageID; + // @required -(void)deleteWithMessages:(nonnull NSArray *)messages completionHandler:(void (^ _Nonnull)(void))completionHandler; [Abstract] - [Export("messageClosed:")] - void MessageClosed (string messageID); - } + [Export("deleteWithMessages:completionHandler:")] + void Delete(UAMessageCenterMessage[] messages, Action completionHandler); - interface IUAMessageCenterMessageViewDelegate { } + // @required -(void)deleteWithMessageIDs:(nonnull NSArray *)messageIDs completionHandler:(void (^ _Nonnull)(void))completionHandler; + [Abstract] + [Export("deleteWithMessageIDs:completionHandler:")] + void Delete(string[] messageIDs, Action completionHandler); - // @interface UAMessageCenterNativeBridgeExtension : NSObject - [BaseType(typeof(NSObject))] - interface UAMessageCenterNativeBridgeExtension : IUANativeBridgeExtensionDelegate - { - } + // @required -(void)messageForBodyURL:(NSURL * _Nonnull)bodyURL completionHandler:(void (^ _Nonnull)(UAMessageCenterMessage * _Nullable))completionHandler; + [Abstract] + [Export("messageForBodyURL:completionHandler:")] + void MessageForBodyURL(NSUrl bodyURL, Action completionHandler); - // @interface UAMessageCenterResources : NSObject - [BaseType(typeof(NSObject))] - interface UAMessageCenterResources - { - // + (nonnull NSBundle *)bundle; - [Static] - [Export("bundle")] - NSBundle Bundle (); + // @required -(void)messageForID:(NSString * _Nonnull)messageID completionHandler:(void (^ _Nonnull)(UAMessageCenterMessage * _Nullable))completionHandler; + [Abstract] + [Export("messageForID:completionHandler:")] + void MessageForID(string messageID, Action completionHandler); } - // @interface UAMessageCenterStyle : NSObject + // @interface UAMessageCenterMessage + [DisableDefaultCtor] [BaseType(typeof(NSObject))] - interface UAMessageCenterStyle + interface UAMessageCenterMessage { - // @property (nonatomic, strong, readwrite) UIFont *titleFont; - [Export("titleFont", ArgumentSemantic.Strong)] - UIFont TitleFont { get; set; } - - // @property (nonatomic, strong, readwrite) UIColor *titleColor; - [Export("titleColor", ArgumentSemantic.Strong)] - UIColor TitleColor { get; set; } - - // @property (nonatomic, strong, readwrite) UIColor *tintColor; - [Export("tintColor", ArgumentSemantic.Strong)] - UIColor TintColor { get; set; } - - // @property (nonatomic, strong, readwrite) UIColor *navigationBarColor; - [Export("navigationBarColor", ArgumentSemantic.Strong)] - UIColor NavigationBarColor { get; set; } - - // @property (nonatomic, assign, unsafe_unretained, readwrite) BOOL navigationBarOpaque; - [Export("navigationBarOpaque")] - bool NavigationBarOpaque { get; set; } - - // @property (nonatomic, assign, unsafe_unretained, readwrite) UANavigationBarStyle navigationBarStyle; - [Export("navigationBarStyle", ArgumentSemantic.Assign)] - UANavigationBarStyle NavigationBarStyle { get; set; } - - // @property (nonatomic, strong, readwrite) UIColor *listColor; - [Export("listColor", ArgumentSemantic.Strong)] - UIColor ListColor { get; set; } - - // @property (nonatomic, strong, readwrite) UIColor *refreshTintColor; - [Export("refreshTintColor", ArgumentSemantic.Strong)] - UIColor RefreshTintColor { get; set; } - - // @property (nonatomic, assign, unsafe_unretained, readwrite) BOOL iconsEnabled; - [Export("iconsEnabled")] - bool IconsEnabled { get; set; } - - // @property (nonatomic, strong, readwrite) UIImage *placeholderIcon; - [Export("placeholderIcon", ArgumentSemantic.Strong)] - UIImage PlaceholderIcon { get; set; } - - // @property (nonatomic, strong, readwrite) UIFont *cellTitleFont; - [Export("cellTitleFont", ArgumentSemantic.Strong)] - UIFont CellTitleFont { get; set; } - - // @property (nonatomic, strong, readwrite) UIFont *cellDateFont; - [Export("cellDateFont", ArgumentSemantic.Strong)] - UIFont CellDateFont { get; set; } - - // @property (nonatomic, strong, readwrite) UIColor *cellColor; - [Export("cellColor", ArgumentSemantic.Strong)] - UIColor CellColor { get; set; } - - // @property (nonatomic, strong, readwrite) UIColor *cellHighlightedColor; - [Export("cellHighlightedColor", ArgumentSemantic.Strong)] - UIColor CellHighlightedColor { get; set; } - - // @property (nonatomic, strong, readwrite) UIColor *cellTitleColor; - [Export("cellTitleColor", ArgumentSemantic.Strong)] - UIColor CellTitleColor { get; set; } - - // @property (nonatomic, strong, readwrite) UIColor *cellTitleHighlightedColor; - [Export("cellTitleHighlightedColor", ArgumentSemantic.Strong)] - UIColor CellTitleHighlightedColor { get; set; } - - // @property (nonatomic, strong, readwrite) UIColor *cellDateColor; - [Export("cellDateColor", ArgumentSemantic.Strong)] - UIColor CellDateColor { get; set; } - - // @property (nonatomic, strong, readwrite) UIColor *cellDateHighlightedColor; - [Export("cellDateHighlightedColor", ArgumentSemantic.Strong)] - UIColor CellDateHighlightedColor { get; set; } - - // @property (nonatomic, strong, readwrite) UIColor *cellSeparatorColor; - [Export("cellSeparatorColor", ArgumentSemantic.Strong)] - UIColor CellSeparatorColor { get; set; } - - // @property (nonatomic, assign, unsafe_unretained, readwrite) UIEdgeInsets cellSeparatorInset; - [Export("cellSeparatorInset", ArgumentSemantic.Assign)] - UIEdgeInsets CellSeparatorInset { get; set; } - - // @property (nonatomic, assign, unsafe_unretained, readwrite) UITableViewCellSeparatorStyle cellSeparatorStyle; - [Export("cellSeparatorStyle", ArgumentSemantic.Assign)] - UITableViewCellSeparatorStyle CellSeparatorStyle { get; set; } - - // @property (nonatomic, strong, readwrite) UIColor *cellTintColor; - [Export("cellTintColor", ArgumentSemantic.Strong)] - UIColor CellTintColor { get; set; } + // @property (readonly, copy, nonatomic) NSString * _Nonnull title; + [Export("title")] + string Title { get; } - // @property (nonatomic, strong, readwrite) UIColor *unreadIndicatorColor; - [Export("unreadIndicatorColor", ArgumentSemantic.Strong)] - UIColor UnreadIndicatorColor { get; set; } + // @property (readonly, copy, nonatomic) NSString * _Nonnull id; + [Export("id")] + string Id { get; } - // @property (nonatomic, strong, readwrite) UIColor *selectAllButtonTitleColor; - [Export("selectAllButtonTitleColor", ArgumentSemantic.Strong)] - UIColor SelectAllButtonTitleColor { get; set; } + // @property (nonatomic, readonly) NSDictionary *_Nonnull extra; + [Export("extra")] + NSDictionary Extra { get; } - // @property (nonatomic, strong, readwrite) UIColor *deleteButtonTitleColor; - [Export("deleteButtonTitleColor", ArgumentSemantic.Strong)] - UIColor DeleteButtonTitleColor { get; set; } + // @property (readonly, copy, nonatomic) NSURL * _Nonnull bodyURL; + [Export("bodyURL", ArgumentSemantic.Copy)] + NSUrl BodyURL { get; } - // @property (nonatomic, strong, readwrite) UIColor *markAsReadButtonTitleColor; - [Export("markAsReadButtonTitleColor", ArgumentSemantic.Strong)] - UIColor MarkAsReadButtonTitleColor { get; set; } + // @property (readonly, copy, nonatomic) NSDate * _Nullable expirationDate; + [NullAllowed, Export("expirationDate", ArgumentSemantic.Copy)] + NSDate ExpirationDate { get; } - // @property (nonatomic, strong, readwrite) UIColor *editButtonTitleColor; - [Export("editButtonTitleColor", ArgumentSemantic.Strong)] - UIColor EditButtonTitleColor { get; set; } + // @property (readonly, copy, nonatomic) NSDate * _Nonnull sentDate; + [Export("sentDate", ArgumentSemantic.Copy)] + NSDate SentDate { get; } - // @property (nonatomic, strong, readwrite) UIColor *cancelButtonTitleColor; - [Export("cancelButtonTitleColor", ArgumentSemantic.Strong)] - UIColor CancelButtonTitleColor { get; set; } + // @property (readonly, nonatomic) Bool unread; + [Export("unread")] + bool Unread { get; } - // + (instancetype)style; - [Static] - [Export("style")] - UAMessageCenterStyle Style (); + // @property (readonly, copy, nonatomic) NSString * _Nullable listIcon; + [NullAllowed, Export("listIcon")] + string ListIcon { get; } - // + (instancetype)styleWithContentsOfFile:(NSString *)path; - [Static] - [Export("styleWithContentsOfFile:")] - UAMessageCenterStyle Style (string path); + // @property (readonly, nonatomic) Bool isExpired; + [Export("isExpired")] + bool IsExpired { get; } } - // @interface UAUser : NSObject + // @interface UAMessageCenterNativeBridgeExtension : NSObject + [DisableDefaultCtor] [BaseType(typeof(NSObject))] - interface UAUser + interface UAMessageCenterNativeBridgeExtension : IUANativeBridgeExtensionDelegate { - // - (void)getUserData:(nonnull void (^)(UAUserData *_Nonnull))completionHandler queue:(nullable dispatch_queue_t)queue; - [Export("getUserData:queue:")] - void GetUserData (Action completionHandler, [NullAllowed] DispatchQueue queue); - - // - (void)getUserData:(nonnull void (^)(UAUserData *_Nonnull))completionHandler; - [Export("getUserData:")] - void GetUserData(Action completionHandler); - - // - (nullable UAUserData *)getUserDataSync; - [Export("getUserDataSync")] - [return: NullAllowed] - UAUserData GetUserDataSync (); + // -(instancetype _Nonnull)initWithMessage:(UAMessageCenterMessage * _Nonnull)message user:(UAMessageCenterUser * _Nonnull)user __attribute__((objc_designated_initializer)); + [Export("initWithMessage:user:")] + [DesignatedInitializer] + IntPtr Constructor(UAMessageCenterMessage message, UAMessageCenterUser user); } - // @interface UAUserData : NSObject + // @interface UAMessageCenterUser + [DisableDefaultCtor] [BaseType(typeof(NSObject))] - interface UAUserData + interface UAMessageCenterUser { - // @property (nonatomic, copy, readonly) NSString *_Nonnull username; + // @property (readonly, copy, nonatomic) NSString * _Nonnull password; + [Export("password")] + string Password { get; } + + // @property (readonly, copy, nonatomic) NSString * _Nonnull username; [Export("username")] string Username { get; } + } - // @property (nonatomic, copy, readonly) NSString *_Nonnull password; - [Export("password")] - string Password { get; } + // @interface UAMessageCenterViewController + [BaseType(typeof(NSObject))] + interface UAMessageCenterViewController + { + // +(UIViewController * _Nullable)makeWithThemePlist:(NSString * _Nullable)themePlist controller:(UAMessageCenterController * _Nonnull)controller error:(NSError * _Nonnull)error dismissAction:(void (^ _Nullable)(void))dismissAction __attribute__((warn_unused_result(""))); + [Static] + [Export("makeWithThemePlist:controller:error:dismissAction:")] + [return: NullAllowed] + UIViewController MakeWithThemePlist([NullAllowed] string themePlist, UAMessageCenterController controller, NSError error, [NullAllowed] Action dismissAction); } } diff --git a/src/AirshipBindings.iOS.MessageCenter/StructsAndEnums.cs b/src/AirshipBindings.iOS.MessageCenter/StructsAndEnums.cs index 266704d1..d3a82015 100644 --- a/src/AirshipBindings.iOS.MessageCenter/StructsAndEnums.cs +++ b/src/AirshipBindings.iOS.MessageCenter/StructsAndEnums.cs @@ -5,20 +5,7 @@ Copyright Airship and Contributors using System; using UIKit; -namespace UrbanAirship { +namespace UrbanAirship +{ - [Native] - public enum UAMessageCenterMessageLoadErrorCode : long - { - ListUnavailable = 0, - FailureStatus = 1, - MessageExpired = 2 - } - - [Native] - public enum UANavigationBarStyle : ulong - { - Default = 0, - Black = 1 - } } diff --git a/src/AirshipBindings.iOS.PreferenceCenter/ApiDefinitions.cs b/src/AirshipBindings.iOS.PreferenceCenter/ApiDefinitions.cs index f3e0c134..42cff738 100644 --- a/src/AirshipBindings.iOS.PreferenceCenter/ApiDefinitions.cs +++ b/src/AirshipBindings.iOS.PreferenceCenter/ApiDefinitions.cs @@ -8,614 +8,364 @@ Copyright Airship and Contributors namespace UrbanAirship { + // @interface UAPreferenceCenter + [DisableDefaultCtor] + [BaseType(typeof(NSObject))] + interface UAPreferenceCenter + { + // @property (readonly, nonatomic, strong, class) UAPreferenceCenter * _Nonnull shared; + [Static] + [Export("shared", ArgumentSemantic.Strong)] + UAPreferenceCenter Shared { get; } + + [Wrap("WeakOpenDelegate")] + [NullAllowed] + UAPreferenceCenterOpenDelegate OpenDelegate { get; set; } + + // @property (nonatomic, weak) id _Nullable openDelegate; + [NullAllowed, Export("openDelegate", ArgumentSemantic.Weak)] + NSObject WeakOpenDelegate { get; set; } + + // -(void)setThemeFromPlist:(NSString * _Nonnull)plist error:(NSError * _Nonnull)error; + [Export("setThemeFromPlist:error:")] + void SetThemeFromPlist(string plist, NSError error); + + // @property (getter = isComponentEnabled, nonatomic) BOOL componentEnabled; + [Export("componentEnabled")] + bool ComponentEnabled { [Bind("isComponentEnabled")] get; set; } + + // -(void)openPreferenceCenter:(NSString * _Nonnull)preferenceCenterID; + [Export("openPreferenceCenter:")] + void OpenPreferenceCenter(string preferenceCenterID); + + // -(void)configWithPreferenceCenterID:(NSString * _Nonnull)preferenceCenterID completionHandler:(void (^ _Nonnull)(UAPreferenceCenterConfig * _Nullable))completionHandler; + [Export("configWithPreferenceCenterID:completionHandler:")] + unsafe void ConfigWithPreferenceCenterID(string preferenceCenterID, Action completionHandler); + + // -(void)jsonConfigWithPreferenceCenterID:(NSString * _Nonnull)preferenceCenterID completionHandler:(void (^ _Nonnull)(NSData * _Nullable))completionHandler; + [Export("jsonConfigWithPreferenceCenterID:completionHandler:")] + unsafe void JsonConfigWithPreferenceCenterID(string preferenceCenterID, Action completionHandler); + } - // @protocol UAPreferenceItem - [Protocol, Model] - [BaseType(typeof(NSObject))] - interface UAPreferenceItem - { - // @required @property (readonly, copy, nonatomic) NSString * _Nonnull type; - [Abstract] - [Export("type")] - string Type { get; } - - // @required @property (readonly, nonatomic) enum UAPreferenceItemType itemType; - [Abstract] - [Export("itemType")] - UAPreferenceItemType ItemType { get; } - - // @required @property (readonly, copy, nonatomic) NSString * _Nonnull identifier; - [Abstract] - [Export("identifier")] - string Identifier { get; } - - // @required @property (readonly, nonatomic, strong) UAPreferenceCommonDisplay * _Nullable display; - [Abstract] - [NullAllowed, Export("display", ArgumentSemantic.Strong)] - UAPreferenceCommonDisplay Display { get; } - - // @required @property (readonly, copy, nonatomic) NSArray> * _Nullable conditions; - [Abstract] - [NullAllowed, Export("conditions", ArgumentSemantic.Copy)] - IUAPreferenceConditions[] Conditions { get; } - } - - interface IUAPreferenceItem { }; - - // @interface UAPreferenceAlertItem : NSObject - [BaseType(typeof(NSObject))] - interface UAPreferenceAlertItem : IUAPreferenceItem - { - // @property (readonly, copy, nonatomic) NSString * _Nonnull type; - [Export("type")] - string Type { get; } - - // @property (readonly, nonatomic) enum UAPreferenceItemType itemType; - [Export("itemType")] - UAPreferenceItemType ItemType { get; } - - // @property (readonly, copy, nonatomic) NSString * _Nonnull identifier; - [Export("identifier")] - string Identifier { get; } - - // @property (readonly, nonatomic, strong) UAPreferenceCommonDisplay * _Nullable display; - [NullAllowed, Export("display", ArgumentSemantic.Strong)] - UAPreferenceCommonDisplay Display { get; } - - // @property (readonly, nonatomic, strong) UAPreferenceAlertItemButton * _Nullable button; - [NullAllowed, Export("button", ArgumentSemantic.Strong)] - UAPreferenceAlertItemButton Button { get; } + // @interface UAPreferenceCenterConfig + [DisableDefaultCtor] + [BaseType(typeof(NSObject))] + interface UAPreferenceCenterConfig + { + // @property (readonly, copy, nonatomic) NSString * _Nonnull identifier; + [Export("identifier")] + string Identifier { get; } + + // @property (readonly, nonatomic, strong) UAPreferenceConfigCommonDisplay * _Nullable display; + [NullAllowed, Export("display", ArgumentSemantic.Strong)] + UAPreferenceConfigCommonDisplay Display { get; } + + // @property (readonly, nonatomic, strong) UAPreferenceCenterConfigOptions * _Nullable options; + [NullAllowed, Export("options", ArgumentSemantic.Strong)] + UAPreferenceCenterConfigOptions Options { get; } + } + + // @interface UAPreferenceCenterConfigOptions + [DisableDefaultCtor] + [BaseType(typeof(NSObject))] + interface UAPreferenceCenterConfigOptions + { + // @property (readonly, nonatomic) BOOL mergeChannelDataToContact; + [Export("mergeChannelDataToContact")] + bool MergeChannelDataToContact { get; } + + // -(instancetype _Nonnull)initWithMergeChannelDataToContact:(id)mergeChannelDataToContact __attribute__((objc_designated_initializer)); + [Export("initWithMergeChannelDataToContact:")] + [DesignatedInitializer] + IntPtr Constructor(NSObject mergeChannelDataToContact); + } + + // @interface UAPreferenceConfigCommonDisplay + [DisableDefaultCtor] + [BaseType(typeof(NSObject))] + interface UAPreferenceConfigCommonDisplay + { + // @property (readonly, copy, nonatomic) NSString * _Nullable title; + [NullAllowed, Export("title")] + string Title { get; } + + // @property (readonly, copy, nonatomic) NSString * _Nullable subtitle; + [NullAllowed, Export("subtitle")] + string Subtitle { get; } + } + + // @protocol UAPreferenceConfigCondition + [BaseType(typeof(NSObject))] + [Protocol, Model] + interface UAPreferenceConfigCondition + { + // @required @property (readonly, nonatomic) enum UAPreferenceCenterConfigConditionType type; + [Abstract] + [Export("type")] + UAPreferenceCenterConfigConditionType Type { get; } + } + + interface IUAPreferenceConfigCondition { }; + + // @interface UAPreferenceCenterConfigNotificationOptInCondition + [DisableDefaultCtor] + [BaseType(typeof(NSObject))] + interface UAPreferenceCenterConfigNotificationOptInCondition : IUAPreferenceConfigCondition + { + // @property (readonly, nonatomic) enum UAPreferenceCenterConfigConditionType type; + [Export("type")] + UAPreferenceCenterConfigConditionType Type { get; } + + // @property (readonly, nonatomic) enum UANotificationOptInConditionStatus optInStatus; + [Export("optInStatus")] + UANotificationOptInConditionStatus OptInStatus { get; } + } + + // @protocol UAPreferenceCenterConfigSection + [Protocol, Model] + [BaseType(typeof(NSObject))] + interface UAPreferenceCenterConfigSection + { + // @required @property (readonly, nonatomic) enum UAPreferenceCenterConfigSectionType type; + [Abstract] + [Export("type")] + UAPreferenceCenterConfigSectionType Type { get; } + + // @required @property (readonly, copy, nonatomic) NSString * _Nonnull identifier; + [Abstract] + [Export("identifier")] + string Identifier { get; } + } + + interface IUAPreferenceCenterConfigSection { }; + + // @interface UAPreferenceCenterConfigCommonSection + [DisableDefaultCtor] + [BaseType(typeof(NSObject))] + interface UAPreferenceCenterConfigCommonSection : IUAPreferenceCenterConfigSection + { + // @property (readonly, nonatomic) enum UAPreferenceCenterConfigSectionType type; + [Export("type")] + UAPreferenceCenterConfigSectionType Type { get; } + + // @property (readonly, copy, nonatomic) NSString * _Nonnull identifier; + [Export("identifier")] + string Identifier { get; } + + // @property (readonly, nonatomic, strong) UAPreferenceConfigCommonDisplay * _Nullable display; + [NullAllowed, Export("display", ArgumentSemantic.Strong)] + UAPreferenceConfigCommonDisplay Display { get; } + } + + // @interface UAPreferenceLabeledSectionBreak + [DisableDefaultCtor] + [BaseType(typeof(NSObject))] + interface UAPreferenceLabeledSectionBreak : IUAPreferenceCenterConfigSection + { + // @property (readonly, nonatomic) enum UAPreferenceCenterConfigSectionType type; + [Export("type")] + UAPreferenceCenterConfigSectionType Type { get; } + + // @property (readonly, copy, nonatomic) NSString * _Nonnull identifier; + [Export("identifier")] + string Identifier { get; } + + // @property (readonly, nonatomic, strong) UAPreferenceConfigCommonDisplay * _Nullable display; + [NullAllowed, Export("display", ArgumentSemantic.Strong)] + UAPreferenceConfigCommonDisplay Display { get; } + } + + // @protocol UAPreferenceCenterConfigItem + [Protocol, Model] + [BaseType(typeof(NSObject))] + interface UAPreferenceCenterConfigItem + { + // @required @property (readonly, nonatomic) enum UAPreferenceCenterConfigItemType type; + [Abstract] + [Export("type")] + UAPreferenceCenterConfigItemType Type { get; } + + // @required @property (readonly, copy, nonatomic) NSString * _Nonnull identifier; + [Abstract] + [Export("identifier")] + string Identifier { get; } + } + + interface IUAPreferenceCenterConfigItem { }; + + // @interface UAPreferenceCenterConfigChannelSubscription + [DisableDefaultCtor] + [BaseType(typeof(NSObject))] + interface UAPreferenceCenterConfigChannelSubscription : IUAPreferenceCenterConfigItem + { + // @property (readonly, nonatomic) enum UAPreferenceCenterConfigItemType type; + [Export("type")] + UAPreferenceCenterConfigItemType Type { get; } + + // @property (readonly, copy, nonatomic) NSString * _Nonnull identifier; + [Export("identifier")] + string Identifier { get; } - // @property (copy, nonatomic) NSArray> * _Nullable conditions; - [NullAllowed, Export("conditions", ArgumentSemantic.Copy)] - IUAPreferenceConditions[] Conditions { get; set; } - } + // @property (readonly, copy, nonatomic) NSString * _Nonnull subscriptionID; + [Export("subscriptionID")] + string SubscriptionID { get; } + + // @property (readonly, nonatomic, strong) UAPreferenceConfigCommonDisplay * _Nullable display; + [NullAllowed, Export("display", ArgumentSemantic.Strong)] + UAPreferenceConfigCommonDisplay Display { get; } + } - // @interface UAPreferenceAlertItemButton : NSObject - [Preserve(AllMembers = true)] + // @interface UAPreferenceCenterConfigContactSubscriptionGroup + [DisableDefaultCtor] [BaseType(typeof(NSObject))] - interface UAPreferenceAlertItemButton - { - // @property (readonly, copy, nonatomic) NSString * _Nonnull text; - [Export("text")] - string Text { get; } - - // @property (readonly, copy, nonatomic) NSString * _Nullable contentDescription; - [NullAllowed, Export("contentDescription")] - string ContentDescription { get; } - - // @property (readonly, nonatomic) id _Nullable actions; - [NullAllowed, Export("actions")] - NSObject Actions { get; } - } - - // @interface UAPreferenceChannelSubscriptionItem : NSObject - [BaseType(typeof(NSObject))] - interface UAPreferenceChannelSubscriptionItem : IUAPreferenceItem - { - // @property (readonly, copy, nonatomic) NSString * _Nonnull type; - [Export("type")] - string Type { get; } - - // @property (readonly, nonatomic) enum UAPreferenceItemType itemType; - [Export("itemType")] - UAPreferenceItemType ItemType { get; } - - // @property (readonly, copy, nonatomic) NSString * _Nonnull identifier; - [Export("identifier")] - string Identifier { get; } - - // @property (readonly, nonatomic, strong) UAPreferenceCommonDisplay * _Nullable display; - [NullAllowed, Export("display", ArgumentSemantic.Strong)] - UAPreferenceCommonDisplay Display { get; } - - // @property (readonly, copy, nonatomic) NSString * _Nonnull subscriptionID; - [Export("subscriptionID")] - string SubscriptionID { get; } - - // @property (copy, nonatomic) NSArray> * _Nullable conditions; - [NullAllowed, Export("conditions", ArgumentSemantic.Copy)] - IUAPreferenceConditions[] Conditions { get; set; } - } - - // @interface UAPreferenceCommonDisplay : NSObject - [BaseType(typeof(NSObject))] - interface UAPreferenceCommonDisplay - { - // @property (readonly, copy, nonatomic) NSString * _Nullable title; - [NullAllowed, Export("title")] - string Title { get; } - - // @property (readonly, copy, nonatomic) NSString * _Nullable subtitle; - [NullAllowed, Export("subtitle")] - string Subtitle { get; } - - // @property (readonly, copy, nonatomic) NSString * _Nullable iconURL; - [NullAllowed, Export("iconURL")] - string IconURL { get; } - } - - // @protocol UAPreferenceSection - [Protocol, Model] - [BaseType(typeof(NSObject))] - interface UAPreferenceSection - { - // @required @property (readonly, copy, nonatomic) NSString * _Nonnull type; - [Abstract] - [Export("type")] - string Type { get; } - - // @required @property (readonly, nonatomic) enum UAPreferenceSectionType sectionType; - [Abstract] - [Export("sectionType")] - UAPreferenceSectionType SectionType { get; } - - // @required @property (readonly, copy, nonatomic) NSString * _Nonnull identifier; - [Abstract] - [Export("identifier")] - string Identifier { get; } - - // @required @property (readonly, nonatomic, strong) UAPreferenceCommonDisplay * _Nullable display; - [Abstract] - [NullAllowed, Export("display", ArgumentSemantic.Strong)] - UAPreferenceCommonDisplay Display { get; } - - // @required @property (readonly, copy, nonatomic) NSArray> * _Nonnull items; - [Abstract] - [Export("items", ArgumentSemantic.Copy)] - UAPreferenceItem[] Items { get; } - - // @required @property (readonly, copy, nonatomic) NSArray> * _Nullable conditions; - [Abstract] - [NullAllowed, Export("conditions", ArgumentSemantic.Copy)] - IUAPreferenceConditions[] Conditions { get; } - } - - interface IUAPreferenceSection { }; - - // @interface UAPreferenceCommonSection : NSObject - [BaseType(typeof(NSObject))] - interface UAPreferenceCommonSection : IUAPreferenceSection - { - // @property (readonly, copy, nonatomic) NSString * _Nonnull type; - [Export("type")] - string Type { get; } - - // @property (readonly, nonatomic) enum UAPreferenceSectionType sectionType; - [Export("sectionType")] - UAPreferenceSectionType SectionType { get; } - - // @property (readonly, copy, nonatomic) NSString * _Nonnull identifier; - [Export("identifier")] - string Identifier { get; } - - // @property (readonly, nonatomic, strong) UAPreferenceCommonDisplay * _Nullable display; - [NullAllowed, Export("display", ArgumentSemantic.Strong)] - UAPreferenceCommonDisplay Display { get; } - - // @property (copy, nonatomic) NSArray> * _Nullable conditions; - [NullAllowed, Export("conditions", ArgumentSemantic.Copy)] - IUAPreferenceConditions[] Conditions { get; set; } - - // @property (copy, nonatomic) NSArray> * _Nonnull items; - [Export("items", ArgumentSemantic.Copy)] - UAPreferenceItem[] Items { get; set; } - } - - // @protocol UAPreferenceConditions - [Protocol, Model] - [BaseType(typeof(NSObject))] - interface UAPreferenceConditions - { - // @required @property (readonly, copy, nonatomic) NSString * _Nonnull type; - [Abstract] - [Export("type")] - string Type { get; } - - // @required @property (readonly, nonatomic) enum UAPreferenceConditionType conditionType; - [Abstract] - [Export("conditionType")] - UAPreferenceConditionType ConditionType { get; } - } - - // @interface UAPreferenceContactSubscriptionGroupItem : NSObject - [BaseType(typeof(NSObject))] - interface UAPreferenceContactSubscriptionGroupItem : IUAPreferenceItem - { - // @property (readonly, copy, nonatomic) NSString * _Nonnull type; - [Export("type")] - string Type { get; } - - // @property (readonly, nonatomic) enum UAPreferenceItemType itemType; - [Export("itemType")] - UAPreferenceItemType ItemType { get; } - - // @property (readonly, copy, nonatomic) NSString * _Nonnull identifier; - [Export("identifier")] - string Identifier { get; } - - // @property (readonly, nonatomic, strong) UAPreferenceCommonDisplay * _Nullable display; - [NullAllowed, Export("display", ArgumentSemantic.Strong)] - UAPreferenceCommonDisplay Display { get; } - - // @property (readonly, copy, nonatomic) NSString * _Nonnull subscriptionID; - [Export("subscriptionID")] - string SubscriptionID { get; } - - // @property (readonly, copy, nonatomic) NSArray * _Nonnull components; - [Export("components", ArgumentSemantic.Copy)] - UAPreferenceComponent[] Components { get; } - - // @property (copy, nonatomic) NSArray> * _Nullable conditions; - [NullAllowed, Export("conditions", ArgumentSemantic.Copy)] - IUAPreferenceConditions[] Conditions { get; set; } - } - - // @interface UAPreferenceComponent : NSObject + interface UAPreferenceCenterConfigContactSubscriptionGroup : IUAPreferenceCenterConfigItem + { + // @property (readonly, nonatomic) enum UAPreferenceCenterConfigItemType type; + [Export("type")] + UAPreferenceCenterConfigItemType Type { get; } + + // @property (readonly, copy, nonatomic) NSString * _Nonnull identifier; + [Export("identifier")] + string Identifier { get; } + + // @property (readonly, copy, nonatomic) NSString * _Nonnull subscriptionID; + [Export("subscriptionID")] + string SubscriptionID { get; } + + // @property (readonly, nonatomic, strong) UAPreferenceConfigCommonDisplay * _Nullable display; + [NullAllowed, Export("display", ArgumentSemantic.Strong)] + UAPreferenceConfigCommonDisplay Display { get; } + } + + // @interface UAPreferenceContactSubscriptionGroupComponent + [DisableDefaultCtor] + [BaseType(typeof(NSObject))] + interface UAPreferenceContactSubscriptionGroupComponent + { + // @property (readonly, nonatomic, strong) UAChannelScopes * _Nonnull scopes; + [Export("scopes", ArgumentSemantic.Strong)] + UAChannelScopes Scopes { get; } + + // @property (readonly, nonatomic, strong) UAPreferenceConfigCommonDisplay * _Nullable display; + [NullAllowed, Export("display", ArgumentSemantic.Strong)] + UAPreferenceConfigCommonDisplay Display { get; } + } + + // @interface UAPreferenceCenterConfigContactSubscription + [DisableDefaultCtor] [BaseType(typeof(NSObject))] - interface UAPreferenceComponent + interface UAPreferenceCenterConfigContactSubscription : IUAPreferenceCenterConfigItem { + // @property (readonly, nonatomic) enum UAPreferenceCenterConfigItemType type; + [Export("type")] + UAPreferenceCenterConfigItemType Type { get; } + + // @property (readonly, copy, nonatomic) NSString * _Nonnull identifier; + [Export("identifier")] + string Identifier { get; } + + // @property (readonly, nonatomic, strong) UAPreferenceConfigCommonDisplay * _Nullable display; + [NullAllowed, Export("display", ArgumentSemantic.Strong)] + UAPreferenceConfigCommonDisplay Display { get; } + + // @property (readonly, copy, nonatomic) NSString * _Nonnull subscriptionID; + [Export("subscriptionID")] + string SubscriptionID { get; } + // @property (readonly, nonatomic, strong) UAChannelScopes * _Nonnull scopes; [Export("scopes", ArgumentSemantic.Strong)] UAChannelScopes Scopes { get; } + } + + // @interface UAPreferenceCenterConfigAlert + [DisableDefaultCtor] + [BaseType(typeof(NSObject))] + interface UAPreferenceCenterConfigAlert : IUAPreferenceCenterConfigItem + { + // @property (readonly, nonatomic) enum UAPreferenceCenterConfigItemType type; + [Export("type")] + UAPreferenceCenterConfigItemType Type { get; } - // @property (readonly, nonatomic, strong) UAPreferenceCommonDisplay * _Nonnull display; - [Export("display", ArgumentSemantic.Strong)] - UAPreferenceCommonDisplay Display { get; } + // @property (readonly, copy, nonatomic) NSString * _Nonnull identifier; + [Export("identifier")] + string Identifier { get; } + + // @property (readonly, nonatomic, strong) UAPreferenceConfigAlertDisplay * _Nullable display; + [NullAllowed, Export("display", ArgumentSemantic.Strong)] + UAPreferenceConfigAlertDisplay Display { get; } + + // @property (readonly, nonatomic, strong) UAPreferenceCenterConfigAlertButton * _Nullable button; + [NullAllowed, Export("button", ArgumentSemantic.Strong)] + UAPreferenceCenterConfigAlertButton Button { get; } + } + + // @interface UAPreferenceCenterConfigAlertButton + [DisableDefaultCtor] + [BaseType(typeof(NSObject))] + interface UAPreferenceCenterConfigAlertButton + { + // @property (readonly, copy, nonatomic) NSString * _Nonnull text; + [Export("text")] + string Text { get; } + + // @property (readonly, copy, nonatomic) NSString * _Nullable contentDescription; + [NullAllowed, Export("contentDescription")] + string ContentDescription { get; } + + // @property (readonly, nonatomic) id _Nullable actions; + [NullAllowed, Export("actions")] + NSObject Actions { get; } + } + + // @interface UAPreferenceConfigAlertDisplay + [DisableDefaultCtor] + [BaseType(typeof(NSObject))] + interface UAPreferenceConfigAlertDisplay + { + // @property (readonly, copy, nonatomic) NSString * _Nullable title; + [NullAllowed, Export("title")] + string Title { get; } + + // @property (readonly, copy, nonatomic) NSString * _Nullable subtitle; + [NullAllowed, Export("subtitle")] + string Subtitle { get; } + + // @property (readonly, copy, nonatomic) NSString * _Nullable iconURL; + [NullAllowed, Export("iconURL")] + string IconURL { get; } } - // @interface UAPreferenceContactSubscriptionItem : NSObject - [BaseType(typeof(NSObject))] - interface UAPreferenceContactSubscriptionItem : IUAPreferenceItem - { - // @property (readonly, copy, nonatomic) NSString * _Nonnull type; - [Export("type")] - string Type { get; } - - // @property (readonly, nonatomic) enum UAPreferenceItemType itemType; - [Export("itemType")] - UAPreferenceItemType ItemType { get; } - - // @property (readonly, copy, nonatomic) NSString * _Nonnull identifier; - [Export("identifier")] - string Identifier { get; } - - // @property (readonly, nonatomic, strong) UAPreferenceCommonDisplay * _Nullable display; - [NullAllowed, Export("display", ArgumentSemantic.Strong)] - UAPreferenceCommonDisplay Display { get; } - - // @property (readonly, copy, nonatomic) NSString * _Nonnull subscriptionID; - [Export("subscriptionID")] - string SubscriptionID { get; } - - // @property (readonly, nonatomic, strong) UAChannelScopes * _Nonnull scopes; - [Export("scopes", ArgumentSemantic.Strong)] - UAChannelScopes Scopes { get; } - - // @property (copy, nonatomic) NSArray> * _Nullable conditions; - [NullAllowed, Export("conditions", ArgumentSemantic.Copy)] - IUAPreferenceConditions[] Conditions { get; set; } - } - - // @interface UAPreferenceLabeledSectionBreakSection : NSObject - [BaseType(typeof(NSObject))] - interface UAPreferenceLabeledSectionBreakSection : IUAPreferenceSection - { - // @property (readonly, copy, nonatomic) NSString * _Nonnull type; - [Export("type")] - string Type { get; } - - // @property (readonly, nonatomic) enum UAPreferenceSectionType sectionType; - [Export("sectionType")] - UAPreferenceSectionType SectionType { get; } - - // @property (readonly, copy, nonatomic) NSString * _Nonnull identifier; - [Export("identifier")] - string Identifier { get; } - - // @property (readonly, nonatomic, strong) UAPreferenceCommonDisplay * _Nullable display; - [NullAllowed, Export("display", ArgumentSemantic.Strong)] - UAPreferenceCommonDisplay Display { get; } - - // @property (readonly, copy, nonatomic) NSArray> * _Nonnull items; - [Export("items", ArgumentSemantic.Copy)] - UAPreferenceItem[] Items { get; } - - // @property (copy, nonatomic) NSArray> * _Nullable conditions; - [NullAllowed, Export("conditions", ArgumentSemantic.Copy)] - IUAPreferenceConditions[] Conditions { get; set; } - } - - interface IUAPreferenceConditions { }; - - // @interface UAPreferenceNotificationOptInCondition : NSObject - [BaseType(typeof(NSObject))] - [DisableDefaultCtor] - interface UAPreferenceNotificationOptInCondition : IUAPreferenceConditions - { - // @property (readonly, nonatomic) enum UAPreferenceConditionType conditionType; - [Export("conditionType")] - UAPreferenceConditionType ConditionType { get; } - - // @property (copy, nonatomic) NSString * _Nonnull type; - [Export("type")] - string Type { get; set; } - - // @property (readonly, nonatomic) enum UANotificationOptInConditionStatus optInStatus; - [Export("optInStatus")] - UANotificationOptInConditionStatus OptInStatus { get; } - } - - interface IUAComponent { }; - - // @interface UAPreferenceCenter : NSObject - [BaseType(typeof(NSObject))] - [DisableDefaultCtor] - interface UAPreferenceCenter : IUAComponent - { - // @property (readonly, nonatomic, strong, class) UAPreferenceCenter * _Nonnull shared; - [Static] - [Export("shared", ArgumentSemantic.Strong)] - UAPreferenceCenter Shared { get; } - - [Wrap("WeakOpenDelegate")] - [NullAllowed] - IUAPreferenceCenterOpenDelegate OpenDelegate { get; set; } - - // @property (nonatomic, weak) id _Nullable openDelegate; - [NullAllowed, Export("openDelegate", ArgumentSemantic.Weak)] - NSObject WeakOpenDelegate { get; set; } - - // @property (nonatomic, strong) UAPreferenceCenterStyle * _Nullable style; - [NullAllowed, Export("style", ArgumentSemantic.Strong)] - UAPreferenceCenterStyle Style { get; set; } - - // @property (getter = isComponentEnabled, nonatomic) BOOL componentEnabled; - [Export("componentEnabled")] - bool ComponentEnabled { [Bind("isComponentEnabled")] get; set; } - - // -(void)openPreferenceCenter:(NSString * _Nonnull)preferenceCenterID; - [Export("openPreferenceCenter:")] - void OpenPreferenceCenter(string preferenceCenterID); - - // -(UADisposable * _Nonnull)configForPreferenceCenterID:(NSString * _Nonnull)preferenceCenterID completionHandler:(void (^ _Nonnull)(UAPreferenceCenterConfig * _Nullable))completionHandler; - [Export("configForPreferenceCenterID:completionHandler:")] - UADisposable ConfigForPreferenceCenterID(string preferenceCenterID, Action completionHandler); - - // -(BOOL)deepLink:(NSURL * _Nonnull)deepLink __attribute__((warn_unused_result(""))); - [Export("deepLink:")] - bool DeepLink(NSUrl deepLink); - } - - // @interface UAPreferenceCenterAlertCell : UITableViewCell - [BaseType(typeof(UITableViewCell))] - interface UAPreferenceCenterAlertCell - { - } - - // @interface UAPreferenceCenterCell : UITableViewCell - [BaseType(typeof(UITableViewCell))] - interface UAPreferenceCenterCell - { - } - - // @interface UAPreferenceCenterCheckboxCell : UITableViewCell - [BaseType(typeof(UITableViewCell))] - interface UAPreferenceCenterCheckboxCell - { - } - - // @interface UAPreferenceCenterConfig : NSObject - [BaseType(typeof(NSObject))] - interface UAPreferenceCenterConfig - { - // @property (readonly, copy, nonatomic) NSString * _Nonnull identifier; - [Export("identifier")] - string Identifier { get; } - - // @property (copy, nonatomic) NSArray> * _Nonnull sections; - [Export("sections", ArgumentSemantic.Copy)] - IUAPreferenceSection[] Sections { get; set; } - - // @property (readonly, nonatomic, strong) UAPreferenceCommonDisplay * _Nullable display; - [NullAllowed, Export("display", ArgumentSemantic.Strong)] - UAPreferenceCommonDisplay Display { get; } - } - - // @protocol UAPreferenceCenterOpenDelegate - [Protocol, Model] - [BaseType(typeof(NSObject))] - interface UAPreferenceCenterOpenDelegate - { - // @required -(BOOL)openPreferenceCenter:(NSString * _Nonnull)preferenceCenterID __attribute__((warn_unused_result(""))); - [Abstract] - [Export("openPreferenceCenter:")] - bool OpenPreferenceCenter(string preferenceCenterID); - } - - interface IUAPreferenceCenterOpenDelegate { }; - - // @interface UAPreferenceCenterResources : NSObject - [BaseType(typeof(NSObject))] - interface UAPreferenceCenterResources - { - // +(NSBundle * _Nullable)bundle __attribute__((warn_unused_result(""))); - [Static] - [NullAllowed, Export("bundle")] - NSBundle Bundle { get; } - } - - // @interface UAPreferenceCenterStyle : NSObject - [BaseType(typeof(NSObject))] - interface UAPreferenceCenterStyle - { - // @property (copy, nonatomic) NSString * _Nullable title; - [NullAllowed, Export("title")] - string Title { get; set; } - - // @property (nonatomic, strong) UIFont * _Nullable titleFont; - [NullAllowed, Export("titleFont", ArgumentSemantic.Strong)] - UIFont TitleFont { get; set; } - - // @property (nonatomic, strong) UIColor * _Nullable titleColor; - [NullAllowed, Export("titleColor", ArgumentSemantic.Strong)] - UIColor TitleColor { get; set; } - - // @property (copy, nonatomic) NSString * _Nullable subtitle; - [NullAllowed, Export("subtitle")] - string Subtitle { get; set; } - - // @property (nonatomic, strong) UIFont * _Nullable subtitleFont; - [NullAllowed, Export("subtitleFont", ArgumentSemantic.Strong)] - UIFont SubtitleFont { get; set; } - - // @property (nonatomic, strong) UIColor * _Nullable subtitleColor; - [NullAllowed, Export("subtitleColor", ArgumentSemantic.Strong)] - UIColor SubtitleColor { get; set; } - - // @property (nonatomic, strong) UIColor * _Nullable sectionTextColor; - [NullAllowed, Export("sectionTextColor", ArgumentSemantic.Strong)] - UIColor SectionTextColor { get; set; } - - // @property (nonatomic, strong) UIFont * _Nullable sectionTextFont; - [NullAllowed, Export("sectionTextFont", ArgumentSemantic.Strong)] - UIFont SectionTextFont { get; set; } - - // @property (nonatomic, strong) UIColor * _Nullable sectionTitleTextColor; - [NullAllowed, Export("sectionTitleTextColor", ArgumentSemantic.Strong)] - UIColor SectionTitleTextColor { get; set; } - - // @property (nonatomic, strong) UIFont * _Nullable sectionTitleTextFont; - [NullAllowed, Export("sectionTitleTextFont", ArgumentSemantic.Strong)] - UIFont SectionTitleTextFont { get; set; } - - // @property (nonatomic, strong) UIColor * _Nullable sectionSubtitleTextColor; - [NullAllowed, Export("sectionSubtitleTextColor", ArgumentSemantic.Strong)] - UIColor SectionSubtitleTextColor { get; set; } - - // @property (nonatomic, strong) UIFont * _Nullable sectionSubtitleTextFont; - [NullAllowed, Export("sectionSubtitleTextFont", ArgumentSemantic.Strong)] - UIFont SectionSubtitleTextFont { get; set; } - - // @property (nonatomic, strong) UIColor * _Nullable sectionBreakTextColor; - [NullAllowed, Export("sectionBreakTextColor", ArgumentSemantic.Strong)] - UIColor SectionBreakTextColor { get; set; } - - // @property (nonatomic, strong) UIFont * _Nullable sectionBreakTextFont; - [NullAllowed, Export("sectionBreakTextFont", ArgumentSemantic.Strong)] - UIFont SectionBreakTextFont { get; set; } - - // @property (nonatomic, strong) UIColor * _Nullable sectionBreakBackgroundColor; - [NullAllowed, Export("sectionBreakBackgroundColor", ArgumentSemantic.Strong)] - UIColor SectionBreakBackgroundColor { get; set; } - - // @property (nonatomic, strong) UIColor * _Nullable preferenceTextColor; - [NullAllowed, Export("preferenceTextColor", ArgumentSemantic.Strong)] - UIColor PreferenceTextColor { get; set; } - - // @property (nonatomic, strong) UIFont * _Nullable preferenceTextFont; - [NullAllowed, Export("preferenceTextFont", ArgumentSemantic.Strong)] - UIFont PreferenceTextFont { get; set; } - - // @property (nonatomic, strong) UIColor * _Nullable preferenceTitleTextColor; - [NullAllowed, Export("preferenceTitleTextColor", ArgumentSemantic.Strong)] - UIColor PreferenceTitleTextColor { get; set; } - - // @property (nonatomic, strong) UIFont * _Nullable preferenceTitleTextFont; - [NullAllowed, Export("preferenceTitleTextFont", ArgumentSemantic.Strong)] - UIFont PreferenceTitleTextFont { get; set; } - - // @property (nonatomic, strong) UIColor * _Nullable preferenceSubtitleTextColor; - [NullAllowed, Export("preferenceSubtitleTextColor", ArgumentSemantic.Strong)] - UIColor PreferenceSubtitleTextColor { get; set; } - - // @property (nonatomic, strong) UIFont * _Nullable preferenceSubtitleTextFont; - [NullAllowed, Export("preferenceSubtitleTextFont", ArgumentSemantic.Strong)] - UIFont PreferenceSubtitleTextFont { get; set; } - - // @property (nonatomic, strong) UIColor * _Nullable backgroundColor; - [NullAllowed, Export("backgroundColor", ArgumentSemantic.Strong)] - UIColor BackgroundColor { get; set; } - - // @property (nonatomic, strong) UIColor * _Nullable navigationBarColor; - [NullAllowed, Export("navigationBarColor", ArgumentSemantic.Strong)] - UIColor NavigationBarColor { get; set; } - - // @property (nonatomic, strong) UIColor * _Nullable tintColor; - [NullAllowed, Export("tintColor", ArgumentSemantic.Strong)] - UIColor TintColor { get; set; } - - // @property (nonatomic, strong) UIColor * _Nullable switchTintColor; - [NullAllowed, Export("switchTintColor", ArgumentSemantic.Strong)] - UIColor SwitchTintColor { get; set; } - - // @property (nonatomic, strong) UIColor * _Nullable switchThumbTintColor; - [NullAllowed, Export("switchThumbTintColor", ArgumentSemantic.Strong)] - UIColor SwitchThumbTintColor { get; set; } - - // @property (nonatomic, strong) UIColor * _Nullable preferenceChipTextColor; - [NullAllowed, Export("preferenceChipTextColor", ArgumentSemantic.Strong)] - UIColor PreferenceChipTextColor { get; set; } - - // @property (nonatomic, strong) UIFont * _Nullable preferenceChipTextFont; - [NullAllowed, Export("preferenceChipTextFont", ArgumentSemantic.Strong)] - UIFont PreferenceChipTextFont { get; set; } - - // @property (nonatomic, strong) UIColor * _Nullable preferenceChipCheckmarkColor; - [NullAllowed, Export("preferenceChipCheckmarkColor", ArgumentSemantic.Strong)] - UIColor PreferenceChipCheckmarkColor { get; set; } - - // @property (nonatomic, strong) UIColor * _Nullable preferenceChipCheckmarkBackgroundColor; - [NullAllowed, Export("preferenceChipCheckmarkBackgroundColor", ArgumentSemantic.Strong)] - UIColor PreferenceChipCheckmarkBackgroundColor { get; set; } - - // @property (nonatomic, strong) UIColor * _Nullable preferenceChipCheckmarkCheckedBackgroundColor; - [NullAllowed, Export("preferenceChipCheckmarkCheckedBackgroundColor", ArgumentSemantic.Strong)] - UIColor PreferenceChipCheckmarkCheckedBackgroundColor { get; set; } - - // @property (nonatomic, strong) UIColor * _Nullable preferenceChipBorderColor; - [NullAllowed, Export("preferenceChipBorderColor", ArgumentSemantic.Strong)] - UIColor PreferenceChipBorderColor { get; set; } - - // @property (nonatomic, strong) UIColor * _Nullable alertTitleColor; - [NullAllowed, Export("alertTitleColor", ArgumentSemantic.Strong)] - UIColor AlertTitleColor { get; set; } - - // @property (nonatomic, strong) UIFont * _Nullable alertTitleFont; - [NullAllowed, Export("alertTitleFont", ArgumentSemantic.Strong)] - UIFont AlertTitleFont { get; set; } - - // @property (nonatomic, strong) UIColor * _Nullable alertSubtitleColor; - [NullAllowed, Export("alertSubtitleColor", ArgumentSemantic.Strong)] - UIColor AlertSubtitleColor { get; set; } - - // @property (nonatomic, strong) UIFont * _Nullable alertSubtitleFont; - [NullAllowed, Export("alertSubtitleFont", ArgumentSemantic.Strong)] - UIFont AlertSubtitleFont { get; set; } - - // @property (nonatomic, strong) UIColor * _Nullable alertButtonBackgroundColor; - [NullAllowed, Export("alertButtonBackgroundColor", ArgumentSemantic.Strong)] - UIColor AlertButtonBackgroundColor { get; set; } - - // @property (nonatomic, strong) UIColor * _Nullable alertButtonLabelColor; - [NullAllowed, Export("alertButtonLabelColor", ArgumentSemantic.Strong)] - UIColor AlertButtonLabelColor { get; set; } - - // @property (nonatomic, strong) UIFont * _Nullable alertButtonLabelFont; - [NullAllowed, Export("alertButtonLabelFont", ArgumentSemantic.Strong)] - UIFont AlertButtonLabelFont { get; set; } - - // -(void)setValue:(id _Nullable)value forUndefinedKey:(NSString * _Nonnull)key; - [Export("setValue:forUndefinedKey:")] - void SetValue([NullAllowed] NSObject value, string key); - } - - // @interface UAPreferenceCenterViewController : UIViewController - [BaseType(typeof(UIViewController))] - interface UAPreferenceCenterViewController : IUITableViewDataSource, IUITableViewDelegate - { - // @property (nonatomic, strong) UAPreferenceCenterStyle * _Nullable style; - [NullAllowed, Export("style", ArgumentSemantic.Strong)] - UAPreferenceCenterStyle Style { get; set; } - } -} + // @protocol UAPreferenceCenterOpenDelegate + [Protocol, Model] + [BaseType(typeof(NSObject))] + interface UAPreferenceCenterOpenDelegate + { + // @required -(BOOL)openPreferenceCenter:(NSString * _Nonnull)preferenceCenterID __attribute__((warn_unused_result(""))); + [Abstract] + [Export("openPreferenceCenter:")] + bool OpenPreferenceCenter(string preferenceCenterID); + } + + // @interface UAPreferenceCenterSDKModule + [DisableDefaultCtor] + [BaseType(typeof(NSObject))] + interface UAPreferenceCenterSDKModule + { + } + + // @interface UAPreferenceCenterViewControllerFactory + [BaseType(typeof(NSObject))] + interface UAPreferenceCenterViewControllerFactory + { + // +(UIViewController * _Nonnull)makeViewControllerWithPreferenceCenterID:(NSString * _Nonnull)preferenceCenterID dismissAction:(void (^ _Nullable)(void))dismissAction __attribute__((warn_unused_result(""))); + [Static] + [Export("makeViewControllerWithPreferenceCenterID:dismissAction:")] + UIViewController MakeViewControllerWithPreferenceCenterID(string preferenceCenterID, [NullAllowed] Action dismissAction); + + // +(UIViewController * _Nullable)makeViewControllerWithPreferenceCenterID:(NSString * _Nonnull)preferenceCenterID preferenceCenterThemePlist:(NSString * _Nonnull)preferenceCenterThemePlist error:(NSError * _Nonnull)error __attribute__((warn_unused_result(""))); + [Static] + [Export("makeViewControllerWithPreferenceCenterID:preferenceCenterThemePlist:error:")] + [return: NullAllowed] + UIViewController MakeViewControllerWithPreferenceCenterID(string preferenceCenterID, string preferenceCenterThemePlist, NSError error); + } +} \ No newline at end of file diff --git a/src/AirshipBindings.iOS.PreferenceCenter/StructsAndEnums.cs b/src/AirshipBindings.iOS.PreferenceCenter/StructsAndEnums.cs index bc5bd193..d52593b3 100644 --- a/src/AirshipBindings.iOS.PreferenceCenter/StructsAndEnums.cs +++ b/src/AirshipBindings.iOS.PreferenceCenter/StructsAndEnums.cs @@ -4,34 +4,35 @@ Copyright Airship and Contributors using ObjCRuntime; -namespace UrbanAirship { +namespace UrbanAirship +{ - [Native] - public enum UAPreferenceConditionType : ulong - { - UAPreferenceConditionTypeNotificationOptIn = 0 - } + [Native] + public enum UANotificationOptInConditionStatus : ulong + { + In = 0, + Out = 1 + } - [Native] - public enum UAPreferenceItemType : ulong - { - ChannelSubscription = 0, - ContactSubscription = 1, - ContactSubscriptionGroup = 2, - Alert = 3 - } + [Native] + public enum UAPreferenceCenterConfigConditionType : ulong + { + UAPreferenceCenterConfigConditionTypeNotificationOptIn = 0 + } - [Native] - public enum UANotificationOptInConditionStatus : ulong - { - In = 0, - Out = 1 - } + [Native] + public enum UAPreferenceCenterConfigItemType : ulong + { + ChannelSubscription = 0, + ContactSubscription = 1, + ContactSubscriptionGroup = 2, + Alert = 3 + } - [Native] - public enum UAPreferenceSectionType : ulong - { - Common = 0, - LabeledSectionBreak = 1 - } + [Native] + public enum UAPreferenceCenterConfigSectionType : ulong + { + Common = 0, + LabeledSectionBreak = 1 + } } From 57fd13998a6f512aef114e3a39f4c69cf8ad9536 Mon Sep 17 00:00:00 2001 From: khmMouna Date: Fri, 20 Oct 2023 16:31:03 +0200 Subject: [PATCH 09/28] Remove extendedActions leftovers --- MauiSample/MauiSample.csproj | 2 -- 1 file changed, 2 deletions(-) diff --git a/MauiSample/MauiSample.csproj b/MauiSample/MauiSample.csproj index 903a5ef6..ee04db41 100644 --- a/MauiSample/MauiSample.csproj +++ b/MauiSample/MauiSample.csproj @@ -69,7 +69,6 @@ - @@ -98,7 +97,6 @@ - From 43cac840045b98c899ab3a052783e9eca0f989c4 Mon Sep 17 00:00:00 2001 From: khmMouna Date: Fri, 20 Oct 2023 18:01:49 +0200 Subject: [PATCH 10/28] Add FIXME --- MauiSample/AppShell.xaml | 6 ++-- MauiSample/HomePageViewModel.cs | 7 ++-- MauiSample/PushSettingsViewController.xaml.cs | 16 ++++++---- src/Airship.Net/Platforms/Android/Airship.cs | 1 + src/Airship.Net/Platforms/iOS/Airship.cs | 32 +++++++++++-------- 5 files changed, 36 insertions(+), 26 deletions(-) diff --git a/MauiSample/AppShell.xaml b/MauiSample/AppShell.xaml index d6aaab44..d2df7dfc 100644 --- a/MauiSample/AppShell.xaml +++ b/MauiSample/AppShell.xaml @@ -21,10 +21,10 @@ Route="Inbox" /> + Route="Settings" /> diff --git a/MauiSample/HomePageViewModel.cs b/MauiSample/HomePageViewModel.cs index 1b6929ad..8eec25ae 100644 --- a/MauiSample/HomePageViewModel.cs +++ b/MauiSample/HomePageViewModel.cs @@ -62,7 +62,8 @@ public HomePageViewModel() OnPrefCenterButtonClicked = new Command(PerformOnPrefCenterButtonClicked); Airship.Instance.OnChannelCreation += OnChannelEvent; - Airship.Instance.OnPushNotificationStatusUpdate += OnPushNotificationStatusEvent; + // FIXME: + //Airship.Instance.OnPushNotificationStatusUpdate += OnPushNotificationStatusEvent; Refresh(); } @@ -70,8 +71,10 @@ public HomePageViewModel() ~HomePageViewModel() { Airship.Instance.OnChannelCreation -= OnChannelEvent; + // FIXME: + //Airship.Instance.OnPushNotificationStatusUpdate -= OnPushNotificationStatusEvent; } - + private void OnChannelEvent(object sender, EventArgs e) => Refresh(); private void OnPushNotificationStatusEvent(object sender, EventArgs e) => Refresh(); diff --git a/MauiSample/PushSettingsViewController.xaml.cs b/MauiSample/PushSettingsViewController.xaml.cs index 74526ca9..a385941b 100644 --- a/MauiSample/PushSettingsViewController.xaml.cs +++ b/MauiSample/PushSettingsViewController.xaml.cs @@ -76,11 +76,13 @@ void UpdateTagsCell() void UpdateNamedUser() { namedUserLabel.Text = ""; - Airship.Instance.GetNamedUser(namedUser => - { - Device.BeginInvokeOnMainThread(() => { - namedUserLabel.Placeholder = namedUser != null ? namedUser : "named user"; - }); - }); - } + // FIXME: + // Airship.Instance.GetNamedUser(namedUser => + // { + // Device.BeginInvokeOnMainThread(() => + // { + // namedUserLabel.Placeholder = namedUser != null ? namedUser : "named user"; + // }); + // }); + //} } \ No newline at end of file diff --git a/src/Airship.Net/Platforms/Android/Airship.cs b/src/Airship.Net/Platforms/Android/Airship.cs index 0ea475a4..93675117 100644 --- a/src/Airship.Net/Platforms/Android/Airship.cs +++ b/src/Airship.Net/Platforms/Android/Airship.cs @@ -486,6 +486,7 @@ private void ApplyChannelSubscriptionListHelper(List operations, ScopedSubscriptionListEditor editor) private void ApplyContactSubscriptionListHelper(List operations) { diff --git a/src/Airship.Net/Platforms/iOS/Airship.cs b/src/Airship.Net/Platforms/iOS/Airship.cs index dc204549..e13cb9f3 100644 --- a/src/Airship.Net/Platforms/iOS/Airship.cs +++ b/src/Airship.Net/Platforms/iOS/Airship.cs @@ -30,19 +30,20 @@ private void Initialize() OnChannelCreation?.Invoke(this, new ChannelEventArgs(channelID)); }); - NSNotificationCenter.DefaultCenter.AddObserver(aName: (NSString)UAPush.NotificationStatusUpdateEvent, (notification) => - { - OnPushNotificationStatusUpdate?.Invoke(this, - new PushNotificationStatusEventArgs( - notification.UserInfo[UAPush.IsUserNotificationsEnabled].Equals((NSNumber)1), - notification.UserInfo[UAPush.AreNotificationsAllowed].Equals((NSNumber)1), - notification.UserInfo[UAPush.IsPushPrivacyFeatureEnabled].Equals((NSNumber)1), - notification.UserInfo[UAPush.IsPushTokenRegistered].Equals((NSNumber)1), - notification.UserInfo[UAPush.IsUserOptedIn].Equals((NSNumber)1), - notification.UserInfo[UAPush.IsOptedIn].Equals((NSNumber)1) - ) - ); - }); + // FIXME: + //NSNotificationCenter.DefaultCenter.AddObserver(aName: (NSString)UAPush.NotificationStatusUpdateEvent, (notification) => + //{ + // OnPushNotificationStatusUpdate?.Invoke(this, + // new PushNotificationStatusEventArgs( + // notification.UserInfo[UAPush.IsUserNotificationsEnabled].Equals((NSNumber)1), + // notification.UserInfo[UAPush.AreNotificationsAllowed].Equals((NSNumber)1), + // notification.UserInfo[UAPush.IsPushPrivacyFeatureEnabled].Equals((NSNumber)1), + // notification.UserInfo[UAPush.IsPushTokenRegistered].Equals((NSNumber)1), + // notification.UserInfo[UAPush.IsUserOptedIn].Equals((NSNumber)1), + // notification.UserInfo[UAPush.IsOptedIn].Equals((NSNumber)1) + // ) + // ); + //}); //Adding Inbox updated Listener NSNotificationCenter.DefaultCenter.AddObserver(aName: (NSString)"com.urbanairship.notification.message_list_updated", (notification) => @@ -204,7 +205,10 @@ private static Features FeaturesFromUAFeatures(UAFeatures uAFeatures) public string? ChannelId => UAirship.Channel.Identifier; - public void GetNamedUser(Action namedUser) => UAirship.Contact.GetNamedUserID(namedUser); + public void GetNamedUser(Action namedUser) + { + UAirship.Contact.GetNamedUserID(namedUser); + } public void ResetContact() => UAirship.Contact.Reset(); From b65d1496955f2c9c3ef55b81504abc8c96682dde Mon Sep 17 00:00:00 2001 From: khmMouna Date: Fri, 20 Oct 2023 18:11:05 +0200 Subject: [PATCH 11/28] Fix build --- MauiSample/PushSettingsViewController.xaml.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/MauiSample/PushSettingsViewController.xaml.cs b/MauiSample/PushSettingsViewController.xaml.cs index a385941b..e6022b75 100644 --- a/MauiSample/PushSettingsViewController.xaml.cs +++ b/MauiSample/PushSettingsViewController.xaml.cs @@ -77,12 +77,12 @@ void UpdateNamedUser() { namedUserLabel.Text = ""; // FIXME: - // Airship.Instance.GetNamedUser(namedUser => - // { - // Device.BeginInvokeOnMainThread(() => - // { - // namedUserLabel.Placeholder = namedUser != null ? namedUser : "named user"; - // }); - // }); - //} + // Airship.Instance.GetNamedUser(namedUser => + // { + // Device.BeginInvokeOnMainThread(() => + // { + // namedUserLabel.Placeholder = namedUser != null ? namedUser : "named user"; + // }); + // }); + } } \ No newline at end of file From 5492f427b00bbd99118be090cedca7e134dd18a3 Mon Sep 17 00:00:00 2001 From: khmMouna Date: Tue, 24 Oct 2023 15:24:52 +0200 Subject: [PATCH 12/28] Remove leftover extendedActions && FIXME --- Airship.Net.sln | 6 ----- Airship.iOS.slnf | 3 +-- MauiSample/HomePageViewModel.cs | 6 ++--- MauiSample/MessageCenterPage.xaml.cs | 7 +++-- MauiSample/PushSettingsViewController.xaml.cs | 15 +++++------ src/Airship.Net/Platforms/iOS/Airship.cs | 27 +++++++++---------- 6 files changed, 28 insertions(+), 36 deletions(-) diff --git a/Airship.Net.sln b/Airship.Net.sln index a5e02896..b7e78af0 100644 --- a/Airship.Net.sln +++ b/Airship.Net.sln @@ -23,8 +23,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirshipBindings.iOS.Core", EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirshipBindings.iOS.Automation", "src\AirshipBindings.iOS.Automation\AirshipBindings.iOS.Automation.csproj", "{70434FB5-A468-4777-9478-DD2AB80BE0E2}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirshipBindings.iOS.ExtendedActions", "src\AirshipBindings.iOS.ExtendedActions\AirshipBindings.iOS.ExtendedActions.csproj", "{BFFFE653-04CD-4563-BF2D-B6F31349F30D}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirshipBindings.iOS.MessageCenter", "src\AirshipBindings.iOS.MessageCenter\AirshipBindings.iOS.MessageCenter.csproj", "{AC22EEC5-DCA6-49D3-8B37-533B5565E2CF}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net", "src\Airship.Net\Airship.Net.csproj", "{C419463A-31A8-477B-A99E-1B0947AA416B}" @@ -89,10 +87,6 @@ Global {70434FB5-A468-4777-9478-DD2AB80BE0E2}.Debug|Any CPU.Build.0 = Debug|Any CPU {70434FB5-A468-4777-9478-DD2AB80BE0E2}.Release|Any CPU.ActiveCfg = Release|Any CPU {70434FB5-A468-4777-9478-DD2AB80BE0E2}.Release|Any CPU.Build.0 = Release|Any CPU - {BFFFE653-04CD-4563-BF2D-B6F31349F30D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BFFFE653-04CD-4563-BF2D-B6F31349F30D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BFFFE653-04CD-4563-BF2D-B6F31349F30D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BFFFE653-04CD-4563-BF2D-B6F31349F30D}.Release|Any CPU.Build.0 = Release|Any CPU {AC22EEC5-DCA6-49D3-8B37-533B5565E2CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AC22EEC5-DCA6-49D3-8B37-533B5565E2CF}.Debug|Any CPU.Build.0 = Debug|Any CPU {AC22EEC5-DCA6-49D3-8B37-533B5565E2CF}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/Airship.iOS.slnf b/Airship.iOS.slnf index 550c68de..530b35f5 100644 --- a/Airship.iOS.slnf +++ b/Airship.iOS.slnf @@ -5,11 +5,10 @@ "src\\AirshipBindings.iOS.Basement\\AirshipBindings.iOS.Basement.csproj", "src\\AirshipBindings.iOS.Core\\AirshipBindings.iOS.Core.csproj", "src\\AirshipBindings.iOS.Automation\\AirshipBindings.iOS.Automation.csproj", - "src\\AirshipBindings.iOS.ExtendedActions\\AirshipBindings.iOS.ExtendedActions.csproj", "src\\AirshipBindings.iOS.MessageCenter\\AirshipBindings.iOS.MessageCenter.csproj", "src\\AirshipBindings.iOS.NotificationContentExtension\\AirshipBindings.iOS.NotificationContentExtension.csproj", "src\\AirshipBindings.iOS.NotificationServiceExtension\\AirshipBindings.iOS.NotificationServiceExtension.csproj", "src\\AirshipBindings.iOS.PreferenceCenter\\AirshipBindings.iOS.PreferenceCenter.csproj" ] } -} \ No newline at end of file +} diff --git a/MauiSample/HomePageViewModel.cs b/MauiSample/HomePageViewModel.cs index 8eec25ae..7f517c08 100644 --- a/MauiSample/HomePageViewModel.cs +++ b/MauiSample/HomePageViewModel.cs @@ -62,8 +62,7 @@ public HomePageViewModel() OnPrefCenterButtonClicked = new Command(PerformOnPrefCenterButtonClicked); Airship.Instance.OnChannelCreation += OnChannelEvent; - // FIXME: - //Airship.Instance.OnPushNotificationStatusUpdate += OnPushNotificationStatusEvent; + Airship.Instance.OnPushNotificationStatusUpdate += OnPushNotificationStatusEvent; Refresh(); } @@ -71,8 +70,7 @@ public HomePageViewModel() ~HomePageViewModel() { Airship.Instance.OnChannelCreation -= OnChannelEvent; - // FIXME: - //Airship.Instance.OnPushNotificationStatusUpdate -= OnPushNotificationStatusEvent; + Airship.Instance.OnPushNotificationStatusUpdate -= OnPushNotificationStatusEvent; } private void OnChannelEvent(object sender, EventArgs e) => Refresh(); diff --git a/MauiSample/MessageCenterPage.xaml.cs b/MauiSample/MessageCenterPage.xaml.cs index 3501ac4c..d826812b 100644 --- a/MauiSample/MessageCenterPage.xaml.cs +++ b/MauiSample/MessageCenterPage.xaml.cs @@ -30,8 +30,11 @@ public void Refresh() { Airship.Instance.InboxMessages(messages => { - listView.ItemsSource = messages; - refreshView.IsRefreshing = false; + MainThread.BeginInvokeOnMainThread(() => + { + listView.ItemsSource = messages; + refreshView.IsRefreshing = false; + }); }); } diff --git a/MauiSample/PushSettingsViewController.xaml.cs b/MauiSample/PushSettingsViewController.xaml.cs index e6022b75..1743a880 100644 --- a/MauiSample/PushSettingsViewController.xaml.cs +++ b/MauiSample/PushSettingsViewController.xaml.cs @@ -76,13 +76,12 @@ void UpdateTagsCell() void UpdateNamedUser() { namedUserLabel.Text = ""; - // FIXME: - // Airship.Instance.GetNamedUser(namedUser => - // { - // Device.BeginInvokeOnMainThread(() => - // { - // namedUserLabel.Placeholder = namedUser != null ? namedUser : "named user"; - // }); - // }); + Airship.Instance.GetNamedUser(namedUser => + { + MainThread.BeginInvokeOnMainThread(() => + { + namedUserLabel.Placeholder = namedUser != null ? namedUser : "named user"; + }); + }); } } \ No newline at end of file diff --git a/src/Airship.Net/Platforms/iOS/Airship.cs b/src/Airship.Net/Platforms/iOS/Airship.cs index e13cb9f3..cbc40198 100644 --- a/src/Airship.Net/Platforms/iOS/Airship.cs +++ b/src/Airship.Net/Platforms/iOS/Airship.cs @@ -30,20 +30,19 @@ private void Initialize() OnChannelCreation?.Invoke(this, new ChannelEventArgs(channelID)); }); - // FIXME: - //NSNotificationCenter.DefaultCenter.AddObserver(aName: (NSString)UAPush.NotificationStatusUpdateEvent, (notification) => - //{ - // OnPushNotificationStatusUpdate?.Invoke(this, - // new PushNotificationStatusEventArgs( - // notification.UserInfo[UAPush.IsUserNotificationsEnabled].Equals((NSNumber)1), - // notification.UserInfo[UAPush.AreNotificationsAllowed].Equals((NSNumber)1), - // notification.UserInfo[UAPush.IsPushPrivacyFeatureEnabled].Equals((NSNumber)1), - // notification.UserInfo[UAPush.IsPushTokenRegistered].Equals((NSNumber)1), - // notification.UserInfo[UAPush.IsUserOptedIn].Equals((NSNumber)1), - // notification.UserInfo[UAPush.IsOptedIn].Equals((NSNumber)1) - // ) - // ); - //}); + NSNotificationCenter.DefaultCenter.AddObserver(aName: (NSString)UAPush.NotificationStatusUpdateEvent, (notification) => + { + OnPushNotificationStatusUpdate?.Invoke(this, + new PushNotificationStatusEventArgs( + notification.UserInfo[UAPush.IsUserNotificationsEnabled].Equals((NSNumber)1), + notification.UserInfo[UAPush.AreNotificationsAllowed].Equals((NSNumber)1), + notification.UserInfo[UAPush.IsPushPrivacyFeatureEnabled].Equals((NSNumber)1), + notification.UserInfo[UAPush.IsPushTokenRegistered].Equals((NSNumber)1), + notification.UserInfo[UAPush.IsUserOptedIn].Equals((NSNumber)1), + notification.UserInfo[UAPush.IsOptedIn].Equals((NSNumber)1) + ) + ); + }); //Adding Inbox updated Listener NSNotificationCenter.DefaultCenter.AddObserver(aName: (NSString)"com.urbanairship.notification.message_list_updated", (notification) => From e053ecd106ecdd6926bc55b13508d11d58348ad4 Mon Sep 17 00:00:00 2001 From: khmMouna Date: Thu, 26 Oct 2023 15:42:06 +0200 Subject: [PATCH 13/28] Update to .NET7.0 --- MauiSample/MauiSample.csproj | 29 +++++++++---------- binderator/config.json | 2 +- binderator/scripts/update-config.csx | 4 +-- binderator/source/AndroidProject.cshtml | 6 ++-- global.json | 2 +- .../Airship.Net.MessageCenter.csproj | 27 +++++++++-------- src/Airship.Net/Airship.Net.csproj | 16 ++++++---- .../AirshipBindings.iOS.Automation.csproj | 6 ++-- .../AirshipBindings.iOS.Basement.csproj | 6 ++-- .../AirshipBindings.iOS.Core.csproj | 6 ++-- .../AirshipBindings.iOS.MessageCenter.csproj | 6 ++-- ...gs.iOS.NotificationContentExtension.csproj | 6 ++-- ...gs.iOS.NotificationServiceExtension.csproj | 4 +-- ...irshipBindings.iOS.PreferenceCenter.csproj | 6 ++-- .../AirshipBindings.iOS.csproj | 6 ++-- workloads.json | 18 ++++++------ 16 files changed, 78 insertions(+), 72 deletions(-) diff --git a/MauiSample/MauiSample.csproj b/MauiSample/MauiSample.csproj index ee04db41..0c7d1f07 100644 --- a/MauiSample/MauiSample.csproj +++ b/MauiSample/MauiSample.csproj @@ -1,7 +1,7 @@ - + - net6.0-android;net6.0-ios + net7.0-android;net7.0-ios Exe MauiSample true @@ -11,14 +11,14 @@ MauiSample - com.urbanairship.richpush - com.urbanairship.sample + com.urbanairship.richpush + com.urbanairship.sample f6a79f57-dd45-4efa-9d46-98b431478fa1 1.0 1 14.0 - 31.0 + 33.0 True @@ -27,7 +27,7 @@ 4 - + Automatic iPhone Developer Platforms\iOS\Entitlements.plist @@ -35,7 +35,7 @@ false - + iPhone Developer Platforms\iOS\Entitlements.plist None @@ -57,7 +57,7 @@ false 4 - + 2G @@ -65,7 +65,7 @@ - + @@ -73,7 +73,7 @@ - + @@ -91,7 +91,7 @@ - + @@ -99,7 +99,7 @@ - + @@ -119,16 +119,15 @@ - - + - + diff --git a/binderator/config.json b/binderator/config.json index 27db2174..9fa4cc3d 100644 --- a/binderator/config.json +++ b/binderator/config.json @@ -226,7 +226,7 @@ "groupId": "androidx.work", "artifactId": "work-runtime", "version": "2.8.0", - "nugetVersion": "2.7.1.6", + "nugetVersion": "2.7.1.5", "nugetId": "Xamarin.AndroidX.Work.Runtime", "dependencyOnly": true }, diff --git a/binderator/scripts/update-config.csx b/binderator/scripts/update-config.csx index 0932c163..b727d388 100644 --- a/binderator/scripts/update-config.csx +++ b/binderator/scripts/update-config.csx @@ -1,4 +1,4 @@ -#! "net6.0" +#! "net7.0" #r "nuget: MavenNet, 2.2.13" #r "nuget: Newtonsoft.Json, 13.0.1" @@ -521,4 +521,4 @@ public class Options } public bool ShouldWriteOutput => Update || Bump || Sort; -} \ No newline at end of file +} diff --git a/binderator/source/AndroidProject.cshtml b/binderator/source/AndroidProject.cshtml index 5a790bea..81ecd3f5 100644 --- a/binderator/source/AndroidProject.cshtml +++ b/binderator/source/AndroidProject.cshtml @@ -4,8 +4,8 @@ - net6.0-android - 21 + net7.0-android + 33 enable enable true @@ -136,4 +136,4 @@ } - \ No newline at end of file + diff --git a/global.json b/global.json index 4653acb5..6e7e4550 100644 --- a/global.json +++ b/global.json @@ -1,7 +1,7 @@ { "sdk": { - "version": "6.0.405", + "version": "7.0.100", "rollForward": "patch" }, "msbuild-sdks": diff --git a/src/Airship.Net.MessageCenter/Airship.Net.MessageCenter.csproj b/src/Airship.Net.MessageCenter/Airship.Net.MessageCenter.csproj index 260a8402..5e038c55 100644 --- a/src/Airship.Net.MessageCenter/Airship.Net.MessageCenter.csproj +++ b/src/Airship.Net.MessageCenter/Airship.Net.MessageCenter.csproj @@ -1,7 +1,7 @@ - net6.0;net6.0-android;net6.0-ios + net7.0;net7.0-android33.0;net7.0-ios true true enable @@ -10,8 +10,8 @@ AirshipDotNet.MessageCenter false - 13.0 - 21.0 + 14.0 + 33.0 @@ -25,18 +25,21 @@ $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - + false - + + false + + - + @@ -44,12 +47,12 @@ - - - - - - + + + + + + diff --git a/src/Airship.Net/Airship.Net.csproj b/src/Airship.Net/Airship.Net.csproj index c4059833..cfd6a995 100644 --- a/src/Airship.Net/Airship.Net.csproj +++ b/src/Airship.Net/Airship.Net.csproj @@ -1,7 +1,7 @@ - net6.0;net6.0-android;net6.0-ios + net7.0;net7.0-android;net7.0-ios true true enable @@ -10,8 +10,8 @@ AirshipDotNet false - 13.0 - 21.0 + 14.0 + 33.0 @@ -25,17 +25,21 @@ $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - + false - + + false + HttpClientHandler + + - + diff --git a/src/AirshipBindings.iOS.Automation/AirshipBindings.iOS.Automation.csproj b/src/AirshipBindings.iOS.Automation/AirshipBindings.iOS.Automation.csproj index bf306c79..73e525a6 100644 --- a/src/AirshipBindings.iOS.Automation/AirshipBindings.iOS.Automation.csproj +++ b/src/AirshipBindings.iOS.Automation/AirshipBindings.iOS.Automation.csproj @@ -1,4 +1,4 @@ - + true Debug @@ -11,7 +11,7 @@ Airship.Net.iOS.Automation Airship iOS SDK - Automation Automation support for Airship SDK - net6.0-ios + net7.0-ios enable true true @@ -19,7 +19,7 @@ $(AirshipIosVersion) $(AirshipIosNugetVersion) Resources - 13.0 + 14.0 diff --git a/src/AirshipBindings.iOS.Basement/AirshipBindings.iOS.Basement.csproj b/src/AirshipBindings.iOS.Basement/AirshipBindings.iOS.Basement.csproj index 40dd05ef..174a8624 100644 --- a/src/AirshipBindings.iOS.Basement/AirshipBindings.iOS.Basement.csproj +++ b/src/AirshipBindings.iOS.Basement/AirshipBindings.iOS.Basement.csproj @@ -1,4 +1,4 @@ - + true Debug @@ -11,7 +11,7 @@ Airship.Net.iOS.Basement Airship iOS SDK - Basement Basement module for Airship SDK - net6.0-ios + net7.0-ios enable true true @@ -19,7 +19,7 @@ $(AirshipIosVersion) $(AirshipIosNugetVersion) Resources - 13.0 + 14.0 diff --git a/src/AirshipBindings.iOS.Core/AirshipBindings.iOS.Core.csproj b/src/AirshipBindings.iOS.Core/AirshipBindings.iOS.Core.csproj index 2db490b7..ae1bc3b6 100644 --- a/src/AirshipBindings.iOS.Core/AirshipBindings.iOS.Core.csproj +++ b/src/AirshipBindings.iOS.Core/AirshipBindings.iOS.Core.csproj @@ -1,4 +1,4 @@ - + true Debug @@ -9,7 +9,7 @@ Airship.Net.iOS.Core Airship iOS SDK - Core Core of Airship SDK - net6.0-ios + net7.0-ios enable true true @@ -17,7 +17,7 @@ $(AirshipIosVersion) $(AirshipIosNugetVersion) Resources - 13.0 + 14.0 diff --git a/src/AirshipBindings.iOS.MessageCenter/AirshipBindings.iOS.MessageCenter.csproj b/src/AirshipBindings.iOS.MessageCenter/AirshipBindings.iOS.MessageCenter.csproj index d780846a..aac6ceae 100644 --- a/src/AirshipBindings.iOS.MessageCenter/AirshipBindings.iOS.MessageCenter.csproj +++ b/src/AirshipBindings.iOS.MessageCenter/AirshipBindings.iOS.MessageCenter.csproj @@ -1,4 +1,4 @@ - + true Debug @@ -11,7 +11,7 @@ Airship.Net.iOS.MessageCenter Airship iOS SDK - MessageCenter Message Center support for the Airship SDK - net6.0-ios + net7.0-ios enable true true @@ -20,7 +20,7 @@ $(AirshipIosVersion) $(AirshipIosNugetVersion) Resources - 13.0 + 14.0 diff --git a/src/AirshipBindings.iOS.NotificationContentExtension/AirshipBindings.iOS.NotificationContentExtension.csproj b/src/AirshipBindings.iOS.NotificationContentExtension/AirshipBindings.iOS.NotificationContentExtension.csproj index b44a85c9..a1f66bb4 100644 --- a/src/AirshipBindings.iOS.NotificationContentExtension/AirshipBindings.iOS.NotificationContentExtension.csproj +++ b/src/AirshipBindings.iOS.NotificationContentExtension/AirshipBindings.iOS.NotificationContentExtension.csproj @@ -1,4 +1,4 @@ - + true Debug @@ -9,7 +9,7 @@ Airship.Net.iOS.NotificationContentExtension Airship iOS SDK - Notification Content Extension Notification content extension support for Airship SDK - net6.0-ios + net7.0-ios true enable false @@ -17,7 +17,7 @@ $(AirshipIosNugetVersion) true true - 13.0 + 14.0 diff --git a/src/AirshipBindings.iOS.NotificationServiceExtension/AirshipBindings.iOS.NotificationServiceExtension.csproj b/src/AirshipBindings.iOS.NotificationServiceExtension/AirshipBindings.iOS.NotificationServiceExtension.csproj index a6fade74..10b6ebd4 100644 --- a/src/AirshipBindings.iOS.NotificationServiceExtension/AirshipBindings.iOS.NotificationServiceExtension.csproj +++ b/src/AirshipBindings.iOS.NotificationServiceExtension/AirshipBindings.iOS.NotificationServiceExtension.csproj @@ -9,7 +9,7 @@ Airship.Net.iOS.NotificationServiceExtension Airship iOS SDK - Notification Service Extension Notification service extension support for Airship SDK - net6.0-ios + net7.0-ios enable true true @@ -17,7 +17,7 @@ $(AirshipIosVersion) $(AirshipIosNugetVersion) Resources - 13.0 + 14.0 diff --git a/src/AirshipBindings.iOS.PreferenceCenter/AirshipBindings.iOS.PreferenceCenter.csproj b/src/AirshipBindings.iOS.PreferenceCenter/AirshipBindings.iOS.PreferenceCenter.csproj index 2963891d..7ca1ab86 100644 --- a/src/AirshipBindings.iOS.PreferenceCenter/AirshipBindings.iOS.PreferenceCenter.csproj +++ b/src/AirshipBindings.iOS.PreferenceCenter/AirshipBindings.iOS.PreferenceCenter.csproj @@ -1,4 +1,4 @@ - + true Debug @@ -9,14 +9,14 @@ Airship.Net.iOS.PreferenceCenter Airship iOS SDK - Preference Center Preference Center support for Airship SDK - net6.0-ios + net7.0-ios true enable true false $(AirshipIosVersion) $(AirshipIosNugetVersion) - 13.0 + 14.0 true diff --git a/src/AirshipBindings.iOS/AirshipBindings.iOS.csproj b/src/AirshipBindings.iOS/AirshipBindings.iOS.csproj index a4310852..2ec36cb8 100644 --- a/src/AirshipBindings.iOS/AirshipBindings.iOS.csproj +++ b/src/AirshipBindings.iOS/AirshipBindings.iOS.csproj @@ -1,18 +1,18 @@ - + Library AirshipBindings.iOS Airship.Net.iOS Airship iOS SDK A full suite of mobile engagement tools for building next-generation apps - net6.0-ios + net7.0-ios enable true $(AirshipIosVersion) $(AirshipIosNugetVersion) false false - 13.0 + 14.0 diff --git a/workloads.json b/workloads.json index 144ea2a4..57fded0f 100644 --- a/workloads.json +++ b/workloads.json @@ -1,10 +1,10 @@ { - "microsoft.net.sdk.android": "32.0.485/6.0.405", - "microsoft.net.sdk.ios": "16.2.19/6.0.405", - "microsoft.net.sdk.maccatalyst": "15.4.471/6.0.405", - "microsoft.net.sdk.macos": "12.3.471/6.0.405", - "microsoft.net.sdk.tvos": "16.0.527/6.0.405", - "microsoft.net.sdk.maui": "6.0.552/6.0.405", - "microsoft.net.workload.mono.toolchain": "6.0.12/6.0.405", - "microsoft.net.workload.emscripten": "6.0.12/6.0.405" -} \ No newline at end of file + "microsoft.net.sdk.android": "32.0.485/7.0.100", + "microsoft.net.sdk.ios": "16.2.19/7.0.100", + "microsoft.net.sdk.maccatalyst": "15.4.471/7.0.100", + "microsoft.net.sdk.macos": "12.3.471/7.0.100", + "microsoft.net.sdk.tvos": "16.0.527/7.0.100", + "microsoft.net.sdk.maui": "6.0.552/7.0.100", + "microsoft.net.workload.mono.toolchain": "6.0.12/7.0.100", + "microsoft.net.workload.emscripten": "6.0.12/7.0.100" +} From 1416fdc79efa694c185417f2a0f0d7c3c03cb806 Mon Sep 17 00:00:00 2001 From: khmMouna Date: Thu, 26 Oct 2023 16:42:01 +0200 Subject: [PATCH 14/28] Use Airship-Xcode15.zip && use xcode 15 --- .github/workflows/ci.yaml | 4 ++-- airship.properties | 2 +- src/AirshipBindings.iOS.common/build.gradle | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9404c3bc..fe2d761a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -3,7 +3,7 @@ name: CI on: [pull_request] env: - DEVELOPER_DIR: /Applications/Xcode_14.3.1.app + DEVELOPER_DIR: /Applications/Xcode_15.0.app DOTNET_CLI_TELEMETRY_OPTOUT: 1 DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 DOTNET_NOLOGO: 1 @@ -21,7 +21,7 @@ jobs: distribution: 'temurin' java-version: '11' - - name: Set up .NET 6.0 + - name: Set up .NET 7.0 uses: actions/setup-dotnet@v3 with: global-json-file: global.json diff --git a/airship.properties b/airship.properties index ce392560..14b4dad7 100644 --- a/airship.properties +++ b/airship.properties @@ -6,7 +6,7 @@ androidVersion = 17.4.0 crossPlatformVersion = 18.0.0 # Filename of the iOS SDK zip file -iosFrameworkZip = Airship.zip +iosFrameworkZip = Airship-Xcode15.zip # NuGet package revision numbers # If > 0, the revision number will be added to the versions diff --git a/src/AirshipBindings.iOS.common/build.gradle b/src/AirshipBindings.iOS.common/build.gradle index 738ef799..69be6815 100644 --- a/src/AirshipBindings.iOS.common/build.gradle +++ b/src/AirshipBindings.iOS.common/build.gradle @@ -3,6 +3,7 @@ ext { } task clean(type: Delete) { + setFollowSymlinks(true) // <-- add this line to avoid "could not follow symlink" errors doLast() { project.delete fileTree("$rootDir/frameworks/") project.delete "$rootDir/Carthage" @@ -41,7 +42,7 @@ task downloadFrameworks { exec { workingDir "${rootDir}/frameworks" executable "unzip" - args "-u", "${airshipProperties.iosFrameworkZip}" + args "-o", "${airshipProperties.iosFrameworkZip}" } } } @@ -77,4 +78,4 @@ task pack { commandLine "dotnet", "pack", "dirs.proj", "-o=${rootProject.buildDir}" } } -} \ No newline at end of file +} From 7c5f4c3a0166467a271f72a772e1f6e0ee28ceb9 Mon Sep 17 00:00:00 2001 From: khmMouna Date: Thu, 26 Oct 2023 17:02:17 +0200 Subject: [PATCH 15/28] Update dotnet workloads --- workloads.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/workloads.json b/workloads.json index 57fded0f..2fbdb62a 100644 --- a/workloads.json +++ b/workloads.json @@ -1,10 +1,10 @@ { - "microsoft.net.sdk.android": "32.0.485/7.0.100", - "microsoft.net.sdk.ios": "16.2.19/7.0.100", - "microsoft.net.sdk.maccatalyst": "15.4.471/7.0.100", - "microsoft.net.sdk.macos": "12.3.471/7.0.100", - "microsoft.net.sdk.tvos": "16.0.527/7.0.100", - "microsoft.net.sdk.maui": "6.0.552/7.0.100", + "microsoft.net.sdk.android": "33.0.95/7.0.100", + "microsoft.net.sdk.ios": "16.4.7107/7.0.100", + "microsoft.net.sdk.maccatalyst": "16.4.7107/7.0.100", + "microsoft.net.sdk.macos": "13.3.7107/7.0.100", + "microsoft.net.sdk.tvos": "16.4.7107/7.0.100", + "microsoft.net.sdk.maui": "7.0.96/7.0.100", "microsoft.net.workload.mono.toolchain": "6.0.12/7.0.100", "microsoft.net.workload.emscripten": "6.0.12/7.0.100" } From d9b22a2bc9b52d30d815657d6b30f081bb2d4fc2 Mon Sep 17 00:00:00 2001 From: khmMouna Date: Thu, 26 Oct 2023 18:24:27 +0200 Subject: [PATCH 16/28] Update androidbinderator version --- binderator/.config/dotnet-tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binderator/.config/dotnet-tools.json b/binderator/.config/dotnet-tools.json index c095b73d..3e485d62 100644 --- a/binderator/.config/dotnet-tools.json +++ b/binderator/.config/dotnet-tools.json @@ -9,7 +9,7 @@ ] }, "xamarin.androidbinderator.tool": { - "version": "0.5.4", + "version": "0.5.7", "commands": [ "xamarin-android-binderator" ] From 117b6c40de4a66b46639157598e1bb1e167b3ccb Mon Sep 17 00:00:00 2001 From: Josh Yaganeh <319444+jyaganeh@users.noreply.github.com> Date: Fri, 3 Nov 2023 16:02:18 -0700 Subject: [PATCH 17/28] Fix androidx lifecycle version warning --- binderator/config.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/binderator/config.json b/binderator/config.json index 9fa4cc3d..4455d080 100644 --- a/binderator/config.json +++ b/binderator/config.json @@ -146,7 +146,7 @@ "groupId": "androidx.lifecycle", "artifactId": "lifecycle-common", "version": "2.5.1", - "nugetVersion": "2.5.1.2", + "nugetVersion": "2.5.1.1", "nugetId": "Xamarin.AndroidX.Lifecycle.Common", "dependencyOnly": true }, @@ -154,7 +154,7 @@ "groupId": "androidx.lifecycle", "artifactId": "lifecycle-common-java8", "version": "2.5.1", - "nugetVersion": "2.5.1.2", + "nugetVersion": "2.5.1.1", "nugetId": "Xamarin.AndroidX.Lifecycle.Common.Java8", "dependencyOnly": true }, @@ -162,7 +162,7 @@ "groupId": "androidx.lifecycle", "artifactId": "lifecycle-runtime-ktx", "version": "2.5.1", - "nugetVersion": "2.5.1.2", + "nugetVersion": "2.5.1.1", "nugetId": "Xamarin.AndroidX.Lifecycle.Runtime.Ktx", "dependencyOnly": true }, @@ -170,7 +170,7 @@ "groupId": "androidx.lifecycle", "artifactId": "lifecycle-viewmodel-ktx", "version": "2.5.1", - "nugetVersion": "2.5.1.2", + "nugetVersion": "2.5.1.1", "nugetId": "Xamarin.AndroidX.Lifecycle.ViewModel.Ktx", "dependencyOnly": true }, From 92945b5503b021512724130c2908d51cca9e145e Mon Sep 17 00:00:00 2001 From: khmMouna Date: Tue, 7 Nov 2023 18:08:02 +0100 Subject: [PATCH 18/28] Revert supportedOSPlateform version --- MauiSample/MauiSample.csproj | 2 +- src/Airship.Net.MessageCenter/Airship.Net.MessageCenter.csproj | 2 +- src/Airship.Net/Airship.Net.csproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MauiSample/MauiSample.csproj b/MauiSample/MauiSample.csproj index 0c7d1f07..6e423149 100644 --- a/MauiSample/MauiSample.csproj +++ b/MauiSample/MauiSample.csproj @@ -18,7 +18,7 @@ 1.0 1 14.0 - 33.0 + 21.0 True diff --git a/src/Airship.Net.MessageCenter/Airship.Net.MessageCenter.csproj b/src/Airship.Net.MessageCenter/Airship.Net.MessageCenter.csproj index 5e038c55..6305107b 100644 --- a/src/Airship.Net.MessageCenter/Airship.Net.MessageCenter.csproj +++ b/src/Airship.Net.MessageCenter/Airship.Net.MessageCenter.csproj @@ -11,7 +11,7 @@ false 14.0 - 33.0 + 21.0 diff --git a/src/Airship.Net/Airship.Net.csproj b/src/Airship.Net/Airship.Net.csproj index cfd6a995..337bb3a9 100644 --- a/src/Airship.Net/Airship.Net.csproj +++ b/src/Airship.Net/Airship.Net.csproj @@ -11,7 +11,7 @@ false 14.0 - 33.0 + 21.0 From c475df59a40889043f83a2ce79861b3b1678f724 Mon Sep 17 00:00:00 2001 From: Josh Yaganeh <319444+jyaganeh@users.noreply.github.com> Date: Tue, 7 Nov 2023 14:09:19 -0800 Subject: [PATCH 19/28] Bump Android SDK to 17.4.1 --- airship.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airship.properties b/airship.properties index 14b4dad7..7a80ab16 100644 --- a/airship.properties +++ b/airship.properties @@ -1,6 +1,6 @@ # Airship native SDK versions iosVersion = 17.5.1 -androidVersion = 17.4.0 +androidVersion = 17.4.1 # Airship.Net cross-platform version crossPlatformVersion = 18.0.0 From ea432ffb76363c18e38501823acd9e0eb9068984 Mon Sep 17 00:00:00 2001 From: khmMouna Date: Wed, 8 Nov 2023 10:37:55 +0100 Subject: [PATCH 20/28] Update Codeowners list --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 3bcd54da..52fc53f6 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,2 +1,2 @@ # https://help.github.com/en/articles/about-code-owners -* @BrianBatchelder @marc-scig @crow @rlepinski \ No newline at end of file +* @crow @rlepinski @khmMouna @oristanovic @Apekka @Ulrico972 @jyaganeh From b1605484afb780682ee4d5255d4c047ce33a354e Mon Sep 17 00:00:00 2001 From: Josh Yaganeh <319444+jyaganeh@users.noreply.github.com> Date: Wed, 8 Nov 2023 14:11:35 -0800 Subject: [PATCH 21/28] Fix MC android target, clean up extended actions refs --- src/Airship.Net.MessageCenter/Airship.Net.MessageCenter.csproj | 3 +-- src/Airship.Net/Airship.Net.csproj | 1 - src/AirshipBindings.iOS/AirshipBindings.iOS.csproj | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Airship.Net.MessageCenter/Airship.Net.MessageCenter.csproj b/src/Airship.Net.MessageCenter/Airship.Net.MessageCenter.csproj index 6305107b..41526b55 100644 --- a/src/Airship.Net.MessageCenter/Airship.Net.MessageCenter.csproj +++ b/src/Airship.Net.MessageCenter/Airship.Net.MessageCenter.csproj @@ -1,7 +1,7 @@ - net7.0;net7.0-android33.0;net7.0-ios + net7.0;net7.0-android;net7.0-ios true true enable @@ -51,7 +51,6 @@ - diff --git a/src/Airship.Net/Airship.Net.csproj b/src/Airship.Net/Airship.Net.csproj index 337bb3a9..9dafbea6 100644 --- a/src/Airship.Net/Airship.Net.csproj +++ b/src/Airship.Net/Airship.Net.csproj @@ -43,7 +43,6 @@ - diff --git a/src/AirshipBindings.iOS/AirshipBindings.iOS.csproj b/src/AirshipBindings.iOS/AirshipBindings.iOS.csproj index 2ec36cb8..2d77ecb5 100644 --- a/src/AirshipBindings.iOS/AirshipBindings.iOS.csproj +++ b/src/AirshipBindings.iOS/AirshipBindings.iOS.csproj @@ -41,7 +41,6 @@ - From 9b6489bd61e6c80c04544c00bf039979c8d899db Mon Sep 17 00:00:00 2001 From: Josh Yaganeh <319444+jyaganeh@users.noreply.github.com> Date: Wed, 8 Nov 2023 14:12:29 -0800 Subject: [PATCH 22/28] Fix crash in iOS MessageViewHandler --- .../Handlers/MessageViewHandler.iOS.cs | 49 ++++++++++--------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/src/Airship.Net.MessageCenter/Handlers/MessageViewHandler.iOS.cs b/src/Airship.Net.MessageCenter/Handlers/MessageViewHandler.iOS.cs index 7042157c..d035a2cf 100644 --- a/src/Airship.Net.MessageCenter/Handlers/MessageViewHandler.iOS.cs +++ b/src/Airship.Net.MessageCenter/Handlers/MessageViewHandler.iOS.cs @@ -31,25 +31,7 @@ public partial class MessageViewHandler : ViewHandler public MessageViewHandler() : base(MessageViewMapper) { - UAMessageCenter.Shared.Inbox.GetUser(currentUser => - { - UAMessageCenter.Shared.Inbox.MessageForID(messageId, currentMmessage => - { - user = currentUser; - message = currentMmessage; - - nativeBridgeDelegate = new(this); - navigationDelegate = new(this); - nativeBridge = new() - { - ForwardNavigationDelegate = navigationDelegate, - NativeBridgeDelegate = nativeBridgeDelegate, - NativeBridgeExtensionDelegate = new UAMessageCenterNativeBridgeExtension(message, user) - }; - - }); - }); } protected override WKWebView CreatePlatformView() @@ -57,8 +39,7 @@ protected override WKWebView CreatePlatformView() return new(UIScreen.MainScreen.Bounds, new WKWebViewConfiguration()) { AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight, - TranslatesAutoresizingMaskIntoConstraints = true, - NavigationDelegate = nativeBridge + TranslatesAutoresizingMaskIntoConstraints = true }; } @@ -66,10 +47,34 @@ private static void MapMessageId(MessageViewHandler handler, IMessageView entry) { if (entry.MessageId != null) { - handler.LoadMessage(entry.MessageId, result => + handler.LoadUser(entry.MessageId, result => { }); + } + } + + public void LoadUser(string messageId, Action result) + { + UAMessageCenter.Shared.Inbox.GetUser(currentUser => + { + UAMessageCenter.Shared.Inbox.MessageForID(messageId, currentMessage => { + user = currentUser; + message = currentMessage; + + nativeBridgeDelegate = new(this); + navigationDelegate = new(this); + + nativeBridge = new() + { + ForwardNavigationDelegate = navigationDelegate, + NativeBridgeDelegate = nativeBridgeDelegate, + NativeBridgeExtensionDelegate = new UAMessageCenterNativeBridgeExtension(message, user) + }; + + PlatformView.NavigationDelegate = nativeBridge; + + LoadMessage(messageId, result); }); - } + }); } public void LoadMessage(string messageId, Action result) From 17c9f522bbe1f4c495bacded83b1db481e8d94f0 Mon Sep 17 00:00:00 2001 From: Josh Yaganeh <319444+jyaganeh@users.noreply.github.com> Date: Wed, 8 Nov 2023 14:15:49 -0800 Subject: [PATCH 23/28] Update build props and binderator config for Android 17.4.1 --- Directory.Build.props | 4 ++-- binderator/config.json | 36 ++++++++++++++++++------------------ 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 3ba9f176..9aa2af7c 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -5,8 +5,8 @@ - 17.4.0 - 17.4.0 + 17.4.1 + 17.4.1 17.5.1 17.5.1 diff --git a/binderator/config.json b/binderator/config.json index 4455d080..139c9497 100644 --- a/binderator/config.json +++ b/binderator/config.json @@ -17,72 +17,72 @@ { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-adm", - "version": "17.4.0", - "nugetVersion": "17.4.0", + "version": "17.4.1", + "nugetVersion": "17.4.1", "nugetId": "Airship.Net.Android.Adm", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-automation", - "version": "17.4.0", - "nugetVersion": "17.4.0", + "version": "17.4.1", + "nugetVersion": "17.4.1", "nugetId": "Airship.Net.Android.Automation", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-core", - "version": "17.4.0", - "nugetVersion": "17.4.0", + "version": "17.4.1", + "nugetVersion": "17.4.1", "nugetId": "Airship.Net.Android.Core", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-fcm", - "version": "17.4.0", - "nugetVersion": "17.4.0", + "version": "17.4.1", + "nugetVersion": "17.4.1", "nugetId": "Airship.Net.Android.Fcm", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-feature-flag", - "version": "17.4.0", - "nugetVersion": "17.4.0", + "version": "17.4.1", + "nugetVersion": "17.4.1", "nugetId": "Airship.Net.Android.FeatureFlag", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-layout", - "version": "17.4.0", - "nugetVersion": "17.4.0", + "version": "17.4.1", + "nugetVersion": "17.4.1", "nugetId": "Airship.Net.Android.Layout", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-live-update", - "version": "17.4.0", - "nugetVersion": "17.4.0", + "version": "17.4.1", + "nugetVersion": "17.4.1", "nugetId": "Airship.Net.Android.LiveUpdate", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-message-center", - "version": "17.4.0", - "nugetVersion": "17.4.0", + "version": "17.4.1", + "nugetVersion": "17.4.1", "nugetId": "Airship.Net.Android.MessageCenter", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-preference-center", - "version": "17.4.0", - "nugetVersion": "17.4.0", + "version": "17.4.1", + "nugetVersion": "17.4.1", "nugetId": "Airship.Net.Android.PreferenceCenter", "dependencyOnly": false }, From c415d168fc157ac762cdd4c670b702dc5e56a9fe Mon Sep 17 00:00:00 2001 From: Josh Yaganeh <319444+jyaganeh@users.noreply.github.com> Date: Wed, 8 Nov 2023 15:39:58 -0800 Subject: [PATCH 24/28] Minor cleanups --- Airship.Android.slnf | 14 -- Airship.Net.sln | 18 +-- Airship.iOS.slnf | 14 -- documentation/migration-guide-fcm.md | 17 --- tools/sort-sharpie-output | 211 --------------------------- 5 files changed, 7 insertions(+), 267 deletions(-) delete mode 100644 Airship.Android.slnf delete mode 100644 Airship.iOS.slnf delete mode 100644 documentation/migration-guide-fcm.md delete mode 100755 tools/sort-sharpie-output diff --git a/Airship.Android.slnf b/Airship.Android.slnf deleted file mode 100644 index ee4aa059..00000000 --- a/Airship.Android.slnf +++ /dev/null @@ -1,14 +0,0 @@ -{ - "solution":{ - "path":"Airship.Net.sln", - "projects":[ - "binderator\\generated\\airship.android.core\\airship.android.core.csproj", - "binderator\\generated\\airship.android.adm\\airship.android.adm.csproj", - "binderator\\generated\\airship.android.layout\\airship.android.layout.csproj", - "binderator\\generated\\airship.android.automation\\airship.android.automation.csproj", - "binderator\\generated\\airship.android.fcm\\airship.android.fcm.csproj", - "binderator\\generated\\airship.android.messagecenter\\airship.android.messagecenter.csproj", - "binderator\\generated\\airship.android.preferencecenter\\airship.android.preferencecenter.csproj" - ] - } -} \ No newline at end of file diff --git a/Airship.Net.sln b/Airship.Net.sln index b7e78af0..7cec7262 100644 --- a/Airship.Net.sln +++ b/Airship.Net.sln @@ -3,19 +3,19 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 25.0.1704.2 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "airship.android.core", "binderator\generated\airship.android.core\airship.android.core.csproj", "{BC06FD4D-9116-49FF-AF27-B3C5E7E10125}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.Android.Core", "binderator\generated\Airship.Net.Android.Core\Airship.Net.Android.Core.csproj", "{BC06FD4D-9116-49FF-AF27-B3C5E7E10125}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "airship.android.adm", "binderator\generated\airship.android.adm\airship.android.adm.csproj", "{DCD3C3FE-6B8D-463E-850E-27BC8A3F0470}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.Android.Adm", "binderator\generated\Airship.Net.Android.Adm\Airship.Net.Android.Adm.csproj", "{DCD3C3FE-6B8D-463E-850E-27BC8A3F0470}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "airship.android.layout", "binderator\generated\airship.android.layout\airship.android.layout.csproj", "{2F36FE2F-A1F6-4762-B6FB-6ADDB16C7A5B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.Android.Layout", "binderator\generated\Airship.Net.Android.Layout\Airship.Net.Android.Layout.csproj", "{2F36FE2F-A1F6-4762-B6FB-6ADDB16C7A5B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "airship.android.automation", "binderator\generated\airship.android.automation\airship.android.automation.csproj", "{58478FE8-9760-40C3-9016-9435564C011E}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.Android.Automation", "binderator\generated\Airship.Net.Android.Automation\Airship.Net.Android.Automation.csproj", "{58478FE8-9760-40C3-9016-9435564C011E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "airship.android.fcm", "binderator\generated\airship.android.fcm\airship.android.fcm.csproj", "{82685167-9AAB-4CFF-B686-9D678B54297F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.Android.Fcm", "binderator\generated\Airship.Net.Android.Fcm\Airship.Net.Android.Fcm.csproj", "{82685167-9AAB-4CFF-B686-9D678B54297F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "airship.android.messagecenter", "binderator\generated\airship.android.messagecenter\airship.android.messagecenter.csproj", "{107BE8E5-E5FB-461E-B812-97834B04B5EA}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.Android.MessageCenter", "binderator\generated\Airship.Net.Android.MessageCenter\Airship.Net.Android.MessageCenter.csproj", "{107BE8E5-E5FB-461E-B812-97834B04B5EA}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "airship.android.preferencecenter", "binderator\generated\airship.android.preferencecenter\airship.android.preferencecenter.csproj", "{E99F9D88-6E68-46D8-9A8A-651C8490E59C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.Android.PreferenceCenter", "binderator\generated\Airship.Net.Android.PreferenceCenter\Airship.Net.Android.PreferenceCenter.csproj", "{E99F9D88-6E68-46D8-9A8A-651C8490E59C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirshipBindings.iOS.Basement", "src\AirshipBindings.iOS.Basement\AirshipBindings.iOS.Basement.csproj", "{5E85A7FD-8C42-4DE6-B002-E3CC2DA529C7}" EndProject @@ -34,10 +34,6 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirshipBindings.iOS.PreferenceCenter", "src\AirshipBindings.iOS.PreferenceCenter\AirshipBindings.iOS.PreferenceCenter.csproj", "{13E9ACF2-4FE5-4FA6-96C4-BDFB6FF7C3A0}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F4B616B3-15BA-45DB-AA24-97270963158F}" - ProjectSection(SolutionItems) = preProject - Airship.iOS.slnf = Airship.iOS.slnf - Airship.Android.slnf = Airship.Android.slnf - EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.MessageCenter", "src\Airship.Net.MessageCenter\Airship.Net.MessageCenter.csproj", "{F429D476-7186-4C55-A5B6-60FA62215E78}" EndProject diff --git a/Airship.iOS.slnf b/Airship.iOS.slnf deleted file mode 100644 index 530b35f5..00000000 --- a/Airship.iOS.slnf +++ /dev/null @@ -1,14 +0,0 @@ -{ - "solution":{ - "path":"Airship.Net.sln", - "projects":[ - "src\\AirshipBindings.iOS.Basement\\AirshipBindings.iOS.Basement.csproj", - "src\\AirshipBindings.iOS.Core\\AirshipBindings.iOS.Core.csproj", - "src\\AirshipBindings.iOS.Automation\\AirshipBindings.iOS.Automation.csproj", - "src\\AirshipBindings.iOS.MessageCenter\\AirshipBindings.iOS.MessageCenter.csproj", - "src\\AirshipBindings.iOS.NotificationContentExtension\\AirshipBindings.iOS.NotificationContentExtension.csproj", - "src\\AirshipBindings.iOS.NotificationServiceExtension\\AirshipBindings.iOS.NotificationServiceExtension.csproj", - "src\\AirshipBindings.iOS.PreferenceCenter\\AirshipBindings.iOS.PreferenceCenter.csproj" - ] - } -} diff --git a/documentation/migration-guide-fcm.md b/documentation/migration-guide-fcm.md deleted file mode 100644 index 98945016..00000000 --- a/documentation/migration-guide-fcm.md +++ /dev/null @@ -1,17 +0,0 @@ -### FCM Migration - -FCM migration is optional, but recommended as Google deprecated GCM and is planning on dropping -GCM client APIs in April of 2019. For more info, please read the [GCM F.A.Q](https://developers.google.com/cloud-messaging/faq). - -Airship supports the FCM client library starting in SDK 9.1.0. It is available in a new package -`urbanairship.android.fcm`. The FCM package is not compatible with the deprecated package `UrbanAirship`. - -Migration Steps: - -- [Add Firebase to your app](https://firebase.google.com/docs/android/setup#add_firebase_to_your_app). -- [Import your GCM project as a Firebase project](https://developers.google.com/cloud-messaging/android/android-migrate-fcm#import-your-gcm-project-as-a-firebase-project). -- In your Android app, replace the `UrbanAirship` package with the new `urbanairship.android.core` and `urbanairship.android.fcm` packages. - -See also the [Android SDK FCM Migration Guide](https://github.com/urbanairship/android-library/blob/main/documentation/migration/migration-guide-fcm.md). - -More information on Xamarin SDK can be found in our [Xamarin Platform Guide](https://docs.urbanairship.com/platform/xamarin/). \ No newline at end of file diff --git a/tools/sort-sharpie-output b/tools/sort-sharpie-output deleted file mode 100755 index 83a8ee36..00000000 --- a/tools/sort-sharpie-output +++ /dev/null @@ -1,211 +0,0 @@ -#! /usr/bin/perl -n0 - -# Copyright Airship and Contributors - -# To prepare UA's ApiDefinitions.cs file for sorting, first remove `namespace UrbanAirship {', the closing '}', -# and then unindent everything that was in the namespace one tab. The inner blocks should still be indented. -# Xamarin-generated ApiDefinitions.cs files work fine without any changes. - -# loop through stdin, sort appropriately, and write to stdout -while ( - (s/(^(\/\*(.|\n)*\*\/)(\n|\Z))//m) - || (s/(^(using.*)(\n|\Z))//m) - || (s/(^(\[Static.+(.|\n)*?^.\n)(\n|\Z))//m) - || (s/(^(\[Native.+(.|\n)*?^.\n)(\n|\Z))//m) - || (s/(^(static class CFunctions(.|\n)*?^.\n)(\n|\Z))//m) - || (s/(^(\/\/(.|\n)*?))((?=^\/\/)|\Z)//m) - ) { - - $lines = $1; - @arrayOfLines=(split /\n/, $lines); - - if ($lines =~ /^\/\*/) { - # just echo out any comment header - print $lines; - } elsif ($lines =~ /^using/) { - # sort the `using blah;` statements - push @usingStatements,$lines; - } elsif ($lines =~ /^\[Static/) { - # combine and sort the `Static` sections - @arrayOfLines=(split /\n/, $lines); - shift @arrayOfLines; - - if ($arrayOfLines[0] =~ /^\[Verify \(ConstantsInterfaceAssociation\)\]/) { - $includeVerifyLine = 1; - shift @arrayOfLines; # remove "[Verify..." - } else { - $includeVerifyLine = 0; - } - - if ($arrayOfLines[0] !~ /^partial interface Constants/) { - print "2 ERROR: Couldn't parse file"; - exit 1; - } - shift @arrayOfLines; # remove "partial interface..." - - if ($arrayOfLines[0] !~ /^\{\s*$/) { - print "3 ERROR: Couldn't parse file"; - exit 1; - } - shift @arrayOfLines; # remove starting bracket - - if ($arrayOfLines[$#arrayOfLines] !~ /^\}\s*$/) { - print "4 ERROR: Couldn't parse file"; - exit 1; - } - pop @arrayOfLines; # remove closing bracket - - # break up into separate groups of definitions, then sort - while ($#arrayOfLines >= 0) { - @definition = (); - if ($arrayOfLines[0] !~ /^\s*\/\/.*$/) { - print "5 ERROR: Couldn't parse file - expecting comment - got: ", $arrayOfLines[0]; - exit 1; - } - - $comment = $arrayOfLines[0]; - shift @arrayOfLines; - - while (($#arrayOfLines >= 0) && ($arrayOfLines[0] !~ /^\s*\/\/.*$/)) { - if ($arrayOfLines[0] !~ /^$/) { - push @definition, $arrayOfLines[0]; - } - shift @arrayOfLines; - } - - $static{$comment}=[] unless exists $static{$comment}; - push @{static{$comment}},@definition; - } - } elsif ($lines =~ /^\[Native/) { - # sort the `[Native]` sections - @nativeDef=(split /\n/, $lines); - shift @nativeDef; - $str=$nativeDef[0]; - shift @nativeDef; - $nativeDefs{$str}=[] unless exists $nativeDefs{$str}; - push @{nativeDefs{$str}},@nativeDef; - } elsif ($lines =~ /^static class CFunctions/) { - # just echo any `static class CFunctions` classes - @staticClassCFunctions = (split /\n/, $lines); - } else { - # sort the rest of the API definitions - @arrayOfLines=(split /\n/, $lines); - $definition=$arrayOfLines[0]; - ${apiDefinitions{$definition}}=[] unless exists $apiDefinitions{$definition}; - $completeDefinition = ""; - $foundOpeningParenthesis = 0; - # break up into separate groups of definitions, then sort - while (($#arrayOfLines >= 0) && ($arrayOfLines[0] !~ /^\t/)) { - if ($arrayOfLines[0] =~ /^{$/) { - $foundOpeningParenthesis = 1; - } - if ($arrayOfLines[0] !~ /^}$/) { - $completeDefinition .= $arrayOfLines[0] . "\n"; - } - shift @arrayOfLines; - } - - my $thisDefinitionsSubDefinitions = {}; - while (($#arrayOfLines >= 0) && ($arrayOfLines[0] !~ /^\/\//)) { - @thisSubDefinition = (); - push @thisSubDefinition, $arrayOfLines[0]; - shift @arrayOfLines; - while (($#arrayOfLines >= 0) && ($arrayOfLines[0] !~ /^\t*$/) && ($arrayOfLines[0] !~ /^\t\/\//)) { - push @thisSubDefinition, $arrayOfLines[0]; - shift @arrayOfLines; - } - if (($#arrayOfLines >= 0) && ($arrayOfLines[0] !~ /^\t\/\//)) { - push @thisSubDefinition, $arrayOfLines[0]; - shift @arrayOfLines; - } - $thisDefinitionsSubDefinitions{$thisSubDefinition[0]}=[]; - push @{thisDefinitionsSubDefinitions{$thisSubDefinition[0]}},@thisSubDefinition; - } - - foreach $key (sort keys %thisDefinitionsSubDefinitions) { - foreach ( @{$thisDefinitionsSubDefinitions{$key}} ) { - if ($_ !~ /^}$/) { - $completeDefinition .= $_ . "\n"; - } - } - if ($completeDefinition !~ /\n\n$/) { - $completeDefinition .= "\n"; - } - delete $thisDefinitionsSubDefinitions{$key}; - } - # remove extra new-line - if ($completeDefinition =~ /\n\n$/) { - chop($completeDefinition); - } - - if ($foundOpeningParenthesis) { - $completeDefinition .= "}"; - } - - $completeDefinition .= "\n"; - - push @{apiDefinitions{$definition}},$completeDefinition; - } -} - -if ($#usingStatements >= 0) { - @usingStatements = sort @usingStatements; - print join("",@usingStatements); - print "\n"; -} - -print "namespace UrbanAirship {\n"; -print "\n"; - -if (%static) { - print "\t[Static]\n"; - if ($includeVerifyLine) { - print "\t[Verify (ConstantsInterfaceAssociation)]\n"; - } - print "\tpartial interface Constants\n"; - print "\t{\n"; - foreach $key (sort keys %static) { - print "\t" . $key . "\n"; - foreach ( @{$static{$key}} ) { - print "\t" . $_ . "\n"; - } - print "\n"; - } - print "\t}\n"; - print "\n"; -} - -if (%nativeDefs) { - foreach $key (sort keys %nativeDefs) { - print "\t[Native]\n"; - print "\t" . $key . "\n"; - foreach ( @{$nativeDefs{$key}} ) { - print "\t" . $_ . "\n"; - } - print "\n"; - } - print "\n"; -} - -foreach $key (sort keys %apiDefinitions) { - foreach ( @{$apiDefinitions{$key}} ) { - @linesForThisKey = (split /\n/, $_); - foreach (@linesForThisKey) { - if (length($_) > 0) { - print "\t" . $_ . "\n"; - } else { - print "\n"; - } - } - print "\n"; - } -} - -if ($#staticClassCFunctions >= 0) { - foreach ( @staticClassCFunctions) { - print "\t" . $_ . "\n"; - } - -} -print "}\n"; - From 7797c94430f2c92f2e6ea5416a7cdbff31458724 Mon Sep 17 00:00:00 2001 From: Josh Yaganeh <319444+jyaganeh@users.noreply.github.com> Date: Wed, 8 Nov 2023 15:40:33 -0800 Subject: [PATCH 25/28] Add migration guide --- MIGRATION.md | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 MIGRATION.md diff --git a/MIGRATION.md b/MIGRATION.md new file mode 100644 index 00000000..c9cd6e29 --- /dev/null +++ b/MIGRATION.md @@ -0,0 +1,68 @@ +# Migration Guide + +## 17.x to 18.x + +### .NET Version + +This version of the plugin now requires .NET 7.0 (`net7.0-android` and `net7.0-ios`) as the min target framework. + +### Minimum iOS Version + +This version of the plugin now requires iOS 14+ as the min deployment target and Xcode 14.3+. + +### iOS Log Levels + +The `TRACE` level has been renamed to `VERBOSE`, for consistency with other platforms/frameworks. + +### API Changes + +#### Methods + +| 17.x | 18.x | +|------|------| +| `Airship.Instance.NamedUser = "some named user ID";` | `Airship.Instance.IdentifyContact("some named user ID");` | +| `Airship.Instance.NamedUser = null;` | `Airship.Instance.ResetContact();` | +| `var namedUser = Airship.Instance.NamedUser;` | `Airship.Instance.GetNamedUser(namedUser => { ... });` | +| `Airship.Instance.EditNamedUserTagGroups();` | `Airship.Instance.EditContactTagGroups();` | +| `Airship.Instance.EditNamedUserAttributes();` | `Airship.Instance.EditContactAttributes();` | +| `var messages = Airship.Instance.InboxMessages;` | `Airship.Instance.InboxMessages(messages => { ... });` | +| `var count = Airship.Instance.MessageCenterUnreadCount;` | `Airship.Instance.MessageCenterUnreadCount(count => { ... });` | +| `var count = Airship.Instance.MessageCenterCount;` | `Airship.Instance.MessageCenterCount(count => { ... });` | + +### API Additions + +#### Push notification status Listener + +```csharp +Airship.Instance.OnPushNotificationStatusUpdate -= OnPushNotificationStatusEvent; + +private void OnPushNotificationStatusEvent(object sender, PushNotificationStatusEventArgs e) => +{ + bool isUserNotificationsEnabled = e.IsUserNotificationsEnabled; + // ... +}; +``` + +#### Editing Channel Subscription Lists + +```csharp +Airship.Instance.EditChannelSubscriptionLists() + .subscribe("food"); + .unsubscribe("sports"); + .apply(); +``` + +#### Editing Contact Subscription Lists + +```csharp +Airship.Instance.EditContactSubscriptionLists() + .subscribe("food", "app") + .unsubscribe("sports", "sms") + .apply() +``` + +### API Removals + +#### `Airship.Instance.OnChannelUpdate` + +Replace with either `OnChannelCreation` or `OnPushNotificationStatusUpdate`, depending on usage. \ No newline at end of file From b62f7449b844a2ee80fd9e364ee1f992cfa05e5a Mon Sep 17 00:00:00 2001 From: Josh Yaganeh <319444+jyaganeh@users.noreply.github.com> Date: Wed, 8 Nov 2023 16:27:18 -0800 Subject: [PATCH 26/28] Update changelog --- CHANGELOG.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 38b4d17d..a320d64d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,25 @@ # Airship Xamarin Changelog +## Version 18.0.0 - Nov 8, 2023 +Major release that updates to Airship SDK 17.x. This release adds support for Stories, In-App experiences downstream of a sequence in Journeys, and improves SDK auth. The .NET SDK now requires .NET 7.0 (`net7.0-android` and `net7.0-ios`) as the minimum target framework, and iOS 14+ as the minimum deployment version with Xcode 14.3+. + +## Changes +- Updated iOS SDK to 17.5.1 +- Updated Android SDK to 17.4.1 +- Added the ability to update Channel and Contact subscriptions to the common .NET library +- Removed Channel update listener in favor of a new notification status listener. +- Partially fixed issues with building from Windows Visual Studio. Linked Mac builds are not currently working. See [Known Issues](#known-issues) for more details. + +See the [Migration Guide](https://github.com/urbanairship/urbanairship-xamarin/tree/main/MIGRATION.md) for further details. + +## Known Issues + +Build/run via a linked Mac from Visual Studio on Windows is not currently working as expected. This appears to be a known issue and is expected to be fixed in the upcoming .NET 8 release. In our testing, this issue impacts other SDKs that make use of XCFrameworks, and is not limited to Airship SDKs. We will continue monitoring the situation and update with any new workarounds or fixes that become available. + +Builds and runs performed directly on a Mac are not impacted by this issue. + +Related issue: https://github.com/xamarin/xamarin-macios/issues/19173#issuecomment-1790490792 + ## Version 17.1.0 - July 24, 2023 Minor release that updates Airship SDKs to the latest 16.x releases and fixes issues with bitcode for iOS. From 7ad7248af77aa8781687ba76d5bca86990337c0d Mon Sep 17 00:00:00 2001 From: Josh Yaganeh <319444+jyaganeh@users.noreply.github.com> Date: Fri, 10 Nov 2023 14:13:59 -0800 Subject: [PATCH 27/28] Bump to latest SDKs --- CHANGELOG.md | 9 ++++----- Cartfile | 2 +- Directory.Build.props | 8 ++++---- airship.properties | 4 ++-- binderator/config.json | 36 ++++++++++++++++++------------------ 5 files changed, 29 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a320d64d..a136579c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,19 +1,18 @@ # Airship Xamarin Changelog -## Version 18.0.0 - Nov 8, 2023 +## Version 18.0.0 - Nov 10, 2023 Major release that updates to Airship SDK 17.x. This release adds support for Stories, In-App experiences downstream of a sequence in Journeys, and improves SDK auth. The .NET SDK now requires .NET 7.0 (`net7.0-android` and `net7.0-ios`) as the minimum target framework, and iOS 14+ as the minimum deployment version with Xcode 14.3+. ## Changes -- Updated iOS SDK to 17.5.1 -- Updated Android SDK to 17.4.1 +- Updated iOS SDK to 17.6.0 +- Updated Android SDK to 17.5.0 - Added the ability to update Channel and Contact subscriptions to the common .NET library - Removed Channel update listener in favor of a new notification status listener. - Partially fixed issues with building from Windows Visual Studio. Linked Mac builds are not currently working. See [Known Issues](#known-issues) for more details. -See the [Migration Guide](https://github.com/urbanairship/urbanairship-xamarin/tree/main/MIGRATION.md) for further details. +See the [Migration Guide](https://github.com/urbanairship/airship-dotnet/tree/main/MIGRATION.md) for further details. ## Known Issues - Build/run via a linked Mac from Visual Studio on Windows is not currently working as expected. This appears to be a known issue and is expected to be fixed in the upcoming .NET 8 release. In our testing, this issue impacts other SDKs that make use of XCFrameworks, and is not limited to Airship SDKs. We will continue monitoring the situation and update with any new workarounds or fixes that become available. Builds and runs performed directly on a Mac are not impacted by this issue. diff --git a/Cartfile b/Cartfile index 43f46aed..95da7b72 100644 --- a/Cartfile +++ b/Cartfile @@ -1 +1 @@ -github "urbanairship/ios-library" == 17.5.1 +github "urbanairship/ios-library" == 17.6.0 diff --git a/Directory.Build.props b/Directory.Build.props index 9aa2af7c..b3a7e0c6 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -5,11 +5,11 @@ - 17.4.1 - 17.4.1 + 17.5.0 + 17.5.0 - 17.5.1 - 17.5.1 + 17.6.0 + 17.6.0 18.0.0 diff --git a/airship.properties b/airship.properties index 7a80ab16..4aebbab0 100644 --- a/airship.properties +++ b/airship.properties @@ -1,6 +1,6 @@ # Airship native SDK versions -iosVersion = 17.5.1 -androidVersion = 17.4.1 +iosVersion = 17.6.0 +androidVersion = 17.5.0 # Airship.Net cross-platform version crossPlatformVersion = 18.0.0 diff --git a/binderator/config.json b/binderator/config.json index 139c9497..14906f51 100644 --- a/binderator/config.json +++ b/binderator/config.json @@ -17,72 +17,72 @@ { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-adm", - "version": "17.4.1", - "nugetVersion": "17.4.1", + "version": "17.5.0", + "nugetVersion": "17.5.0", "nugetId": "Airship.Net.Android.Adm", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-automation", - "version": "17.4.1", - "nugetVersion": "17.4.1", + "version": "17.5.0", + "nugetVersion": "17.5.0", "nugetId": "Airship.Net.Android.Automation", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-core", - "version": "17.4.1", - "nugetVersion": "17.4.1", + "version": "17.5.0", + "nugetVersion": "17.5.0", "nugetId": "Airship.Net.Android.Core", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-fcm", - "version": "17.4.1", - "nugetVersion": "17.4.1", + "version": "17.5.0", + "nugetVersion": "17.5.0", "nugetId": "Airship.Net.Android.Fcm", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-feature-flag", - "version": "17.4.1", - "nugetVersion": "17.4.1", + "version": "17.5.0", + "nugetVersion": "17.5.0", "nugetId": "Airship.Net.Android.FeatureFlag", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-layout", - "version": "17.4.1", - "nugetVersion": "17.4.1", + "version": "17.5.0", + "nugetVersion": "17.5.0", "nugetId": "Airship.Net.Android.Layout", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-live-update", - "version": "17.4.1", - "nugetVersion": "17.4.1", + "version": "17.5.0", + "nugetVersion": "17.5.0", "nugetId": "Airship.Net.Android.LiveUpdate", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-message-center", - "version": "17.4.1", - "nugetVersion": "17.4.1", + "version": "17.5.0", + "nugetVersion": "17.5.0", "nugetId": "Airship.Net.Android.MessageCenter", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-preference-center", - "version": "17.4.1", - "nugetVersion": "17.4.1", + "version": "17.5.0", + "nugetVersion": "17.5.0", "nugetId": "Airship.Net.Android.PreferenceCenter", "dependencyOnly": false }, From 786f8e3985e94fbdb83a33b3655a15af1a41c8fc Mon Sep 17 00:00:00 2001 From: Josh Yaganeh <319444+jyaganeh@users.noreply.github.com> Date: Fri, 10 Nov 2023 14:20:10 -0800 Subject: [PATCH 28/28] Update release workflow --- .github/workflows/release.yaml | 58 ++++++++++++++++++---------------- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e84e4d76..5beb4fb7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -6,7 +6,7 @@ on: - "[0-9]+.[0-9]+.[0-9]+*" env: - DEVELOPER_DIR: /Applications/Xcode_14.3.1.app + DEVELOPER_DIR: /Applications/Xcode_15.0.app DOTNET_CLI_TELEMETRY_OPTOUT: 1 DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 DOTNET_NOLOGO: 1 @@ -20,7 +20,7 @@ jobs: - name: Get Version id: get_version - run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} + run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT - name: Verify Version run: | @@ -28,26 +28,30 @@ jobs: PLUGIN_VERSION=$(./gradlew -q getVersion) if [[ $PLUGIN_VERSION = $VERSION ]]; then exit 0 ; else exit 1; fi - - name: Get Release Notes + - name: Get the release notes id: get_release_notes + env: + VERSION: ${{ steps.get_version.outputs.VERSION }} run: | - VERSION=${{ steps.get_version.outputs.VERSION }} - NOTES="$(awk "/## Version $VERSION/{flag=1;next}/## Version/{flag=0}flag" CHANGELOG.md)" - NOTES="${NOTES//'%'/'%25'}" - NOTES="${NOTES//$'\n'/'%0A'}" - NOTES="${NOTES//$'\r'/'%0D'}" - echo ::set-output name=NOTES::"$NOTES" + delimiter="$(openssl rand -hex 8)" + { + echo "NOTES<<${delimiter}" + awk "/## Version $VERSION/{flag=1;next}/## Version/{flag=0}flag" CHANGELOG.md + echo ${delimiter} + } >> $GITHUB_OUTPUT - uses: actions/setup-python@v4 with: python-version: '3.9' - # - name: Setup GCP - # uses: google-github-actions/setup-gcloud@daadedc81d5f9d3c06d2c92f49202a3cc2b919ba # v0.2.1 - # with: - # version: '351.0.0' - # service_account_email: ${{ secrets.GCP_SA_EMAIL }} - # service_account_key: ${{ secrets.GCP_SA_KEY }} + - name: Setup GCP Auth + uses: google-github-actions/auth@v1 + with: + credentials_json: ${{ secrets.GCP_SA_KEY }} + + # Install gcloud, `setup-gcloud` automatically picks up authentication from `auth`. + - name: Set up Google Cloud SDK + uses: google-github-actions/setup-gcloud@v1 - name: Set up JDK 11 uses: actions/setup-java@v3 @@ -55,7 +59,7 @@ jobs: distribution: 'temurin' java-version: '11' - - name: Set up .NET 6.0 + - name: Set up .NET uses: actions/setup-dotnet@v3 with: global-json-file: global.json @@ -64,25 +68,19 @@ jobs: run: | dotnet workload install android ios maui-android maui-ios maui-maccatalyst - # - name: Install doc dependencies - # run: | - # brew install doxygen - # brew install graphviz + - name: Install doc dependencies + run: | + brew install doxygen + brew install graphviz - name: Build - #run: ./gradlew build pack packageDocs - run: ./gradlew build pack + run: ./gradlew build pack packageDocs - name: Publish Nugets env: NUGET_PRODUCTION_API_KEY: ${{ secrets.NUGET_PRODUCTION_API_KEY }} run: ./gradlew publishToProduction - # - name: Upload Docs - # run: | - # VERSION=${{ steps.get_version.outputs.VERSION }} - # gsutil cp docs/build/$VERSION.tar.gz gs://ua-web-ci-prod-docs-transfer/libraries/maui/$VERSION.tar.gz - - name: Create Github Release uses: actions/create-release@v1.0.1 env: @@ -93,3 +91,9 @@ jobs: body: ${{ steps.get_release_notes.outputs.NOTES }} draft: false prerelease: false + + - name: Upload Docs + run: | + VERSION=${{ steps.get_version.outputs.VERSION }} + gsutil cp docs/build/$VERSION.tar.gz gs://ua-web-ci-prod-docs-transfer/libraries/maui/$VERSION.tar.gz +