Bike computer which connects to iPhone?
There are two ways to do this, either using a device with GPS which connects to an app on your phone via bluetooth or wifi at the end of the ride. In this case you can ride for as long as the battery on the bike computer, and your phone's battery is not used during the ride. E.g. Garmin Edge series or Wahoo.
The other way is to use the GPS from your phone connected using bluetooth to a computer. This gives a lower cost device.
E.g.,
https://www.cateye.com/intl/products/computers/CC-RD500B/
A full list of supported Strava devics is here
https://support.strava.com/hc/en-us/articles/223297187-How-to-get-your-Activities-to-Strava#devices
Very old GPS computers used to require you to use a USB cable to upload manually. Now they pretty much all have apps and the process is seamless. So be careful if buying a used GPS. I don't know about iPhone but whatever you buy you'd want to check that there is an iPhone app
E.g., this page shows the Wahoo Elemnt app on Iphone which automatically connects using the Wifi chip in the Wahoo elemnt computer to upload to Strava.
https://support.strava.com/hc/en-us/articles/218366788-Wahoo-ELEMNT-and-Strava