Xcodebuild error: Unable to find a destination

When I try to build using ionic cordova build ios I’ve started getting this error. Any idea how to solve it?

xcodebuild: error: Unable to find a destination matching the provided destination specifier:
		{ platform:iOS Simulator, OS:latest, name:iPhone X }

	The requested device could not be found because multiple devices matched the request.

	Available destinations for the "HotCoinPro" scheme:
		{ platform:iOS Simulator, id:227A48A5-548E-45C9-A781-F6834B1D6CAC, OS:11.2, name:iPad (5th generation) }
		{ platform:iOS Simulator, id:CB8C11EF-AD6A-4782-A1E2-BF2265DA6D04, OS:11.2, name:iPad (5th generation) }
		{ platform:iOS Simulator, id:A5BAB50B-A592-4F03-83E0-8A0AD9D773CA, OS:9.3, name:iPad 2 }
		{ platform:iOS Simulator, id:35F50584-C5FB-4AD1-B240-679F83EC0FF2, OS:9.3, name:iPad Air }
		{ platform:iOS Simulator, id:517FF799-AC64-478D-998C-57DFCA3D25FA, OS:10.0, name:iPad Air }
		{ platform:iOS Simulator, id:C9682554-B32F-48C0-8F09-176EA45B3D5C, OS:10.1, name:iPad Air }
		{ platform:iOS Simulator, id:04049791-83DB-4B82-A2AD-2881A6291DE7, OS:11.2, name:iPad Air }
		{ platform:iOS Simulator, id:3EC95F4A-7FD5-44DB-8E31-18727F27F7DD, OS:11.2, name:iPad Air }
		{ platform:iOS Simulator, id:751C77AD-F643-419B-A2A4-D97CBD00FD0E, OS:9.3, name:iPad Air 2 }
		{ platform:iOS Simulator, id:44E6D70E-2012-46A2-983E-3B7A3C9045EF, OS:10.0, name:iPad Air 2 }
		{ platform:iOS Simulator, id:9052EC0C-82F6-4DA1-904E-C8CBEE9DF680, OS:10.1, name:iPad Air 2 }
		{ platform:iOS Simulator, id:943B7D69-7D50-4788-8D46-6C6B7D5EBC81, OS:11.2, name:iPad Air 2 }
		{ platform:iOS Simulator, id:C86FE759-7448-4020-9961-82D0E22B12A2, OS:11.2, name:iPad Air 2 }
		{ platform:iOS Simulator, id:28352972-2762-4D8A-9709-CC5992DE81F6, OS:9.3, name:iPad Pro }
		{ platform:iOS Simulator, id:9743F153-54A1-4CD3-8954-2DD1D8696DCA, OS:10.0, name:iPad Pro (9.7 inch) }
		{ platform:iOS Simulator, id:D772D4DE-BED3-4E22-9365-2257B76A8926, OS:10.1, name:iPad Pro (9.7 inch) }
		{ platform:iOS Simulator, id:05BAF015-1D59-43A2-A318-2F00E53BD7F3, OS:11.2, name:iPad Pro (9.7-inch) }
		{ platform:iOS Simulator, id:575F0976-8EA6-4C17-A240-CE478B764328, OS:11.2, name:iPad Pro (9.7-inch) }
		{ platform:iOS Simulator, id:719BB0D4-6191-47A2-AA38-C4C4617051CD, OS:11.2, name:iPad Pro (10.5-inch) }
		{ platform:iOS Simulator, id:DF5DC191-14BC-4DC8-A478-2444446089F7, OS:11.2, name:iPad Pro (10.5-inch) }
		{ platform:iOS Simulator, id:1F4FB1C3-8371-4095-B74D-48F3D647F733, OS:10.0, name:iPad Pro (12.9 inch) }
		{ platform:iOS Simulator, id:2A193754-0B0B-435A-8C93-33326AAD2E0F, OS:10.1, name:iPad Pro (12.9 inch) }
		{ platform:iOS Simulator, id:0752FDD9-1D29-4CE1-A4A9-812D3405BE29, OS:11.2, name:iPad Pro (12.9-inch) }
		{ platform:iOS Simulator, id:E4A579CE-0545-4F3B-93D4-685E56BEF913, OS:11.2, name:iPad Pro (12.9-inch) }
		{ platform:iOS Simulator, id:393FD8D3-E807-4DCA-B35F-0E578CE5A45F, OS:11.2, name:iPad Pro (12.9-inch) (2nd generation) }
		{ platform:iOS Simulator, id:22DF6314-69C2-4CA8-A986-F7B89D544C7D, OS:9.3, name:iPad Retina }
		{ platform:iOS Simulator, id:599A0265-ED98-4C11-8CC5-3057C5016E1A, OS:9.3, name:iPhone 4s }
		{ platform:iOS Simulator, id:4AFAB220-813F-4AB5-A47B-EFC6B68F4F5F, OS:9.3, name:iPhone 5 }
		{ platform:iOS Simulator, id:02429287-08D9-43D3-A039-1BBCEB2200AE, OS:10.0, name:iPhone 5 }
		{ platform:iOS Simulator, id:DA1FB4DA-B1A3-434F-8830-1E796BBACB4B, OS:10.1, name:iPhone 5 }
		{ platform:iOS Simulator, id:184E8BB1-7C82-4C47-947D-11AB8374E497, OS:9.3, name:iPhone 5s }
		{ platform:iOS Simulator, id:C74B2C85-618A-4AE7-B76A-659D4D333283, OS:10.0, name:iPhone 5s }
		{ platform:iOS Simulator, id:829FC909-34EA-4CEA-A809-3E06D5B3290E, OS:10.1, name:iPhone 5s }
		{ platform:iOS Simulator, id:9FA131BF-F167-4DB1-9E2B-A776EE4D3B7B, OS:11.2, name:iPhone 5s }
		{ platform:iOS Simulator, id:C9DF1387-0DFE-465C-AB21-5EDB85D27C66, OS:11.2, name:iPhone 5s }
		{ platform:iOS Simulator, id:E08657A4-EB48-4966-BA1E-20EA6F5DF977, OS:9.3, name:iPhone 6 }
		{ platform:iOS Simulator, id:26EFAF66-1087-4397-924E-0086A0F1119D, OS:10.0, name:iPhone 6 }
		{ platform:iOS Simulator, id:1506F093-812A-4921-98CB-B34DB64E9CE7, OS:10.1, name:iPhone 6 }
		{ platform:iOS Simulator, id:408DD78E-C1C6-4B2C-B1DD-109BE06E9471, OS:11.2, name:iPhone 6 }
		{ platform:iOS Simulator, id:D974B06F-172F-40C4-ADDE-9911CA7AFFC2, OS:11.2, name:iPhone 6 }
		{ platform:iOS Simulator, id:2F940048-750F-470A-A79D-2270E4C7AB88, OS:9.3, name:iPhone 6 Plus }
		{ platform:iOS Simulator, id:6358FC1A-F0B2-4BDB-AFB5-003C114E1FB8, OS:10.0, name:iPhone 6 Plus }
		{ platform:iOS Simulator, id:2047D03E-672D-4C54-8965-F4914796402C, OS:10.1, name:iPhone 6 Plus }
		{ platform:iOS Simulator, id:9125560E-40A3-426C-9315-50866F698C62, OS:11.2, name:iPhone 6 Plus }
		{ platform:iOS Simulator, id:E1F4B783-96C6-4DAB-83D7-E39DD5950515, OS:11.2, name:iPhone 6 Plus }
		{ platform:iOS Simulator, id:26F97BAD-F9EE-42AB-99F7-21BC5CFA722F, OS:9.3, name:iPhone 6s }
		{ platform:iOS Simulator, id:26337FAC-37CA-4CD2-8BD6-59EDC390957D, OS:10.0, name:iPhone 6s }
		{ platform:iOS Simulator, id:258E9E7D-6895-4189-81F0-8779836D059E, OS:10.1, name:iPhone 6s }
		{ platform:iOS Simulator, id:213AD0B1-3A72-448B-A9EE-A6D64CEF0F05, OS:11.2, name:iPhone 6s }
		{ platform:iOS Simulator, id:23C86325-68C4-4919-BF75-F6BFAFC43B3F, OS:11.2, name:iPhone 6s }
		{ platform:iOS Simulator, id:003BF292-0314-4766-85A1-92B4D608EA0D, OS:9.3, name:iPhone 6s Plus }
		{ platform:iOS Simulator, id:85E4D2EC-BC21-40EE-AC65-0ED0C1C57776, OS:10.0, name:iPhone 6s Plus }
		{ platform:iOS Simulator, id:4B238D23-5EC0-44A9-99F7-A5911D6837FB, OS:10.1, name:iPhone 6s Plus }
		{ platform:iOS Simulator, id:82AD444E-D744-4A96-9976-766DB9FB0C82, OS:11.2, name:iPhone 6s Plus }
		{ platform:iOS Simulator, id:C86BE039-167B-4B33-9A7E-326BE55DF7F9, OS:11.2, name:iPhone 6s Plus }
		{ platform:iOS Simulator, id:E0897B01-D55B-4CB1-9650-C41B3EE6AEC2, OS:10.0, name:iPhone 7 }
		{ platform:iOS Simulator, id:24F072B9-32D0-463E-8728-80713849C15B, OS:10.1, name:iPhone 7 }
		{ platform:iOS Simulator, id:974A5290-DAAC-439E-BCAB-FE918C071033, OS:11.2, name:iPhone 7 }
		{ platform:iOS Simulator, id:A39FA114-8921-40E7-BF37-B1D1C2EFA61D, OS:11.2, name:iPhone 7 }
		{ platform:iOS Simulator, id:96B467D4-A590-494A-91DD-68A82B850A07, OS:10.0, name:iPhone 7 Plus }
		{ platform:iOS Simulator, id:7D59BC8E-E86F-4743-A061-7229ABF0C59A, OS:10.1, name:iPhone 7 Plus }
		{ platform:iOS Simulator, id:B5DB3A2F-8CAE-426F-A4F7-785792B01CB5, OS:11.2, name:iPhone 7 Plus }
		{ platform:iOS Simulator, id:CB2608A0-6E41-434E-919F-0547AE57079E, OS:11.2, name:iPhone 7 Plus }
		{ platform:iOS Simulator, id:47E0AAD3-137A-41E5-9D0E-B410DE4162C5, OS:11.2, name:iPhone 8 }
		{ platform:iOS Simulator, id:D3A30E8B-A846-4EA7-A084-A9BD600847A7, OS:11.2, name:iPhone 8 }
		{ platform:iOS Simulator, id:0185B40F-1F30-47C3-B459-86C1622FC49E, OS:11.2, name:iPhone 8 Plus }
		{ platform:iOS Simulator, id:A95516A5-FFE7-4162-98B1-D1210E4AA46D, OS:11.2, name:iPhone 8 Plus }
		{ platform:iOS Simulator, id:546EAD6C-AA1F-4D13-BCC8-C4F69649E483, OS:10.0, name:iPhone SE }
		{ platform:iOS Simulator, id:1658F86A-4304-42E5-A975-30099B10AE1F, OS:10.1, name:iPhone SE }
		{ platform:iOS Simulator, id:861727DA-1524-4183-9FC1-C165F6CCA155, OS:11.2, name:iPhone SE }
		{ platform:iOS Simulator, id:EE0FE788-1EB3-40F6-93E4-0A2CF8469FDE, OS:11.2, name:iPhone SE }
		{ platform:iOS Simulator, id:826C9D10-E3DC-4DA3-B4A9-E3D6576A437B, OS:11.2, name:iPhone X }
		{ platform:iOS Simulator, id:A31F399E-90CD-428F-8D21-3EF9F76B9E4D, OS:11.2, name:iPhone X }

	Ineligible destinations for the "HotCoinPro" scheme:
		{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Generic iOS Device }
		{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Generic iOS Simulator Device }
Error: Error code 70 for command: xcodebuild with args: -xcconfig,/Users/mbeckett/sites/apps/hotcoinpro/platforms/ios/cordova/build-debug.xcconfig,-workspace,HotCoinPro.xcworkspace,-scheme,HotCoinPro,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone X,build,CONFIGURATION_BUILD_DIR=/Users/mbeckett/sites/apps/hotcoinpro/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/mbeckett/sites/apps/hotcoinpro/platforms/ios/build/sharedpch

[ERROR] An error occurred while running cordova build ios (exit code 1).

ok, I’ve found the workaround (that works for me anyway), it’s the --device flag

ionic cordova build ios --device