Re: "At that rate, an on-prem M2 Pro Mac Mini pays for itself in about eight weeks"
I know where you are coming from, and I agree with a lot of what you say...but it depends on the type of app you're building and the kind of budget it requires. I feel like I have to point out the obligatory "most businesses are not huge budget Silicon Valley corporations" argument. That world is such a small bubble in the grand scheme of things. They don't set the industry standards, because they are not a large part of the industry in terms of what happens day to day in your average business...if anything, the practices of these massive businesses is weirdly, extremely boutique..
Most businesses are your local fish and chip shop, indian takeaways, independent shops, retailers, accountants, estate agents...you know...small businesses, where there entire business isn't an app. They don't have years of time and millions of dollars of budget to get an app developed, they aren't going to be visiting funding events to raise another round of capital investment etc...they just want to make it easier for Dave and his missus to get information in a convenient manner from an icon on their phone.
Down at ground level, here on Earth, most apps are built using cross platform technology like HTML and JS, because most businesses, like restaurants, independent retailers etc etc just want to get a front end published for their store front that is more convenient than visiting a website, most apps are not the next Facebook / Twitter / Amazon etc, they need to be developed relatively quickly and to a budget...and thus using HTML/JS you can go through the bulk of testing and development without ever being compiled for a specific platform each time. Low level hardware access, device specific API calls etc etc just don't happen here and building a "native" app is unnecessary and if you are properly following standards, it shouldn't be necessary to waste their time testing the same code across tons of devices all the time. It should only be necessary a few times at most. The other aspect to consider is that HTML and JS are standardised languages. If I build an app using those with Ionic and test it on Android and it works just fine, I can be at least 99% certain that i'll also run on iOS just fine not only because of the standardised languages, but also because I can test the app in Safari on any iOS device, because Safari uses exactly the same Javascript engine as the iOS webview...so I can break out my cheap ass, entry level iPad and test the app on that.
As for your other points...
"It takes several hours to get a Mac configured to build once, what with all the keys that need installing - most of which can't be done automatically as it deliberately requires a human in the loop"
Agreed, but you only have to do it once, if you know how to snapshot everything.
"And of course, to remote desktop into that cloud Mac you effectively need a Mac of your own anyway. The Windows/Linux VNC is so incredibly slow as to be almost unusable, and you can't do everything over SSH".
Kind of, but for the sort of app dev that I do, I can pretty much do everything I need from the CLI...because typically all I need to do install XCode (which can be installed from the command line), then Cordova, Ionic...whatever toolset I require...all of which (that I've used so far) can be installed from the command line...and once everything is there...I just need to run a command to build the app after I've dropped the project on the box. I generally only need to use a remote desktop if something has gone horribly wrong or I need to install a MacOS update or something...VNC is fine for that. I never actively work on the remote mac...Mac Remote Desktop, even if you use the native tools is, was and always will be shit.
"As to why Apple insist you need a Mac to compile for iOS - it's the only reason for Macs to still exist."
Agreed.
"If and when Apple permits building iOS apps under any other operating system, they're signalling the end of the Mac as we know it."
Not so sure, at some point in the future, they may have to do this to keep the Mac relevant and to open up the ecosystem to new audiences...if they did this, a Mac would become *more* appealling to me because I would feel a lot less confined.
Opening up .NET and allowing Windows executables to be compiled on Linux didn't hurt Microsoft. Allowing Apple apps to be compiled on Linux (or even BSD, which makes sense) won't hurt Apple either.
I think Apple has "proprietaried" itself into a corner...I don't think it could open things up even if it wanted to at this stage...it's ecosystem has become so proprietary that even Apple itself can't escape it.