mumble57 mumble57 - 9 months ago 98
iOS Question

How to open VK app from my ios app

I want to open my public page in vk app (if it is installed). How can I manage to do that

Here's the same trick with facebook

- (IBAction)facebook:(id)sender{
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"fb://profile/1425897281000202"]]){
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"fb://profile/1425897281000202"]];
NSURL *url = [NSURL URLWithString:@"fb://profile/1425897281000202"];
[[UIApplication sharedApplication] openURL:url];
else {
[[UIApplication sharedApplication]
openURL:[NSURL URLWithString:@""]];


Ned Ned

Hi it should help you :)

NSURL *url = [[NSURL alloc] initWithString:@"vk://ХХХ"];
[[UIApplication sharedApplication] openURL:url];