I have created an iOS .ipa file to run some tests, and all the test cases have os_log implemented for tracing. However, there is an issue; my tests take over 20 seconds to run, and the screen starts to dim. Consequently, the execution stops. Once I reactivate the screen, the tests resume. I added [UIApplication.sharedApplication setIdleTimerDisabled:YES];
to the code, but it doesn't resolve the problem.
I've used os_log to trace all the test case results. I wonder if it's possible to display all the os_log messages from runTest on the app main screen as well.
int main(int argc, char** argv) {
//Separate thread to runTest, os_log implemented there
std::thread thread_obj(runTests, argc, argv);
int applicationReturn;
@autoreleasepool {
[UIApplication.sharedApplication setIdleTimerDisabled:YES];
applicationReturn = UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
thread_obj.join();
[UIApplication.sharedApplication setIdleTimerDisabled:NO];
return applicationReturn;
}