Reputation: 4176
This code from before:
if let resultOfURL = try? String(contentsOfURL:myURL!, encoding: String.Encoding.utf8) {
Is now throwing this error:
'init' has been renamed to 'init(describing:)'
Any help? Thanks so much!!
Upvotes: 5
Views: 5194
Reputation: 941
According to the Swift 3 Migration Guide,
Users may need to manually migrate calls to String(contentsOfURL:usedEncoding:) to String(contentsOf:usedEncoding:)
Upvotes: 9