The following error message was seen in the system log (XCode console) at svn 3857 on simulator for iPhone 6.
Note: the message does not appear on simulator for iPad Pro (12.9).
Configuration: on rotation show help screen.
Scenario:
in the card list, turn the device to landscape mode and back to portrait.
Expected behaviour: see the help view appear and disappear.
Observed behaviour: the help view appears and disappears as expected, but in the console window an error message is shown:
2017-09-03 14:57:12.788178+0200 karatasi[15168:3396958] [App] if we're in the real pre-commit handler we can't actually add any new fences due to CA restriction
Note: I get this message also if I revert the improved handling of the help view (svn 3856).
Not related to the help view. I see the same message with configuration: On rotation rotate screen.
Not related to the Card list. I get the same message in all other non-modal and modal views (I tried: card list, cat list, db list, db edit, cat edit, single card; and modal: db info, about, learning data, drill finished, drill).
Seems to be a general problem with the iOS API.
See discussions on the internet:
https://stackoverflow.com/questions/38458170/ios-10-app-if-were-in-the-real-pre-commit-handler-we-cant-actually-add-any/39493900
(Answer from Roman Ermolov:)
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:
adding passed precommit handler to list of handlers;
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.
https://stackoverflow.com/questions/38741519/if-were-in-the-real-pre-commit-handler-we-cant-actually-add-any-new-fences-due/39997761#39997761
(Answer from Shaggy 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)
Watch if this happens still with newer API versions.
Moving to later milestone.
I do not see this error message / warning again with the latest code at commit 0af116b143077891303f1aebe735ee0baebb29f2.
Closing the ticket.
Note: we are now linking to SDK 13. Currently we have setup target device to iOS 13.0, maybe we will extend it back to some 12.x version for better inclusion of our users.