I'm working on an app that uses
UIPasteboard.general.string = "my text here"
to copy text to the user's pasteboared so that they can then paste from another device.
I'm doing this periodically based on conditions - so every 10-20 seconds, I have a new string to copy to the pasteboard. Consistently after 2 minutes, this stops working - the pasteboard on the local device updates, but my other devices don't receive the new pasteboard content. If I touch the screen of the device running my app to 'wake it up', it suddenly works again for another 2 minutes.
I've tried
UIApplication.shared.idleTimer = false
but it has had no effect. Is there a way to keep the universal pasteboard working without constant app interaction?