Direct “rate in iTunes” link in my app?

前端 未结 5 1373
星月不相逢
星月不相逢 2020-11-27 09:44

I\'ve seen posts here on Stackoverflow that describe how to allow users to be directed to apps on the app store.

Is there a way to link directly to the

5条回答
  •  死守一世寂寞
    2020-11-27 10:21

    This IS possible using the technique described on this blog:

    http://www.memention.com/blog/2009/09/03/Open-Reviews.html

    basically you call UIApplication openURL with the following:

    NSString* url = [NSString stringWithFormat: @"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%@", myAppID];
    [[UIApplication sharedApplication] openURL: [NSURL URLWithString: url]];
    

    To get your app ID before your app is available in the app store, use iTunesConnect to define your new app - give it a name, description, icon, screenshots, etc. Once defined, you can get the Apple ID from the Identifiers section for the app.

    EDIT:

    Here is a secondary url/method that works:

    NSString* url = [NSString stringWithFormat:  @"http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=%@&pageNumber=0&sortOrdering=1&type=Purple+Software&mt=8", appid];
    
    [[UIApplication sharedApplication] openURL: [NSURL URLWithString: url ]];
    

    I believe the difference between the two is that the first technique (itms-apps://) will launch the App Store app directly while the second one (http://) will launch it indirectly via a redirect resulting from the http web URL. This would have to be confirmed; this is only my recollection.

提交回复
热议问题