Rating items in AppStore (reprint)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.