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
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];
}
}
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on ShaderLab::ShaderState::ApplyShaderState when entering Play Mode and calling ShaderWarmup.WarmupShaderFromCollection with a shader that has dynamic_branch
- Crash on operator delete[] when a serializable structure in the System namespace is serialized by a MonoBehaviour
- [macOS] forward and backward mouse buttons are recognized as middle mouse button
- NavMeshModifier.OnEnable/OnDisable gets progressively slower when called repeatedly
- "System.Net.CookieContainer" throws an "ArgumentException" error when using a non-UTF-8 machine locale and hostname
Add comment