{"id":1386,"date":"2010-11-22T16:00:02","date_gmt":"2010-11-22T10:30:02","guid":{"rendered":"http:\/\/www.mobisoftinfotech.com\/blog\/?p=1386"},"modified":"2015-03-25T08:32:43","modified_gmt":"2015-03-25T08:32:43","slug":"iphone-local-notifications","status":"publish","type":"post","link":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-local-notifications","title":{"rendered":"iPhone Local Notifications"},"content":{"rendered":"<p><!-- p { margin-bottom: 0.21cm; } --><span style=\"font-size: medium;\"><strong>Local notifications :<\/strong><\/span><\/p>\n<p>Local notifications are used to notify user that application is having some updates,<\/p>\n<p>while application is not running in foreground. We can display an alert message or badge on application icon. Local notifications can play sound when alert message or badge is shown.<\/p>\n<p>We can use local notification to remind our daily or monthly tasks at particular time like water plants, pay electricity bill, attend seminar , prepare for presentation etc. In these cases we can use local notification.<\/p>\n<p>Create notification :<\/p>\n<pre><span style=\"font-family: Menlo;\"><span>- (<\/span><\/span><span style=\"color: #b80ca1;\"><span style=\"font-family: Menlo;\"><span>void<\/span><\/span><\/span><span style=\"font-family: Menlo;\"><span>)scheduleNotification {<\/span><\/span>\r\n<span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>[[<\/span><\/span><\/span><span style=\"color: #7332a8;\"><span style=\"font-family: Menlo;\"><span>UIApplication<\/span><\/span><\/span><span style=\"color: #410d80;\"><span style=\"font-family: Menlo;\"><span>sharedApplication<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>] <\/span><\/span><\/span><span style=\"color: #410d80;\"><span style=\"font-family: Menlo;\"><span>cancelAllLocalNotifications<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>];<\/span><\/span><\/span>\r\n\r\n<span style=\"color: #7332a8;\"><span style=\"font-family: Menlo;\"><span>UILocalNotification<\/span><\/span><\/span><span style=\"font-family: Menlo;\"><span> notif = [[cls <\/span><\/span><span style=\"color: #410d80;\"><span style=\"font-family: Menlo;\"><span>alloc<\/span><\/span><\/span><span style=\"font-family: Menlo;\"><span>] <\/span><\/span><span style=\"color: #410d80;\"><span style=\"font-family: Menlo;\"><span>init<\/span><\/span><\/span><span style=\"font-family: Menlo;\"><span>];<\/span><\/span>\r\n\r\n<span style=\"font-family: Menlo;\"><span>notif.<\/span><\/span><span style=\"color: #7332a8;\"><span style=\"font-family: Menlo;\"><span>fireDate<\/span><\/span><\/span><span style=\"font-family: Menlo;\"><span> = [<\/span><\/span><span style=\"color: #538187;\"><span style=\"font-family: Menlo;\"><span>datePicker<\/span><\/span><\/span><span style=\"color: #410d80;\"><span style=\"font-family: Menlo;\"><span>date<\/span><\/span><\/span><span style=\"font-family: Menlo;\"><span>];<\/span><\/span>\r\n<span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>notif.<\/span><\/span><\/span><span style=\"color: #7332a8;\"><span style=\"font-family: Menlo;\"><span>timeZone<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span> = [<\/span><\/span><\/span><span style=\"color: #7332a8;\"><span style=\"font-family: Menlo;\"><span>NSTimeZone<\/span><\/span><\/span><span style=\"color: #410d80;\"><span style=\"font-family: Menlo;\"><span>defaultTimeZone<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>];<\/span><\/span><\/span>\r\n\r\n<span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>notif.<\/span><\/span><\/span><span style=\"color: #7332a8;\"><span style=\"font-family: Menlo;\"><span>alertBody<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span> = <\/span><\/span><\/span><span style=\"color: #cc2324;\"><span style=\"font-family: Menlo;\"><span>@\"Reminder for you\"<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>;<\/span><\/span><\/span>\r\n<span style=\"font-family: Menlo;\"><span>notif.<\/span><\/span><span style=\"color: #7332a8;\"><span style=\"font-family: Menlo;\"><span>alertAction<\/span><\/span><\/span><span style=\"font-family: Menlo;\"><span> = <\/span><\/span><span style=\"color: #cc2324;\"><span style=\"font-family: Menlo;\"><span>@\"Show\"<\/span><\/span><\/span><span style=\"font-family: Menlo;\"><span>;<\/span><\/span>\r\n<span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>notif.<\/span><\/span><\/span><span style=\"color: #7332a8;\"><span style=\"font-family: Menlo;\"><span>soundName<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span> = <\/span><\/span><\/span><span style=\"color: #7332a8;\"><span style=\"font-family: Menlo;\"><span>UILocalNotificationDefaultSoundName<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>;<\/span><\/span><\/span>\r\n<span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>notif.<\/span><\/span><\/span><span style=\"color: #7332a8;\"><span style=\"font-family: Menlo;\"><span>applicationIconBadgeNumber<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span> = <\/span><\/span><\/span><span style=\"color: #3d00d6;\"><span style=\"font-family: Menlo;\"><span>1<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>;<\/span><\/span><\/span>\r\n\r\n<span style=\"color: #7332a8;\"><span style=\"font-family: Menlo;\"><span>NSDictionary<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span> *userDict = [<\/span><\/span><\/span><span style=\"color: #7332a8;\"><span style=\"font-family: Menlo;\"><span>NSDictionary<\/span><\/span><\/span><span style=\"color: #410d80;\"><span style=\"font-family: Menlo;\"><span>dictionaryWithObject<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>:<\/span><\/span><\/span><span style=\"color: #cc2324;\"><span style=\"font-family: Menlo;\"><span>@\"Notification \t  text\"<\/span><\/span><\/span><span style=\"color: #410d80;\"><span style=\"font-family: Menlo;\"><span>forKey<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>:<\/span><\/span><\/span><span style=\"color: #538187;\"><span style=\"font-family: Menlo;\"><span>kRemindMeNotificationDataKey<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>];<\/span><\/span><\/span>\r\n\r\n<span style=\"font-family: Menlo;\"><span>notif.<\/span><\/span><span style=\"color: #7332a8;\"><span style=\"font-family: Menlo;\"><span>userInfo<\/span><\/span><\/span><span style=\"font-family: Menlo;\"><span> = userDict;<\/span><\/span>\r\n\r\n<span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>[[<\/span><\/span><\/span><span style=\"color: #7332a8;\"><span style=\"font-family: Menlo;\"><span>UIApplication<\/span><\/span><\/span><span style=\"color: #410d80;\"><span style=\"font-family: Menlo;\"><span>sharedApplication<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>] <\/span><\/span><\/span><span style=\"color: #410d80;\"><span style=\"font-family: Menlo;\"><span>scheduleLocalNotification<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>:notif];<\/span><\/span><\/span>\r\n<span style=\"font-family: Menlo;\"><span>[notif <\/span><\/span><span style=\"color: #410d80;\"><span style=\"font-family: Menlo;\"><span>release<\/span><\/span><\/span><span style=\"font-family: Menlo;\"><span>];<\/span><\/span>\r\n<span style=\"font-family: Menlo;\"><span>}<\/span><\/span><\/pre>\n<p>Cancel any exiting local notification<\/p>\n<pre><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>[[<\/span><\/span><\/span><span style=\"color: #7332a8;\"><span style=\"font-family: Menlo;\"><span>UIApplication<\/span><\/span><\/span><span style=\"color: #410d80;\"><span style=\"font-family: Menlo;\"><span>sharedApplication<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>] <\/span><\/span><\/span><span style=\"color: #410d80;\"><span style=\"font-family: Menlo;\"><span>cancelAllLocalNotifications<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>];<\/span><\/span><\/span><\/pre>\n<p><span style=\"color: #000000;\"><span>Allocate and initialize <\/span><\/span><span style=\"color: #7332a8;\"><span>UILocalNotification <\/span><\/span><span style=\"color: #000000;\"><span>object <\/span><\/span><\/p>\n<pre><span style=\"color: #7332a8;\"><span style=\"font-family: Menlo;\"><span>UILocalNotification<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span> *notif = [[cls <\/span><\/span><\/span><span style=\"color: #410d80;\"><span style=\"font-family: Menlo;\"><span>alloc<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>] <\/span><\/span><\/span><span style=\"color: #410d80;\"><span style=\"font-family: Menlo;\"><span>init<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>];<\/span><\/span><\/span><\/pre>\n<p><span style=\"color: #000000;\"><span>Set fire date and timezone. Fire date is date and time when system should deliver the notification. Date is calculated depending on timezone specified.If we do not specify timezone then it will take GMT as default time zone.<\/span><\/span><\/p>\n<pre><span style=\"font-family: Menlo;\"><span>notif.<\/span><\/span><span style=\"color: #7332a8;\"><span style=\"font-family: Menlo;\"><span>fireDate<\/span><\/span><\/span><span style=\"font-family: Menlo;\"><span> = [<\/span><\/span><span style=\"color: #538187;\"><span style=\"font-family: Menlo;\"><span>datePicker<\/span><\/span><\/span><span style=\"color: #410d80;\"><span style=\"font-family: Menlo;\"><span>date<\/span><\/span><\/span><span style=\"font-family: Menlo;\"><span>];<\/span><\/span>\r\n\r\n<span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>notif.timeZone = [NSTimeZone <\/span><\/span><\/span><span style=\"color: #410d80;\"><span style=\"font-family: Menlo;\"><span>defaultTimeZone<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>];<\/span><\/span><\/span><\/pre>\n<p><span style=\"color: #000000;\"><span>We can control alert message displayed when notification is delivered by setting alertBody and alert action by setting alertAction.<\/span><\/span><\/p>\n<pre><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>notif.<\/span><\/span><\/span><span style=\"color: #7332a8;\"><span style=\"font-family: Menlo;\"><span>alertBody<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span> = <\/span><\/span><\/span><span style=\"color: #cc2324;\"><span style=\"font-family: Menlo;\"><span>@\"Reminder for you\"<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>;<\/span><\/span><\/span>\r\n\r\n<span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>notif.<\/span><\/span><\/span><span style=\"color: #7332a8;\"><span style=\"font-family: Menlo;\"><span>alertAction<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span> = <\/span><\/span><\/span><span style=\"color: #cc2324;\"><span style=\"font-family: Menlo;\"><span>@\"Show\"<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>;<\/span><\/span><\/span><\/pre>\n<p><span style=\"color: #000000;\"><span>We can also specify sound to be played when notification is delivered by setting soundName and also specify badge number on application icon by setting applicationIconBadgeNumber.<\/span><\/span><\/p>\n<p>&nbsp;<\/p>\n<pre><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>notif.<\/span><\/span><\/span><span style=\"color: #7332a8;\"><span style=\"font-family: Menlo;\"><span>soundName<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span> = <\/span><\/span><\/span><span style=\"color: #7332a8;\"><span style=\"font-family: Menlo;\"><span>UILocalNotificationDefaultSoundName<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>;<\/span><\/span><\/span>\r\n\r\n<span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>notif.applicationIconBadgeNumber = <\/span><\/span><\/span><span style=\"color: #3d00d6;\"><span style=\"font-family: Menlo;\"><span>1<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>;<\/span><\/span><\/span><\/pre>\n<p><span style=\"color: #000000;\"><span>We can also pass custom data with notification by adding it into dictionary. We can add dictionary to notification using userInfo property. <\/span><\/span><\/p>\n<p>&nbsp;<\/p>\n<pre><span style=\"color: #7332a8;\"><span style=\"font-family: Menlo;\"><span>NSDictionary<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span> *userDict = [<\/span><\/span><\/span><span style=\"color: #7332a8;\"><span style=\"font-family: Menlo;\"><span>NSDictionary<\/span><\/span><\/span><span style=\"color: #410d80;\"><span style=\"font-family: Menlo;\"><span>dictionaryWithObject<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>:<\/span><\/span><\/span><span style=\"color: #cc2324;\"><span style=\"font-family: Menlo;\"><span>@\"Notification text\"<\/span><\/span><\/span><span style=\"color: #410d80;\"><span style=\"font-family: Menlo;\"><span>forKey<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>:<\/span><\/span><\/span><span style=\"color: #538187;\"><span style=\"font-family: Menlo;\"><span>kRemindMeNotificationDataKey<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>];<\/span><\/span><\/span>\r\n\r\n<span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>notif.<\/span><\/span><\/span><span style=\"color: #7332a8;\"><span style=\"font-family: Menlo;\"><span>userInfo<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span> = userDict;<\/span><\/span><\/span><\/pre>\n<p><span style=\"color: #000000;\"><span>Here we are passing notification text as custom data.<\/span><\/span><\/p>\n<p><span style=\"color: #000000;\"><span>In case if we want to increase icon badge number we can get current badge number by using.<\/span><\/span><\/p>\n<pre><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>[[<\/span><\/span><\/span><span style=\"color: #7332a8;\"><span style=\"font-family: Menlo;\"><span>UIApplication<\/span><\/span><\/span><span style=\"color: #410d80;\"><span style=\"font-family: Menlo;\"><span>sharedApplication<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>] <\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Times New Roman,serif;\"><span>applicationIconBadgeNumber <\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>];<\/span><\/span><\/span><\/pre>\n<p><span style=\"color: #000000;\"><span>If you want to repeat notification then you can set following property to required calendar unit.<\/span><\/span><\/p>\n<pre><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>notif.<\/span><\/span><\/span><span style=\"color: #7332a8;\"><span style=\"font-family: Menlo;\"><span>repeatInterval<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span> = <\/span><\/span><\/span><span style=\"color: #410d80;\"><span style=\"font-family: Menlo;\"><span>NSMinuteCalendarUnit<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>;<\/span><\/span><\/span>\r\n\r\n<span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>OR<\/span><\/span><\/span>\r\n\r\n<span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>notif.<\/span><\/span><\/span><span style=\"color: #7332a8;\"><span style=\"font-family: Menlo;\"><span>repeatInterval<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span> = NSHourCalendarUnit;<\/span><\/span><\/span>\r\n\r\n<span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>OR<\/span><\/span><\/span>\r\n\r\n<span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>notif.<\/span><\/span><\/span><span style=\"color: #7332a8;\"><span style=\"font-family: Menlo;\"><span>repeatInterval<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span> = <\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>NSDayCalendarUnit<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>;<\/span><\/span><\/span>\r\n<span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>\r\nOR<\/span><\/span><\/span>\r\n\r\n<span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>notif.<\/span><\/span><\/span><span style=\"color: #7332a8;\"><span style=\"font-family: Menlo;\"><span>repeatInterval<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span> = <\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>NSWeekCalendarUnit<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Menlo;\"><span>;<\/span><\/span><\/span><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Local notifications : Local notifications are used to notify user that application is having some updates, while application is not running in foreground. We can display an alert message or badge on application icon. Local notifications can play sound when alert message or badge is shown. We can use local notification to remind our daily [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":7444,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_s2mail":"","footnotes":""},"categories":[3],"tags":[463,139,328,124,138],"class_list":["post-1386","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-iphone","tag-apple","tag-ios4","tag-iphone-ipad","tag-local-notifications","tag-notifications"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>iPhone Local Notifications - Mobisoft Infotech<\/title>\n<meta name=\"description\" content=\"Local notifications notify the user about updates when the application is not running in foreground. Here is the source code on how to create notifications.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-local-notifications\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"iPhone Local Notifications - Mobisoft Infotech\" \/>\n<meta property=\"og:description\" content=\"Local notifications notify the user about updates when the application is not running in foreground. Here is the source code on how to create notifications.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-local-notifications\" \/>\n<meta property=\"og:site_name\" content=\"Mobisoft Infotech\" \/>\n<meta property=\"article:published_time\" content=\"2010-11-22T10:30:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2015-03-25T08:32:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2015\/01\/iPhone-Local-Notifications_l-min.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"550\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Prasad Tandulwadkar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Prasad Tandulwadkar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-local-notifications#article\",\"isPartOf\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-local-notifications\"},\"author\":{\"name\":\"Prasad Tandulwadkar\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/c68a5a70c006edb6c46e46ec44d75dfc\"},\"headline\":\"iPhone Local Notifications\",\"datePublished\":\"2010-11-22T10:30:02+00:00\",\"dateModified\":\"2015-03-25T08:32:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-local-notifications\"},\"wordCount\":246,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-local-notifications#primaryimage\"},\"thumbnailUrl\":\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2015\/01\/iPhone-Local-Notifications_l-min.jpg\",\"keywords\":[\"Apple\",\"iOS4\",\"iPhone \u2013 iPad\",\"Local Notifications\",\"Notifications\"],\"articleSection\":[\"iPhone - iPad\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-local-notifications#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-local-notifications\",\"url\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-local-notifications\",\"name\":\"iPhone Local Notifications - Mobisoft Infotech\",\"isPartOf\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-local-notifications#primaryimage\"},\"image\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-local-notifications#primaryimage\"},\"thumbnailUrl\":\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2015\/01\/iPhone-Local-Notifications_l-min.jpg\",\"datePublished\":\"2010-11-22T10:30:02+00:00\",\"dateModified\":\"2015-03-25T08:32:43+00:00\",\"author\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/c68a5a70c006edb6c46e46ec44d75dfc\"},\"description\":\"Local notifications notify the user about updates when the application is not running in foreground. Here is the source code on how to create notifications.\",\"breadcrumb\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-local-notifications#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-local-notifications\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-local-notifications#primaryimage\",\"url\":\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2015\/01\/iPhone-Local-Notifications_l-min.jpg\",\"contentUrl\":\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2015\/01\/iPhone-Local-Notifications_l-min.jpg\",\"width\":1920,\"height\":550,\"caption\":\"iPhone Local Notifications_l-min\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-local-notifications#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/mobisoftinfotech.com\/resources\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"iPhone Local Notifications\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/#website\",\"url\":\"https:\/\/mobisoftinfotech.com\/resources\/\",\"name\":\"Mobisoft Infotech\",\"description\":\"Discover Mobility\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/mobisoftinfotech.com\/resources\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/c68a5a70c006edb6c46e46ec44d75dfc\",\"name\":\"Prasad Tandulwadkar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/0f055204821da2ba3dce8915179405b2735e4a1d0e02f0021c86ae1fb89f9596?s=96&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0f055204821da2ba3dce8915179405b2735e4a1d0e02f0021c86ae1fb89f9596?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0f055204821da2ba3dce8915179405b2735e4a1d0e02f0021c86ae1fb89f9596?s=96&r=g\",\"caption\":\"Prasad Tandulwadkar\"},\"sameAs\":[\"http:\/\/wwww.mobisoftinfotech.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"iPhone Local Notifications - Mobisoft Infotech","description":"Local notifications notify the user about updates when the application is not running in foreground. Here is the source code on how to create notifications.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-local-notifications","og_locale":"en_US","og_type":"article","og_title":"iPhone Local Notifications - Mobisoft Infotech","og_description":"Local notifications notify the user about updates when the application is not running in foreground. Here is the source code on how to create notifications.","og_url":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-local-notifications","og_site_name":"Mobisoft Infotech","article_published_time":"2010-11-22T10:30:02+00:00","article_modified_time":"2015-03-25T08:32:43+00:00","og_image":[{"width":1920,"height":550,"url":"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2015\/01\/iPhone-Local-Notifications_l-min.jpg","type":"image\/jpeg"}],"author":"Prasad Tandulwadkar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Prasad Tandulwadkar","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-local-notifications#article","isPartOf":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-local-notifications"},"author":{"name":"Prasad Tandulwadkar","@id":"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/c68a5a70c006edb6c46e46ec44d75dfc"},"headline":"iPhone Local Notifications","datePublished":"2010-11-22T10:30:02+00:00","dateModified":"2015-03-25T08:32:43+00:00","mainEntityOfPage":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-local-notifications"},"wordCount":246,"commentCount":0,"image":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-local-notifications#primaryimage"},"thumbnailUrl":"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2015\/01\/iPhone-Local-Notifications_l-min.jpg","keywords":["Apple","iOS4","iPhone \u2013 iPad","Local Notifications","Notifications"],"articleSection":["iPhone - iPad"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-local-notifications#respond"]}]},{"@type":"WebPage","@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-local-notifications","url":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-local-notifications","name":"iPhone Local Notifications - Mobisoft Infotech","isPartOf":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/#website"},"primaryImageOfPage":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-local-notifications#primaryimage"},"image":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-local-notifications#primaryimage"},"thumbnailUrl":"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2015\/01\/iPhone-Local-Notifications_l-min.jpg","datePublished":"2010-11-22T10:30:02+00:00","dateModified":"2015-03-25T08:32:43+00:00","author":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/c68a5a70c006edb6c46e46ec44d75dfc"},"description":"Local notifications notify the user about updates when the application is not running in foreground. Here is the source code on how to create notifications.","breadcrumb":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-local-notifications#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-local-notifications"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-local-notifications#primaryimage","url":"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2015\/01\/iPhone-Local-Notifications_l-min.jpg","contentUrl":"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2015\/01\/iPhone-Local-Notifications_l-min.jpg","width":1920,"height":550,"caption":"iPhone Local Notifications_l-min"},{"@type":"BreadcrumbList","@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/iphone-local-notifications#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/mobisoftinfotech.com\/resources\/"},{"@type":"ListItem","position":2,"name":"iPhone Local Notifications"}]},{"@type":"WebSite","@id":"https:\/\/mobisoftinfotech.com\/resources\/#website","url":"https:\/\/mobisoftinfotech.com\/resources\/","name":"Mobisoft Infotech","description":"Discover Mobility","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/mobisoftinfotech.com\/resources\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/c68a5a70c006edb6c46e46ec44d75dfc","name":"Prasad Tandulwadkar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0f055204821da2ba3dce8915179405b2735e4a1d0e02f0021c86ae1fb89f9596?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0f055204821da2ba3dce8915179405b2735e4a1d0e02f0021c86ae1fb89f9596?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0f055204821da2ba3dce8915179405b2735e4a1d0e02f0021c86ae1fb89f9596?s=96&r=g","caption":"Prasad Tandulwadkar"},"sameAs":["http:\/\/wwww.mobisoftinfotech.com"]}]}},"_links":{"self":[{"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/posts\/1386","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/comments?post=1386"}],"version-history":[{"count":23,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/posts\/1386\/revisions"}],"predecessor-version":[{"id":4357,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/posts\/1386\/revisions\/4357"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/media\/7444"}],"wp:attachment":[{"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/media?parent=1386"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/categories?post=1386"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/tags?post=1386"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}