I tried the phone as a bike computer in the past. Any ride recording or navigational features chew up the battery way too fast. Then if you actually need to use the phone as a phone...can't because the battery is dead.
As cheap as bike computers are it's just better to buy one.
If you are interested I have Lezyne Super GPS for sale at half the price of a new one. Just send me a private message.
https://www.outdoorgearlab.com/revie...r-gps-enhanced