- Patent exhaustion. Once a patent owner sells a product, the patent owner cannot seek further patent payments for that particular product.
- First sale. You can also resell copies of works protected under copyright law. However, this rule may be "over-ridden" in some states where courts have held that software isn't sold; it's licensed and can only be 'resold' under the terms of an end-user license agreement.
Trademark law should not be an issue as long as you don't imply that Apple is affiliated with, supports, or endorses your endeavor.