compatible for iOS 8 push notification API changes.