请问极光的ios推送默认的是APNs 通知 还是 应用内消息 ?

startflow
2017-01-20 09:17 296 0

服务端用的是官网的c# sdk, 代码如下:

JPushClient client = new JPushClient(app_key, master_secret);

            PushPayload pushPayload = new PushPayload();
            pushPayload.platform = Platform.android_ios();
            //pushPayload.audience = Audience.all();
            pushPayload.audience = Audience.s_registrationId(regid);
            var notification = new Notification().setAlert(content);
            notification.AndroidNotification = new AndroidNotification().setTitle(title);
            notification.AndroidNotification.AddExtra("alarmid", alarmid);
            notification.IosNotification = new IosNotification();
            notification.IosNotification.incrBadge(1);
            //notification.IosNotification.AddExtra("extra_key", "extra_value");
            notification.IosNotification.AddExtra("alarmid", alarmid);
            pushPayload.notification = notification.Check();

client.SendPush(payload);

出现的问题是:只能在app内收到消息,app未打开时或在后台时,无法收到消息通知!!请问大拿们,这是什么情况啊??

1个回答

热门排序
  • 看你推送的是通知还是应用内消息,你app在前台时收到消息走的哪个方法。
    可以打印你的请求日志吗,看一下你的数据

    alert为空,通知是不展示的,iOS就收不到了