In case you get the following error:
ERROR: ERROR: Failed to determine SDK version for iphonesimulator
xcrun: error: SDK "iphonesimulator" cannot be located
xcrun: error: SDK "iphonesimulator" cannot be located
xcrun: error: unable to lookup item 'SDKVersion' in SDK 'iphonesimulator'
First try