Search code examples
appiumappium-ios

Can i automate the ios app which is installed from app store?


I want to automate the iOS app using the appium tool in real revice. I have installed the app from app store. So how can I launch the app in real device. SO can I automate app's Sign in/Sign up features using appium?

I have added dependencies like

cap.setCapability("platformName", "iOS");
cap.setCapability("platformVersion", "11.4");
cap.setCapability("deviceName", "iPhone 8");
cap.setCapability("UDID", "hsgd57576s5dfsdf7s56d7f5s");
cap.setCapability("app", “appname.app“);  

The app is not launching in the real device.


Solution

  • You're using wrong Desired Capability

    app - The absolute local path or remote http URL to a .ipa file (IOS), .app folder (IOS Simulator), .apk file (Android) or .apks file (Android App Bundle), or a .zip file containing one of these (for .app, the .app folder must be the root of the zip file). Appium will attempt to install this app binary on the appropriate device first. Note that this capability is not required for Android if you specify appPackage and appActivity capabilities (see below). Incompatible with browserName. See here about .apks file.

    For automating iOS application no matter of origin you need to pass bundleId instead

    bundleId - Bundle ID of the app under test. Useful for starting an app on a real device or for using other caps which require the bundle ID during test startup. To run a test on a real device using the bundle ID, you may omit the 'app' capability, but you must provide 'udid'.

    Also make sure to follow instructions from the Appium XCUITest Driver Real Device Setup as you will need to set up provisioning profile for the WebDriverAgent-Runner application in order to be able to deploy it onto real iOS device. If you're not too familiar with provisioning profiles and code signing I would recommend considering using Appium Studio which provides a GUI wizard allowing setting up Apple developer account and properly configuring code signing for running Appium tests on real iOS devices.