[iOS] Update test logic for robustness