design patterns on ios automation scripts