Skip to content

feat: owner Pro+ allowlist via CloudKit, cut v5.0.1 - #61

Merged
ccleberg merged 1 commit into
mainfrom
release/v5.0.1
Jul 25, 2026
Merged

feat: owner Pro+ allowlist via CloudKit, cut v5.0.1#61
ccleberg merged 1 commit into
mainfrom
release/v5.0.1

Conversation

@ccleberg

Copy link
Copy Markdown
Collaborator

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

  • OwnerAccess holds the owner's CloudKit user-record ID and exposes isOwner() (compares the signed-in iCloud user's record ID for the iCloud.net.cleberg.DomainDig container).
  • PurchaseService resolves 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.
  • The grant only ever elevates the tier to .proPlus and defers to the existing #if DEBUG overrides, so real purchases and DOMAIN_DIG_FORCE_FREE/FORCE_PRO testing on the owner's own device are unaffected. cachedTier/cachedEntitlement were 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_VERSION 5.0.0 → 5.0.1, CURRENT_PROJECT_VERSION 45 → 46, AppVersion.current → 5.0.1, roadmap updated (v5.0.1 patch entry). project.pbxproj diff is only the 20 version lines.

Verification

  • App builds clean for device.
  • Unit suite: Executed 63 tests, with 0 failures.
  • The owner grant itself resolves against live CloudKit, so it's verified on-device after install (sign into your Apple ID → Settings → Tier shows Pro+). App Store archive/submit remains a manual step.

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.
@sonarqubecloud

Copy link
Copy Markdown

@ccleberg
ccleberg merged commit 963ce3f into main Jul 25, 2026
4 of 5 checks passed
@ccleberg
ccleberg deleted the release/v5.0.1 branch July 25, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant