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.
- Gray 2010 carbon WSD road bike, Rivet Independence saddle
- Red hardtail 26" aluminum mountain bike, Bontrager Evoke WSD saddle
- Royal blue 2018 aluminum gravel bike, Rivet Pearl saddle
Gone but not forgotten:
- Silver 2003 aluminum road bike
- Two awesome worn out Juliana saddles