欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  php教程

ios推送服务,php服务端

程序员文章站 2022-06-12 18:05:57
...

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);