Jumping to AppStore ratings before ios6.0 is usually straight to AppStore rating
NSString *evaluatestring = [NSString stringwithformat:@ "itms-apps://ax.itunes.apple.com/webobjects/mzstore.woa/wa/ viewcontentsuserreviews?type=purple+software&id=587767923 "];
[[UIApplication sharedapplication] Openurl:[nsurl urlwithstring:evaluatestring]];
Ios6.0,apple added a learning function, when users need to give the app ratings, no longer jump to AppStore, can be implemented within the application to open AppStore, Apple provides a framework storekit.framework, the implementation steps are as follows:
1: Import storekit.framework, add a header file to the controller that needs to jump #import
2: Implement proxy Skstoreproductviewcontrollerdelegate
3:-(void) evaluate{
Initializing the Controller
Skstoreproductviewcontroller *storeproductviewcontorller = [[Skstoreproductviewcontroller alloc] init];
Sets the proxy request for the current controller itself
Storeproductviewcontorller.delegate = self;
Load a new view to show
[Storeproductviewcontorller loadproductwithparameters:
AppID the only
@{skstoreproductparameteritunesitemidentifier: @ "587767923"} completionblock:^ (BOOL result, Nserror *error) {
Block callback
if (Error) {
NSLog (@ "error%@ with UserInfo%@", Error,[error UserInfo]);
}else{
Modal Eject AppStore
[Self Presentviewcontroller:storeproductviewcontorller animated:yes completion:^{
}
];
}
}];
}
Cancel Button Listener
-(void) Productviewcontrollerdidfinish: (Skstoreproductviewcontroller *) viewcontroller{
[Self Dismissviewcontrolleranimated:yes completion:^{
}];
}
It's easy to implement the built-in AppStore scoring feature.
Rating items in AppStore (reprint)