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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T10:31:07+00:00 2026-06-09T10:31:07+00:00

I have an app in Xcode which handles sensitive data. I would like to

  • 0

I have an app in Xcode which handles sensitive data. I would like to terminate the app / exit forcefully if there is inactivity for 5 mins. Can someone please tell me how to do this?
Thank you!

  • 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-09T10:31:08+00:00Added an answer on June 9, 2026 at 10:31 am

    Click here for a tutorial on how to make a timer. Every action that the user takes, reset the timer. When the 5 minutes are up, you can use exit(0).

    However, this method of programatically closing your app is discouraged by Apple, so use it at your own discretion.

    Edit: In order to stop the timer, you need to store a pointer to the timer that you create, and then call:

    [pointerToTimer invalidate];
    pointerToTimer  = nil;
    

    Edit 2: An alternative to using exit(0) would be to make a almost blank screen except for some text that states:

    You have been inactive for too long. Please exit and restart this application.

    Make this screen appear once the timer gets to 5 minutes. Therefore, the user can’t do anything on the app but look at the screen, or exit the app.

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

Sidebar

Related Questions

I have developed a Cocos2d-X app with XCode which works perfectly when I launch
I have a app which uses core data and it runs properly if i
I have a Universal app (iPhone/iPad) which is very basic. There is a List
I have an app which uses core data, the database structure was designed through
I have an iOS app I created as a view-based app in xCode. I
I have a 32bit iMac that I am writing an iPhone app in Xcode
I am creating an iPad app using XCode 4 and Storyboards. I have a
i built a very basic video player app in Xcode 4.3.2 i have 3
I've just installed OS X Lion and XCode 4.1. I have an app that
I have try to set icon for my App in the xCode. In 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.