[英]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.