Check URL validity

后端 未结 3 859
醉梦人生
醉梦人生 2020-12-10 00:34

Can someone confirm that -checkResourceIsReachableAndReturnError: method of NSURL is working as expected. I have tried using it for known URLs and

3条回答
  •  爱一瞬间的悲伤
    2020-12-10 01:01

    According to NSURL Class Reference

    Returns whether the resource pointed to by a file URL can be reached.
    ...
    Discussion
    This method is unimplemented in iOS, so it performs no operation

    So it only works for file URLs (which your URL probably isn't) and it only works on Mac OS X anyway.

提交回复
热议问题