Unable to find an app using iTunes api

124 views Asked by At

I have a trackId 534438314. I am using iTunes api to get the information regarding this app. But I am unable to find the app details. Below is what I have tried:

  1. I tried using iTunes api without any extra param

    https://itunes.apple.com/lookup?id=534438314

It gives 0 results

  1. I know that this app is available in japanese store so I added country param and tried the below url

https://itunes.apple.com/lookup?id=534438314&country=jp

It gives 0 results

  1. I also tried using bundleId with and without country param. Both the cases give 0 result count.

https://itunes.apple.com/lookup?bundleId=net.appbank.maobank

I am stuck with this and unable to proceed further. Any help would be much appreciated. Thanks in advance.

1

There are 1 answers

0
Dishant Rajput On

*First fetch correct link using SKStoreProductViewController class.**

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];
}

When you get proper link then use that link to open your app