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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:52:06+00:00 2026-05-28T20:52:06+00:00

In my app, for first time push notification registration, I call didRegisterForRemoteNotificationsWithDeviceToken and save

  • 0

In my app, for first time push notification registration, I call didRegisterForRemoteNotificationsWithDeviceToken and save the device token in persistence as well as update my server list for device token. Now afterwards if somebody turns the push notification settings off from iPhone Settings how can I determine it from my app so that I can remove the device token from server as well. I know APNS provides a feedback list, but other than that is there a way to determine it in App programmatically? 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-05-28T20:52:07+00:00Added an answer on May 28, 2026 at 8:52 pm

    I believe you do not want to manage tokens this way.

    Your app should always be asking Apple for an APNs token. You should always then send that token to your own server, likely associating the token with your user (if you have one). You do this because the token could change, so you want to make sure you always have up-to-date tokens.

    The Feedback service will tell you (actually, you poll it at some interval of your choosing) which tokens have become invalid. At this point, you remove the tokens from your server-side database. To be clear, you need a server-side process that polls Apple’s feedback service and then updates your server-side database.

    You will not receive feedback about invalid tokens until you try to send a notification using the token. The notification will (I believe) be accepted by Apple when you send it, but when Apple discovers it’s for an invalid token, the message is dropped, and the token is added to your feedback.

    Now, if the user of your app accepts push notifications when your app first asks about it, but later turns off notifications via the Settings app for your app, you will not get any feedback about it. What happens, near as I can tell, is that any notification you send to that device will be sent to the device, but the OS drops it, honoring the user’s ultimate choice in the Settings app for your app and notifications.

    Finally, there is an API you can call in your app to get a bitmask of which kinds of notifications are enabled for your app on the device. Here’s a method I wrote for this purpose; adjust as needed:

    +(BOOL)acceptsPushNotifications
    {
        UIRemoteNotificationType mask = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];
    
        return (mask & UIRemoteNotificationTypeAlert) == UIRemoteNotificationTypeAlert;
    }
    

    But I would not recommend using this to decide if you app should tell your server to delete the token from your database. That’s not how the whole APNs system is intended to work… I believe.

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

Sidebar

Related Questions

I want to use push notification in my app so first time it launches
This is the first time I am using push notification in my App. I
This is the first time that I approach the push notification service and I'm
The very first time you start a push app, the user gets asked if
Every first time your app is sending local notification to lock screen you can
I writing a C# App for a customer for the first time and I
How do I detect when an iOS app is launched for the first time?
I want to check if my iPhone app is running for the first time.
I'm creating an asp.net MVC app, first time I've done this. I have a
I've been developing my first iPhone app part-time and would like to start using

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.