I want to send silent notifications to my tvOS application. Does this require asking the user for notification permissions? Or is it enough to just register for remote notifications and enable the matching app capabilities in Info.plist?
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound, .badge]) { (granted: Bool, error: Error?) in
if error != nil {
print(error?.localizedDescription ?? "error requesting notification authorization")
}
}
UIApplication.shared.registerForRemoteNotifications()