Can we automate iOS native app in real device only using .ipa file?


#1

Can we automate iOS native app in real device without code compilation through Xcode?


#2

Yes. You can install the ipa programmatically on device using Appium script.
Does not need to be build through Xcode every time.


#3

Can you please tell how to do that :smile: Sample code will be helpful.


#4

check .app/.ipa file is build with developer sign and debug enabled app.
if above condition satisfied then below code works fine

File dir = new File(“<<.app/.ipa location>>“);
File app = new File(dir, “app name.app/.ipa”);
AppiumDriver driver;
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(CapabilityType.BROWSER_NAME, “”);
capabilities.setCapability(“autoLaunch”, true);
capabilities.setCapability(CapabilityType.PLATFORM, "MAC“);
capabilities.setCapability(CapabilityType.VERSION, “<>”);
capabilities.setCapability(“deviceName”, “device name”);
capabilities.setCapability(“platformName”, “iOS”);
capabilities.setCapability(“udid”, “UDID of device“);
capabilities.setCapability(“bundleId”, “app bundle id“);
capabilities.setCapability(“showIOSLog”, true);
capabilities.setCapability(“app”, app.getAbsolutePath());
driver = new IOSDriver(new URL(“http://0.0.0.0:4723/wd/hub”), capabilities);

Note:native app without code compilation through Xcode only be tested in real device


#5

Hi, does the app need to have provision profile on the device that I’ll be testing? I can’t add my device to the provisioning profile since I’m using a .ipa file from a vendor and they are delivering it as a blackbox.

Thanks for your help!


#6

Yes, I have the same doubt… Can we install or use the appium without having the ipa file? Can we use the downloaded build from the diawi or app store?? How can we use the downloaded build is there any way to use without ipa file??