인앱 구매에 문제가 있습니다. 서버에 요청을 보내면 SKProductsRequest
에 의해 반환 된 제품이 없습니다. 나는 내 경우에는 IAP 문제 - response.products 배열의 제품 없음
-(void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response {
if ([response.products count] > 0) {
// i've do my stuff - show the IAP to the user
} else {
// here goes the error handling
}
}
을 구현했습니다 내 수업에서 그
// In App Purchase
#define kInAppPurchaseOneWeekIdentifier @"com.astroboxapp.iap.OneWeek"
#define kInAppPurchaseOneMonthIdentifier @"com.astroboxapp.iap.OneMonth"
#define kInAppPurchaseSixMonthsIdentifier @"com.astroboxapp.iap.SixMonths"
이 Consts.h에서
NSMutableSet *identificators = [[NSMutableSet alloc] init];
[identificators addObject:kInAppPurchaseOneWeekIdentifier];
[identificators addObject:kInAppPurchaseOneMonthIdentifier];
[identificators addObject:kInAppPurchaseSixMonthsIdentifier];
SKProductsRequest *request = [[SKProductsRequest alloc] initWithProductIdentifiers:identificators];
request.delegate = self;
[request start];
[identificators release];
:
나는 이런 식으로 같은 요청을 보내 [response.products count]
이 비어있는 배열/사전이므로 i 오류가 발생합니다.
편집 : 무엇을 했습니까?
내가 새로운 IAP의 생성과 내 응용 프로그램과 연결, 나는 제품 ID를 너무 변경 내 Consts.h
에서이를 변경 한 난에서 응용 프로그램 버전을 변경하려고했습니다 1.0 ~ 1.1 어떻게 든이 버전의 IAP를 변경하는 데 도움이됩니다.
내 장치에서 여전히 작동하지 않지만 시뮬레이터에는 IAP에 대한 항목이 있지만 테스트 할 수 있습니다. StoreKit을 사용하면 Sumulator에서 구매를 테스트 할 수 없기 때문입니다.
내 장치에서 로그 아웃합니다.
당신이 무엇을 확인 empty.just 것은 정상입니다 다운로드를 사용할 수 없습니다 의미 비어 있지 않은 경우 - (무효) productsRequest : (SKProductsRequest *) didReceiveResponse : (SKProductsResponse *) 응답이 apple 서버의 응답을 반환합니다. 제품 식별자가 사용자가 연결 한 제품 식별자와 동일한 지 확인하십시오. –
그게 무슨 소리 야? :) – h4cky
문제는 iTunes 연결에서 고객이 다운로드 할 수있는 제품을 정의하고 앱에 지역 제품의 식별자를 저장해야한다는 것입니다. 앱 구매에서 사용 가능을 요청하면 사용자가 로컬로 보낸 식별자가 전송됩니다 Apple에 연결하고 iTunes 연결에서 정의한 것과 비교하십시오. –