How can my iPhone Objective-C code get notified of Javascript errors in a UIWebView?

后端 未结 10 2421
再見小時候
再見小時候 2020-11-29 16:31

I need to have my iPhone Objective-C code catch Javascript errors in a UIWebView. That includes uncaught exceptions, syntax errors when loading files, undefined variable re

10条回答
  •  南方客
    南方客 (楼主)
    2020-11-29 16:40

    I created a nice little drop-in category that you can add to your project... It is based on Robert Sanders solution. Kudos.

    You can dowload it here:

    UIWebView+Debug

    This should make it a lot easier to debug you UIWebView :)

提交回复
热议问题