-Disclaimer-
I\'m extremely new to iOS and Swift development, but I\'m not particularly new to programming.
I have a basic iOS
applicati
Here is a Swift 3 implementation, based on Nirav D's answer:
/// Read Plist File.
///
/// - Parameter fileURL: file URL.
/// - Returns: return plist content.
func ReadPlist(_ fileURL: URL) -> [String: Any]? {
guard fileURL.pathExtension == FileExtension.plist, let data = try? Data(contentsOf: fileURL) else {
return nil
}
guard let result = try? PropertyListSerialization.propertyList(from: data, options: [], format: nil) as? [String: Any] else {
return nil
}
print(result)
return result
}