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