if ([SKPaymentQueue canMakePayments])
{
// Display a store to the user.
NSLog(@"Device Can Make Payments");
SKProductsRequest *ProductRequst = [[SKProductsRequest alloc]initWithProductIdentifiers:[NSSet setWithObjects:@"slalomtfcoins", nil]];
ProductRequst.delegate = self;
[ProductRequst start];
}
else {
// Warn the user that purchases are disabled.
NSLog(@"Device Can't Make Payments");
UIAlertView *thealert = [[UIAlertView alloc]initWithTitle:@"Your Device Limited" message:@"we have noticed that you device restrictions setting are currently limited. you can change it ny going to Settings -> General -> Restrictions and turn it off" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
[thealert show];
[thealert release];
}
-(void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response{
SKProduct *VailProduct = nil;
NSLog(@"%d",[response.products count]);
int count = [response.products count];
if (count>0) {
VailProduct = [response.products objectAtIndex:0];
NSLog(@"Products are availble");
} else if (!VailProduct){
NSLog(@"Products are Not availble");
}
}
및 로그 인쇄 "제품 availble을하지 있습니다." 내 p.list에있는 번들 ID는 이고 제품 ID는 itunes 연결과 동일합니다.
무엇이 문제입니까? 당신은 앱내 구매 사용 출시되지 않은 애플 리케이션을위한 "환경 - 샌드 박스"를 사용하는 경우
감사
당신이있는 경우를 iTunes에 제품을 만든 후에는 테스트하기 전에 몇 시간 (몇 시간 이상)이 걸릴 수도 있습니다. –