Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxAst committed Jun 6, 2024
1 parent 4942524 commit a769bf1
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,28 @@ export default function ShareExtension({ url }: { url: string }) {
}
```

When you share images and videos, `expo-share-extension` stores them in a `sharedData` directory in your app group's container.
These files are not automatically cleaned up, so you should delete them when you're done with them. You can use the `clearAppGroupContainer` method from `expo-share-extension` to delete them:

```ts
import { clearAppGroupContainer } from "expo-share-extension"
import { Button, Text, View } from "react-native";

// if ShareExtension is your root component, url is available as an initial prop
export default function ShareExtension({ url }: { url: string }) {
const handleCleanUp = async () => {
await clearAppGroupContainer()
}

return (
<View style={{ flex: 1 }}>
<Text>I have finished processing all shared images and videos</Text>
<Button title="Clear App Group Container" onPress={handleOpenHostApp} />
</View>
);
}
```

## Options

### Exlude Expo Modules
Expand Down

0 comments on commit a769bf1

Please sign in to comment.