Advertise here




Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

UIPasteboard - Not working anymore with Xcode 4.5 on iOS 6

esotericesoteric Posts: 604Registered Users @ @ @
edited September 2012 in iPhone SDK Development
Hi,

In a few of my apps I have a feature to share images users have created by iMessage/MMS. Basically all this does when the user selects the option is
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
pasteboard.image = [UIImage imageNamed:@"Image user wants"]
Then it opens Apple's Messages app and they can paste it in a text/iMessage.

With one of my apps that was built/archived/sent to app store with Xcode 4.4.1 (before any iOS 6 changes), when I download the app on my 2 devices these are the results:
iPhone 4 with iOS 5.1.1 - Works as expected, image is pasted properly and user can send.
iPhone 4 with iOS 6.0 - Also works as expected.

Now here's the problem.
For another app which I did a few changes for iOS 6 and built/submitted using Xcode 4.5, the are the results i'm seeing when downloading the app from the App Store. (Keep in mind that I haven't touched any of the UIPasteboard code)
iPhone 4 with iOS 5.1.1 - Still works exactly as expected.
iPhone 4 with iOS 6.0 - When I try to paste the image into Messages it doesn't show up as an image. Instead it shows a little icon with the text "IMG ##.jpeg" (like the image in the link below). And when you try to send whatever that image is it fails..on iMessage or with MMS.
-The images are made as .PNG but I also tried creating them as .JPEG before sending and the problem persists.

Attached Image

I don't see any UIPasteboard iOS 6 changes so i'm not sure what's causing this.
Any help is appreciated!

UPDATE:
Just opened my same projected that was submitted and broken on the app store with Xcode 4.4.1. Built the app on my iPhone 4 with iOS 6 and it works correctly again. So this seems to be a problem with Xcode 4.5.
Post edited by esoteric on

Replies

Sign In or Register to comment.