I've already used this method in Swift 2
var myDict: NSDictionary?
if let path = NSBundle.mainBundle().pathForResource("Config", ofType: "plist") {
myDict = NSDictionary(contentsOfFile: path)
}
But don't know how to read plist in Swift3 without using NSDictionary(contentsOfFile: path)
The native Swift way is to use
PropertyListSerialization
You can also use
NSDictionary(contentsOf:
with a type cast:but you explicitly wrote: without using NSDictionary(contentsOf...
Basically don't use
NSDictionary
without casting in Swift, you are throwing away the important type information.