title: How to restrict Ionic 2 application installation if device is rooted or jail broken?
body: <p>I have an <strong>Ionic 2</strong> and <strong>Angular 2</strong> application.<br>
  And I need to check if the device is rooted (Android case) or jailbroken (Ios case)?  </p>
  
  <p>I have tried the following packages (cordova plugins):  </p>
  
  <ul>
  <li><p><code>cordova plugin add cordova-plugin-iroot --save</code><br>
  <strong>IRoot</strong>.isRooted(successCallback, failureCallback);</p></li>
  <li><p><code>cordova-plugin-root-detection --save</code><br>
  <strong>rootdetection</strong>.isDeviceRooted(successCallback, errorCallback);</p></li>
  </ul>
  
  <p>Unfortunately, none of them worked for me... both the plugins have similar implementation </p>
  
  <p>I am not able to import neither <strong>IRoot</strong> nor <strong>rootdetection</strong>  classes from the <code>npm modules</code>.</p>
  
  <p>If there is any way to restrict the app installation, please share your response.</p>
  
  <p>Thanks in advance.
  Piyush</p>