Communication between iOS's native app and webpage's javascript

后端 未结 6 1784
深忆病人
深忆病人 2021-02-01 11:10

I have a webpage loaded in a UIWebView, and a javascript function of the page needs to data from native iOs app, a NSString. How can a Js function access the data in native app

6条回答
  •  名媛妹妹
    2021-02-01 11:18

    I created an iOS/JS library to help make this easier -- that is, communication in both directions using similar methods. You can check it out here: https://github.com/tcoulter/jockeyjs

提交回复
热议问题