首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >iOS静默推送通知已取消

iOS静默推送通知已取消
EN

Stack Overflow用户
提问于 2018-12-14 11:08:08
回答 1查看 1.5K关注 0票数 1

在我的应用程序中,我使用静默推送通知来定期通信,但我遇到了麻烦,因为我在不启动应用程序时收到的静默推送通知没有得到处理。操作系统版本为iOS12。我正在使用FCM发送推送通知。有没有人有同样的问题?

以下是您收到静默推送通知时的控制台日志。

代码语言:javascript
复制
10:41:09.395630 +0900    apsd    <APSPushHistory: 0x135ee6fe0> timestampForTopic? ##my.app.bundleidentifier## token <##token##>
10:41:09.410548 +0900    apsd    <APSPushHistory: 0x135ee6fe0> hasPayload? <##payload##> forTopic ##my.app.bundleidentifier## tokens (
    <##token##>
)
10:41:09.428957 +0900    apsd    copyAppSpecificTokensWithDomain - sandbox.push.apple.com for topic ##my.app.bundleidentifier## account ##account##
10:41:09.429047 +0900    apsd    <APSPushHistory: 0x135ee6fe0> receivedPushWithTopic ##my.app.bundleidentifier## token <##token##> payload <##payload##> timestamp Thu Dec 13 10:41:09 2018
10:41:09.429660 +0900    apsd    <APSCourier: 0x135ed8f50>: Received message for enabled topic '##my.app.bundleidentifier##' onInterface: NonCellular with payload '{
    aps =     {
        "content-available" = 1;
    };
    "gcm.message_id" = "##gcm.message_id##";
}' with priority 5 for device token: NO
10:41:09.439475 +0900    SpringBoard    <APSConnection: 0x2804c4480> Delivering message from apsd: <APSIncomingMessage: 0x283cd4ab0> 1641282366 ##my.app.bundleidentifier##
10:41:09.440909 +0900    SpringBoard    <APSConnection: 0x2804c4480> making delegate (<UNSRemoteNotificationServer: 0x2800c19a0>) calls to deliver message 1641282366 {
    aps =     {
        "content-available" = 1;
    };
    "gcm.message_id" = "0:1544665268470982%cdf8ec08cdf8ec08";
} for topic ##my.app.bundleidentifier##
10:41:09.441303 +0900    SpringBoard    Received incoming message on topic ##my.app.bundleidentifier## at priority 1
10:41:09.442552 +0900    SpringBoard    [##my.app.bundleidentifier##] Received remote notification request A9C2-0C29 [ hasAlertContent: 0, hasSound: 0 hasBadge: 0 hasContentAvailable: 1 hasMutableContent: 0 ]
10:41:09.442651 +0900    SpringBoard    [##my.app.bundleidentifier##] Deliver push notification A9C2-0C29
10:41:09.442749 +0900    SpringBoard    [##my.app.bundleidentifier##] Request DUET delivers content-available push notification to application
10:41:09.443031 +0900    SpringBoard    [##my.app.bundleidentifier##] Not delivering user visible notification A9C2-0C29 because it has no alert, sound or badge
10:41:09.443141 +0900    SpringBoard    [##my.app.bundleidentifier##] Not delivering user visible push notification A9C2-0C29 [ error=Error Domain=UNErrorDomain Code=1401 "Notification has no user visible content" UserInfo={NSLocalizedDescription=Notification has no user visible content} ]
10:41:09.444107 +0900    dasd    Submitted Activity: com.apple.pushLaunch.##my.app.bundleidentifier##:A9B065 <private>
10:41:09.446320 +0900    dasd    Daemon Canceling Activities: {(
    com.apple.pushLaunch.##my.app.bundleidentifier##:A9B065
)}
0:41:09.446567 +0900    dasd    CANCELED: com.apple.pushLaunch.##my.app.bundleidentifier##:A9B065 <private>!
10:44:50.932320 +0900    locationd    {"msg":"client getting effective client name", "bundleId":"##my.app.bundleidentifier##", "bundlePath":""}
EN

回答 1

Stack Overflow用户

发布于 2019-03-08 06:21:50

我也遇到过类似的问题。我最终发现,禁用后台刷新也会禁用向挂起的应用程序发送静默通知。

在这种情况下,如果你使用enable background refresh,iOS会启动你的应用程序并将通知发送给你的应用程序代理吗?

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53772983

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档