Rewrite iOS support for appium 1.0