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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:48:52+00:00 2026-06-11T03:48:52+00:00

Good Day! I am developing a reminder software for Mac OS X (not iPhone).

  • 0

Good Day!

I am developing a reminder software for Mac OS X (not iPhone). It should present a window one time in a day.
The exact time is not defined, just one time. How can I make it. It register itself to start after the login. I have tried NSTimer but it looks like it doesn’t fire a method when I call
[timer setfFireDate:] after the first method fire.

Look forward for your 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-06-11T03:48:54+00:00Added an answer on June 11, 2026 at 3:48 am

    From your latest comments, it seems like you need to use both a timer and user defaults. The user defaults method first checks to see if there is a user default called “firstOpening” and if not sets it to the current time — this will set the clock for the beginning of your 20 day trial period. That first if clause will only run the first time the program is opened.

    I created a property, firstOpenTime, that retrieves the value from the user defaults, and uses that to check if the 20 days has expired — if so, the program runs the presentExpiredWindow method, and if not, it presents the reminder window, and sets up a repeating timer that runs once every 24 hours. So, even if the program remains open all the time, the timer should fire once every 24 hours to show the reminder window (unless the 20 days has elapsed, and then the timer method calls the showExpiredWindow method and invalidates itself).

        - (void)applicationDidFinishLaunching:(NSNotification *)aNotification{
    
        if (![[NSUserDefaults standardUserDefaults] objectForKey:@"firstOpening"] ){
            [[NSUserDefaults standardUserDefaults] setObject:[NSDate date] forKey:@"firstOpening"];
        }
    
        self.firstOpenTime = [[NSUserDefaults standardUserDefaults] objectForKey:@"firstOpening"];
        if ([[NSDate date] timeIntervalSinceDate:self.firstOpenTime] > 1728000) { //1,728,000 seconds is 20 days
            [self presentExpiredWindow];
        }else{
            [self presentReminderWindow];
            [NSTimer scheduledTimerWithTimeInterval:86400 target:self selector:@selector(presentReminder:) userInfo:nil repeats:YES]; 
        }
    
    }
    
    -(void)presentReminder:(NSTimer *) aTimer {
        if ([[NSDate date] timeIntervalSinceDate:self.firstOpenTime] > 1728000) {
            [self presentExpiredWindow];
            [aTimer invalidate];
        }else{
            [self presentReminderWindow];
        }
    
    }
    
    -(void)presentReminderWindow {
        //show reminder window
    }
    
    
    -(void)presentExpiredWindow {
        //show trial period has ended window
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Good day everyone, this is one of those areas that is a little over
Good Day, I have two connection strings defined in my web.config file. <connectionStrings> <add
good day we are developing game for android and have some trouble with resource
Good day. I'm developing a website with the database which is going to be
Good day! I am developing a program using JavaFX SDK. I wanted to have
good day! im developing an app in c++ and winpcap that will list all
Good Day, I'm developing an application in VC++ that communicates using UDP protocol with
Good day. I need to teach Windows CryptoAPI to encrypt the message with private
Good Day, Can someone confirm what was said at the bottom of this post
Good day, I have a class that implements the LoaderCallbacks, and hence have the

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.