Skip to content

Commit

Permalink
fix: fix help loading and add eas config
Browse files Browse the repository at this point in the history
  • Loading branch information
sudjoao committed Oct 9, 2023
1 parent 6fabb89 commit 40eeaee
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 35 deletions.
6 changes: 3 additions & 3 deletions app/app.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
};
};
18 changes: 14 additions & 4 deletions app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -20,7 +23,9 @@
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": ["**/*"],
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.miaajuda.app"
Expand All @@ -40,6 +45,11 @@
"wasm",
"svg"
]
},
"extra": {
"eas": {
"projectId": ""
}
}
}
}
}
35 changes: 19 additions & 16 deletions app/eas.json
Original file line number Diff line number Diff line change
@@ -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": {}
}
}
8 changes: 4 additions & 4 deletions app/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ export default function Root() {
return (
<>
<DeviceInfoProvider>
<LoadingContextProvider>
<UserContextProvider>
<UserContextProvider>
<LoadingContextProvider>
<SocialNetworkProfileContextProvider>
<CategoryContextProvider>
<HelpContextProvider>
Expand All @@ -41,8 +41,8 @@ export default function Root() {
</HelpContextProvider>
</CategoryContextProvider>
</SocialNetworkProfileContextProvider>
</UserContextProvider>
</LoadingContextProvider>
</LoadingContextProvider>
</UserContextProvider>
</DeviceInfoProvider>
</>
);
Expand Down
4 changes: 2 additions & 2 deletions app/src/services/Firebase.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
10 changes: 4 additions & 6 deletions app/src/store/contexts/userContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -112,7 +111,6 @@ export const UserContextProvider = (props) => {
}

async function fetchUserInfo(userId) {
console.log(userId);
return await callService(UserService, 'getAnyUser', [userId]);
}

Expand Down

0 comments on commit 40eeaee

Please sign in to comment.