title: Is there a way to programmatically restore my iPhone to factory settings?
body: <p>I am developing for a jailbroken app and I don't care if it's rejected by the App store. I have found a way to completely wipe out my iPhone using this way <a href="https://stackoverflow.com/questions/15195941/is-there-a-way-to-completely-wipe-out-iphone-data-programatically">Is there a way to completely wipe out iPhone data programatically?</a>. There is a problem with this method however. It makes my iphone worthless and I have to recover it using itunes.
  I just want to factory restore my iphone programmatically.</p>