ios - How to check valid URL schema in iPhone? -
I have a project in which I have to open an app from within another app. I am able to open another app through the URL schema, but now I have to add another functionality, if the other app is not installed in the mobile app, then the user should be redirected to that app's appstore link. The above code opens to another app, but how can I check whether the app is installed in the phone or not, so that I can redirect the user to another app's AppStore link. It is not installed. However, how do I open the appstore from within the app, but the problem is that how the app is installed or not. The app store has the URL to open the app: itms: //itunes.apple.com/in/app/otherApp/id134567414? Mt = 8 Yes, it's really easy to use: NSString * appLink = @ "Other app: //"; [[UIApplication shared application] Opener: [NSL URL URL Authorization: App Link]];
NSString * appLink = @ "Other app: //"; If ([[UIApplication is shared applicant] canOpenURL: [NSURL URLWithString: app link]]) {[UIApplication shared application] Opal: [NSL URL URL string: app link]]; } Other {[UIApplication shared application] Opal: [ns URL @ "it's: //itunes.apple.com/in/app/otherApp/id134567414?mt = 8"]]; }
Comments
Post a Comment