fix: Error Domain=PHPhotosErrorDomain Code=-1 (#172)
fixes #157 fixes #143 * Update RNCCameraRollManager.m
This commit is contained in:
parent
7c2986ef13
commit
a4be52cf83
|
@ -138,7 +138,9 @@ RCT_EXPORT_METHOD(saveToCameraRoll:(NSURLRequest *)request
|
|||
if ([options[@"type"] isEqualToString:@"video"]) {
|
||||
assetRequest = [PHAssetChangeRequest creationRequestForAssetFromVideoAtFileURL:inputURI];
|
||||
} else {
|
||||
assetRequest = [PHAssetChangeRequest creationRequestForAssetFromImageAtFileURL:inputURI];
|
||||
NSData *data = [NSData dataWithContentsOfURL:inputURI];
|
||||
UIImage *image = [UIImage imageWithData:data];
|
||||
assetRequest = [PHAssetChangeRequest creationRequestForAssetFromImage:image];
|
||||
}
|
||||
placeholder = [assetRequest placeholderForCreatedAsset];
|
||||
if (![options[@"album"] isEqualToString:@""]) {
|
||||
|
|
Loading…
Reference in New Issue