Xcode is a normal application. I think you can get it from the App Store? It comes with all the permissions it needs, simulators, ability to connect to your devices etc. You don't need emacs or something like that.
People get this funny idea that coding is a fundamentally low-level activity in conflict with user protection. It isn't - it can be high-level. A compiler is a pure function!