From de5de1fcc7232c312ea447551eb71f7b697470f0 Mon Sep 17 00:00:00 2001 From: Archimedes Trajano Date: Sat, 9 Nov 2024 20:23:00 -0500 Subject: [PATCH] fix: attempt for notifications with attachments on iOS typo Discussions in https://stackoverflow.com/questions/79173848/how-do-i-send-a-local-file-attachment-on-expo-notifications-ios-attachments And for notifee https://github.com/invertase/notifee/issues/1142 --- packages/my-app/src/stories/Notification.stories.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/my-app/src/stories/Notification.stories.tsx b/packages/my-app/src/stories/Notification.stories.tsx index 511e12d..3d202cf 100644 --- a/packages/my-app/src/stories/Notification.stories.tsx +++ b/packages/my-app/src/stories/Notification.stories.tsx @@ -46,7 +46,7 @@ const ExpoNotificationsView: FC< const uuid = Crypto.randomUUID(); const nextAssets = _.cloneDeep(localAssets.filter((it) => it.downloaded)); for (const asset of nextAssets) { - const tempLocalUri = `file://${FileSystem.cacheDirectory}${asset.hash}.${uuid}.${asset.type}`; + const tempLocalUri = `${FileSystem.cacheDirectory}${asset.hash}_${uuid}.${asset.type}`; await FileSystem.copyAsync({ from: asset.localUri!, @@ -74,10 +74,10 @@ const ExpoNotificationsView: FC< .filter((it) => it) .map((it) => ({ identifier: it.hash, - type: `public.${it.type}`, + type: it.type, typeHint: `public.${it.type}`, - url: it.localUri, - hideThumbnail: false, + url: it.localUri!, + // hideThumbnail: false, })); }, [assets]);