Jump to App on AppStore page
[[UIApplication sharedapplication] openurl:[nsurl urlwithstring:[nsstring stringwithformat:@ "itms-apps:// itunes.apple.com/app/id%@ ", Kpopolookappleid]];
Jump to ratings
NSString *str = [NSString stringwithformat:@ "itms-apps://itunes.apple.com/webobjects/mzstore.woa/wa/ viewcontentsuserreviews?type=purple+software&id=%@ ", Kpopolookappleid];
Nsurl * url = [Nsurl urlwithstring:str];
[[UIApplication sharedapplication] openurl:url];
Built-in AppStore no need to jump open AppStore
Need to import #import <StoreKit/StoreKit.h>
Implementing Proxy Skstoreproductviewcontrollerdelegate
Initializing the Controller
Skstoreproductviewcontroller * STOREPRODUCTVC = [[Skstoreproductviewcontroller alloc] init];
Set up Proxy
Storeproductvc.delegate = self;
Load a new view
[STOREPRODUCTVC Loadproductwithparameters:@{skstoreproductparameterprovidertoken:kpopolookappleid} completionblock:^ (BOOL result, Nserror * _nullable error) {
Block callback
if (Error) {
NSLog (@ "-=-=-=-=-=-=-=-==-=-==%@", error.userinfo);
}else {
Modal out AppStore
[Self PRESENTVIEWCONTROLLER:STOREPRODUCTVC animated:yes completion:nil];
}
}];
Proxy method-Called when the operation is complete
-(void) Productviewcontrollerdidfinish: (Skstoreproductviewcontroller *) Viewcontroller {
[Self dismissviewcontrolleranimated:yes completion:nil];
}
three different types. Need to work with itunes
//
Skstoreproductparameteritunesitemidentifier is the AppID that wants to show the app, and the value associated with the key is a nsnumber type. Support for iOS6 later system versions.
//
Skstoreproductparameteraffiliatetoken is a secondary token, and the value associated with the key is the NSString type. For example, the ID of the app in ibook, which is newly added in IOS8, supports the later system version of IOS8.
//
Skstoreproductparametercampaigntoken is a mixed token, the key associated with the value is a 40byte nsstring type, using this token, you can see the click and Sell Data report. Support for iOS8 later system versions.
Skstoreproductparameterprovidertoken the value associated with this key is the NSString type Analysis Provider token (nsstring) 8.3
Skstoreproductparameteradvertisingpartnertoken the value associated with this key is the NSString type AD partner token (nsstring) 9.3
IOS jump to App Store to download or review