Files
fidelity-ai-workspace/vault/03-context/ios/project-swift-guidance.md

51 lines
2.4 KiB
Markdown

---
type: guidance
project: fidelity
status: active
updated: 2026-04-17
tags:
- ios
- fidelity
---
# Project Swift Guidance
## Goal
Apply Swift/iOS advice in a way that fits Fidelity's XFlow, Fid4, XFlowViewMaker, and FTFrameworks environment.
---
## Fidelity-Specific Constraints
- XFlow is backend-driven; UI behavior may be service/configuration driven, not purely local Swift code.
- Fid4 is the real consumer validation target for many issues.
- XFlowViewMaker and FTFrameworks can affect whether a fix is visible in Fid4.
- CocoaPods and private podspec-repo behavior are part of the real integration surface, not just build tooling details.
- REST migration constraints still matter; do not assume REST is active by default.
- Some work happens behind feature flags, especially risky consumer-impact changes.
---
## SwiftUI / XFlow Priorities
- Treat modal presentation, dismissal sequencing, and lifecycle boundaries as high-risk areas.
- Be careful when removing UIKit bridges such as `UIHostingController`; preserve consumer behavior and rollout safety.
- When discussing SwiftUI architecture, include how the change affects:
- backend-driven flow rendering
- consumer app integration
- feature flags
- validation in Fid4
- UIKit/SwiftUI parity
---
## Answering Rules
- If the user asks a general Swift question, answer generally but include a Fidelity/XFlow note when relevant.
- If the user asks about a code change, separate modern best practice from what is safe for the current project.
- If codebase constraints are unknown, say what must be confirmed: deployment target, Xcode version, module ownership, feature flag path, and consumer validation path.
- If the work touches dependency propagation, published specs, or consumer upgrade behavior, explicitly include CocoaPods and podspec-repo reasoning instead of treating them as secondary operational noise.
- If the user asks whether CocoaPods, podspec repositories, or dependency propagation is good/bad practice, corroborate with current CocoaPods/Apple/Swift documentation and then adapt the recommendation to Fidelity's release path.
- Do not recommend replacing CocoaPods with SPM just because SPM is modern; first identify current integration constraints, private specs usage, release ownership, consumer app expectations, and migration cost.
- For manager-ready explanations, connect the technical recommendation to scope, risk, and validation.