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.
-
2Are you calling the UINavigationController delegate method: fun navigationController(navigationController: UINavigationController, willShowViewController viewController: UIViewController, animated: Bool) { } ? – Norman G Jul 20 '16 at 02:56
-
2`willShowViewController ` is never called, no... – swalkner Jul 20 '16 at 05:07
-
I get the same. I am using SpriteKit and SceneKit and suspect them! – Howard Lovatt Jul 25 '16 at 08:38
-
I'm using neither SpriteKit nor SceneKit – swalkner Jul 25 '16 at 10:02
-
Same error message but no SpriteKit or SceneKit or navigation controller stuffs. Edited storyboard with IB before this message appearance. XCode 8b2. – BootMaker Jul 26 '16 at 06:21
-
3Anyone file a bug report? I'm about to. – ICL1901 Jul 30 '16 at 08:09
-
same here is there any solution for that? – seggy Sep 27 '16 at 11:25
-
I'm having the same problem; not using UINavigationController delegates or SpriteKit or SceneKit, just a very basic single-view app. – Jeff V Oct 01 '16 at 22:35
-
get this after presenting a MFMailComposeViewController on iOS 10 devices – drshock Oct 02 '16 at 17:57
-
OpenGL ES app (single view), same thing on interface orientation change. – Nicolas Miari Oct 15 '16 at 09:30
-
Simpe single view app, added a popover controller and this message started appearing – PruitIgoe Nov 22 '16 at 16:05
-
1Please have a look at this reply. http://stackoverflow.com/a/39997761/6602495 – Sneha Jan 10 '17 at 08:01
-
im opening settings from my app, and when returned from settings to my app i get this always. – Yawar Mar 01 '17 at 07:16
-
Dear god, make it stop. – Tjalsma Aug 14 '17 at 18:58
6 Answers
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

- 3,923
- 1
- 15
- 18
-
26Do be aware that I was randomly getting no NSLog output to the Console and removed this again to fix it. This is more of the 'high-class' programming we are subjected to by the goons at apple. – amergin Nov 24 '16 at 15:33
-
38For what it is worth, I get this message whenever an orientation change is made and i DO have the OS_ACTIVITY_MODE environment variable disabled. – JohnSF Dec 28 '16 at 00:37
-
2
-
5
-
2`OS_ACTIVITY_MODE = disable` cause troubles if you are using OSLog for logging. – Vlad Apr 02 '18 at 19:58
-
4
-
4Could someone please, explain this? Why we use it. Because we don't solve an error. We hide it. – J A S K I E R Jun 29 '18 at 19:00
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.

- 7,898
- 5
- 27
- 35
-
1Can you ,please, elaborate on tools, which you used for debugging to get this private method name and its structure? – Oleksandr Karaberov Oct 19 '16 at 14:23
-
9@AlexanderKaraberov you may use Hopper Disassembler to find warning text in framework binary and references to this text from private method. – k06a Nov 02 '16 at 14:04
-
I also get this when the keyboard scrolls in and I have a controller subscribed to respond by resizing its views. – yo.ian.g Aug 02 '17 at 18:56
Try putting the following in the environment variables
for the scheme under run(debug)
OS_ACTIVITY_MODE = disable

- 63,341
- 64
- 307
- 441

- 1,059
- 6
- 2
-
I got this in the simulator when rotating the iPhone 7 using the hardware->rotate menu items. This environment variable made the spurious message go away. – George D Girton Sep 19 '16 at 23:32
-
-
1The answer from @Foo below is useful because it includes the how-to details. – Kevin Owens Nov 06 '16 at 14:25
-
1
-
36OP asked where the message comes from. Just saying how to silence it is not the right answer. – iCaramba Dec 11 '16 at 20:29
-
Indeed, this adjustment is a subject to NSLog output disappearance, consequently returning upon deleting _OS_ACTIVITY_MODE = disable_ from the **environment variables**. This observation was made earlier in some other posting. – matrix3003 Dec 14 '16 at 17:34
-
6The "IOS_ACTIVITY_MODE = disable" answer turns off ALL logging! Just close the logging view if you don't want to see the log. Really ridiculous answer, amazing that it has so many votes! Does nothing to address the actual message. Our apps that heavily use core data work fine, these messages and others started appearing after one of the last Xcode updates. Sad that Apple can't resolve these type of issues. – John Jul 26 '17 at 14:07
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).
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)

- 12,165
- 4
- 57
- 73
-
Didn't work for me: I'm also seeing this in the console, despite already having disabled the debug activity mode as suggested above. – Johan Jun 03 '18 at 00:46
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.

- 3,829
- 1
- 31
- 49
-
1Doing a clean worked fine at first for me when I ran it in the simulator without rotating it, but then soon as I tested again with a rotation command, it reported the same error. – cheznead Jul 25 '17 at 15:00
-
I am using pan gestures and only get this error when changing orientation. – Jeremy Andrews Aug 01 '17 at 08:58
OS_ACTIVITY_MODE = disable
This will also disable the ability to debug in real devices (no console output from real devices from then on).