feat: owner Pro+ allowlist via CloudKit, cut v5.0.1 - #61
Merged
Conversation
Grants the app owner Pro+ without a purchase, keyed to their CloudKit user-record ID so it works on the release App Store build. - OwnerAccess holds the owner's CloudKit user-record ID (opaque, per-Apple-ID, scoped to the app's container; safe to publish — CloudKit verifies identity server-side, so it can't be presented by anyone else). - PurchaseService resolves the allowlist against CloudKit once per launch and, on a match, records a persisted owner grant so it applies instantly and offline thereafter. The grant only ever elevates the tier to .proPlus and defers to the existing #if DEBUG overrides, so real purchases and free/pro testing are unaffected. cachedTier / cachedEntitlement were refactored to fall back to the owner grant only when no debug override or stored purchase applies. - Supersedes the DEBUG record-ID reveal (PR #60): its only purpose was to read the owner's ID, which is now hardcoded, so the reveal is not shipped. Release cut: MARKETING_VERSION 5.0.0 -> 5.0.1, CURRENT_PROJECT_VERSION 45 -> 46, AppVersion.current -> 5.0.1, roadmap updated. App builds clean; unit suite 63/63.
|
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.



Grants the app owner Pro+ without a purchase, keyed to the owner's CloudKit user-record ID so it works on the release App Store build. Supersedes #60 (the DEBUG record-ID reveal) — that PR's only purpose was to read the owner's ID, which is now hardcoded, so the reveal is not shipped. Please close #60 in favor of this.
How it works
OwnerAccessholds the owner's CloudKit user-record ID and exposesisOwner()(compares the signed-in iCloud user's record ID for theiCloud.net.cleberg.DomainDigcontainer).PurchaseServiceresolves the allowlist against CloudKit once per launch; on a match it records a persisted owner grant (purchase.ownerEntitlement) so it applies instantly and offline on later launches..proPlusand defers to the existing#if DEBUGoverrides, so real purchases andDOMAIN_DIG_FORCE_FREE/FORCE_PROtesting on the owner's own device are unaffected.cachedTier/cachedEntitlementwere refactored so the owner fallback applies only when no debug override or stored purchase does.Safe to publish the record ID?
Yes. It's an opaque per-Apple-ID identifier scoped to this app's container — not an Apple ID, email, or any PII — and CloudKit verifies identity server-side, so no other user can present it as their own to unlock Pro+. Rationale is documented in
OwnerAccess.swift.Release cut
MARKETING_VERSION5.0.0 → 5.0.1,CURRENT_PROJECT_VERSION45 → 46,AppVersion.current→ 5.0.1, roadmap updated (v5.0.1 patch entry).project.pbxprojdiff is only the 20 version lines.Verification
Executed 63 tests, with 0 failures.