1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-25 02:04:23 +00:00

iOS: Replace deprecated references to downloadState with state

This commit is contained in:
Anthony Nicholls 2024-04-05 11:22:10 +01:00
parent db3c2c6a52
commit e29002e666

View file

@ -54,10 +54,10 @@ struct InAppPurchases::Pimpl
String getProductId() const override { return nsStringToJuce (download.contentIdentifier); }
String getContentVersion() const override { return nsStringToJuce (download.contentVersion); }
Status getStatus() const override { return SKDownloadStateToDownloadStatus (download.state); }
#if JUCE_IOS
int64 getContentLength() const override { return download.contentLength; }
Status getStatus() const override { return SKDownloadStateToDownloadStatus (download.downloadState); }
#else
int64 getContentLength() const override
{
@ -66,7 +66,6 @@ struct InAppPurchases::Pimpl
return download.contentLength.longLongValue;
}
Status getStatus() const override { return SKDownloadStateToDownloadStatus (download.state); }
#endif
SKDownload* download;
@ -111,11 +110,8 @@ struct InAppPurchases::Pimpl
{
for (SKDownload* d in transaction.downloads)
{
#if JUCE_IOS
SKDownloadState state = d.downloadState;
#else
SKDownloadState state = d.state;
#endif
if (state != SKDownloadStateFinished
&& state != SKDownloadStateFailed
&& state != SKDownloadStateCancelled)
@ -358,11 +354,7 @@ struct InAppPurchases::Pimpl
{
if (auto* pdt = getPendingDownloadsTransactionSKDownloadFor (download))
{
#if JUCE_IOS
SKDownloadState state = download.downloadState;
#else
SKDownloadState state = download.state;
#endif
auto contentURL = state == SKDownloadStateFinished
? URL (nsStringToJuce (download.contentURL.absoluteString))
@ -779,11 +771,7 @@ private:
{
if (auto* pendingDownload = t.getPendingDownloadFor (download))
{
#if JUCE_IOS
switch (download.downloadState)
#else
switch (download.state)
#endif
{
case SKDownloadStateWaiting:
break;