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 8621073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:44:07+00:00 2026-06-12T06:44:07+00:00

I have an app with basic alarm functionality. In my applicationWillResignActive: method I have

  • 0

I have an app with basic alarm functionality. In my applicationWillResignActive: method I have it setup to create notifications to set off the alarm. This works pretty great, and I believe this is the proper way to do it (let me know if you think there is a better way).

Only in the specific situation, ONLY ON iOS 6, when the application is not “quit” (the home button is never pressed) but the user merely locks the phone or the phone auto locks, the notifications don’t go off.

I have traced through the code, and the notifications are indeed being created and it worked perfectly in iOS 5.

Here is my code:

- (void)applicationWillResignActive:(UIApplication *)application
{
    [UIApplication sharedApplication].idleTimerDisabled = NO;

    [alarm setupForBackground];
    if ([alarm isRunning]) {
        [alarm stop];
    }
}

Here is the notification creation method:

- (void)setupForBackground
{
    UILocalNotification* alarmNotification = [[UILocalNotification alloc] init];
    if (alarmNotification) {
        alarmNotification.fireDate = alarmDate;
        alarmNotification.timeZone = [NSTimeZone defaultTimeZone];
        alarmNotification.repeatInterval = 0;
        alarmNotification.soundName = @"NotificationSound.aif";
        [[UIApplication sharedApplication] scheduleLocalNotification:alarmNotification];
    }
}

I have been searching for an answer for a while, and I could not find anything stating something about notification changes. Thanks for any help.

  • 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-12T06:44:09+00:00Added an answer on June 12, 2026 at 6:44 am

    I have a semi-solution. Apparently if you add an AlertBody to the notification, then it works.

    My belief is that this is a bug in iOS 6. As I mentioned it worked in iOS 5, the documentation makes no mention of having such a requirement, and the notification does work without the AlertBody if the application is quit (the home button is pressed).

    Still curious to see if my understanding is correct and if I should file a bug report with Apple.

    Thoughts anybody?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this UITableView app, a basic diary app, in this method XCode says
I have a very basic doubt regarding the method that gets executed when app
I have a basic app that allows user1 to create a redeemable code. user1
I am writing a pretty basic php app and have created a pretty big
I have a basic app set up using Backbone.js and Tornado Web. When I
I have a pretty basic app flow that is quite linear, so it fits
I have an app and there is some basic functionality that needs to be
We have an web app what uses Basic HTTP authentication. web.xml ... <login-config> <auth-method>BASIC</auth-method>
I have this app with basic AccountModel that ships with MVC3. The AccountModel have
I have setup a basic app which pulls down a JSON stream and displays

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.