Also, a standard inductive sensor (i.e. a magnet attached to a spoke and an inductor) attached to the raspberry pi would be a much better option.
Inductive sensors are cheaper, simpler and more foolproof; cyclists have used them for decades to gather both wheel speed and cadence.
Also, Apple would certainly include a Lightning->Headphone adapter that would also be usable for card readers. They just use the line in from the microphone.