Deleting app(.app extension) after the execution complete is not working in Mac OS

I am working on the Project and i'm facing technical issue.

It is a exported app from applescript and i'm performing self delete means after the execution is complete it destroys from that location. I'm using the below shell script in applescript to invoke deletion

**do shell script "sleep 5 && rm -rf " The .app path posix location" &"**

When i run locally it is working perfectly but after codesign it is not working. Also when we copy the file to other location then it is working. I'm little confused and not able to identify the issue.

Please help me out and really appreciate your help.

Thanks & Regards, Rajkumar V

Deleting app(.app extension) after the execution complete is not working in Mac OS
 
 
Q