title: Auto lock does not function when app left open - iOS
body: <p>I'm developing a messaging app and auto lock doesn't function when app left open. (No single line is related to auto lock in code) </p>
  
  <p>I've used this line to enabling it, </p>
  
  <pre><code>[[UIApplication sharedApplication] setIdleTimerDisabled:NO]; 
  </code></pre>
  
  <p>but its not working.</p>
  
  <p>Any idea how to get this done?</p>