I record a video in my app and write it it to the temp directory to allow the user to share it through UIActivityViewController. The video can successfully be played back in-app, and through UIActivityViewController can successfully be sent through Messages, shared to Facebook, and saved to camera roll. But when I try to share through WhatsApp, I get the following error:
Failed to determine whether URL /private/var/mobile/Containers/Data/Application/E7F57458-A5F9-44CB-86FA-ACC4309C7473/tmp/65CB72B3-373E-42F2-8A80-9888E00C2268.mp4 (n) is managed by a file provider
I have been unable to find much information on this error. Does anyone know why this may be occurring?
Found a fix:
I was opening a UIActivityViewController with the video url and a string as the activityItems
. Passing just the video url fixed the issue of WhatsApp not recognizing the video. It's annoying to not be able to pass in the text, but at least the video is now there.
Does not work:
UIActivityViewController(activityItems: [url, "Check out my video!"], applicationActivities: nil)
Does Work:
UIActivityViewController(activityItems: [url], applicationActivities: nil)