ios - -productRequest:didReceiveResponse returns empty products array in real store, works in sandbox -


i had update app approved. versioned added in app purchases. app works perfect in sandbox mode , apple did approve both iap , app, in app purchases fails in app.

i think crash occurs because response.products from:

- (void)productsrequest:(skproductsrequest *)request didreceiveresponse:(skproductsresponse *)response { } 

returns empty array , that:

skproduct *product = [[products filteredarrayusingpredicate:[nspredicate predicatewithformat:@"productidentifier == %@", _model.packageid]] firstobject];

returns nil. can't price of skproduct. think actual app crash these lines since product , payment nil.

skpayment *payment = [skpayment paymentwithproduct:product]; [[skpaymentqueue defaultqueue] addpayment:payment]; 

i read other blog posts can take 24 hours before iap becomes available. true? need worry bugs regarding iap's in app when works in sandbox mode , apple approved it?

it turned out indeed apple problem. got response apple stating can take 36 hours before in app purchases available.

i guess makes important handle case when

- (void)productsrequest:(skproductsrequest *)request didreceiveresponse:(skproductsresponse *)response { } 

is called, when response.products empty. when try actual product, make sure don't nil result.

i wish apple not approve , release update of app until iap ready sale.


Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -