You seem to be making a weird argument. Obviously Apple isn't allowed to sell a smartphone that contains a large chunk of plutonium, or that is fake and doesn't actually contain any electronics. There are limits to what corporations can do.
But they are free to choose the price. They can sell the next iPhone for $10,000 if they really wanted. Perfectly legal.
They are free to choose under which terms they license their intellectual property to third parties, so long as those terms are lawful.
No no no no. I'm making the argument that if the people of Ohgodplsnoistan pass a law that forbids Apple to sell their phone for anything above $200, that is legal. And that Apple can either cry and sell to my population of two people, or exit this market. In the same way, the government of Plsnoistan decides what is a legal license and what is not. Hell, I can pass a law that requires Apple to give out a free cookie to anyone buying one of their phones.
The point of all this is, Apple has absolutely no say in any of this. They are free to set the terms of their sales according to the law in the country, and that is it. It doesn't get anything more.
But they are free to choose the price. They can sell the next iPhone for $10,000 if they really wanted. Perfectly legal.
They are free to choose under which terms they license their intellectual property to third parties, so long as those terms are lawful.