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;
}
Post
Replies
Boosts
Views
Activity
I need some help on some crash issues on the app that I build with Xcode15. I previously encountered compatibility issues with various real iPhone models when using Xcode 14, hence I upgraded xcode 14 to 15 and resolved the compatibility issues. Even the build is success, however the app crashes when it launch on iphone XS with the error:
errror #3 0x000000010e5508d4 in ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) ().
It doesn’t appear to be related to my local C++ code. I googled on that, some threads recommend me to do clean build, delete .xcodeproj and regenerate xcodeproj, restart xcode, unchecked thread sanitizer etc etc. But I tried that, problem still persist. I wonder does anyone know what can cause the problem?
xcode version: xcode15
psychical Iphone model: iphone XS
ios version : 13.7
I have an iOS application which is developed with C++, and my physical iPhone is connected to my Mac. While running the app via Xcode, I can easily view the printouts within the Xcode console. However, upon manually executing the app on the iPhone and utilizing the command "idevicesyslog -d -p myAppName" on my Mac the terminal, I notice that only specific logs generated by the .mm files are visible. And I'm unable to access the remaining traces, macros, and other details from the .h or .cpp files.
Is there a method to ensure that all the logs I observe in the Xcode console are also displayed in "idevicesyslog"? Alternatively, are there any technique to show all the printout from .cpp and .h files.