docs(swift): close integration doc gaps against SDK source [NT-3841] - #415
docs(swift): close integration doc gaps against SDK source [NT-3841]#415David Nalchevanidze (nalchevanidze) wants to merge 1 commit into
Conversation
Documents the contentful.swift/CTEntry typed initializer (NT-3808) in both guides, matching the equivalent Android coverage; clarifies UIKit screen()/trackCurrentScreen dedupe semantics without implying one is wrong; and fixes the KB's stale description of TapTrackingModifier's tap mechanism. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Code Review Agent Run #826e19Actionable Suggestions - 0Additional Suggestions - 1
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
|
| Source | Requirement / Code Area | Status | Notes |
|---|---|---|---|
| NT-3808, NT-3702 | Document the contentful.swift CTEntry typed initializer in both the SwiftUI and UIKit integration guides, matching the equivalent Android guide coverage of CDAEntry typed overload | ✅ Met | The diff adds documentation for the contentful.swift CTEntry typed initializer in both integration guides. documentation/guides/integrating-the-optimization-ios-sdk-in-a-swiftui-app.md now includes a SwiftUI example showing `OptimizedEntry(entry: entry)` where developers pass `Contentful.Entry` directly and read fields with `getField()`. documentation/guides/integrating-the-optimization-ios-sdk-in-a-uikit-app.md documents the `resolveOptimizedEntry(baseline: Contentful.Entry, selectedOptimizations:)` overload with usage example. Both guides now provide parity with the Android guide's coverage of CDAEntry typed overload, closing the compatibility gap identified in NT-3808. |
| NT-3829 | Reword the UIKit integration guide's screen-tracking section so trackCurrentScreen and screen are described by their actual deduplication behavior rather than a rule the guide's own reference app usage does not consistently follow | ✅ Met | The diff rewrites the UIKit integration guide's screen-tracking section in documentation/guides/integrating-the-optimization-ios-sdk-in-a-uikit-app.md to accurately describe the deduplication behavior of both APIs. The updated text explains that `trackCurrentScreen` deduplicates the current route by `routeKey` (skipping repeated `viewDidAppear(_:)` calls and retrying blocked attempts), while plain `screen(name:properties:)` re-emits on every call with no dedupe for intentional one-off events or cases where every appearance should count as a fresh screen event. This reflects the actual dedupe difference rather than the previous misleading rule that the reference app did not consistently follow. |
| NT-3829 | Fix the internal SDK knowledge base's stale description of TapTrackingModifier's tap mechanism to correctly state UITapGestureRecognizer on the superview, matching the current SDK source | ✅ Met | The diff updates documentation/internal/sdk-knowledge/native/ios.md to correctly describe TapTrackingModifier's tap mechanism. The stale description "simultaneousGesture(TapGesture()) on the wrapper" has been replaced with the accurate implementation: on UIKit-available platforms, a plain `UITapGestureRecognizer` is attached to the wrapper's superview with `cancelsTouchesInView = false` and a delegate that always allows simultaneous recognition, avoiding competition with nested interactive children like Buttons. The entry notes this falls back to `simultaneousGesture(TapGesture())` on non-UIKit platforms like macOS. This now matches the current SDK source code. |
Impact Analysis by BitoCode Paths AnalyzedImpact: Flow: Direct Changes (Diff Files): Repository Impact: Cross-Repository Dependencies: Database/Caching Impact: API Contract Violations: Infrastructure Dependencies: Additional Insights: Testing RecommendationsFrontend Impact: Service Integration: Data Serialization: Privacy Compliance: Backward Compatibility: OAuth Functionality: Reliability Testing: Additional Insights: Analysis based on known dependency patterns and edges. Actual impact may vary. |
Summary
contentful.swift/CTEntrytyped initializer (NT-3808) in both the SwiftUI and UIKit integration guides, matching the equivalent Android guide coverage (CDAEntrytyped overload).trackCurrentScreen/screenare described by their actual dedupe difference, rather than a rule the guide's own reference app usage doesn't always follow.TapTrackingModifier's tap mechanism (UITapGestureRecognizeron the superview, notsimultaneousGesture(TapGesture())) to match the current source (NT-3829).Test plan
pnpm knowledge:checkpassespnpm guides:checkpassespnpm exec prettier --checkpasses on all touched files🤖 Generated with Claude Code