docs(docs): correct and clarify the iOS integration guides [NT-3943] - #434
Draft
David Nalchevanidze (nalchevanidze) wants to merge 1 commit into
Draft
docs(docs): correct and clarify the iOS integration guides [NT-3943]#434David Nalchevanidze (nalchevanidze) wants to merge 1 commit into
David Nalchevanidze (nalchevanidze) wants to merge 1 commit into
Conversation
Review both iOS guides against the current SDK surface and fix what the mechanical validators cannot catch. Correctness: - Fix four snippets that could not compile: OptimizedEntry argument order, the missing hasConsent(method:) label, and the absent Combine and Contentful imports. The first two were inherited from prose shared with the Android guides, where both forms are legal Kotlin. - State in the UIKit guide that StorageDefaults is a startup default rather than a one-time seed, so a configured value replaces a stored user choice on every launch. The SwiftUI guide already said this; the siblings disagreed. - Correct seven contradicted behavioral claims and carry four facts that the knowledge base already held. Reader path: - Give both fetch sections real contentful.swift queries; they previously described a CDA query in prose only. - Lead every entry example with Contentful.Entry, keeping one sentence for the still-supported dictionary overload. - Name where the client ID comes from at the point the quick start asks for it, add a configured contentful.swift client as a prerequisite, show a storyboard-friendly injection path, and make the UIKit snippets placeable in a real file. - Add the missing Troubleshooting rows and gloss the load-bearing terms. Guide headings are unchanged, so every table-of-contents anchor still resolves. Open items, follow-up tickets, and the getFlag exposure conflict raised for the core analytics owners are recorded in nt-3943-ios-guides-review.md. Co-Authored-By: Claude Opus 5 (1M context) <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.
What
End-to-end accuracy and reader-experience pass over both iOS integration guides (NT-3943, sub-task of NT-3896).
knowledge:checkandguides:checkwere already green before this branch, so none of these defects were mechanically detectable — they came out of a cold newcomer read plus claim-by-claim verification against the Swift source and the internal fact store.Correctness
OptimizedEntryargument order (both initializers declaredwellTimeMsbeforeminVisibleRatio, and Swift enforces declaration order), the missinghasConsent(method:)label, and absentCombine/Contentfulimports. The first two were inherited from prose shared with the Android guides, where both forms are legal Kotlin — Swift is the only target where they break.StorageDefaults(consent: true)a "seed" and never stated that a configured value overrides a stored user choice on every launch. A reader carrying the quick-start config into an app that later collects consent got no warning. The SwiftUI guide already stated this correctly, so the two siblings disagreed.onTapre-enables tracking), background flush described as UIKit-only when the gate iscanImport(UIKit), and a preview-panel claim that only holds for SwiftUI.Reader path
contentful.swiftqueries, verified member-by-member against the vendored checkout.Contentful.Entry; the still-supported dictionary overload keeps one sentence.clientIdit never sourced — provenance is now inline where it is first needed.#if DEBUGblock, wrappedawait, lock-example call site), the storyboard-rooted case has an injection path that does not crash, and the view-tracking example wires its disappear path.Validation
pnpm guides:check— passpnpm knowledge:check— pass (1417 pointers, 10 fact files)pnpm exec prettier --check— cleanmain, so every table-of-contents anchor and inbound deep link still resolves.Swift snippets are symbol-verified against source, not compiler-verified — no Xcode run in this environment.
Open items (not in this PR)
from: "<version>"placeholder in both guides is unfixed, pending confirmation of the publishedoptimization.swifttag naming and whetherfrom:orexact:is correct for a prerelease.import Contentfulresolves in a consumer target declaring onlyContentfulOptimizationis unconfirmed; the new Troubleshooting row is worded to be correct either way.shared/concepts.mdsaysgetFlag(name)tracks a flag-view exposure immediately,native/ios.mdsays only subscribing does. iOSgetFlagbridges that same shared core, so one is wrong. Ifconcepts.mdgoverns, both guides advise a pattern that silently generates billable exposures — and the same advice propagates to every SDK guide bridging the core.OptimizationConfig.environmentdefaults tomainwhileContentfulHTTPPreviewClient.environmentdefaults tomaster;trackCurrentScreenis the guides' recommended screen API but is called by no reference implementation, so XCUITest cannot regress the documented path; andViewTrackingController/TrackingMetadataaccept only dictionaries, forcing UIKit apps to hand-encode a typed entry.Deliberately unchanged: table-of-contents placement and
Before you startordering (archetype-wide, shared by all 10 integration guides), and credential links (that sentence is duplicated verbatim across 6 guides and is not a fragment, so it belongs to the parent ticket).🤖 Generated with Claude Code