Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIWebView Frame Load Interrupted

Tags:

ios

uiwebview

mp3

We have mp3 files stored on online and our iOS app loads them in a web view. This worked fine in the past but it appears that recently (8.4?) that it no longer works and instead fails with this error.

Loading these URL works in Mobile Safari but not in UIWebView. If anyone could shed some light on this that would be greatly appreciated!

Thanks!

like image 678
Jonathan Brown Avatar asked Jul 11 '15 06:07

Jonathan Brown


2 Answers

Turns out that it only happens on the simulator. On a device it works fine :)

like image 150
Jonathan Brown Avatar answered Nov 04 '22 11:11

Jonathan Brown


I've got a similar problem and I think I'm on something so could you check the Content-Type header ?

func HeaderFromNSURL(url: NSURL) {
    println("TEST      HEADER")
       for header in NSURLRequest(URL:url).allHTTPHeaderFields! as! [String : String] {
           println("key:  " + header.0 + "   content" + header.1)
       }
    println("/////////////////////////////////////")
}

Mine doesn't contain the good header Content-type I think it's a redirection problem

like image 45
kholl Avatar answered Nov 04 '22 11:11

kholl