Shiny.NET
Native

Native push is the root of all other push providers. It works at the native OS level and is usually feeding other providers like Azure Notification Hubs and Firebase. As such, the setup instructions found within this document generally apply to all.

|Area|Info| |---|---| |Description|| |Service|Shiny.Push.IPushManager| |NuGet|| |Static Generated Class|ShinyPush|

using Microsoft.Extensions.DependencyInjection;
using Shiny;

namespace YourNamespace
{
    public class YourShinyStartup : ShinyStartup
    {
        public override void ConfigureServices(IServiceCollection services, IPlatform platform)
        { 
            
<p>services.UsePush&lt;Shiny.Push.IPushDelegate&gt;();
services.UsePush 
        }
    }
}

Minimum Version: 8.0

Minimum Version: 10

AppDelegate

using System;
using Foundation;
using Xamarin.Forms.Platform.iOS;
using Shiny;

namespace YourIosApp { [Register("AppDelegate")] public partial class AppDelegate : FormsApplicationDelegate { public override bool FinishedLaunching(UIApplication app, NSDictionary options) { this.ShinyFinishedLaunching(new Samples.SampleStartup()); global::Xamarin.Forms.Forms.Init(); this.LoadApplication(new Samples.App()); } public override void RegisteredForRemoteNotifications(UIApplication application, NSData deviceToken) => this.ShinyRegisteredForRemoteNotifications(deviceToken); public override void FailedToRegisterForRemoteNotifications(UIApplication application, NSError error) => this.ShinyFailedToRegisterForRemoteNotifications(error); public override void DidReceiveRemoteNotification(UIApplication application, NSDictionary userInfo, Action<UIBackgroundFetchResult> completionHandler) => this.ShinyDidReceiveRemoteNotification(userInfo, completionHandler); } }

Info.plist

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE plist PUBLIC " -//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>UIBackgroundModes</key>
    <array>
     <string>remote-notification</string>
    </array>
</dict>
</plist>

Entitlements.plist

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE plist PUBLIC " -//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
   <key>aps-environment</key>
   <string>development OR production</string>
</dict>
</plist>

Package.appxmanifest

<?xml version="1.0" encoding="utf-8" ?>
<Package>
    <Applications>
        <Extensions>
            <Task Type="pushNotification" />        </Extensions>
    </Applications>
</Package>

Native Push Provider

If you don't intend to use a 3rd party provider, this library still uses everything applied from "Getting Started". To register it with Shiny, simply do the following in your Shiny Startup:

services.UsePush<MyPushDelegate>();

Android Additional Setup

The process of setting up Android is a bit of process

<ItemGroup>
    <GoogleServicesJson Include="google-services.json">
        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </GoogleServicesJson>
    <PackageReference Include="Xamarin.GooglePlayServices.Basement" Version="The same version Shiny.Push is using" />
    <PackageReference Include="Xamarin.GooglePlayServices.Tasks" Version="The same version Shiny.Push is using" />
</ItemGroup>