Question

[Solved] iOS 10: “[App] if we’re in the real pre-commit handler we can’t actually add any new fences due to CA restriction”

I sometimes get this message in the logs of Xcode 8b3 when running my app, everything seems to work, but I’d like to know where this comes from. Google did not help at all.

Enquirer: swalkner

||

Solution #1:

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

screenshot

Respondent: Ed.

Solution #2:

It comes from +[UIWindow _synchronizeDrawingAcrossProcessesOverPort:withPreCommitHandler:] via os_log API. It doesn’t depend from another components/frameworks that you are using(only from UIKit) – it reproduces in clean single view application project on changing interface orientation.

This method consists from 2 parts:

  1. adding passed precommit handler to list of handlers;
  2. do some work, that depends on current finite state machine state.

When second part fails (looks like prohibited transition), it prints message above to error log.
However, I think that this problem is not fatal: there are 2 additional assert cases in this method, that will lead to crash in debug.

Seems that radar is the best we can do.

Respondent: Roman Ermolov

Solution #3:

Try putting the following in the environment variables for the scheme under run(debug)

OS_ACTIVITY_MODE = disable
Respondent: Nick Peachey

Solution #4:

We can mute it in this way (device and simulator need different values):

Add the Name OS_ACTIVITY_MODE and the Value ${DEBUG_ACTIVITY_MODE} and check it (in Product -> Scheme -> Edit Scheme -> Run -> Arguments -> Environment).

enter image description here

Add User-Defined Setting DEBUG_ACTIVITY_MODE, then add Any iOS Simulator SDK for Debug and set it’s value to disable (in Project -> Build settings -> + -> User-Defined Setting)

enter image description here

Respondent: Igor

Solution #5:

To fix, I deleted the app from Simulator.

I also ran Clean first.

I do not think anything orientation-related triggered it. The biggest thing that changed before this symptom started is that a Swift framework started calling NSLog on worker threads instead of main thread.

Respondent: Jeff

Solution #6:

OS_ACTIVITY_MODE = disable

This will also disable the ability to debug in real devices (no console output from real devices from then on).

Respondent: kindaian

The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .

Most Popular

To Top
India and Pakistan’s steroid-soaked rhetoric over Kashmir will come back to haunt them both clenbuterol australia bossier man pleads guilty for leadership role in anabolic steriod distribution conspiracy