Apple’s long-rumored foldable iPhone is set to arrive next year, and already faces some preemptive competition from Samsung.