Had a similar issue and what was occurring is that the videoData line was not completing before the UIPasteboard. I ended up using DispatchGroup enter leave and wait. Forced the one action to complete before the next and then I was able to paste anywhere.
Completing the above I received the below on the wait() action that I am still researching. So if anyone has a better suggestion please reply.
warning run: Thread running at QOS_CLASS_USER_INTERACTIVE waiting on a lower QoS thread running at QOS_CLASS_DEFAULT. Investigate ways to avoid priority inversions