The file couldn’t be opened because URL type http isn’t supported

谁说我不能喝 提交于 2019-12-05 11:30:18

There are two things to know here:

  • In iOS 9, by default, http:// is not supported. You must communicate securely (with https://). You can turn off this feature in your Info.plist if you have to.

  • NSFileManager URLs must be paths to files on disk — that is, they must be file URLs. Yours is not; it's an http:// URL. If your goal is to download a file and then copy it somewhere, use NSURLSession's download task.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!