Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support displaying deferred win-back StoreKit messages #522

Merged
merged 3 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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