[iOS] Code refactor