Skip the spray. If you need it, you should already have your firearm out.
I live in Wyoming and used to carry a sidearm hiking, but gave it up for bear spray. There's definitely a bias in many people's minds in favor of firearms, but for bear deterrence the spray is the better option. (It is also my preferred crowd control device, if I'm ever in a riot ;-)