我正在尝试使用oneSignal推送通知sdk 8.1+,但得到此异常。 看到这个:Windows Phone SDK Installation
这是否意味着我无法在uwp app中使用它?
例外:
Could not load file or assembly 'System.ComponentModel.DataAnnotations,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of
its dependencies. The located assembly's manifest definition does not match
the assembly reference. (Exception from HRESULT: 0x80131040)
代码:
protected override void OnLaunched(LaunchActivatedEventArgs e) {
OneSignal.Init("OneSignal_App_Id", e, notificationOpened);
}
private void notificationOpened(string message, IDictionary<string, string> additionalData, bool isActive) {
System.Diagnostics.Debug.WriteLine("notificationOpened:message:" + message);
System.Diagnostics.Debug.WriteLine("notificationOpened:additionalData:" + additionalData);
System.Diagnostics.Debug.WriteLine("notificationOpened:isActive:" + isActive);
}
答案 0 :(得分:1)
要在UWP项目上使用OneSignal WP 8.1 SDK,只需编译&amp;在发布模式下测试项目!!
答案 1 :(得分:0)
这是否意味着我无法在uwp app中使用它?
似乎是这样,我们无法在UWP app中使用它。
你对uwp免费推送服务有什么建议吗?
老实说,我不知道UWP是否还有其他免费推送服务,我建议将Azure App Service中的移动应用与Azure通知中心配合使用。这是官方文件Add push notifications to your Windows app。通知中心是免费的,但您需要azure帐户进行开发,这不是免费的。虽然它可能有一些成本,但天蓝色通知集线器更稳定,更高效。
答案 2 :(得分:0)
他们计划为UWP实施它,但没有任何时间表。我认为我们所能做的只是等待。