Skip to content
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
4ae4f93
chore(android): upgrade Purchasely SDK to 6.0.0
chouaibMo May 17, 2026
68dcd0c
build(android): bump Gradle wrapper to 9.4.1
chouaibMo May 18, 2026
ce47d26
refactor(purchasely): adopt v6 Kotlin DSL initializer and update Comp…
kherembourg May 22, 2026
b86e52a
chore(ios): migrate Purchasely integration to SDK v6
kherembourg May 27, 2026
8a8c6f5
docs(android): cover v6 presentation examples
kherembourg May 28, 2026
97d74a9
fix: address PR review comments on v6 migration
kherembourg May 28, 2026
f801a15
fix: block SDK default flow on Observer-mode cancellation (v6 interce…
kherembourg May 28, 2026
cb6cfcd
test(android): finish v6 test alignment (presentation renames + SUCCE…
kherembourg May 29, 2026
3ebada3
fix(purchasely): block observer fallback and refresh cached callbacks
kherembourg Jun 2, 2026
6906cb5
fix(android): align root Gradle config so Android Studio sync + tests…
kherembourg Jun 9, 2026
e4651bb
chore(purchasely): bump SDK to 6.0.0-beta2 (mavenLocal)
kherembourg Jun 10, 2026
011d259
refactor(purchasely): keep io.purchasely imports inside the purchasel…
kherembourg Jun 10, 2026
0b3e041
feat(purchasely): adopt the v6 session API for modal display
kherembourg Jun 10, 2026
89adb4b
fix(ui): surface paywall fetch failures instead of failing silently
kherembourg Jun 10, 2026
129ae9c
chore(android): add Purchasely ProGuard keep rules + v6 test version
kherembourg Jun 10, 2026
24051f3
docs(best-practices): v6 session API, strict wrapper boundary, no sil…
kherembourg Jun 10, 2026
4efe01a
feat(home): mood-based discovery and Surprise me, wired to Purchasely…
kherembourg Jun 10, 2026
08a8acb
style(theme): cocktail lounge palette and serif display typography
kherembourg Jun 10, 2026
9a81c15
chore(purchasely): point the local Swift package at the ios-develop w…
kherembourg Jun 10, 2026
ae257c2
refactor(purchasely): SDK-free wrapper boundary on iOS (parity with A…
kherembourg Jun 10, 2026
b096ed4
feat(home): mood discovery and Surprise me on iOS, iso with Android
kherembourg Jun 10, 2026
f44e827
style(theme): cocktail lounge palette and serif type on iOS, iso with…
kherembourg Jun 10, 2026
a223147
docs: both platforms on v6 — boundary tables, build/preload/display r…
kherembourg Jun 10, 2026
8bbba43
fix(android): reset Purchasely state on user changes
kherembourg Jun 12, 2026
e06f365
fix(android): use published Purchasely SDK version
kherembourg Jun 12, 2026
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
7 changes: 2 additions & 5 deletions android/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import java.util.Properties

plugins {
alias(libs.plugins.android.application)
Comment thread
kherembourg marked this conversation as resolved.
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.compose)
alias(libs.plugins.kotlin.serialization)
}
Expand Down Expand Up @@ -60,10 +59,6 @@ android {
targetCompatibility = JavaVersion.VERSION_11
}

kotlinOptions {
jvmTarget = "11"
}

testOptions {
unitTests.isReturnDefaultValues = true
}
Expand Down Expand Up @@ -118,5 +113,7 @@ dependencies {
androidTestImplementation(platform(libs.compose.bom))
androidTestImplementation(libs.compose.ui.test.junit4)
androidTestImplementation(libs.androidx.test.ext.junit)
androidTestImplementation(libs.androidx.test.runner)
androidTestImplementation(libs.androidx.test.espresso.core)
debugImplementation(libs.compose.ui.test.manifest)
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ enum class PurchaselySdkMode(
val label: String,
val runningMode: PLYRunningMode
) {
PAYWALL_OBSERVER(
storageValue = "paywallObserver",
label = "Paywall Observer",
runningMode = PLYRunningMode.PaywallObserver
OBSERVER(
storageValue = "observer",
label = "Presentation Observer",
runningMode = PLYRunningMode.Observer
),
FULL(
storageValue = "full",
Expand All @@ -21,9 +21,13 @@ enum class PurchaselySdkMode(
companion object {
const val PREFERENCES_NAME = "shaker_settings"
const val KEY = "purchasely_sdk_mode"
val DEFAULT = PAYWALL_OBSERVER
val DEFAULT = OBSERVER

/** Storage value persisted by pre-v6 versions, when OBSERVER was named "paywallObserver". */
private const val LEGACY_PAYWALL_OBSERVER = "paywallObserver"

fun fromStorage(value: String?): PurchaselySdkMode {
if (value == LEGACY_PAYWALL_OBSERVER) return OBSERVER
return values().firstOrNull { it.storageValue == value } ?: DEFAULT
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,8 @@ class RunningModeRepository(private val store: KeyValueStore) {
var runningMode: PLYRunningMode
get() {
val stored = store.getString(KEY_RUNNING_MODE, PurchaselySdkMode.DEFAULT.storageValue)
// Support legacy "observer" value from previous versions
val mode = if (stored == LEGACY_OBSERVER) {
PurchaselySdkMode.PAYWALL_OBSERVER
} else {
PurchaselySdkMode.fromStorage(stored)
}
return mode.runningMode
// fromStorage handles both the current "observer" value and the legacy "paywallObserver" one.
return PurchaselySdkMode.fromStorage(stored).runningMode
}
set(value) {
val mode = PurchaselySdkMode.entries.firstOrNull { it.runningMode == value }
Expand All @@ -23,11 +18,9 @@ class RunningModeRepository(private val store: KeyValueStore) {
}

val isObserverMode: Boolean
get() = runningMode == PLYRunningMode.PaywallObserver
get() = runningMode == PLYRunningMode.Observer

companion object {
private const val KEY_RUNNING_MODE = "running_mode"
/** Legacy storage value from before PurchaselySdkMode unification */
private const val LEGACY_OBSERVER = "observer"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ class PurchaseManager(
)
.build()

billingClient.queryProductDetailsAsync(queryParams) { billingResult, productDetailsList ->
billingClient.queryProductDetailsAsync(queryParams) { billingResult, queryResult ->
val productDetailsList = queryResult.productDetailsList
if (billingResult.responseCode != BillingClient.BillingResponseCode.OK || productDetailsList.isEmpty()) {
Log.e(TAG, "[Shaker] queryProductDetails failed: ${billingResult.debugMessage}")
_transactionResult.tryEmit(TransactionResult.Error(billingResult.debugMessage))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.purchasely.shaker.purchasely

import io.purchasely.ext.PLYPresentation
import io.purchasely.ext.presentation.PLYPresentation

@JvmInline
value class PresentationHandle internal constructor(
Expand Down
Loading
Loading