Plist

struct Plist : Codable

Undocumented

  • Get object T stored in .plist files.

    Usage :

    let databaseURL: String = Constants.Plist.getDataForKey(key: "DATABASE_URL", type: .firebase) ?? "Not found"
    

    Declaration

    Swift

    static func getDataForKey<T>(key: String, type: PlistType = .weeclik) -> T?

    Parameters

    key

    Dictionarry’s key to access value.

    type

    The type of .plist you wish to access, Default = .weeclik.

    Return Value

    Object of type T stored for the corresponding key.

  • Generic function to fetch a .plist file based on it’s name

    Declaration

    Swift

    private static func getPlistDictionary(forName name: String) -> NSDictionary?

    Parameters

    name

    The name of the .plist file

    Return Value

    The content of .plist file as NSDictionnary or nil

  • Enum representing Type of .plist we want to fetch (.firebase || .weeclik)

    See more

    Declaration

    Swift

    enum PlistType