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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:16:21+00:00 2026-06-16T04:16:21+00:00

Im wanting to show an alert when the user has been using the app

  • 0

Im wanting to show an alert when the user has been using the app for an hour

In the app delegate:

First I tried this: Displaying UIAlertView after some time

Then I tried

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[self performSelector:@selector(showAlert) withObject:nil afterDelay:3600];

return YES;
}

-(void)showAlert{
  UIAlertView * alert = [[UIAlertView alloc] initWithTitle:@"title!"
                                                 message:@"message!"
                                                delegate:self
                                       cancelButtonTitle:@"Cancel"
                                       otherButtonTitles:nil];
  [alert show];
}

In both examples I tried using various figures in the after delay. No matter what I put for the delay, the timer fires after a min every time?

UPDATE:
This is correct code, I had also left this in the viewDidLoad in my view controller in addition to delegate so it was also firing that method. Thanks all

  • 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-16T04:16:26+00:00Added an answer on June 16, 2026 at 4:16 am

    If this is what you do:

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
    
        [self performSelector:@selector(showAlert) withObject:nil afterDelay:3600];
    
        return YES;
    }
    
    -(void)showAlert{
        UIAlertView * alert = [[UIAlertView alloc] initWithTitle:@"title!"
                                                         message:@"message!"
                                                        delegate:self
                                               cancelButtonTitle:@"Cancel"
                                               otherButtonTitles:nil];
        [alert show];
    }
    

    you should edit your question to this, and add additional information, as the problem has to be somewhere else.

    Otherwise, this is your answer.

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

Sidebar

Related Questions

I'm wanting to show a loading indicator after the user has clicked a button
I'm wanting to show two divs when the page has been scrolled, but once
I've been wanting to work on this application for about a year now. I
I am wanting to use jquery to do a show/hide of a DIV from
I am wanting to display one list element at a time. Ideally, the first
when user changes password I want to show message Successfully changed! and when user
Possible Duplicate: How do you prompt the user to rate your iphone app without
I'm wanting to display a pivot table and for it to show me the
I'm wanting to use the asterisk manager api to show the status of all
I'm wanting the user to accept an agreement before the application is launched. So

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.