Home > Net >  document picker IOS failing to work , only opens icloud
document picker IOS failing to work , only opens icloud

Time:07-14

I use expo document picker which works perfectly fine on android but on IOS, it does not work. I only get an option to open icloud and cannot browse through the device to pick a document.

 const documentFile = await DocumentPicker.getDocumentAsync({
      type: ["image/*", "application/pdf"]
    })

I also tried using documentPicker from react-native-document-picker but when I use documentPicker.pick it says, documentPicker is undefined. cannot access method of undefined object.

const documentFile = await DocumentPicker.pick({
      presentationStyle: 'fullScreen'
    });

I tried running react-native link after npm install and double checked the import statement. But, none of it resolved the problem.

CodePudding user response:

Can you share image of the document picker view of your IOS? Cause I think your code of expo document picker is fine.

In the IOS document picker, it may take you to the iCloud file page, you need to click the Browse button (on top left side). Then you will see all the location and I think you may find you files there.

  • Related