-
Notifications
You must be signed in to change notification settings - Fork 796
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
mac app, SwiftyStoreKit.purchaseProduct, callback has never been executed #98
Comments
If you try to purchase a non-consumable product again on iOS, you always get a message confirming that you will not be charged again, and if you continue the callback will be called. I'm not sure if there are differences on this between iOS and macOS. More investigation needed. |
There have been some major improvements to the purchase flows recently. @womandroid Could you retest this on version 0.8.0? If this issue is not updated in the next few weeks I'll assume everything works fine and will close it. |
Unfortunately, it still doesn't work for the latest version 0.8.4. |
Here is the log message when I purchase the product by a purchased account:
After that, nothing happend. The callback still doesn't execute. |
I have same problem. I found code, |
This problem has never been fixed since it was first identified in #105, but I have a proposed fix here, which I have tested in SwiftyStoreKit v0.10.7 with Swift 3 (and the same should apply to v0.11.0). The problem occurs only in Mac OS when you try to re-purchase a non-consumable item that you have previously purchased. The completion closure never gets called. The reason it works in iOS and not in macOS can be found and fixed in the
to
and to remove the test for |
@doffen Same here too, but your fix is a little rough. What if I do want to restore? Callback for restore will never be called. |
I tested restore and it works for me, on both iPhone and Mac OS. zhudengdengdeng, have you seen it fail to restore when using this change? |
@doffen Sorry for my mistake, I have looked into the code and found no issue. |
@Sam-Spencer this issue is back again for Mac. It would be great to add a unit test so another contributor isn't deleting it again. Or adding comments there may prevent it from being removed. I can see you have merged it: https://github.com/bizz84/SwiftyStoreKit/pull/465/files/b216b219bda55252390e2d5b89142963b8a9ee14 But when will the CocoaPod be updated with this fix, please? |
Mac上复现了这个问题,复现方式: |
Im also getting this issue. iOS 14.0 what are we suppose to do here ? any ideas? |
Also for me it happens in iOS |
I encountered similar problems a week ago. Purchasing worked. However, restoring my old (expired) purchases first, and purchasing a new subscription afterwards failed. The purchase requests returned already expired restored purchases instead of new ones. Before blaming yourself, your software, or SwiftyStoreKit, you should try to purchase your products with Apple’s sample code (available here: Compile & run Apple’s software. Then try to restore your old purchases and buy new products again. The following solution worked for me: |
hi, i use the following code to purchase non consumable product for my mac app, at the beginning, everything is ok: i fill the test account and password, click confirmation buttons and so on, but after I confirm the last dialog, i wait and wait and wait, but nothing is happend, the callback has never been executed. i try again and again and again, but every time is the same. what should i do? did I do something wrong? thanks.
Now i found that i should use a new test account to purchase the product, if the account has purchased the product already, the callback will not be executed. what should i do if i want the callback always be executed?
The text was updated successfully, but these errors were encountered: