2 starwar2012 starwar2012 于 2013.04.23 13:54 提问

产品报出的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];              
    }
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!