Detect the city on application launch via geolocation react native

JavaScript
navigator.geolocation.getCurrentPosition((geo) => console.log(geo))

// or using lib

import Geolocation from '@react-native-community/geolocation';

Geolocation.getCurrentPosition(info => console.log(info));
Source

Also in JavaScript: