IOS jump to App Store to download or review

Source: Internet
Author: User

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

Related Article

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.