-
Notifications
You must be signed in to change notification settings - Fork 328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sk2 Transaction not annotated to objc
#4225
Comments
👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out! |
Hi @albilaga! 👋 In this case, the equivalent object would be I see that you already have a few APIs that use StoreTransaction, is there anything you needed specifically from the For what it's worth we've ran into this ourselves in the past, with our wrappers for other platforms (like React-Native, Flutter, Unity, etc), and we usually use |
I just realized that you were pointing to the property within As for the property itself, yeah, it's not marked @objc because StoreKit 2 internally isn't Obj-C compatible, and it'd take a significant amount of work to make it so. And in fact that's why we created the StoreTransaction class itself, to make an Obj-C compatible wrapper around the Swift-only SK2 files. |
Yeah. Is the property not possible to be marked with We are now using |
@albilaga isn't not possible to mark it Not only that, but the actual format in SK2 changes drastically - the receipt itself is a JWT (or rather, a set of JWTs), instead of a single base 64 encoded file. Could you elaborate on how you intend to use it? Are you sending it as a separate thing to your own servers? I'm asking so that we can try to figure out a good solution for you. Typically apps don't use the transaction receipt directly |
I'm going to go ahead and close this stale issue but if you have additional information to share or are still experiencing this issue then please feel free to open it again. |
@aboedo the usage is I need to get the PurchaseToken to send to the backend. This is how I do with var purchaseToken = RevenueCatResult.Transaction.Sk1Transaction?.TransactionReceipt?.GetBase64EncodedString(NSDataBase64EncodingOptions.None) ?? string.Empty; But it is saying |
Hello @albilaga I think what you're looking for might be the
This contains the SK2 JWS token for that transaction. It would be the closest equivalent to the SK1 receipt, except the SK1 receipt contains information about all the purchases of the user, and the JWS token contains information about just one purchase. Let me know if this solves your issue. |
@MarkVillacampa but that is internal which means I can't access it, right? |
@albilaga you should still be able to mark it, since I added an API test to verify and future-proof here, but you should be able to use it in an Objective-C context without any changes |
Describe the bug
Hello. I am using revenue cat for our iOS app. But the problem is we are using .NET for iOS. We already created our own binding for revenuecat in here https://github.com/thisisthekap/tonestro.maui.revenuecat.ios. But the problem with this approach is basically right now .NET for iOS only can binding for objective C so it need swift that annotated with
@objc
Now the
sk2Transaction
not annotated with@objc
as this is different fromsk1Transaction
. This makes my revenuecat binding can't access tosk2Transaction
. Is this intended? I am not sure as I am not native iOS developer. Thank youusesStoreKit2IfAvailable(true)
)Steps to reproduce, with a description of expected vs. actual behavior
Other information
Additional context
The text was updated successfully, but these errors were encountered: