public void resetContentAndSettings ( ) { if ( instrumentsVersion . getMajor ( ) < 6 ) { if ( hasContentAndSettingsFolder ( ) ) { boolean ok = deleteRecursive ( getContentAndSettingsFolder ( ) ) ; if ( ! ok ) { System . err . println ( "cannot delete content and settings folder " + contentAndSettingsFolder ) ; } } // Wipe the system.log. String deviceLogDir = System . getProperty ( "user.home" ) + "/Library/Logs/iOS Simulator/" + exactSdkVersion + ( ( is64bit ) ? "-64" : "" ) ; File deviceLog = new File ( deviceLogDir , "system.log" ) ; if ( deviceLog . exists ( ) ) { deviceLog . delete ( ) ; } boolean ok = contentAndSettingsFolder . mkdirs ( ) ; if ( ! ok ) { System . err . println ( "couldn't re-create: " + contentAndSettingsFolder ) ; } } else { if ( ! eraseSimulator ( ) ) { log . info ( "Erase contents and settings failed on this device: " + deviceUUID ) ; tryToEraseSimulator ( ) ; } } }
Does what IOS Simulator - Reset content and settings menu does by deleting the files on disk . The simulator shouldn t be running when that is done .