There's a serious problem in Apple's whole pricing model regarding development tools and apps distribution and hosting in the App Store. They set it up so that development tools (like Xcode) are virtually free and free apps can be hosted for free (barring the yearly membership fee). That pricing model is flawed because Apple end up not making a profit for their development tools and for hosting free-apps in the App Store unless they overcharge developers of paid apps (and free apps with IAP). This is very unfair as some developers wish to use their own IAP system and obviously no developer wants to be overcharged.
Also, the whole revenue sharing business model is unfair. Apple claims developers owe them part of their success and they measure that success by revenue. That is highly inaccurate, as more revenue doesn't necessarily mean better value from the App Store or Apple's services and products. There are many reasons for an app to make more (or less) revenue. Meanwhile, free apps are making revenue in different ways and Apple sometimes make no profit out of them. So Apple's solution was to overcharge developers and force them to use Apple's own services to cover up for their flawed business model.
The solution is very simple: Apple should start charging developers for development tools and for hosting free-apps in the App Store. If you get a product (Xcode) you pay for it. If you get a service (host your free app in the App Store) you pay for it. The more attention your app gets in the store - the more you pay, regardless of revenue or whether the app is free or not. Stop digging into the developers' wallets and use more accurate data to decide how much developers should pay you.
The idea that free apps can be hosted in the App Store for free dates back to when IAP didn't even exist and advertising in apps was in its infancy. Developers either made money by selling apps or they didn't make much money at all. Things have changed over the years and instead of Apple (and Google) adapting their business models to changes in technology, they just quietly kept charging developer 30%, probably because they know it yields a much bigger profit for them. They managed to pull it off for many years but now people are starting to notice and I hope both Apple and Google stop practicing these shady techniques and start charging developers fairly.
BTW, considering the expensive 30% commission, you'd think Apple would have provided a great service to their developers but that's not always the case. Developers are being forced to wait for months to be enrolled to the Apple Developer Program and Apple don't seem to care:
https://developer.apple.com/forums/thread/126314