'OneDrive picker(v7.2) opens in the native app instead of browser (IOS)

I'm working on a web app that uses oneDrive file picker popup(https://docs.microsoft.com/en-us/onedrive/developer/controls/file-pickers/js-v72/open-file?view=odsp-graph-onlineon) for opening and saving files. On some IOS devices, when we click on open files button, the file picker is opened in a new tab instead of the popup, and after selecting a file it redirects to our app and we load that file. However, on other IOS devices, instead of opening it in the new tab, the file picker opens in the native OneDrive app and we get no response from the native OneDrive app after selecting a file.

I found a similar issue for Android ([1]: https://github.com/OneDrive/onedrive-api-docs/issues/836#issuecomment-438415708) but for IOS I'm unable to find the "Go to supported URLs" settings. I was able to reproduce this issue on Iphone and Ipad, but after using "long press" (don't know if it's related) when clicking open files button on Iphone, the file picker started opening in the browser and not in the native app anymore. However, the long press didn't work on ipad and it keeps opening the file picker in the native app.

Does anyone know how to stop opening the file picker in the native app? Or, why and how to get the selected file info from the native app into our app?

This is the code that we use for open file from OneDrive:

const odOptions = {
      clientId: environment.azureAppID,
      action: 'download',
      multiSelect: false,
      advanced: {
        queryParameters: 'select=id,name,size,file,folder,parentReference,@microsoft.graph.downloadUrl',
        filter: '.pdf,.text,.txt,.epub,.docx',
        redirectUri,
      },
      success: (files) => {
        this.pickerSuccess(files.value);
      },
      cancel: () => {
        this.pickerCancel();
      },
      error: (error) => {
        this.pickerError(error);
      },
    };
    OneDrive.open(odOptions);


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source