iphone - SKPayment is deprecated -


im using following inapppurchase payment process, skpayment *pay=[skpayment paymentwithproductidentifier:myproduct]; appstore reject app or not.. used following code paymentwithproductidentifier. how use paymentwithproduct code

code:

in .h file

#define product_identifier @"com.company.appname.product" 

in .m file

skrequest *request=[[skrequest alloc]init];     request.delegate=self;     [request start];  skproductsrequest *productrequest = [[skproductsrequest alloc] initwithproductidentifiers:[nsset setwithobject:product_identifier]];        productrequest.delegate = self;     [productrequest start];  - (void)productsrequest:(skproductsrequest *)request didreceiveresponse:(skproductsresponse *)response {       skproduct *product;     nsarray *myproduct = response.products;     nsarray *myproduct1 = response.invalidproductidentifiers;       printf("\n inside didreceiveresponse ....myproduct count----%d\t",[myproduct count]);     printf("\n inside didreceiveresponse ....invalid  products count----%d\t",[myproduct1 count]); if([myproduct count] >0){         for(int i=0;i<[myproduct count];i++)         {             product = [myproduct objectatindex:i]; }         [request release];          [self performselector:@selector(precheckforpayment) withobject:self afterdelay:0.1];       }        }  -(void)checkforpayments{     if ([skpaymentqueue canmakepayments])     {         printf("\n yes u can make payments");  skpayment *mypayment = [skpayment paymentwithproductidentifier:product_identifier]; [[skpaymentqueue defaultqueue] addpayment:mypayment];         [[skpaymentqueue defaultqueue] addtransactionobserver:self]; } } 

no not reject app, should changing paymentwithproductidentifier paymentwithproduct: method.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -