📱 This is a simple Swift utility package that reads application entitlements for you.
✅ Reading entitlements from iOS Application binary
Library exposes entitlements
property on UIApplication instances.
public extension UIApplication {
public var entitlements: Entitlements { get }
}
Library provides a set of predefines keys for most common entitlements keys as described in Apple docs. Please see Entitlements.Keys
to check available options.
Instance of Entitlements class exposes simple API for getting values
let value = UIApplication.shared.entitlements.value(forKey: .apsEnvironment) as? String
If the required key is not present - it could be easily defined.
let myAwesomeKey = Entitlements.Key("some.awesome.key")
let value = UIApplication.shared.entitlements.value(forKey: myAwesomeKey)
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method. I am open for changes, fixes and suggestions.
SwiftEntitlements is released under the MIT license. See LICENSE for details.