diff --git a/README.md b/README.md index 63150fd1..15fa2eb4 100644 --- a/README.md +++ b/README.md @@ -442,7 +442,7 @@ Note: Android only. Will overwrite destPath if it already exists. ### `copyAssetsFileIOS(imageUri: string, destPath: string, width: number, height: number, scale : number = 1.0, compression : number = 1.0, resizeMode : string = 'contain' ): Promise` -iOS-only: copies a file from camera-roll, that is prefixed with "assets-library://asset/asset.JPG?..." +iOS-only (not available on Mac Catalyst): copies a file from camera-roll, that is prefixed with "assets-library://asset/asset.JPG?..." to a specific destination. It will download the original from iCloud if necessary. If width and height is > 0, the image will be resized to a specific size and a specific compression rate. @@ -461,7 +461,7 @@ The promise will on success return the final destination of the file, as it was ### copyAssetsVideoIOS(videoUri: string, destPath: string): Promise -iOS-only: copies a video from assets-library, that is prefixed with 'assets-library://asset/asset.MOV?...' +iOS-only (not available on Mac Catalyst): copies a video from assets-library, that is prefixed with 'assets-library://asset/asset.MOV?...' to a specific destination. ### `unlink(filepath: string): Promise` diff --git a/RNFSManager.m b/RNFSManager.m index db55dd21..8061a7a7 100755 --- a/RNFSManager.m +++ b/RNFSManager.m @@ -727,6 +727,8 @@ + (BOOL)requiresMainQueueSetup } +// [PHAsset fetchAssetsWithALAssetURLs] is deprecated and not supported in Mac Catalyst +#if !TARGET_OS_UIKITFORMAC /** * iOS Only: copy images from the assets-library (camera-roll) to a specific path, asuming * JPEG-Images. @@ -815,7 +817,10 @@ + (BOOL)requiresMainQueueSetup } }]; } +#endif +// [PHAsset fetchAssetsWithALAssetURLs] is deprecated and not supported in Mac Catalyst +#if !TARGET_OS_UIKITFORMAC /** * iOS Only: copy videos from the assets-library (camera-roll) to a specific path as mp4-file. * @@ -869,6 +874,7 @@ + (BOOL)requiresMainQueueSetup return resolve(destination); } +#endif RCT_EXPORT_METHOD(touch:(NSString*)filepath mtime:(NSDate *)mtime