title: Ionic with Geolocation alerts: 'mySecondApp.app/www/index.html' Would like to use your current location
body: <p>I know <a href="http://forum.ionicframework.com/t/geolocation-app-www-index-html-would-like-to-use/8219" rel="nofollow">there's a similar post</a> about this, but the owner got it working just by reinstalling the plugin, which didn't work for me. 
  Here's what I did:</p>
  
  <p><strong>$ ionic start mySecondApp tabs</strong></p>
  
  <p><strong>$ cd mySecondApp</strong></p>
  
  <p><strong>$ ionic platform add ios</strong></p>
  
  <p><strong>$ cordova plugin add org.apache.cordova.geolocation</strong></p>
  
  <p><strong>$ vim www/js/controller.js</strong></p>
  
  <p>**Insert this code at DashCtrl: **</p>
  
  <pre><code>.controller('DashCtrl', function($scope) {
  
    var onSuccess = function(position) {
      var lat       = position.coords.latitude;
      var lng       = position.coords.longitude;
  
     alert(lat +"\n" + lng);
    };
    // onError Callback receives a PositionError object
    //
    function onError(error) {
        alert('code: '    + error.code    + '\n' +
              'message: ' + error.message + '\n');
    }
    navigator.geolocation.getCurrentPosition(onSuccess, onError)
  
  })
  </code></pre>
  
  <p><em>save it</em></p>
  
  <p><strong>$ ionic build ios</strong></p>
  
  <p><strong>$ ionic emulate ios</strong></p>
  
  <p>First you will see the proper message that I want saying that your app wants to use your location, fine, then after that you will see this poping up:</p>
  
  <p><img src="//ionic-forum-uploads.s3.amazonaws.com/907116a746e37bfba4ad8a25973a95df08f234d2dec0.PNG" width="320" height="480"> </p>
  
  <p>Any idea how to fix this? I've tried ngcordova and doesn't work too</p>
  
  <p>The same happens on the emulator</p>
  
  <p>Here's the QR code if you want to use the ionic view</p>
  
  <p><img src="//ionic-forum-uploads.s3.amazonaws.com/90725d63030dd1357c563c3fa69287135d5775c9954f.png" width="147" height="147"> </p>
  
  <p>Or just download the project: <a href="https://ionic-apps.s3.amazonaws.com/J8uCp5Kmad2RAOdH1D9V_A1lHEFaXS1-Y7X7nz5qBk4wR4QLToxmQa7QAm9paDOcugEMGZ_zS-vEeVobcmP7JvFA.zip?Signature=ubkh3eBJ/q4ipJ7zqXPJUDKSHEo=&amp;Expires=1423252940&amp;AWSAccessKeyId=AKIAJNVFCZ37MVYOD34A" rel="nofollow">here</a></p>