iPhone sdk - open app store to specific app?

后端 未结 6 609
鱼传尺愫
鱼传尺愫 2020-12-16 10:32

Is there a way to open the app store to a specific application? I tried using something like the following:

[[UIApplication sharedApplication] openURL: [NSUR         


        
相关标签:
6条回答
  • 2020-12-16 11:02

    You can open app without opening safari

    NSString *appId = @"you appid"; //like 999999999
    NSString *link = [@"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=" stringByAppendingString:appId];
    
    [[UIApplication sharedApplication] openURL: [NSURL URLWithString:link]];
    
    0 讨论(0)
  • 2020-12-16 11:03

    Starting from iOS 6 right way to go is using SKStoreProductViewController class.

    Code is here: https://stackoverflow.com/a/32008404/1151916

    0 讨论(0)
  • 2020-12-16 11:04

    Apparently this issue only affects the simulator. A build an go on the device works perfect.

    0 讨论(0)
  • 2020-12-16 11:04

    Use http://itunes.com/app/YourAppNameWithoutSpaces

    See also this.

    0 讨论(0)
  • 2020-12-16 11:12

    Another simple way is:

    [[UIApplication sharedApplication] openURL: [NSURL URLWithString:@"itms-apps://itunes.com/app/YourAppNameWithoutSpaces"]];
    

    This is very clean

    0 讨论(0)
  • 2020-12-16 11:20

    Replace iTunesLink with your App URL.

     NSString *iTunesLink = @"https://itunes.apple.com/us/app/digital-speedometer-pro/id1021728349?mt=8";
    
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:iTunesLink]];
    
    0 讨论(0)
提交回复
热议问题