diff --git a/app/app.config.js b/app/app.config.js index 07d630fd..90459f0b 100644 --- a/app/app.config.js +++ b/app/app.config.js @@ -15,13 +15,13 @@ export default ({ config }) => { 'READ_PHONE_STATE', 'WRITE_EXTERNAL_STORAGE', ], - googleServicesFile: './google-services.json', + googleServicesFile: process.env.GOOGLE_SERVICES_JSON, config: { googleMaps: { - apiKey: MAPS_API_KEY, + apiKey: process.env.MAPS_API_KEY, }, }, - versionCode: 220, + versionCode: 302, }, }; }; diff --git a/app/app.json b/app/app.json index 2e3f678c..a5d8c989 100644 --- a/app/app.json +++ b/app/app.json @@ -3,13 +3,16 @@ "name": "Mia Ajuda", "slug": "miaajuda", "privacy": "public", - "platforms": ["android", "ios"], + "platforms": [ + "android", + "ios" + ], "notification": { "icon": "./assets/images/logo.png", "color": "#4b8ab9", "androidMode": "default" }, - "version": "2.2.0 Mutt", + "version": "3.0.2 Corgi", "orientation": "portrait", "icon": "./assets/images/logo.png", "splash": { @@ -20,7 +23,9 @@ "updates": { "fallbackToCacheTimeout": 0 }, - "assetBundlePatterns": ["**/*"], + "assetBundlePatterns": [ + "**/*" + ], "ios": { "supportsTablet": true, "bundleIdentifier": "com.miaajuda.app" @@ -40,6 +45,11 @@ "wasm", "svg" ] + }, + "extra": { + "eas": { + "projectId": "" + } } } -} +} \ No newline at end of file diff --git a/app/eas.json b/app/eas.json index 300f4ac8..fd0e0dfd 100644 --- a/app/eas.json +++ b/app/eas.json @@ -1,19 +1,22 @@ { - "cli": { - "version": ">= 0.57.0" + "cli": { + "version": ">= 5.2.0" + }, + "build": { + "development": { + "developmentClient": true, + "distribution": "internal" }, - "submit": { - "production": { - "android": { - "serviceAccountKeyPath": "./serviceAccountKey.json", - "track": "production" - } - }, - "alpha_test": { - "android": { - "serviceAccountKeyPath": "./serviceAccountKey.json", - "track": "alpha" - } - } + "preview": { + "distribution": "internal" + }, + "production": { + "android": { + "buildType": "apk" + } } -} + }, + "submit": { + "production": {} + } +} \ No newline at end of file diff --git a/app/src/index.js b/app/src/index.js index dfe5aeb4..2140dbc2 100644 --- a/app/src/index.js +++ b/app/src/index.js @@ -18,8 +18,8 @@ export default function Root() { return ( <> - - + + @@ -41,8 +41,8 @@ export default function Root() { - - + + ); diff --git a/app/src/services/Firebase.js b/app/src/services/Firebase.js index cc0defc7..0110df5c 100644 --- a/app/src/services/Firebase.js +++ b/app/src/services/Firebase.js @@ -10,8 +10,8 @@ import { onAuthStateChanged, } from 'firebase/auth'; import Constants from 'expo-constants'; -import authConfig from '../config/authmiaajuda-firebase'; -import authConfigDev from '../config/authmiaajuda-firebase-dev'; +const authConfig = JSON.parse(process.env.AUTH_CONFIG_JSON); +const authConfigDev = JSON.parse(process.env.AUTH_DEV_CONFIG_JSON); class FirebaseService { constructor() { diff --git a/app/src/store/contexts/userContext.js b/app/src/store/contexts/userContext.js index 7e967c86..4a640712 100644 --- a/app/src/store/contexts/userContext.js +++ b/app/src/store/contexts/userContext.js @@ -7,7 +7,7 @@ import actions from '../actions'; import env from '../../config/envVariables'; import { - getCurrentPositionAsync, + getLastKnownPositionAsync, requestForegroundPermissionsAsync, } from 'expo-location'; import callService from '../../services/callService'; @@ -41,11 +41,10 @@ export const UserContextProvider = (props) => { async function getLocation() { const { granted } = await requestForegroundPermissionsAsync(); + if (granted) { - const { coords } = await getCurrentPositionAsync({ - enableHighAccuracy: true, - }); - const { latitude, longitude } = coords; + let location = await getLastKnownPositionAsync({}); + const { latitude, longitude } = location.coords; setUserPosition({ latitude, longitude, @@ -112,7 +111,6 @@ export const UserContextProvider = (props) => { } async function fetchUserInfo(userId) { - console.log(userId); return await callService(UserService, 'getAnyUser', [userId]); }