I've just updated to Xcode 8 and iOS 10 (using legacy Swift Language Version).
Trying to compile again my project has been an agony, even still using the old Swift syntax. This time one of my functions uses NSBundle(forClass: self.dynamicType)
but now appears that .dynamicType
is deprecated and Xcode doesn't even want to compile it.
His suggestion is to use type(of: self)
but that fails as well. Anyone knows the solution? Thanks.
NSBundle(forClass: self.dynamicType)
compiles fine for me in Swift 2.3, are you sure "Use Legacy Swift Language Version" is set to "Yes"? You could always try cleaning your build folder. – Richart