We had working code a few years ago, for a seldom used feature (streaming the camera image from a VIRB 360 camera).
Trying to get it working again, but when I use a URLSession Data task to try and connect to this URL:
rtsp://192.168.0.1/livePreviewStream?maxResolutionVertical=0
I get an error: Code=-1002 "unsupported URL"
I vaguely remember trying to add permissions in the Info.plist for the local network, but it turned out for "http" we didn't need .t (so it got removed).
But now I can't find a reference to it.
Does the above error code look like its related to permissions? If not what?
Thanks for any pointers!
David
First up, the URL you posted seems like it’s on the local network, in which case local network privacy is definitely going to be a concern. See the Local Network Privacy FAQ for more on that.
Second, you wrote:
when I use a
URLSession
data task to try and connect to this URL:
rtsp://192.168.0.1/livePreviewStream?maxResolutionVertical=0
I get an error:
Code=-1002 "unsupported URL"
That’s expected. Error -1002 is NSURLErrorUnsupportedURL
, which makes sense because URLSession
does not have built in support for rtsp
URLs. AFAIK it’s never had this support. It’s possible that some other part of your code has added that support using an NSURLProtocol
subclass.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"