On my PC it works great but when building for the iPAD, instead of quitting the application Unity just freezes, here the script attached to clickable 3d plane:
This is secondary to your question, but it is frowned upon to add a quit button to iOS applications, that is what the home button is for. You should follow the Human Interface Guidelines from apple, which will tell you not to quit programmatically.