Adding automatic udid detection to iOS

Fix #1019