Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7937229
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:28:21+00:00 2026-06-03T22:28:21+00:00

I have implemented UILocalNotifications in two different apps now. One uses Location Services, which

  • 0

I have implemented UILocalNotifications in two different apps now. One uses Location Services, which means if it gets killed, it (usually) gets restarted (so it’s not as big of an issue). However, in another app, I schedule a UILocalNotification based upon time. In this case, I’m having a major problem.

If I schedule a notification, then the app gets killed, pushed out of memory, phone is turned off then on again, I cannot view older notifications “automatically” when opening the app.

Here is the workflow that works (app running in the background):

  1. Launch app; app schedules notification; close app; app is now running in the background
  2. Receive local notification; ignore it at first; pull the drop down menu from the top (status bar); touch the notification to launch the app
  3. Results: The app appropriately displays the information in the notification.

Here is the workflow that does not work (app no longer running in the background):

  1. Launch app; app schedules notification; close app; app is now running in the background
  2. Manually kill app (to simulate my situation)
  3. Still receive local notification; ignore it at first; pull the drop down menu from the top (status bar); touch the notification to launch the app
  4. Results: The app launches, but the didReceiveLocalNotification method is not called. The user thinks the app doesn’t work.
    Note: I can’t even manually force the information, because if they have received more than one notification, I can’t tell which one they touched on to know which one to display.

Is there any way to know which notification they touched on when the app is not running in the background (and thus does not run the didReceiveLocalNotification method)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T22:28:23+00:00Added an answer on June 3, 2026 at 10:28 pm

    In the 2nd case, the user has quit (or killed) the app, so when the user touches the notification your app would be launched.

    This can be handled in the below mentioned appDelegate’s method

    didFinishLaunchingWithOptions is invoked when an app is launched, so just check if the app was actually launched because the user touched the notification (code below):

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
        UILocalNotification *notification = [launchOptions objectForKey:UIApplicationLaunchOptionsLocalNotificationKey];
    
        if (notification) 
        {
            NSLog(@"notification caused app to launch, alert body = %@", notification.alertBody);
            // do what ever action you want to do
            // you could just copy the code from "didReceiveLocalNotification" and paste it here
        }
    
        return YES;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have implemented one application in android which uses epublib to view .epub files.
i have implemented galleryview in one screen named display_image.xml in which i have shown
We have implemented JUnit4 in our application which uses Spring core & JPA with
I have implemented a custom ActionMapper which obtains the locale from the URI (the
I have implemented a small Windows Service which runs every 9 minutes and writes
I have implemented a simple linked list class and I would now like to
I have implemented the Google map successfully. But one more thing has left to
I have implemented a selection pattern similar to the one described in this post
I have implemented a REST Webservice which returns (after an authentication via RFC 2617
I have implemented a multi-threaded program which involves spawning a thread for each user,and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.