UIImagePickerController and snapshotting issue

In some ways this isn't specific to iOS9 but it still continues into the current Beta from previous iOS versions. I've done a search both here and on the wider web and can't really find any answers to what *ought* to be a simple matter.


Presenting a UIImagePickerController with a sourceType of .Camera results in a message to the Console:

Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen updates.


I can find no reasonable answer to this, though there are plenty of people who reckon that they've found the answer, with others replying that it hasn't worked in their case. All of which take to imply that no one has really found an answer and we're all clutching at straws.


It is important to note that this behaviour is exhibited with Apple's own sample code 'PhotoPicker' (though this is Obj-C).


I'm also seeing:


XPC connection interrupted
Received memory warning.


I'm not even sure that it *matters* when running on the device not attached to Xcode as the picker appears and it takes a picture and dismisses without any further kind of error (at least that I can see at the moment). It's just disconcerting to see the message and think that maybe there's a bug just waiting to go off in your face.

Unrelated to PickerView, however I see the same error Snapshotting a view that has not been rendered results in an empty snapshot.), but in my case I'm displaying UIActivityViewController and (attempting) to set the tintColor as follows:


@IBAction func shareStatBarButtonTapped(sender: AnyObject) {

var activityItems: [AnyObject]?

activityItems = [composeSocialMediaMessage()]

let activityController = UIActivityViewController(activityItems: activityItems!, applicationActivities: nil)

activityController.setValue("Some Subject", forKey: "subject")


// if this line where I try to set the tintColor of the activity controller is removed, the Snapshotting runtime error goes away

activityController.view.tintColor = UIColor(red: 46.0/255.0, green: 121.0/255.0, blue: 21.0/255.0, alpha: 1.0)


self.presentViewController(activityController, animated: true, completion: nil)

}


I only see this after upgrade to Version 7.0 (7A220).

UIImagePickerController and snapshotting issue
 
 
Q