ios8 - ios 8 UILocalNotification missed, only sound -
i schedule local notification in app this:
uilocalnotification * notification = [uilocalnotification new]; notification.applicationiconbadgenumber = 1; notification.repeatinterval = nscalendarunitminute; notification.firedate = date; notification.timezone = default_time_zone; notification.alertbody = alertbody; notification.alertaction = @"view"; notification.soundname = @"my_sound"; notification.userinfo = userinfodict; [[uiapplication sharedapplication] schedulelocalnotification:notification];
on latest version of ios 8 gm broken, can hear sound notification, there no alert, no messages in notification сentre , on. added
- (bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions: .... if ([[uiapplication sharedapplication] respondstoselector:@selector(registerusernotificationsettings:)]) { //ios 8 uiusernotificationsettings* notificationsettings = [uiusernotificationsettings settingsfortypes: uiusernotificationtypealert | uiusernotificationtypebadge | uiusernotificationtypesound categories:nil]; [[uiapplication sharedapplication] registerusernotificationsettings:notificationsettings]; }
but there no alert user request permissions on first run.
Comments
Post a Comment