问题
I have to provide a link in my app where the user touches on it it will take me to the itunes Appstore page of my application where the user can rate the Application. I think other apps try to access the Appstore Application in the device and pass the corresponding url of the application in itunes... How to do this? Any ideas...
回答1:
Here's my method; this goes straight to the App Store and to the Review/Rate page for my app:
- (IBAction)rateGame {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=409954448"]];
}
Just change the id at the end (409954448) to the id for your app. Also, if you track the launch count or something, you can trigger this method after, say 12 launches to increase ratings. I added this in my update and in about 2 weeks it generated 5 ratings. Very useful.
回答2:
NSURL* urlToMyApp = @"http://url.to.my/app/in/the/app/store";
[[UIApplication sharedApplication] openURL:urlToMyApp];
回答3:
You can also use,
See link below, It will redirect you on app store app details page. StoreKit.framework not needed.
http://www.brianjcoleman.com/tutorial-how-to-add-write-a-review-rate-us-feature-to-your-app/
Notes :
If iOS >= 7 use, [[UIApplication sharedApplication]openURL:[NSURL URLWithString:[NSString stringWithFormat:@"itms-apps://itunes.apple.com/app/idYOUR_APP_ID"]]];
This will not work on simulator so don't test on Simulator :-)
来源:https://stackoverflow.com/questions/4838674/rate-my-application-in-itunes-within-my-application-in-iphone