首页  >  文章  >  php教程  >  ios推送服务,php服务端

ios推送服务,php服务端

WBOY
WBOY原创
2016-06-06 19:40:37988浏览

NSString* nsalert = [[userInfo objectForKey:@aps] objectForKey:@alert]; if(nsalert [nsalert length] 0) { UIAlertView *pAlert = [[UIAlertView alloc] initWithTitle:@消息提示 message:nsalert delegate:self cancelButtonTitle:@详细 otherButtonTi

NSString* nsalert = [[userInfo objectForKey:@"aps"] objectForKey:@"alert"];

if(nsalert && [nsalert length] > 0)

{

        UIAlertView *pAlert = [[UIAlertView alloc] initWithTitle:@"消息提示"

                                                         message:nsalert

                                                        delegate:self

                                               cancelButtonTitle:@"详细"

                                               otherButtonTitles:@"关闭", nil];

        [pAlert show];

        [pAlert release];

}

CFShow([userInfo description]);

//接收到push  打开程序以后设置badge的值

NSString *badgeStr = [[userInfo objectForKey:@"aps"] objectForKey:@"badge"];

if (badgeStr != nil)

[UIApplication sharedApplication].applicationIconBadgeNumber = [badgeStr intValue];

//接收到push  打开程序以后会震动

AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn