Reset option for iOS physical devices

Can an ios app on physical device be reset through the resetApp() method?
An android app gets reset using the resetApp method but not an iOS app on physical device

Reset on iOS physical devices is difficult. You could add a button in your app that resets. Another idea is to automate the install/uninstall using ios-deploy or similar software.

At the moment i am implementing Install/Uninstall which i guess uses fruitstrap,And works fine for now.

Sorry to bump and old thread.
I’m trying to do something similar.
I have something like this:

	$ios_real_device="hey"
		unless $ios_real_device.nil? #Checks the global value to see if we are on a real iOS device.
			bundle_id="com.blackboard.student"
			ios_app_for_device=	"./apps/Bb Student_device.app"
			system "./bin/uninstall_bbstudent.sh"
			system "./bin/install_bbstudent.sh"
			sleep 2
			background_app (3)
		end             

I’m expecting background_app to relaunch the app and have my tests start.
The shell scripts reference ideviceinstaller commands that run successfully.

However, I’m getting these errors below after background_app above.
The background_app command by itself above in arc works fine.

Any thoughts welcome.
Thanks!
Eric

Install - Complete
  (Selenium::WebDriver::Error::NoSuchDriverError)
 /Users/esherman/.rvm/gems/ruby-2.1.2/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/response.rb:52:in `assert_ok'
 /Users/esherman/.rvm/gems/ruby-2.1.2/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/response.rb:15:in `initialize'
 /Users/esherman/.rvm/gems/ruby-2.1.2/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/http/common.rb:59:in `new'
 /Users/esherman/.rvm/gems/ruby-2.1.2/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/http/common.rb:59:in `create_response'
 /Users/esherman/.rvm/gems/ruby-2.1.2/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/http/default.rb:66:in `request'
 /Users/esherman/.rvm/gems/ruby-2.1.2/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/http/common.rb:40:in `call'
 /Users/esherman/.rvm/gems/ruby-2.1.2/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/bridge.rb:640:in `raw_execute'
 /Users/esherman/.rvm/gems/ruby-2.1.2/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/bridge.rb:618:in `execute'
 /Users/esherman/.rvm/gems/ruby-2.1.2/gems/appium_lib-4.1.0/lib/appium_lib/device/device.rb:143:in `background_app'
 /Users/esherman/.rvm/gems/ruby-2.1.2/gems/appium_lib-4.1.0/lib/appium_lib/driver.rb:212:in `rescue in block (4 levels) in promote_appium_methods'
 /Users/esherman/.rvm/gems/ruby-2.1.2/gems/appium_lib-4.1.0/lib/appium_lib/driver.rb:204:in `block (4 levels) in promote_appium_methods'
 /Users/esherman/Documents/git_stash_qa_automation.d/qa-automation/appium-student.d/features/common/support/hooks.rb:21:in `Before'

I figured this out.
I forgot to re-add this:
$driver.start_driver

No need to respond :slight_smile:

1 Like