如何在 Xamarin.Forms 中实施 UrbanAirship?

How to implement UrbanAirship in Xamarin.Forms?

我有 Xamarin.Form 项目,我想在其中实施 UrbanAirship,这样我就可以在用户设备上收到通知。我已经关注了这个 document.

1- Install NUGET in iOS/Droid project: PM> Install-Package UrbanAirship

2- Install NUGET in Portable project: PM> Install-Package UrbanAirship.Portable

3- Add AirshipConfig.plist file according to given in document

4- Set UAirship.TakeOff(); and UAirship.Push.UserPushNotificationsEnabled = true; in AppDelegate

5- Add/Remove Tags wherever required in Portal project.

6- Create a library(service) in portal project and iOS project to manage calls between Portable and iOS project. It contains method like SetNamedUser, TrackScreen, RemoveNamedUser

我已经完成了。我现在需要单独实现推送通知吗?还是足够了?

请建议,我是这个领域的新手。

首先,您应该在 Urban Airship 上创建您的应用程序,以获取您的应用程序的 AppKeyAppSecret,这在 AirshipConfig.plist.

中是必需的

对于iOS:

我们需要在Apple的开发者中心注册APNS认证。有关详细信息,请参阅 APNS Setup documentation

对于Android:

我发现这个 sdk 只是使用 FCM 发送通知。所以你还需要遵循 FCM 上的设置:https://docs.urbanairship.com/platform/push-providers/fcm/