Replaced with `for` loop:
https://github.com/wrightt/ios-driver/blob/73f2912d0f6b57f72cb1c6bd4c99599e50e1a3f0/common/src/main/java/org/uiautomation/ios/IOSCapabilities.java#L342