Bundle
extension Bundle
-
Decode a JSON file from the bundle
Declaration
Swift
func decode<T: Decodable>( _ type: T.Type, from file: String, dateDecodingStrategy: JSONDecoder.DateDecodingStrategy = .deferredToDate, keyDecodingStrategy: JSONDecoder.KeyDecodingStrategy = .useDefaultKeys ) -> TParameters
typeThe decodable type
fileThe fil to decode
dateDecodingStrategyThe optional Date Decoding Strategy
keyDecodingStrategyThe optional Key Decoding Strategy
Return Value
The decoded file
-
Get the JSON data from a file in the bundle
Declaration
Swift
func json(from file: String) -> StringParameters
fileThe JSON file
Return Value
The content of the JSON file
-
The release version number of the bundle
Declaration
Swift
var releaseVersionNumber: String -
The build version number of the bundle
Declaration
Swift
var buildVersionNumber: String -
The copyright of the bundle
Declaration
Swift
var copyright: String
View on GitHub