Today Bo Master has a jump AppStore scoring needs, encountered some difficulties, here and we share, hope to progress together.
Jump to AppStore allows users to rate our applications in two ways, one is to jump out of the app, go to AppStore, and score. The other is to score within the app, built-in AppStore.
Ps:appleid Create an app in https://itunesconnect.apple.com to get it in the app interface
1. Jump out of the app, go to AppStore, and score
If it's a 7.0-old system,
NSString *str = [NSString stringwithformat:@ "itms-apps://ax.itunes.apple.com/webobjects/mzstore.woa/wa/ Viewcontentsuserreviews?type=purple+software&id=xxxxxx "];
[[UIApplication sharedapplication] openurl:[nsurl Urlwithstring:str]];
If it's a system after 7.0,
NSString *str = [NSString stringwithformat:@ "Itms-apps://itunes.apple.com/app/idxxxxxxx"];
[[UIApplication sharedapplication] openurl:[nsurl Urlwithstring:str]];
2. Within the application, the built-in AppStore is rated
Apple provides a framework storekit.framework, import storekit.framework, Add a header file to the controller that needs to jump #import <storekit/ Storekit.h> Implement proxy methods:< skstoreproductviewcontrollerdelegate >
Custom Methods
-(void) Loadappstorecontroller
{
Initializing the Controller
Skstoreproductviewcontroller *storeproductviewcontorller = [[Skstoreproductviewcontroller alloc] init];
Sets the proxy request for the current controller itself
Storeproductviewcontorller. Delegate = self ;
[Storeproductviewcontorller Loadproductwithparameters:@{skstoreproductparameteritunesitemidentifier:kappid} completionblock:^ (BOOL result, nserror *error) {
if (Error)
{
NSLog (@ "error%@ with UserInfo%@", Error,[error UserInfo]);
} Else
{
Modal Eject AppStore
[self presentviewcontroller:storeproductviewcontorller animated:YES completion:^{
}];
}
}];
}
AppStore Cancel button Monitoring
-(void) Productviewcontrollerdidfinish: (skstoreproductviewcontroller *) Viewcontroller
{
[self dismissviewcontrolleranimated:YES completion:^{
}];
}
iOS Learning note 6-Jump AppStore ratings