For a webapp I'm building I need to integrate file sharing capabilities. This is now finally possible since the IOS 15 release. However, I only got it partially working. When I share the file with email or messages it works fine. But when I try to share with whatsapp, signal or threema it will only share the title, not the actual file. I don't see any errors in the console or any failed network requests.
const audioResponse = await fetch(sound.downloadUrl);
const fileBuffer = await audioResponse.arrayBuffer();
const fileArray = [
new File([fileBuffer], name + '.mp3', {
type: 'audio/mpeg',
lastModified: Date.now(),
}),
];
if (
window.navigator.canShare &&
window.navigator.canShare({ files: fileArray })
) {
navigator
.share({
files: fileArray,
title: name,
text: 'File share test',
})
.then(() => {
console.log('Success!');
})
.catch(console.error);
}