1

I'm using React Native and this library to pick files in my app.

Native Google Drive files (docs, sheets, slides) started appearing to be unselectable on iOS, meanwhile on Android they appear selectable as PDF (it seems they are automatically converted, but that's OK for me).

unselectable files

It used to work on iOS too. There were some Androids where this was also happening, but after cleaning the cache of Drive app it started working, but this workaround doesn't work on iOS.

I would like to know a way to make it work again.

carla
  • 1,970
  • 1
  • 31
  • 44

2 Answers2

1

May be its late but it will be helpful for others. I was also facing the similar issue. Ios does not allow to open iCloud drive docs within the app. There are some System-Declared Uniform Type Identifiers which you have to define while using them as per https://developer.apple.com/library/archive/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html

In my case I was selecting pdf and using react-native-document-picker library.

Below is the working code -

  DocumentPicker.show({
filetype: [DocumentPickerUtil.pdf(),'public.composite-content'],
},(error,res) => {
  console.log(res) 
}); 
}
Ankit Bisht
  • 11
  • 1
  • 1
  • Still not working. It only appears the iCloud Drive and I need to access the Camera Roll – Pablo Jul 17 '18 at 12:04
0
DocumentPicker.show({
  filetype: [DocumentPickerUtil.images()], ->> this may be where you specify type
},(error,res) => {
  // Android
  console.log(
     res.uri,
     res.type, // mime type
     res.fileName,
     res.fileSize
  );
});
skrusetvt
  • 261
  • 3
  • 17