Closed racic99 closed 6 months ago
bump
same issue here! works in the right way when the app is opened but not displaying the image when the app is closed
+1
any updates regarding this ?
Same issue here, any workarounds?
~I found workaround I guess.~ ~I've tested by physical device.~
~If you're using require()
, It doesn't work.~
~It works only dev mode.~
~If app is deployed for release mode, attachment that using require()
is not displayed.~
~You need to change to absolute path. The path is started assets
.~
~This source file is located 'src/example.ts' for example.~ ~and image file is located 'src/assets/example.png'.~
// It works only dev mode.
{
url: require("./assets/example.png"),
typeHint: "public.png",
}
// You must change absolute path conditional.
{
url: __DEV__ === true ? require("./assets/example.png") : "assets/src/assets/example.png",
typeHint: "public.png",
}
~I think it works. Maybe react-native's require()
doesn't works properly in ios native code.~
but this example is not working when you send the image url from firebase and you take it like this : const notificationImageIOS = remoteMessage?.data?.fcm_options.image and then you replace that image in notificationConfig.ios.attachments = [ { id: 'image', options: { thumbnailHidden: false, }, url: notificationImageIOS, }, ];
this workaround works
only when the app is opened,
in case that is killed or in background don't work
@toy0605
I found workaround I guess.
I've tested by physical device.
If you're using
require()
, It doesn't work.It works only dev mode.
If app is deployed for release mode, attachment that using
require()
is not displayed.You need to change to absolute path. The path is started
assets
.This source file is located 'src/example.ts' for example.
and image file is located 'src/assets/example.png'.
// It works only dev mode. { url: require("./assets/example.png"), typeHint: "public.png", } // You must change absolute path conditional. { url: __DEV__ === true ? require("./assets/example.png") : "assets/src/assets/example.png", typeHint: "public.png", }
I think it works. Maybe react-native's
require()
doesn't works properly in ios native code.
Sorry. I've not read original issue's source code.
I'll post new issue my case for someone needs help
Hello 👋, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?
This issue will be closed in 15 days if no further activity occurs.
Thank you for your contributions.
Just reopening the issue mentioned in https://github.com/invertase/notifee/issues/901
I have the exact same problem