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 af9d4f7 commit daf4e30
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ private class StoreMessageTypeAPI {
when (type) {
StoreMessageType.BILLING_ISSUES,
StoreMessageType.GENERIC,
StoreMessageType.PRICE_INCREASE_CONSENT -> {
StoreMessageType.PRICE_INCREASE_CONSENT,
StoreMessageType.WIN_BACK_OFFER -> {

}
}.exhaustive
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ public actual class Purchases private constructor(private val androidPurchases:
when (this) {
StoreMessageType.BILLING_ISSUES -> InAppMessageType.BILLING_ISSUES
StoreMessageType.GENERIC,
StoreMessageType.WIN_BACK_OFFER,
StoreMessageType.PRICE_INCREASE_CONSENT -> null
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ public actual class Purchases private constructor(private val iosPurchases: IosP
StoreMessageType.BILLING_ISSUES -> 0
StoreMessageType.PRICE_INCREASE_CONSENT -> 1
StoreMessageType.GENERIC -> 2
StoreMessageType.WIN_BACK_OFFER -> 3
}
},
completion = { }
Expand Down
1 change: 1 addition & 0 deletions models/api/models.api
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ public final class com/revenuecat/purchases/kmp/models/StoreMessageType : java/l
public static final field BILLING_ISSUES Lcom/revenuecat/purchases/kmp/models/StoreMessageType;
public static final field GENERIC Lcom/revenuecat/purchases/kmp/models/StoreMessageType;
public static final field PRICE_INCREASE_CONSENT Lcom/revenuecat/purchases/kmp/models/StoreMessageType;
public static final field WIN_BACK_OFFER Lcom/revenuecat/purchases/kmp/models/StoreMessageType;
public static fun getEntries ()Lkotlin/enums/EnumEntries;
public static fun valueOf (Ljava/lang/String;)Lcom/revenuecat/purchases/kmp/models/StoreMessageType;
public static fun values ()[Lcom/revenuecat/purchases/kmp/models/StoreMessageType;
Expand Down
1 change: 1 addition & 0 deletions models/api/models.klib.api
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@ final enum class com.revenuecat.purchases.kmp.models/StoreMessageType : kotlin/E
enum entry BILLING_ISSUES // com.revenuecat.purchases.kmp.models/StoreMessageType.BILLING_ISSUES|null[0]
enum entry GENERIC // com.revenuecat.purchases.kmp.models/StoreMessageType.GENERIC|null[0]
enum entry PRICE_INCREASE_CONSENT // com.revenuecat.purchases.kmp.models/StoreMessageType.PRICE_INCREASE_CONSENT|null[0]
enum entry WIN_BACK_OFFER // com.revenuecat.purchases.kmp.models/StoreMessageType.WIN_BACK_OFFER|null[0]
final fun valueOf(kotlin/String): com.revenuecat.purchases.kmp.models/StoreMessageType // com.revenuecat.purchases.kmp.models/StoreMessageType.valueOf|valueOf#static(kotlin.String){}[0]
final fun values(): kotlin/Array<com.revenuecat.purchases.kmp.models/StoreMessageType> // com.revenuecat.purchases.kmp.models/StoreMessageType.values|values#static(){}[0]
final val entries // com.revenuecat.purchases.kmp.models/StoreMessageType.entries|#static{}entries[0]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,10 @@ public enum class StoreMessageType {
* App Store only. Generic store messages.
*/
GENERIC,

/**
* App Store 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.
*/
WIN_BACK_OFFER,
}

0 comments on commit daf4e30

Please sign in to comment.