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

Remove photo #34

Closed
skeie opened this issue Dec 16, 2015 · 3 comments
Closed

Remove photo #34

skeie opened this issue Dec 16, 2015 · 3 comments
Labels

Comments

@skeie
Copy link

skeie commented Dec 16, 2015

Hi,

I have this url assets-library://asset/asset.JPG?id=F970CE98-0BB8-400B-B4C8-AF7A938CF775&ext=JPG which I am trying to delete, which i get from react-native-camera

I tried to prefix it with both LibraryDirectoryPath and DocumentDirectoryPath, and without a prefix. The catch method is invoked and the err.message tells me that the file does not exist.

Any suggestion on how to use fs to delete the photo?

@johanneslumpe
Copy link
Collaborator

Hey, a little bit of research turned up that there is no ability on iOS < 8 to delete an image from the camera roll. According to https://developer.apple.com/library/ios/documentation/Photos/Reference/PHAssetChangeRequest_Class/index.html#//apple_ref/occ/clm/PHAssetChangeRequest/deleteAssets you can do this in newer iOS versions but you will need permission from the user to do so. I feel that this is a bit out of the scope of this library though.

/cc @cjdell

@skeie
Copy link
Author

skeie commented Dec 17, 2015

Ah, thanks @johanneslumpe!

@johanneslumpe
Copy link
Collaborator

You're welcome @skeie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants