Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

if we're in the real pre-commit handler we can't actually add any new fences due to CA restriction [duplicate]

I am using UIImagePickerController with Camera type. When I first opens the image picker controller it works fine, But after open the image picker vc, when i rotate the device, It shows the "[App] if we're in the real pre-commit handler we can't actually add any new fences due to CA restriction" & there is a white screen with camera image without any options to capture.

It also shows "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."

It is working fine till iOS 9.3, this is happening in iOS10.3 beta.

I will appreciate your help.

Find screenshots here: https://postimg.org/image/qy6k7dc7b/

My Codebase:

UIImagePickerController *pickerController = [[UIImagePickerController alloc] init];
pickerController.sourceType = UIImagePickerControllerSourceTypeCamera;
pickerController.delegate = self;
[self presentViewController:pickerController animated:YES completion:nil];

Thanks,

like image 388
shivam Avatar asked Aug 03 '16 10:08

shivam


2 Answers

This message appears when the orientation of the device changes and is probably some issue from Apple side. A radar has been filed for this issue (Radar Number 28250512) You can ignore the message temporarily, or else, you can disable the logs given by OS by setting the environment variable as described in this answer.

like image 178
Sagar D Avatar answered Oct 03 '22 04:10

Sagar D


in your Xcode:

Click on your active scheme name right next to the Stop button

Click on Edit Scheme....

in Run (Debug)-->select the Arguments tab

in Environment Variables click +

add variable: OS_ACTIVITY_MODE = disable

like image 35
naresh d Avatar answered Oct 03 '22 04:10

naresh d