I'm far from one to defend Apple on most things, but is Apple doing anything intentionally malicious here?
In the United States, forcing someone to write code is compelled speech, which is a violation of the First Amendment. I'm not aware of laws in France, but in any case, this seems like a completely wrong approach to solving this problem.
The real problem here is Apple's proprietary platform.