It could be that you added the property “OS_ACTIVITY_MODE”: “disable” in the Scheme environment variables (to hide OS output from the simulator) and forgot about it, and now are running on a real device.
In Xcode 8:
Product -> Scheme -> Edit Scheme -> Run -> Arguments -> Environment Variables
Only add OS_ACTIVITY_MODE
and check it(Don’t add a value)
Summary:
This is a bug of Xcode 8 + iOS10, we can solve it in this way:
-
When using the simulator, add the Name “OS_ACTIVITY_MODE” and the Value “disable” and check it.
-
When on a real device, only add “OS_ACTIVITY_MODE” and check it(Don’t add the Value).
You will see the NSLog in the Xcode8 Console.