Contents

matis-schotte/tracingactivity

TracingActivity provides Apples Activity Tracing as part of Unified Logging for pure Swift applications.

Requirements

  • Swift >= 4
  • iOS >= 10
  • macOS >= 10.12
  • tvOS >= 10
  • watchOS >= 3.0

Installation

Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler.

Add the Package URL https://github.com/matis-schotte/TracingActivity.git in Xcodes project viewer. Adding it to another Package as a dependency is as easy as adding it to the dependencies value of your Package.swift.

dependencies: [
	.package(url: "https://github.com/matis-schotte/TracingActivity.git", from: "0.1.0")
]

Usage

Block-based activity tracing once:

_ = TracingActivity.initiate("Activity") {
	// ... os_log stuff
}

Activity tracing for multiple blocks:

let activity: TracingActivity? = TracingActivity("Activity")
_ = TracingActivity.apply(activity) {
	// ... os_log stuff
}

Scope-based activity tracing:

let activity: TracingActivity? = TracingActivity("Activity2")
var scope = activity?.enter()
// ... os_log stuff
defer {
	scope?.leave()
}

[//]: # (Example: See the example project inside the examples/ folder.)

ToDo

  • Add SwiftLint (by adding xcodeproj: swift package generate-xcodeproj, helps support Xcode Server, too)
  • Add Travis CI (without xcodeproj see reddit, medium)
  • Add codecov
  • Add codebeat
  • Add codeclimate
  • Add codetriage
  • Add jazzy docs
  • Add CHANGELOG.md
  • Clean api docs
  • Add Carthage support
  • Add Cocoapods support

[//]: # (Donations: ETH, LTC welcome.)

License

TracingActivity is available under the Apache-2.0 license. See the LICENSE file for more info.

Author

Matis Schotte, dm26f1cab8aa26@ungeord.net

https://github.com/matis-schotte/TracingActivity

Package Metadata

Repository: matis-schotte/tracingactivity

Default branch: master

README: README.md