/ / String (contentsOfURL :) dans Swift 3 - swift, string, swift3

String (contentsOfURL :) dans Swift 3 - swift, string, swift3

Ce code d'avant:

if let resultOfURL = try? String(contentsOfURL:myURL!, encoding: String.Encoding.utf8) {

Lance maintenant cette erreur:

"init" has been renamed to "init(describing:)"

De l'aide? Merci beaucoup!!

Réponses:

9 pour la réponse № 1

Selon le guide de migration Swift 3,

Les utilisateurs peuvent avoir besoin de migrer manuellement les appels vers String (contentsOfURL: usedEncoding :) vers String (contentsOf: usedEncoding :)