Swift package to get basic information from the hardware / os / info.plist
Instead of searching everywhere for the most used variables, these are provided here.
GlobalInfo.App.displayName
GlobalInfo.App.copyright
GlobalInfo.App.bundleIdentifier
GlobalInfo.App.bundleShortVersion
, GlobalInfo.App.bundleVersion
, and GlobalInfo.App.bundleVersionAsInt
.GlobalInfo.App.isiOSOnMac
, GlobalInfo.App.isMacCatalyst
, GlobalInfo.App.isMacAppleSiliconNativeCode
.GlobalInfo.App.isPreview
, GlobalInfo.App.isRunningTests
GlobalInfo.App.buildArchitecture
GlobalInfo.App.hasArgument
GlobalInfo.App.argumentValue
GlobalInfo.App.processPathName
GlobalInfo.HW.isSimulator
GlobalInfo.HW.modelIdentifier
, GlobalInfo.HW.simulatorModelIdentifier
GlobalInfo.HW.family
, GlobalInfo.HW.systemFamily
,GlobalInfo.HW.simulatorFamily
GlobalInfo.OS.localizedVersion
GlobalInfo.OS.majorVersion
, GlobalInfo.OS.minorVersion
, GlobalInfo.OS.patchVersion
GlobalInfo.App.appStoreReceiptURL
and GlobalInfo.App.appStoreReceipt
GlobalInfo.OS.uuid
subsystem
as the bundleIdentifier
automatically. Simply create your logger with theLogger(category: "SomeCategory")
subsystem
as well as the category
automatically from the file name: Logger(file: #file)
Logger.logAppContext()
andLogger.logAppContextOnce()
Logger(file: #file)
simplificationGlobalInfo.App.hasAppStoreReceipt
as it breaks Apple suggestion for file retrieval’s good practice. Data
will return nil
if invalid.Logger
for macOS 11 / IOS 14sysctl
calls for macOSThe official address for this package
This package is created and maintained by Misoservices Inc. and is licensed under the BSL-1.0: Boost Software License - Version 1.0.