You only need it for compiling. There are plenty of cross platform frameworks that dont require to develop with xcode - and that's good in my opinion.
I built all my apps this way and faced the same problem as OP - so had to buy a Mac mini. It was the cheapest option ~8 years ago and I still use it today for the same purpose - just for compiling. I assume there are probably more of us.