How to clean up ios temporary directory

I am building an app now mostly using Cordova camera with wkwebview.
I found that when I choose a photo from library of my iPhone, its address is like


I think the photo I chose is copied to the temp directory.
Is there any way to delete the file and even all the file in that folder?

I was thinking about using Native File plugin but haven’t found right example.

Can anybody help me on this?

Thanks a lot in advance !!!

I found the answer.

I am leaving it here for other people.

I used native File plugin especially removeRecursively function.

this.file.removeRecursively(this.file.applicationStorageDirectory, ‘tmp/’)
.then(result => console.log(result)).catch(err => console.log(err))

This removes all the file inside the temporary directory while using Camera.cleanup() only removes the files the Camera plugin made which was not what I want.

Unfortunately this is not working for my build on ios 10.1

with me is diferent i use document scanner plugin and i wish to save image in the temporary folder.You know how can i do this?