How to test iOS version of app on an Windows OS?

I am wondering how can i get package for iOS that can be installed on iOS device.
For android i can install Android Studio and generate APK file but how can i do this with iOS, using Windows OS?

I need Xcode i guess but it can only run on Mac OS, should i install macOS inside VM on my Windows machine and go from there? Will i be able to open ios project from Xcode inside my VM and generate file for iOS devices so i can test on them like i do for android?