0

After recovering from sleep mode (tap sleep/wake button and then tap home button), I tried to get pasteboard string with the code blow and the result was nil.

UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
self.beforeValue = pasteboard.string;

I can get it with iPhone 4S(iOS5.1.1), iPodtouch4G(iOS6.1.3), iPad(iOS6.1.3) but I cannot with 5(iOS6.1.3). Is it iPhone5 bug? Any hint is appreciated.

ageektrapped
  • 14,482
  • 7
  • 57
  • 72
morizotter
  • 1,926
  • 2
  • 24
  • 34
  • What are you copying from? Can you provide some code? – Marcus Adams Apr 11 '13 at 12:42
  • I just copy a string from Google Chrome or note or other apps. I didn't write code, just use iPhone's default copy function. – morizotter Apr 11 '13 at 12:46
  • It works in general on an iPhone 5 with 6.1.3. I just tested it on the Notes app. Some browsers have "Private Browsing" mode, where it clears all data once you exit the App (cookies, URL history, clipboard, everything). Could that be the cause? – Marcus Adams Apr 11 '13 at 12:52
  • Thanks. I think it's not the cause. I use Chrome with normal mode. And the problem occurs apps other than browsers. – morizotter Apr 11 '13 at 13:06

0 Answers0