title: React native geolocation service not working for iOS
body: <p>I am trying to get device current position in react native. I am using below library for get the location:</p>
  
  <pre><code>react-native-geolocation-service
  </code></pre>
  
  <p>My code:</p>
  
  <pre><code>try {
          const granted = await PermissionsAndroid.request(
            PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION,
            {
              title: 'Device current location permission',
              message:
                'Allow app to get your current location',
              buttonNeutral: 'Ask Me Later',
              buttonNegative: 'Cancel',
              buttonPositive: 'OK',
            },
          );
          if (granted === PermissionsAndroid.RESULTS.GRANTED) {
            this.getCurrentLocation();
          } else {
            console.log('Location permission denied');
          }
        } catch (err) {
          console.warn(err);
        }
       }
  
  getCurrentLocation(){
       Geolocation.requestAuthorization();
       Geolocation.getCurrentPosition(
          (position) =&gt; {
              alert(position.coords.latitude);
              this.socket.emit('position', {
                 data: position,
                 id: this.id,
               });
          },
          (error) =&gt; {
            alert("map error: "+error.message);
              console.log(error.code, error.message);
          },
          { enableHighAccuracy: true, timeout: 15000, maximumAge: 10000 }
      );
     }
  </code></pre>
  
  <p>Android is working fine and getting the correct location but for IOS it's not working Also, it's not asking for allow location persmission. I am getting below error:</p>
  
  <pre><code>PERMISSION_DENIED: 1
  POSITION_UNAVAILABLE: 2
  TIMEOUT: 3
  code: 3
  message: "Unable to fetch location within 15.0s."
  </code></pre>
  
  <p>This is my info.plist:</p>
  
  <pre><code>&lt;key&gt;NSLocationWhenInUseUsageDescription&lt;/key&gt;
  &lt;string&gt;$(PRODUCT_NAME) would like to access your location.&lt;/string&gt;
  &lt;key&gt;NSLocationAlwaysUsageDescription&lt;/key&gt;
  &lt;string&gt;$(PRODUCT_NAME) would like to access your location.&lt;/string&gt;
  </code></pre>
  
  <p>This is background modes from xcode</p>
  
  <p><a href="https://i.stack.imgur.com/2OX24.png" rel="noreferrer"><img src="https://i.stack.imgur.com/2OX24.png" alt="enter image description here"></a></p>