Clean simulator history

Hello!

Have a project witch save some data to device.

So when I restart this project on simulator, simulator already have this data from last times.

How i can clean all simulator history and start my project from new device?

Thanks!

on mac

file/show project sandbox/documents

on pc

sure its similar but cant say for sure

I put a debug button into my game which calls a function like this:

local function removeDataAndQuit() os.remove( system.pathForFile( "myFile1.json", system.DocumentsDirectory ) ) os.remove( system.pathForFile( "myFile2.txt", system.DocumentsDirectory ) ) os.remove( system.pathForFile( "myFile3.png", system.DocumentsDirectory ) ) os.exit() end

This function will remove the files you specify, and then exit the app. But you MUST make sure that the function is not accessible when you submit to a store, especially to Apple.

Great Thanks! :slight_smile:

on mac

file/show project sandbox/documents

on pc

sure its similar but cant say for sure

I put a debug button into my game which calls a function like this:

local function removeDataAndQuit() os.remove( system.pathForFile( "myFile1.json", system.DocumentsDirectory ) ) os.remove( system.pathForFile( "myFile2.txt", system.DocumentsDirectory ) ) os.remove( system.pathForFile( "myFile3.png", system.DocumentsDirectory ) ) os.exit() end

This function will remove the files you specify, and then exit the app. But you MUST make sure that the function is not accessible when you submit to a store, especially to Apple.

Great Thanks! :slight_smile: