Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a method to manage copied files on iOS #292

Open
4 tasks
lindboe opened this issue Dec 6, 2023 · 0 comments
Open
4 tasks

Add a method to manage copied files on iOS #292

lindboe opened this issue Dec 6, 2023 · 0 comments

Comments

@lindboe
Copy link

lindboe commented Dec 6, 2023

When the share extension needs to open the main app on iOS, the library currently makes a copy of any shared file, as the temporary copy that the share extension can access will not be available past the share extension's lifetime. However, those files are never cleaned up by the library, and users may not realize these copies are being made.

To help manage this problem, we'll create a new native method, deleteTempCopy, which will accept the file name as an argument, that apps can call when they're finished using the copied file on iOS. The method should exist on Android, for platform parity, but immediately return (does not need to be native code, a JS export for Android is fine -- but this may not work down the line with New Arch and codegen).

Acceptance criteria

  • The method should be usable from JS in the main app
  • If the file is not present or deleteable, the method should return a rejected promise
  • Add a changelog entry
  • Add documentation of what this method is for and how to use it

Out of scope:

  • Adding code to help library users clear out existing temp copies. This is best done on a per-app basis with react-native-fs or similar.
@lindboe lindboe mentioned this issue Dec 6, 2023
21 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant