xcode - 'Install App' AppStoreView like the Facebook App for iOS has it -
i want know if there known possibility add such 'appstoreinstallview' app can, without using sharedapplication open appstore, ask user install new app. people don't know how works:
1:you see 'ad' , click on bottom install-now button (it says 'jetzt installieren' (this german screenshot))
2:a view slides in , opens appstore page of shown app
3:to install app need press install, native appstore app, asked enter password , proceeds download app.
i tried webview, didn't work, either won't load webpage or redirect me (via sharedapplication suppose) native appstore app.
so know how implement such feature in own app?
you'll want use skstoreproductviewcontroller
.
there's excellent reference here, essentials will
from article, can use code:
- (ibaction)showstoreview:(id)sender { skstoreproductviewcontroller *storeviewcontroller = [[skstoreproductviewcontroller alloc] init]; storeviewcontroller.delegate = self; nsdictionary *parameters = @{skstoreproductparameteritunesitemidentifier: [nsnumber numberwithinteger:333700869]}; [storeviewcontroller loadproductwithparameters:parameters completionblock:^(bool result, nserror *error) { if (result) [self presentviewcontroller:storeviewcontroller animated:yes completion:nil]; }]; }
replacing [nsnumber numberwithinteger:xxxxxxxxx]
product id of app or music or book or whatever. view controller automatically adjust kind if product trying sell.
Comments
Post a Comment