Rocket.Chat.ReactNative/ios/Shared/Extensions/Bundle+Extensions.swift

16 lines
359 B
Swift

import Foundation
extension Bundle {
func bool(forKey key: String) -> Bool {
object(forInfoDictionaryKey: key) as? Bool ?? false
}
func string(forKey key: String) -> String {
guard let string = object(forInfoDictionaryKey: key) as? String else {
fatalError("Could not locate string for key \(key).")
}
return string
}
}