The first iPhone was the opposite of vertical integration. BOM was the same HW parts Nokia, Ericsson and the rest had access to. Samsung ARM SoC, Qualcomm modem, SK NAND, Sharp LCD, basic stuff. Apple had the OS, UX, SW and stuff like full feature HTML browser down to the T in ways that made Nokia and the rest feel like dinosaurs.
Nokia did seem to rely more on off-the-shelf SoCs so having a custom design I think did contribute in some part to the iPhone's success. It's true that the software was a massive part but Apple were able to make different trade-offs with power consumption, CPU power and GPU power that enabled that software to work that might not have been as practical with off-the-shelf SoCs at the time.