Just like with paper tickets and passes, it's your responsibility to have valid fare with you at all times. Fare inspectors patrol the transit system randomly, so be sure to keep your phone charged, bring a battery backup or carry a separate plastic Hop card. On newer iPhones, the Power Reserve feature lets you continue to pay for rides even when your phone needs to be recharged — but Power Reserve will not help if a fare inspector asks for proof of fare (your phone must be charged).
Learn more about Power Reserve