+[CATransaction synchronize] called within transaction +[CATransaction synchronize] called within transaction ios ios

+[CATransaction synchronize] called within transaction


This happens when more than one animations are taking place on main thread. I faced the same problem. In my case application freezes while animating the CALayer and rotating the device simultaneously. So I stopped the animation while rotating the device.

Look for the code

[CATransaction begin]//foo[CATransaction commit]

Make sure that animation inside this code does not overlap with your other animations on main thread.


This can show up in the logs if you use UIWindow.rootViewController to skip storyboards altogether.

To ditch the log message you can remove the storyboard, remove the key associating the Storyboard with your app in info.plist, set LaunchScreen.storyboard as the Main Interface in the target and use

window = UIApplication.shared.keyWindow!

inside AppDelegate to get the main window and assign your UIViewController on it.


matomo