简体   繁体   中英

React Native iOS Push Notification with Image

I currently have an app which was made with React Native. I need to display a local push notification, and there needs to be an image displayed within this notification. Currently, I am using the react-native-push-notification library for basic text notifications.

I have been looking for solutions but I have not found any way yet that I can add images into a notification. Is there some way to hook into native code that would allow me to do it?

Any help is greatly appreciated.

I am using react-native-firebase and it works great for me. It has an option for local notifications.

You can learn more about iOS notification with an image here: https://rnfirebase.io/docs/v4.2.x/notifications/reference/IOSNotification It gives an option to set a launchImage for iOS notifications. You should go through the documentation properly in order to install it properly.

I have used react-native-fcm , which is implemented using react-native-firebase. The support for issues are good enough and the document is well drafted for both ios and android. The pictures, icons and actions are configurable for both local and remote notifications.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM