dataWithContentsOfURL error 256 in ios 6

2019-07-29 09:34发布

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条回答
Bombasti
2楼-- · 2019-07-29 09:52

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.

查看更多
登录 后发表回答