[PoC] Checkpoints sample app - #4166
Closed
tonidero wants to merge 8 commits into
Closed
Conversation
Generated by 🚫 Danger |
tonidero
force-pushed
the
toni/checkpoints-sample-app
branch
from
September 3, 2026 14:44
5597ef7 to
96c488f
Compare
tonidero
force-pushed
the
toni/checkpoints-offering-presenter
branch
2 times, most recently
from
September 3, 2026 15:39
3cb5225 to
b6a6c62
Compare
tonidero
force-pushed
the
toni/checkpoints-sample-app
branch
from
September 3, 2026 15:39
96c488f to
3c1c830
Compare
tonidero
force-pushed
the
toni/checkpoints-offering-presenter
branch
from
September 4, 2026 07:32
b6a6c62 to
9aace09
Compare
tonidero
force-pushed
the
toni/checkpoints-sample-app
branch
from
September 4, 2026 07:32
3c1c830 to
4a4f15f
Compare
tonidero
force-pushed
the
toni/checkpoints-offering-presenter
branch
from
September 4, 2026 08:59
9aace09 to
7f7e443
Compare
tonidero
force-pushed
the
toni/checkpoints-sample-app
branch
2 times, most recently
from
September 4, 2026 09:58
273a4a0 to
09a8100
Compare
tonidero
force-pushed
the
toni/checkpoints-offering-presenter
branch
from
September 4, 2026 09:58
7f7e443 to
3cc2efd
Compare
tonidero
force-pushed
the
toni/checkpoints-sample-app
branch
from
September 4, 2026 10:25
09a8100 to
2057b55
Compare
tonidero
force-pushed
the
toni/checkpoints-offering-presenter
branch
from
September 4, 2026 10:55
f28e814 to
7c93e66
Compare
tonidero
force-pushed
the
toni/checkpoints-sample-app
branch
from
September 4, 2026 10:55
2057b55 to
47cb582
Compare
tonidero
force-pushed
the
toni/checkpoints-offering-presenter
branch
from
September 4, 2026 11:32
7c93e66 to
d909efe
Compare
tonidero
force-pushed
the
toni/checkpoints-sample-app
branch
from
September 4, 2026 11:32
47cb582 to
672e63c
Compare
tonidero
force-pushed
the
toni/checkpoints-offering-presenter
branch
from
September 4, 2026 11:57
d909efe to
7af56e5
Compare
tonidero
force-pushed
the
toni/checkpoints-sample-app
branch
2 times, most recently
from
September 4, 2026 12:03
58b426a to
fa6c832
Compare
tonidero
force-pushed
the
toni/checkpoints-offering-presenter
branch
2 times, most recently
from
September 4, 2026 12:51
a2ea116 to
f8efc83
Compare
tonidero
force-pushed
the
toni/checkpoints-sample-app
branch
from
September 4, 2026 12:51
fa6c832 to
8e25068
Compare
tonidero
force-pushed
the
toni/checkpoints-offering-presenter
branch
from
September 4, 2026 13:16
f8efc83 to
d97c975
Compare
tonidero
force-pushed
the
toni/checkpoints-sample-app
branch
from
September 4, 2026 13:16
8e25068 to
13eeb7c
Compare
tonidero
force-pushed
the
toni/checkpoints-offering-presenter
branch
from
September 4, 2026 13:40
d97c975 to
9316660
Compare
tonidero
force-pushed
the
toni/checkpoints-sample-app
branch
from
September 4, 2026 13:40
5a19dd1 to
4b6c26b
Compare
tonidero
force-pushed
the
toni/checkpoints-sample-app
branch
from
September 7, 2026 17:00
14faab3 to
944135a
Compare
tonidero
force-pushed
the
toni/checkpoints-offering-presenter
branch
from
September 7, 2026 17:04
0bc4a42 to
b411893
Compare
tonidero
force-pushed
the
toni/checkpoints-sample-app
branch
from
September 7, 2026 17:04
944135a to
70eda62
Compare
tonidero
force-pushed
the
toni/checkpoints-offering-presenter
branch
from
September 8, 2026 09:44
b411893 to
78ceb14
Compare
tonidero
force-pushed
the
toni/checkpoints-sample-app
branch
2 times, most recently
from
September 8, 2026 10:58
97bc07b to
67cafbf
Compare
tonidero
force-pushed
the
toni/checkpoints-offering-presenter
branch
from
September 8, 2026 10:58
78ceb14 to
7ae209e
Compare
tonidero
force-pushed
the
toni/checkpoints-sample-app
branch
from
September 8, 2026 14:14
67cafbf to
adeac9a
Compare
tonidero
force-pushed
the
toni/checkpoints-offering-presenter
branch
from
September 8, 2026 14:14
7ae209e to
195cfc6
Compare
tonidero
force-pushed
the
toni/checkpoints-sample-app
branch
from
September 8, 2026 15:11
adeac9a to
6f10d22
Compare
tonidero
force-pushed
the
toni/checkpoints-offering-presenter
branch
from
September 8, 2026 15:11
195cfc6 to
138469b
Compare
tonidero
force-pushed
the
toni/checkpoints-sample-app
branch
from
September 8, 2026 15:25
6f10d22 to
c32d9c6
Compare
tonidero
force-pushed
the
toni/checkpoints-offering-presenter
branch
2 times, most recently
from
September 9, 2026 09:30
e83b62e to
98a4b55
Compare
tonidero
force-pushed
the
toni/checkpoints-sample-app
branch
from
September 9, 2026 09:30
c32d9c6 to
2fb073d
Compare
tonidero
removed this pull request from stack #4189
September 9, 2026 11:20
tonidero
force-pushed
the
toni/checkpoints-offering-presenter
branch
from
September 9, 2026 11:21
98a4b55 to
3907a11
Compare
tonidero
force-pushed
the
toni/checkpoints-sample-app
branch
from
September 9, 2026 11:21
2fb073d to
18fb6f7
Compare
tonidero
added this pull request to stack #4205
September 9, 2026 11:21
tonidero
force-pushed
the
toni/checkpoints-sample-app
branch
from
September 9, 2026 12:13
18fb6f7 to
4c7876c
Compare
tonidero
force-pushed
the
toni/checkpoints-offering-presenter
branch
from
September 9, 2026 12:13
3907a11 to
89a4dd4
Compare
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The checkpoint callback may never fire (hard gate, no entitlement), so modelling the call as a pending operation would strand the user on a spinner with no way forward. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The gate callback only fires when the user goes through the checkpoint, so the sample no longer re-checks entitlements client-side; the grants are merged into the card for inspection. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The play checkpoint's callback now receives null when nothing was presented; the game starts either way and only the grants are merged in. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The sample registers SamplePaywallPresenter on Purchases; the app root renders SamplePaywall, a simple full-screen paywall with package cards, purchase, restore and close, whenever a checkpoint resolves to an offering. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A small floating button on every screen opens a dialog with key and value fields, so rules that target attributes can be exercised without leaving the app. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…heckpoint Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
Author
|
Closing this one since we do have the checkpoint tester app already |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This is a PoC to test the gate-focused checkpoints API in a realistic integration.
Adds
examples/checkpoints-sample, a minimal app shaped like a real integration rather than a feature-by-feature exerciser (that'sexamples/checkpointtester):onboarding_completecheckpoint and continues to home once the callback fires, whatever was served. Mimics a post-onboarding soft paywall.awaitCustomerInfo(FETCH_CURRENT)). Tapping play while locked runs theplay_gamecheckpoint with agames_playedcustom variable. The callback firing means the gate let the user through, so the game opens whatever was served: a null result (nothing presented) or a result whose grants are merged into the card. If the user backs out of the flow, the callback never fires and they stay on home with the card still locked.The checkpoint calls are not modelled as pending operations (no spinner): the callback may legitimately never fire.
The app exercises both ways of supplying a
PaywallPresenter.ParkedPaywallPresenterparks a request in aStateFlowand the app root renders a paywall while one is set; there are two instances:PurchasesinMainApplication: rendersSamplePaywall, a full-screen paywall (packages as selectable cards, purchase throughawaitPurchase, restore, close).CheckpointParams.paywallPresenterby theplay_gamecall: rendersPlayGamePaywall, a bottom sheet with one purchase button per package, restore and "Not now". A "Use call-site paywall" switch on home (on by default) controls whether it is passed, so turning it off falls back to the global paywall.In both, a purchase or a restore that leaves an active entitlement reports
Purchased, closing reportsClosed, and system backNavigatedBack. Onlyplay_gameresolves to an offering, so onboarding still shows the SDK's workflow.The app reuses the paywall tester's
applicationIdand defaults to the checkpoint tester's API key (thenPAYWALL_TESTER_API_KEY_A), so theonboarding_completecheckpoint id is shared with checkpointtester; override withCHECKPOINTS_SAMPLE_API_KEYinlocal.properties.Testing
:examples:checkpoints-sample:assembleDebuganddetektAllpass.onboarding_complete/play_gamecheckpoints configured; with the switch on the play paywall is the bottom sheet, with it off the full-screen one. Back out of either and confirm nothing advances, close it and confirm it does.🤖 Generated with Claude Code