This PR makes it possible to use the share extension on an image or video. The share extension retrieves the file URL of the given image or video and adds it to the images or videos array as part of initial props.
Displaying the image or video in the share extension could lead to memory issues, so this needs to be used with caution. I haven't figured out how to redirect to the host app, since this does not seem to be officially supported according to the docs:
A Today widget (and no other app extension type) can ask the system to open its containing app by calling the openURL:completionHandler: method of the NSExtensionContext class
If I find a workaround to redirect to the main app, the file URL of the shared image/video could be passed as part of the route or as part of a shared storage like mmkv
In addition, this PR:
fixes a bug where preprocessingFile had to be present as a config option, even though it should be optional
fixes a bug where :privacy_file_aggregation_enabled must not be added to use_react_native with Expo SDK versions less than 51
removes the ios directories of the examples, to reduce the package size on npm
This PR makes it possible to use the share extension on an image or video. The share extension retrieves the file URL of the given image or video and adds it to the
images
orvideos
array as part of initial props.Displaying the image or video in the share extension could lead to memory issues, so this needs to be used with caution. I haven't figured out how to redirect to the host app, since this does not seem to be officially supported according to the docs:
If I find a workaround to redirect to the main app, the file URL of the shared image/video could be passed as part of the route or as part of a shared storage like mmkv
In addition, this PR:
preprocessingFile
had to be present as a config option, even though it should be optional:privacy_file_aggregation_enabled
must not be added touse_react_native
with Expo SDK versions less than 51