I've been using my iPhone 5c as a bike computer, mounted on my aerobars, for almost 4 years and I've never had a problem with vibration causing any damage to any functions of the phone.
For those that site battery problems when using a phone as a bike computer, this is a screenshot that I posted on another thread of one of my rides. It's from my almost 3 year old iPhone 5c with it's original battery. Connected to the phone is a RFLKT+, a Wahoo speed/cadence sensor and a heart rate monitor. If after a 3 hour, 50 mile ride you still need more than 66% battery life to make that emergency call you carry your phone for, than you should go with a Garmin or one of the other dedicated GPS bike computers.
__________________
HCFR Cycling Team
Ride Safe ... Ride Hard ... Ride Daily
2017 Colnago C-RS
2012 Colnago Ace
2010 Giant Cypress