Skip to content

A library to retrieve information about the swift application during runtime.

License

Notifications You must be signed in to change notification settings

astzweig/swift-about-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A library to retrieve information about the swift application during runtime.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages