Send local notifications - IOS / Objective C
Send local notifications - IOS , Objective C
When you are developing an iphone/ipad app you will need to send some notifications when the app is closed or exits. That notification can be jump at any where you need it to jump. Today I m going to show you how to send a notification to a user from your iapp.
UILocalNotification* localNotification = [[UILocalNotification alloc] init];
localNotification.fireDate = [NSDate dateWithTimeIntervalSinceNow:60];
localNotification.alertBody = @"Great you have one notification";
localNotification.timeZone = [NSTimeZone defaultTimeZone];
[[UIApplication sharedApplication] scheduleLocalNotification:localNotification];
this is code for location push notification in objective C. The second line "NSDate dateWithTimeIntervalSinceNow:60" here 60 is the time duration to send a notifiation after fire a event.
Happy coding. If any issue do not hesitate to contact me.
Thanks.
Dasun
Comments
Post a Comment