move more iOS stuff into the main engine