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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:28:25+00:00 2026-06-13T21:28:25+00:00

I have a app where the user has various events they are able to

  • 0

I have a app where the user has various events they are able to check into. If they check into the event, there will be a local notification setup for 24 hours before the event to remind the user. My question is, i have the setApplicationIconBadgeNumber for the app and i’m setting it to whatever the badge number is at the time, plus one. Problem is say that there’re two events that are at the same time, the badge number should be 2 not 1, how do I tell iOS to set the badge number appropriately? Since this is all local notification and happens at a particular time, its hard to keep track within code…

  • 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-13T21:28:25+00:00Added an answer on June 13, 2026 at 9:28 pm

    I agree it’s hard to keep track of in your code, especially since with local notifications your code might not have a chance to actually execute when this is all happening. Seems like an oversight in the API that could’ve been fixed with a special “increment badge number” event.

    One solution is this: every time you create a new UILocalNotification, go through the list of all existing notifications and figure out what each of them should have as the correct badge number (e.g., based on the fireDate of each).

    So, use UIApplication‘s scheduledLocalNotifications to get the array of existing applications. Sort them as necessary to figure out the correct badge number for each, and then update each object with the correct badge number. Set the (modified) array back as the scheduledLocalNotifications property to register the updated values.

    Do the same thing whenever some unrelated external event changes the badge counter, and I think – though it’s not pretty – you should have a reliable hack.

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

Sidebar

Related Questions

I have a user profile page on my web app which has contact information.
I have a data model object User . My app also has some other
I have an app with 2 user levels; Superuser, and Staff. Superuser will login
My GAE Python app has a kind called User, with various custom fields. Recently,
I have an app where the user types a word and an autocomplete appears.
I have an app where the user presses a button and a custom spinner
I have an app that requires user to register. I've got the app conected
lets say i have app id, app secret id and user uid now i
Currently I have this code var App = Ember.Application.create(); App.user = Ember.Object.create({ people: customers
I have an app that lets the user interact with several forms. I can

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.