Apparently I have to get a Developer account, obtain a Developer ID certificate, sign every build with this certificate, and upload the build to Apple to have them "notarize" the signature.
The alternative is to teach my friend how to run obscure commands in the Terminal or disable this "Gatekeeper" (yes, such an unironic name) feature altogether, which requires some scary steps such as disabling SIP. I could be wrong about that last part, but I don't own a Mac so I'm more inclined to just not build software for it.
You’ll find an override toggle there. You can also use Right Click -> Open when launching the app. And no, you don’t need to disable SIP to disable Gatekeeper which can be done through sudo spctl —-master-disable.
The anywhere option is hidden by default, use sudo spctl —-master-disable from Terminal instead, which flips Gatekeeper settings to Anywhere.
Edit: there's also this path: https://apple.stackexchange.com/questions/415713/verify-code... which doesn't seem to activate Gatekeeper as part of the install process.
None of the other stuff you mentioned is necessary unless you need your users to avoid that.
It's really not that hard to see how many would lose a whole lot if this feature was available.
If side-loading was allowed and tons of users side-loaded pirated games I'm sure these users would gain, but would the developers? Wouldn't they call on Apple to stop this? I mean the headlines just write themselves: "Apple is complicit and profiting from piracy by selling phones on which it's trivial to install pirated games".
If people started installing random software they heard of on social media, how would the image of the iPhone be changed by the inevitable malware that people would install? "This new iOS virus steals your data and private photos".
What about all the spyware apps that would get side-loaded onto the phones of unsuspecting spouses? "Woman murdered by psycho ex who tracked her every move through her phone".
It takes a little bit more than "it's silly we would all only gain" to make this argument.
I'm not seeing any of these headlines with Android