-
Notifications
You must be signed in to change notification settings - Fork 511
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
Questions: Can I use StoreKit 2 API? #16893
Comments
It looks like the StoreKit 2 API is Swift-only, and unfortunately we don't support Swift-only API yet. |
As of today, the only way to use a swift library is via a proxy library, the general idea is described here https://learn.microsoft.com/en-us/xamarin/ios/platform/binding-swift/ basically you would need to expose the StoreKit 2 Apis you need via a Swift glue layer that exposes the method via the swift bridge header and then creating a C# binding project for this. |
Like @dalexsoto said. Take a look at my project, you can base on it and extend it based on your needs: There is implementation of one method responsible of showing manage storekit subscriptions view. You just add appropriate methods in Swift (via Xcode) marked with @objc attribute, then follow Readme - howto build xcframework, build bindings library and consume via nuget. Take a note that asynchronous swift methods are crashing on runtime due to the following issue: |
@thefex Thanks, this helped me to create a wrapper for some of their new storekit api https://github.com/taublast/AppoMobi.Xamarin.ExternalPurchaseLink, one could use that as another example too, iPhone and simulator are both supported. It's for a legacy Xamarin project while MAUI .Net version might be easier to bind. |
Hello all,
Everything is in the title.
Is it possible to use StoreKit 2 API with Xamarin iOS or .Net 7?
If yes, how?
If no, is there any plan to enable this in the future?
Thank you
The text was updated successfully, but these errors were encountered: