ios - UILocalNotification fires every time app opens -
i have uilocalnotification
fires @ time everyday. made sure firedate
not nil
, notification fires @ time perfectly. 1 problem have whenever run app xcode, notification fires. don't understand why that. input appreciated! here code go by:
-(void)ringthealarm{ [[uiapplication sharedapplication]cancelalllocalnotifications]; if (self.alarmset) { uilocalnotification *notify = [[uilocalnotification alloc]init]; notify.firedate = self.alarmtime; nslog(@"%@", notify.firedate); notify.alertbody = self.alarmmessage; notify.soundname = uilocalnotificationdefaultsoundname; notify.timezone = [nstimezone defaulttimezone]; [[uiapplication sharedapplication] schedulelocalnotification:notify]; } }
Comments
Post a Comment