digidem / mapeo-mobile

Monitor and document the world around you
GNU General Public License v3.0
95 stars 16 forks source link

Hotfix/v5.6.2 #1099

Closed achou11 closed 1 year ago

achou11 commented 1 year ago

Sharing observations containing attachments failed to work on Android 12+ due to an outdated dependency (react-native-share). This commit upgrades the dependency to its latest available version. See https://github.com/digidem/mapeo-mobile/pull/1098 for more details about the change.

gmaclennan commented 1 year ago

Slight uncertainty about the permissions change noted here: https://react-native-share.github.io/react-native-share/docs/migrate-v4-to-v5#removal-of-write_external_storage-permission-request. Not sure if it applies to us in this case (we're sharing file uris e.g. file:///data/user/0/com.mapeo.debug/files/media/preview/8a/8a6e62b150eae104f2cd59c78aac8948.jpg). from general testing, doesn't seem like the permission is needed to keep this working cc @gmaclennan

This should not be needed. It is only required when sharing files as base64 strings, since as I understand it react-native-share writes the file to a temporary cache folder in order to share it. Since we share files directly, and they are in internal storage, not external, this permission should not be needed. I've read through the other changes in react-native-share and checked the installation instructions to make sure everything is up-to-date in Mapeo, and it looks good to me. Hopefully this will work without issue. Let's publish and then hotfix again if necessary in case edge cases on certain devices are detected.