If it's a regular bike on an indoor trainer, there are various products that will protect a phone when it's mounted on the bike.

http://www.rei.com/c/bike-phone-moun...-on-bike-packs

If it's a stationary/spinning bike, I'm not sure what would work. Are you looking at the phone screen while you're spinning? If not, covering the phone with a towel when you're not looking at it should protect it. I keep a microfiber towel on the handlebar when I ride indoors to deal with sweat, but a regular hand towel would probably work too.