【问题标题】:Pushsharp: IOS notifications are working locally but not on live serverPushsharp:IOS 通知在本地工作,但不在实时服务器上
【发布时间】:2015-08-04 07:52:16
【问题描述】:

Pushsharp IOS 通知在本地工作,但不能在实时服务器上工作,我什至无法跟踪错误在哪里,它没有触发以下任何事件,谁能建议任何调试提示。 我需要在服务器上做一些设置吗? 下面是我的代码。

PushBroker push = new PushBroker();
    push.OnNotificationSent += NotificationSent;
    push.OnChannelException += ChannelException;
    push.OnServiceException += ServiceException;
    push.OnNotificationFailed += NotificationFailed;
    push.OnDeviceSubscriptionExpired += DeviceSubscriptionExpired;
    push.OnDeviceSubscriptionChanged += DeviceSubscriptionChanged;
    push.OnChannelCreated += ChannelCreated;
    push.OnChannelDestroyed += ChannelDestroyed;
    push.RegisterAppleService(new ApplePushChannelSettings(appleCert, "xxx"));

push.QueueNotification(new AppleNotification()
                     .ForDeviceToken("toked ID here") //dev
                     .WithAlert(msg)
                     .WithBadge(7)
                     .WithSound("sound.caf"));

【问题讨论】:

    标签: c# ios apple-push-notifications pushsharp


    【解决方案1】:

    确保使用 APNS 生产证书而不是开发证书,请参阅"Provisioning and Development" in the documentation:

    您必须获得开发环境的单独证书,并且 生产环境。证书与 作为远程通知接收者的应用程序标识符; 此标识符包括应用程序的捆绑 ID。当你创建一个 一种环境的配置文件,必需的 权利会自动添加到配置文件中,包括 特定于远程通知的权利,.这 两个配置文件称为开发和分发。这 分发配置文件是提交您的 应用到 App Store。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-02-20
      • 2014-06-26
      • 2019-03-16
      • 2018-09-12
      • 1970-01-01
      • 1970-01-01
      • 2016-03-05
      • 1970-01-01
      相关资源
      最近更新 更多