Added support for iOS 8 - the badge permission must be requested before being able to set the badge value.