-
Notifications
You must be signed in to change notification settings - Fork 87
* experimental MVP PurchaseManager using Apple StoreKit2 API #273
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
base: master
Are you sure you want to change the base?
Conversation
uses `io.github.dkimitsa.robovm:robopods-storekit-swift` bindings for Swift based StoreKit2 API. implementation should be considered as POC and might some things might be broken.At least gdx-pay sample app was working with this manager.
|
Thanks, really great! One thing I would like to have: fill in the Free trial info only if the async function That is also how it works for Android, if the free trial is already used, Google Play won't return the trial. For Apple, it should be verified manually with |
...y-iosrobovm-apple/src/main/java/com/badlogic/gdx/pay/ios/apple/PurchaseManageriOSApple2.java
Outdated
Show resolved
Hide resolved
…s suggested by keesvandieren
|
@keesvandieren hi, have added check for |
|
Hi, I have tried out the purchase manager. I see prices, can fetch products / Information instances. Some callbacks seem to be missing:
Thanks for your work anyways, If you plan to complete them I would be happy to test it again. |
|
hi @keesvandieren , sorry for replying late. have implemented missing callbacks. also StoreKit2 api wrapper was updated with missing StoreKitError |
|
Hi, i came to do a hand with testing. In my app, im having an issue with One-Time charge purchasing. The first time i can do successfuly but at the second time, i get an error, this is the print of the error im having: Is like the transaction is not consumed. Maybe i have doing something wrong in my client iOS purchase process for that transaction, but at the moment, iOS purchasing are working good in my app Updated: This is the log that verify what im saying: |
|
@sebaber where all these logs other than |
|
Sorry for the late. I try to test again but in my project i have to update lo a higher version of gradle (8.14.3) and i have an issue of compatibility when i was trying to generate maven files on Narwhal IDLE. Is it possible to update this repo to a higher version of gradle? This is the error: |
|
Although, i think that these logs are from the class PurchaseManageriOSApple2 from For some reason for me, is like the purchase still remains in a queue after purchase, so next purchase send twice and start to increment in every next purchase |
|
For me this is quite hard to test. We have (in our app) only one single purchase (subscription), not multiple purchases. Anyone else with an app with consumables or multiple products who can tests this? |
|
Hi, I remember that ios always returns all historic transactions, when restoring purchases. This is also the case with the old implementation. So, for subscriptions for examples, if a subscription transaction is expired, it is still returned on iOS. On Android (Google Play implementation) only active transactions will be returned. So having historic payment / transactions on iOS is normal behaviour. Should we implement in gdx-pay that only currently valid transactions are returned? I don't know if that can be done easily. |
|
Hi @dkimitsa, is this already ready to be merged? Is this related to https://dkimitsa.github.io/2025/08/29/swift-missing-objc-class-structures/, are changes requested there already available for gdx-pay? |
|
hi @keesvandieren
issues mentioned in post is related to case when binaries are compiled for ios12. Anyway there is no need to compile ios15 sources against ios12 target so we can ignore these. will speak with tom-ski about arranging a repose and processes to release bindings. |
|
@keesvandieren |
|
hi @keesvandieren It was split into Java bindings: and kotlin wrappers (with coroutine flavour): I've update this PR is proper dependency. Personally I don't use StoreKit2 but there are active users so we monitor things to see if there is going to be any issue. Meanwhile, as part of |
|
Thanks @dkimitsa. I will have a look it it in one - two weeks. Few questions:
|
it was built against 2.3.23 but dependency listed as "provided". it will not be propagated as transitive dependency.same time there is nothing specific to depend on and older versions expected to work.
StoreKitRvm (swift to objc wrapper, native framework) was compiled with "min ios version 15"
Most of api from Storekit2.swift was wrapped as it was in ios18.2. If something is missing we can add it any time.
Cocoa touch is always present and it's huge. But if this api is not used the will not be included into binary (tree shaker can make it even better) .
yes, mostly its for kotlin projects. it will provide experience similar to swift concurrency, without callbacks etc. |
recently I've added bindings for StoreKit2 swift based API. and as quick test have implemented PurchaseManager using it.
I have not any experience using
gdx-paybefore, thus implementation might be not completely as expected or something might be broken. was able to run sample app with it.Hope will be usefeul for contributors of
gdx-payquick start.Besides noted above following to me mentioned:
PurchaseIntentstarting in iOS 16.4 orpaymentQueue(_:shouldAddStorePayment:for:otherwise).hope this helps, while it is not migrated to MobiVM please open an issue if found there https://github.com/dkimitsa/robovm-cocoatouch-swift.