How to reload or reload iPhone app programmatically in iOS

I downloaded an xml file that contains some update options, and then I need to reload these options and initialize some views. The easiest way is to apply this configuration the next time you load the application. Is there a way to reload the iOS application software?

Thanks.

+6
source share
5 answers

Rebooting the app is a bad idea, I'm sure Apple will give it up. However, you can display a pop-up window telling the user to open close the application to apply the updated information. But the best way would be to simply manually call the methods needed to restore your application (for example, those that need to use updated data). If you need to do some extensive overhauling (that is, things that the user immediately noticed), it might be a good idea to add sorting to the โ€œload scheduleโ€.

+9
source

You cannot restart the application, and I do not understand why you should: b) EVERYONE WANT.

+4
source

You can exit and restart the iOS application with a little help from the user. Set the application plist button to exit the application in pause mode. Create a local notification for your application to launch a few seconds into the future. Then submit the Safari URL. The OS will terminate your application when you start Safari to process the URL. The URL may be a web landing page telling the user that a restart is in progress. Then the local notification will turn off and ask the user to restart your application.

However, the application must be (re) designed in such a way that there is never a reason for this.

+2
source

You can only do this if your device is locked.

Put the reset button in the application and call abort(); . This will cause the application to crash.

Pick up -(void)exitedAbnormally ; from SBApplication and write code to run your application.

If it is not hacked, you have no choice

+1
source

If you developed it for jailbreak devices, you can use the uicache command to clear the springboard cache and reload new applications / icons (available from the UIKit package).

eg,

1) if you are root:

  su mobile -c uicache 1>/dev/null 2>&1 

2) if you are under a mobile phone:

  uicache 

to reboot you can use the reboot command as root and killall SpringBoard for respring

0
source

Source: https://habr.com/ru/post/907555/


All Articles