0
我试图从UIAlertView在appstore中打开一个应用程序,当otherButtonTitle。问题没有发生。通过itms-apps打开appstore
我检查了其他按钮时按下,如果此方法被调用,它是。我猜测问题在于openURL。 appId包含没有任何whiteSpace的应用的名称,如“youtube”。链接怎么没有打开?我试过在寻找其他线程,这是一个应该在AppStore的
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex: (NSInteger)buttonIndex
{
if (buttonIndex == 1)
{
NSString *appId = [[otherArray objectAtIndex:currentRow] objectForKey:@"link"];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat: @"itms-apps://itunes.apple.com/app/%@?mt=8", appId]]];
}
}
选中此链接(https://developer.apple.com/library/ios/qa/qa1633/_index.html) – Pawan