xcode - Swift Radio App--What to do about non-standard link? -


i'm working on swift app in xcode play radio station. however, radio station's streaming link non-standard, numbers in it. how able use link stream from? thank much!

https://us8.listen2myradio.com:2199/tunein/ghloisvo.pls

the number port. can retrieve stream via nsurlsession/nsurlsessionstreamtask. generic form of url is:

protocol://servername:port/relative_url?query_string 

if protocol http, port defaults 80. if protocol https default port 443. can override port though whatever value server running.

something along these lines might work:

let session = nsurlsession.sharedsession() let task = session.streamtaskwithhostname("us8.listen2myradio.com", port: 2199)