问题描述
- 产品报出的log:-[__NSCFConstantString
- 开发了一个交易应用,测试了一下,使用的产品名如:#define PRODUCT_IDENTIFIER @""com.companyname.appname.P1""
在模拟器运行之后,出现的log:
YES u can make payments2013-04-22 11:37:44.809 appname[2382:c07] -[__NSCFConstantString productIdentifier]: unrecognized selector sent to instance 0x1ac04
代码:
-(void)checkForPayments{ if ([SKPaymentQueue canMakePayments]) { printf(""n YES u can make payments""); // SKPayment *myPayment = [SKPayment paymentWithProductIdentifier:PRODUCT_IDENTIFIER]; SKPayment *myPayment = [SKPayment paymentWithProduct:PRODUCT_IDENTIFIER]; [[SKPaymentQueue defaultQueue] addPayment:myPayment]; [[SKPaymentQueue defaultQueue] addTransactionObserver:self]; }
时间: 2024-09-20 13:45:35