react-native-push-notification / ios

React Native Push Notification API for iOS.
MIT License
740 stars 284 forks source link

Can i display image on push notification? #255

Closed thuynt99 closed 3 years ago

thuynt99 commented 3 years ago

For ios:

sujitgawas19 commented 3 years ago

Hey.. did you figure out how to display image when the app is in foreground? I am facing the same problem.

thuynt99 commented 3 years ago

@sujitgawas19 No, I can't show image in FG. I am looking for solution!

BunHouth commented 3 years ago

@sujitgawas19 No, I can't show image in FG. I am looking for solution!

something like that?

rsz_1rsz_img_669eaa85be8a-1

sujitgawas19 commented 3 years ago

@BunHouth Ya. How did you do that? Was the app in foreground?

BunHouth commented 3 years ago

@BunHouth Ya. How did you do that? Was the app in foreground?

something like that?

This for local notification only.

https://user-images.githubusercontent.com/8031851/110482785-5d5f4180-812c-11eb-8984-54243d1f553f.mov

sujitgawas19 commented 3 years ago

@BunHouth Can you share the code to display the local push notifications?

BunHouth commented 3 years ago

@BunHouth Can you share the code to display the local push notifications?

you can found example code here => https://github.com/aasatech/rn-push-notification-image fork repo => https://github.com/aasatech/push-notification-ios#local-notification-image

happy coding :)

sujitgawas19 commented 3 years ago

@BunHouth Great. Why don't you create a PR for this?

BunHouth commented 3 years ago

@BunHouth Great. Why don't you create a PR for this?

I think that feature is optional.

vuletuanbt commented 3 years ago

@BunHouth Great. Why don't you create a PR for this?

I think that feature is optional.

Could you create PR for this feature ? I think more people need to see this

BunHouth commented 3 years ago

@BunHouth Great. Why don't you create a PR for this?

I think that feature is optional.

Could you create PR for this feature ? I think more people need to see this

That feature is optional, because we just using it for local notification only. You can using my fork repo or using patch package instead.

vuletuan commented 3 years ago

Okie. I got it

vuletuanbt commented 3 years ago

I created PR for this issue, please check it out https://github.com/react-native-push-notification-ios/push-notification-ios/pull/272

thuynt99 commented 3 years ago

@BunHouth Amazingly, I was able to show the picture while in FG. thank you very much!!!!!!!!

ghostknow commented 3 years ago

@BunHouth How can I show image with remote notification, thanks

BunHouth commented 3 years ago

@BunHouth How can I show image with remote notification, thanks

for remote notification, please check this https://rnfirebase.io/messaging/ios-notification-images#step-1---add-a-notification-service-extension

trungtin2222 commented 3 years ago

@BunHouth Amazingly, I was able to show the picture while in FG. thank you very much!!!!!!!!

Hi Thuy, can i have your code ? i tried but not work :(

thuynt99 commented 3 years ago

@trungtin2222 what version react native do you use???

trungtin2222 commented 3 years ago

@trungtin2222 what version react native do you use???

I use react-native@0.63.3

BunHouth commented 3 years ago

@trungtin2222 what version react native do you use???

I use react-native@0.63.3

@trungtin2222 you can check this thread first

https://github.com/react-native-push-notification-ios/push-notification-ios/issues/255#issuecomment-793955531

react-native-push-notification-ios is not support local image notification.

trungtin2222 commented 3 years ago

@trungtin2222 what version react native do you use???

I use react-native@0.63.3

@trungtin2222 you can check this thread first

#255 (comment)

react-native-push-notification-ios is not support local image notification.

hi @BunHouth, i checked your comment, i was used your code but it's not work for me, i try to check AppDelegate.m but i don't have more information

BunHouth commented 3 years ago

@trungtin2222 what version react native do you use???

I use react-native@0.63.3

@trungtin2222 you can check this thread first #255 (comment) react-native-push-notification-ios is not support local image notification.

hi @BunHouth, i checked your comment, i was used your code but it's not work for me, i try to check AppDelegate.m but i don't have more information

if you want local notification work, you need to change your package.json "@react-native-community/push-notification-ios": "^1.8.0" to "@react-native-community/push-notification-ios": "aasatech/push-notification-ios",

trungtin2222 commented 3 years ago

@trungtin2222 what version react native do you use???

I use react-native@0.63.3

@trungtin2222 you can check this thread first #255 (comment) react-native-push-notification-ios is not support local image notification.

hi @BunHouth, i checked your comment, i was used your code but it's not work for me, i try to check AppDelegate.m but i don't have more information

if you want local notification work, you need to change your package.json "@react-native-community/push-notification-ios": "^1.8.0" to "@react-native-community/push-notification-ios": "aasatech/push-notification-ios",

I think you should create PR for this feature, my app still not work with image, i think this issue happening on M1 devices :(

trungtin2222 commented 3 years ago

it's work in intel devices, many thanks @BunHouth

Naturalclar commented 3 years ago

rich notification support with images has been added in v1.9.0 :tada:

danishsaleem0 commented 6 months ago

image not showing in background