I am developing an iPhone application which will install few third party applications in an enterprise. I have the information about the bundle IDs. Is there a way to check if the application is already installed, using some system APIs? Currently the application gets installed again, overwriting the current installation. I need to prevent this some how. (Apple's AppStore application disables the installation option if the app is already installed.)
Step 1: Open https://play.google.com/store in your web browser. Step 2: Type the name of the app in the search bar to look for the app.
Call the method isPackageInstalled() : boolean isAppInstalled = isPackageInstalled("com. android. app" , this.
Use isApplicationInstalled() method in Appium or application:find Perfecto command in RWD to determine if your application is installed. To check if an application is currently installed on the device, use the isApplicationInstalled method.
I think this is not possible directly, but if the apps register uri schemes you could test for that.
A URI scheme is for example fb://
for the facebook app. You can register that in the info.plist of your app. [UIApplication canOpenURL:url]
will tell you if a certain url will or will not open. So testing if fb://
will open, will indicate that there is an app installed which registered fb://
- which is a good hint for the facebook app.
// check whether facebook is (likely to be) installed or not if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"fb://"]]) { // Safe to launch the facebook app [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"fb://profile/200538917420"]]; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With