Skip to content

Latest commit

 

History

History
68 lines (51 loc) · 1.53 KB

README.md

File metadata and controls

68 lines (51 loc) · 1.53 KB

AboutApp

AboutApp is a library to retrieve information about the application during runtime, e.g. the app name or the app version.

Usage

Use AboutApp:

import AboutApp

@main
struct YourApp {
	public static func main() {
		let appName = AboutApp.shared.appName
		print("Application name is \(appName)")
	}
}

Documentation

The library has enriched symbol documentation for DocC.

Changelog

This project keeps a changelog that adheres to Keep a Changelog.

Testing AboutApp

AboutApp includes a test target that can be run by

$ swift test

in the package folder or perform the Test action in Xcode (⌃⌥⌘U).

Adding AboutApp as a Dependency

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
	]
)

Supported Versions

The minimum Swift version supported by swift-about-app releases are detailed below:

swift-about-app Minimum Swift Version
0.0.1 ... 5.7