def GetApplicationId(ios):
 temp_path = ('/Users/%s/Library/Application Support/iPhone Simulator/%s/Applications' % (os.environ['USER'], ios))
 try:
  output = subprocess.check_output(['find', '.', '-iname', 'viewfinder.app'], cwd=temp_path)
  if (len(output) is 0):
   raise IOError
  return output[2:(-16)]
 except (OSError, IOError) as e:
  print '\nYou are missing the 6.1 IOS simulator... You should update the xcode simulators (Product -> Destination -> More Simulators...).\n', e
  exit()

def GetApplicationId ( ios ) : temp_path = ( '/Users/%s/Library/Application Support/iPhone Simulator/%s/Applications' % ( os . environ [ 'USER' ] , ios ) ) try : output = subprocess . check_output ( [ 'find' , '.' , '-iname' , 'viewfinder.app' ] , cwd = temp_path ) if ( len ( output ) is 0 ) : raise IOError return output [ 2 : ( - 16 ) ] except ( OSError , IOError ) as e : print '\nYou are missing the 6.1 IOS simulator... You should update the xcode simulators (Product -> Destination -> More Simulators...).\n' , e exit ( )
given the version number of the ios sdk .