Remove app from background in IOS

Is there a way to put and app in background and than remove it from background before opening it again.
Both for Android/IOS

1 Like


what you mean by “remove it from background”. You mean remove it from the recent apps? Wont force stop be enough for what you want to accomplish?

Yes, You understood the question correctly.
But After removing from the recent apps , i want to open it again with the same page where it has been force stopped.

But that’s something your app does? If you go to some view and then kill the app and tap on your app icon on background, does it open on the view you were?

Actually when I put app in Background using driver. Close app() and to open I use driver. LaunchApp() it’s getting started from the initial state just like clear app data in Android.
When I use driver.runappinbackground() it just minimise the app and reopens from the last active state.
But in my app it needs to be in Background then needs to be removed from background and then it should be reopened to achieve the desired result.

If when you close app and launch it it clears date then you missing the no reset capability:

capabilities.setCapability(MobileCapabilityType.NO_RESET, true);

My question to you, was, when you do that test manually. Does it open on where it was before app was killed?

Yeah… It’s opening to same state when done manually.
Yeah… No reset capability helps… Thanks…
However, is there any other way around like any appium Api that removes app from background?
And will it be possible to just minimise the app… Not close…

use command:


and then use adb to force stop app:

Hey Thanks Telmo,

My Issue is resolved now.
Thanks for your help

Hi Harsh,

I am experiencing the exact same problem. I have read the comments however I am unable to make it work. Can you please provide me the steps.