This is a React Native project, that the app will get user location (lat/long), and return the weather, temperature and the address.
After clone the project, go to the project directory cd /path/the/code
and run
npm install
// or
yarn
After install node modules, if will run the project for iOS
, you need to run the dependencies
cd ios/
pod install
cd ..
Now, go to openweathermap, and create a free account, to get an API Key. After, go to Google Maps Geocoding API to get the API Key.
After create the both API Keys, go to the file <ProjectDir>/src/constants/index.ts
and set the key on constants
export const WEATHER_API_KEY = '';
export const MAP_API_KEY = '';
Then, run the project
// ios
react-native run ios
// or
// android
react-native run android
@react-native-community/geolocation // get the user location (lat/long)
axios // use to request the weather on openweathermap
react-native-geocoding // use lat and long to get the address using Google Maps Geocoding API