ios 如果我们在真正的预提交处理程序中,由于 CA 限制,我们实际上无法添加任何新的栅栏
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/38741519/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
if we're in the real pre-commit handler we can't actually add any new fences due to CA restriction
提问by shivam
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.
我正在使用带有相机类型的 UIImagePickerController。当我第一次打开图像选择器控制器时它工作正常,但是在打开图像选择器 vc 后,当我旋转设备时,它显示“[App] 如果我们在真正的预提交处理程序中,我们实际上无法添加由于 CA 限制而产生的任何新围栏”,并且有一个带有摄像头图像的白色屏幕,没有任何可捕获的选项。
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.
它在 iOS 9.3 之前运行良好,这发生在 iOS10.3 beta 中。
I will appreciate your help.
我会感谢你的帮助。
Find screenshots here: https://postimg.org/image/qy6k7dc7b/
在此处查找屏幕截图: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,
谢谢,
回答by Sagar D
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 thisanswer.
当设备的方向发生变化时会出现此消息,这可能是 Apple 方面的问题。已针对此问题提交雷达(雷达编号 28250512)您可以暂时忽略该消息,或者,您可以按照本答案中的说明设置环境变量来禁用操作系统提供的日志。
回答by naresh d
in your Xcode:
在您的 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
添加变量:OS_ACTIVITY_MODE = 禁用
回答by zeeshan Dar
In Your Xcode Project Go to the Top of the screen you see Product Click on the Product and you see Bottom third option Scheme click on the Scheme you see Bottom third option Edit Scheme click on the Edit Scheme then First option is Arguments Passed On Launch and and you see + and - button here click on the + button and Write OS_ACTIVITY_MODE and check this and write bottom option close click on close your error will Remove Enjoy. :p
在您的 Xcode 项目中,转到屏幕顶部,您会看到 Product 单击产品,您会看到底部第三个选项 Scheme 单击该方案,您会看到底部第三个选项 Edit Scheme 单击 Edit Scheme 然后第一个选项是 Arguments Passed On Launch 和并且您在此处看到 + 和 - 按钮,单击 + 按钮并写入 OS_ACTIVITY_MODE 并选中此项并写入底部选项关闭单击关闭您的错误将删除享受。:p