MobileChromeApps / chrome-app-developer-tool

Mirror of Apache Cordova app harness
Other
202 stars 33 forks source link

iOS: cca push closes remote web inspector #44

Closed agrieve closed 9 years ago

agrieve commented 10 years ago

Each time a new push happens to CADT running on iOS, remote web inspector closes. This is super annoying to have to re-open after each push.

The reason is that the UIWebView used for the app is being destroying & recreated rather than recycled like it is on Android.

@mwoghiren

mwoghiren commented 10 years ago

@agrieve, please take a look at the two recent commits on this branch.

I added a reload function to AppHarnessUI, which reloads its webview. Then, whenever an app is launched, we check whether it's the same as the existing app (which is the case for cca push --watch launches); if it is, we just reload instead of launch. (Launch quits the app, destroys the webview, etc.)

Eventually, it'd probably be good to preserve the webview all the time, but that's a little more work and a small portion of use cases.

mwoghiren commented 10 years ago

Updated to obey changed start urls and plugin data. The plumbing is there to handle a webview type change on Android, but isn't handled yet. That will necessitate creating a new webview even if reloading.

agrieve commented 9 years ago

@mwoghiren - this is fixed?

mwoghiren commented 9 years ago

I believe so. I'll verify it with the released stuff tomorrow, and then close this accordingly.

mmocny commented 9 years ago

poke. (Don't have iOS device to verify just at the moment.)

mwoghiren commented 9 years ago

Oops. I'll verify tomorrow (for real this time).

agrieve commented 9 years ago

I used this for my devoxx talk. Worked like a charm!