I'm developing a new app in Swift and I want to hook up Instagram to my app. I found the iPhone hook up for Instagram but it's in objective C.
Can anyone help me in converting it to swift?
Here is the code:
NSURL *instagramURL = [NSURL URLWithString:@"instagram://location?id=1"];
if ([[UIApplication sharedApplication] canOpenURL:instagramURL]) {
[[UIApplication sharedApplication] openURL:instagramURL];
}
You have to do in swift like as follows