IAPManager
IAPManager copied to clipboard
[bugfix] Remove payment callback block when finished.
We're using your payment help tools in out app. Great thanks 😃
I think this might remove the wrong object in case of multiple payments. You'd have to reverse the iteration (see removePurchasesChangedCallbackWithContext
) to do this correctly.
A better way is probably to add the indices to remove to an NSIndexSet
and call removeObjectsAtIndexes
.
Unless you have huge amounts of purchases, keeping this the way it is now should not really pose a problem, though.
@mruegenberg This bug occurs when the same product are purchased twice. The callback blocks passed on second time will not be called, instead the blocks in the first purchase process are called twice. The completion blocks in self.payments are never be released.
We're showing HUD when purchasing product, the HUD is expected to be dismissed in purchase callback blocks when call "- (void)purchaseProduct:(SKProduct *)product ...". Actually, the blocks passed at the second time will never be called.
Thanks!