2016-12-19 42 views
0

我有一個trackId 534438314.我正在使用iTunes api獲取有關此應用程序的信息。但我無法找到應用程序的詳細信息。下面是我曾嘗試:無法使用iTunes api找到應用程序

  1. 我嘗試使用iTunes的API,沒有任何多餘的PARAM

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

它給0結果

  • 我知道這個應用程序在日本商店有售,所以我添加了國家參數,並嘗試了以下網址
  • https://itunes.apple.com/lookup?id=534438314&country=jp

    它給0結果

  • 我使用bundleId有和沒有國家PARAM也嘗試。這兩種情況都給出了0個結果。
  • https://itunes.apple.com/lookup?bundleId=net.appbank.maobank

    我堅持這一點,並不能進一步進行。任何幫助將非常感激。提前致謝。

    +0

    試試這個https://itunes.apple。 COM /中/應用程序/ YourAppName/id534438314?MT = 8。可能會根據日本 – PiyushRathi

    +0

    更改'感謝您的及時回覆。這是iTunes應用程序本身的URL。但我只想訪問該應用的iTunes API –

    回答

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

    當你得到適當的鏈接,然後使用鏈接來打開應用

    相關問題