diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 3bcd54da..52fc53f6 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -1,2 +1,2 @@
# https://help.github.com/en/articles/about-code-owners
-* @BrianBatchelder @marc-scig @crow @rlepinski
\ No newline at end of file
+* @crow @rlepinski @khmMouna @oristanovic @Apekka @Ulrico972 @jyaganeh
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 9404c3bc..fe2d761a 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -3,7 +3,7 @@ name: CI
on: [pull_request]
env:
- DEVELOPER_DIR: /Applications/Xcode_14.3.1.app
+ DEVELOPER_DIR: /Applications/Xcode_15.0.app
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: 1
@@ -21,7 +21,7 @@ jobs:
distribution: 'temurin'
java-version: '11'
- - name: Set up .NET 6.0
+ - name: Set up .NET 7.0
uses: actions/setup-dotnet@v3
with:
global-json-file: global.json
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index e84e4d76..5beb4fb7 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -6,7 +6,7 @@ on:
- "[0-9]+.[0-9]+.[0-9]+*"
env:
- DEVELOPER_DIR: /Applications/Xcode_14.3.1.app
+ DEVELOPER_DIR: /Applications/Xcode_15.0.app
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: 1
@@ -20,7 +20,7 @@ jobs:
- name: Get Version
id: get_version
- run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
+ run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
- name: Verify Version
run: |
@@ -28,26 +28,30 @@ jobs:
PLUGIN_VERSION=$(./gradlew -q getVersion)
if [[ $PLUGIN_VERSION = $VERSION ]]; then exit 0 ; else exit 1; fi
- - name: Get Release Notes
+ - name: Get the release notes
id: get_release_notes
+ env:
+ VERSION: ${{ steps.get_version.outputs.VERSION }}
run: |
- VERSION=${{ steps.get_version.outputs.VERSION }}
- NOTES="$(awk "/## Version $VERSION/{flag=1;next}/## Version/{flag=0}flag" CHANGELOG.md)"
- NOTES="${NOTES//'%'/'%25'}"
- NOTES="${NOTES//$'\n'/'%0A'}"
- NOTES="${NOTES//$'\r'/'%0D'}"
- echo ::set-output name=NOTES::"$NOTES"
+ delimiter="$(openssl rand -hex 8)"
+ {
+ echo "NOTES<<${delimiter}"
+ awk "/## Version $VERSION/{flag=1;next}/## Version/{flag=0}flag" CHANGELOG.md
+ echo ${delimiter}
+ } >> $GITHUB_OUTPUT
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- # - name: Setup GCP
- # uses: google-github-actions/setup-gcloud@daadedc81d5f9d3c06d2c92f49202a3cc2b919ba # v0.2.1
- # with:
- # version: '351.0.0'
- # service_account_email: ${{ secrets.GCP_SA_EMAIL }}
- # service_account_key: ${{ secrets.GCP_SA_KEY }}
+ - name: Setup GCP Auth
+ uses: google-github-actions/auth@v1
+ with:
+ credentials_json: ${{ secrets.GCP_SA_KEY }}
+
+ # Install gcloud, `setup-gcloud` automatically picks up authentication from `auth`.
+ - name: Set up Google Cloud SDK
+ uses: google-github-actions/setup-gcloud@v1
- name: Set up JDK 11
uses: actions/setup-java@v3
@@ -55,7 +59,7 @@ jobs:
distribution: 'temurin'
java-version: '11'
- - name: Set up .NET 6.0
+ - name: Set up .NET
uses: actions/setup-dotnet@v3
with:
global-json-file: global.json
@@ -64,25 +68,19 @@ jobs:
run: |
dotnet workload install android ios maui-android maui-ios maui-maccatalyst
- # - name: Install doc dependencies
- # run: |
- # brew install doxygen
- # brew install graphviz
+ - name: Install doc dependencies
+ run: |
+ brew install doxygen
+ brew install graphviz
- name: Build
- #run: ./gradlew build pack packageDocs
- run: ./gradlew build pack
+ run: ./gradlew build pack packageDocs
- name: Publish Nugets
env:
NUGET_PRODUCTION_API_KEY: ${{ secrets.NUGET_PRODUCTION_API_KEY }}
run: ./gradlew publishToProduction
- # - name: Upload Docs
- # run: |
- # VERSION=${{ steps.get_version.outputs.VERSION }}
- # gsutil cp docs/build/$VERSION.tar.gz gs://ua-web-ci-prod-docs-transfer/libraries/maui/$VERSION.tar.gz
-
- name: Create Github Release
uses: actions/create-release@v1.0.1
env:
@@ -93,3 +91,9 @@ jobs:
body: ${{ steps.get_release_notes.outputs.NOTES }}
draft: false
prerelease: false
+
+ - name: Upload Docs
+ run: |
+ VERSION=${{ steps.get_version.outputs.VERSION }}
+ gsutil cp docs/build/$VERSION.tar.gz gs://ua-web-ci-prod-docs-transfer/libraries/maui/$VERSION.tar.gz
+
diff --git a/.gitignore b/.gitignore
index 5afc8311..ac7576ea 100644
--- a/.gitignore
+++ b/.gitignore
@@ -243,3 +243,6 @@ binderator/output
# Idea folder
.idea
+
+# VSCode folder
+.vscode
diff --git a/Airship.Android.slnf b/Airship.Android.slnf
deleted file mode 100644
index ee4aa059..00000000
--- a/Airship.Android.slnf
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "solution":{
- "path":"Airship.Net.sln",
- "projects":[
- "binderator\\generated\\airship.android.core\\airship.android.core.csproj",
- "binderator\\generated\\airship.android.adm\\airship.android.adm.csproj",
- "binderator\\generated\\airship.android.layout\\airship.android.layout.csproj",
- "binderator\\generated\\airship.android.automation\\airship.android.automation.csproj",
- "binderator\\generated\\airship.android.fcm\\airship.android.fcm.csproj",
- "binderator\\generated\\airship.android.messagecenter\\airship.android.messagecenter.csproj",
- "binderator\\generated\\airship.android.preferencecenter\\airship.android.preferencecenter.csproj"
- ]
- }
-}
\ No newline at end of file
diff --git a/Airship.Net.sln b/Airship.Net.sln
index a5e02896..7cec7262 100644
--- a/Airship.Net.sln
+++ b/Airship.Net.sln
@@ -3,19 +3,19 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 25.0.1704.2
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "airship.android.core", "binderator\generated\airship.android.core\airship.android.core.csproj", "{BC06FD4D-9116-49FF-AF27-B3C5E7E10125}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.Android.Core", "binderator\generated\Airship.Net.Android.Core\Airship.Net.Android.Core.csproj", "{BC06FD4D-9116-49FF-AF27-B3C5E7E10125}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "airship.android.adm", "binderator\generated\airship.android.adm\airship.android.adm.csproj", "{DCD3C3FE-6B8D-463E-850E-27BC8A3F0470}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.Android.Adm", "binderator\generated\Airship.Net.Android.Adm\Airship.Net.Android.Adm.csproj", "{DCD3C3FE-6B8D-463E-850E-27BC8A3F0470}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "airship.android.layout", "binderator\generated\airship.android.layout\airship.android.layout.csproj", "{2F36FE2F-A1F6-4762-B6FB-6ADDB16C7A5B}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.Android.Layout", "binderator\generated\Airship.Net.Android.Layout\Airship.Net.Android.Layout.csproj", "{2F36FE2F-A1F6-4762-B6FB-6ADDB16C7A5B}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "airship.android.automation", "binderator\generated\airship.android.automation\airship.android.automation.csproj", "{58478FE8-9760-40C3-9016-9435564C011E}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.Android.Automation", "binderator\generated\Airship.Net.Android.Automation\Airship.Net.Android.Automation.csproj", "{58478FE8-9760-40C3-9016-9435564C011E}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "airship.android.fcm", "binderator\generated\airship.android.fcm\airship.android.fcm.csproj", "{82685167-9AAB-4CFF-B686-9D678B54297F}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.Android.Fcm", "binderator\generated\Airship.Net.Android.Fcm\Airship.Net.Android.Fcm.csproj", "{82685167-9AAB-4CFF-B686-9D678B54297F}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "airship.android.messagecenter", "binderator\generated\airship.android.messagecenter\airship.android.messagecenter.csproj", "{107BE8E5-E5FB-461E-B812-97834B04B5EA}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.Android.MessageCenter", "binderator\generated\Airship.Net.Android.MessageCenter\Airship.Net.Android.MessageCenter.csproj", "{107BE8E5-E5FB-461E-B812-97834B04B5EA}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "airship.android.preferencecenter", "binderator\generated\airship.android.preferencecenter\airship.android.preferencecenter.csproj", "{E99F9D88-6E68-46D8-9A8A-651C8490E59C}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.Android.PreferenceCenter", "binderator\generated\Airship.Net.Android.PreferenceCenter\Airship.Net.Android.PreferenceCenter.csproj", "{E99F9D88-6E68-46D8-9A8A-651C8490E59C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirshipBindings.iOS.Basement", "src\AirshipBindings.iOS.Basement\AirshipBindings.iOS.Basement.csproj", "{5E85A7FD-8C42-4DE6-B002-E3CC2DA529C7}"
EndProject
@@ -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}"
@@ -36,10 +34,6 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirshipBindings.iOS.PreferenceCenter", "src\AirshipBindings.iOS.PreferenceCenter\AirshipBindings.iOS.PreferenceCenter.csproj", "{13E9ACF2-4FE5-4FA6-96C4-BDFB6FF7C3A0}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F4B616B3-15BA-45DB-AA24-97270963158F}"
- ProjectSection(SolutionItems) = preProject
- Airship.iOS.slnf = Airship.iOS.slnf
- Airship.Android.slnf = Airship.Android.slnf
- EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.MessageCenter", "src\Airship.Net.MessageCenter\Airship.Net.MessageCenter.csproj", "{F429D476-7186-4C55-A5B6-60FA62215E78}"
EndProject
@@ -89,10 +83,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
deleted file mode 100644
index 550c68de..00000000
--- a/Airship.iOS.slnf
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "solution":{
- "path":"Airship.Net.sln",
- "projects":[
- "src\\AirshipBindings.iOS.Basement\\AirshipBindings.iOS.Basement.csproj",
- "src\\AirshipBindings.iOS.Core\\AirshipBindings.iOS.Core.csproj",
- "src\\AirshipBindings.iOS.Automation\\AirshipBindings.iOS.Automation.csproj",
- "src\\AirshipBindings.iOS.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..a136579c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,24 @@
# Airship Xamarin Changelog
+## Version 18.0.0 - Nov 10, 2023
+Major release that updates to Airship SDK 17.x. This release adds support for Stories, In-App experiences downstream of a sequence in Journeys, and improves SDK auth. The .NET SDK now requires .NET 7.0 (`net7.0-android` and `net7.0-ios`) as the minimum target framework, and iOS 14+ as the minimum deployment version with Xcode 14.3+.
+
+## Changes
+- Updated iOS SDK to 17.6.0
+- Updated Android SDK to 17.5.0
+- Added the ability to update Channel and Contact subscriptions to the common .NET library
+- Removed Channel update listener in favor of a new notification status listener.
+- Partially fixed issues with building from Windows Visual Studio. Linked Mac builds are not currently working. See [Known Issues](#known-issues) for more details.
+
+See the [Migration Guide](https://github.com/urbanairship/airship-dotnet/tree/main/MIGRATION.md) for further details.
+
+## Known Issues
+Build/run via a linked Mac from Visual Studio on Windows is not currently working as expected. This appears to be a known issue and is expected to be fixed in the upcoming .NET 8 release. In our testing, this issue impacts other SDKs that make use of XCFrameworks, and is not limited to Airship SDKs. We will continue monitoring the situation and update with any new workarounds or fixes that become available.
+
+Builds and runs performed directly on a Mac are not impacted by this issue.
+
+Related issue: https://github.com/xamarin/xamarin-macios/issues/19173#issuecomment-1790490792
+
## Version 17.1.0 - July 24, 2023
Minor release that updates Airship SDKs to the latest 16.x releases and fixes issues with bitcode for iOS.
diff --git a/Cartfile b/Cartfile
index 855e37f8..95da7b72 100644
--- a/Cartfile
+++ b/Cartfile
@@ -1 +1 @@
-github "urbanairship/ios-library" == 16.12.3
+github "urbanairship/ios-library" == 17.6.0
diff --git a/Directory.Build.props b/Directory.Build.props
index 7f8d1b65..b3a7e0c6 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -5,15 +5,15 @@
- 16.11.1
- 16.11.1
+ 17.5.0
+ 17.5.0
- 16.12.3
- 16.12.3
+ 17.6.0
+ 17.6.0
- 17.1.0
- 17.1.0
+ 18.0.0
+ 18.0.0
diff --git a/MIGRATION.md b/MIGRATION.md
new file mode 100644
index 00000000..c9cd6e29
--- /dev/null
+++ b/MIGRATION.md
@@ -0,0 +1,68 @@
+# Migration Guide
+
+## 17.x to 18.x
+
+### .NET Version
+
+This version of the plugin now requires .NET 7.0 (`net7.0-android` and `net7.0-ios`) as the min target framework.
+
+### Minimum iOS Version
+
+This version of the plugin now requires iOS 14+ as the min deployment target and Xcode 14.3+.
+
+### iOS Log Levels
+
+The `TRACE` level has been renamed to `VERBOSE`, for consistency with other platforms/frameworks.
+
+### API Changes
+
+#### Methods
+
+| 17.x | 18.x |
+|------|------|
+| `Airship.Instance.NamedUser = "some named user ID";` | `Airship.Instance.IdentifyContact("some named user ID");` |
+| `Airship.Instance.NamedUser = null;` | `Airship.Instance.ResetContact();` |
+| `var namedUser = Airship.Instance.NamedUser;` | `Airship.Instance.GetNamedUser(namedUser => { ... });` |
+| `Airship.Instance.EditNamedUserTagGroups();` | `Airship.Instance.EditContactTagGroups();` |
+| `Airship.Instance.EditNamedUserAttributes();` | `Airship.Instance.EditContactAttributes();` |
+| `var messages = Airship.Instance.InboxMessages;` | `Airship.Instance.InboxMessages(messages => { ... });` |
+| `var count = Airship.Instance.MessageCenterUnreadCount;` | `Airship.Instance.MessageCenterUnreadCount(count => { ... });` |
+| `var count = Airship.Instance.MessageCenterCount;` | `Airship.Instance.MessageCenterCount(count => { ... });` |
+
+### API Additions
+
+#### Push notification status Listener
+
+```csharp
+Airship.Instance.OnPushNotificationStatusUpdate -= OnPushNotificationStatusEvent;
+
+private void OnPushNotificationStatusEvent(object sender, PushNotificationStatusEventArgs e) =>
+{
+ bool isUserNotificationsEnabled = e.IsUserNotificationsEnabled;
+ // ...
+};
+```
+
+#### Editing Channel Subscription Lists
+
+```csharp
+Airship.Instance.EditChannelSubscriptionLists()
+ .subscribe("food");
+ .unsubscribe("sports");
+ .apply();
+```
+
+#### Editing Contact Subscription Lists
+
+```csharp
+Airship.Instance.EditContactSubscriptionLists()
+ .subscribe("food", "app")
+ .unsubscribe("sports", "sms")
+ .apply()
+```
+
+### API Removals
+
+#### `Airship.Instance.OnChannelUpdate`
+
+Replace with either `OnChannelCreation` or `OnPushNotificationStatusUpdate`, depending on usage.
\ No newline at end of file
diff --git a/MauiSample.sln b/MauiSample.sln
index 2e6e10b2..dd922ee4 100644
--- a/MauiSample.sln
+++ b/MauiSample.sln
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 17.0.31611.283
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MauiSample", "MauiSample\MauiSample.csproj", "{470DEC7C-2A77-4E92-8A30-DA52911D9FB2}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MauiSample", "MauiSample\MauiSample.csproj", "{470DEC7C-2A77-4E92-8A30-DA52911D9FB2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.Android.Core", "binderator\generated\Airship.Net.Android.Core\Airship.Net.Android.Core.csproj", "{F4969C3B-C442-4450-9A4D-D810B200573C}"
EndProject
@@ -15,19 +15,25 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.Android.Automat
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.Android.Fcm", "binderator\generated\Airship.Net.Android.Fcm\Airship.Net.Android.Fcm.csproj", "{1E429BBE-C098-4608-BE2E-5BCFBD50D6E5}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.iOS.Basement", "src\AirshipBindings.iOS.Basement\AirshipBindings.iOS.Basement.csproj", "{5E85A7FD-8C42-4DE6-B002-E3CC2DA529C7}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirshipBindings.iOS.Basement", "src\AirshipBindings.iOS.Basement\AirshipBindings.iOS.Basement.csproj", "{5E85A7FD-8C42-4DE6-B002-E3CC2DA529C7}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.iOS.Core", "src\AirshipBindings.iOS.Core\AirshipBindings.iOS.Core.csproj", "{7F49C0FA-F958-44CF-9246-8B8577748E6F}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirshipBindings.iOS.Core", "src\AirshipBindings.iOS.Core\AirshipBindings.iOS.Core.csproj", "{7F49C0FA-F958-44CF-9246-8B8577748E6F}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.iOS.Automation", "src\AirshipBindings.iOS.Automation\AirshipBindings.iOS.Automation.csproj", "{70434FB5-A468-4777-9478-DD2AB80BE0E2}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirshipBindings.iOS.Automation", "src\AirshipBindings.iOS.Automation\AirshipBindings.iOS.Automation.csproj", "{70434FB5-A468-4777-9478-DD2AB80BE0E2}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.iOS.MessageCenter", "src\AirshipBindings.iOS.MessageCenter\AirshipBindings.iOS.MessageCenter.csproj", "{AC22EEC5-DCA6-49D3-8B37-533B5565E2CF}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.iOS.ExtendedActions", "src\AirshipBindings.iOS.ExtendedActions\AirshipBindings.iOS.ExtendedActions.csproj", "{BFFFE653-04CD-4563-BF2D-B6F31349F30D}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirshipBindings.iOS.MessageCenter", "src\AirshipBindings.iOS.MessageCenter\AirshipBindings.iOS.MessageCenter.csproj", "{AC22EEC5-DCA6-49D3-8B37-533B5565E2CF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.Android.PreferenceCenter", "binderator\generated\Airship.Net.Android.PreferenceCenter\Airship.Net.Android.PreferenceCenter.csproj", "{D20DD1BB-7DF5-49C8-B8C1-E0905D273203}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.iOS.PreferenceCenter", "src\AirshipBindings.iOS.PreferenceCenter\AirshipBindings.iOS.PreferenceCenter.csproj", "{13E9ACF2-4FE5-4FA6-96C4-BDFB6FF7C3A0}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirshipBindings.iOS.PreferenceCenter", "src\AirshipBindings.iOS.PreferenceCenter\AirshipBindings.iOS.PreferenceCenter.csproj", "{13E9ACF2-4FE5-4FA6-96C4-BDFB6FF7C3A0}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.Android.LiveUpdate", "binderator\generated\Airship.Net.Android.LiveUpdate\Airship.Net.Android.LiveUpdate.csproj", "{A7F248E6-9C79-4267-9779-2CB3AEFAD359}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.Android.FeatureFlag", "binderator\generated\Airship.Net.Android.FeatureFlag\Airship.Net.Android.FeatureFlag.csproj", "{16AA94F3-6A70-49EB-A82C-FDD7BBC9DFD8}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net", "src\Airship.Net\Airship.Net.csproj", "{C5F41BE2-E93A-40DA-BB41-5095249363F7}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.MessageCenter", "src\Airship.Net.MessageCenter\Airship.Net.MessageCenter.csproj", "{4E15CB6E-1C86-47DF-8A8E-5BA7949E04B9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -77,10 +83,6 @@ Global
{AC22EEC5-DCA6-49D3-8B37-533B5565E2CF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AC22EEC5-DCA6-49D3-8B37-533B5565E2CF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AC22EEC5-DCA6-49D3-8B37-533B5565E2CF}.Release|Any CPU.Build.0 = Release|Any CPU
- {BFFFE653-04CD-4563-BF2D-B6F31349F30D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {BFFFE653-04CD-4563-BF2D-B6F31349F30D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {BFFFE653-04CD-4563-BF2D-B6F31349F30D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {BFFFE653-04CD-4563-BF2D-B6F31349F30D}.Release|Any CPU.Build.0 = Release|Any CPU
{D20DD1BB-7DF5-49C8-B8C1-E0905D273203}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D20DD1BB-7DF5-49C8-B8C1-E0905D273203}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D20DD1BB-7DF5-49C8-B8C1-E0905D273203}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -89,6 +91,22 @@ Global
{13E9ACF2-4FE5-4FA6-96C4-BDFB6FF7C3A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{13E9ACF2-4FE5-4FA6-96C4-BDFB6FF7C3A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{13E9ACF2-4FE5-4FA6-96C4-BDFB6FF7C3A0}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A7F248E6-9C79-4267-9779-2CB3AEFAD359}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A7F248E6-9C79-4267-9779-2CB3AEFAD359}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A7F248E6-9C79-4267-9779-2CB3AEFAD359}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A7F248E6-9C79-4267-9779-2CB3AEFAD359}.Release|Any CPU.Build.0 = Release|Any CPU
+ {16AA94F3-6A70-49EB-A82C-FDD7BBC9DFD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {16AA94F3-6A70-49EB-A82C-FDD7BBC9DFD8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {16AA94F3-6A70-49EB-A82C-FDD7BBC9DFD8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {16AA94F3-6A70-49EB-A82C-FDD7BBC9DFD8}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C5F41BE2-E93A-40DA-BB41-5095249363F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C5F41BE2-E93A-40DA-BB41-5095249363F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C5F41BE2-E93A-40DA-BB41-5095249363F7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C5F41BE2-E93A-40DA-BB41-5095249363F7}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4E15CB6E-1C86-47DF-8A8E-5BA7949E04B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4E15CB6E-1C86-47DF-8A8E-5BA7949E04B9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4E15CB6E-1C86-47DF-8A8E-5BA7949E04B9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4E15CB6E-1C86-47DF-8A8E-5BA7949E04B9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/MauiSample/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..7f517c08 100644
--- a/MauiSample/HomePageViewModel.cs
+++ b/MauiSample/HomePageViewModel.cs
@@ -62,7 +62,7 @@ public HomePageViewModel()
OnPrefCenterButtonClicked = new Command(PerformOnPrefCenterButtonClicked);
Airship.Instance.OnChannelCreation += OnChannelEvent;
- Airship.Instance.OnChannelUpdate += OnChannelEvent;
+ Airship.Instance.OnPushNotificationStatusUpdate += OnPushNotificationStatusEvent;
Refresh();
}
@@ -70,11 +70,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;
diff --git a/MauiSample/MauiSample.csproj b/MauiSample/MauiSample.csproj
index d0897cff..6e423149 100644
--- a/MauiSample/MauiSample.csproj
+++ b/MauiSample/MauiSample.csproj
@@ -1,7 +1,7 @@
-
+
- net6.0-android;net6.0-ios
+ net7.0-android;net7.0-ios
Exe
MauiSample
true
@@ -11,13 +11,13 @@
MauiSample
- com.urbanairship.richpush
- com.urbanairship.sample
+ com.urbanairship.richpush
+ com.urbanairship.sample
f6a79f57-dd45-4efa-9d46-98b431478fa1
1.0
1
- 13.0
+ 14.0
21.0
True
@@ -27,7 +27,7 @@
4
-
+
Automatic
iPhone Developer
Platforms\iOS\Entitlements.plist
@@ -35,7 +35,7 @@
false
-
+
iPhone Developer
Platforms\iOS\Entitlements.plist
None
@@ -52,27 +52,36 @@
+
+ true
+ false
+ 4
+
+
+ 2G
+
-
+
-
-
+
+
+
@@ -82,22 +91,23 @@
-
+
-
-
+
+
+
@@ -109,16 +119,15 @@
-
-
+
-
+
diff --git a/MauiSample/MessageCenterPage.xaml.cs b/MauiSample/MessageCenterPage.xaml.cs
index 9ccbed3a..d826812b 100644
--- a/MauiSample/MessageCenterPage.xaml.cs
+++ b/MauiSample/MessageCenterPage.xaml.cs
@@ -2,6 +2,7 @@
using AirshipDotNet;
using AirshipDotNet.MessageCenter;
using AirshipDotNet.MessageCenter.Controls;
+using Microsoft.Maui.Controls;
namespace MauiSample;
@@ -10,14 +11,14 @@ public partial class MessageCenterPage : ContentPage
public ICommand RefreshCommand { private set; get; }
public MessageCenterPage()
- {
- InitializeComponent();
+ {
+ InitializeComponent();
- RefreshCommand = new Command(
- execute: () => Refresh(),
- canExecute: () => !refreshView.IsRefreshing
- );
- }
+ RefreshCommand = new Command(
+ execute: () => Refresh(),
+ canExecute: () => !refreshView.IsRefreshing
+ );
+ }
protected override void OnAppearing()
{
@@ -27,10 +28,13 @@ protected override void OnAppearing()
public void Refresh()
{
- Airship.Instance.FetchInboxMessages(success =>
+ Airship.Instance.InboxMessages(messages =>
{
- listView.ItemsSource = Airship.Instance.InboxMessages;
- refreshView.IsRefreshing = false;
+ MainThread.BeginInvokeOnMainThread(() =>
+ {
+ listView.ItemsSource = messages;
+ refreshView.IsRefreshing = false;
+ });
});
}
@@ -70,4 +74,4 @@ private void onLoadFailed(object sender, MessageLoadFailedEventArgs e)
{
Console.WriteLine("MessageCenterPage onLoadFailed was reached.");
}
-}
+}
\ No newline at end of file
diff --git a/MauiSample/PushSettingsViewController.xaml b/MauiSample/PushSettingsViewController.xaml
new file mode 100644
index 00000000..7e84d4c6
--- /dev/null
+++ b/MauiSample/PushSettingsViewController.xaml
@@ -0,0 +1,72 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CapitalizeNone
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CapitalizeNone
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MauiSample/PushSettingsViewController.xaml.cs b/MauiSample/PushSettingsViewController.xaml.cs
new file mode 100644
index 00000000..1743a880
--- /dev/null
+++ b/MauiSample/PushSettingsViewController.xaml.cs
@@ -0,0 +1,87 @@
+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 =>
+ {
+ MainThread.BeginInvokeOnMainThread(() =>
+ {
+ namedUserLabel.Placeholder = namedUser != null ? namedUser : "named user";
+ });
+ });
+ }
+}
\ No newline at end of file
diff --git a/airship.properties b/airship.properties
index e40412d3..4aebbab0 100644
--- a/airship.properties
+++ b/airship.properties
@@ -1,12 +1,12 @@
# Airship native SDK versions
-iosVersion = 16.12.3
-androidVersion = 16.11.1
+iosVersion = 17.6.0
+androidVersion = 17.5.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
+iosFrameworkZip = Airship-Xcode15.zip
# NuGet package revision numbers
# If > 0, the revision number will be added to the versions
diff --git a/binderator/.config/dotnet-tools.json b/binderator/.config/dotnet-tools.json
index c095b73d..3e485d62 100644
--- a/binderator/.config/dotnet-tools.json
+++ b/binderator/.config/dotnet-tools.json
@@ -9,7 +9,7 @@
]
},
"xamarin.androidbinderator.tool": {
- "version": "0.5.4",
+ "version": "0.5.7",
"commands": [
"xamarin-android-binderator"
]
diff --git a/binderator/config.json b/binderator/config.json
index 8b070fb2..14906f51 100644
--- a/binderator/config.json
+++ b/binderator/config.json
@@ -17,56 +17,72 @@
{
"groupId": "com.urbanairship.android",
"artifactId": "urbanairship-adm",
- "version": "16.11.1",
- "nugetVersion": "16.11.1",
+ "version": "17.5.0",
+ "nugetVersion": "17.5.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.5.0",
+ "nugetVersion": "17.5.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.5.0",
+ "nugetVersion": "17.5.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.5.0",
+ "nugetVersion": "17.5.0",
"nugetId": "Airship.Net.Android.Fcm",
"dependencyOnly": false
},
+ {
+ "groupId": "com.urbanairship.android",
+ "artifactId": "urbanairship-feature-flag",
+ "version": "17.5.0",
+ "nugetVersion": "17.5.0",
+ "nugetId": "Airship.Net.Android.FeatureFlag",
+ "dependencyOnly": false
+ },
{
"groupId": "com.urbanairship.android",
"artifactId": "urbanairship-layout",
- "version": "16.11.1",
- "nugetVersion": "16.11.1",
+ "version": "17.5.0",
+ "nugetVersion": "17.5.0",
"nugetId": "Airship.Net.Android.Layout",
"dependencyOnly": false
},
+ {
+ "groupId": "com.urbanairship.android",
+ "artifactId": "urbanairship-live-update",
+ "version": "17.5.0",
+ "nugetVersion": "17.5.0",
+ "nugetId": "Airship.Net.Android.LiveUpdate",
+ "dependencyOnly": false
+ },
{
"groupId": "com.urbanairship.android",
"artifactId": "urbanairship-message-center",
- "version": "16.11.1",
- "nugetVersion": "16.11.1",
+ "version": "17.5.0",
+ "nugetVersion": "17.5.0",
"nugetId": "Airship.Net.Android.MessageCenter",
"dependencyOnly": false
},
{
"groupId": "com.urbanairship.android",
"artifactId": "urbanairship-preference-center",
- "version": "16.11.1",
- "nugetVersion": "16.11.1",
+ "version": "17.5.0",
+ "nugetVersion": "17.5.0",
"nugetId": "Airship.Net.Android.PreferenceCenter",
"dependencyOnly": false
},
@@ -130,7 +146,7 @@
"groupId": "androidx.lifecycle",
"artifactId": "lifecycle-common",
"version": "2.5.1",
- "nugetVersion": "2.5.1.2",
+ "nugetVersion": "2.5.1.1",
"nugetId": "Xamarin.AndroidX.Lifecycle.Common",
"dependencyOnly": true
},
@@ -138,7 +154,7 @@
"groupId": "androidx.lifecycle",
"artifactId": "lifecycle-common-java8",
"version": "2.5.1",
- "nugetVersion": "2.5.1.2",
+ "nugetVersion": "2.5.1.1",
"nugetId": "Xamarin.AndroidX.Lifecycle.Common.Java8",
"dependencyOnly": true
},
@@ -146,7 +162,7 @@
"groupId": "androidx.lifecycle",
"artifactId": "lifecycle-runtime-ktx",
"version": "2.5.1",
- "nugetVersion": "2.5.1.2",
+ "nugetVersion": "2.5.1.1",
"nugetId": "Xamarin.AndroidX.Lifecycle.Runtime.Ktx",
"dependencyOnly": true
},
@@ -154,7 +170,7 @@
"groupId": "androidx.lifecycle",
"artifactId": "lifecycle-viewmodel-ktx",
"version": "2.5.1",
- "nugetVersion": "2.5.1.2",
+ "nugetVersion": "2.5.1.1",
"nugetId": "Xamarin.AndroidX.Lifecycle.ViewModel.Ktx",
"dependencyOnly": true
},
@@ -166,10 +182,18 @@
"nugetId": "Xamarin.AndroidX.RecyclerView",
"dependencyOnly": true
},
+ {
+ "groupId": "androidx.room",
+ "artifactId": "room-ktx",
+ "version": "2.5.1",
+ "nugetVersion": "2.5.0",
+ "nugetId": "Xamarin.AndroidX.Room.Room.Ktx",
+ "dependencyOnly": true
+ },
{
"groupId": "androidx.room",
"artifactId": "room-runtime",
- "version": "2.5.0",
+ "version": "2.5.1",
"nugetVersion": "2.5.0",
"nugetId": "Xamarin.AndroidX.Room.Runtime",
"dependencyOnly": true
@@ -202,7 +226,7 @@
"groupId": "androidx.work",
"artifactId": "work-runtime",
"version": "2.8.0",
- "nugetVersion": "2.7.1.6",
+ "nugetVersion": "2.7.1.5",
"nugetId": "Xamarin.AndroidX.Work.Runtime",
"dependencyOnly": true
},
diff --git a/binderator/scripts/update-config.csx b/binderator/scripts/update-config.csx
index 0932c163..b727d388 100644
--- a/binderator/scripts/update-config.csx
+++ b/binderator/scripts/update-config.csx
@@ -1,4 +1,4 @@
-#! "net6.0"
+#! "net7.0"
#r "nuget: MavenNet, 2.2.13"
#r "nuget: Newtonsoft.Json, 13.0.1"
@@ -521,4 +521,4 @@ public class Options
}
public bool ShouldWriteOutput => Update || Bump || Sort;
-}
\ No newline at end of file
+}
diff --git a/binderator/source/AndroidProject.cshtml b/binderator/source/AndroidProject.cshtml
index 78da2883..81ecd3f5 100644
--- a/binderator/source/AndroidProject.cshtml
+++ b/binderator/source/AndroidProject.cshtml
@@ -4,8 +4,8 @@
- net6.0-android
- 21
+ net7.0-android
+ 33
enable
enable
true
@@ -39,6 +39,12 @@
case "urbanairship-automation":
title += " - Automation";
break;
+ case "urbanairship-live-update":
+ title += " - Live Updates";
+ break;
+ case "urbanairship-feature-flag":
+ title += " - Feature Flags";
+ break;
case "urbanairship-layout":
case "urbanairship-core":
// Use default title
@@ -130,4 +136,4 @@
}
-
\ No newline at end of file
+
diff --git a/binderator/source/com.urbanairship.android/urbanairship-feature-flag/Transforms/EnumFields.xml b/binderator/source/com.urbanairship.android/urbanairship-feature-flag/Transforms/EnumFields.xml
new file mode 100644
index 00000000..e54ee5d7
--- /dev/null
+++ b/binderator/source/com.urbanairship.android/urbanairship-feature-flag/Transforms/EnumFields.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/binderator/source/com.urbanairship.android/urbanairship-feature-flag/Transforms/EnumMethods.xml b/binderator/source/com.urbanairship.android/urbanairship-feature-flag/Transforms/EnumMethods.xml
new file mode 100644
index 00000000..daf6aa04
--- /dev/null
+++ b/binderator/source/com.urbanairship.android/urbanairship-feature-flag/Transforms/EnumMethods.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/binderator/source/com.urbanairship.android/urbanairship-feature-flag/Transforms/Metadata.xml b/binderator/source/com.urbanairship.android/urbanairship-feature-flag/Transforms/Metadata.xml
new file mode 100644
index 00000000..eadc4685
--- /dev/null
+++ b/binderator/source/com.urbanairship.android/urbanairship-feature-flag/Transforms/Metadata.xml
@@ -0,0 +1,3 @@
+
+
+
diff --git a/binderator/source/com.urbanairship.android/urbanairship-live-update/Transforms/EnumFields.xml b/binderator/source/com.urbanairship.android/urbanairship-live-update/Transforms/EnumFields.xml
new file mode 100644
index 00000000..e54ee5d7
--- /dev/null
+++ b/binderator/source/com.urbanairship.android/urbanairship-live-update/Transforms/EnumFields.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/binderator/source/com.urbanairship.android/urbanairship-live-update/Transforms/EnumMethods.xml b/binderator/source/com.urbanairship.android/urbanairship-live-update/Transforms/EnumMethods.xml
new file mode 100644
index 00000000..daf6aa04
--- /dev/null
+++ b/binderator/source/com.urbanairship.android/urbanairship-live-update/Transforms/EnumMethods.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/binderator/source/com.urbanairship.android/urbanairship-live-update/Transforms/Metadata.xml b/binderator/source/com.urbanairship.android/urbanairship-live-update/Transforms/Metadata.xml
new file mode 100644
index 00000000..edd7d696
--- /dev/null
+++ b/binderator/source/com.urbanairship.android/urbanairship-live-update/Transforms/Metadata.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/documentation/migration-guide-fcm.md b/documentation/migration-guide-fcm.md
deleted file mode 100644
index 98945016..00000000
--- a/documentation/migration-guide-fcm.md
+++ /dev/null
@@ -1,17 +0,0 @@
-### FCM Migration
-
-FCM migration is optional, but recommended as Google deprecated GCM and is planning on dropping
-GCM client APIs in April of 2019. For more info, please read the [GCM F.A.Q](https://developers.google.com/cloud-messaging/faq).
-
-Airship supports the FCM client library starting in SDK 9.1.0. It is available in a new package
-`urbanairship.android.fcm`. The FCM package is not compatible with the deprecated package `UrbanAirship`.
-
-Migration Steps:
-
-- [Add Firebase to your app](https://firebase.google.com/docs/android/setup#add_firebase_to_your_app).
-- [Import your GCM project as a Firebase project](https://developers.google.com/cloud-messaging/android/android-migrate-fcm#import-your-gcm-project-as-a-firebase-project).
-- In your Android app, replace the `UrbanAirship` package with the new `urbanairship.android.core` and `urbanairship.android.fcm` packages.
-
-See also the [Android SDK FCM Migration Guide](https://github.com/urbanairship/android-library/blob/main/documentation/migration/migration-guide-fcm.md).
-
-More information on Xamarin SDK can be found in our [Xamarin Platform Guide](https://docs.urbanairship.com/platform/xamarin/).
\ No newline at end of file
diff --git a/global.json b/global.json
index 4653acb5..6e7e4550 100644
--- a/global.json
+++ b/global.json
@@ -1,7 +1,7 @@
{
"sdk":
{
- "version": "6.0.405",
+ "version": "7.0.100",
"rollForward": "patch"
},
"msbuild-sdks":
diff --git a/src/Airship.Net.MessageCenter/Airship.Net.MessageCenter.csproj b/src/Airship.Net.MessageCenter/Airship.Net.MessageCenter.csproj
index 260a8402..41526b55 100644
--- a/src/Airship.Net.MessageCenter/Airship.Net.MessageCenter.csproj
+++ b/src/Airship.Net.MessageCenter/Airship.Net.MessageCenter.csproj
@@ -1,7 +1,7 @@
- net6.0;net6.0-android;net6.0-ios
+ net7.0;net7.0-android;net7.0-ios
true
true
enable
@@ -10,7 +10,7 @@
AirshipDotNet.MessageCenter
false
- 13.0
+ 14.0
21.0
@@ -25,18 +25,21 @@
$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb
-
+
false
-
+
+ false
+
+
-
+
@@ -44,12 +47,11 @@
-
-
-
-
-
-
+
+
+
+
+
diff --git a/src/Airship.Net.MessageCenter/Handlers/MessageViewHandler.iOS.cs b/src/Airship.Net.MessageCenter/Handlers/MessageViewHandler.iOS.cs
index 2f574ac7..d035a2cf 100644
--- a/src/Airship.Net.MessageCenter/Handlers/MessageViewHandler.iOS.cs
+++ b/src/Airship.Net.MessageCenter/Handlers/MessageViewHandler.iOS.cs
@@ -6,6 +6,7 @@
using Foundation;
using UrbanAirship;
using AirshipDotNet.MessageCenter.Controls;
+using Vision;
namespace AirshipDotNet.MessageCenter.Handlers;
@@ -20,24 +21,17 @@ 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()
- {
- ForwardNavigationDelegate = navigationDelegate,
- NativeBridgeDelegate = nativeBridgeDelegate,
- NativeBridgeExtensionDelegate = nativeBridgeExtension
- };
}
protected override WKWebView CreatePlatformView()
@@ -45,8 +39,7 @@ protected override WKWebView CreatePlatformView()
return new(UIScreen.MainScreen.Bounds, new WKWebViewConfiguration())
{
AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight,
- TranslatesAutoresizingMaskIntoConstraints = true,
- NavigationDelegate = nativeBridge
+ TranslatesAutoresizingMaskIntoConstraints = true
};
}
@@ -54,61 +47,92 @@ private static void MapMessageId(MessageViewHandler handler, IMessageView entry)
{
if (entry.MessageId != null)
{
- handler.LoadMessage(entry.MessageId);
+ handler.LoadUser(entry.MessageId, result => { });
}
}
- protected void LoadMessage(string? messageId)
+ public void LoadUser(string messageId, Action result)
+ {
+ UAMessageCenter.Shared.Inbox.GetUser(currentUser =>
+ {
+ UAMessageCenter.Shared.Inbox.MessageForID(messageId, currentMessage =>
+ {
+ user = currentUser;
+ message = currentMessage;
+
+ nativeBridgeDelegate = new(this);
+ navigationDelegate = new(this);
+
+ nativeBridge = new()
+ {
+ ForwardNavigationDelegate = navigationDelegate,
+ NativeBridgeDelegate = nativeBridgeDelegate,
+ NativeBridgeExtensionDelegate = new UAMessageCenterNativeBridgeExtension(message, user)
+ };
+
+ PlatformView.NavigationDelegate = nativeBridge;
+
+ LoadMessage(messageId, result);
+ });
+ });
+ }
+
+ public void LoadMessage(string messageId, Action result)
{
- 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())
+ UAMessageCenter.Shared.Inbox.MessageForID(messageId, newMessage =>
{
- LoadMessageBody(message);
- }
- else
- {
- VirtualView.OnLoadFailed(messageId, false, MessageFailureStatus.Unavailable);
- }
- },
- () => VirtualView.OnLoadFailed(messageId, false, MessageFailureStatus.FetchFailed)
- );
+ message = newMessage;
+ if (message != null && !message.IsExpired)
+ {
+ LoadMessageBody(message, result);
+ }
+ else
+ {
+ VirtualView.OnLoadFailed(messageId, false, MessageFailureStatus.Unavailable);
+ result(false);
+ }
+ });
+ }
+ else
+ {
+ VirtualView.OnLoadFailed(messageId, false, MessageFailureStatus.FetchFailed);
+ result(false);
+ }
+ });
}
-
}
- protected void LoadMessageBody(UAInboxMessage message)
+ protected void LoadMessageBody(UAMessageCenterMessage message, Action result)
{
- messageId = message.MessageID;
-
- UAMessageCenter.Shared.User.GetUserData((UAUserData userData) =>
+ if (user == null)
{
- if (userData == null) return;
+ result(false);
+ }
- var auth = UAUtils.AuthHeaderString(userData.Username, userData.Password);
- NSMutableDictionary dict = new NSMutableDictionary
- {
- { new NSString("Authorization"), new NSString(auth) }
- };
- var request = new NSMutableUrlRequest(message.MessageBodyURL) {
- Headers = dict
- };
+ var auth = UAUtils.AuthHeaderString(user.Username, user.Password);
- MainThread.BeginInvokeOnMainThread(() =>
- PlatformView.LoadRequest(request)
- );
+ NSMutableDictionary dict = new NSMutableDictionary();
+ dict.Add(new NSString("Authorization"), new NSString(auth));
- VirtualView.OnLoadStarted(message.MessageID);
- });
+ var request = new NSMutableUrlRequest(message.BodyURL);
+ request.Headers = dict;
+
+ MainThread.BeginInvokeOnMainThread(() =>
+ PlatformView.LoadRequest(request)
+ );
+
+ VirtualView.OnLoadStarted(messageId);
+ result(true);
}
private class NavigationDelegate : NSObject, IUANavigationDelegate
@@ -175,5 +199,4 @@ public void Close()
Handler.VirtualView.OnClosed(Handler.messageId);
}
}
-}
-
+}
\ No newline at end of file
diff --git a/src/Airship.Net/Airship.Net.csproj b/src/Airship.Net/Airship.Net.csproj
index c4059833..9dafbea6 100644
--- a/src/Airship.Net/Airship.Net.csproj
+++ b/src/Airship.Net/Airship.Net.csproj
@@ -1,7 +1,7 @@
- net6.0;net6.0-android;net6.0-ios
+ net7.0;net7.0-android;net7.0-ios
true
true
enable
@@ -10,7 +10,7 @@
AirshipDotNet
false
- 13.0
+ 14.0
21.0
@@ -25,21 +25,24 @@
$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb
-
+
false
-
+
+ false
+ HttpClientHandler
+
+
-
+
-
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..ec58508d 100644
--- a/src/Airship.Net/IAirship.cs
+++ b/src/Airship.Net/IAirship.cs
@@ -2,6 +2,9 @@
using AirshipDotNet.Attributes;
using AirshipDotNet.Channel;
+using AirshipDotNet.Contact;
+using ChannelSubscriptionListEditor = AirshipDotNet.Channel.SubscriptionListEditor;
+using ContactSubscriptionListEditor = AirshipDotNet.Contact.SubscriptionListEditor;
namespace AirshipDotNet
{
@@ -19,6 +22,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 +117,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 +177,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 +203,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 +281,26 @@ public interface IAirship
/// Get the message center unread count.
///
/// The message center unread count.
- int MessageCenterUnreadCount { get; }
+ void MessageCenterUnreadCount(Action unreadMessageCount);
///
/// Get the total count of message center messages.
///
/// The message center count.
- int MessageCenterCount { get; }
+ void MessageCenterCount(Action messageCount);
///
/// Get the list of messages contained in the messages center.
///
/// The list of message.
- List InboxMessages { get; }
-
- ///
- /// Displays a specific message.
- ///
- /// Action that will be called on completion, with a boolean flag indicating success.
- void FetchInboxMessages(Action onComplete);
+ void InboxMessages(Action> messages);
///
/// Returns an editor for named user tag groups.
///
/// A TagGroupsEditor
/// for named user tag groups.
- TagGroupsEditor EditNamedUserTagGroups();
+ TagGroupsEditor EditContactTagGroups();
///
/// Returns an editor for channel tag groups.
@@ -249,11 +317,25 @@ public interface IAirship
AttributeEditor EditChannelAttributes();
///
- /// Edit named user attributes.
+ /// Edit contact attributes.
///
/// An AttributeEditor
- /// for named user attributes.
- AttributeEditor EditNamedUserAttributes();
+ /// for contact attributes.
+ AttributeEditor EditContactAttributes();
+
+ ///
+ /// Edit channel subscription lists.
+ ///
+ /// An SubscriptionListsEditor
+ /// for channel subscription lists.
+ ChannelSubscriptionListEditor EditChannelSubscriptionLists();
+
+ ///
+ /// Edit contact subscription list.
+ ///
+ /// An SubscriptionListsEditor
+ /// for contact subscription lists.
+ ContactSubscriptionListEditor EditContactSubscriptionLists();
///
/// Gets or sets whether In-App Automation is paused.
@@ -267,4 +349,4 @@ public interface IAirship
/// The display interval.
TimeSpan InAppAutomationDisplayInterval { get; set; }
}
-}
+}
\ No newline at end of file
diff --git a/src/Airship.Net/Platforms/Android/Airship.cs b/src/Airship.Net/Platforms/Android/Airship.cs
index a9ae357a..93675117 100644
--- a/src/Airship.Net/Platforms/Android/Airship.cs
+++ b/src/Airship.Net/Platforms/Android/Airship.cs
@@ -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()
{
@@ -239,7 +235,8 @@ public void AddCustomEvent(Analytics.CustomEvent customEvent)
var builder = new UrbanAirship.Analytics.CustomEvent.Builder(eventName);
- if (eventValue is not null) {
+ if (eventValue is not null)
+ {
builder.SetEventValue((double)eventValue);
}
@@ -291,53 +288,41 @@ public void AssociateIdentifier(string key, string identifier)
public void DeleteMessage(string messageId) => MessageCenterClass.Shared().Inbox.DeleteMessages(new List { messageId });
- public int MessageCenterUnreadCount => MessageCenterClass.Shared().Inbox.UnreadCount;
+ public void MessageCenterUnreadCount(Action messageCount) => messageCount(MessageCenterClass.Shared().Inbox.UnreadCount);
- public int MessageCenterCount => MessageCenterClass.Shared().Inbox.Count;
+ public void MessageCenterCount(Action messageCount) => messageCount(MessageCenterClass.Shared().Inbox.Count);
- public List InboxMessages
+ public void InboxMessages(Action> listMessages)
{
- get
+ var messagesList = new List();
+ var messages = MessageCenterClass.Shared().Inbox.Messages;
+ foreach (var message in messages)
{
- var messagesList = new List();
- var messages = MessageCenterClass.Shared().Inbox.Messages;
- foreach (var message in messages)
+ var extras = new Dictionary();
+ foreach (var key in message.Extras.KeySet())
{
- var extras = new Dictionary();
- var keySet = message.Extras.KeySet();
- if (keySet is not null)
- {
- foreach (var key in keySet)
- {
- var value = message.Extras.Get(key)?.ToString();
- extras.Add(key, value);
- }
- }
- DateTime? sentDate = FromDate(message.SentDate);
- DateTime? expirationDate = FromDate(message.ExpirationDate);
-
- var inboxMessage = new MessageCenter.Message(
- message.MessageId,
- message.Title,
- sentDate,
- expirationDate,
- message.IsRead,
- message.ListIconUrl,
- extras);
-
- messagesList.Add(inboxMessage);
+ extras.Add(key, message.Extras.Get(key).ToString());
}
- return messagesList;
+ DateTime? sentDate = FromDate(message.SentDate);
+ DateTime? expirationDate = FromDate(message.ExpirationDate);
+
+ var inboxMessage = new MessageCenter.Message(
+ message.MessageId,
+ message.Title,
+ sentDate,
+ expirationDate,
+ message.IsRead,
+ message.ListIconUrl,
+ extras);
+
+ messagesList.Add(inboxMessage);
}
- }
- public void FetchInboxMessages(Action onComplete)
- {
- MessageCenterClass.Shared().Inbox.FetchMessages(onComplete);
+ listMessages(messagesList);
}
- private static Date? FromDateTime(DateTime? dateTime)
+ private Date FromDateTime(DateTime dateTime)
{
if (dateTime == null)
{
@@ -347,7 +332,7 @@ public void FetchInboxMessages(Action onComplete)
return new Date(epochSeconds * 1000);
}
- private static DateTime? FromDate(Date? date)
+ private static DateTime? FromDate(Date date)
{
if (date == null)
{
@@ -357,21 +342,25 @@ public void FetchInboxMessages(Action onComplete)
return epoch.AddMilliseconds(date.Time);
}
- public Channel.TagGroupsEditor EditNamedUserTagGroups() =>
- new((List payload) =>
+ public Channel.TagGroupsEditor EditContactTagGroups()
+ {
+ return new Channel.TagGroupsEditor((List payload) =>
{
- TagGroupsEditor editor = UAirship.Shared().Contact.EditTagGroups()!;
+ var editor = UAirship.Shared().Contact.EditTagGroups();
TagGroupHelper(payload, editor);
editor.Apply();
});
+ }
- public Channel.TagGroupsEditor EditChannelTagGroups() =>
- new((List payload) =>
+ public Channel.TagGroupsEditor EditChannelTagGroups()
+ {
+ return new Channel.TagGroupsEditor((List payload) =>
{
var editor = UAirship.Shared().Channel.EditTagGroups();
TagGroupHelper(payload, editor);
editor.Apply();
});
+ }
public AttributeEditor EditAttributes() => EditChannelAttributes();
@@ -383,15 +372,36 @@ public AttributeEditor EditChannelAttributes() =>
editor.Apply();
});
- public AttributeEditor EditNamedUserAttributes() =>
+ ///
+ public AttributeEditor EditContactAttributes() =>
new((List operations) =>
{
- var editor = UAirship.Shared().Contact.EditAttributes()!;
+ var editor = UAirship.Shared().Contact.EditAttributes();
ApplyAttributesOperations(editor, operations);
editor.Apply();
});
- private static void ApplyAttributesOperations(UrbanAirship.Channel.AttributeEditor editor, List operations)
+ public ChannelSubscriptionListEditor EditChannelSubscriptionLists()
+ {
+ return new Channel.SubscriptionListEditor((List payload) =>
+ {
+ var editor = UAirship.Shared().Channel.EditSubscriptionLists();
+ ApplyChannelSubscriptionListHelper(payload, editor);
+ editor.Apply();
+ });
+ }
+
+ public ContactSubscriptionListEditor EditContactSubscriptionLists()
+ {
+ return new Contact.SubscriptionListEditor((List payload) =>
+ {
+ //var editor = UAirship.Shared().Contact.EditSubscriptionLists();
+ ApplyContactSubscriptionListHelper(payload);
+ //editor.Apply();
+ });
+ }
+
+ private void ApplyAttributesOperations(UrbanAirship.Channel.AttributeEditor editor, List operations)
{
foreach (var operation in operations)
{
@@ -419,7 +429,7 @@ private static void ApplyAttributesOperations(UrbanAirship.Channel.AttributeEdit
{
editor.SetAttribute(doubleOperation.Key, doubleOperation.Value);
}
-
+
if (operation is AttributeEditor.SetAttributeOperation dateOperation)
{
var date = FromDateTime(dateOperation.Value);
@@ -455,6 +465,87 @@ 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;
+ }
+ }
+ }
+
+ // FIXME:
+ //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;
@@ -469,7 +560,8 @@ public TimeSpan InAppAutomationDisplayInterval
public bool OnDeepLink(string deepLink)
{
- if (onDeepLinkReceived != null) {
+ if (onDeepLinkReceived != null)
+ {
onDeepLinkReceived(this, new DeepLinkEventArgs(deepLink));
return true;
}
@@ -491,7 +583,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)
+ );
}
-}
+}
\ No newline at end of file
diff --git a/src/Airship.Net/Platforms/iOS/Airship.cs b/src/Airship.Net/Platforms/iOS/Airship.cs
index a69fe4f7..cbc40198 100644
--- a/src/Airship.Net/Platforms/iOS/Airship.cs
+++ b/src/Airship.Net/Platforms/iOS/Airship.cs
@@ -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,34 +196,23 @@ private static Features FeaturesFromUAFeatures(UAFeatures uAFeatures)
{
features |= Features.Contacts;
}
- if (uAFeatures.HasFlag(UAFeatures.Location))
- {
- features |= Features.Location;
- }
return features;
}
public IEnumerable Tags => UAirship.Channel.Tags;
-
+
public string? ChannelId => UAirship.Channel.Identifier;
- public string? NamedUser
+ public void GetNamedUser(Action namedUser)
{
- get => UAirship.Contact.NamedUserID;
- set
- {
- if (value is not null)
- {
- UAirship.Contact.Identify(value);
- }
- else
- {
- UAirship.Contact.Reset();
- }
- }
+ 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);
private void DeviceTagHelper(bool clear, string[] addTags, string[] removeTags)
@@ -285,11 +279,12 @@ public void AddCustomEvent(CustomEvent customEvent)
{
propertyDictionary.SetValueForKey(value, key);
}
-
+
}
if (propertyDictionary.Count > 0)
{
- uaEvent.Properties = new NSDictionary(propertyDictionary.Keys, propertyDictionary.Values);
+ //TODO:
+ //uaEvent.Properties = new NSDictionary(propertyDictionary.Keys, propertyDictionary.Values);
}
}
@@ -300,7 +295,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 +306,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 +359,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 +388,285 @@ public void FetchInboxMessages(Action onComplete)
return epoch.AddSeconds(date.SecondsSince1970);
}
- public Channel.TagGroupsEditor EditNamedUserTagGroups() =>
- new((List payload) =>
+
+ public Channel.TagGroupsEditor EditChannelTagGroups()
+ {
+ return new((List payload) =>
{
- TagGroupHelper(payload, true);
- UAirship.NamedUser.UpdateTags();
+ ChannelTagGroupHelper(payload, () =>
+ {
+ UAirship.Push.UpdateRegistration();
+ });
});
+ }
- public Channel.TagGroupsEditor EditChannelTagGroups() =>
- new((List payload) =>
+ public Channel.TagGroupsEditor EditContactTagGroups()
+ {
+ return new((List payload) =>
{
- TagGroupHelper(payload, false);
- UAirship.Push.UpdateRegistration();
+ ContactTagGroupHelper(payload);
});
+ }
+
public AttributeEditor EditAttributes() => EditChannelAttributes();
- public AttributeEditor EditChannelAttributes() =>
- new((List operations) =>
+ public AttributeEditor EditChannelAttributes()
+ {
+ return new((List operations) =>
{
- var mutations = UAAttributeMutations.Mutations;
- ApplyAttributesOperations(mutations, operations);
- UAirship.Channel.ApplyAttributeMutations(mutations);
+ ApplyChannelAttributesOperations(operations);
});
+ }
- public AttributeEditor EditNamedUserAttributes() =>
- new((List operations) =>
+ public AttributeEditor EditContactAttributes()
+ {
+ return new((List operations) =>
{
- var mutations = UAAttributeMutations.Mutations;
- ApplyAttributesOperations(mutations, operations);
- UAirship.NamedUser.ApplyAttributeMutations(mutations);
+ ApplyContactAttributesOperations(operations);
});
+ }
+
- private static void ApplyAttributesOperations(UAAttributeMutations mutations, List operations)
+ public Channel.SubscriptionListEditor EditChannelSubscriptionLists()
{
- foreach (var operation in operations)
+ return new Channel.SubscriptionListEditor((List payload) =>
{
- if (operation is AttributeEditor.SetAttributeOperation stringOperation)
- {
- mutations.SetString(stringOperation.Value, stringOperation.Key);
- }
+ ApplyChannelSubscriptionListHelper(payload);
+ });
+ }
- 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>()
- {
- { Channel.TagGroupsEditor.OperationType.ADD, (group, t) => UAirship.NamedUser.AddTags(t, group) },
- { Channel.TagGroupsEditor.OperationType.REMOVE, (group, t) => UAirship.NamedUser.RemoveTags(t, group) },
- { Channel.TagGroupsEditor.OperationType.SET, (group, t) => UAirship.NamedUser.SetTags(t, group) }
- };
- var channelActions = new Dictionary>()
+ UAirship.Channel.EditSubscriptionLists(editor =>
{
- { Channel.TagGroupsEditor.OperationType.ADD, (group, t) => UAirship.Channel.AddTags(t, group) },
- { Channel.TagGroupsEditor.OperationType.REMOVE, (group, t) => UAirship.Channel.RemoveTags(t, group) },
- { Channel.TagGroupsEditor.OperationType.SET, (group, t) => UAirship.Channel.SetTags(t, group) }
- };
+ foreach (Channel.SubscriptionListEditor.SubscriptionListOperation operation in operations)
+ {
+ if (!Enum.IsDefined(typeof(Channel.SubscriptionListEditor.OperationType), operation.OperationType))
+ {
+ continue;
+ }
+
+ switch (operation.OperationType)
+ {
+ case Channel.SubscriptionListEditor.OperationType.SUBSCRIBE:
+ editor.Subscribe(operation.List);
+ break;
+ case Channel.SubscriptionListEditor.OperationType.UNSUBSCRIBE:
+ editor.Unsubscribe(operation.List);
+ break;
+ }
+ }
- var actions = namedUser ? namedUserActions : channelActions;
+ 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 +675,12 @@ override public void ReceivedDeepLink(NSUrl url, Action completionHandler)
completionHandler();
}
- public void DisplayMessageCenter(string messageID, bool animated) =>
- onMessageCenterDisplay?.Invoke(this, new MessageCenterEventArgs(messageID));
-
+ public void OnDisplayMessageCenter(string messageID) => onMessageCenterDisplay?.Invoke(this, new MessageCenterEventArgs(messageID));
- public void DisplayMessageCenterAnimated(bool animated) =>
- onMessageCenterDisplay?.Invoke(this, new MessageCenterEventArgs());
+ public void OnDisplayMessageCenter() => onMessageCenterDisplay?.Invoke(this, new MessageCenterEventArgs());
- public void DismissMessageCenterAnimated(bool animated) {
+ public void OnDismissMessageCenter()
+ {
}
public bool InAppAutomationPaused
diff --git a/src/AirshipBindings.iOS.Automation/AirshipBindings.iOS.Automation.csproj b/src/AirshipBindings.iOS.Automation/AirshipBindings.iOS.Automation.csproj
index bf306c79..73e525a6 100644
--- a/src/AirshipBindings.iOS.Automation/AirshipBindings.iOS.Automation.csproj
+++ b/src/AirshipBindings.iOS.Automation/AirshipBindings.iOS.Automation.csproj
@@ -1,4 +1,4 @@
-
+
true
Debug
@@ -11,7 +11,7 @@
Airship.Net.iOS.Automation
Airship iOS SDK - Automation
Automation support for Airship SDK
- net6.0-ios
+ net7.0-ios
enable
true
true
@@ -19,7 +19,7 @@
$(AirshipIosVersion)
$(AirshipIosNugetVersion)
Resources
- 13.0
+ 14.0
diff --git a/src/AirshipBindings.iOS.Automation/ApiDefinitions.cs b/src/AirshipBindings.iOS.Automation/ApiDefinitions.cs
index 009da07a..673d9d53 100644
--- a/src/AirshipBindings.iOS.Automation/ApiDefinitions.cs
+++ b/src/AirshipBindings.iOS.Automation/ApiDefinitions.cs
@@ -6,6 +6,7 @@ Copyright Airship and Contributors
using Foundation;
using ObjCRuntime;
using System;
+using System.Runtime.InteropServices;
using UIKit;
using UserNotifications;
using WebKit;
@@ -466,7 +467,7 @@ interface UAAutomationResources
// @interface UACancelSchedulesAction : NSObject
[BaseType(typeof(NSObject))]
- interface UACancelSchedulesAction : IUAAction
+ interface UACancelSchedulesAction
{
}
@@ -1846,7 +1847,7 @@ interface IUALandingPageBuilderExtender { }
// @interface UALandingPageAction : NSObject
[BaseType(typeof(NSObject))]
- interface UALandingPageAction : IUAAction
+ interface UALandingPageAction
{
// @property (nonatomic, assign, unsafe_unretained, readwrite, nullable) NSNumber *borderRadiusPoints;
[NullAllowed, Export("borderRadiusPoints", ArgumentSemantic.Assign)]
@@ -2108,7 +2109,7 @@ interface UASchedule
// @interface UAScheduleAction : NSObject
[BaseType(typeof(NSObject))]
- interface UAScheduleAction : IUAAction
+ interface UAScheduleAction
{
}
@@ -2476,4 +2477,40 @@ interface UATagSelector
[Export("apply:")]
bool Apply (string[] tags);
}
+
+ // @interface UAPadding : NSObject
+ [BaseType(typeof(NSObject))]
+ interface UAPadding
+ {
+ // @property (nonatomic, strong, readwrite, nullable) NSNumber *top;
+ [NullAllowed, Export("top", ArgumentSemantic.Strong)]
+ NSNumber Top { get; set; }
+
+ // @property (nonatomic, strong, readwrite, nullable) NSNumber *bottom;
+ [NullAllowed, Export("bottom", ArgumentSemantic.Strong)]
+ NSNumber Bottom { get; set; }
+
+ // @property (nonatomic, strong, readwrite, nullable) NSNumber *trailing;
+ [NullAllowed, Export("trailing", ArgumentSemantic.Strong)]
+ NSNumber Trailing { get; set; }
+
+ // @property (nonatomic, strong, readwrite, nullable) NSNumber *leading;
+ [NullAllowed, Export("leading", ArgumentSemantic.Strong)]
+ NSNumber Leading { get; set; }
+
+ // - (nonnull instancetype)initWithTop:(nullable NSNumber *)top bottom:(nullable NSNumber *)bottom leading:(nullable NSNumber *)leading trailing:(nullable NSNumber *)trailing;
+ [Export("initWithTop:bottom:leading:trailing:")]
+ IntPtr Constructor([NullAllowed] NSNumber top, [NullAllowed] NSNumber bottom, [NullAllowed] NSNumber leading, [NullAllowed] NSNumber trailing);
+
+ // + (nonnull instancetype)paddingWithTop:(nullable NSNumber *)top bottom:(nullable NSNumber *)bottom leading:(nullable NSNumber *)leading trailing:(nullable NSNumber *)trailing;
+ [Static]
+ [Export("paddingWithTop:bottom:leading:trailing:")]
+ UAPadding Padding([NullAllowed] NSNumber top, [NullAllowed] NSNumber bottom, [NullAllowed] NSNumber leading, [NullAllowed] NSNumber trailing);
+
+ // + (nonnull instancetype)paddingWithDictionary: (nullable NSDictionary *)paddingDict;
+ [Static]
+ [Export("paddingWithDictionary:")]
+ UAPadding Padding([NullAllowed] NSDictionary paddingDict);
+ }
+
}
diff --git a/src/AirshipBindings.iOS.Basement/AirshipBindings.iOS.Basement.csproj b/src/AirshipBindings.iOS.Basement/AirshipBindings.iOS.Basement.csproj
index 40dd05ef..174a8624 100644
--- a/src/AirshipBindings.iOS.Basement/AirshipBindings.iOS.Basement.csproj
+++ b/src/AirshipBindings.iOS.Basement/AirshipBindings.iOS.Basement.csproj
@@ -1,4 +1,4 @@
-
+
true
Debug
@@ -11,7 +11,7 @@
Airship.Net.iOS.Basement
Airship iOS SDK - Basement
Basement module for Airship SDK
- net6.0-ios
+ net7.0-ios
enable
true
true
@@ -19,7 +19,7 @@
$(AirshipIosVersion)
$(AirshipIosNugetVersion)
Resources
- 13.0
+ 14.0
diff --git a/src/AirshipBindings.iOS.Basement/ApiDefinitions.cs b/src/AirshipBindings.iOS.Basement/ApiDefinitions.cs
index b100d39c..c39bdd09 100644
--- a/src/AirshipBindings.iOS.Basement/ApiDefinitions.cs
+++ b/src/AirshipBindings.iOS.Basement/ApiDefinitions.cs
@@ -5,168 +5,11 @@ Copyright Airship and Contributors
using Foundation;
using ObjCRuntime;
using System;
+using System.ComponentModel.DataAnnotations;
using WebKit;
-namespace UrbanAirship {
-
- [Static]
- partial interface Constants
- {
- // extern NSString *const _Nonnull UAActionMetadataForegroundPresentationKey
- [Field("UAActionMetadataForegroundPresentationKey", "__Internal")]
- NSString UAActionMetadataForegroundPresentationKey { get; }
-
- // extern NSString *const _Nonnull UAActionMetadataInboxMessageIDKey
- [Field("UAActionMetadataInboxMessageIDKey", "__Internal")]
- NSString UAActionMetadataInboxMessageIDKey { get; }
-
- // extern NSString *const _Nonnull UAActionMetadataPushPayloadKey
- [Field("UAActionMetadataPushPayloadKey", "__Internal")]
- NSString UAActionMetadataPushPayloadKey { get; }
-
- // extern NSString *const _Nonnull UAActionMetadataRegisteredName
- [Field("UAActionMetadataRegisteredName", "__Internal")]
- NSString UAActionMetadataRegisteredName { get; }
-
- // extern NSString *const _Nonnull UAActionMetadataResponseInfoKey
- [Field("UAActionMetadataResponseInfoKey", "__Internal")]
- NSString UAActionMetadataResponseInfoKey { get; }
-
- // extern NSString *const _Nonnull UAActionMetadataUserNotificationActionIDKey
- [Field("UAActionMetadataUserNotificationActionIDKey", "__Internal")]
- NSString UAActionMetadataUserNotificationActionIDKey { get; }
- }
-
- // typedef BOOL (^UAActionPredicate)(UAActionArguments *_Nonnull)
- delegate bool UAActionPredicate (UAActionArguments arg0);
-
- // typedef void (^UAActionCompletionHandler)(UAActionResult *_Nonnull)
- delegate void UAActionCompletionHandler (UAActionResult arg0);
-
- // typedef void (^UAActionBlock)(UAActionArguments *_Nonnull, UAActionCompletionHandler _Nonnull)
- delegate void UAActionBlock (UAActionArguments arg0, [BlockCallback] UAActionCompletionHandler arg1);
-
- // @protocol UAAction
- [Protocol, Model]
- [BaseType(typeof(NSObject))]
- interface UAAction
- {
- // - (BOOL)acceptsArguments:(nonnull UAActionArguments *)arguments;
- [Abstract]
- [Export("acceptsArguments:")]
- bool AcceptsArguments (UAActionArguments arguments);
-
- // - (void)performWithArguments:(nonnull UAActionArguments *)arguments completionHandler: (nonnull UAActionCompletionHandler)completionHandler;
- [Abstract]
- [Export("performWithArguments:completionHandler:")]
- void Perform (UAActionArguments arguments, UAActionCompletionHandler completionHandler);
-
- // - (void)willPerformWithArguments:(nonnull UAActionArguments *)arguments;
- [Export("willPerformWithArguments:")]
- void WillPerform (UAActionArguments arguments);
-
- // - (void)didPerformWithArguments:(nonnull UAActionArguments *)arguments withResult:(nonnull UAActionResult *)result;
- [Export("didPerformWithArguments:withResult:")]
- void DidPerform (UAActionArguments arguments, UAActionResult result);
- }
-
- partial interface IUAAction { }
-
- // @interface UAActionArguments : NSObject
- [BaseType(typeof(NSObject))]
- interface UAActionArguments
- {
- // @property (nonatomic, assign, unsafe_unretained, readonly) UASituation situation;
- [Export("situation", ArgumentSemantic.Assign)]
- UASituation Situation { get; }
-
- // @property (nonatomic, strong, readonly, nullable) id value;
- [NullAllowed, Export("value", ArgumentSemantic.Strong)]
- NSObject Value { get; }
-
- // @property (nonatomic, copy, readonly, nullable) NSDictionary *metadata;
- [NullAllowed, Export("metadata", ArgumentSemantic.Copy)]
- NSDictionary Metadata { get; }
-
- // + (nonnull instancetype)argumentsWithValue:(nullable id)value withSituation:(UASituation)situation;
- [Static]
- [Export("argumentsWithValue:withSituation:")]
- UAActionArguments Arguments ([NullAllowed] NSObject value, UASituation situation);
-
- // + (nonnull instancetype)argumentsWithValue:(nullable id)value withSituation:(UASituation)situation metadata:(nullable NSDictionary *)metadata;
- [Static]
- [Export("argumentsWithValue:withSituation:metadata:")]
- UAActionArguments Arguments ([NullAllowed] NSObject value, UASituation situation, [NullAllowed] NSDictionary metadata);
- }
-
- // @protocol UAActionPredicateProtocol
- [Protocol, Model]
- [BaseType(typeof(NSObject))]
- interface UAActionPredicateProtocol
- {
- // - (BOOL)applyActionArguments:(nonnull UAActionArguments *)args;
- [Abstract]
- [Export("applyActionArguments:")]
- bool ApplyActionArguments (UAActionArguments args);
- }
-
- partial interface IUAActionPredicateProtocol { }
-
- // @interface UAActionResult : NSObject
- [BaseType(typeof(NSObject))]
- interface UAActionResult
- {
- // @property (nonatomic, strong, readonly, nullable) id value;
- [NullAllowed, Export("value", ArgumentSemantic.Strong)]
- NSObject Value { get; }
-
- // @property (nonatomic, assign, unsafe_unretained, readonly) UAActionFetchResult fetchResult;
- [Export("fetchResult", ArgumentSemantic.Assign)]
- UAActionFetchResult FetchResult { get; }
-
- // @property (nonatomic, strong, readonly, nullable) NSError *error;
- [NullAllowed, Export("error", ArgumentSemantic.Strong)]
- NSError Error { get; }
-
- // @property (nonatomic, assign, unsafe_unretained, readonly) UAActionStatus status;
- [Export("status", ArgumentSemantic.Assign)]
- UAActionStatus Status { get; }
-
- // + (nonnull instancetype)resultWithValue:(nullable id)value;
- [Static]
- [Export("resultWithValue:")]
- UAActionResult Result ([NullAllowed] NSObject value);
-
- // + (nonnull instancetype)resultWithValue:(nullable id)result withFetchResult:(UAActionFetchResult)fetchResult;
- [Static]
- [Export("resultWithValue:withFetchResult:")]
- UAActionResult Result ([NullAllowed] NSObject result, UAActionFetchResult fetchResult);
-
- // + (nonnull instancetype)emptyResult;
- [Static]
- [Export("emptyResult")]
- UAActionResult EmptyResult ();
-
- // + (nonnull instancetype)resultWithError:(nonnull NSError *)error;
- [Static]
- [Export("resultWithError:")]
- UAActionResult Result (NSError error);
-
- // + (nonnull instancetype)resultWithError:(nonnull NSError *)error withFetchResult:(UAActionFetchResult)fetchResult;
- [Static]
- [Export("resultWithError:withFetchResult:")]
- UAActionResult Result (NSError error, UAActionFetchResult fetchResult);
-
- // + (nonnull instancetype)rejectedArgumentsResult;
- [Static]
- [Export("rejectedArgumentsResult")]
- UAActionResult RejectedArgumentsResult ();
-
- // + (nonnull instancetype)actionNotFoundResult;
- [Static]
- [Export("actionNotFoundResult")]
- UAActionResult ActionNotFoundResult ();
- }
+namespace UrbanAirship
+{
// @protocol UAComponent
[Protocol, Model]
@@ -175,7 +18,7 @@ interface UAComponent
{
// - (BOOL)deepLink:(nonnull NSURL *)deepLink;
[Export("deepLink:")]
- bool DeepLink (NSUrl deepLink);
+ bool DeepLink(NSUrl deepLink);
}
partial interface IUAComponent { }
@@ -186,12 +29,12 @@ interface UADisposable
{
// - (nonnull instancetype)init:(nonnull void (^)(void))disposalBlock;
[Export("init:")]
- IntPtr Constructor (Action disposalBlock);
+ IntPtr Constructor(Action disposalBlock);
// - (void)dispose;
[Export("dispose")]
[New]
- void Dispose ();
+ void Dispose();
}
// @protocol UAEvent
@@ -201,130 +44,8 @@ interface UAEvent
{
// - (BOOL)isValid;
[Export("isValid")]
- bool IsValid ();
+ bool IsValid();
}
partial interface IUAEvent { }
-
- // @interface UAJavaScriptCommand : NSObject
- [BaseType(typeof(NSObject))]
- interface UAJavaScriptCommand
- {
- // @property (nonatomic, copy, readonly, nullable) NSString *name;
- [NullAllowed, Export("name")]
- string Name { get; }
-
- // @property (nonatomic, strong, readonly) NSArray *_Nonnull arguments;
- [Export("arguments", ArgumentSemantic.Strong)]
- string[] Arguments { get; }
-
- // @property (nonatomic, strong, readonly) NSDictionary *_Nonnull options;
- [Export("options", ArgumentSemantic.Strong)]
- NSDictionary Options { get; }
-
- // @property (nonatomic, strong, readonly) NSURL *_Nonnull URL;
- [Export("URL", ArgumentSemantic.Strong)]
- NSUrl URL { get; }
-
- // + (nonnull instancetype)commandForURL:(nonnull NSURL *)URL;
- [Static]
- [Export("commandForURL:")]
- UAJavaScriptCommand Command (NSUrl URL);
-
- // - (instancetype)initWithURL:(NSURL *)URL;
- [Export("initWithURL:")]
- IntPtr Constructor (NSUrl URL);
- }
-
- // @protocol UAJavaScriptCommandDelegate
- [Protocol, Model]
- [BaseType(typeof(NSObject))]
- interface UAJavaScriptCommandDelegate
- {
- // - (BOOL)performCommand:(nonnull UAJavaScriptCommand *)command webView:(nonnull WKWebView *)webView;
- [Abstract]
- [Export("performCommand:webView:")]
- bool PerformCommand (UAJavaScriptCommand command, WKWebView webView);
- }
-
- partial interface IUAJavaScriptCommandDelegate { }
-
- // @protocol UAJavaScriptEnvironmentProtocol /** * Adds a getter to the `UAirship` JavaScript instance. * @param methodName The getter's name. * @param value The getter's value. */ - (void)addStringGetter:(NSString *)methodName value:(nullable NSString *)value NS_SWIFT_NAME(add(_:string:)); /** * Adds a getter to the `UAirship` JavaScript instance. * @param methodName The getter's name. * @param value The getter's value. A nil value will return `-1` in the JavaScript environment. */ - (void)addNumberGetter:(NSString *)methodName value:(nullable NSNumber *)value NS_SWIFT_NAME(add(_:number:)); /** * Adds a getter to the `UAirship` JavaScript instance. * @param methodName The getter's name. * @param value The getter's value. */ - (void)addDictionaryGetter:(NSString *)methodName value:(nullable NSDictionary *)value NS_SWIFT_NAME(add(_:dictionary:)); /** * Builds the script that can be injected into a web view. * @return The script. */ - (NSString *)build; @end
- [Protocol, Model]
- [BaseType(typeof(NSObject))]
- interface UAJavaScriptEnvironmentProtocol
- {
- // - (void)addStringGetter:(nonnull NSString *)methodName value:(nullable NSString *)value;
- [Abstract]
- [Export("addStringGetter:value:")]
- void AddStringGetter (string methodName, [NullAllowed] string value);
-
- // - (void)addNumberGetter:(nonnull NSString *)methodName value:(nullable NSNumber *)value;
- [Abstract]
- [Export("addNumberGetter:value:")]
- void AddNumberGetter (string methodName, [NullAllowed] NSNumber value);
-
- // - (void)addDictionaryGetter:(nonnull NSString *)methodName value:(nullable NSDictionary *)value;
- [Abstract]
- [Export("addDictionaryGetter:value:")]
- void AddDictionaryGetter (string methodName, [NullAllowed] NSDictionary value);
-
- // - (nonnull NSString *)build;
- [Abstract]
- [Export("build")]
- string Build ();
- }
-
- partial interface IUAJavaScriptEnvironmentProtocol { }
-
- // @protocol UANativeBridgeExtensionDelegate
- [Protocol, Model]
- [BaseType(typeof(NSObject))]
- interface UANativeBridgeExtensionDelegate
- {
- // - (nonnull NSDictionary *) actionsMetadataForCommand:(nonnull UAJavaScriptCommand *)command webView:(nonnull WKWebView *)webView;
- [Export("actionsMetadataForCommand:webView:")]
- NSDictionary ActionsMetadata (UAJavaScriptCommand command, WKWebView webView);
-
- // - (void)extendJavaScriptEnvironment: (nonnull id)js webView:(nonnull WKWebView *)webView;
- [Export("extendJavascriptEnvironment:webView:")]
- void ExtendJavaScriptEnvironment(IUAJavaScriptEnvironmentProtocol js, WKWebView webView);
- }
-
- partial interface IUANativeBridgeExtensionDelegate { }
-
- // @interface UAPadding : NSObject
- [BaseType(typeof(NSObject))]
- interface UAPadding
- {
- // @property (nonatomic, strong, readwrite, nullable) NSNumber *top;
- [NullAllowed, Export("top", ArgumentSemantic.Strong)]
- NSNumber Top { get; set; }
-
- // @property (nonatomic, strong, readwrite, nullable) NSNumber *bottom;
- [NullAllowed, Export("bottom", ArgumentSemantic.Strong)]
- NSNumber Bottom { get; set; }
-
- // @property (nonatomic, strong, readwrite, nullable) NSNumber *trailing;
- [NullAllowed, Export("trailing", ArgumentSemantic.Strong)]
- NSNumber Trailing { get; set; }
-
- // @property (nonatomic, strong, readwrite, nullable) NSNumber *leading;
- [NullAllowed, Export("leading", ArgumentSemantic.Strong)]
- NSNumber Leading { get; set; }
-
- // - (nonnull instancetype)initWithTop:(nullable NSNumber *)top bottom:(nullable NSNumber *)bottom leading:(nullable NSNumber *)leading trailing:(nullable NSNumber *)trailing;
- [Export("initWithTop:bottom:leading:trailing:")]
- IntPtr Constructor ([NullAllowed] NSNumber top, [NullAllowed] NSNumber bottom, [NullAllowed] NSNumber leading, [NullAllowed] NSNumber trailing);
-
- // + (nonnull instancetype)paddingWithTop:(nullable NSNumber *)top bottom:(nullable NSNumber *)bottom leading:(nullable NSNumber *)leading trailing:(nullable NSNumber *)trailing;
- [Static]
- [Export("paddingWithTop:bottom:leading:trailing:")]
- UAPadding Padding ([NullAllowed] NSNumber top, [NullAllowed] NSNumber bottom, [NullAllowed] NSNumber leading, [NullAllowed] NSNumber trailing);
-
- // + (nonnull instancetype)paddingWithDictionary: (nullable NSDictionary *)paddingDict;
- [Static]
- [Export("paddingWithDictionary:")]
- UAPadding Padding ([NullAllowed] NSDictionary paddingDict);
- }
-}
+}
\ No newline at end of file
diff --git a/src/AirshipBindings.iOS.Basement/StructsAndEnums.cs b/src/AirshipBindings.iOS.Basement/StructsAndEnums.cs
index 94c53f13..c8539d36 100644
--- a/src/AirshipBindings.iOS.Basement/StructsAndEnums.cs
+++ b/src/AirshipBindings.iOS.Basement/StructsAndEnums.cs
@@ -5,10 +5,11 @@ Copyright Airship and Contributors
using System;
using UIKit;
-namespace UrbanAirship {
+namespace UrbanAirship
+{
[Native]
- public enum UASituation : long
+ public enum UAActionSituation : long
{
ManualInvocation = 0,
LaunchedFromPush = 1,
@@ -73,7 +74,7 @@ public enum UANotificationOptions : ulong
Provisional = (1 << 6),
Announcement = (1 << 7)
}
-
+
[Native]
public enum UAAuthorizedNotificationSettings : ulong
{
@@ -107,4 +108,4 @@ public enum UAURLAllowListScope : ulong
OpenURL = 1 << 1,
All = JavaScriptInterface | OpenURL
}
-}
+}
\ No newline at end of file
diff --git a/src/AirshipBindings.iOS.Core/AirshipBindings.iOS.Core.csproj b/src/AirshipBindings.iOS.Core/AirshipBindings.iOS.Core.csproj
index 2db490b7..ae1bc3b6 100644
--- a/src/AirshipBindings.iOS.Core/AirshipBindings.iOS.Core.csproj
+++ b/src/AirshipBindings.iOS.Core/AirshipBindings.iOS.Core.csproj
@@ -1,4 +1,4 @@
-
+
true
Debug
@@ -9,7 +9,7 @@
Airship.Net.iOS.Core
Airship iOS SDK - Core
Core of Airship SDK
- net6.0-ios
+ net7.0-ios
enable
true
true
@@ -17,7 +17,7 @@
$(AirshipIosVersion)
$(AirshipIosNugetVersion)
Resources
- 13.0
+ 14.0
diff --git a/src/AirshipBindings.iOS.Core/ApiDefinitions.cs b/src/AirshipBindings.iOS.Core/ApiDefinitions.cs
index 9cf70341..19983fbe 100644
--- a/src/AirshipBindings.iOS.Core/ApiDefinitions.cs
+++ b/src/AirshipBindings.iOS.Core/ApiDefinitions.cs
@@ -6,3187 +6,3107 @@ Copyright Airship and Contributors
using Foundation;
using ObjCRuntime;
using System;
+using System.Runtime.InteropServices;
using UIKit;
using UserNotifications;
using WebKit;
-namespace UrbanAirship {
- // @interface UAAccountEventTemplate : NSObject
- [BaseType(typeof(NSObject))]
- [DisableDefaultCtor]
- interface UAAccountEventTemplate
- {
- // @property (nonatomic, strong) NSNumber * _Nullable eventValue;
- [NullAllowed, Export("eventValue", ArgumentSemantic.Strong)]
- NSNumber EventValue { get; set; }
-
- // @property (copy, nonatomic) NSString * _Nullable transactionID;
- [NullAllowed, Export("transactionID")]
- string TransactionID { get; set; }
-
- // @property (copy, nonatomic) NSString * _Nullable userID;
- [NullAllowed, Export("userID")]
- string UserID { get; set; }
-
- // @property (copy, nonatomic) NSString * _Nullable category;
- [NullAllowed, Export("category")]
- string Category { get; set; }
-
- // @property (copy, nonatomic) NSString * _Nullable type;
- [NullAllowed, Export("type")]
- string Type { get; set; }
-
- // +(UAAccountEventTemplate * _Nonnull)registeredTemplate __attribute__((warn_unused_result("")));
- [Static]
- [Export("registeredTemplate")]
- UAAccountEventTemplate RegisteredTemplate();
-
- // +(UAAccountEventTemplate * _Nonnull)registeredTemplateWithValueFromString:(NSString * _Nullable)valueString __attribute__((warn_unused_result("")));
- [Static]
- [Export("registeredTemplateWithValueFromString:")]
- UAAccountEventTemplate RegisteredTemplate([NullAllowed] string valueString);
-
- // +(UAAccountEventTemplate * _Nonnull)registeredTemplateWithValue:(NSNumber * _Nullable)value __attribute__((warn_unused_result("")));
- [Static]
- [Export("registeredTemplateWithValue:")]
- UAAccountEventTemplate RegisteredTemplate([NullAllowed] NSNumber value);
-
- // +(UAAccountEventTemplate * _Nonnull)loggedInTemplate __attribute__((warn_unused_result("")));
- [Static]
- [Export("loggedInTemplate")]
- UAAccountEventTemplate LoggedInTemplate();
-
- // +(UAAccountEventTemplate * _Nonnull)loggedInTemplateWithValueFromString:(NSString * _Nullable)valueString __attribute__((warn_unused_result("")));
- [Static]
- [Export("loggedInTemplateWithValueFromString:")]
- UAAccountEventTemplate LoggedInTemplate([NullAllowed] string valueString);
-
- // +(UAAccountEventTemplate * _Nonnull)loggedInTemplateWithValue:(NSNumber * _Nullable)value __attribute__((warn_unused_result("")));
- [Static]
- [Export("loggedInTemplateWithValue:")]
- UAAccountEventTemplate LoggedInTemplate([NullAllowed] NSNumber value);
-
- // +(UAAccountEventTemplate * _Nonnull)loggedOutTemplate __attribute__((warn_unused_result("")));
- [Static]
- [Export("loggedOutTemplate")]
- UAAccountEventTemplate LoggedOutTemplate();
-
- // +(UAAccountEventTemplate * _Nonnull)loggedOutTemplateWithValueFromString:(NSString * _Nullable)valueString __attribute__((warn_unused_result("")));
- [Static]
- [Export("loggedOutTemplateWithValueFromString:")]
- UAAccountEventTemplate LoggedOutTemplate([NullAllowed] string valueString);
-
- // +(UAAccountEventTemplate * _Nonnull)loggedOutTemplateWithValue:(NSNumber * _Nullable)value __attribute__((warn_unused_result("")));
- [Static]
- [Export("loggedOutTemplateWithValue:")]
- UAAccountEventTemplate LoggedOutTemplate([NullAllowed] NSNumber value);
-
- // -(UACustomEvent * _Nullable)createEvent __attribute__((warn_unused_result("")));
- [Export("createEvent")]
- [return: NullAllowed]
- UACustomEvent CreateEvent();
- }
-
- // @interface UAActionRegistry : NSObject
- [BaseType(typeof(NSObject))]
- interface UAActionRegistry
- {
- // @property (readonly, copy, nonatomic) NSSet< *> * _Nonnull registeredEntries;
- [Export("registeredEntries", ArgumentSemantic.Copy)]
- NSSet RegisteredEntries { get; }
-
- // +(UAActionRegistry * _Nonnull)defaultRegistry __attribute__((warn_unused_result("")));
- [Static]
- [Export("defaultRegistry")]
- UAActionRegistry DefaultRegistry { get; }
-
- // -(BOOL)registerAction:(id _Nonnull)action names:(NSArray * _Nonnull)names;
- [Export("registerAction:names:")]
- bool RegisterAction(IUAAction action, string[] names);
-
- // -(BOOL)registerAction:(id _Nonnull)action name:(NSString * _Nonnull)name;
- [Export("registerAction:name:")]
- bool RegisterAction(IUAAction action, string name);
-
- // -(BOOL)registerAction:(id _Nonnull)action name:(NSString * _Nonnull)name predicate:(UAActionPredicate _Nullable)predicate;
- [Export("registerAction:name:predicate:")]
- bool RegisterAction(IUAAction action, string name, [NullAllowed] Action predicate);
-
- // -(BOOL)registerAction:(id _Nonnull)action names:(NSArray * _Nonnull)names predicate:(UAActionPredicate _Nullable)predicate;
- [Export("registerAction:names:predicate:")]
- bool RegisterAction(IUAAction action, string[] names, [NullAllowed] Action predicate);
-
- // -(BOOL)registerActionClass:(Class _Nonnull)actionClass names:(NSArray * _Nonnull)names;
- [Export("registerActionClass:names:")]
- bool RegisterActionClass(Class actionClass, string[] names);
+namespace UrbanAirship
+{
+ // @interface UAAccountEventTemplate : NSObject
+ [BaseType(typeof(NSObject))]
+ [DisableDefaultCtor]
+ interface UAAccountEventTemplate
+ {
+ // @property (nonatomic, strong) NSNumber * _Nullable eventValue;
+ [NullAllowed, Export("eventValue", ArgumentSemantic.Strong)]
+ NSNumber EventValue { get; set; }
+
+ // @property (copy, nonatomic) NSString * _Nullable transactionID;
+ [NullAllowed, Export("transactionID")]
+ string TransactionID { get; set; }
+
+ // @property (copy, nonatomic) NSString * _Nullable userID;
+ [NullAllowed, Export("userID")]
+ string UserID { get; set; }
+
+ // @property (copy, nonatomic) NSString * _Nullable category;
+ [NullAllowed, Export("category")]
+ string Category { get; set; }
+
+ // @property (copy, nonatomic) NSString * _Nullable type;
+ [NullAllowed, Export("type")]
+ string Type { get; set; }
+
+ // +(UAAccountEventTemplate * _Nonnull)registeredTemplate __attribute__((warn_unused_result("")));
+ [Static]
+ [Export("registeredTemplate")]
+ UAAccountEventTemplate RegisteredTemplate();
- // -(BOOL)registerActionClass:(Class _Nonnull)actionClass name:(NSString * _Nonnull)name;
- [Export("registerActionClass:name:")]
- bool RegisterActionClass(Class actionClass, string name);
+ // +(UAAccountEventTemplate * _Nonnull)registeredTemplateWithValueFromString:(NSString * _Nullable)valueString __attribute__((warn_unused_result("")));
+ [Static]
+ [Export("registeredTemplateWithValueFromString:")]
+ UAAccountEventTemplate RegisteredTemplate([NullAllowed] string valueString);
+
+ // +(UAAccountEventTemplate * _Nonnull)registeredTemplateWithValue:(NSNumber * _Nullable)value __attribute__((warn_unused_result("")));
+ [Static]
+ [Export("registeredTemplateWithValue:")]
+ UAAccountEventTemplate RegisteredTemplate([NullAllowed] NSNumber value);
- // -(BOOL)registerActionClass:(Class _Nonnull)actionClass name:(NSString * _Nonnull)name predicate:(UAActionPredicate _Nullable)predicate;
- [Export("registerActionClass:name:predicate:")]
- bool RegisterActionClass(Class actionClass, string name, [NullAllowed] Action predicate);
+ // +(UAAccountEventTemplate * _Nonnull)loggedInTemplate __attribute__((warn_unused_result("")));
+ [Static]
+ [Export("loggedInTemplate")]
+ UAAccountEventTemplate LoggedInTemplate();
- // -(BOOL)registerActionClass:(Class _Nonnull)actionClass names:(NSArray * _Nonnull)names predicate:(UAActionPredicate _Nullable)predicate;
- [Export("registerActionClass:names:predicate:")]
- bool RegisterActionClass(Class actionClass, string[] names, [NullAllowed] Action predicate);
+ // +(UAAccountEventTemplate * _Nonnull)loggedInTemplateWithValueFromString:(NSString * _Nullable)valueString __attribute__((warn_unused_result("")));
+ [Static]
+ [Export("loggedInTemplateWithValueFromString:")]
+ UAAccountEventTemplate LoggedInTemplate([NullAllowed] string valueString);
- // -(void)removeEntryWithName:(NSString * _Nonnull)name;
- [Export("removeEntryWithName:")]
- void RemoveEntry(string name);
+ // +(UAAccountEventTemplate * _Nonnull)loggedInTemplateWithValue:(NSNumber * _Nullable)value __attribute__((warn_unused_result("")));
+ [Static]
+ [Export("loggedInTemplateWithValue:")]
+ UAAccountEventTemplate LoggedInTemplate([NullAllowed] NSNumber value);
- // -(void)removeName:(NSString * _Nonnull)name;
- [Export("removeName:")]
- void RemoveName(string name);
+ // +(UAAccountEventTemplate * _Nonnull)loggedOutTemplate __attribute__((warn_unused_result("")));
+ [Static]
+ [Export("loggedOutTemplate")]
+ UAAccountEventTemplate LoggedOutTemplate();
- // -(BOOL)addName:(NSString * _Nonnull)name forEntryWithName:(NSString * _Nonnull)entryName;
- [Export("addName:forEntryWithName:")]
- bool AddName(string name, string entryName);
+ // +(UAAccountEventTemplate * _Nonnull)loggedOutTemplateWithValueFromString:(NSString * _Nullable)valueString __attribute__((warn_unused_result("")));
+ [Static]
+ [Export("loggedOutTemplateWithValueFromString:")]
+ UAAccountEventTemplate LoggedOutTemplate([NullAllowed] string valueString);
- // -(BOOL)addSituationOverride:(enum UASituation)situation forEntryWithName:(NSString * _Nonnull)name action:(id _Nullable)action;
- [Export("addSituationOverride:forEntryWithName:action:")]
- bool AddSituationOverride(UASituation situation, string name, [NullAllowed] UAAction action);
+ // +(UAAccountEventTemplate * _Nonnull)loggedOutTemplateWithValue:(NSNumber * _Nullable)value __attribute__((warn_unused_result("")));
+ [Static]
+ [Export("loggedOutTemplateWithValue:")]
+ UAAccountEventTemplate LoggedOutTemplate([NullAllowed] NSNumber value);
- // -(UAActionRegistryEntry * _Nullable)registryEntryWithName:(NSString * _Nonnull)name __attribute__((warn_unused_result("")));
- [Export("registryEntryWithName:")]
+ // -(UACustomEvent * _Nullable)createEvent __attribute__((warn_unused_result("")));
+ [Export("createEvent")]
[return: NullAllowed]
- UAActionRegistryEntry RegistryEntry(string name);
-
- // -(BOOL)updatePredicate:(UAActionPredicate _Nullable)predicate forEntryWithName:(NSString * _Nonnull)name;
- [Export("updatePredicate:forEntryWithName:")]
- bool UpdatePredicate([NullAllowed] Action predicate, string name);
-
- // -(BOOL)updateAction:(id _Nonnull)action forEntryWithName:(NSString * _Nonnull)name;
- [Export("updateAction:forEntryWithName:")]
- bool UpdateAction(IUAAction action, string name);
-
- // -(BOOL)updateActionClass:(Class _Nonnull)actionClass forEntryWithName:(NSString * _Nonnull)name;
- [Export("updateActionClass:forEntryWithName:")]
- bool UpdateActionClass(Class actionClass, string name);
-
- // -(void)registerActionsFromFile:(NSString * _Nonnull)path;
- [Export("registerActionsFromFile:")]
- void RegisterActions(string path);
- }
-
- // @interface UAActionRegistryEntry : NSObject
- [BaseType(typeof(NSObject))]
- [DisableDefaultCtor]
- interface UAActionRegistryEntry
- {
- // @property (readonly, copy, nonatomic) NSArray * _Nonnull names;
- [Export("names", ArgumentSemantic.Copy)]
- string[] Names { get; }
-
- // @property (readonly, copy, nonatomic) UAActionPredicate _Nullable predicate;
- [NullAllowed, Export("predicate", ArgumentSemantic.Copy)]
- Action Predicate { get; }
-
- // @property (readonly, nonatomic, strong) id _Nonnull action;
- [Export("action", ArgumentSemantic.Strong)]
- IUAAction Action { get; }
-
- // -(id _Nonnull)actionForSituation:(enum UASituation)situation __attribute__((warn_unused_result("")));
- [Export("actionForSituation:")]
- IUAAction ActionForSituation(UASituation situation);
- }
-
- // @interface UAActionRunner : NSObject
- [BaseType(typeof(NSObject))]
- interface UAActionRunner
- {
- // +(void)runActionWithName:(NSString * _Nonnull)actionName value:(id _Nullable)value situation:(enum UASituation)situation;
- [Static]
- [Export("runActionWithName:value:situation:")]
- void RunAction(string actionName, [NullAllowed] NSObject value, UASituation situation);
-
- // +(void)runActionWithName:(NSString * _Nonnull)actionName value:(id _Nullable)value situation:(enum UASituation)situation metadata:(NSDictionary * _Nullable)metadata;
- [Static]
- [Export("runActionWithName:value:situation:metadata:")]
- void RunAction(string actionName, [NullAllowed] NSObject value, UASituation situation, [NullAllowed] NSDictionary metadata);
-
- // +(void)runActionWithName:(NSString * _Nonnull)actionName value:(id _Nullable)value situation:(enum UASituation)situation completionHandler:(UAActionCompletionHandler _Nullable)completionHandler;
- [Static]
- [Export("runActionWithName:value:situation:completionHandler:")]
- void RunAction(string actionName, [NullAllowed] NSObject value, UASituation situation, [NullAllowed] UAActionCompletionHandler completionHandler);
-
- // +(void)runActionWithName:(NSString * _Nonnull)actionName value:(id _Nullable)value situation:(enum UASituation)situation metadata:(NSDictionary * _Nullable)metadata completionHandler:(UAActionCompletionHandler _Nullable)completionHandler;
- [Static]
- [Export("runActionWithName:value:situation:metadata:completionHandler:")]
- void RunAction(string actionName, [NullAllowed] NSObject value, UASituation situation, [NullAllowed] NSDictionary metadata, [NullAllowed] UAActionCompletionHandler completionHandler);
-
- // +(void)runAction:(id _Nonnull)action value:(id _Nullable)value situation:(enum UASituation)situation;
- [Static]
- [Export("runAction:value:situation:")]
- void RunAction(IUAAction action, [NullAllowed] NSObject value, UASituation situation);
-
- // +(void)runAction:(id _Nonnull)action value:(id _Nullable)value situation:(enum UASituation)situation metadata:(NSDictionary * _Nullable)metadata;
- [Static]
- [Export("runAction:value:situation:metadata:")]
- void RunAction(IUAAction action, [NullAllowed] NSObject value, UASituation situation, [NullAllowed] NSDictionary metadata);
-
- // +(void)runAction:(id _Nonnull)action value:(id _Nullable)value situation:(enum UASituation)situation completionHandler:(UAActionCompletionHandler _Nullable)completionHandler;
- [Static]
- [Export("runAction:value:situation:completionHandler:")]
- void RunAction(IUAAction action, [NullAllowed] NSObject value, UASituation situation, [NullAllowed] UAActionCompletionHandler completionHandler);
-
- // +(void)runAction:(id _Nonnull)action value:(id _Nullable)value situation:(enum UASituation)situation metadata:(NSDictionary * _Nullable)metadata completionHandler:(UAActionCompletionHandler _Nullable)completionHandler;
- [Static]
- [Export("runAction:value:situation:metadata:completionHandler:")]
- void RunAction(IUAAction action, [NullAllowed] NSObject value, UASituation situation, [NullAllowed] NSDictionary metadata, [NullAllowed] UAActionCompletionHandler completionHandler);
-
- // +(void)runActionsWithActionValues:(NSDictionary * _Nonnull)actionValues situation:(enum UASituation)situation metadata:(NSDictionary * _Nullable)metadata completionHandler:(UAActionCompletionHandler _Nullable)completionHandler;
- [Static]
- [Export("runActionsWithActionValues:situation:metadata:completionHandler:")]
- void RunActions(NSDictionary actionValues, UASituation situation, [NullAllowed] NSDictionary metadata, [NullAllowed] UAActionCompletionHandler completionHandler);
- }
-
- // @interface UAActivityViewController : UIActivityViewController
- [BaseType(typeof(UIActivityViewController))]
- interface UAActivityViewController : IUIPopoverControllerDelegate, IUIPopoverPresentationControllerDelegate
- {
- // @property (copy, nonatomic) void (^ _Nullable)(void) dismissalBlock;
- [NullAllowed, Export("dismissalBlock", ArgumentSemantic.Copy)]
- Action DismissalBlock { get; set; }
-
- // -(CGRect)sourceRect __attribute__((warn_unused_result("")));
- [Export("sourceRect")]
- CGRect SourceRect { get; }
-
- // -(instancetype _Nonnull)initWithActivityItems:(NSArray * _Nonnull)activityItems applicationActivities:(NSArray * _Nullable)applicationActivities __attribute__((objc_designated_initializer));
- [Export("initWithActivityItems:applicationActivities:")]
- [DesignatedInitializer]
- IntPtr Constructor(NSObject[] activityItems, [NullAllowed] UIActivity[] applicationActivities);
- }
-
- // @interface UAAddCustomEventAction : NSObject
- [BaseType(typeof(NSObject))]
- interface UAAddCustomEventAction : IUAAction
- {
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull name;
- [Static]
- [Export("name")]
- string Name { get; }
- }
-
- // @interface UAAddCustomEventActionPredicate : NSObject
- [BaseType(typeof(NSObject))]
- interface UAAddCustomEventActionPredicate : IUAActionPredicateProtocol
- {
- }
-
- // @interface UAModifyTagsAction : NSObject
- [BaseType(typeof(NSObject))]
- interface UAModifyTagsAction : IUAAction
- {
- }
-
- // @interface UAAddTagsAction : UAModifyTagsAction
- [BaseType(typeof(UAModifyTagsAction))]
- interface UAAddTagsAction
- {
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull name;
- [Static]
- [Export("name")]
- string Name { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull shortName;
- [Static]
- [Export("shortName")]
- string ShortName { get; }
- }
-
- // @interface UAAggregateActionResult : UAActionResult
- [BaseType(typeof(UAActionResult))]
- interface UAAggregateActionResult
- {
- // -(void)addResult:(UAActionResult * _Nonnull)result forAction:(NSString * _Nonnull)actionName;
- [Export("addResult:forAction:")]
- void AddResult(UAActionResult result, string actionName);
-
- // -(UAActionResult * _Nullable)resultForAction:(NSString * _Nonnull)actionName __attribute__((warn_unused_result("")));
- [Export("resultForAction:")]
- [return: NullAllowed]
- UAActionResult ResultForAction(string actionName);
- }
-
- // @interface UAirship : NSObject
- [BaseType(typeof(NSObject))]
- [DisableDefaultCtor]
- interface UAirship
- {
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull deepLinkScheme;
- [Static]
- [Export("deepLinkScheme")]
- string DeepLinkScheme { get; }
-
- // @property (readonly, nonatomic, class) NSNotificationName _Nonnull airshipReadyNotification;
- [Static]
- [Export("airshipReadyNotification")]
- string AirshipReadyNotification { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull airshipReadyChannelIdentifier;
- [Static]
- [Export("airshipReadyChannelIdentifier")]
- string AirshipReadyChannelIdentifier { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull airshipReadyAppKey;
- [Static]
- [Export("airshipReadyAppKey")]
- string AirshipReadyAppKey { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull airshipReadyPayloadVersion;
- [Static]
- [Export("airshipReadyPayloadVersion")]
- string AirshipReadyPayloadVersion { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull resetKeyChainKey;
- [Static]
- [Export("resetKeyChainKey")]
- string ResetKeyChainKey { get; }
-
- // @property (readonly, nonatomic, class) BOOL isFlying;
- [Static]
- [Export("isFlying")]
- bool IsFlying { get; }
-
- // @property (readonly, nonatomic, strong) UARuntimeConfig * _Nonnull config;
- [Export("config", ArgumentSemantic.Strong)]
- UARuntimeConfig Config { get; }
-
- // @property (readonly, nonatomic, strong) UAActionRegistry * _Nonnull actionRegistry;
- [Export("actionRegistry", ArgumentSemantic.Strong)]
- UAActionRegistry ActionRegistry { get; }
+ UACustomEvent CreateEvent();
+ }
+
+ // @interface UAActionRunner : NSObject
+ [BaseType(typeof(NSObject))]
+ interface UAActionRunner
+ {
+ // +(void)runActions:(NSDictionary)actionsPayload situation:(enum UAActionSituation)situation completionHandler:(void (^ _Nonnull)(void))completionHandler;
+ [Static]
+ [Export("runActions:situation:completionHandler:")]
+ void RunActions(NSDictionary actionsPayload, UAActionSituation situation, Action completionHandler);
+ }
+
+ // @interface UAActivityViewController : UIActivityViewController
+ [BaseType(typeof(NSObject))]
+ interface UAActivityViewController : IUIPopoverControllerDelegate, IUIPopoverPresentationControllerDelegate
+ {
+ // @property (copy, nonatomic) void (^ _Nullable)(void) dismissalBlock;
+ [NullAllowed, Export("dismissalBlock", ArgumentSemantic.Copy)]
+ Action DismissalBlock { get; set; }
+
+ // -(CGRect)sourceRect __attribute__((warn_unused_result("")));
+ [Export("sourceRect")]
+ CGRect SourceRect();
+
+ // -(instancetype _Nonnull)initWithActivityItems:(NSArray * _Nonnull)activityItems applicationActivities:(NSArray * _Nullable)applicationActivities __attribute__((objc_designated_initializer));
+ [Export("initWithActivityItems:applicationActivities:")]
+ [DesignatedInitializer]
+ IntPtr Constructor(NSObject[] activityItems, [NullAllowed] UIActivity[] applicationActivities);
+ }
+
+ // @interface UAirship : NSObject
+ [BaseType(typeof(NSObject))]
+ [DisableDefaultCtor]
+ interface UAirship
+ {
+ // @property (readonly, copy, nonatomic, class) NSString * _Nonnull deepLinkScheme;
+ [Static]
+ [Export("deepLinkScheme")]
+ string DeepLinkScheme { get; }
+
+ // @property (readonly, nonatomic, class) NSNotificationName _Nonnull airshipReadyNotification;
+ [Static]
+ [Export("airshipReadyNotification")]
+ string AirshipReadyNotification { get; }
+
+ // @property (readonly, copy, nonatomic, class) NSString * _Nonnull airshipReadyChannelIdentifier;
+ [Static]
+ [Export("airshipReadyChannelIdentifier")]
+ string AirshipReadyChannelIdentifier { get; }
+
+ // @property (readonly, copy, nonatomic, class) NSString * _Nonnull airshipReadyAppKey;
+ [Static]
+ [Export("airshipReadyAppKey")]
+ string AirshipReadyAppKey { get; }
+
+ // @property (readonly, copy, nonatomic, class) NSString * _Nonnull airshipReadyPayloadVersion;
+ [Static]
+ [Export("airshipReadyPayloadVersion")]
+ string AirshipReadyPayloadVersion { get; }
+
+ // @property (readonly, nonatomic, class) BOOL isFlying;
+ [Static]
+ [Export("isFlying")]
+ bool IsFlying { get; }
+
+ // @property (readonly, nonatomic, strong) UARuntimeConfig * _Nonnull config;
+ [Export("config", ArgumentSemantic.Strong)]
+ UARuntimeConfig Config { get; }
// @property (readonly, nonatomic, strong) UAApplicationMetrics * _Nonnull applicationMetrics;
[Export("applicationMetrics", ArgumentSemantic.Strong)]
- UAApplicationMetrics ApplicationMetrics { get; }
-
- [Wrap("WeakJavaScriptCommandDelegate")]
- [NullAllowed]
- IUAJavaScriptCommandDelegate JavaScriptCommandDelegate { get; set; }
-
- // @property (nonatomic, weak) id _Nullable javaScriptCommandDelegate;
- [NullAllowed, Export("javaScriptCommandDelegate", ArgumentSemantic.Weak)]
- NSObject WeakJavaScriptCommandDelegate { get; set; }
-
- // @property (readonly, nonatomic, strong) UAChannelCapture * _Nonnull channelCapture;
- [Export("channelCapture", ArgumentSemantic.Strong)]
- UAChannelCapture ChannelCapture { get; }
-
- [Wrap("WeakDeepLinkDelegate")]
- [NullAllowed]
- IUADeepLinkDelegate DeepLinkDelegate { get; set; }
-
- // @property (nonatomic, weak) id _Nullable deepLinkDelegate;
- [NullAllowed, Export("deepLinkDelegate", ArgumentSemantic.Weak)]
- NSObject WeakDeepLinkDelegate { get; set; }
-
- // @property (readonly, nonatomic, strong) UAURLAllowList * _Nonnull URLAllowList;
- [Export("URLAllowList", ArgumentSemantic.Strong)]
- UAURLAllowList URLAllowList { get; }
-
- // @property (readonly, nonatomic, strong) UALocaleManager * _Nonnull localeManager;
- [Export("localeManager", ArgumentSemantic.Strong)]
- UALocaleManager LocaleManager { get; }
-
- // @property (readonly, nonatomic, strong) UAPrivacyManager * _Nonnull privacyManager;
- [Export("privacyManager", ArgumentSemantic.Strong)]
- UAPrivacyManager PrivacyManager { get; }
-
- // @property (readonly, copy, nonatomic) NSArray> * _Nonnull components;
- [Export("components", ArgumentSemantic.Copy)]
- IUAComponent[] Components { get; }
-
- // @property (readonly, nonatomic, strong, class) UAirship * _Nonnull shared;
- [Static]
- [Export("shared", ArgumentSemantic.Strong)]
- UAirship Shared { get; }
-
- // @property (readonly, nonatomic, strong, class) UAPush * _Nonnull push;
- [Static]
- [Export("push", ArgumentSemantic.Strong)]
- UAPush Push { get; }
-
- // @property (readonly, nonatomic, strong, class) UAContact * _Nonnull contact;
- [Static]
- [Export("contact", ArgumentSemantic.Strong)]
- UAContact Contact { get; }
-
- // @property (readonly, nonatomic, strong, class) UAAnalytics * _Nonnull analytics;
- [Static]
- [Export("analytics", ArgumentSemantic.Strong)]
- UAAnalytics Analytics { get; }
-
- // @property (readonly, nonatomic, strong, class) UAChannel * _Nonnull channel;
- [Static]
- [Export("channel", ArgumentSemantic.Strong)]
- UAChannel Channel { get; }
-
- // @property (readonly, nonatomic, strong, class) UANamedUser * _Nonnull namedUser;
- [Static]
- [Export("namedUser", ArgumentSemantic.Strong)]
- UANamedUser NamedUser { get; }
-
- // +(void)takeOffWithLaunchOptions:(NSDictionary * _Nullable)launchOptions;
- [Static]
- [Export("takeOffWithLaunchOptions:")]
- void TakeOff([NullAllowed] NSDictionary launchOptions);
-
- // +(void)takeOff:(UAConfig * _Nullable)config launchOptions:(NSDictionary * _Nullable)launchOptions;
- [Static]
- [Export("takeOff:launchOptions:")]
- void TakeOff([NullAllowed] UAConfig config, [NullAllowed] NSDictionary launchOptions);
-
- // @property (nonatomic, class) enum UALogLevel logLevel;
- [Static]
- [Export("logLevel", ArgumentSemantic.Assign)]
- UALogLevel LogLevel { get; set; }
-
- // +(id _Nullable)componentForClassName:(NSString * _Nonnull)className __attribute__((warn_unused_result("")));
- [Static]
- [Export("componentForClassName:")]
- [return: NullAllowed]
- IUAComponent ComponentForClassName(string className);
-
- // -(void)deepLink:(NSURL * _Nonnull)deepLink completionHandler:(void (^ _Nonnull)(BOOL))completionHandler;
- [Export("deepLink:completionHandler:")]
- void DeepLink(NSUrl deepLink, Action completionHandler);
- }
-
- // @interface UAirshipCoreResources : NSObject
- [BaseType(typeof(NSObject))]
- interface UAirshipCoreResources
- {
- // @property (readonly, nonatomic, strong, class) NSBundle * _Nonnull bundle;
- [Static]
- [Export("bundle", ArgumentSemantic.Strong)]
- NSBundle Bundle { get; }
- }
-
- // @interface UAirshipErrors : NSObject
- [BaseType(typeof(NSObject))]
- interface UAirshipErrors
- {
- // +(NSError * _Nonnull)parseError:(NSString * _Nonnull)message __attribute__((warn_unused_result("")));
- [Static]
- [Export("parseError:")]
- NSError ParseError(string message);
-
- // +(NSError * _Nonnull)error:(NSString * _Nonnull)message __attribute__((warn_unused_result("")));
- [Static]
- [Export("error:")]
- NSError Error(string message);
- }
-
- // @interface UAirshipVersion : NSObject
- [BaseType(typeof(NSObject))]
- interface UAirshipVersion
- {
- // +(NSString * _Nonnull)get __attribute__((warn_unused_result("")));
- [Static]
- [Export("get")]
- string Get { get; }
- }
-
- // @interface UAAnalytics : NSObject
- [BaseType(typeof(UAComponent))]
- [DisableDefaultCtor]
- interface UAAnalytics : IUAComponent
- {
- // @property (readonly, nonatomic, strong, class) UAAnalytics * _Nonnull shared;
- [Static]
- [Export("shared", ArgumentSemantic.Strong)]
- UAAnalytics Shared { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull screenKey;
- [Static]
- [Export("screenKey")]
- string ScreenKey { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull eventKey;
- [Static]
- [Export("eventKey")]
- string EventKey { get; }
-
- // @property (readonly, nonatomic, class) NSNotificationName _Nonnull customEventAdded;
- [Static]
- [Export("customEventAdded")]
- string CustomEventAdded { get; }
-
- // @property (readonly, nonatomic, class) NSNotificationName _Nonnull regionEventAdded;
- [Static]
- [Export("regionEventAdded")]
- string RegionEventAdded { get; }
-
- // @property (readonly, nonatomic, class) NSNotificationName _Nonnull screenTracked;
- [Static]
- [Export("screenTracked")]
- string ScreenTracked { get; }
-
- // @property (copy, nonatomic) NSString * _Nullable conversionSendID;
- [NullAllowed, Export("conversionSendID")]
- string ConversionSendID { get; set; }
-
- // @property (copy, nonatomic) NSString * _Nullable conversionPushMetadata;
- [NullAllowed, Export("conversionPushMetadata")]
- string ConversionPushMetadata { get; set; }
-
- // @property (readonly, copy, nonatomic) NSString * _Nullable sessionID;
- [NullAllowed, Export("sessionID")]
- string SessionID { get; }
-
- // @property (getter = isComponentEnabled, nonatomic) BOOL componentEnabled;
- [Export("componentEnabled")]
- bool ComponentEnabled { [Bind("isComponentEnabled")] get; set; }
-
- // -(void)addEvent:(id _Nonnull)event;
- [Export("addEvent:")]
- void AddEvent(IUAEvent @event);
-
- // -(void)associateDeviceIdentifiers:(UAAssociatedIdentifiers * _Nonnull)associatedIdentifiers;
- [Export("associateDeviceIdentifiers:")]
- void AssociateDeviceIdentifiers(UAAssociatedIdentifiers associatedIdentifiers);
-
- // -(UAAssociatedIdentifiers * _Nonnull)currentAssociatedDeviceIdentifiers __attribute__((warn_unused_result("")));
- [Export("currentAssociatedDeviceIdentifiers")]
- UAAssociatedIdentifiers CurrentAssociatedDeviceIdentifiers { get; }
-
- // -(void)trackScreen:(NSString * _Nullable)screen;
- [Export("trackScreen:")]
- void TrackScreen([NullAllowed] string screen);
-
- // -(void)scheduleUpload;
- [Export("scheduleUpload")]
- void ScheduleUpload();
+ UAApplicationMetrics ApplicationMetrics { get; }
+
+ [Wrap("WeakJavaScriptCommandDelegate")]
+ [NullAllowed]
+ IUAJavaScriptCommandDelegate JavaScriptCommandDelegate { get; set; }
+
+ // @property (nonatomic, weak) id _Nullable javaScriptCommandDelegate;
+ [NullAllowed, Export("javaScriptCommandDelegate", ArgumentSemantic.Weak)]
+ NSObject WeakJavaScriptCommandDelegate { get; set; }
+
+ // @property (readonly, nonatomic, strong) UAPermissionsManager * _Nonnull permissionsManager;
+ [Export("permissionsManager", ArgumentSemantic.Strong)]
+ UAPermissionsManager PermissionsManager { get; }
+
+ // @property (readonly, nonatomic, strong) UAChannelCapture * _Nonnull channelCapture;
+ [Export("channelCapture", ArgumentSemantic.Strong)]
+ UAChannelCapture ChannelCapture { get; }
+
+ [Wrap("WeakDeepLinkDelegate")]
+ [NullAllowed]
+ IUADeepLinkDelegate DeepLinkDelegate { get; set; }
+
+ // @property (nonatomic, weak) id _Nullable deepLinkDelegate;
+ [NullAllowed, Export("deepLinkDelegate", ArgumentSemantic.Weak)]
+ NSObject WeakDeepLinkDelegate { get; set; }
+
+ // @property (readonly, nonatomic, strong) UAURLAllowList * _Nonnull URLAllowList;
+ [Export("URLAllowList", ArgumentSemantic.Strong)]
+ UAURLAllowList URLAllowList { get; }
+
+ // @property (readonly, nonatomic, strong) UALocaleManager * _Nonnull localeManager;
+ [Export("localeManager", ArgumentSemantic.Strong)]
+ UALocaleManager LocaleManager { get; }
+
+ // @property (readonly, nonatomic, strong) UAPrivacyManager * _Nonnull privacyManager;
+ [Export("privacyManager", ArgumentSemantic.Strong)]
+ UAPrivacyManager PrivacyManager { get; }
+
+ // @property (readonly, nonatomic, strong, class) UAirship * _Nonnull shared;
+ [Static]
+ [Export("shared", ArgumentSemantic.Strong)]
+ UAirship Shared { get; }
+
+ // @property (readonly, nonatomic, strong, class) UAPush * _Nonnull push;
+ [Static]
+ [Export("push", ArgumentSemantic.Strong)]
+ UAPush Push { get; }
+
+ // @property (readonly, nonatomic, strong, class) UAContact * _Nonnull contact;
+ [Static]
+ [Export("contact", ArgumentSemantic.Strong)]
+ UAContact Contact { get; }
+
+ // @property (readonly, nonatomic, strong, class) UAAnalytics * _Nonnull analytics;
+ [Static]
+ [Export("analytics", ArgumentSemantic.Strong)]
+ UAAnalytics Analytics { get; }
+
+ // @property (readonly, nonatomic, strong, class) UAChannel * _Nonnull channel;
+ [Static]
+ [Export("channel", ArgumentSemantic.Strong)]
+ UAChannel Channel { get; }
+
+ // +(void)takeOffWithLaunchOptions:(NSDictionary * _Nullable)launchOptions;
+ [Static]
+ [Export("takeOffWithLaunchOptions:")]
+ void TakeOff([NullAllowed] NSDictionary launchOptions);
+
+ // +(void)takeOff:(UAConfig * _Nullable)config launchOptions:(NSDictionary * _Nullable)launchOptions;
+ [Static]
+ [Export("takeOff:launchOptions:")]
+ void TakeOff([NullAllowed] UAConfig config, [NullAllowed] NSDictionary launchOptions);
+
+ // @property (nonatomic, strong, class) id _Nonnull logHandler;
+ [Static]
+ [Export("logHandler", ArgumentSemantic.Strong)]
+ UAirshipLogHandler LogHandler { get; set; }
+
+ // @property (nonatomic, class) enum UALogLevel logLevel;
+ [Static]
+ [Export("logLevel", ArgumentSemantic.Assign)]
+ UALogLevel LogLevel { get; set; }
+
+ // +(id _Nullable)componentForClassName:(NSString * _Nonnull)className __attribute__((warn_unused_result("")));
+ [Static]
+ [Export("componentForClassName:")]
+ [return: NullAllowed]
+ IUAComponent ComponentForClassName(string className);
+
+ // -(void)deepLink:(NSURL * _Nonnull)deepLink completionHandler:(void (^ _Nonnull)(BOOL))completionHandler;
+ [Export("deepLink:completionHandler:")]
+ void DeepLink(NSUrl deepLink, Action completionHandler);
+ }
+
+ // @interface UAirshipCoreResources : NSObject
+ [BaseType(typeof(NSObject))]
+ interface UAirshipCoreResources
+ {
+ // @property (readonly, nonatomic, strong, class) NSBundle * _Nonnull bundle;
+ [Static]
+ [Export("bundle", ArgumentSemantic.Strong)]
+ NSBundle Bundle { get; }
+ }
+
+ // @interface UAirshipErrors : NSObject
+ [BaseType(typeof(NSObject))]
+ interface UAirshipErrors
+ {
+ // +(NSError * _Nonnull)parseError:(NSString * _Nonnull)message __attribute__((warn_unused_result("")));
+ [Static]
+ [Export("parseError:")]
+ NSError ParseError(string message);
+
+ // +(NSError * _Nonnull)error:(NSString * _Nonnull)message __attribute__((warn_unused_result("")));
+ [Static]
+ [Export("error:")]
+ NSError Error(string message);
+ }
+
+ // @interface UAirshipVersion : NSObject
+ [BaseType(typeof(NSObject))]
+ interface UAirshipVersion
+ {
+ // +(NSString * _Nonnull)get __attribute__((warn_unused_result("")));
+ [Static]
+ [Export("get")]
+ string Get();
+ }
+
+ // @interface UAAnalytics : NSObject
+ [BaseType(typeof(UAComponent))]
+ [DisableDefaultCtor]
+ interface UAAnalytics : IUAComponent
+ {
+ // @property (readonly, nonatomic, strong, class) UAAnalytics * _Nonnull shared;
+ [Static]
+ [Export("shared", ArgumentSemantic.Strong)]
+ UAAnalytics Shared { get; }
+
+ // @property (readonly, copy, nonatomic, class) NSString * _Nonnull screenKey;
+ [Static]
+ [Export("screenKey")]
+ string ScreenKey { get; }
+
+ // @property (readonly, copy, nonatomic, class) NSString * _Nonnull eventKey;
+ [Static]
+ [Export("eventKey")]
+ string EventKey { get; }
+
+ // @property (readonly, nonatomic, class) NSNotificationName _Nonnull customEventAdded;
+ [Static]
+ [Export("customEventAdded")]
+ string CustomEventAdded { get; }
+
+ // @property (readonly, nonatomic, class) NSNotificationName _Nonnull regionEventAdded;
+ [Static]
+ [Export("regionEventAdded")]
+ string RegionEventAdded { get; }
+
+ // @property (readonly, nonatomic, class) NSNotificationName _Nonnull screenTracked;
+ [Static]
+ [Export("screenTracked")]
+ string ScreenTracked { get; }
+
+ // @property (copy, nonatomic) NSString * _Nullable conversionSendID;
+ [NullAllowed, Export("conversionSendID")]
+ string ConversionSendID { get; set; }
+
+ // @property (copy, nonatomic) NSString * _Nullable conversionPushMetadata;
+ [NullAllowed, Export("conversionPushMetadata")]
+ string ConversionPushMetadata { get; set; }
+
+ // @property (readonly, copy, nonatomic) NSString * _Nullable sessionID;
+ [NullAllowed, Export("sessionID")]
+ string SessionID { get; }
+
+ // @property (getter = isComponentEnabled, nonatomic) BOOL componentEnabled;
+ [Export("componentEnabled")]
+ bool ComponentEnabled { [Bind("isComponentEnabled")] get; set; }
+
+ // -(void)addEvent:(id _Nonnull)event;
+ [Export("addEvent:")]
+ void AddEvent(IUAEvent @event);
+
+ // -(void)associateDeviceIdentifiers:(UAAssociatedIdentifiers * _Nonnull)associatedIdentifiers;
+ [Export("associateDeviceIdentifiers:")]
+ void AssociateDeviceIdentifiers(UAAssociatedIdentifiers associatedIdentifiers);
+
+ // -(UAAssociatedIdentifiers * _Nonnull)currentAssociatedDeviceIdentifiers __attribute__((warn_unused_result("")));
+ [Export("currentAssociatedDeviceIdentifiers")]
+ UAAssociatedIdentifiers CurrentAssociatedDeviceIdentifiers();
+
+ // -(void)trackScreen:(NSString * _Nullable)screen;
+ [Export("trackScreen:")]
+ void TrackScreen([NullAllowed] string screen);
+
+ // -(void)scheduleUpload;
+ [Export("scheduleUpload")]
+ void ScheduleUpload();
// -(void)registerSDKExtension:(enum UASDKExtension)ext version:(NSString * _Nonnull)version;
[Export("registerSDKExtension:version:")]
void RegisterSDKExtension(UASDKExtension ext, string version);
- // -(void)launchedFromNotification:(NSDictionary * _Nonnull)notification;
- [Export("launchedFromNotification:")]
- void LaunchedFromNotification(NSDictionary notification);
- }
-
- // @interface UAAppIntegration : NSObject
- [BaseType(typeof(NSObject))]
- interface UAAppIntegration
- {
- // @property (nonatomic, strong, class) id _Nullable integrationDelegate;
- [Static]
- [NullAllowed, Export("integrationDelegate", ArgumentSemantic.Strong)]
- NSObject WeakIntegrationDelegate { get; set; }
-
- // +(void)applicatin:(UIApplication * _Nonnull)application performFetchWithCompletionHandler:(void (^ _Nonnull)(UIBackgroundFetchResult))completionHandler __attribute__((deprecated("Use application(_:performFetchWithCompletionHandler:) instead")));
- [Static]
- [Export("applicatin:performFetchWithCompletionHandler:")]
- void PerformFetch(UIApplication application, Action completionHandler);
-
- // +(void)application:(UIApplication * _Nonnull)application performFetchWithCompletionHandler:(void (^ _Nonnull)(UIBackgroundFetchResult))completionHandler;
- [Static]
- [Export("application:performFetchWithCompletionHandler:")]
- void Application(UIApplication application, Action completionHandler);
-
- // +(void)application:(UIApplication * _Nonnull)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData * _Nonnull)deviceToken;
- [Static]
- [Export("application:didRegisterForRemoteNotificationsWithDeviceToken:")]
- void DidRegisterForRemoteNotifications(UIApplication application, NSData deviceToken);
-
- // +(void)application:(UIApplication * _Nonnull)application didFailToRegisterForRemoteNotificationsWithError:(NSError * _Nonnull)error;
- [Static]
- [Export("application:didFailToRegisterForRemoteNotificationsWithError:")]
- void DidFailToRegisterForRemoteNotifications(UIApplication application, NSError error);
-
- // +(void)application:(UIApplication * _Nonnull)application didReceiveRemoteNotification:(NSDictionary * _Nonnull)userInfo fetchCompletionHandler:(void (^ _Nonnull)(UIBackgroundFetchResult))completionHandler;
- [Static]
- [Export("application:didReceiveRemoteNotification:fetchCompletionHandler:")]
- void DidReceiveRemoteNotification(UIApplication application, NSDictionary userInfo, Action completionHandler);
-
- // +(void)userNotificationCenterWithCenter:(UNUserNotificationCenter * _Nonnull)center willPresentNotification:(UNNotification * _Nonnull)notification withCompletionHandler:(void (^ _Nonnull)(UNNotificationPresentationOptions))completionHandler __attribute__((deprecated("Use userNotificationCenter(_:willPresent:withCompletionHandler:) instead")));
- [Static]
- [Export("userNotificationCenterWithCenter:willPresentNotification:withCompletionHandler:")]
- void WillPresentNotification(UNUserNotificationCenter center, UNNotification notification, Action completionHandler);
-
- // +(void)userNotificationCenter:(UNUserNotificationCenter * _Nonnull)center willPresentNotification:(UNNotification * _Nonnull)notification withCompletionHandler:(void (^ _Nonnull)(UNNotificationPresentationOptions))completionHandler;
- [Static]
- [Export("userNotificationCenter:willPresentNotification:withCompletionHandler:")]
- void UserNotificationCenter(UNUserNotificationCenter center, UNNotification notification, Action completionHandler);
-
- // +(void)userNotificationCenterWithCenter:(UNUserNotificationCenter * _Nonnull)center didReceiveNotificationResponse:(UNNotificationResponse * _Nonnull)response withCompletionHandler:(void (^ _Nonnull)(void))completionHandler __attribute__((deprecated("Use userNotificationCenter(_:didReceive:withCompletionHandler:) instead")));
- [Static]
- [Export("userNotificationCenterWithCenter:didReceiveNotificationResponse:withCompletionHandler:")]
- void DidReceiveNotificationResponse(UNUserNotificationCenter center, UNNotificationResponse response, Action completionHandler);
-
- // +(void)userNotificationCenter:(UNUserNotificationCenter * _Nonnull)center didReceiveNotificationResponse:(UNNotificationResponse * _Nonnull)response withCompletionHandler:(void (^ _Nonnull)(void))completionHandler;
- [Static]
- [Export("userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:")]
- void UserNotificationCenter(UNUserNotificationCenter center, UNNotificationResponse response, Action completionHandler);
-
- }
-
- // @interface UAApplicationMetrics : NSObject
- [BaseType(typeof(NSObject))]
- [DisableDefaultCtor]
- interface UAApplicationMetrics
- {
- // @property (readonly, nonatomic) BOOL isAppVersionUpdated;
- [Export("isAppVersionUpdated")]
- bool IsAppVersionUpdated { get; }
-
- // @property (readonly, copy, nonatomic) NSDate * _Nullable lastApplicationOpenDate;
- [NullAllowed, Export("lastApplicationOpenDate", ArgumentSemantic.Copy)]
- NSDate LastApplicationOpenDate { get; }
-
- // @property (readonly, copy, nonatomic) NSString * _Nullable currentAppVersion;
- [NullAllowed, Export("currentAppVersion")]
- string CurrentAppVersion { get; }
- }
-
- // @interface UAAssociatedIdentifiers : NSObject
- [BaseType(typeof(NSObject))]
- interface UAAssociatedIdentifiers
- {
- // @property (readonly, nonatomic, class) NSInteger maxCount;
- [Static]
- [Export("maxCount")]
- nint MaxCount { get; }
-
- // @property (readonly, nonatomic, class) NSInteger maxCharacterCount;
- [Static]
- [Export("maxCharacterCount")]
- nint MaxCharacterCount { get; }
-
- // @property (copy, nonatomic) NSString * _Nullable advertisingID;
- [NullAllowed, Export("advertisingID")]
- string AdvertisingID { get; set; }
-
- // @property (copy, nonatomic) NSString * _Nullable vendorID;
- [NullAllowed, Export("vendorID")]
- string VendorID { get; set; }
-
- // @property (nonatomic) BOOL advertisingTrackingEnabled;
- [Export("advertisingTrackingEnabled")]
- bool AdvertisingTrackingEnabled { get; set; }
-
- // @property (readonly, copy, nonatomic) NSDictionary * _Nonnull allIDs;
- [Export("allIDs", ArgumentSemantic.Copy)]
- NSDictionary AllIDs { get; }
-
- // -(instancetype _Nonnull)initWithIdentifiers:(NSDictionary * _Nullable)identifiers __attribute__((objc_designated_initializer));
- [Export("initWithIdentifiers:")]
- [DesignatedInitializer]
- IntPtr Constructor([NullAllowed] NSDictionary identifiers);
-
- // +(UAAssociatedIdentifiers * _Nonnull)identifiers __attribute__((warn_unused_result("")));
- [Static]
- [Export("identifiers")]
- UAAssociatedIdentifiers Identifiers();
-
- // +(UAAssociatedIdentifiers * _Nonnull)identifiersWithDictionary:(NSDictionary * _Nullable)identifiers __attribute__((warn_unused_result("")));
- [Static]
- [Export("identifiersWithDictionary:")]
- UAAssociatedIdentifiers Identifiers([NullAllowed] NSDictionary identifiers);
-
- // -(void)setIdentifier:(NSString * _Nullable)identifier forKey:(NSString * _Nonnull)key;
- [Export("setIdentifier:forKey:")]
- void SetIdentifier([NullAllowed] string identifier, string key);
- }
-
- // @interface UAAttributeMutations : NSObject
- [BaseType(typeof(NSObject))]
- interface UAAttributeMutations
- {
- // -(void)setString:(NSString * _Nonnull)string forAttribute:(NSString * _Nonnull)forAttribute;
- [Export("setString:forAttribute:")]
- void SetString(string @string, string forAttribute);
-
- // -(void)setNumber:(NSNumber * _Nonnull)number forAttribute:(NSString * _Nonnull)forAttribute;
- [Export("setNumber:forAttribute:")]
- void SetNumber(NSNumber number, string forAttribute);
-
- // -(void)setDate:(NSDate * _Nonnull)date forAttribute:(NSString * _Nonnull)forAttribute;
- [Export("setDate:forAttribute:")]
- void SetDate(NSDate date, string forAttribute);
-
- // -(void)removeAttribute:(NSString * _Nonnull)attribute;
- [Export("removeAttribute:")]
- void RemoveAttribute(string attribute);
-
- // +(UAAttributeMutations * _Nonnull)mutations __attribute__((warn_unused_result("")));
- [Static]
- [Export("mutations")]
- UAAttributeMutations Mutations { get; }
-
- // -(void)applyMutationsWithEditor:(UAAttributesEditor * _Nonnull)editor;
- [Export("applyMutationsWithEditor:")]
- void ApplyMutations(UAAttributesEditor editor);
- }
-
- // @interface UAAttributes : NSObject
- [BaseType(typeof(NSObject))]
- interface UAAttributes
- {
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull title;
- [Static]
- [Export("title")]
- string Title { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull firstName;
- [Static]
- [Export("firstName")]
- string FirstName { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull lastName;
- [Static]
- [Export("lastName")]
- string LastName { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull fullName;
- [Static]
- [Export("fullName")]
- string FullName { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull gender;
- [Static]
- [Export("gender")]
- string Gender { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull zipCode;
- [Static]
- [Export("zipCode")]
- string ZipCode { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull city;
- [Static]
- [Export("city")]
- string City { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull region;
- [Static]
- [Export("region")]
- string Region { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull country;
- [Static]
- [Export("country")]
- string Country { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull birthdate;
- [Static]
- [Export("birthdate")]
- string Birthdate { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull age;
- [Static]
- [Export("age")]
- string Age { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull mobilePhone;
- [Static]
- [Export("mobilePhone")]
- string MobilePhone { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull homePhone;
- [Static]
- [Export("homePhone")]
- string HomePhone { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull workPhone;
- [Static]
- [Export("workPhone")]
- string WorkPhone { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull loyaltyTier;
- [Static]
- [Export("loyaltyTier")]
- string LoyaltyTier { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull company;
- [Static]
- [Export("company")]
- string Company { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull username;
- [Static]
- [Export("username")]
- string Username { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull accountCreation;
- [Static]
- [Export("accountCreation")]
- string AccountCreation { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull email;
- [Static]
- [Export("email")]
- string Email { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull advertisingId;
- [Static]
- [Export("advertisingId")]
- string AdvertisingId { get; }
- }
-
- // @interface UAAttributesActionPredicate : NSObject
- [BaseType(typeof(NSObject))]
- interface UAAttributesActionPredicate : IUAActionPredicateProtocol
- {
+ // -(void)airshipReady;
+ [Export("airshipReady")]
+ void AirshipReady();
}
- // @interface UAAttributesEditor : NSObject
+ // @interface UAAppIntegration : NSObject
[BaseType(typeof(NSObject))]
- [DisableDefaultCtor]
- interface UAAttributesEditor
- {
- // -(void)removeAttribute:(NSString * _Nonnull)attribute;
- [Export("removeAttribute:")]
- void RemoveAttribute(string attribute);
-
- // -(void)setDate:(NSDate * _Nonnull)date attribute:(NSString * _Nonnull)attribute;
- [Export("setDate:attribute:")]
- void SetDate(NSDate date, string attribute);
-
- // -(void)setNumber:(NSNumber * _Nonnull)number attribute:(NSString * _Nonnull)attribute;
- [Export("setNumber:attribute:")]
- void SetNumber(NSNumber number, string attribute);
-
- // -(void)setString:(NSString * _Nonnull)string attribute:(NSString * _Nonnull)attribute;
- [Export("setString:attribute:")]
- void SetString(string @string, string attribute);
-
- // -(void)apply;
- [Export("apply")]
- void Apply();
- }
-
- // @interface UABespokeCloseView : UIView
- [BaseType(typeof(UIView))]
- interface UABespokeCloseView
- {
- // -(instancetype _Nonnull)initWithFrame:(CGRect)frame __attribute__((objc_designated_initializer));
- [Export("initWithFrame:")]
- [DesignatedInitializer]
- IntPtr Constructor(CGRect frame);
-
- // -(void)drawRect:(CGRect)rect;
- [Export("drawRect:")]
- void DrawRect(CGRect rect);
- }
-
- // @interface UABeveledLoadingIndicator : UIView
- [BaseType(typeof(UIView))]
- interface UABeveledLoadingIndicator
- {
- // -(void)show;
- [Export("show")]
- void Show();
-
- // -(void)hide;
- [Export("hide")]
- void Hide();
- }
-
- delegate bool IUAActionPredicate(UAActionArguments arg0);
- delegate void IUAActionCompletionHandler(UAActionResult arg0);
- delegate void IUAActionBlock(UAActionArguments arg0, [BlockCallback] IUAActionCompletionHandler arg1);
-
- // @interface UABlockAction : NSObject
- [BaseType(typeof(NSObject))]
- [DisableDefaultCtor]
- interface UABlockAction : IUAAction
- {
- // -(instancetype _Nonnull)initWithPredicate:(UAActionPredicate _Nullable)predicate block:(UAActionBlock _Nonnull)block __attribute__((objc_designated_initializer));
- [Export("initWithPredicate:block:")]
- [DesignatedInitializer]
- IntPtr Constructor([NullAllowed] IUAActionPredicate predicate, IUAActionBlock block);
-
- // -(instancetype _Nonnull)initWithBlock:(UAActionBlock _Nonnull)block;
- [Export("initWithBlock:")]
- IntPtr Constructor(IUAActionBlock block);
- }
-
- // @interface UAChannel : NSObject
- [BaseType(typeof(NSObject))]
- [DisableDefaultCtor]
- interface UAChannel : IUAComponent
- {
- // @property (readonly, nonatomic, class) NSNotificationName _Nonnull channelCreatedEvent;
- [Static]
- [Export("channelCreatedEvent")]
- string ChannelCreatedEvent { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull channelIdentifierKey;
- [Static]
- [Export("channelIdentifierKey")]
- string ChannelIdentifierKey { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull channelExistingKey;
- [Static]
- [Export("channelExistingKey")]
- string ChannelExistingKey { get; }
-
- // @property (readonly, nonatomic, class) NSNotificationName _Nonnull channelUpdatedEvent;
- [Static]
- [Export("channelUpdatedEvent")]
- string ChannelUpdatedEvent { get; }
-
- // @property (readonly, nonatomic, class) NSNotificationName _Nonnull channelRegistrationFailedEvent;
- [Static]
- [Export("channelRegistrationFailedEvent")]
- string ChannelRegistrationFailedEvent { get; }
-
- // @property (readonly, nonatomic, class) NSNotificationName _Nonnull audienceUpdatedEvent;
- [Static]
- [Export("audienceUpdatedEvent")]
- string AudienceUpdatedEvent { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull audienceTagsKey;
- [Static]
- [Export("audienceTagsKey")]
- string AudienceTagsKey { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull audienceAttributesKey;
- [Static]
- [Export("audienceAttributesKey")]
- string AudienceAttributesKey { get; }
-
- // @property (readonly, nonatomic) BOOL isChannelCreationEnabled;
- [Export("isChannelCreationEnabled")]
- bool IsChannelCreationEnabled { get; }
-
- // @property (readonly, copy, nonatomic) NSString * _Nullable identifier;
- [NullAllowed, Export("identifier")]
- string Identifier { get; }
-
- // @property (readonly, copy, nonatomic) NSArray * _Nonnull pendingTagGroupUpdates;
- [Export("pendingTagGroupUpdates", ArgumentSemantic.Copy)]
- UATagGroupUpdate[] PendingTagGroupUpdates { get; }
-
- // @property (copy, nonatomic) NSArray * _Nonnull tags;
- [Export("tags", ArgumentSemantic.Copy)]
- string[] Tags { get; set; }
-
- // @property (nonatomic) BOOL isChannelTagRegistrationEnabled;
- [Export("isChannelTagRegistrationEnabled")]
- bool IsChannelTagRegistrationEnabled { get; set; }
-
- // @property (getter = isComponentEnabled, nonatomic) BOOL componentEnabled;
- [Export("componentEnabled")]
- bool ComponentEnabled { [Bind("isComponentEnabled")] get; set; }
-
- // @property (readonly, nonatomic, strong, class) UAChannel * _Nonnull shared;
- [Static]
- [Export("shared", ArgumentSemantic.Strong)]
- UAChannel Shared { get; }
-
- // -(UATagEditor * _Nonnull)editTags __attribute__((warn_unused_result("")));
- [Export("editTags")]
- UATagEditor EditTags { get; }
-
- // -(void)editTags:(void (^ _Nonnull)(UATagEditor * _Nonnull))editorBlock;
- [Export("editTags:")]
- void EditTagsAsync(Action editorBlock);
-
- // -(UATagGroupsEditor * _Nonnull)editTagGroups __attribute__((warn_unused_result("")));
- [Export("editTagGroups")]
- UATagGroupsEditor EditTagGroups { get; }
-
- // -(void)editTagGroups:(void (^ _Nonnull)(UATagGroupsEditor * _Nonnull))editorBlock;
- [Export("editTagGroups:")]
- void EditTagGroupsAsync(Action editorBlock);
-
- // -(UASubscriptionListEditor * _Nonnull)editSubscriptionLists __attribute__((warn_unused_result("")));
- [Export("editSubscriptionLists")]
- UASubscriptionListEditor EditSubscriptionLists { get; }
-
- // -(void)editSubscriptionLists:(void (^ _Nonnull)(UASubscriptionListEditor * _Nonnull))editorBlock;
- [Export("editSubscriptionLists:")]
- void EditSubscriptionListsAsync(Action editorBlock);
-
- // -(UADisposable * _Nonnull)fetchSubscriptionListsWithCompletionHandler:(void (^ _Nonnull)(NSArray * _Nullable, NSError * _Nullable))completionHandler;
- [Export("fetchSubscriptionListsWithCompletionHandler:")]
- UADisposable FetchSubscriptionLists(Action, NSError> completionHandler);
+ interface UAAppIntegration
+ {
+ // @property (nonatomic, strong, class) id _Nullable integrationDelegate;
+ [Static]
+ [NullAllowed, Export("integrationDelegate", ArgumentSemantic.Strong)]
+ NSObject WeakIntegrationDelegate { get; set; }
- // -(UAAttributesEditor * _Nonnull)editAttributes __attribute__((warn_unused_result("")));
- [Export("editAttributes")]
- UAAttributesEditor EditAttributes { get; }
-
- // -(void)editAttributes:(void (^ _Nonnull)(UAAttributesEditor * _Nonnull))editorBlock;
- [Export("editAttributes:")]
- void EditAttributesAsync(Action editorBlock);
-
- // -(void)addTag:(NSString * _Nonnull)tag __attribute__((deprecated("Use editTags instead.")));
- [Export("addTag:")]
- void AddTag(string tag);
-
- // -(void)addTags:(NSArray * _Nonnull)tags __attribute__((deprecated("Use editTags instead.")));
- [Export("addTags:")]
- void AddTags(string[] tags);
-
- // -(void)removeTag:(NSString * _Nonnull)tag __attribute__((deprecated("Use editTags instead.")));
- [Export("removeTag:")]
- void RemoveTag(string tag);
-
- // -(void)removeTags:(NSArray * _Nonnull)tags __attribute__((deprecated("Use editTags instead.")));
- [Export("removeTags:")]
- void RemoveTags(string[] tags);
-
- // -(void)addTags:(NSArray * _Nonnull)tags group:(NSString * _Nonnull)group __attribute__((deprecated("Use editTagGroups instead.")));
- [Export("addTags:group:")]
- void AddTags(string[] tags, string group);
-
- // -(void)removeTags:(NSArray * _Nonnull)tags group:(NSString * _Nonnull)group __attribute__((deprecated("Use editTagGroups instead.")));
- [Export("removeTags:group:")]
- void RemoveTags(string[] tags, string group);
-
- // -(void)setTags:(NSArray * _Nonnull)tags group:(NSString * _Nonnull)group __attribute__((deprecated("Use editTagGroups instead.")));
- [Export("setTags:group:")]
- void SetTags(string[] tags, string group);
-
- // -(void)applyAttributeMutations:(UAAttributeMutations * _Nonnull)mutations __attribute__((deprecated("Use editAttributes instead.")));
- [Export("applyAttributeMutations:")]
- void ApplyAttributeMutations(UAAttributeMutations mutations);
-
- // -(void)enableChannelCreation;
- [Export("enableChannelCreation")]
- void EnableChannelCreation();
-
- // -(void)updateRegistration;
- [Export("updateRegistration")]
- void UpdateRegistration();
-
- // -(void)updateRegistrationForcefully:(BOOL)forcefully;
- [Export("updateRegistrationForcefully:")]
- void UpdateRegistrationForcefully(bool forcefully);
- }
-
- // @interface UAChannelCapture : NSObject
- [NoTV]
- [BaseType(typeof(NSObject))]
- [DisableDefaultCtor]
- interface UAChannelCapture
- {
- // @property (nonatomic) BOOL enabled;
- [Export("enabled")]
- bool Enabled { get; set; }
- }
-
- // @interface UACircularRegion : NSObject
- [BaseType(typeof(NSObject))]
- [DisableDefaultCtor]
- interface UACircularRegion
- {
- // -(instancetype _Nullable)initWithRadius:(double)radius latitude:(double)latitude longitude:(double)longitude __attribute__((objc_designated_initializer));
- [Export("initWithRadius:latitude:longitude:")]
- [DesignatedInitializer]
- IntPtr Constructor(double radius, double latitude, double longitude);
-
- // +(UACircularRegion * _Nullable)circularRegionWithRadius:(double)radius latitude:(double)latitude longitude:(double)longitude __attribute__((warn_unused_result("")));
- [Static]
- [Export("circularRegionWithRadius:latitude:longitude:")]
- [return: NullAllowed]
- UACircularRegion CircularRegion(double radius, double latitude, double longitude);
- }
-
- // @interface UAConfig : NSObject
- [BaseType(typeof(NSObject))]
- interface UAConfig : INSCopying
- {
- // @property (copy, nonatomic) NSString * _Nullable developmentAppKey;
- [NullAllowed, Export("developmentAppKey")]
- string DevelopmentAppKey { get; set; }
-
- // @property (copy, nonatomic) NSString * _Nullable developmentAppSecret;
- [NullAllowed, Export("developmentAppSecret")]
- string DevelopmentAppSecret { get; set; }
-
- // @property (copy, nonatomic) NSString * _Nullable productionAppKey;
- [NullAllowed, Export("productionAppKey")]
- string ProductionAppKey { get; set; }
-
- // @property (copy, nonatomic) NSString * _Nullable productionAppSecret;
- [NullAllowed, Export("productionAppSecret")]
- string ProductionAppSecret { get; set; }
-
- // @property (nonatomic) enum UALogLevel developmentLogLevel;
- [Export("developmentLogLevel", ArgumentSemantic.Assign)]
- UALogLevel DevelopmentLogLevel { get; set; }
-
- // @property (nonatomic) enum UALogLevel productionLogLevel;
- [Export("productionLogLevel", ArgumentSemantic.Assign)]
- UALogLevel ProductionLogLevel { get; set; }
-
- // @property (nonatomic) enum UACloudSite site;
- [Export("site", ArgumentSemantic.Assign)]
- UACloudSite Site { get; set; }
-
- // @property (nonatomic) UAFeatures enabledFeatures;
- [Export("enabledFeatures", ArgumentSemantic.Assign)]
- UAFeatures EnabledFeatures { get; set; }
-
- // @property (copy, nonatomic) NSString * _Nonnull defaultAppKey;
- [Export("defaultAppKey")]
- string DefaultAppKey { get; set; }
-
- // @property (copy, nonatomic) NSString * _Nonnull defaultAppSecret;
- [Export("defaultAppSecret")]
- string DefaultAppSecret { get; set; }
-
- // @property (nonatomic) BOOL inProduction;
- [Export("inProduction")]
- bool InProduction { get; set; }
-
- // @property (nonatomic) BOOL detectProvisioningMode;
- [Export("detectProvisioningMode")]
- bool DetectProvisioningMode { get; set; }
-
- // @property (copy, nonatomic) NSString * _Nullable profilePath;
- [NullAllowed, Export("profilePath")]
- string ProfilePath { get; set; }
-
- // @property (nonatomic) BOOL isAutomaticSetupEnabled;
- [Export("isAutomaticSetupEnabled")]
- bool IsAutomaticSetupEnabled { get; set; }
-
- // @property (copy, nonatomic) NSArray * _Nonnull URLAllowList;
- [Export("URLAllowList", ArgumentSemantic.Copy)]
- string[] URLAllowList { get; set; }
-
- // @property (copy, nonatomic) NSArray * _Nonnull URLAllowListScopeJavaScriptInterface;
- [Export("URLAllowListScopeJavaScriptInterface", ArgumentSemantic.Copy)]
- string[] URLAllowListScopeJavaScriptInterface { get; set; }
-
- // @property (copy, nonatomic) NSArray * _Nonnull URLAllowListScopeOpenURL;
- [Export("URLAllowListScopeOpenURL", ArgumentSemantic.Copy)]
- string[] URLAllowListScopeOpenURL { get; set; }
-
- // @property (nonatomic) BOOL suppressAllowListError;
- [Export("suppressAllowListError")]
- bool SuppressAllowListError { get; set; }
-
- // @property (copy, nonatomic) NSString * _Nullable itunesID;
- [NullAllowed, Export("itunesID")]
- string ItunesID { get; set; }
-
- // @property (nonatomic) BOOL isAnalyticsEnabled;
- [Export("isAnalyticsEnabled")]
- bool IsAnalyticsEnabled { get; set; }
-
- // @property (copy, nonatomic) NSString * _Nullable messageCenterStyleConfig;
- [NullAllowed, Export("messageCenterStyleConfig")]
- string MessageCenterStyleConfig { get; set; }
-
- // @property (nonatomic) BOOL clearUserOnAppRestore;
- [Export("clearUserOnAppRestore")]
- bool ClearUserOnAppRestore { get; set; }
-
- // @property (nonatomic) BOOL clearNamedUserOnAppRestore;
- [Export("clearNamedUserOnAppRestore")]
- bool ClearNamedUserOnAppRestore { get; set; }
-
- // @property (nonatomic) BOOL isChannelCaptureEnabled;
- [Export("isChannelCaptureEnabled")]
- bool IsChannelCaptureEnabled { get; set; }
-
- // @property (nonatomic) BOOL isChannelCreationDelayEnabled;
- [Export("isChannelCreationDelayEnabled")]
- bool IsChannelCreationDelayEnabled { get; set; }
-
- // @property (nonatomic) BOOL isExtendedBroadcastsEnabled;
- [Export("isExtendedBroadcastsEnabled")]
- bool IsExtendedBroadcastsEnabled { get; set; }
-
- // @property (copy, nonatomic) NSDictionary * _Nonnull customConfig;
- [Export("customConfig", ArgumentSemantic.Copy)]
- NSDictionary CustomConfig { get; set; }
-
- // @property (nonatomic) BOOL requestAuthorizationToUseNotifications;
- [Export("requestAuthorizationToUseNotifications")]
- bool RequestAuthorizationToUseNotifications { get; set; }
-
- // @property (nonatomic) BOOL requireInitialRemoteConfigEnabled;
- [Export("requireInitialRemoteConfigEnabled")]
- bool RequireInitialRemoteConfigEnabled { get; set; }
-
- // @property (copy, nonatomic) NSString * _Nullable deviceAPIURL;
- [NullAllowed, Export("deviceAPIURL")]
- string DeviceAPIURL { get; set; }
-
- // @property (copy, nonatomic) NSString * _Nullable analyticsURL;
- [NullAllowed, Export("analyticsURL")]
- string AnalyticsURL { get; set; }
-
- // @property (copy, nonatomic) NSString * _Nullable remoteDataAPIURL;
- [NullAllowed, Export("remoteDataAPIURL")]
- string RemoteDataAPIURL { get; set; }
-
- // @property (copy, nonatomic) NSString * _Nullable chatURL;
- [NullAllowed, Export("chatURL")]
- string ChatURL { get; set; }
-
- // @property (copy, nonatomic) NSString * _Nullable chatWebSocketURL;
- [NullAllowed, Export("chatWebSocketURL")]
- string ChatWebSocketURL { get; set; }
-
- // @property (readonly, copy, nonatomic) NSString * _Nonnull appKey;
- [Export("appKey")]
- string AppKey { get; }
-
- // @property (readonly, copy, nonatomic) NSString * _Nonnull appSecret;
- [Export("appSecret")]
- string AppSecret { get; }
-
- // @property (readonly, nonatomic) enum UALogLevel logLevel;
- [Export("logLevel")]
- UALogLevel LogLevel { get; }
-
- // +(UAConfig * _Nonnull)defaultConfig __attribute__((warn_unused_result("")));
- [Static]
- [Export("defaultConfig")]
- UAConfig DefaultConfig();
-
- // +(UAConfig * _Nonnull)configWithContentsOfFile:(NSString * _Nullable)path __attribute__((warn_unused_result("")));
- [Static]
- [Export("configWithContentsOfFile:")]
- UAConfig Config([NullAllowed] string path);
-
- // +(UAConfig * _Nonnull)config __attribute__((warn_unused_result("")));
- [Static]
- [Export("config")]
- UAConfig Config();
-
- // -(instancetype _Nonnull)initWithContentsOfFile:(NSString * _Nullable)path;
- [Export("initWithContentsOfFile:")]
- IntPtr Constructor([NullAllowed] string path);
-
- // -(BOOL)validate __attribute__((warn_unused_result("")));
- [Export("validate")]
- bool Validate ();
-
- // +(BOOL)isProductionProvisioningProfile:(NSString * _Nonnull)profilePath __attribute__((warn_unused_result("")));
- [Static]
- [Export("isProductionProvisioningProfile:")]
- bool IsProductionProvisioningProfile(string profilePath);
- }
-
- // @interface UAConnectionType : NSObject
- [BaseType(typeof(NSObject))]
- interface UAConnectionType
- {
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull none;
- [Static]
- [Export("none")]
- string None { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull cell;
- [Static]
- [Export("cell")]
- string Cell { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull wifi;
- [Static]
- [Export("wifi")]
- string Wifi { get; }
- }
-
- // @interface UAContact : NSObject
- [BaseType(typeof(NSObject))]
- [DisableDefaultCtor]
- interface UAContact : IUAComponent
- {
- // @property (readonly, nonatomic, class) NSNotificationName _Nonnull contactChangedEvent;
- [Static]
- [Export("contactChangedEvent")]
- string ContactChangedEvent { get; }
-
- // @property (readonly, nonatomic, class) NSNotificationName _Nonnull audienceUpdatedEvent;
- [Static]
- [Export("audienceUpdatedEvent")]
- string AudienceUpdatedEvent { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull tagsKey;
- [Static]
- [Export("tagsKey")]
- string TagsKey { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull attributesKey;
- [Static]
- [Export("attributesKey")]
- string AttributesKey { get; }
-
- // @property (readonly, nonatomic, class) NSInteger maxNamedUserIDLength;
- [Static]
- [Export("maxNamedUserIDLength")]
- nint MaxNamedUserIDLength { get; }
-
- [Wrap("WeakConflictDelegate")]
- [NullAllowed]
- IUAContactConflictDelegate ConflictDelegate { get; set; }
-
- // @property (nonatomic, weak) id _Nullable conflictDelegate;
- [NullAllowed, Export("conflictDelegate", ArgumentSemantic.Weak)]
- NSObject WeakConflictDelegate { get; set; }
-
- // @property (readonly, copy, nonatomic) NSString * _Nullable namedUserID;
- [NullAllowed, Export("namedUserID")]
- string NamedUserID { get; }
-
- // @property (getter = isComponentEnabled, nonatomic) BOOL componentEnabled;
- [Export("componentEnabled")]
- bool ComponentEnabled { [Bind("isComponentEnabled")] get; set; }
-
- // @property (readonly, nonatomic, strong, class) UAContact * _Nonnull shared;
- [Static]
- [Export("shared", ArgumentSemantic.Strong)]
- UAContact Shared { get; }
-
- // -(void)identify:(NSString * _Nonnull)namedUserID;
- [Export("identify:")]
- void Identify(string namedUserID);
-
- // -(void)reset;
- [Export("reset")]
- void Reset();
-
- // -(UATagGroupsEditor * _Nonnull)editTagGroups __attribute__((warn_unused_result("")));
- [Export("editTagGroups")]
- UATagGroupsEditor EditTagGroups ();
-
- // -(void)editTagGroups:(void (^ _Nonnull)(UATagGroupsEditor * _Nonnull))editorBlock;
- [Export("editTagGroups:")]
- void EditTagGroups(Action editorBlock);
-
- // -(UAAttributesEditor * _Nonnull)editAttributes __attribute__((warn_unused_result("")));
- [Export("editAttributes")]
- UAAttributesEditor EditAttributes ();
-
- // -(void)editAttributes:(void (^ _Nonnull)(UAAttributesEditor * _Nonnull))editorBlock;
- [Export("editAttributes:")]
- void EditAttributes(Action editorBlock);
- }
-
- // @protocol UAContactConflictDelegate
- [Protocol, Model]
- [BaseType(typeof(NSObject))]
- interface UAContactConflictDelegate
- {
- // @required -(void)onConflictWithAnonymousContactData:(UAContactData * _Nonnull)anonymousContactData namedUserID:(NSString * _Nullable)namedUserID;
- [Abstract]
- [Export("onConflictWithAnonymousContactData:namedUserID:")]
- void OnConflict(UAContactData anonymousContactData, [NullAllowed] string namedUserID);
- }
-
- interface IUAContactConflictDelegate { };
-
- // @interface UAContactData : NSObject
- [BaseType(typeof(NSObject))]
- [DisableDefaultCtor]
- interface UAContactData
- {
- // @property (readonly, copy, nonatomic) NSDictionary *> * _Nonnull tags;
- [Export("tags", ArgumentSemantic.Copy)]
- NSDictionary> Tags { get; }
-
- // @property (readonly, copy, nonatomic) NSDictionary * _Nonnull attributes;
- [Export("attributes", ArgumentSemantic.Copy)]
- NSDictionary Attributes { get; }
-
- // -(instancetype _Nonnull)initWithTags:(NSDictionary *> * _Nonnull)tags attributes:(NSDictionary * _Nonnull)attributes __attribute__((objc_designated_initializer));
- [Export("initWithTags:attributes:")]
- [DesignatedInitializer]
- IntPtr Constructor(NSDictionary> tags, NSDictionary attributes);
- }
-
- // @interface UACustomEvent : NSObject
- [BaseType(typeof(NSObject))]
- [DisableDefaultCtor]
- interface UACustomEvent : IUAEvent
- {
- // @property (readonly, nonatomic, class) NSInteger maxPropertiesSize;
- [Static]
- [Export("maxPropertiesSize")]
- nint MaxPropertiesSize { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull eventNameKey;
- [Static]
- [Export("eventNameKey")]
- string EventNameKey { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull eventValueKey;
- [Static]
- [Export("eventValueKey")]
- string EventValueKey { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull eventPropertiesKey;
- [Static]
- [Export("eventPropertiesKey")]
- string EventPropertiesKey { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull eventTransactionIDKey;
- [Static]
- [Export("eventTransactionIDKey")]
- string EventTransactionIDKey { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull eventInteractionIDKey;
- [Static]
- [Export("eventInteractionIDKey")]
- string EventInteractionIDKey { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull eventInteractionTypeKey;
- [Static]
- [Export("eventInteractionTypeKey")]
- string EventInteractionTypeKey { get; }
-
- // @property (copy, nonatomic) NSString * _Nullable conversionSendID;
- [NullAllowed, Export("conversionSendID")]
- string ConversionSendID { get; set; }
-
- // @property (copy, nonatomic) NSString * _Nullable conversionPushMetadata;
- [NullAllowed, Export("conversionPushMetadata")]
- string ConversionPushMetadata { get; set; }
-
- // @property (copy, nonatomic) NSString * _Nullable templateType;
- [NullAllowed, Export("templateType")]
- string TemplateType { get; set; }
-
- // @property (nonatomic, strong) NSNumber * _Nullable eventValue;
- [NullAllowed, Export("eventValue", ArgumentSemantic.Strong)]
- NSNumber EventValue { get; set; }
-
- // @property (copy, nonatomic) NSString * _Nullable eventName;
- [NullAllowed, Export("eventName")]
- string EventName { get; set; }
-
- // @property (copy, nonatomic) NSString * _Nullable transactionID;
- [NullAllowed, Export("transactionID")]
- string TransactionID { get; set; }
-
- // @property (copy, nonatomic) NSString * _Nullable interactionType;
- [NullAllowed, Export("interactionType")]
- string InteractionType { get; set; }
-
- // @property (copy, nonatomic) NSString * _Nullable interactionID;
- [NullAllowed, Export("interactionID")]
- string InteractionID { get; set; }
-
- // @property (copy, nonatomic) NSDictionary * _Nonnull properties;
- [Export("properties", ArgumentSemantic.Copy)]
- NSDictionary Properties { get; set; }
-
- // @property (readonly, copy, nonatomic) NSString * _Nonnull eventType;
- [Export("eventType")]
- string EventType { get; }
-
- // -(instancetype _Nonnull)initWithName:(NSString * _Nonnull)name value:(NSNumber * _Nullable)value __attribute__((objc_designated_initializer));
- [Export("initWithName:value:")]
- [DesignatedInitializer]
- IntPtr Constructor(string name, [NullAllowed] NSNumber value);
-
- // -(instancetype _Nonnull)initWithName:(NSString * _Nonnull)name stringValue:(NSString * _Nullable)stringValue;
- [Export("initWithName:stringValue:")]
- IntPtr Constructor(string name, [NullAllowed] string stringValue);
-
- // +(UACustomEvent * _Nonnull)eventWithName:(NSString * _Nonnull)name __attribute__((warn_unused_result("")));
- [Static]
- [Export("eventWithName:")]
- UACustomEvent Event(string name);
-
- // +(UACustomEvent * _Nonnull)eventWithName:(NSString * _Nonnull)name valueFromString:(NSString * _Nullable)string __attribute__((warn_unused_result("")));
- [Static]
- [Export("eventWithName:valueFromString:")]
- UACustomEvent Event(string name, [NullAllowed] string @string);
-
- // +(UACustomEvent * _Nonnull)eventWithName:(NSString * _Nonnull)name value:(NSNumber * _Nullable)value __attribute__((warn_unused_result("")));
- [Static]
- [Export("eventWithName:value:")]
- UACustomEvent Event(string name, [NullAllowed] NSNumber value);
-
- // -(BOOL)isValid __attribute__((warn_unused_result("")));
- [Export("isValid")]
- bool IsValid ();
-
- // -(void)setInteractionFromMessageCenterMessage:(NSString * _Nullable)messageID;
- [Export("setInteractionFromMessageCenterMessage:")]
- void SetInteractionFromMessageCenterMessage([NullAllowed] string messageID);
-
- // @property (readonly, copy, nonatomic) NSDictionary * _Nonnull data;
- [Export("data", ArgumentSemantic.Copy)]
- NSDictionary Data { get; }
-
- // @property (readonly, copy, nonatomic) NSDictionary * _Nonnull payload;
- [Export("payload", ArgumentSemantic.Copy)]
- NSDictionary Payload { get; }
-
- // -(void)track;
- [Export("track")]
- void Track();
- }
-
- // @interface UADeepLinkAction : NSObject
- [BaseType(typeof(NSObject))]
- interface UADeepLinkAction : IUAAction
- {
- }
-
- // @protocol UADeepLinkDelegate
- [Protocol, Model]
- [BaseType(typeof(NSObject))]
- interface UADeepLinkDelegate
- {
- // @required -(void)receivedDeepLink:(NSURL * _Nonnull)deepLink completionHandler:(void (^ _Nonnull)(void))completionHandler;
- [Abstract]
- [Export("receivedDeepLink:completionHandler:")]
- void ReceivedDeepLink(NSUrl deepLink, Action completionHandler);
- }
-
- interface IUADeepLinkDelegate { };
-
- // @interface UAEmptyAction : NSObject
- [BaseType(typeof(NSObject))]
- interface UAEmptyAction : IUAAction
- {
- }
-
- // @interface UAEnableFeatureAction : NSObject
- [BaseType(typeof(NSObject))]
- interface UAEnableFeatureAction : IUAAction
- {
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull name;
- [Static]
- [Export("name")]
- string Name { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull shortName;
- [Static]
- [Export("shortName")]
- string ShortName { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull userNotificationsActionValue;
- [Static]
- [Export("userNotificationsActionValue")]
- string UserNotificationsActionValue { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull locationActionValue;
- [Static]
- [Export("locationActionValue")]
- string LocationActionValue { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull backgroundLocationActionValue;
- [Static]
- [Export("backgroundLocationActionValue")]
- string BackgroundLocationActionValue { get; }
- }
-
- // @interface UAEnableFeatureActionPredicate : NSObject
- [BaseType(typeof(NSObject))]
- interface UAEnableFeatureActionPredicate : IUAActionPredicateProtocol
- {
- }
-
- // @interface UAFetchDeviceInfoAction : NSObject
- [BaseType(typeof(NSObject))]
- interface UAFetchDeviceInfoAction : IUAAction
- {
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull name;
- [Static]
- [Export("name")]
- string Name { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull shortName;
- [Static]
- [Export("shortName")]
- string ShortName { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull channelID;
- [Static]
- [Export("channelID")]
- string ChannelID { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull namedUser;
- [Static]
- [Export("namedUser")]
- string NamedUser { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull tags;
- [Static]
- [Export("tags")]
- string Tags { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull pushOptIn;
- [Static]
- [Export("pushOptIn")]
- string PushOptIn { get; }
-
- // @property (readonly, copy, nonatomic, class) NSString * _Nonnull locationEnabled;
- [Static]
- [Export("locationEnabled")]
- string LocationEnabled { get; }
- }
-
- // @interface UAFetchDeviceInfoActionPredicate : NSObject
- [BaseType(typeof(NSObject))]
- interface UAFetchDeviceInfoActionPredicate : IUAActionPredicateProtocol
+ // +(void)applicatin:(UIApplication * _Nonnull)application performFetchWithCompletionHandler:(void (^ _Nonnull)(UIBackgroundFetchResult))completionHandler __attribute__((deprecated("Use application(_:performFetchWithCompletionHandler:) instead")));
+ [Static]
+ [Export("applicatin:performFetchWithCompletionHandler:")]
+ void PerformFetch(UIApplication application, Action completionHandler);
+
+ // +(void)application:(UIApplication * _Nonnull)application performFetchWithCompletionHandler:(void (^ _Nonnull)(UIBackgroundFetchResult))completionHandler;
+ [Static]
+ [Export("application:performFetchWithCompletionHandler:")]
+ void Application(UIApplication application, Action completionHandler);
+
+ // +(void)application:(UIApplication * _Nonnull)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData * _Nonnull)deviceToken;
+ [Static]
+ [Export("application:didRegisterForRemoteNotificationsWithDeviceToken:")]
+ void DidRegisterForRemoteNotifications(UIApplication application, NSData deviceToken);
+
+ // +(void)application:(UIApplication * _Nonnull)application didFailToRegisterForRemoteNotificationsWithError:(NSError * _Nonnull)error;
+ [Static]
+ [Export("application:didFailToRegisterForRemoteNotificationsWithError:")]
+ void DidFailToRegisterForRemoteNotifications(UIApplication application, NSError error);
+
+ // +(void)application:(UIApplication * _Nonnull)application didReceiveRemoteNotification:(NSDictionary * _Nonnull)userInfo fetchCompletionHandler:(void (^ _Nonnull)(UIBackgroundFetchResult))completionHandler;
+ [Static]
+ [Export("application:didReceiveRemoteNotification:fetchCompletionHandler:")]
+ void DidReceiveRemoteNotification(UIApplication application, NSDictionary userInfo, Action completionHandler);
+
+ // +(void)userNotificationCenterWithCenter:(UNUserNotificationCenter * _Nonnull)center willPresentNotification:(UNNotification * _Nonnull)notification withCompletionHandler:(void (^ _Nonnull)(UNNotificationPresentationOptions))completionHandler __attribute__((deprecated("Use userNotificationCenter(_:willPresent:withCompletionHandler:) instead")));
+ [Static]
+ [Export("userNotificationCenterWithCenter:willPresentNotification:withCompletionHandler:")]
+ void WillPresentNotification(UNUserNotificationCenter center, UNNotification notification, Action completionHandler);
+
+ // +(void)userNotificationCenter:(UNUserNotificationCenter * _Nonnull)center willPresentNotification:(UNNotification * _Nonnull)notification withCompletionHandler:(void (^ _Nonnull)(UNNotificationPresentationOptions))completionHandler;
+ [Static]
+ [Export("userNotificationCenter:willPresentNotification:withCompletionHandler:")]
+ void UserNotificationCenter(UNUserNotificationCenter center, UNNotification notification, Action completionHandler);
+
+ // +(void)userNotificationCenterWithCenter:(UNUserNotificationCenter * _Nonnull)center didReceiveNotificationResponse:(UNNotificationResponse * _Nonnull)response withCompletionHandler:(void (^ _Nonnull)(void))completionHandler __attribute__((deprecated("Use userNotificationCenter(_:didReceive:withCompletionHandler:) instead")));
+ [Static]
+ [Export("userNotificationCenterWithCenter:didReceiveNotificationResponse:withCompletionHandler:")]
+ void DidReceiveNotificationResponse(UNUserNotificationCenter center, UNNotificationResponse response, Action completionHandler);
+
+ // +(void)userNotificationCenter:(UNUserNotificationCenter * _Nonnull)center didReceiveNotificationResponse:(UNNotificationResponse * _Nonnull)response withCompletionHandler:(void (^ _Nonnull)(void))completionHandler;
+ [Static]
+ [Export("userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:")]
+ void UserNotificationCenter(UNUserNotificationCenter center, UNNotificationResponse response, Action completionHandler);
+ }
+
+ // @interface UAApplicationMetrics : NSObject
+ [BaseType(typeof(NSObject))]
+ [DisableDefaultCtor]
+ interface UAApplicationMetrics
{
+ // @property (readonly, nonatomic) BOOL isAppVersionUpdated;
+ [Export("isAppVersionUpdated")]
+ bool IsAppVersionUpdated { get; }
+
+ // @property (readonly, copy, nonatomic) NSDate * _Nullable lastApplicationOpenDate;
+ [NullAllowed, Export("lastApplicationOpenDate", ArgumentSemantic.Copy)]
+ NSDate LastApplicationOpenDate { get; }
+
+ // @property (readonly, copy, nonatomic) NSString * _Nullable currentAppVersion;
+ [NullAllowed, Export("currentAppVersion")]
+ string CurrentAppVersion { get; }
}
- // @interface UAInstallAttributionEvent : NSObject
+ // @interface UAAssociatedIdentifiers : NSObject
[BaseType(typeof(NSObject))]
- interface UAInstallAttributionEvent : IUAEvent
- {
- // @property (readonly, copy, nonatomic) NSString * _Nonnull eventType;
- [Export("eventType")]
- string EventType { get; }
-
- // @property (readonly, copy, nonatomic) NSDictionary * _Nonnull data;
- [Export("data", ArgumentSemantic.Copy)]
- NSDictionary Data { get; }
-
- // -(instancetype _Nonnull)initWithAppPurchaseDate:(NSDate * _Nonnull)appPurchaseDate iAdImpressionDate:(NSDate * _Nonnull)iAdImpressionDate __attribute__((objc_designated_initializer));
- [Export("initWithAppPurchaseDate:iAdImpressionDate:")]
- [DesignatedInitializer]
- IntPtr Constructor(NSDate appPurchaseDate, NSDate iAdImpressionDate);
-
- // +(UAInstallAttributionEvent * _Nonnull)eventWithAppPurchaseDate:(NSDate * _Nonnull)appPurchaseDate iAdImpressionDate:(NSDate * _Nonnull)iAdImpressionDate __attribute__((warn_unused_result("")));
- [Static]
- [Export("eventWithAppPurchaseDate:iAdImpressionDate:")]
- UAInstallAttributionEvent Event(NSDate appPurchaseDate, NSDate iAdImpressionDate);
-
- // +(UAInstallAttributionEvent * _Nonnull)event __attribute__((warn_unused_result("")));
- [Static]
- [Export("event")]
- UAInstallAttributionEvent Event();
- }
-
- // @interface UAInteractiveNotificationEvent : NSObject
- [NoTV]
- [BaseType(typeof(NSObject))]
- [DisableDefaultCtor]
- interface UAInteractiveNotificationEvent : IUAEvent
- {
- // @property (readonly, copy, nonatomic) NSString * _Nonnull eventType;
- [Export("eventType")]
- string EventType { get; }
-
- // @property (readonly, copy, nonatomic) NSDictionary * _Nonnull data;
- [Export("data", ArgumentSemantic.Copy)]
- NSDictionary Data { get; }
-
- // -(instancetype _Nonnull)initWithAction:(UNNotificationAction * _Nonnull)action category:(NSString * _Nonnull)category notification:(NSDictionary * _Nonnull)notification responseText:(NSString * _Nullable)responseText __attribute__((objc_designated_initializer));
- [Export("initWithAction:category:notification:responseText:")]
- [DesignatedInitializer]
- IntPtr Constructor(UNNotificationAction action, string category, NSDictionary notification, [NullAllowed] string responseText);
- }
-
- // @interface UAJSONMatcher : NSObject
- [BaseType(typeof(NSObject))]
- [DisableDefaultCtor]
- interface UAJSONMatcher
- {
- // -(instancetype _Nonnull)initWithValueMatcher:(UAJSONValueMatcher * _Nonnull)valueMatcher;
- [Export("initWithValueMatcher:")]
- IntPtr Constructor(UAJSONValueMatcher valueMatcher);
-
- // -(instancetype _Nonnull)initWithValueMatcher:(UAJSONValueMatcher * _Nonnull)valueMatcher scope:(NSArray * _Nonnull)scope;
- [Export("initWithValueMatcher:scope:")]
- IntPtr Constructor(UAJSONValueMatcher valueMatcher, string[] scope);
-
- // -(instancetype _Nonnull)initWithValueMatcher:(UAJSONValueMatcher * _Nonnull)valueMatcher ignoreCase:(BOOL)ignoreCase;
- [Export("initWithValueMatcher:ignoreCase:")]
- IntPtr Constructor(UAJSONValueMatcher valueMatcher, bool ignoreCase);
-
- // -(instancetype _Nonnull)initWithValueMatcher:(UAJSONValueMatcher * _Nonnull)valueMatcher key:(NSString * _Nonnull)key;
- [Export("initWithValueMatcher:key:")]
- IntPtr Constructor(UAJSONValueMatcher valueMatcher, string key);
-
- // -(instancetype _Nonnull)initWithValueMatcher:(UAJSONValueMatcher * _Nonnull)valueMatcher key:(NSString * _Nonnull)key scope:(NSArray