Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

app can't be installed with SKStoreProductViewController

With codes below SKStoreProductViewController can present descriptions of an app.

When I touch the "free" button it shows "install app". Then I touch "install app", a progress bar shows inside the app icon. However the progress bar disappear in 2-3 seconds and the app remain uninstalled.

It's my demo app. Does anyone know the reason?

SKStoreProductViewController *skvc = [[SKStoreProductViewController new] autorelease];
skvc.delegate = self;
NSDictionary *dict = [NSDictionary dictionaryWithObject:@"425349261" forKey:SKStoreProductParameterITunesItemIdentifier];
[skvc loadProductWithParameters:dict completionBlock:nil];
[self presentViewController:skvc animated:YES completion:nil];
like image 301
enzoyang Avatar asked Oct 22 '12 02:10

enzoyang


1 Answers

The problem ist that you don't really connect to the Itunes store instead it's the special sandbox store environment. I had the same problem and you need to have a test account and do the purchases with that one instead of your normal itunes account.

It's all described here:

http://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/StoreKitGuide/DevelopingwithStoreKit/DevelopingwithStoreKit.html

like image 143
Caro Avatar answered Nov 15 '22 16:11

Caro