-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Closed
Labels
Good first issueInterested in collaborating? Take a stab at fixing one of these issues.Interested in collaborating? Take a stab at fixing one of these issues.Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.
Description
Description
Setting the alertTitle property on PushNotificationIOS.scheduleLocalNotification does not display the title in the notification.
Reproduction Steps
Use the below code to reproduce.
Sample Code
PushNotificationIOS.scheduleLocalNotification({ fireDate: new Date(Date.now() + (30 * 1000)).toISOString(), alertTitle: 'Incoming Message', alertBody: 'This is my message, please read it for good fortune.', soundName: 'default', applicationIconBadgeNumber: 1, userInfo: { id: 11 } })
Solution
Adding the following line in RCTPushNotificationManager.m (54) fixes the issue:
notification.alertTitle = [RCTConvert NSString:details[@"alertTitle"]];
Additional Information
- React Native version: 0.45
- Platform: iOS
- Development Operating System: macOS Sierra 10.12.15
- Build tools: XCode 8.3.3
Metadata
Metadata
Assignees
Labels
Good first issueInterested in collaborating? Take a stab at fixing one of these issues.Interested in collaborating? Take a stab at fixing one of these issues.Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.