iPhones and other mobile phones have more gold per unit weight than almost any other consumer electronics, and they are much more valuable than gold ore
... if, and only if, they can be collected and processed in very high volume. Apple is not in the high volume business of smelting and refining iPhones, so of course it contracts with a subcontract electronics recycling industry that has existed for decades to recover gold. And that industry puts all gold-bearing electronics, e.g. mobile phones, circuit boards, connectors, into large process-efficient batches. A batch is smelted in copper, and after the copper is removed the residue is further refined for precious metal content. After all of this no one can trace a molecule of gold back to a specific source, but It is entirely possible that $40 million in gold from that industry is fairly attributable to recycled Apple iPhones. Whether Apple receives a payment for its collection and delivery of iPhones and other electronic scrap into the electronics recycling industry, or a credit against costs, seems irrelevant to its goal of putting raw materials back into commerce, rather than disposing of them.