Skip to content

Commit

Permalink
Release 18.0.0 (#8)
Browse files Browse the repository at this point in the history
* Add .vscode dir to .gitignore

* Bump to Android SDK 17.0.3, cross-platform 18.0.0

* Checkpoint: android sdk 17 building

* Bump Android SDK to 17.1.0, add bindings for live-update and feature-flag modules

* Wire up push notification status listener on Android

* Revert UseProjectReferences setting in MauiSample.csproj

* Update to latest SDK version

* Update iOS binding
Remove ExtededActions module
Update sample app

* Remove extendedActions leftovers

* Add FIXME

* Fix build

* Remove leftover extendedActions && FIXME

* Update to .NET7.0

* Use Airship-Xcode15.zip && use xcode 15

* Update dotnet workloads

* Update androidbinderator version

* Fix androidx lifecycle version warning

* Revert supportedOSPlateform version

* Bump Android SDK to 17.4.1

* Update Codeowners list

* Fix MC android target, clean up extended actions refs

* Fix crash in iOS MessageViewHandler

* Update build props and binderator config for Android 17.4.1

* Minor cleanups

* Add migration guide

* Update changelog

* Bump to latest SDKs

* Update release workflow

---------

Co-authored-by: Josh Yaganeh <[email protected]>
  • Loading branch information
khmMouna and jyaganeh authored Nov 10, 2023
1 parent e30dda8 commit a9a8844
Show file tree
Hide file tree
Showing 70 changed files with 5,206 additions and 5,643 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# https://help.github.com/en/articles/about-code-owners
* @BrianBatchelder @marc-scig @crow @rlepinski
* @crow @rlepinski @khmMouna @oristanovic @Apekka @Ulrico972 @jyaganeh
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
58 changes: 31 additions & 27 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -20,42 +20,46 @@ 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: |
VERSION=${{ steps.get_version.outputs.VERSION }}
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
with:
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
Expand All @@ -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/[email protected]
env:
Expand All @@ -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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -243,3 +243,6 @@ binderator/output

# Idea folder
.idea

# VSCode folder
.vscode
14 changes: 0 additions & 14 deletions Airship.Android.slnf

This file was deleted.

24 changes: 7 additions & 17 deletions Airship.Net.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,26 @@ 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
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}") = "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}"
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
15 changes: 0 additions & 15 deletions Airship.iOS.slnf

This file was deleted.

19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "urbanairship/ios-library" == 16.12.3
github "urbanairship/ios-library" == 17.6.0
12 changes: 6 additions & 6 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
<!-- Versions -->
<PropertyGroup>
<!-- Airship native SDK versions -->
<AirshipAndroidVersion>16.11.1</AirshipAndroidVersion>
<AirshipAndroidNugetVersion>16.11.1</AirshipAndroidNugetVersion>
<AirshipAndroidVersion>17.5.0</AirshipAndroidVersion>
<AirshipAndroidNugetVersion>17.5.0</AirshipAndroidNugetVersion>

<AirshipIosVersion>16.12.3</AirshipIosVersion>
<AirshipIosNugetVersion>16.12.3</AirshipIosNugetVersion>
<AirshipIosVersion>17.6.0</AirshipIosVersion>
<AirshipIosNugetVersion>17.6.0</AirshipIosNugetVersion>

<!-- Airship.Net version -->
<AirshipCrossPlatformVersion>17.1.0</AirshipCrossPlatformVersion>
<AirshipCrossPlatformNugetVersion>17.1.0</AirshipCrossPlatformNugetVersion>
<AirshipCrossPlatformVersion>18.0.0</AirshipCrossPlatformVersion>
<AirshipCrossPlatformNugetVersion>18.0.0</AirshipCrossPlatformNugetVersion>
</PropertyGroup>

<!-- Nuget packaging metadata -->
Expand Down
68 changes: 68 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
@@ -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.
Loading

0 comments on commit a9a8844

Please sign in to comment.