Appium throws error while launching Safari Launcher with both APP path and BundleId (Appium 1.5.3 with Real IOS device using Python Web client)

Hi, i am new user to Appium.
I am trying to launch Safari Launcher App on Real ios device for automating a few test cases on Safari browser. And am using Python web client as my web server.

I am facing two problems :

  1. If I try to launch the app using the path of the IPA file . i get the following error :
Traceback (most recent call last):

  File "myTests.py", line 22, in <module>
    driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps) 
  File "build/bdist.macosx-10.12-intel/egg/appium/webdriver/webdriver.py", line 36, in __init__
  File "/Library/Python/2.7/site-packages/selenium-3.0.2-py2.7.egg/selenium/webdriver/remote/webdriver.py", line 92, in __init__
    self.start_session(desired_capabilities, browser_profile)
  File "/Library/Python/2.7/site-packages/selenium-3.0.2-py2.7.egg/selenium/webdriver/remote/webdriver.py", line 179, in start_session
    response = self.execute(Command.NEW_SESSION, capabilities)
  File "/Library/Python/2.7/site-packages/selenium-3.0.2-py2.7.egg/selenium/webdriver/remote/webdriver.py", line 236, in execute
    self.error_handler.check_response(response)
  File "/Library/Python/2.7/site-packages/selenium-3.0.2-py2.7.egg/selenium/webdriver/remote/errorhandler.py", line 192, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Bad app: /Users/hcltech/Desktop/SafariLauncher/SafariLauncher.ipa . App paths need to be absolute, or relative to the appium server install dir, or a URL to compressed file, or a special app name.

  1. Next I tried using bundleId. But here also I face a different issue :
[debug] [iOS] Running ios real device reset flow
[debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[debug] [iOSLog] Found idevicesyslog: '/usr/local/bin/idevicesyslog'
[debug] [iOS] Creating iDevice object with udid 6d5475f7601ccecc10edf30e89acd228a4f5b3cf
[debug] [iOS] App is not installed. Will try to install.
[MJSONWP] Encountered internal error running command: Error: Installing amc.bundle failed
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/node-idevice/main.js:159:6 at ChildProcess.exithandler (child_process.js:193:7)at emitTwo (events.js:100:13)
    at ChildProcess.emit (events.js:185:7)
    at maybeClose (internal/child_process.js:850:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)_


The app Safari Launcher gets installed and launched fine on my iPhone device if I do a build from XCode. But using the IPA file through Appium, I face these issues. I have tried using both .IPA file and .APP file.

Below is the code for my Python web client capabilities :


desired_caps={}
desired_caps = {}
desired_caps['platformName'] = 'iOS'
desired_caps['platformVersion'] = '9.2.1'
desired_caps['deviceName'] = 'iPhone Device'
desired_caps['bundleId'] = 'amc.bundle'
desired_caps['udid'] = '6d5475f7601ccecc10edf30e89acd228a4f5b3cf'  

I have also tried different other options, like the following :

#desired_caps['app'] = PATH('/Users/hcltech/Desktop/some.ipa')
#desired_caps['app'] = "/Users/hcltech/Library/Developer/Xcode/DerivedData/SafariLauncher-dunhycrvqbkxawdlkvctndbcluut/Build/Products/Debug-iphoneos/SafariLauncher.app"
#desired_caps['app'] = 'Users/hcltech/Desktop/SafariLauncher.app'
#desired_caps['app'] = "/Users/hcltech/Desktop/SafariLauncher/SafariLauncher.ipa"

Nothing works !!! Help !!!