sanukin39 / UniClipboard

Simple clipboard plugin for unity
MIT License
309 stars 59 forks source link

Pasting an image on iOS results in a crash #11

Open UNSH opened 3 years ago

UNSH commented 3 years ago

Any ideas on how to avoid this error? I've tried some solutions but I'm not used to writing plugins for iOS.

I found you can check for images with UIPasteboard.general.hasImages or for strings with UIPasteboard.general.hasStrings which I converted to if ([UIPasteboard generalPasteboard].hasStrings) but it doesn't seem to help. From the moment an image is pasted the app crashes.

andersemil commented 3 years ago

Did you find a solution? I'm guessing that checking that no images are in the pasteboard before pasting should avoid the crash ...

UNSH commented 2 years ago

Did you find a solution? I'm guessing that checking that no images are in the pasteboard before pasting should avoid the crash ...

No not yet. I had to move to more pressing issues since this only is an edge case for a few of our users. For as far as I could tell the app crashes when reading an image also with a preemptive image check. But like I said I’m not comfortable enough with writing plugins to rule out mistakes on my part.