Ditto, the iPhone 4s as a starter. Very affordable now, can be used with no-contract prepaid data services, still compatible with plenty of apps.
And the 4s is rugged, much more so than it appears. A friend gave me his old 4s, and said he accidentally dropped it four or five storeys (outdoor stairwell, I think?) -- no damage. I've dropped it from waist height onto the pavement a couple of times, no damage. I've only replaced the first aftermarket protective case after a corner was cracked -- and it wasn't even one of those rubberized heavily padded armored cases, just a reasonably tough rigid plastic case. Phone itself is good as new. I've seen similarly sized and priced Android phones owned by family members break under similar circumstances. (No idea about the iPhone 5 or 6, haven't tried 'em.)
Cyclemeter free is a good starter app for cycling just to track data. Very easy to use. But it won't track some data, so eventually I'll upgrade to the paid version. I tried Strava, MapMyRide, Ride with GPS, etc., and didn't like 'em well enough to use more than a couple of times.
I don't even have a data plan for it yet -- I'm still using a prepaid flip phone for calls. I rarely use the phone other than for emergencies so I haven't been motivated to activate the iPhone. But it's still very useful for snapshots while I'm out riding; the GPS handles recording my rides (and has missed only one ride in three months -- first time it's failed to connect GPS); and as a mini-tablet with WiFi.
However, it's getting a bit more difficult to find accessories for the iPhone 4s, such as handlebar mounts. They're still available is unsold new/old stock on Amazon and other outlet vendors.
And some newer apps and newer versions of old apps aren't compatible with the 4s -- but the only incompatible app I've been interested in was for video editing, not something I'd do routinely with an iPhone. There are still good compatible older video editing apps.