At least 100,000 Apple devices, including iPhones and iPads, that were destined to be destroyed are actually in use, according to a new lawsuit by Apple that accuses its recycling partner of violating its orders.

Apple claims in its lawsuit, filed in Canada, that Canadian recycling company GEEP violated its contract by reselling the devices, instead of shredding them. Apple is seeking $30 million Canadian (about $23 million U.S.) from GEEP, according the lawsuit, which was filed in January but only recently came to light.

But the lawsuit raises new questions about the iPhone maker’s environmental practices, because Apple says it never destroys electronics that are still suitable for use. Apple said in the lawsuit that the devices sent to GEEP had been “repaired.” But Apple didn’t explain how they were repaired or make any specific allegations in the suit that the devices were damaged or unsafe to use. Apple spokesman Josh Rosenstock declined to say whether any repairs were made to or what was wrong with the devices Apple sent to GEEP.

Kyle Wiens, founder of repair website iFixit, was surprised by the revelation of Apple’s lawsuit against GEEP, which was first uncovered by Canadian news site the Logic. “This is amazing, because it brings this terrible shady activity by Apple out into the daylight,” Wiens wrote in an email. “Look at their environment report — they brag about finding phones internally at Apple that they can reuse! And then they’re forcing recyclers to shred perfectly usable devices.”

Rosenstock wrote in an emailed statement that Apple products have “industry-leading longevity” and that the company refurbishes “as many devices as we safely can each year, including over 10 million in the last year alone.” Products are recycled only after “rigorous testing” shows they don’t meet “industry-leading safety and quality standards,” he wrote, adding that no material from Apple products ever makes it to a landfill after being recycled.

In court documents, GEEP denied wrongdoing, claiming the alleged theft was carried out by rogue employees. GEEP, which was acquired by another recycling firm and is no longer in operation, is suing the alleged rogue employees, who have left the company. The former employees could not be reached for comment.

Apple and lawyers who represent GEEP declined to say whether anything was wrong with the devices or provide any additional comment on the allegations.

Apple for years has touted its efforts to reduce its environmental impact, advertising its recycling robots and its reuse of aluminum scrap metal in laptops. And, in a recent announcement, it said it would be carbon neutral by 2030. It even stopped shipping power chargers with some of its Apple Watches to cut down on waste, the company said, and industry analysts expect that Apple won’t ship headphones or chargers with some new iPhones.

Apple offers a trade-in program for old devices and promises users it will try to find a new owner for the old products. “You may be done with your device, but chances are it still has more to give. If it’s in good shape, we’ll help it go to a new owner. If not, we’ll send it to our recycling partner,” the company says on its website.

But a 2017 Motherboard investigation found that Apple outsourced the majority of its recycling to outside companies and that it contractually forced those companies to “shred” the old devices, prohibiting the recyclers even from salvaging components for reuse.

Rosenstock declined to say how many devices Apple sends to outside recyclers or how many it recycles in-house. He pointed out that Apple created its own recycling robots, called Daisy and Dave, one of which is able to disassemble 200 iPhones per hour. Rosenstock said Apple’s method for taking apart Apple products recovers more material from the devices than outside recycling companies. He wouldn’t say how many iPhones the robots have recycled.

Rosenstock also wouldn’t say what criteria Apple uses to determine whether an Apple device gets sent to a new user or ends up shredded or disassembled.

But making new consumer electronics products is harmful to the environment. Smartphone production consumed 968 terawatt hours of energy from 2007 to 2016, according to a Greenpeace report. That’s about as much energy as India’s 1.35 billion people consume in an entire year. Devices like phones also require the mining of rare-earth minerals, which have been tied to human rights abuses and can have ripple effects on the environment when the material pollutes groundwater and other resources.

Recycling old electronics devices may be better for the environment than throwing them into a landfill, but experts in electronics recycling say very few parts get reused in new devices. Rosenstock won’t say how much of a recycled iPhone gets reused.

Gary Cook, global climate campaigns director for Stand.Earth, an environmental advocacy organization, said Apple “outed themselves” in the lawsuit against GEEP, revealing information that he called “hard to come by.” “They’re interested in trying to drive sales of new phones rather than trying to enable the continued use of existing phones,” he said.

Cook and others say Apple does not do a good job of ensuring its devices are used as long as possible. That starts with how the phones are designed. Memory and batteries are glued into phones, making them inaccessible to owners, and the phones offer no upgrade capabilities, forcing many consumers to buy new phones earlier than they would normally want.

Apple could make it easy to replace batteries, memory, broken screens and other components, just as other manufacturers do. A company called Fairphone, for instance, allows its customers to upgrade components. When a better camera is released, customers can simply swap out the old one.

Apple uncovered that the 100,000 devices were allegedly still in use because it detected that they were reconnected to cellular networks, according to its lawsuit against GEEP.

GEEP employees allegedly went to great lengths to avoid shredding Apple devices, moving them into a part of the warehouse that avoided cameras and falsifying records to cover up the alleged theft, according to court filings. Many of the devices were eventually sent to China, the lawsuit says.

Apple alleges that many more devices may have been reused without Apple’s knowledge because they did not contain cellular chips.

According to court documents, GEEP conducted an internal investigation into allegations that the devices were resold. It admitted that the devices were reused. But John Longo, GEEP’s attorney, declined to say whether any of the devices resold were repaired or whether they posed any safety issue to consumers.

“These must-shred contracts happen all the time, and it drives recyclers crazy. They don’t want to destroy the hardware,” Wiens of iFixit said.

Recyclers say Apple isn’t alone in allegedly destroying electronics that could otherwise be reused. Recyclers who declined to be named because they have confidentiality agreements with consumer electronics companies, said companies sometimes destroy usable products because they are older and it would make it more difficult to sell the latest models. Used or blemished products being sold for less money can dilute a company’s premium brand, they say.

But companies also destroy devices that have embarrassing product defects they hope will not be discovered by the public, recyclers say. And sometimes, products have real safety issues, such as Samsung’s exploding batteries.

Another reason companies destroy items like smartphones is that they often contain personal data when they are discarded by consumers. But many recyclers have figured out ways to erase the phones of all their data so that they can be resold.

“We feel our software tools we develop do an equally good job as destruction,” said Craig Boswell, co-founder and president of Hobi International, an electronics recycling company. How often do companies take him up on the offer to wipe clean the devices and resell them? “Not as often as I’d like,” he said. “I’d like it 100 percent of the time.”