[英]UILocalNotification crashes my application when I start it
我可以在我的应用程序中启用UILocalNotification
,我可以这样进行:
在我的UIViewController
if(_endDate){
UILocalNotification *localNotif = [[UILocalNotification alloc] init];
if (localNotif == nil)
return;
localNotif.fireDate = _endDate;
localNotif.timeZone = [NSTimeZone defaultTimeZone];
localNotif.alertBody = @"go";
localNotif.soundName = UILocalNotificationDefaultSoundName;
localNotif.applicationIconBadgeNumber = 1;
[[UIApplication sharedApplication] scheduleLocalNotification:localNotif];
}
在Appdelegate
:
-(void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification{
application.applicationIconBadgeNumber = 0;
}
当通知出现时,我启动了应用程序,我正确地输入了委托,但是之后,应用程序崩溃了。
我在IO6工作
你能帮助我吗 ?
为了细化皱纹,您可以针对个人档案项目执行以下步骤,例如:
在Xcode->产品->选择配置文件中。
等到项目在指令Zombies中运行。 按“配置文件”,您发现模拟器正常运行。 当您的应用程序Cresh时,您只需选择consol即可:-
您发现崩溃日志在哪里,希望它能变数
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.