docs(ios): document six public APIs that currently only appear in the changelog - #266
Open
0xwurdig wants to merge 1 commit into
Open
docs(ios): document six public APIs that currently only appear in the changelog#2660xwurdig wants to merge 1 commit into
0xwurdig wants to merge 1 commit into
Conversation
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.
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.
What changed and why
While auditing the iOS reference against the SDK source, I found six
publicmembers 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 incontent/.getAssignments()Superwall.swift:746configurationStatusSuperwall.swift:203isPaywallPresentedSuperwall.swift:385latestPaywallInfoSuperwall.swift:190togglePaywallSpinner(isHidden:)Superwall.swift:1078SuperwallOptions.maxConfigRetryCountSuperwallOptions.swift:378The first three are the ones I'd most expect to reach for when debugging, which is why they seemed worth raising:
configurationStatusis 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 withconfirmAllAssignments()— one is synchronous and reads stored state, the other isasyncand confirms. The added snippet notes the difference.maxConfigRetryCountis the knob that makesregister(placement:)surfacePaywallPresentationHandler.onErrorfaster on a bad connection.togglePaywallSpinner(isHidden:)is a nice case of a one-way link: its own doc comment points atSuperwallDelegate.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— addsmaxConfigRetryCountto the signature block, theTypeTable, and the basic-setup example.No new pages and no
meta.jsonchanges; everything slots into the existing pages so navigation is untouched. All behaviour described is taken from the SDK source rather than inferred —ConfigurationStatuscases arepending/configured/failed, andmaxConfigRetryCountdefaults to6and clamps negatives to0.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-lockfilebun run build:cf— succeeds, 602 pages prerendered, search index generatedbun test— 64 pass, 0 failregister.mdx,PaywallPresentationHandler.mdx,configure.mdxOnly
content/docs/**touched. Nothing underpublic/. Not deployed.Separate from #265, which fixes the
handleLogsignature.