Quick guide to get TCAKit examples running in your project.
dependencies: [
.package(url: "https://github.com/ronstorm/tca-kit.git", from: "1.0.0")
]- File → Add Package Dependencies
- URL:
https://github.com/ronstorm/tca-kit.git - Add to your target
All examples are complete, runnable apps with @main attribute:
- Copy the example files to your project
- Add TCAKit dependency (see above)
- Run immediately! (⌘+R)
- Open Swift Playgrounds
- Create new playground
- Copy code from any example
- Run immediately!
- Copy example code into your existing project
- Add TCAKit dependency (see above)
- Update your
App.swiftto use the example's app struct - Run (⌘+R)
- BasicCounter: Single file - copy
BasicCounter.swift(standalone app) - TodoList: Two files - copy
TodoList.swift+Models.swift(standalone app) - WeatherApp: Two files - copy
WeatherApp.swift+Models.swift(standalone app)
- All examples are standalone apps with
@mainattribute - they can run independently - TodoList and WeatherApp use mock services for demonstration (no real network calls)
- Dependencies are pre-configured - no additional setup needed for the examples
- iOS 15.0+ / macOS 12.0+ / tvOS 15.0+ / watchOS 8.0+
- Swift 5.9+
- SwiftUI
"No such module 'TCAKit'"
- Make sure you added TCAKit as a dependency
- Check your target dependencies
Build errors
- Ensure you're using iOS 15.0+ and Swift 5.9+
- Check project deployment target
App crashes on launch
- Make sure you updated
App.swiftto use the correct app struct - Check that all required files are copied