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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T23:28:49+00:00 2026-05-18T23:28:49+00:00

The app that I’m currently working on has a problem propagating settings, but seems

  • 0

The app that I’m currently working on has a problem propagating settings, but seems to work fine once it’s been closed and re-opened. It’s an alarm clock application so it doesn’t benefit from multi-tasking. Since I am using NSUserDefaults to save pertinent settings, I have shut off multitasking:

@implementation MyAppDelegate

- (void) applicationDidEnterBackground:(UIApplication *)application {
      exit(0);

}
...
@end 

So at this point the user has to manually close and re-open the app. Is there a command I can send to cause the app to close and re-open (automatically)? I would like the app to close and re-open if certain settings are changed when the settings view controller is removed from the screen.

  • 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-18T23:28:50+00:00Added an answer on May 18, 2026 at 11:28 pm

    No, you cannot force an app to restart itself. Using exit() in your code violates Apple HIG.

    To accomplish what you want, I suggest showing an alert to the user when the settings are changed, which will advise then that the settings will take effect on next launch.

    You should disable multitasking by adding UIApplicationExitsOnSuspend to your info.plist and set it to true.

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

Sidebar

Related Questions

I have an app that has settings the user can pick before running the
I'm writing an app that will need to make use of Timer s, but
I have a console app that needs to display the state of items, but
Say that the user has started my App and then switched off to use
I have an app that currently holds all state in memory. It fetches a
I'm making an app that has a file name field, an upload file field
I have an app that does not currently use a Setting.bundle to display setting
I have a winform app that calls a web service to check for updates.
We have a NET app that gets installed to the Program Files folder. The
I have a Cocoa app that uses a WebView to display an HTML interface.

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.