How can i find current webview context quickly in hybrid app test (iOS)?

Hi,

I use appium(1.2.4) to test a hybrid app, so i need to switch context to handle some webview operation.
My issue is that how can i found then current webview context.
In my python code:

  1. get all the context: context_list = driver.contexts
  2. if context_list too long, i need waste too many time to found which context i need.

In appium 0.x the current webview context always at last, so i can located context by “current_webview_context = driver.contexts[-1]” quickly. But in appium 1.x the current webview context is not always be the last one.
If have a simple way to found the current webview context quickly?