-3

Ones my application finishes executing, I need to restart it in order to be able to reuse it again.

I am curious if there is a way I could add an action Listener to a "RESTART" button that would close and reopen my application?

Ketan Ubhada
  • 275
  • 3
  • 14
  • 1
    No way. In case of Storyboard application you may use this method UIViewController* initialScene = [_initalStoryboard instantiateInitialViewController]; self.window.rootViewController = initialScene; – nerowolfe Dec 10 '13 at 09:10
  • only way would be to advise the user via alert view or other way to quit the app and launch again. – thorb65 Dec 10 '13 at 09:13
  • As a not possible for call direct didFinishLaunchingWithOptions method? – Ketan Ubhada Dec 10 '13 at 09:22

3 Answers3

2

That is not possible. iOS doesn't provide API for this functionality. You may have luck with a jailbroken device.

Anyways, you have bigger problems if your app needs to restart to be usable.

duci9y
  • 4,128
  • 3
  • 26
  • 42
0

This is not possible in iOS. Because there is no functionality to restart the application on button click.

Maulik Kundaliya
  • 452
  • 3
  • 17
0

You should not force the user to restart the app, even automatic shut-down and restart. The user will be annoyed and not use your app ever.

Also this is against the guidelines.

Anoop Vaidya
  • 46,283
  • 15
  • 111
  • 140