Ios ------ app jumps to appStore rating, ios jumps to appstore rating
There are two ways to score a jump to the AppStore:
One is to jump out of the application, jump to the AppStore, and score;
The other is built-in AppStore for scoring within the application.
PS: appID in the https://itunesconnect.apple.com to create an application in the application interface to obtain
1. jump out of the application, jump to the AppStore, and score
[[UIApplicationsharedApplication] openURL: [NSURLURLWithString: @ "http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews? Id = APPID & pageNumber = 0 & sortOrdering = 2 & type = Purple + Software & mt = 8 "]; (APPID can be found in itunce)
2. built-in AppStore for rating within the application
Apple provides a framework StoreKit. framework that imports StoreKit. framework and adds the header file # import <StoreKit/StoreKit. h> to the Controller to be redirected. The proxy method is as follows: <SKStorePRoductViewControllerDelegate>
// Custom Method
-(Void) loadAppStoreController
{
// Initialize the Controller
SKStoreProductViewController * storeProductViewContorller = [[SKStoreProductViewControlleralloc] init];
// Set the proxy request to the current controller itself
StoreProductViewContorller. delegate = self;
[StoreProductViewContorllerloadProductWithParameters: @ {SKStoreProductParameterITunesItemIdentifier: kAppId} completionBlock: ^ (BOOLresult, NSError * error ){
If (error ){
NSLog (@ "error % @ with userInfo % @", error, [erroruserInfo]);
} Else {
// Modal pop-up appstore
[SelfpresentViewController: storeProductViewContorlleranimated: YEScompletion: nil];
}
}];
}
// AppStore cancel button listening
-(Void) productViewControllerDidFinish :( SKStoreProductViewController *) viewController
{
[SelfdismissViewControllerAnimated: YEScompletion: nil];
}