小编Omk*_*kar的帖子

无法在iOS 11.2.6中处理静默推送通知

我试图Silent Push Notification在我的应用程序中定期实现,即每天一次将数据上传到服务器.
但是在iOS 11.2.6上,它始终无法调用委托方法

-(void) application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))
Run Code Online (Sandbox Code Playgroud)

completionHandler 无声推送通知.

在设备日志中,我可以看到收到了静默推送通知,但是应用程序启动被取消DuetActivitySchedulerDaemon(根据日志).

你能帮我解决一下这个问题吗?以下是设备的日志.

Apr 11 21:44:59 iPhone- SpringBoard(UserNotificationsServer)[2696] <Notice>: [com.***.***-myapp] Received remote notification request 91E8-DC24 [ hasAlertContent: 0, hasSound: 0 hasBadge: 0 hasContentAvailable: 1 hasMutableContent: 0 ]
Apr 11 21:44:59 iPhone- SpringBoard(UserNotificationsServer)[2696] <Notice>: [com.***.***-myapp] Deliver push notification request 91E8-DC24. 
Apr 11 21:44:59 iPhone- SpringBoard(UserNotificationsServer)[2696] <Notice>: [com.***.***-myapp] Passing content-available push to Duet. 
Apr 11 21:44:59 iPhone- SpringBoard(DuetActivityScheduler)[2696] <Notice>: SUBMITTING: <private>. 
Apr 11 …
Run Code Online (Sandbox Code Playgroud)

apple-push-notifications ios appdelegate silentpush

6
推荐指数
1
解决办法
469
查看次数

当受限 Google Places API 密钥与 iOS 捆绑包标识符时,附近的搜索不起作用

我已在我的应用程序中集成了 Google 地图,我想在我的应用程序中显示附近的餐馆。所以我使用了 Google 附近的地方搜索 API。控制台中有该 API 的键。当我仅使用其包标识符限制 iOS 应用程序的该密钥时,附近的搜索 API 不起作用。当我取消限制时,它工作得很好。我缺少什么?调用API时需要传递什么参数吗?

api-key ios google-cloud-platform swift google-nearby

0
推荐指数
1
解决办法
684
查看次数