Releases: RougeWare/Swift-Introspection
Releases · RougeWare/Swift-Introspection
1.2 - Added Bundle ID
Added the ability to read the bundle ID with any of these:
Introspection.Bundle.id
Introspection.Bundle.id(of: .main) // Or any other Foundation.Bundle instance
Introspection.bundleId
Bundle.main.id // Or any other Foundation.Bundle instance
Also:
- Also updated SemVer to
3.0.0-Beta.5
- Also resolved other packages
- Support for iOS device info
1.1 - Added Bundle name introspection
This update adds sugar for getting the name of a bundle:
Introspection.appName // The name of your app, as read from its bundle info
Introspection.Bundle.name(of: .main) // Same as previous
Introspection.Bundle.name(of: Bundle(for: SomeClass.self)) // The name of the bundle `SomeClass` is in
1.0 - MVP
Introspection 1.0.0
A Swift package which aides in checking information about the current app, system, & device.
The app bundle
This includes some sugar for reading your app bundle:
import Introspection
Introspection.appVersion // The semantic version of your app, as read from its bundle info, parsed into a `SemVer` value
This package also includes a generic version reader for any bundle:
import Introspection
Introspection.Bundle.version(of: Bundle(for: SomeClass.self))
And makes general bundle access easier:
import Introspection
let accentColorName: String? = Introspection.Bundle["NSAccentColorName"]
let supportedPlatforms: [String]? = Introspection.Bundle["CFBundleSupportedPlatforms"]
The device
This also lets you check info about the current device:
import Introspection
Introspection.Device.modelType == .iPhone
Introspection.Device.class == .laptop
Patches
- 1.0.1 - Forgot to make some subscripts public
- 1.0.2 - Fixed a bug with error-SemVer generation