slecault
7 years agoContributor
iOS app Restart
Is there a way to "restart" of an instrumented iOS app? I use the following command with Android: Mobile.Device.Process('com.myapp.abc').Restart;
Did you try it with this? If so, what happened?
Yes, I do have the process... the Restart is not one of its methods...
It does not appear with the autocomplete while the app is running on a connected device. If I force the ".restart" , I get "Undeclared identifier: Restart".
my code under iOS:
Mobile.Device.Process('myApp').Restart;
my code under iOS:
Mobile.Device.Process('myApp').Restart;
----------------------------------------------
The examples at the link I posted all have a different format than you are using
Mobile.Device(mydevice).Process(myapp)
Try that and see if Restart shows up?
Marsha,
My understanding is that when no device name is provided, the Current one is used.
Same result with:
Mobile.Device('iPhone de iPod').Process('myApp').Restart;
Hi,
What does 'Restart' mean?
You may press Home button one or more times until the main application's window is not visible.
However, to my understanding, this does not guarantee that the application is terminated.
For Android, the code to terminate the application looks like this:
device.ShellExecute('am force-stop ' + cPackageName);
I think that something like this should exist for iOS as well...
Alex,
I do use the Android ShellExecute... but did not find an iOS equivalent yet.
The restart "closes" the app and restarts it without reinstalling the package.
When my scripts it a problem, I restart the app and move on to the next script.
My app does not behave the same after installing vs restarting. Installing is a lot longer.
Might have a good idea using TestedApp. "kill" or ."Restart" with iOS