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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:57:25+00:00 2026-05-26T17:57:25+00:00

I am storing some objects in core data that have inherent life spans. I

  • 0

I am storing some objects in core data that have inherent life spans. I was scheduling local notifications on object creation for this lifespan and then handling the object went the notification fired.

The problem is that the objects can end early. But the local notifications don’t know this and still fire at their respective time which leads to confusion. Is there a way to store a pointer to the notification in with the object? So if it ends early it can just cancel it.

I would like to stick with notifications as I need the user to know when it is finished, if it finishes normally. And notifications don’t depend on the app running.

Basic question can you store pointers to objects in core data. Second question is if local notifications change memory addresses during their lifespan

I know I could just cancel them all and reschedule the ones needed if one ends early but that just seems wasteful and hopefully there’s a better way.

  • 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-26T17:57:26+00:00Added an answer on May 26, 2026 at 5:57 pm

    UILocalNotification is not serializable (it doesn’t implement NSCoding), so you can’t store it persistently with Core Data. I suggest you add the Core Data entities’ managedObjectID in serializable form (e.g. as an URL) to the notifications’ userInfo property. If you need to delete a specific notification, you search your UIApplications’ scheduledLocalNotifications array for the local notification with the corresponding managed object ID in its userInfo property and then cancel that one via cancelLocalNotification:.

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

Sidebar

Related Questions

I have a mutable array that is retained and storing several objects. At some
I have a document based application running with core data. The object model has
I have built in some Core Data support into my app from the Core
I'm developing a Core Data app that uses a model object called Location. The
I have a Type, a String and an Object. Is there some way I
We're storing some Guid's in a MS SQL database. There's some legacy code that
I am looking at storing some JMX data from JVMs on many servers for
I am starting to have a look at Core Data, as many claiming is
Storing data permanently in an iPhone is usually done using Core Data or sqlite3.
I am facing some issues while retrieving data from a doctrine pager object! Let

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.