dataWithContentsOfURL error 256 in ios 6

为君一笑 提交于 2019-12-11 13:40:00

问题


I have used the

[NSData dataWithContentsOfURL:url options:NSDataReadingUncached error:&error]

in my code on iOS 5 apps (using xcode 4.3)

Now I want to get data from the same URL but for ios 6 apps (using xcode 4.5) and it gives me the 256 error (read error (reason unknown))

Any ideas?


回答1:


As I said in the comments and it now seems that this was the answer.

the URL needs to be a properly formed URL with the proper http:// identifier.



来源:https://stackoverflow.com/questions/12531558/datawithcontentsofurl-error-256-in-ios-6

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