Ionic Native + geofance + iOS ERROR : "Location always permissions not granted"

please help me out from this error.

ionic Native + geofance + iOS

I am dealing with geofence with ionic native, with Android Geofence working fine, but iOS give me error error : “Location always permissions not granted”.

this.geofence.initialize().then(data => {
console.log('Geofence Plugin Ready');
         let fence = {
            id              : '69ca1b88-6fbe-4e80-a4d4-ff4d3748acdb', //any unique ID
            latitude        : 21.08328129405459, //
            longitude       : 72.88010023534298, //
            radius          : 30, 
            transitionType  : 3, 
            notification    : { //notification settings
                                id              :  11212,//
                                title           : 'Insta Place',
                                text            : 'You are Near the Location.',
                                icon            : 'file://icon.png',
                                openAppOnClick  : true
                            }
          }
          // alert(JSON.stringify(fence));

          this.geofence.addOrUpdate(fence).then(
             (data) => console.log('Geofence added'),
             (err) => alert('Geofence failed to add Please Turn On your device location and try again.'+ err)
           );
        },err => {
           alert('Geofence Plugin Not Ready' + JSON.stringify(err));
        })

thanks.

  1. Open project in xcode -> got to the info setting tab -> add Privacy setting ‘Location Always & when user description’
  2. Run/Build your app on device
  3. You will get prompt to provide access for location, and select option Always

thanks @ionic_brijeshp

but I have already tried this one, but unfortunately same error.

:anguished:

not this one, there will be 3 Privacies for location, add new ‘Privacy - Location Always and When In Usage Description’

1 Like

thanks @ionic_brijeshp. :slight_smile:

1 Like

Just confirm once your fence start working on IOS, I am having issue to trigger transition (enter/leave).