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/CHANGELOG.md b/CHANGELOG.md index 38b4d17d..22a47402 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Airship Xamarin Changelog +## Version 18.0.0 - October 19, 2023 +Major release that updates Airship SDKs to the latest 17.x releases. + +### Changes +- Updated iOS SDK to 17.5.0 +- Updated Android SDK to 17.3.0 +- Added the ability to update Channel and Contact subscriptions to the .Net library +- Removed Channel update listener in favor of a new notification status listener. + ## 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. 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 7f8d1b65..3ba9f176 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -5,15 +5,15 @@ - 16.11.1 - 16.11.1 + 17.4.0 + 17.4.0 - 16.12.3 - 16.12.3 + 17.5.1 + 17.5.1 - 17.1.0 - 17.1.0 + 18.0.0 + 18.0.0 diff --git a/MauiSample.sln b/MauiSample.sln index 2e6e10b2..3b665940 100644 --- a/MauiSample.sln +++ b/MauiSample.sln @@ -1,4 +1,4 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 17.0.31611.283 @@ -23,8 +23,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.iOS.Automation" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.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}" -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}" diff --git a/MauiSample/AppShell.xaml b/MauiSample/AppShell.xaml index 604af4b2..d2df7dfc 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/HomePageViewModel.cs b/MauiSample/HomePageViewModel.cs index aaeb5d71..c17f4a37 100644 --- a/MauiSample/HomePageViewModel.cs +++ b/MauiSample/HomePageViewModel.cs @@ -1,4 +1,4 @@ -using System.ComponentModel; +using System.ComponentModel; using System.Runtime.CompilerServices; using AirshipDotNet; using System.Windows.Input; @@ -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,13 @@ public HomePageViewModel() ~HomePageViewModel() { Airship.Instance.OnChannelCreation -= OnChannelEvent; - Airship.Instance.OnChannelUpdate -= OnChannelEvent; + Airship.Instance.OnPushNotificationStatusUpdate -= OnPushNotificationStatusEvent; } private void OnChannelEvent(object sender, EventArgs e) => Refresh(); - + + private void OnPushNotificationStatusEvent(object sender, EventArgs e) => Refresh(); + public void Refresh() { ChannelId = Airship.Instance.ChannelId; @@ -115,4 +117,4 @@ private static void OpenPreferenceCenter(string prefCenterId) #endif } } -} \ No newline at end of file +} diff --git a/MauiSample/MauiSample.csproj b/MauiSample/MauiSample.csproj index d0897cff..51e03826 100644 --- a/MauiSample/MauiSample.csproj +++ b/MauiSample/MauiSample.csproj @@ -1,7 +1,7 @@  - net6.0-android;net6.0-ios + net6.0-android33.0;net6.0-ios Exe MauiSample true @@ -17,7 +17,7 @@ 1.0 1 - 13.0 + 14.0 21.0 True diff --git a/MauiSample/MessageCenterPage.xaml.cs b/MauiSample/MessageCenterPage.xaml.cs index 9ccbed3a..6424bdfa 100644 --- a/MauiSample/MessageCenterPage.xaml.cs +++ b/MauiSample/MessageCenterPage.xaml.cs @@ -1,4 +1,4 @@ -using System.Windows.Input; +using System.Windows.Input; using AirshipDotNet; using AirshipDotNet.MessageCenter; using AirshipDotNet.MessageCenter.Controls; @@ -27,10 +27,13 @@ protected override void OnAppearing() public void Refresh() { - Airship.Instance.FetchInboxMessages(success => + Airship.Instance.InboxMessages(messages => { - listView.ItemsSource = Airship.Instance.InboxMessages; - refreshView.IsRefreshing = false; + Device.BeginInvokeOnMainThread(() => + { + listView.ItemsSource = messages; + refreshView.IsRefreshing = false; + }); }); } 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/airship.properties b/airship.properties index e40412d3..840989ec 100644 --- a/airship.properties +++ b/airship.properties @@ -1,9 +1,9 @@ # Airship native SDK versions -iosVersion = 16.12.3 -androidVersion = 16.11.1 +iosVersion = 17.5.1 +androidVersion = 17.4.0 # Airship.Net cross-platform version -crossPlatformVersion = 17.1.0 +crossPlatformVersion = 18.0.0 # Filename of the iOS SDK zip file iosFrameworkZip = Airship-Xcode14.zip diff --git a/binderator/config.json b/binderator/config.json index 8b070fb2..872e21c5 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.4.0", + "nugetVersion": "17.4.0", "nugetId": "Airship.Net.Android.Adm", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-automation", - "version": "16.11.1", - "nugetVersion": "16.11.1", + "version": "17.4.0", + "nugetVersion": "17.4.0", "nugetId": "Airship.Net.Android.Automation", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-core", - "version": "16.11.1", - "nugetVersion": "16.11.1", + "version": "17.4.0", + "nugetVersion": "17.4.0", "nugetId": "Airship.Net.Android.Core", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-fcm", - "version": "16.11.1", - "nugetVersion": "16.11.1", + "version": "17.4.0", + "nugetVersion": "17.4.0", "nugetId": "Airship.Net.Android.Fcm", "dependencyOnly": false }, { "groupId": "com.urbanairship.android", "artifactId": "urbanairship-layout", - "version": "16.11.1", - "nugetVersion": "16.11.1", + "version": "17.4.0", + "nugetVersion": "17.4.0", "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.4.0", + "nugetVersion": "17.4.0", "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.4.0", + "nugetVersion": "17.4.0", "nugetId": "Airship.Net.Android.PreferenceCenter", "dependencyOnly": false }, diff --git a/src/Airship.Net.MessageCenter/Airship.Net.MessageCenter.csproj b/src/Airship.Net.MessageCenter/Airship.Net.MessageCenter.csproj index 260a8402..a4f83f40 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 + net6.0;net6.0-android33.0;net6.0-ios true true enable @@ -10,7 +10,7 @@ AirshipDotNet.MessageCenter false - 13.0 + 14.0 21.0 diff --git a/src/Airship.Net.MessageCenter/Handlers/MessageViewHandler.iOS.cs b/src/Airship.Net.MessageCenter/Handlers/MessageViewHandler.iOS.cs index 2f574ac7..fb5f023e 100644 --- a/src/Airship.Net.MessageCenter/Handlers/MessageViewHandler.iOS.cs +++ b/src/Airship.Net.MessageCenter/Handlers/MessageViewHandler.iOS.cs @@ -1,4 +1,4 @@ -using Microsoft.Maui.Handlers; +using Microsoft.Maui.Handlers; using WebKit; using CoreGraphics; using UIKit; @@ -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 diff --git a/src/Airship.Net/Airship.Net.csproj b/src/Airship.Net/Airship.Net.csproj index c4059833..d6941709 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 + net6.0;net6.0-android33.0;net6.0-ios true true enable @@ -10,8 +10,8 @@ AirshipDotNet false - 13.0 - 21.0 + 14.0 + 33.0 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 73911850..b9c23f54 100644 --- a/src/Airship.Net/IAirship.cs +++ b/src/Airship.Net/IAirship.cs @@ -1,7 +1,9 @@ -/* Copyright Airship and Contributors */ +/* Copyright Airship and Contributors */ using AirshipDotNet.Attributes; -using AirshipDotNet.Channel; +using AirshipDotNet.Channel;using AirshipDotNet.Contact; +using ChannelSubscriptionListEditor = AirshipDotNet.Channel.SubscriptionListEditor; +using ContactSubscriptionListEditor = AirshipDotNet.Contact.SubscriptionListEditor; namespace AirshipDotNet { @@ -19,6 +21,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. /// @@ -53,12 +116,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 } /// @@ -113,13 +176,24 @@ public interface IAirship /// Get the channel ID for the device. /// /// The channel identifier. - string? ChannelId { get; } + string ChannelId { get; } + + /// + /// Gets the named user ID. + /// + /// The named user ID. + void GetNamedUser(Action namedUser); + + /// + /// Reset Contacts. + /// + void ResetContact(); /// - /// Gets or sets the named user ID. + /// Sets the named user ID. /// /// The named user ID. - string? NamedUser { get; set; } + void IdentifyContact(string namedUserId); /// /// Add/remove the channel creation event listener. @@ -128,10 +202,9 @@ 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; + event EventHandler OnPushNotificationStatusUpdate; /// /// Add/remove the deep link event listener. @@ -207,32 +280,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. @@ -249,11 +316,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. diff --git a/src/Airship.Net/Platforms/Android/Airship.cs b/src/Airship.Net/Platforms/Android/Airship.cs index a9ae357a..e0523186 100644 --- a/src/Airship.Net/Platforms/Android/Airship.cs +++ b/src/Airship.Net/Platforms/Android/Airship.cs @@ -1,4 +1,4 @@ -/* Copyright Airship and Contributors */ +/* Copyright Airship and Contributors */ using Java.Util; using Java.Util.Concurrent; @@ -6,15 +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 + public class Airship : Java.Lang.Object, IDeepLinkListener, IAirship, IInboxListener, MessageCenterClass.IOnShowMessageCenterListener, UrbanAirship.Channel.IAirshipChannelListener, IPushNotificationStatusListener { private static readonly Lazy sharedAirship = new(() => { @@ -26,16 +30,29 @@ public class Airship : Java.Lang.Object, IDeepLinkListener, IAirship, IInboxList private void Init() { UAirship.Shared().Channel.AddChannelListener(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; - public event EventHandler? OnChannelUpdate; + /// + /// 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 @@ -55,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 @@ -115,10 +139,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 +151,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 +174,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 +189,6 @@ private static Features FeaturesFromUAFeatures(int uAFeatures) features |= Features.Contacts; } - if ((uAFeatures & PrivacyManager.FeatureLocation) == PrivacyManager.FeatureLocation) - { - features |= Features.Location; - } - return features; } @@ -191,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() { @@ -291,53 +287,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) { @@ -347,7 +331,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) { @@ -357,21 +341,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(); @@ -383,15 +371,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) { @@ -455,6 +464,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; @@ -491,7 +580,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 a69fe4f7..4935b4a7 100644 --- a/src/Airship.Net/Platforms/iOS/Airship.cs +++ b/src/Airship.Net/Platforms/iOS/Airship.cs @@ -10,7 +10,7 @@ namespace AirshipDotNet /// /// Provides cross-platform access to a common subset of functionality between the iOS and Android SDKs /// - public class Airship : UADeepLinkDelegate, IAirship, IUAMessageCenterDisplayDelegate + public class Airship : UADeepLinkDelegate, IUAMessageCenterDisplayDelegate, IAirship { private static readonly Lazy sharedAirship = new(() => { @@ -23,26 +23,25 @@ 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)); }); - 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)); - } + 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 @@ -52,11 +51,21 @@ private void Initialize() }); } + /// + /// Add/remove the channel creation listener. + /// public event EventHandler? OnChannelCreation; - public event EventHandler? OnChannelUpdate; + /// + /// 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 @@ -74,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 @@ -135,10 +152,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 +164,6 @@ private static UAFeatures UaFeaturesFromFeatures(Features features) { uAFeatures |= UAFeatures.Contacts; } - if (features.HasFlag(Features.Location)) - { - uAFeatures |= UAFeatures.Location; - } return uAFeatures; } @@ -175,10 +184,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 +196,6 @@ private static Features FeaturesFromUAFeatures(UAFeatures uAFeatures) { features |= Features.Contacts; } - if (uAFeatures.HasFlag(UAFeatures.Location)) - { - features |= Features.Location; - } return features; } @@ -203,21 +204,11 @@ private static Features FeaturesFromUAFeatures(UAFeatures uAFeatures) 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); @@ -289,7 +280,8 @@ public void AddCustomEvent(CustomEvent customEvent) } if (propertyDictionary.Count > 0) { - uaEvent.Properties = new NSDictionary(propertyDictionary.Keys, propertyDictionary.Values); + //TODO: + //uaEvent.Properties = new NSDictionary(propertyDictionary.Keys, propertyDictionary.Values); } } @@ -300,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); } @@ -311,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, @@ -372,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) @@ -409,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 Channel.TagGroupsEditor((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 Channel.TagGroupsEditor((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 AttributeEditor((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 AttributeEditor((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); + }); + } - if (operation is AttributeEditor.SetAttributeOperation intOperation) + public Contact.SubscriptionListEditor EditContactSubscriptionLists() + { + return new Contact.SubscriptionListEditor((List payload) => + { + ApplyContactSubscriptionListHelper(payload); + }); + } + + 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>() + UAirship.Channel.EditSubscriptionLists(editor => { - { 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>() - { - { 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; + } + } + + editor.Apply(); + }); + } - foreach (Channel.TagGroupsEditor.TagOperation operation in operations) + 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) @@ -519,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 @@ -540,6 +691,5 @@ public TimeSpan InAppAutomationDisplayInterval get => TimeSpan.FromSeconds(UAInAppAutomation.Shared.InAppMessageManager.DisplayInterval); set => UAInAppAutomation.Shared.InAppMessageManager.DisplayInterval = value.TotalSeconds; } - } } diff --git a/src/AirshipBindings.iOS.Automation/ApiDefinitions.cs b/src/AirshipBindings.iOS.Automation/ApiDefinitions.cs index 009da07a..005b1001 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 { } @@ -2390,7 +2391,7 @@ interface UAScheduleTrigger : INSSecureCoding // + (nonnull instancetype)appInitTriggerWithCount:(NSUInteger)count; [Static] [Export("appInitTriggerWithCount:")] - UAScheduleTrigger AppInitTrigger (nuint count); + UAScheduleTrigger AppInitTrigger(nuint count); // + (nonnull instancetype)foregroundTriggerWithCount:(NSUInteger)count; [Static] @@ -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..9f690465 100644 --- a/src/AirshipBindings.iOS.Basement/ApiDefinitions.cs +++ b/src/AirshipBindings.iOS.Basement/ApiDefinitions.cs @@ -9,165 +9,6 @@ Copyright Airship and Contributors 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 (); - } - // @protocol UAComponent [Protocol, Model] [BaseType(typeof(NSObject))] @@ -205,126 +46,4 @@ interface UAEvent } 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); - } } diff --git a/src/AirshipBindings.iOS.Basement/StructsAndEnums.cs b/src/AirshipBindings.iOS.Basement/StructsAndEnums.cs index 94c53f13..7bf5e1db 100644 --- a/src/AirshipBindings.iOS.Basement/StructsAndEnums.cs +++ b/src/AirshipBindings.iOS.Basement/StructsAndEnums.cs @@ -8,7 +8,7 @@ Copyright Airship and Contributors namespace UrbanAirship { [Native] - public enum UASituation : long + public enum UAActionSituation : long { ManualInvocation = 0, LaunchedFromPush = 1, diff --git a/src/AirshipBindings.iOS.Core/ApiDefinitions.cs b/src/AirshipBindings.iOS.Core/ApiDefinitions.cs index 9cf70341..467e73b5 100644 --- a/src/AirshipBindings.iOS.Core/ApiDefinitions.cs +++ b/src/AirshipBindings.iOS.Core/ApiDefinitions.cs @@ -11,3182 +11,3100 @@ Copyright Airship and Contributors 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); + // @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(); + } } diff --git a/src/AirshipBindings.iOS.Core/StructsAndEnums.cs b/src/AirshipBindings.iOS.Core/StructsAndEnums.cs index df471291..11c8a8e4 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 + } } 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..3f5af16a 100644 --- a/src/AirshipBindings.iOS.MessageCenter/ApiDefinitions.cs +++ b/src/AirshipBindings.iOS.MessageCenter/ApiDefinitions.cs @@ -10,642 +10,258 @@ Copyright Airship and Contributors using UserNotifications; using WebKit; -namespace UrbanAirship { +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); } -} +} \ No newline at end of file diff --git a/src/AirshipBindings.iOS.MessageCenter/StructsAndEnums.cs b/src/AirshipBindings.iOS.MessageCenter/StructsAndEnums.cs index 266704d1..81c7171d 100644 --- a/src/AirshipBindings.iOS.MessageCenter/StructsAndEnums.cs +++ b/src/AirshipBindings.iOS.MessageCenter/StructsAndEnums.cs @@ -7,18 +7,4 @@ Copyright Airship and Contributors 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..f79ea23e 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); + } } diff --git a/src/AirshipBindings.iOS.PreferenceCenter/StructsAndEnums.cs b/src/AirshipBindings.iOS.PreferenceCenter/StructsAndEnums.cs index bc5bd193..1d63278a 100644 --- a/src/AirshipBindings.iOS.PreferenceCenter/StructsAndEnums.cs +++ b/src/AirshipBindings.iOS.PreferenceCenter/StructsAndEnums.cs @@ -6,32 +6,32 @@ Copyright Airship and Contributors 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 + } } 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")]