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