Phphotoserrordomain ошибка 1 что значит

Bug

Error: The operation couldn’t be completed. (PHPhotosErrorDomain error -1.) at Object.fn [as saveToCameraRoll] (NativeModules.js:99) at Function.save (CameraRoll.js:163) at Function.saveToCameraRoll (CameraRoll.js:169) at _callee2$ (VM5 index.bundle:209) at tryCatch (runtime.js:45) at Generator.invoke [as _invoke] (runtime.js:274) at Generator.prototype.<computed> [as next] (runtime.js:97) at tryCatch (runtime.js:45) at invoke (runtime.js:135) at runtime.js:170

Environment info

react-native info output:

System:
    OS: macOS 10.15.3
    CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
    Memory: 60.19 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.14.0 - /var/folders/7n/tg8wdbns7yvg3wqwnh_mzmp40000gn/T/yarn--1585096434645-0.8370493466760465/node
    Yarn: 1.22.1 - /var/folders/7n/tg8wdbns7yvg3wqwnh_mzmp40000gn/T/yarn--1585096434645-0.8370493466760465/yarn
    npm: 6.13.7 - /usr/local/bin/npm
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.6010548
    Xcode: 11.2.1/11B53 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.9.0 => 16.9.0
    react-native: 0.61.5 => 0.61.5

Library version: 1.4.0

Steps To Reproduce

  1. I am just calling the CameraRoll.saveToCameraRoll with the remote url

Describe what you expected to happen:

  1. I expected the video to be saved in the photos
  2. I even tried it on the latest version and its still the same

Reproducible sample code

CameraRoll.saveToCameraRoll(url, 'video')
        .then(response => {
          console.log('***RES**');
          console.log(response);
          console.log('***RES**');
          this.setState({isDownloading: false});
          this.refs.completionToast.show('Download completed!');
        })
        .catch(error => {
          console.log('*****');
          console.log(error);
          console.log('*****');
          this.setState({isDownloading: false});
          this.refs.completionToast.show(
            'There was a problem downloading the video, please try again later',
          );
        });

I’m trying to drag and drop image to my iPhone simulator. I found to do it this way here on SO Adding images or videos to iPhone Simulator . However when I tried to drag and drop simple png or jpeg image I get an error

operation couldn’t be completed. (PHPhotosErrorDomain error -1.)

I know that the solution in the answer is like 9 years old and I haven’t found any latest solution so does something changed?

My iOS simulator version is

Version 11.5 (921.9.1)
SimulatorKit 581.9.1
CoreSimulator 704.12.2

asked Jun 12, 2020 at 10:10

delmin's user avatar

Move your files into the Documents folder and then drag them into the simulator.

This will trigger the simulator to ask for permissions to access your files. Having them inside the Downloads folder, will not.

answered Sep 23, 2020 at 13:05

Nicolai Lissau's user avatar

Nicolai LissauNicolai Lissau

6,9995 gold badges39 silver badges56 bronze badges

Dragging photos into the Documents folder didn’t work for me. I had to drag them into the Library/Developer folder and then drag them into the simulator to avoid this error.

answered Dec 16, 2020 at 0:09

user3030674's user avatar

This error message pops up when I try to use the sharing function in Photos. It pops up as soon as I select Airdrop or email a photo from Photos (Version 5.0 (121.17.170)) with Catalina (10.15.2). Not sure what’s happening or how to fix it. This doesn’t happen with I use GraphicConverter 11.1.2 and share photos.

Also, my computer is experiencing frequent crashes of photoanalysisd. I tried rebuilding my photo library (~38K photos); that didn’t do anything.

Anyone else seeing this?

Posted on Jan 1, 2020 11:29 AM

Я только что столкнулся с такой же ситуацией, вот как я ее решил:

Я скачал файл, используя rn-fetch-blob:

let file
RNFetchBlob
    .config({
        fileCache: true,
        appendExt: path.substring(path.lastIndexOf('.')+1, path.length)
           //get the file's extension from the URL it's coming from and append to the file name that RNFectchBlob will create locally
    })
    .fetch('GET', path) //GET request to URL which has your file
    .then((res) => {
        file = res //var 'file' is the temp object which contains all data from our file
    })

с файлом, сохраненным локально в вашем приложении, теперь мы можем вызвать CameraRoll чтобы сохранить файл:

CameraRoll.saveToCameraRoll(file.path())
.then(Alert.alert("Done!", "Your file has been saved."))


Go to ios


r/ios


r/ios

Everything Apple iOS & iPadOS




Members





Online



by

JoshiiWashy9oofs



How do I fix the error “(PHPhotosErrorDomain error -1)”?

I’m trying to move a video on the app Documents to my camera roll, but it keeps on saying this error. What does it mean and do I fix it? Any help would be appreciated.

Понравилась статья? Поделить с друзьями:
  • Php5ts dll ошибка
  • Php фатальная ошибка yii base errorexception
  • Php уровни ошибок
  • Php увидеть ошибки
  • Php убрать показ ошибок