title: Lock iOS app in single app mode programmatically
body: <p><strong>Note :</strong> I don't want to submit this app to app store.</p>
  
  <p><strong>What i want to achieve :</strong></p>
  
  <p>I want simple app with one view having two button Lock and Unlock.</p>
  
  <p><em>Lock</em> - This button will lock device. Only this app's screen will show nothing else will be accessible even after restart same screen will show up. Home button, gestures will get disabled similar to single app mode.</p>
  
  <p><em>Unlock</em> - This will unlock device and switch to normal behaviour of device.</p>
  
  <p><strong>iOS :</strong>
  I want this for iOS 4.3 and above.</p>
  
  <p>I have checked following solutions, but these don't match my requirements</p>
  
  <ol>
  <li><p>Configuration profile</p>
  
  <p><a href="https://stackoverflow.com/questions/5011774/lock-down-iphone-ipod-ipad-so-it-can-only-run-one-app">Lock-down iPhone/iPod/iPad so it can only run one app</a></p>
  
  <p>But it is manual (reboot device, open app which you want to run in single app mode). I want to do it programmatically the way i mentioned above through my app.</p></li>
  <li><p>Guided access (iOS 6 and above)</p>
  
  <p><a href="https://stackoverflow.com/questions/13117610/how-to-lock-down-user-to-single-app-mode-in-ios-6-programmatically">How to lock down user to Single App mode in iOS 6, Programmatically?</a></p>
  
  <p>I want it do for all os and programatically.</p></li>
  </ol>
  
  <p>Is there any way to do this ? As i don't wan't to submit it to app store is there any private api, some hack for springboard to achieve this ? </p>
  
  <p>Thanks in advance !!</p>