Anti-trust law requires having a monopoly(which Apple doesn't have) or acting together with other companies. So in this case it's probably legal.
EDIT: that's basically the opinion of Keith Rabois, who litigated several anti-trust laws.
https://www.quora.com/Why-was-Microsoft-punished-for-violati...