Now I am using cordova application app for getting current latitude and longitude so I have used cordova geolocation plugin
for both iOS and android.
This plugin I have installed in CLI
cordova plugin add org.apache.cordova.geolocation
and I have used the same codes used in https://cordova.apache.org/docs/en/3.0.0/cordova_geolocation_geolocation.md.html
But its worked fine in android and iOS simulator (custom location) but in my iPad and iPhone its don't work ...I don't know why please tell anyone why some times its showing error like code:2, message:
The operation couldn’t be completed. (kCLErrorDomain error 0.) & code:3 error....