If you are running your app through Xcode, the screen will never automatically sleep. Try testing the app while not connected to the debugger.
Settings > Display & Brightness > Auto-Lock: If it's set to "Never", the screen will never automatically sleep. Try lowering this value to 30 seconds for expedited testing.
If you have one of the newer iPhones with Face ID, the display will never dim so long as the sensor is detecting your attention. So if you are staring at the phone waiting for the display to turn off - it will not. This setting can be disabled under Face ID settings.
It's possible your app is doing something else (playing a video, interacting with a 3rd party SDK) that is keeping the screen on beyond what you have control over.
I'm guessing one of the above applies to you, but if not let me know and I can investigate further.
I'm having an issue with this library on iOS. I tested this with iphone X 12.3.1
When i include the library and link it the phone always stays on. Even without calling a function in this library.
Infact, the screen even remains on when I only call
IdleTimerManager.setIdleTimerDisabled(false);
Has anyone else experienced this?