Field notes · XCODE / CHATGPT

Pro Unlocks, Then Locks After Relaunch: Trace StoreKit State with Relayard

Investigate a non-consumable Pro unlock that disappears after relaunch. Trace purchase verification, current entitlements, shared UI state and explicit restore with Relayard before proposing a focused repair.

Trace how access is rebuilt when the app launches. A purchase callback updating one screen does not establish that the app reconstructs its entitlement state. This source-backed practical walkthrough uses a hypothetical non-consumable Pro unlock in an iOS app; it is not a tested customer repair or a description of Relayard billing.

1. Reproduce the transition that loses access

Imagine a document app where a test purchase unlocks Pro export immediately. After a full quit and relaunch, the export screen asks for payment again. Start with that transition, using an authorized test setup and harmless content. Record the app revision, OS, product identifier, StoreKit environment and whether a local StoreKit configuration is active. Keep account credentials and signed transaction payloads out of the report.

Check whether the paywall alone is wrong or the protected action is also blocked. Then compare a cold launch with returning from the paywall during the same session. These observations help separate a screen-local flag from a shared entitlement calculation. Neither observation alone proves a StoreKit service failure.

Keep this investigation scoped to a non-consumable purchase. Consumable balances, subscription renewal states and server-owned cross-account access require different rules; do not silently extend a one-time-unlock fix to them.

2. Use Relayard to find every writer of Pro state

Confirm the selected Xcode project and the read tools actually exposed by the connected Relayard client. Ask the assistant to locate the purchase handler, app startup, transaction listener, restore action and feature gate. Return file and symbol references for the path between them. The connection makes the current implementation inspectable; it does not supply StoreKit account access or automatically perform a purchase.

Source map to build before editing
Entry pointQuestion
Purchase resultWhat verifies the transaction and publishes access?
App startupWhat loads current entitlements before the UI settles?
Transaction updatesWho owns the listener, and how long does it live?
Restore actionWhat recomputes access after synchronization?
Paywall and export gateDo both observe the same authority?

Search for all assignments to the access flag, including defaults and cached values. A later startup assignment may overwrite a correct result. Keep observations and hypotheses separate: “this screen stores its own Boolean” is inspectable; “that is the root cause” needs the failing path.

3. Rebuild a verified snapshot instead of only setting true

Apple documents Transaction.currentEntitlements as a sequence of current entitlements, including non-consumables; refunded or revoked products do not appear. [1] Inspect how the app maps that sequence to its own Pro product identifiers. An arbitrary transaction is not automatically this feature’s entitlement.

The sequence contains verification results. Inspect the verified and unverified branches rather than accepting an unverified payload as proof of access. Apple describes those verification outcomes explicitly. [4] Preserve the project’s established verification and server policy.

As a proposed design check, build a fresh candidate set and publish a completed snapshot through the shared access model. Look for code that only ever changes isPro to true: it can retain stale access when the qualifying entitlement disappears. Also inspect loading and failure states so an unfinished refresh does not look like a completed “not purchased” verdict. If refreshes overlap, confirm an older result cannot overwrite a newer snapshot.

4. Give startup, updates and restore distinct jobs

Apple recommends starting the Transaction.updates listener when the app launches. It receives relevant transactions from outside the current in-app purchase flow, including other-device activity and unfinished transactions at launch. Same-device purchase success is returned through the purchase result. [2] Inspect both paths; a listener created only while the paywall is visible deserves scrutiny.

For an explicit Restore Purchases button, Apple documents AppStore.sync() as a user-triggered synchronization that may prompt for authentication. It is not required on every normal launch. [3] After that action, check the app’s refreshed access state; a sync call returning does not itself demonstrate that a qualifying product exists or that export is unlocked.

Propose a focused change only after identifying the broken boundary. Keep product identifiers, purchase terms and account-linking behavior stable. Do not “repair” the screen by hard-coding access or asking a tester to buy again.

5. A copyable Relayard investigation brief

Replace the brackets with observed facts. Begin with read-only inspection, then authorize the proposed change after reviewing its scope.

TRY THIS IN CHATGPT
Investigate a non-consumable Pro unlock that disappears after relaunch using Relayard.
Project/build/OS: [values]. Product identifier: [value].
StoreKit environment and local configuration: [values].
Steps: [purchase, verify feature, fully quit, relaunch, retry].
Expected/observed: [facts]. Redacted diagnostics: [values].
Confirm the selected project and available read capabilities. Do not edit yet.
Map purchase verification, startup currentEntitlements, transaction updates,
restore action, all Pro-state writers and the actual feature gate.
Check product mapping, unverified handling, completed snapshots, loading state
and overlapping refreshes. Distinguish observations from hypotheses.
Propose the smallest repair preserving verification and account policy.
Do not make purchases, refunds or account changes without separate authorization.
After an authorized patch, report the diff, revision, native build result,
StoreKit environment, relaunch/restore results and remaining gaps.

6. Verify the feature gate as well as the paywall

Proposed acceptance matrix — not recorded results
ScenarioWhat to observe
New test purchaseVerified qualifying entitlement reaches both paywall and export gate.
Full quit and relaunchAccess is reconstructed without another purchase.
No qualifying entitlementA completed refresh keeps the protected feature locked.
Refund or revocation in a supported test environmentA refreshed snapshot removes the corresponding access.
Restore success, cancellation or errorAccurate status, responsive controls and no fabricated unlock.
Delayed or overlapping refreshesNo final stale overwrite; loading differs from a completed decision.

Run the native build for the changed revision and inspect its actual result through available Relayard capabilities. Then exercise applicable cases in the recorded StoreKit environment. Local StoreKit testing and sandbox testing are separate evidence; success in one does not establish the other.

For this article, the website is the only implementation changed. No iOS purchase, refund, device test or Xcode operation was performed. The app’s root cause, patch and runtime acceptance remain pending. A useful handoff records the diff, tested revision, environment, observed outcomes and unverified cases.

Common questions

Should startup always call AppStore.sync()?

Apple says normal operation does not require it. Keep it tied to an explicit user action and inspect startup entitlement reconstruction separately.

Can I reuse this exact checklist for consumable credits?

No. This walkthrough scopes the feature to a non-consumable unlock. Consumable delivery and balance accounting need their own design and acceptance checks.

Sources and next steps

Published October 23, 2026. Apple primary documentation and its Markdown bodies were checked on that date. No fresh repair record was available for this topic. The scenario, source map, prompt and acceptance matrix are editorial guidance; no applied app patch, purchase, refund, screenshot or passing runtime test is claimed.

  1. Apple: Transaction.currentEntitlements
  2. Apple: Transaction.updates
  3. Apple: AppStore.sync()
  4. Apple: VerificationResult