Skip to content

darrarski/tca-swift-log

Repository files navigation

ComposableArchitecture + SwiftLog

Swift v5.8 platforms iOS, macOS, tvOS, watchOS

Log actions and state changes inComposableArchitectureapplications usingSwiftLoglibrary.

📖 Usage

UseSwift Package Managerto add theTCASwiftLoglibrary as a dependency to your project.

Use_ReducerPrinter.swiftLogon your reducer to log actions and state mutations:

import TCASwiftLog

letstore=Store(initialState:AppFeature.State()){
AppFeature()._printChanges(.swiftLog(label:"tca"))
}

▶️Example

This repository contains an example iOS application from ComposableArchitecture repository -Standups.

  • OpenTCASwiftLog.xcworkspacein Xcode.
  • Run the example app usingStandupsbuild scheme.
  • "Standups" tab contains UI of the example app.
  • "Logs Console" tab containsPulseUIlogs console.

The example app usesPulseas a logging system's log handler. It also integrates UI for logs console. Remote logging can be enabled in the console settings.

Standups iOS app + Pulse macOS app Standups iOS app + PulseUI console

🏛 Project structure

TCASwiftLog (Xcode Workspace)
├─ tca-swift-log (Swift Package)
| └─ TCASwiftLog (Library)
└─ Standups (Xcode Project)
└─ Standups (Example iOS Application)

🛠 Develop

  • Use Xcode (version ≥ 14.3.1).
  • Clone the repository or create a fork & clone it.
  • OpenTCASwiftLog.xcworkspacein Xcode.
  • Use theTCASwiftLogscheme for building the library and running unit tests.
  • If you want to contribute, create a pull request containing your changes or bug fixes. Make sure to include tests for new/updated code.

☕️ Do you like the project?

Buy Me A Coffee

📄 License

Copyright © 2023 Dariusz Rybicki Darrarski

License:MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages