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