Thursday, 6 September 2012

Check whether a certain app is installed programmatically in Xcode

UIApplication *currentApp = [UIApplication sharedApplication];
   
    if ([currentApp canOpenURL:[NSURL URLWithString:url]]){
        // do something here
}

To open a particular app:
    NSString *appURL = @"appName://";
    [currentApp openUrl:[NSURL URLWithString:appURL]];

No comments:

Post a Comment