Search code examples
iosiphoneselenium-webdriverappiumappium-ios

How to launch already installed app from iPhone using appium


I am writing an automation script using Java + TestNG + Appium.

In a test scenario, I am trying to launch already installed application on iphone. (Box in this case). Box contains some MS office file which I need to access. I am not very sure how can I achieve this.

I tried multiple options such as extracting .app file from iTunes and deploying using Appium, but no success.

Can someone please guide me, if this is possible. If yes, how?


Solution

  • Automate a preinstalled app with following scenario.

    1.This will only work for applications that are signed with a DEVELOPMENT cert.

    2.This will NOT work for applications that are signed with a DISTRIBUTION cert

    3.If you have created the app with a developer provisioning profile, and built yourself. Or downloaded it using testFlight, and is signed with a development provisioning profile

    4.This is because Apple's Instruments will not allow you to interact with those applications which is live. (Even if you knew the bundleId)

    if your app is in development mode please follow these things 1.The bundleId of the app that was installed on the device. Use that as the app capability.

    1. Follow the Appium Real Devices guide (substitute any .ipa/.app reference with the bundleId)

    In addition to your regular desiredCapabilities (ex. platformName, platformVersion, deviceName).. these should be your desiredCapabilities:

    For preinstalled apps

    desiredCaps['app'] = 'yourbindleID'
    

    Device's unique identifier

    desiredCaps['udid'] = '1824y983h2849gh2498'