Fix extension.xml and made the ios code look nicer.