diff --git a/RNFSManager.m b/RNFSManager.m index 5a2efe15..b7485aea 100755 --- a/RNFSManager.m +++ b/RNFSManager.m @@ -860,7 +860,13 @@ + (BOOL)requiresMainQueueSetup //__block NSURL* videoURL = [NSURL URLWithString:destination]; __block NSError *error = nil; - PHFetchResult *phAssetFetchResult = [PHAsset fetchAssetsWithALAssetURLs:@[url] options:nil]; + PHFetchResult *phAssetFetchResult = nil; + if ([url.scheme isEqualToString:@"ph"]) { + phAssetFetchResult = [PHAsset fetchAssetsWithLocalIdentifiers:@[[imageUri substringFromIndex: 5]] options:nil]; + } else { + phAssetFetchResult = [PHAsset fetchAssetsWithALAssetURLs:@[url] options:nil]; + } + PHAsset *phAsset = [phAssetFetchResult firstObject]; PHVideoRequestOptions *options = [[PHVideoRequestOptions alloc] init];