Standalone cameras have been doing this for at least a decade. The same is true for nighttime exposures. That's not to say that the iPhone doesn't do it better, maybe it does, it certainly can throw more processing power at it.
https://www.imaging-resource.com/PRODS/sony-a3000/sony-a3000...