Browse Source

iOS: Fixed a crash in InAppPurchases

tags/2021-05-28
Tom Poole 5 years ago
parent
commit
0239c0cb7e
1 changed files with 10 additions and 1 deletions
  1. +10
    -1
      modules/juce_product_unlocking/native/juce_ios_InAppPurchases.cpp

+ 10
- 1
modules/juce_product_unlocking/native/juce_ios_InAppPurchases.cpp View File

@@ -94,7 +94,16 @@ struct InAppPurchases::Pimpl : public SKDelegateAndPaymentObserver
/** AppStore implementation of hosted content download. */
struct DownloadImpl : public Download
{
DownloadImpl (SKDownload* downloadToUse) : download (downloadToUse) {}
DownloadImpl (SKDownload* downloadToUse)
: download (downloadToUse)
{
[download retain];
}
~DownloadImpl()
{
[download release];
}
String getProductId() const override { return nsStringToJuce (download.contentIdentifier); }
String getContentVersion() const override { return nsStringToJuce (download.contentVersion); }


Loading…
Cancel
Save