Apple store employees
Lauren DeCicca/Getty Images

Apple Store employees should be paid for the time they spend waiting for bag searches at the end of the shift, the California Supreme Court says.

The unanimous decision was released after the California court claimed that Apple violated state law by not compensating their workers for the time spent in security checks of bags and employees' iPhones.

The court concludes that "waiting for, and undergoing, mandatory exit searches of bags, packages, or personal Apple technology devices, such as iPhones, voluntarily brought to work purely for personal convenience is compensable as 'hours worked.'"

Apple's search process can take from five to 20 minutes for the search to be completed.

On the busiest days, it could take up to 45 minutes. Failure to comply with the process can result in termination of employment, according to court documents.

Under Apple's policy, retail store workers must submit to searches of their bags after clocking out but before leaving the store.

The policy also mandates the manager to conduct the search and to "ask the employee to remove any item that Apple may sell" and verify serial numbers of an employee's "personal technology."

The company argued that the workers could opt not to bring bags or personal Apple devices to work and avoid the searches.

Apple said that this policy benefited Apple store employees being searched. The court says it was "far-fetched."

The court said that the irony and inconsistency of Apple's argument must be noted.

"Its characterization of the iPhone as unnecessary for its own employees is directly at odds with its description of the iPhone as an 'integrated and integral' part of the lives of everyone else," the court was quoted.

A group of Apple store employees filed a class-action lawsuit against the company.

The U.S. Ninth Circuit Court of Appeals asked the state Supreme Court to determine whether California law requires employees to be compensated for this waiting time.

This was not the first time Apple had a clash with the California court.

In November 205, Apple won at the trial level in the U.S. District Court for the Northern District of California, which found Apple store employees chose to bring bags to work.

This means they subjected themselves to the company's search policy.

However, on appeal, the Ninth Circuit asked the state Supreme Court to interpret California law.

The Ninth Circuit rejected Apple's argument, stating that it was irrelevant.

"Those purported disputed facts pertain solely to individual remedies, not to the main legal question as to class-wide relief," the court was quoted.

The class-action lawsuit was brought on behalf of more than 12,000 current and former Apple store employees.

Brett Gallaway, a lawyer representing the workers, said they are very pleased with the Ninth Circuit's decision and believe it correctly resolved a long-standing and disputed liability issue.

Gallaway said they are also very proud of their team's ongoing efforts and persistence through the case.

.

Check these out:

Apple Watch Release Date, Price, Features, Specs News & Rumors: Available March, if Latest Apple Store Training Rumor is Correct

iOS 7 Apps & Apple Store: How App Creators Are Scamming Customers

Apple Store, TV, iPhone 6, iPad Air & iWatch: iTV and Other Apple Release Date Rumors