Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 18.0.0 (WIP) #6

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions Airship.Net.sln
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down Expand Up @@ -89,10 +87,6 @@ Global
{70434FB5-A468-4777-9478-DD2AB80BE0E2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{70434FB5-A468-4777-9478-DD2AB80BE0E2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{70434FB5-A468-4777-9478-DD2AB80BE0E2}.Release|Any CPU.Build.0 = Release|Any CPU
{BFFFE653-04CD-4563-BF2D-B6F31349F30D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BFFFE653-04CD-4563-BF2D-B6F31349F30D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BFFFE653-04CD-4563-BF2D-B6F31349F30D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BFFFE653-04CD-4563-BF2D-B6F31349F30D}.Release|Any CPU.Build.0 = Release|Any CPU
{AC22EEC5-DCA6-49D3-8B37-533B5565E2CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AC22EEC5-DCA6-49D3-8B37-533B5565E2CF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AC22EEC5-DCA6-49D3-8B37-533B5565E2CF}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
3 changes: 1 addition & 2 deletions Airship.iOS.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
"src\\AirshipBindings.iOS.Basement\\AirshipBindings.iOS.Basement.csproj",
"src\\AirshipBindings.iOS.Core\\AirshipBindings.iOS.Core.csproj",
"src\\AirshipBindings.iOS.Automation\\AirshipBindings.iOS.Automation.csproj",
"src\\AirshipBindings.iOS.ExtendedActions\\AirshipBindings.iOS.ExtendedActions.csproj",
"src\\AirshipBindings.iOS.MessageCenter\\AirshipBindings.iOS.MessageCenter.csproj",
"src\\AirshipBindings.iOS.NotificationContentExtension\\AirshipBindings.iOS.NotificationContentExtension.csproj",
"src\\AirshipBindings.iOS.NotificationServiceExtension\\AirshipBindings.iOS.NotificationServiceExtension.csproj",
"src\\AirshipBindings.iOS.PreferenceCenter\\AirshipBindings.iOS.PreferenceCenter.csproj"
]
}
}
}
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Airship Xamarin Changelog

## Version 18.0.0 - October 19, 2023
Major release that updates Airship SDKs to the latest 17.x releases.

### Changes
- Updated iOS SDK to 17.5.0
- Updated Android SDK to 17.3.0
- Added the ability to update Channel and Contact subscriptions to the .Net library
- Removed Channel update listener in favor of a new notification status listener.

## Version 17.1.0 - July 24, 2023
Minor release that updates Airship SDKs to the latest 16.x releases and fixes issues with bitcode for iOS.

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.5.1
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.4.0</AirshipAndroidVersion>
<AirshipAndroidNugetVersion>17.4.0</AirshipAndroidNugetVersion>

<AirshipIosVersion>16.12.3</AirshipIosVersion>
<AirshipIosNugetVersion>16.12.3</AirshipIosNugetVersion>
<AirshipIosVersion>17.5.1</AirshipIosVersion>
<AirshipIosNugetVersion>17.5.1</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
4 changes: 1 addition & 3 deletions MauiSample.sln
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 17.0.31611.283
Expand All @@ -23,8 +23,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.iOS.Automation"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.iOS.MessageCenter", "src\AirshipBindings.iOS.MessageCenter\AirshipBindings.iOS.MessageCenter.csproj", "{AC22EEC5-DCA6-49D3-8B37-533B5565E2CF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.iOS.ExtendedActions", "src\AirshipBindings.iOS.ExtendedActions\AirshipBindings.iOS.ExtendedActions.csproj", "{BFFFE653-04CD-4563-BF2D-B6F31349F30D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.Android.PreferenceCenter", "binderator\generated\Airship.Net.Android.PreferenceCenter\Airship.Net.Android.PreferenceCenter.csproj", "{D20DD1BB-7DF5-49C8-B8C1-E0905D273203}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net.iOS.PreferenceCenter", "src\AirshipBindings.iOS.PreferenceCenter\AirshipBindings.iOS.PreferenceCenter.csproj", "{13E9ACF2-4FE5-4FA6-96C4-BDFB6FF7C3A0}"
Expand Down
7 changes: 7 additions & 0 deletions MauiSample/AppShell.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@
Icon="icon_inbox.png"
ContentTemplate="{DataTemplate local:MessageCenterPage}"
Route="Inbox" />

<ShellContent
Title="Settings"
Icon="icon_settings.png"
ContentTemplate="{DataTemplate local:PushSettingsViewController}"
Route="Settings" />

</TabBar>
</Shell>

58 changes: 58 additions & 0 deletions MauiSample/FeaturesViewController.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MauiSample.FeaturesViewController">

<ContentPage.Content>

<TableView Intent="Settings">

<TableRoot>

<TableSection Title= "Privay Manager">

<SwitchCell
Text="Push"
OnChanged="enablePushFeature_OnChanged"
x:Name="enabledPushFeatureSwitch"
Tapped="enablePushFeature_OnChanged"/>

<SwitchCell
Text="Message Center"
OnChanged="enableMessageCenterFeature_OnChanged"
x:Name="enableMessageCenterFeatureSwitch"
Tapped="enableMessageCenterFeature_OnChanged"/>

<SwitchCell
Text="Automation"
OnChanged="enableInAppAutomationFeature_OnChanged"
x:Name="enableInAppAutomationFeatureSwitch"
Tapped="enableInAppAutomationFeature_OnChanged"/>

<SwitchCell
Text="Analytics"
OnChanged="enableAnalyticsFeature_OnChanged"
x:Name="EnableAnalyticsFeatureSwitch"
Tapped="enableAnalyticsFeature_OnChanged"/>

<SwitchCell
Text="Tags AND Attributes"
OnChanged="enableTagsAndAttributesFeature_OnChanged"
x:Name="enableTagsAndAttributesFeatureSwitch"
Tapped="enableTagsAndAttributesFeature_OnChanged"/>

<SwitchCell
Text="Contacts"
OnChanged="enableContactsFeature_OnChanged"
x:Name="enableContactsFeatureSwitch"
Tapped="enableContactsFeature_OnChanged"/>

</TableSection>

</TableRoot>

</TableView>

</ContentPage.Content>

</ContentPage>
95 changes: 95 additions & 0 deletions MauiSample/FeaturesViewController.xaml.cs
Original file line number Diff line number Diff line change
@@ -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);
}
}

}
12 changes: 7 additions & 5 deletions MauiSample/HomePageViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.ComponentModel;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using AirshipDotNet;
using System.Windows.Input;
Expand Down Expand Up @@ -62,19 +62,21 @@ public HomePageViewModel()
OnPrefCenterButtonClicked = new Command(PerformOnPrefCenterButtonClicked);

Airship.Instance.OnChannelCreation += OnChannelEvent;
Airship.Instance.OnChannelUpdate += OnChannelEvent;
Airship.Instance.OnPushNotificationStatusUpdate += OnPushNotificationStatusEvent;

Refresh();
}

~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;
Expand Down Expand Up @@ -115,4 +117,4 @@ private static void OpenPreferenceCenter(string prefCenterId)
#endif
}
}
}
}
4 changes: 2 additions & 2 deletions MauiSample/MauiSample.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios</TargetFrameworks>
<TargetFrameworks>net6.0-android33.0;net6.0-ios</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>MauiSample</RootNamespace>
<UseMaui>true</UseMaui>
Expand All @@ -17,7 +17,7 @@
<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">13.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<!-- Required for C# Hot Reload -->
<UseInterpreter Condition="'$(Configuration)' == 'Debug'">True</UseInterpreter>
Expand Down
11 changes: 7 additions & 4 deletions MauiSample/MessageCenterPage.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Windows.Input;
using System.Windows.Input;
using AirshipDotNet;
using AirshipDotNet.MessageCenter;
using AirshipDotNet.MessageCenter.Controls;
Expand Down Expand Up @@ -27,10 +27,13 @@ protected override void OnAppearing()

public void Refresh()
{
Airship.Instance.FetchInboxMessages(success =>
Airship.Instance.InboxMessages(messages =>
{
listView.ItemsSource = Airship.Instance.InboxMessages;
refreshView.IsRefreshing = false;
Device.BeginInvokeOnMainThread(() =>
{
listView.ItemsSource = messages;
refreshView.IsRefreshing = false;
});
});
}

Expand Down
Loading
Loading