我在用着SKStoreProductViewController
实现“更多应用程序”功能,但是当我点击列表中的产品时,我只看到空白屏幕,控制台中还有警告:
无法请求视图控制器:错误域=_UIViewServiceInterfaceErrorDomain代码=2“操作无法完成。(_UIViewServiceInterfaceErrorDomain错误2。)”
这种情况仅发生在 ios 7 上,在 ios 6 中它只是重定向到应用程序商店,这是我的代码:
SKStoreProductViewController *productVC = [[SKStoreProductViewController alloc] init];
productVC.delegate = self;
NSDictionary *productParameters = @{ SKStoreProductParameterITunesItemIdentifier : <itunes developer ID>};
[productVC loadProductWithParameters:productParameters completionBlock:^(BOOL result, NSError *error) {
if(error)
{
[[UIAlertView alloc] initWithTitle:[error localizedDescription]
message:nil
delegate:nil
cancelButtonTitle:@"Ok"
otherButtonTitles:nil, nil] show];
}
if (result )
{
[self presentViewController:productVC animated:NO completion:nil];
}
}];
我认为这是 ios 7 购买,非常感谢任何帮助
这是 iOS 7 中的一个错误。请参阅https://devforums.apple.com/message/951745 https://devforums.apple.com/message/951745(需要 Apple 开发人员登录)Apple 员工确认“SKSPVC 目前不支持此功能。目前仅支持显示单个产品。”
非常烦人,因为这曾经非常有效,并且是公司向用户展示其其他应用程序的好方法。回到绘图板!
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)