Quick looks not working with old configuration/ code.

Hello,

I am experiencing an issue with a piece of JavaScript code that I use for triggering Quick Look on iOS devices. This functionality was working fine until the recent non-beta updates of iOS 17. It still functions as expected on older iOS versions and some beta versions of iOS 17, but not on the latest update.

Here's the original code snippet:

anchor.setAttribute('rel', 'ar');
anchor.appendChild(document.createElement('img'));
anchor.setAttribute("id", "charpstar");

return (usdzSrc) => {
    anchor.setAttribute('href', usdzSrc + "#allowsContentScaling=0");
    anchor.click();
};

With this code, the Quick Look feature used to work directly without navigating to an intermediary page. However, after the update, it ceased functioning. The error I am getting is

"Object needs new version of iOS"

To troubleshoot, I modified the code as follows:

anchor.href = `${realityFileUrl}#allowsContentScaling=0`;
anchor.addEventListener('click', (event) => {
    event.preventDefault();
    window.open(anchor.href, '_blank');
});

// Append the anchor element to the document body.
document.body.appendChild(anchor);

// Click the anchor element to open the .reality file.
anchor.click();

This revised approach does open the file, but it first navigates to an intermediary page, which is not acceptable for our client's user experience.

Could you provide guidance on how to resolve this issue? Specifically, I'm looking for a way to use Quick Look on iOS 17 (non-beta versions) without being redirected to an intermediary page. Any insights or updates regarding changes in iOS 17 that might affect this functionality would be greatly appreciated.

Thank you for your assistance.