Note that there are some explanatory texts on larger screens.

plurals
  1. POiOS: UIPasteboard setImage: fails on iOS6 and/or Xcode 4.5
    primarykey
    data
    text
    <p><strong>Update:</strong> Added bug 12408800 on Apple's site.</p> <hr> <p>I am copying some one or multiple UIImage to the UIPasteboard, and it's been working like gangbusters.. until my phone upgraded to iOS 6.</p> <ul> <li>Xcode 4.5 with iOS 5.1 - <strong>OK</strong></li> <li>Xcode 4.4 with iOS 6.0 - <strong>Also OK</strong> (<a href="http://www.iphonedevsdk.com/forum/iphone-sdk-development/108089-uipasteboard-not-working-anymore-with-xcode-4-5-on-ios-6.html" rel="nofollow noreferrer">according to this post</a>) </li> <li>Xcode 4.5 with iOS 6.0 - <strong>FAIL</strong></li> </ul> <p>(also tested distributing via TestFlight, for what it's worth - still fails)</p> <p>Here's my code (super basic, etc):</p> <pre><code>// add image to clipboard UIImage *image = [[UIImage imageNamed:@"testimage"]; [[UIPasteboard generalPasteboard] setPersistent:YES]; [[UIPasteboard generalPasteboard] setImage:image]; </code></pre> <p>And here is what happens when I try to paste in an MMS/iMessage window (sorry for huge screenshot; retina display..):</p> <p><img src="https://i.stack.imgur.com/1w6sj.png" alt="screenshot_of_failure"></p> <p>..and an example of a failure on the Messages sample app in the iOS6 simulator (see the two question marks..?):</p> <p><img src="https://i.stack.imgur.com/8ym6Z.png" alt="another screenshot!"></p> <p>Like I said, the above code has been working for ages, so I'm sure this is something new.</p> <p>Any thoughts? On the linked post, the author suggests re-compiling on an old version of Xcode - but wouldn't that cause other iOS6 libraries to stop working?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload