A US district court, presided over by Judge Yvonne Gonzalez Rogers, has ruled in an antitrust lawsuit against some of Apple’s App Store restrictions on how developers can collect payments in apps.

The lawsuit was filed by Epic Games, the creator of a game called Fortnite.

The ruling bars Apple from preventing developers from providing buttons or links in their apps that direct customers to other ways to pay outside of Apple’s own in-app purchase system, which charges developers commissions of up to 30%.

It also said that Apple cannot ban developers from communicating with customers via contact information that the developers obtained when customers signed up within the app.

This comes after a three-week long trial in May before Judge Gonzalez Rogers of the northern district court of California.

Reports said the ruling caused a 2.5% drop in Apple shares.

Apple had always prohibited developers from telling users about other places they can go to pay the developer directly rather than using Apple’s payment mechanisms.

But Judge Gonzalez Rogers issued a nationwide order that allows developers to put into their apps “buttons, external links, or other calls to action that direct customers to purchasing mechanisms”.

She however did not grant Epic Games some of its other wishes, such as forcing Apple to open the iPhone up to third-party app stores.

Reuters reported that the judge ruled that Epic failed to demonstrate Apple is an illegal monopolist, but did show the smartphone giant engaged in “anticompetitive conduct” under California laws.

The judge issued a nationwide injunction blocking Apple “anti-steering provisions”, which are rules that limit app developers from pointing users outside of Apple’s ecosystem.

The judge said these rules “hide critical information from consumers and illegally stifle consumer choice.”