We experienced and solved a similar problem. Using CurrentAppSimulator worked fine, but it didn't happen to create a real user interface for purchasing CurrentApp .
In the production setup, the wait for CurrentApp.RequestProductPurchaseAsync (string, bool) seemed to never return (more specifically, it returns only once after the user logs in - subsequent calls are not returned).
In addition, after we tried to identify the user interface for purchases in our application, other applications using the user interface for purchases had the same problem - the user interface is never displayed.
Here is the problem code:
private async void CommandInvokedHandler(IUICommand command) { switch (command.Label) { case "Continue": licenseInformation = CurrentApp.LicenseInformation; if (!licenseInformation.ProductLicenses[Notes.ProductName].IsActive) { try { await CurrentApp.RequestProductPurchaseAsync(Notes.ProductName, false);
A somewhat obvious problem with the above code is that the request to open the user interface for in-app purchase is made from the command handler of the modal dialog box. Request freezes - never returns. The not so obvious part is that it also blocks all subsequent requests from our application and any other application (until the user session is restarted).
After moving the "try" block from the command handler and ensuring that there are no modal user interface calls that challenge the purchase request, the purchase works without problems.
EDIT: you must restart (or re-enter) to verify this. As soon as the user interface is violated, it will not be displayed until you restart or log in.
Vasiliy Kulakov
source share