Yes you do not need to have a real iOS device, but you have to use manual signing method (turn off the automatically manage signing option). To do manual signing, prepare a certificate and provisioning profile using your developer account at https://developer.apple.com/account/resources/certificates/list and then:
In xCode signing & capabilities, then use the file as a provisioning profile for your app.
You'll find the instruction guiding you very straightforward at the website.