Appium switching between application on iOS

Hey! I have a scenario where I need to switch from native application to a native web browser .
I am able to do it in android but not iOS. Can someone suggest me on this?

Does your application navigate you directly to browser or you need to go manually ?

No it won’t navigate I will have to start it using command, that’s where I need support.

If you are using appium 1.8, You can write the code similar to this :
HashMap<String, Object> args = new HashMap<>();
args.put(“bundleId”, X_BUNDLE_ID);
driver.executeScript(“mobile: launchApp”, args);

args.put(“bundleId”, BROWSER);
driver.executeScript(“mobile: activateApp”, args);