- Home
- Skills
- Mosif16
- Codex Skills
- Xcode Shared Swiftui Workflow
xcode-shared-swiftui-workflow_skill
- Rust
13
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill mosif16/codex-skills --skill xcode-shared-swiftui-workflow- SKILL.md24.7 KB
Overview
This skill provides an end-to-end Xcode workflow for architecting, debugging, profiling, testing, and shipping a shared SwiftUI app that runs on iOS and macOS (including Catalyst options). It focuses on practical project setup, dependency management, architecture choices (MVVM or TCA), CI/CD, and distribution via TestFlight or archives. The goal is a repeatable, team-friendly process that minimizes duplication and maximizes testability and performance.
How this skill works
The workflow walks you through creating a multiplatform Xcode project or adding macOS/Catalyst targets, organizing shared code, and configuring targets, schemes, and build configurations. It covers dependency management with SPM (and CocoaPods where necessary), selecting an architecture (MVVM or TCA), and implementing unit and UI tests. Finally, it shows debugging and profiling techniques in Xcode and how to automate builds and distribution using Xcode Cloud or GitHub Actions.
When to use it
- Starting a new SwiftUI app that must run on both iOS and macOS
- Migrating a single-platform app to a shared codebase and Catalyst
- Setting up CI/CD and automated TestFlight distribution for Apple platforms
- Standardizing team workflows and project configurations
- Improving test coverage and profiling UI/CPU/memory issues before release
Best practices
- Use a single shared codebase for SwiftUI views and models; apply platform checks only where necessary
- Prefer Swift Package Manager for Swift dependencies; use CocoaPods only for legacy/Objective-C libraries
- Choose MVVM for small-to-medium apps and TCA for complex, large-scale state management and testability
- Commit Package.resolved and share Xcode schemes to keep CI and team environments consistent
- Define environment values in XCConfig and Info.plist keys, and use compiler flags for build-time behavior
- Profile in Release builds using Instruments and capture SwiftUI view hierarchies to diagnose layout and performance issues
Example use cases
- Create a Multiplatform App target to share views and models across iPhone, iPad, and macOS
- Add Staging and Production build configurations with distinct BASE_URL values driven by XCConfig files
- Implement a ViewModel with @Published state (MVVM) or a Reducer/Store setup (TCA) to manage complex flows and enable unit testing
- Use Xcode Cloud to run tests and automatically archive builds for TestFlight distribution
- Run GitHub Actions on macOS runners to build, test, and produce build artifacts or trigger Fastlane uploads
FAQ
Yes. Give each target or environment a unique bundle identifier and Info.plist entries so provisioning, app icons, and names can differ (for example, add ".mac" or ".dev" suffixes).
Which architecture should I pick: MVVM or TCA?
Use MVVM for simplicity and fast iteration on small-to-medium apps. Choose TCA when you need strict unidirectional data flow, modular composition, and stronger testability for larger apps.