0

I am experiencing some strange behaviour.

I have the following code in my app that is supposed to pre-fill a long link in a clipboard so the user only needs to paste.

  UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
        pasteboard.string = @"Hello world";

However, instead of the text from the code going into the clipboard, the last thing present in the clipboard on my mac in Xcode is appearing on the phone.

I am testing on a real phsical SE Phone, not the simulator!!

When I paste into an SLComposer on phone, I would expect to see "Hello world".

Instead, I seeing the last code that I cut and pasted in Xcode only on my physical phone:

 UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
    pasteboard.string = link;

What gives? Wondering if anyone else has experienced this?

user6631314
  • 1,751
  • 1
  • 13
  • 44
  • Possible duplicate of [copy and paste text into ios simulator](https://stackoverflow.com/questions/15188852/copy-and-paste-text-into-ios-simulator) – Grzegorz Krukowski Aug 24 '18 at 18:49
  • That question is about the programmer copying text in Xcode. My question is about the user copying text on their actual phone where for some reason, the clipboard pulled text from my computer running xcode. I will clarify that I am testing on an actual device not the simulator. – user6631314 Aug 24 '18 at 19:49

0 Answers0