企业账号下载App总是提示:找不到您输入的AppleID,或者您的密码不正确。请再试一次。

来源:互联网 发布:融资租赁软件系统 编辑:程序博客网 时间:2024/04/30 06:59

使用StoreKit—SKStoreProductViewController 应用内部打开App Store下载的方式

- (void)showStoreProductInApp:(NSString *)appID{  

      

    Class isAllow = NSClassFromString(@"SKStoreProductViewController");  

      

    if (isAllow != nil) {  

          

        SKStoreProductViewController *sKStoreProductViewController = [[SKStoreProductViewController alloc] init];  

        [sKStoreProductViewController.view setFrame:CGRectMake(0, 200, 320, 200)];  

        [sKStoreProductViewController setDelegate:self];  

        [sKStoreProductViewController loadProductWithParameters:@{SKStoreProductParameterITunesItemIdentifier: appID}  

                                                completionBlock:^(BOOL result, NSError *error) {  

                                                    if (result) {  

                                                        [self presentViewController:sKStoreProductViewController  

                                                                           animated:YES  

                                                                         completion:nil];  

                                                        [self removeNotice];  

  

                                                    }else{  

                                                        NSLog(@"error:%@",error);  

                                                    }  

                                                }];  

    }else{  

        //低于iOS6的系统版本没有这个类,不支持这个功能  

        NSString *string = [NSString stringWithFormat:@"itms-apps://itunes.apple.com/xxxxxxx/app/id%@?mt=8",appID];  

        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:string]];  

    }  

}


虽然能跳转至评论下载页面,但是该页面无法登录AppleID,也就是说还是无法下载!!!
蛋疼!!!
还没解决。。。

0 0
原创粉丝点击