You pretty much have to use Xcode or Apple provided toolchain for building iOS apps.
You do not have to use Apple toolchain for building macOS apps, if you are content with the fact, that your binaries might be broken in future macOS releases. With point releases, even. For a case study, see golang.
You do not have to use Apple toolchain for building macOS apps, if you are content with the fact, that your binaries might be broken in future macOS releases. With point releases, even. For a case study, see golang.