ios - StoreKit framework 2 questions -
just getting started store kit framework. have 2 questions:
1) there way find out purchased items current user? (get list of ids) 2) there way purchase items? or have prompt user each , every one?
thanks
there way find out purchased items calling [[skpaymentqueue defaultqueue] restorecompletedtransactions];
then
-(void)paymentqueue:(skpaymentqueue *)queue updatedtransactions:(nsarray *)transactions{ (skpaymenttransaction * transaction in transactions) { switch (transaction.transactionstate) { case skpaymenttransactionstatepurchased: break; case skpaymenttransactionstaterestored:
// info item transaction.originaltransaction.payment.productidentifier
[[skpaymentqueue defaultqueue] finishtransaction:transaction]; break; case skpaymenttransactionstatefailed: break; case skpaymenttransactionstatepurchasing: break; default: break; } }
}
2) if can tell user possible buy items 1 click. user asked purchase each item separately.
Comments
Post a Comment