Usage with Objective-C
MacMark opened this issue · 3 comments
Hi all,
i try to use TPInAppReceipt with an Objective-C project via CocoaPods. The
@import TPInAppReceipt;
works but the compiler does not recognize/see the classes like InAppReceipt.
Because the TPInAppReceipt classes look public it should be possible. I'm probably doing it wrong. Can you please give me a hint?
Kind regards,
Markus
I see the TPInAppReceipt uses structs. Structs cannot be accessed by Objective-C as far as i know. Could you provide a small wrapper class that exposes "receipt.activeAutoRenewableSubscriptionPurchases"? :-)
Basically i'm looking just for a means to read the expiration date for an auto renewable subscription from the receipt.
Hi @MacMark,
The best I can do for now is to suggest to create an umbrella/wrapper file and expose properties you're looking for. I've created an example that you can improve by adding an extra functionality.
https://gist.github.com/tikhop/7d1215bbcea7fe8a3be3ce5ef25e15ee
Best,
Pavel