처음으로 내 ios 게임에 unibill을 사용하고 기기에 앱을 빌드하고 실행하려고 할 때 문제가 발생합니다.unibillStoreKit.mm - 선언되지 않은 식별자 SKPaymentTransactionStateDeferred - unibill 전문가입니까?
SKPaymentTransactionStateDeferred에 대한 선언되지 않은 idenifier가 사용되었다는 메시지가 나타납니다. (unibill 플러그인 소스 코드에서 아무 것도 변경하지 않았습니다.) 그래서 무엇을해야할지 모르겠습니다.
이미지를 게시 할 수 없으므로 아래 코드를 게시하십시오. Pls는 XCODE ISSUE 줄을 봅니다.
// The transaction status of the SKPaymentQueue is sent here.
- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray*)transactions {
NSLog(@"Unibill: updatedTransactions");
for(SKPaymentTransaction *transaction in transactions) {
switch (transaction.transactionState) {
case SKPaymentTransactionStatePurchasing:
// Item is still in the process of being purchased
break;
case SKPaymentTransactionStatePurchased:
case SKPaymentTransactionStateRestored: {
// Item was successfully purchased or restored.
NSMutableDictionary* dic;
dic = [[NSMutableDictionary alloc] init];
[dic setObject:transaction.payment.productIdentifier forKey:@"productId"];
[dic setObject:[self selectReceipt:transaction] forKey:@"receipt"];
NSData* data;
data = [NSJSONSerialization dataWithJSONObject:dic options:0 error:nil];
NSString* result;
result = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
UnitySendMessage(UNITY_GAMEOBJECT_NAME, "onProductPurchaseSuccess", result.UTF8String);
#if !__has_feature(objc_arc)
[result release];
[dic release];
#endif
// After customer has successfully received purchased content,
// remove the finished transaction from the payment queue.
[[SKPaymentQueue defaultQueue] finishTransaction: transaction];
break;
}
case SKPaymentTransactionStateDeferred:
**//XCODE ISSUE: USE OF UNDECLARED IDENTIFIER "SKPaymentTransactionStateDeferred"**
NSLog(@"Unibill: purchaseDeferred");
UnitySendMessage(UNITY_GAMEOBJECT_NAME, "onProductPurchaseDeferred", transaction.payment.productIdentifier.UTF8String);
break;
case SKPaymentTransactionStateFailed:
// Purchase was either cancelled by user or an error occurred.
NSString* errorCode = [NSString stringWithFormat:@"%d",transaction.error.code];
if (transaction.error.code != SKErrorPaymentCancelled) {
NSLog(@"Unibill: purchaseFailed: %@", errorCode);
UnitySendMessage(UNITY_GAMEOBJECT_NAME, "onProductPurchaseFailed", transaction.payment.productIdentifier.UTF8String);
} else {
NSLog(@"Unibill: purchaseFailed: %@", errorCode);
UnitySendMessage(UNITY_GAMEOBJECT_NAME, "onProductPurchaseCancelled", transaction.payment.productIdentifier.UTF8String);
}
// Finished transactions should be removed from the payment queue.
[[SKPaymentQueue defaultQueue] finishTransaction: transaction];
break;
}
}
}
누군가 내가해야 할 일을 알고 있습니까? 또 다른 질문 : unibillstorekit.mm 파일에서 호출 된 사례의 선언은 어디에서 찾을 수 있습니까? 아니면이 식별자를 어디에 선언해야합니까?
자세한 정보가 필요한 경우 알려주십시오.
참고 : IAM은 초보자 :