How does phoneGap (Cordova) work internally, iOS specific

前端 未结 2 707
粉色の甜心
粉色の甜心 2021-02-07 21:46

I have started developing html applications for mutliple platforms. I recently heard about Cordova 2.0(PhoneGap) and ever since I have been curious to know how the bridge works.

2条回答
  •  猫巷女王i
    2021-02-07 22:25

    I am trying to figure this out in more detail, too. Basically there are 2 Methods on the iOS side that can help ...

    • - webView:shouldStartLoadWithRequest:navigationType: and
    • - stringByEvaluatingJavaScriptFromString:script

    From the sources it seems cordova sends a "READY" message using webView:shouldStartLoadWithRequest:... and then picks up results with the second message, but I am not sure.

    Cordova Sources iOSExec

    There is much to learn there.

提交回复
热议问题