Updated image capture to work on iOS