iOS中APP在前台运行,我在个推上发推送消息,为什么不走didReceiveRemoteNotification方法?
PHP中文网
PHP中文网 2017-04-17 17:30:42
0
2
634

iOS中APP在前台运行,我在个推上发推送消息,为什么不走application:(UIApplication )application didReceiveRemoteNotification:(NSDictionary )userInfo方法,
但是我把App压入后台,在个推上发推送消息,就走application:(UIApplication )application didReceiveRemoteNotification:(NSDictionary )userInfo方法?
求大神们,指点!

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(2)
阿神

Did you not add this sentence when pushing in the background: payload.setContentAvailable(1); Take a look at the description of the push, https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ ApplePushService.html

左手右手慢动作

What he said is that when the front desk is running, not when pushing, big brother

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!