Safari not launching after when I open app first

I am automating some tests a real device (iOS) using Appium and Cucumber.
My idea it to do the following steps:

  • Open the app
  • Do some tasks
  • Launch Safari
  • Navigate to a website, lets say for example

My approach is the following:

  • I create the Driver with my app capabilities
  • Do what I need
  • Clear the Driver
  • Create a new driver with Safari capabilities
  • Navigate to

The code looks something like this:, true)
# do what I need on the app
driver.driver_quit, true)
# do what I need on the browser

The problem I am having is that Safari doesn’t launch. Although if I use only one Driver with the browser capabilities it does launch.

Anyone has any idea this is happening? Or maybe a better strategy?

I’m writing ruby but I don’t mind code in other languages.