lib/simulator-management.js
async function createSim (caps, platform = PLATFORM_NAME_IOS) {
  const appiumTestDeviceName = `appiumTest-${UUID.create().toString().toUpperCase()}-${caps.deviceName}`;
  const udid = await createDevice(
    appiumTestDeviceName,
    caps.deviceName,
    caps.platformVersion,
    { platform }
  );
  return await getSimulator(udid);
}
async function createSim (caps, platform = PLATFORM_NAME_IOS) {
  const appiumTestDeviceName = `appiumTest-${UUID.create().toString().toUpperCase()}-${caps.deviceName}`;
  const udid = await createDevice(
    appiumTestDeviceName,
    caps.deviceName,
    caps.platformVersion,
    { platform }
  );
  return await getSimulator(udid);
}
Capability set by a user

@property {string} deviceName - A name for the device
@property {string} platformVersion - The version of iOS to use
 
Create a new simulator with `appiumTest-` prefix and return the object.

@param {object} SimCreationCaps - Capability set by a user. The options available are:
@property {string} platform [iOS] - Platform name in order to specify runtime such as 'iOS', 'tvOS', 'watchOS'
@returns {object} Simulator object associated with the udid passed in.