Restructure StoreKit transaction handling documentation#4
Merged
Conversation
The README had accreted normative contract prose across audit fixes, mixing the adoption guide with the contract reference and duplicating symbol documentation. Restructure it as an adoption funnel: ownership split, quick start, the handler contract, entitlement behavior summary, and short recipes, each stating a rule once with a link to its source of truth. Move the detailed delivery, reconciliation, and failure-reporting model into a new DocC article, Understanding transaction handling, linked from the README, the DocC landing page Topics, and the TransactionStore symbol documentation, so the contract text lives in one place. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codex review found two overclaims in the new article: the reconciliation guarantee does not cover transactions already finished on another device (they never appear in Transaction.unfinished), and an unverified purchase result passed to process(_:) throws to the caller rather than reaching the failure callback. State both boundaries explicitly and align the README verification bullet. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
List platform and toolchain requirements as a scannable README section. Replace the unresolved StoreKit/StoreKitError/userCancelled symbol links with plain code voice, matching the existing convention for StoreKit symbols and silencing the docbuild warning. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Purpose
Make the README a practical integration guide and make DocC the canonical description of transaction ownership, entitlement readiness, failure reporting, and lifecycle behavior.
Changes
reportFailurecontract and callback reentrancy restrictions.Testing
xcodebuild docbuild -scheme StoreTransactionKit -destination 'generic/platform=macOS' -derivedDataPath .build/docc-auditswift build --build-system swiftbuildxcrun swift-format lint --strict Sources/StoreTransactionKit/TransactionStore.swift Sources/StoreTransactionKit/StoreTransactionSession.swift Sources/StoreTransactionKit/StoreTransactionFailure.swiftgit diff --checkDeployment
Publish the DocC archive through the repository's existing manual documentation workflow after merge.