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

  • Home
  • SEARCH
  • 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 8347027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T07:13:12+00:00 2026-06-09T07:13:12+00:00

I am working on an alarm application. When the app is in the background

  • 0

I am working on an alarm application. When the app is in the background a local notification informs the user that an alarm is ringing and playing a sound. But when the app is already in foreground I do not want the notification sound to play, but a custom sound. I cannot find how to mute the notification sound and as a result both sounds play simultaneously. Any ideas?

UPDATE: I restarted my device and the problem solved. It probably is an iOS bug.

  • 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-09T07:13:14+00:00Added an answer on June 9, 2026 at 7:13 am

    When your app is open and running in the foreground, the default behavior is that the sound is not played and the user doesn’t receive any alert/banner from the OS. You can receive the notification through the following method (in the class that is your AppDelegate):

    - (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification
    {
        NSLog(@"Do something");
    }
    

    And from there you can trigger any other method.

    From the documentation on UILocalNotification:

    If the application is foremost and visible when the system delivers
    the notification, no alert is shown, no icon is badged, and no sound
    is played. However, the application:didReceiveLocalNotification: is
    called if the application delegate implements it. The
    UILocalNotification instance is passed into this method, and the
    delegate can check its properties or access any custom data from the
    userInfo dictionary.

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

Sidebar

Related Questions

I am working on an alarm application and I am using local notification for
I am working on Alarm application in which I want to set Large Sound
The app that I'm currently working on has a problem propagating settings, but seems
Okay, So I'm working on having an alarm that gives a notification at, lets
Created a Location alarm based app. Everything is working fine on emulator. But the
I am working on App which will set an alarm on ios for a
I'm diving into iOS development and have been working on an alarm clock app
I am making an app where the user can set an alarm based on
I've got a little system dashboard web app that I've written, replete with alarm
I am working on an alarm feature for my application where, at a certain

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.