Forum Discussion

slecault's avatar
slecault
Contributor
8 years ago

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;

 

 

9 Replies

  • I did open a support case for this issue.  Support response is:  "It's not possible to restart and/or close iOS apps from TestComplete. This is the limitation of the iOS support."

     

    I have opened a "feature request".

     

    • Marsha_R's avatar
      Marsha_R
      Icon for Champion Level 3 rankChampion Level 3

      Just an FYI, there are some things that TestComplete can't do on iOS not because of the lack of features in TC but because of the limits that iOS has imposed.  

    • slecault's avatar
      slecault
      Contributor

      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;

      • AlexKaras's avatar
        AlexKaras
        Community Hero

        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...