ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Mobile specific functions / In-App Purchase functions
  • Principle and implementation
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
inAppCheckSubscription (Function)
In french: inAppVérifieAbonnement
When starting the iOS application, checks whether the In-App subscriptions have been renewed.
Example
// Project initialization code
inAppCheckSubscription(CheckSubscription)
PROCÉDURE CheckSubscription(bSuccess is boolean, Product is inAppProduct)
IF NOT bSuccess THEN
ToastDisplay(ErrorInfo())
RETURN
ELSE
// Call the inAppListPurchase function
// to check the start and end dates of subscription
END
Syntax
inAppCheckSubscription(<WLanguage procedure>)
<WLanguage procedure>: Procedure name
Name of WLanguage procedure ("callback" procedure) run if one of the subscriptions was renewed. For more details on this procedure, see Parameters of the procedure used by inAppCheckSubscription.
Remarks

Principle and implementation

In iOS, you have the ability to create self-renewable subscriptions for the in-App purchases.
When this type of subscription expires, the subscription is automatically renewed by the AppStore. A new purchase transaction is automatically created and transmitted during the next application start. Therefore, this transaction must be supported by the application to take into account the subscription renewal.
inAppCheckSubscription must be called as soon as possible in the "Initialization" event of the project in order to process the subscription renewals. The procedure will be called as many times as the number of subscriptions to renew.
Minimum version required
  • Version 23
Comments
Click [Add] to post a comment

Last update: 06/26/2023

Send a report | Local help