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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:22:29+00:00 2026-05-28T05:22:29+00:00

I am working on time based reminder App. in which the user enter his

  • 0

I am working on time based reminder App. in which the user enter his reminder and time for the reminder. The problem is that how to continuously comparing the current time with the user defined time. Any sample code will greatly help. because i am stuck on this point.

  • 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-28T05:22:29+00:00Added an answer on May 28, 2026 at 5:22 am

    Comparing the current time vs. the user defined one is not the right design pattern.

    UIKit offers the NSLocalNotification object that is a more high-level abstraction for your task.

    Below is a snip of code that create and schedule a local notification at the choosen time:

        UILocalNotification *aNotification = [[UILocalNotification alloc] init];
        aNotification.fireDate = [NSDate date];
        aNotification.timeZone = [NSTimeZone defaultTimeZone];
    
        aNotification.alertBody = @"Notification triggered";
        aNotification.alertAction = @"Details";
    
        /* if you wish to pass additional parameters and arguments, you can fill an info dictionary and set it as userInfo property */
        //NSDictionary *infoDict = //fill it with a reference to an istance of NSDictionary;
        //aNotification.userInfo = infoDict;
    
        [[UIApplication sharedApplication] scheduleLocalNotification:aNotification];
        [aNotification release];
    

    Also, be sure to setup your AppDelegate to respond to local notifications, both at startup and during the normal runtime of the app (if you want to be notified even the application is in foreground):

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
    
        UILocalNotification *aNotification = [launchOptions objectForKey: UIApplicationLaunchOptionsLocalNotificationKey]; 
    
        if (aNotification) {
            //if we're here, than we have a local notification. Add the code to display it to the user
        }
    
    
        //...
        //your applicationDidFinishLaunchingWithOptions code goes here
        //...
    
    
            [self.window makeKeyAndVisible];
        return YES;
    }
    
    
    
    - (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
    
            //if we're here, than we have a local notification. Add the code to display it to the user
    
    
    }
    

    More details at the Apple Developer Documentation.

    • 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 MKMapView based iPhone / iPad mapping app that overlays
I am working on a web-based application that will require users to enter a
The shop that I am working part time with is new to Microsoft CRM.
I am having an problem. First time working with a windows server, do you
I'm working on a time sheet application, where I'd like the user to be
First question. Be gentle. I'm working on software that tracks technicians' time spent working
I am working on a web based project in my free time. I have
I'm working on a web-based application that is intended to have at least a
I have been working on a first application for some time based on the
Some time ago I put together a time based library that could be used

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.