1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-09 23:34:20 +00:00

InAppPurchases: Ensure that the iOS implementation notifies on failure

This commit is contained in:
reuk 2023-02-28 14:04:33 +00:00
parent f21bc3f4ae
commit cb54044c1c
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C
2 changed files with 96 additions and 48 deletions

View file

@ -190,7 +190,7 @@ private:
guiUpdater.triggerAsyncUpdate();
}
void productPurchaseFinished (const PurchaseInfo& info, bool success, const String&) override
void productPurchaseFinished (const PurchaseInfo& info, bool success, const String& error) override
{
purchaseInProgress = false;
@ -213,6 +213,12 @@ private:
}
}
if (! success)
{
auto options = MessageBoxOptions::makeOptionsOk (MessageBoxIconType::WarningIcon, "Purchase failed", error);
messageBox = AlertWindow::showScopedAsync (options, nullptr);
}
guiUpdater.triggerAsyncUpdate();
}