プロダクト情報の取得
プロダクト情報取得処理呼び出し
SKProductsRequest *skrequest =
[[SKProductsRequest alloc] initWithProductIdentifiers:[NSSet setWithArray:プロダクトID群を含んだ配列]];
skrequest.delegate = self;
[skrequest start];
デリゲートされるメソッド
こんな風な中身にしたらいいんじゃないでしょうか
-(void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response { NSLog(@"============================================================="); NSLog(@"SKProduct Infomation : %@", [response products]); NSMutableArray *products = [[[NSMutableArray alloc] init] autorelease]; for( int i=0; i< [[response products] count]; i++ ){ NSDictionary *d = [NSDictionary dictionaryWithObject:[((SKProduct *)[[response products] objectAtIndex:i]) price] forKey:[((SKProduct *)[[response products] objectAtIndex:i]) productIdentifier] ]; [products addObject:d]; NSLog(@"PRODUCT INFO : %@", [[response products] objectAtIndex:i]); NSLog(@"PRODUCT ID : %@", [((SKProduct *)[[response products] objectAtIndex:i]) productIdentifier]); NSLog(@"PRODUCT PRICE : %@", [((SKProduct *)[[response products] objectAtIndex:i]) price]); NSLog(@"NSDict : %@", d); NSLog(@"PRODUCTS : %@", products); } NSLog(@"============================================================="); }