You can easily access info.plist
strongly typed by create a struct this way -
struct InfoPlist<T> {
static func get(for key: String) -> T? {
return Bundle.main.infoDictionary?[key] as? T
}
static subscript(key: String) -> T? {
return get(for: key)
}
}
Now you can use above InfoPlist<T>
struct like this -
let bundleIdentifier = InfoPlist<String>["CFBundleDisplayName"]