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

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

PHP中文网
PHP中文网

认证高级PHP讲师

Antworte allen(2)
阿神

是不是后台推的时候没有加这句:payload.setContentAvailable(1);看一下个推的说明,https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html

左手右手慢动作

他说的是 前台运行的时候 不是推送的时候大哥

Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage
Über uns Haftungsausschluss Sitemap
Chinesische PHP-Website:Online-PHP-Schulung für das Gemeinwohl,Helfen Sie PHP-Lernenden, sich schnell weiterzuentwickeln!