bin/templates/scripts/cordova/lib/build.js
function getDefaultSimulatorTarget () {
    return require('./list-emulator-build-targets').run()
        .then(function (emulators) {
            var targetEmulator;
            if (emulators.length > 0) {
                targetEmulator = emulators[0];
            }
            emulators.forEach(function (emulator) {
                if (emulator.name.indexOf('iPhone') === 0) {
                    targetEmulator = emulator;
                }
            });
            return targetEmulator;
        });
}
function getDefaultSimulatorTarget () {
    return require('./list-emulator-build-targets').run()
        .then(function (emulators) {
            var targetEmulator;
            if (emulators.length > 0) {
                targetEmulator = emulators[0];
            }
            emulators.forEach(function (emulator) {
                if (emulator.name.indexOf('iPhone') === 0) {
                    targetEmulator = emulator;
                }
            });
            return targetEmulator;
        });
}
function getDefaultSimulatorTarget ( ) { return require ( './list-emulator-build-targets' ) . run ( ) . then ( function ( emulators ) { var targetEmulator ; if ( emulators . length > 0 ) { targetEmulator = emulators [ 0 ] ; } emulators . forEach ( function ( emulator ) { if ( emulator . name . indexOf ( 'iPhone' ) === 0 ) { targetEmulator = emulator ; } } ) ; return targetEmulator ; } ) ; }
Returns a promise that resolves to the default simulator target; the logic here
matches what `cordova emulate ios` does.

The return object has two properties: `name` (the Xcode destination name),
`identifier` (the simctl identifier), and `simIdentifier` (essentially the cordova emulate target)

@return {Promise}
Returns a promise that resolves to the default simulator target ; the logic here matches what cordova emulate ios does .