You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the project you are working on:
Game with iOS IAP
Describe the problem or limitation you are having in your project:
There are no notifications sent to GDScript when iOS "restore purchases" completes or fails overall.
At present, notifications are sent to GDScript for each purchase restored. However in the cases where (1) the user does not have any purchases to restore, and (2) restore purchases fails, no notifications are sent and it is impossible for the GDScript code to react correctly. For example, by updating whatever restore purchase UI the game has implented.
A workaround is perhaps to set a maximum time limit on the restore process, but this is unreliable, a poor end-user experience and generally unsatisfactory.
Describe how this feature / enhancement will help you overcome this problem or limitation:
By introducing new notifications it will be possible for GDScript on iOS to react correctly to the cases above.
Describe implementation detail for your proposal (in code), if possible:
Implement the SKPaymentTransactionObserverpaymentQueueRestoreCompletedTransactionsFinished and restoreCompletedTransactionsFailedWithError methods in platform/iphone/in_app_store.mm
This will send new notifcations to GDScript, similar to the existing iOS IAP notifications, when the restore purchases process completes or fails overall.
FWIW, I am sucessfully using code similar to this in a released iOS game with a custom build of Godot 3.1
If this enhancement will not be used often, can it be worked around with a few lines of script?:
No. This must be implemented at the iOS platform level.
Is there a reason why this should be core and not an add-on in the asset library?:
The SKPaymentTransactionObserver protocol is implemented in the iOS platform code in platform/iphone/in_app_store.mm. The required new methods are part of this implementation and so must be added in the same place.
I understand a redesign of IAP may be in consideration with the aim of unifying the IAP GDScript API across Android and iOS (I was unable to find an existing issue for this, if it exists). The new notifications proposed here should be part of that design.
The text was updated successfully, but these errors were encountered:
I second this. By the same token, on iOS it is impossible to promote subscriptions and obtain gift keys for subscriptions.
App Store Connect sends this message:
"These in-app purchases can’t be promoted on the App Store because your latest approved binary doesn’t include the SKPaymentTransactionObserver method."
Describe the project you are working on:
Game with iOS IAP
Describe the problem or limitation you are having in your project:
There are no notifications sent to GDScript when iOS "restore purchases" completes or fails overall.
At present, notifications are sent to GDScript for each purchase restored. However in the cases where (1) the user does not have any purchases to restore, and (2) restore purchases fails, no notifications are sent and it is impossible for the GDScript code to react correctly. For example, by updating whatever restore purchase UI the game has implented.
A workaround is perhaps to set a maximum time limit on the restore process, but this is unreliable, a poor end-user experience and generally unsatisfactory.
Describe how this feature / enhancement will help you overcome this problem or limitation:
By introducing new notifications it will be possible for GDScript on iOS to react correctly to the cases above.
Describe implementation detail for your proposal (in code), if possible:
Implement the
SKPaymentTransactionObserver
paymentQueueRestoreCompletedTransactionsFinished
andrestoreCompletedTransactionsFailedWithError
methods inplatform/iphone/in_app_store.mm
Sample code:
This will send new notifcations to GDScript, similar to the existing iOS IAP notifications, when the restore purchases process completes or fails overall.
FWIW, I am sucessfully using code similar to this in a released iOS game with a custom build of Godot 3.1
If this enhancement will not be used often, can it be worked around with a few lines of script?:
No. This must be implemented at the iOS platform level.
Is there a reason why this should be core and not an add-on in the asset library?:
The
SKPaymentTransactionObserver
protocol is implemented in the iOS platform code inplatform/iphone/in_app_store.mm
. The required new methods are part of this implementation and so must be added in the same place.I understand a redesign of IAP may be in consideration with the aim of unifying the IAP GDScript API across Android and iOS (I was unable to find an existing issue for this, if it exists). The new notifications proposed here should be part of that design.
The text was updated successfully, but these errors were encountered: