iOS9'da, bildirimlerden hoşlanıp bunları ayarlar sayfasına yönlendirerek kullanıcılarımıza bildirim izni verebilmemiz için kullanıcılarımızı yönlendiririz. Ancak, aşağıda gösterildiği gibi iOS 10 içerisindeki uygulama izinlerim ayarlarında bildirimleri etkinleştirmek için bir seçenek yoktur. Bu listeyi uygun izinlerle doldurmayı taahhüt ettiğim yeni bir süreç var mı?iOS 10 için bildirimleri nasıl etkinleştiririm?
Kod
//check the notifications status. First the global settings of the device, then our stored settings
func checkGlobalNotifications() {
let grantedSettings = UIApplication.sharedApplication().currentUserNotificationSettings()
if grantedSettings!.types.rawValue & UIUserNotificationType.Alert.rawValue != 0 {
globalNotificationsEnabled = true
//if global notifications are on, then check our stored settings (user)
if CallIn.Settings.notificationsEnabled { notificationsOn() } else { notificationsOff() }
}
else {
globalNotificationsEnabled = false
//global notifications (iOS) not allowed by the user so disable them
notificationsOff()
}
}
== TRUE – KVISH