Skip to content

Commit

Permalink
support displaying deferred win-back StoreKit messages
Browse files Browse the repository at this point in the history
  • Loading branch information
fire-at-will authored Oct 29, 2024
1 parent a2dc0f5 commit 7482a06
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ private void Start()
case Purchases.InAppMessageType.BillingIssue:
case Purchases.InAppMessageType.PriceIncreaseConsent:
case Purchases.InAppMessageType.Generic:
case Purchases.InAppMessageType.WinBackOffer:
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion IntegrationTests/Assets/APITests/PurchasesAPITests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ private void Start()
purchases.SyncAmazonPurchase("product_id", "receipt_id", "amazon_user_id", "iso_currency_code", 1.99);

purchases.ShowInAppMessages(new Purchases.InAppMessageType[] { Purchases.InAppMessageType.BillingIssue,
Purchases.InAppMessageType.PriceIncreaseConsent, Purchases.InAppMessageType.Generic });
Purchases.InAppMessageType.PriceIncreaseConsent, Purchases.InAppMessageType.Generic, Purchases.InAppMessageType.WinBackOffer });
purchases.ShowInAppMessages();
}
}
4 changes: 4 additions & 0 deletions RevenueCat/Scripts/InAppMessageType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,9 @@ public enum InAppMessageType

/// iOS-only. StoreKit generic messages.
Generic = 2,

// iOS-only. This message will show if the subscriber is eligible for an iOS win-back
// offer and will allow the subscriber to redeem the offer.
WinBackOffer = 3,
}
}
2 changes: 1 addition & 1 deletion Subtester/Assets/Scripts/PurchasesListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ void ShowInAppMessages()
{
var purchases = GetComponent<Purchases>();
purchases.ShowInAppMessages(new Purchases.InAppMessageType[] { Purchases.InAppMessageType.BillingIssue,
Purchases.InAppMessageType.PriceIncreaseConsent, Purchases.InAppMessageType.Generic });
Purchases.InAppMessageType.PriceIncreaseConsent, Purchases.InAppMessageType.Generic, Purchases.InAppMessageType.WinBackOffer });
}

void GetAmazonLWAConsentStatus()
Expand Down

0 comments on commit 7482a06

Please sign in to comment.