We live in the south so moist, humid, foggy days are standard, but even if you don't live near a swamp you are probably still familiar with the fog emanating from your bathroom. We're increasingly bringing our gadgets everywhere with us and the bathroom is no exception (how else will we have jams to sing in the shower to). But with steam of any kind screens tend to get obscured by an opaque sheen, making it hard to see what you're doing. A cheap and easy solution: glycerin.
Anti-fog products already exist on the market. For divers this product is often known as "spit", because it's well, spit. We're not too keen on spitting on our iPhones, though you might be. Essentially they all work the same way, by coating the surface so that the condensation has nothing to adhere to. Outside of spit there are a few products you can get, but many have their basis in glycerin so why not cut out the middle-man? A 16oz bottle will cost you around $10 online or at a local grocery store. And once you've got it you can apply it to gadgets, mirrors, glasses, whatever you don't want to fog up. It works best on glass surfaces.
Make sure the surface you're applying the glycerin to is clean. Put a tiny drop on the surface and spread it using a finger or cotton swab. You want a very thin film so that it works, but doesn't get in your way. Let it dry and buff it clear with a clean and dry soft cotton cloth in a circular motion. It may not be the most advanced solution, but it's cheap and multipurpose. Just reapply when you start to see fog again, often after several weeks.