Search Issue Tracker

Not Reproducible

Votes

1

Found in

4.5.5p2

Issue ID

646695

Regression

Yes

Local notifications are not working on iOS 8

iOS

-

To Reproduce:

1. Build the attached project, and deploy it to iOS
2. On iOS 8 devices none of the notifications from the 'NotificationTest.cs' script are displayed.

can be fixed by adding the following to the start of the 'DidFinishLaunchingWithOptions' in 'UnityAppController.mm':

float version = [[[UIDevice currentDevice] systemVersion] floatValue];
if (version >= 8.0)
{
//printf_console("---> Running on iOS 8.0 > didFinishLaunchingWithOptions() Added my code //av \n");
UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes: (UIRemoteNotificationTypeBadge
|UIRemoteNotificationTypeSound
|UIRemoteNotificationTypeAlert) categories:nil];
[[UIApplication sharedApplication] registerUserNotificationSettings:settings];
}

and this function after 'DidFinishLaunchingWithOptions' :

- (void)application: (UIApplication *)application didRegisterUserNotificationSettings: (UIUserNotificationSettings *)notificationSettings
{
float version = [[[UIDevice currentDevice] systemVersion] floatValue];
if (version >= 8.0)
{
//printf_console("---> didRegisterUserNotificationSettings() //av \n");
[application registerForRemoteNotifications];
}
}

(http://forum.unity3d.com/threads/local-notification-not-working-in-ios-8-unity4-5-4-xcode6-0-1.271487/)

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.