How to check whether iOS app already installed or not?
Verifies whether the application with given bundle identifier is installed on the device. Returns true or false. bundleId: The bundle identifier of the application, which is going to be verified. Mandatory argument. Simply use this method. Provide your bundleId as an argument and it will give you “true” if the application is already installed else “false”.
Code Snippet:
private boolean isMyAppInstalled(String bundleId) { Mapparams = new HashMap<>(); params.put("bundleId", bundleId); return (Boolean) driver.executeScript("mobile: isAppInstalled", params); }