Detecting application crashed and retrieving crash logs

Hi
I’m looking for a way to understand if the application that I’m testing with appium is crashed during my tests and if its crashed I want to retrieve the crash logs
Is something like that possible?

Thanks
Tolga

Get the ADB/iOS log and analyze the cause.
To get log follow these links

For iOS GitHub - appium-boneyard/appium-ios-log: Access to iOS system and crash logs
Hope it helps

1 Like

Try catch will help you , with report code in catch.

Even if I understand the crash with try catches. How can I get the symbolicated crash log?

I’ve used the below code to receive crash logs from IOS however even if my app crashes it doesn’t show the crash logs. Am I missing something ?

List<LogEntry> crashEntries = driver.manage().logs().get("crashlog").getAll();
		
if (crashEntries.size() > 0) {
	logger.severe("CRASH ENTRY DETECTED"+crashEntries.get(0).getMessage());
}

any idea about that problem?