Handle UIApplicationDidEnterBackgroundNotification not called

Hello, I’m writing a plugin for iOS UE4 and want to keep track of events
UIApplicationDidEnterBackgroundNotification and UIApplicationWillEnterForegroundNotification

NSNotificationCenter * defaultСenter = [NSNotificationCenter defaultCenter];
[defaultСenter addObserver:self selector:@selector(applicationWillEnterForeground:) name:UIApplicationWillEnterForegroundNotification object:nil];
[defaultСenter addObserver:self selector:@selector(applicationDidEnterBackground:) name:UIApplicationDidEnterBackgroundNotification object:nil];

The problem is that when you press sleep button UIApplicationDidEnterBackgroundNotification not called, and it is only called when you click on it a second time. Pressing the home button’s is OK. UIApplicationWillResignActiveNotification also not invoked the first time. What could be the problem and how to track care background from sleep button?

Hi Skazochnij,

There was an issue present in 4.10 where suspend (sleep) would not update game and render threads properly, thus not sending the event, if the frame limiter was on. We suspect that is what is happening here. To confirm this is the case, could you try disabling the frame limiting option in IOS Project Settings.

We have already fixed this issue internally, and it will be available in a future released version of the Engine.

Hi , could you comment (on my comment) for a related issue, thanks.