Apple is not forcing anyone to write iOS apps, Microsoft and IBM did not force anyone either. Still, the law acted, because anti-competitive market behaviour is illegal.
[1] https://www.ftc.gov/tips-advice/competition-guidance/guide-a...
However, it is true that some of Epic's claims were brought under Section 1 of the Sherman Act which do not necessarily require monopoly power. (Section 1 has to deal with unreasonable restraints of trade, whereas Section 2 deals with monopolies.)
Microsoft was also cited for forcing OEMs to pay for a license for Windows for each PC sold whether or not the PC shipped with Windows.
The MS case was different, but some elements are similar (use of private APIs; ability to choose default apps which is still not complete in iOS), and some are things MS never dreamt they could do.
The use of “private APIs” is a red herring. Every software developer for the last forty years knows about the concept of a public interface that they promise not to change and private implementation details. Some languages force it and others do it by convention.
My other point is that some Apple app store apps can use APIs that every other app would get banned for. People complained about that when it came MS; It's not better when Apple does it.
https://www.allaboutcircuits.com/news/how-compaqs-clone-comp...
No one could argue that IBM is any more than a bit player in PCs in 1983.
iMessage is not an “Apple Store app” any more than the phone app. Text messages and phone calls are kind of vital to be called a phone.
Whether or not Apple has a monopoly is irrelevant for the antitrust laws.
So even though there are some antitrust violations (e.g. price fixing or bid rigging) where monopoly power is indeed irrelevant, it is very specifically relevant in the context of Epic's lawsuit against Apple.
And Apple is not forcing anyone to write ios apps. They are curating a store. Should lawmakers dictate to Walmart which products to stock or how much to buy and sell them for?