Apple has been sued by three consumers who allege that the company violated their privacy by sharing information about their music listening habits with third parties. The lawsuit, which was filed late last week in California, alleges that Apple has been selling this type of data directly, while also giving iOS app developers access to a treasure trove of related data.

The plaintiffs, who live in Rhode Island and Michigan, are seeking class-action status for their lawsuit. If found guilty, Apple could be forced to pay damages to residents of the two states who had their music listening habits disclosed due to the company’s actions. Apple spokespeople didn’t immediately respond to a request for comment.

One of the allegations is that Apple directly sold data about consumers who purchased music from the company to data brokers, who in turn have been connecting this type of data to other publicly available information and then reselling it to marketers.

As evidence for this claim, the lawsuit lists the existence of direct marketing lists that identify consumers as “iTunes and Pandora music purchasers.” However, there doesn’t seem to be any acknowledgement in the filing that data brokers could have gained access to that type of purchasing data through other means, including for instance third-party loyalty programs.

The second claim made in the lawsuit could potentially be more explosive: Plaintiffs allege that the company has given developers of iOS apps access to a range of data about media stored on iPhones, iPads and iPods. This data includes songs and albums purchased from Apple’s iTunes store, according to the lawsuit.

Combined with data consumers provide when they sign up for an app, developers could use this data to build out their own profiles on the music purchasing behavior of countless of consumers, the lawsuit alleges. Developers could then turn around and resell that type of data to data brokers, according to the lawsuit.

The lawsuit’s allegations run counter to Apple’s official narrative, which has long been that the company is a lot more privacy-focused than its industry competitors. In fact, the lawsuit also includes a picture of an Apple billboard proclaiming that “what happens on your iPhone, stays on your iPhone.”

However, the challenge for plaintiffs will be to prove that they actually were harmed by Apple’s alleged behavior. In the past, similar lawsuits against the company have been thrown out because plaintiffs and their lawyers ultimately couldn’t prove such harm.