Unable to switch between my app and iOS default app(Settings)

I need to automate an App which has two environment(stagging and Prod) in iOS. I have to change the environment of the app from Settings app. I am trying to automate the above scenario but I am not able to Switch from my app to settings app.
Please tell me how to switch between apps in iOS

Thanks,
Karthik

iOS does not allow to switch app’s. In iOS you can only work on app for which you created appium session.

But in android it is possible.

Thanks Amit,
Yes, we can switch in android using startActivity method. However, I want to do that in iOS.
Does Appium have any solution for this or in the future?

no i guess, because it is limitation of underlying framework, due to restrictions by apple.

Found a solution

We have to set noReset field value as true in Desired Capability. This will not
allow the simulator to close when we call driver quit. So all the settings will
remain same for our next new driver.
Note: It can not be used for parallel access of two apps, but serial

  1. Add noReset in DC like desiredCapability(“noReset”,“true”);
  2. create a driver with your app in Desired Capability. This will install your app in simulator.
  3. quit driver
  4. create new driver with Settings app in Desired Capability. and do the changes you want using script.
  5. Quit driver
  6. create new driver with your app and start working

Can you pls send the capability for Setting app . I have tried to launch the App Store app in real device but got the following error
Target failed to run: Permission to debug com.apple.AppStore was denied. The app must be signed with a development identity (e.g. iOS Developer).