[![enter image description here](https://i.stack.imgur.com/kuSRS.png)](https://i.stack.imgur.com/kuSRS.png)I don't know what is the problem here but everytime I run my app , local notifications get called repetitively showing fireDate as NULL.I am trying to take care of this issue from the past 5hrs now.I need help!!!

```
    "<UIConcreteLocalNotification: 0x7f872ead7630>{fire date = (null), time zone = (null), repeat interval = NSCalendarUnitDay, repeat count = UILocalNotificationInfiniteRepeatCount, next fire date = Monday, 7 September 2015 5:32:44 pm India Standard Time, user info = (null)}",

```

I have done enough research on UILocalNotification to get started with it,but i'm still facing this problem.

```
    -(void)setDate:(NSDate*)myfireDate andTime1InString:       (NSString*)time1Str andTime2InString:(NSString*)time2Str andTime3InString:(NSString*)time3Str{

    //concatenate myFireDate with all three times one by one
NSString *myFireDateInString = [dateFormatter stringFromDate:myfireDate];
myFireDateInString = [myFireDateInString stringByAppendingString:@" "];
NSString *dateWithTime1InString = [myFireDateInString stringByAppendingString:time1Str];
[dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
NSDate *dateWithTime1 = [dateFormatter dateFromString:dateWithTime1InString];

NSString *mySecondFireDateInString;
NSString *dateWithTime2InString;
NSDate *dateWithTime2;
if ([time2Str length] !=0){
    [dateFormatter setDateFormat:@"yyyy-MM-dd"];
    mySecondFireDateInString = [dateFormatter stringFromDate:myfireDate];
    mySecondFireDateInString = [mySecondFireDateInString stringByAppendingString:@" "];
    dateWithTime2InString = [mySecondFireDateInString stringByAppendingString:time2Str];
    [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
    dateWithTime2 = [dateFormatter dateFromString:dateWithTime2InString];
}

NSString *myThirdFireDateInString;
NSString *dateWithTime3InString;
NSDate *dateWithTime3;
if ([time3Str length]!=0){
    [dateFormatter setDateFormat:@"yyyy-MM-dd"];
    myThirdFireDateInString = [dateFormatter stringFromDate:myfireDate];
    myThirdFireDateInString = [myThirdFireDateInString stringByAppendingString:@" "];
    dateWithTime3InString = [myThirdFireDateInString stringByAppendingString:time3Str];
    [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
    dateWithTime3 = [dateFormatter dateFromString:dateWithTime3InString];
}

NSLog(@"%@",dateWithTime3);
NSLog(@"%@",dateWithTime2);
    //block starts here
    void(^notificationBlock)(void) = ^{

appDelegate.localNotification1 = [UILocalNotification new];
appDelegate.localNotification1.fireDate = dateWithTime1;
appDelegate.localNotification1.applicationIconBadgeNumber = [[UIApplication sharedApplication]applicationIconBadgeNumber]+1;

if(dateWithTime2 != nil){//Make a new UILocalNotification object

    appDelegate.localNotification2 = [UILocalNotification new];
    appDelegate.localNotification2.fireDate = dateWithTime2;
    appDelegate.localNotification2.applicationIconBadgeNumber = [[UIApplication sharedApplication]applicationIconBadgeNumber]+1;
}

if(dateWithTime3 !=nil){//MAke a new UILocalNotification object
   appDelegate.localNotification3 = [UILocalNotification new];
   appDelegate.localNotification3.fireDate = dateWithTime3;
   appDelegate.localNotification3.applicationIconBadgeNumber = [[UIApplication sharedApplication]applicationIconBadgeNumber]+1;
}

if([_repeatDaysTextField.text isEqualToString:@"Everyday"]){

    // appDelegate.localNotification1.alertBody = @"Time to take your   medicine";
    appDelegate.localNotification1.repeatInterval = kCFCalendarUnitDay;
    [[UIApplication sharedApplication]scheduleLocalNotification:appDelegate.localNotification1];

    if(dateWithTime2 != nil){
        appDelegate.localNotification2.repeatInterval = kCFCalendarUnitDay;
       [[UIApplication sharedApplication]scheduleLocalNotification:appDelegate.localNotification2];
        appDelegate.localNotification2.alertBody = @"Not2";
        NSLog(@"%@",appDelegate.localNotification2);
    }
    NSLog(@"%@",[NSString stringWithFormat:@"%@",dateWithTime3 ]);
    if(dateWithTime3 != nil){

        [[UIApplication sharedApplication]scheduleLocalNotification:appDelegate.localNotification3];
    }
}

else if([_repeatDaysTextField.text isEqualToString:@"Alternately"]){

}

else if([_repeatDaysTextField.text isEqualToString:@"Weekly"]){
    appDelegate.localNotification1.repeatInterval = kCFCalendarUnitWeekday;
    [[UIApplication sharedApplication]scheduleLocalNotification:appDelegate.localNotification1];
    if(dateWithTime2!=nil){
        [[UIApplication sharedApplication]scheduleLocalNotification:appDelegate.localNotification2];
    }
    if(dateWithTime3!=nil){
        [[UIApplication sharedApplication]scheduleLocalNotification:appDelegate.localNotification3];
    }
}

else if([_repeatDaysTextField.text isEqualToString:@"Bi-Weekly"]){
}

else if([_repeatDaysTextField.text isEqualToString:@"Monthly"]){
     appDelegate.localNotification1.repeatInterval = kCFCalendarUnitMonth;
     [[UIApplication sharedApplication]scheduleLocalNotification:appDelegate.localNotification1];
    if(dateWithTime2!=nil){
        [[UIApplication sharedApplication]scheduleLocalNotification:appDelegate.localNotification2];
    }
    if(dateWithTime3!=nil){
        [[UIApplication sharedApplication]scheduleLocalNotification:appDelegate.localNotification3];
    }
}

else if([_repeatDaysTextField.text isEqualToString:@"Yearly"]){
    appDelegate.localNotification1.repeatInterval = kCFCalendarUnitYear;
    [[UIApplication sharedApplication]scheduleLocalNotification:appDelegate.localNotification1];
    if(dateWithTime2!=nil){
        [[UIApplication sharedApplication]scheduleLocalNotification:appDelegate.localNotification2];
    }
    if(dateWithTime3!=nil){
        [[UIApplication sharedApplication]scheduleLocalNotification:appDelegate.localNotification3];
    }
    }
    };
    //block ends here

    //method to set notification
   [self setNotification:notificationBlock];
    }

    -(void)setNotification:(void(^)(void))setNotificationBlock{

    setNotificationBlock();
    }

```