我有一个trackId 534438314.我正在使用iTunes api获取有关此应用的信息。但我无法找到应用程序的详细信息。以下是我的尝试:
我尝试使用iTunes api而没有任何额外的参数
它给出0结果
https://itunes.apple.com/lookup?id=534438314&country=jp
它给出0结果
https://itunes.apple.com/lookup?bundleId=net.appbank.maobank
我对此感到困惑,无法继续前进。任何帮助将非常感激。提前谢谢。
答案 0 :(得分:0)
*首先使用SKStoreProductViewController类获取正确的链接。**
static NSInteger const kAppITunesItemIdentifier = 534438314;
[self openStoreProductViewControllerWithITunesItemIdentifier:kAppITunesItemIdentifier];
- (void)openStoreProductViewControllerWithITunesItemIdentifier:(NSInteger)iTunesItemIdentifier {
SKStoreProductViewController *storeViewController = [[SKStoreProductViewController alloc] init];
storeViewController.delegate = self;
NSNumber *identifier = [NSNumber numberWithInteger:iTunesItemIdentifier];
NSDictionary *parameters = @{ SKStoreProductParameterITunesItemIdentifier:identifier };
UIViewController *viewController = self.window.rootViewController;
[storeViewController loadProductWithParameters:parameters
completionBlock:^(BOOL result, NSError *error) {
if (result)
[viewController presentViewController:storeViewController
animated:YES
completion:nil];
else NSLog(@"SKStoreProductViewController: %@", error);
}];
[storeViewController release];
}
#pragma mark - SKStoreProductViewControllerDelegate
- (void)productViewControllerDidFinish:(SKStoreProductViewController *)viewController {
[viewController dismissViewControllerAnimated:YES completion:nil];
}
获得正确的链接后,请使用该链接打开您的应用