【发布时间】:2016-08-06 11:32:42
【问题描述】:
-
大家好,我想通过单击按钮打开 Instagram 应用程序,但我没有 我也可以在 plist 中将 Url 方案设置为 instagram
NSString *instagramURL = @"instagram://app"; NSURL *ourURL = [NSURLURLWithString:instagramURL]; if ([[UIApplication sharedApplication]canOpenURL:ourURL]) { [[UIApplication sharedApplication]openURL:ourURL]; } else { //The App is not installed. It must be installed from iTunes code. NSString *iTunesLink = @"//Some other Url goes here"; [[UIApplication sharedApplication] openURL:[NSURL URLWithString:iTunesLink]]; UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"URL error" message:[NSString stringWithFormat: @"No custom URL defined for %@", ourURL] delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil]; [alert show];我确实喜欢这个,但应用程序没有打开对 iOS 来说是新的任何帮助都可以 赞赏
【问题讨论】:
-
请回答这个问题,我无法打开instagram。 NSURL *instagramURL = [NSURL URLWithString:[NSString stringWithFormat:@"instagram://library?AssetPath=%@&InstagramCaption=%@",[[assetURL absoluteString] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding],caption]];