iOS - Simple local notification Example
UILocalNotification *notification = [[UILocalNotification alloc] init];
if (notification) {
notification.fireDate = [NSDate date];
notification.timeZone = [NSTimeZone defaultTimeZone];
notification.repeatInterval = 0;
notification.soundName = UILocalNotificationDefaultSoundName;
notification.alertBody = @"Notification Message";
notification.applicationIconBadgeNumber = [UIApplication sharedApplication].applicationIconBadgeNumber + 1;
notification.userInfo = @{@"data" : @1};
[[UIApplication sharedApplication] presentLocalNotificationNow:notification];
}
Written by Noval Agung Prayogo
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ios
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#