Skip to content

docs(ios): document six public APIs that currently only appear in the changelog - #266

Open
0xwurdig wants to merge 1 commit into
superwall:mainfrom
0xwurdig:docs/document-missing-superwall-apis
Open

docs(ios): document six public APIs that currently only appear in the changelog#266
0xwurdig wants to merge 1 commit into
superwall:mainfrom
0xwurdig:docs/document-missing-superwall-apis

Conversation

@0xwurdig

Copy link
Copy Markdown

What changed and why

While auditing the iOS reference against the SDK source, I found six public members that carry doc comments in the SDK but appear nowhere in the published docs except the changelog — no reference page, no guide. I checked every one of the 603 pages in content/.

Symbol Declared at Currently documented?
getAssignments() Superwall.swift:746 Nowhere at all — zero mentions in the iOS docs
configurationStatus Superwall.swift:203 Changelog only
isPaywallPresented Superwall.swift:385 Changelog only
latestPaywallInfo Superwall.swift:190 Changelog only
togglePaywallSpinner(isHidden:) Superwall.swift:1078 Changelog only
SuperwallOptions.maxConfigRetryCount SuperwallOptions.swift:378 Changelog only

The first three are the ones I'd most expect to reach for when debugging, which is why they seemed worth raising:

  • configurationStatus is the supported way to know whether config finished — the answer to "why isn't my paywall showing yet". It's @Published, so it binds in SwiftUI and Combine.
  • getAssignments() answers "which variant is this user actually in", and is easy to confuse with confirmAllAssignments() — one is synchronous and reads stored state, the other is async and confirms. The added snippet notes the difference.
  • maxConfigRetryCount is the knob that makes register(placement:) surface PaywallPresentationHandler.onError faster on a bad connection.

togglePaywallSpinner(isHidden:) is a nice case of a one-way link: its own doc comment points at SuperwallDelegate.handleCustomPaywallAction(withName:), but nothing points back at it, so you'd only find it by reading the source.

The change

  • Superwall.mdx — adds the five members to the signature block, plus usage snippets in the page's existing style.
  • SuperwallOptions.mdx — adds maxConfigRetryCount to the signature block, the TypeTable, and the basic-setup example.

No new pages and no meta.json changes; everything slots into the existing pages so navigation is untouched. All behaviour described is taken from the SDK source rather than inferred — ConfigurationStatus cases are pending / configured / failed, and maxConfigRetryCount defaults to 6 and clamps negatives to 0.

Happy to trim this if any of these are intentionally undocumented — I couldn't tell from the outside, and each one is a self-contained hunk so they're easy to drop individually.

Testing performed

  • bun install --frozen-lockfile
  • bun run build:cf — succeeds, 602 pages prerendered, search index generated
  • bun test — 64 pass, 0 fail
  • Verified every link target added here exists: register.mdx, PaywallPresentationHandler.mdx, configure.mdx

Only content/docs/** touched. Nothing under public/. Not deployed.

Separate from #265, which fixes the handleLog signature.

configurationStatus, isPaywallPresented, latestPaywallInfo, getAssignments,
togglePaywallSpinner and maxConfigRetryCount are all public and carry doc
comments in the SDK, but none of them appear on an SDK reference page or in a
guide — only in the changelog.

Adds them to the Superwall and SuperwallOptions reference pages, following the
existing usage-snippet and TypeTable patterns on those pages.
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