Image broken on iOS using RocketChat livechat api

I found that the cookies are not saving when the live chat is initialized on the mobile app (Android and iOS). This issue causes the image to be broken and the download feature to not work, most likely on iOS. When uploading the image, it successfully uploaded the file, but on iOS, it showed a broken image, while on Rocket Chat, the image is not broken.

On the portal, the cookies are set when the Rocket Chat live chat is initialized.

On Mobile app (iOS)

After uploading the file on the mobile the image is broken

Developer Inspect for iOS

After uploading the file this is the response from rocketchat to mobile app.

When the rocketchat livechat is initialized to the mobile app.

On the rocketchat ommichannel the image is not broken.

Versions of the tools and application used rocketchat.
mobile app - ionic 5
Rocketchat -
Screenshot 2023-05-03 at 4.57.18 PM
iOS version - 16.4
Android Version - 13

Anyone who knows the issue let me know if you have a workaround solution.

i’ve got the same problem, this only happens in safari, but everything works fine on PC browser and Android devices.

I spent a lot of time to figure this out.
Try send a pdf in a live chat and tap to see if you could preview in a new tab or download this pdf , if not , the assets url is protected only for users who logged in.
just go workspace - setting - file upload, turn off the option:
Protect Uploaded Files
Only authenticated users will have access