AboutApp is a library to retrieve information about the application during runtime, e.g. the app name or the app version.
Use AboutApp:
import AboutApp
@main
struct YourApp {
public static func main() {
let appName = AboutApp.shared.appName
print("Application name is \(appName)")
}
}
The library has enriched symbol documentation for DocC.
This project keeps a changelog that adheres to Keep a Changelog.
AboutApp includes a test target that can be run by
$ swift test
in the package folder or perform the Test action in Xcode (⌃⌥⌘U).
To use the AboutApp library in a project, add it to the dependencies of the package:
let package = Package(
// name, platforms, products, etc.
dependencies: [
// other dependencies
.package(url: "https://github.com/astzweig/swift-about-app", from: "0.1.0"),
],
targets: [
.executableTarget(name: "<command-line-tool>", dependencies: [
// other dependencies
.product(name: "AboutApp", package: "swift-about-app"),
]),
// other targets
]
)
The minimum Swift version supported by swift-about-app releases are detailed below:
swift-about-app | Minimum Swift Version |
---|---|
0.0.1 ... |
5.7 |