Skip to content

chore: removed old not used config #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,17 @@ const config = {
otaUpdateUrl: '',
}

const environment = process.env.EXPO_PUBLIC_APP_ENV || 'dev'
const detectedEnvironment = process.env.EXPO_PUBLIC_APP_ENV || 'dev'

// your custom fonts
const fonts = ['./assets/fonts/Domine-Bold.ttf']

// prefetched/embedded assets, can be referenced as source='strv_logo' https://docs.expo.dev/versions/latest/sdk/asset/#configurable-properties
const assets = ['./assets/images/strv_logo.png']

const getEnvironmentInfo = (): {
export const getEnvironmentInfo = (
environment: Environment,
): {
name: ExpoConfig['name']
appIdentifier: IOS['bundleIdentifier']
icon: ExpoConfig['icon']
Expand All @@ -62,7 +64,7 @@ const getEnvironmentInfo = (): {
}
}

const { name, appIdentifier, icon } = getEnvironmentInfo()
const { name, appIdentifier, icon } = getEnvironmentInfo(detectedEnvironment)

const plugins: ExpoConfig['plugins'] = [
['expo-build-properties'],
Expand Down
9 changes: 8 additions & 1 deletion eas.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,12 @@
"environment": "production"
}
},
"submit": {}
"submit": {
"production": {
"ios": {
"ascAppId": "1234567890",
"appleTeamId": "1234567890"
}
}
}
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@
"@dev-plugins/react-native-mmkv": "^0.2.0",
"@react-native-community/netinfo": "11.4.1",
"expo": "^52.0.44",
"expo-asset": "~11.0.5",
"expo-build-properties": "~0.13.2",
"expo-constants": "~17.0.8",
"expo-dev-client": "~5.0.20",
"expo-font": "~13.0.4",
"expo-image": "~2.0.7",
"expo-linking": "~7.0.5",
"expo-router": "~4.0.20",
Expand Down
6 changes: 6 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions src/config.ts

This file was deleted.

8 changes: 4 additions & 4 deletions src/utils/getStoreLink.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { getEnvironmentInfo } from 'app.config'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a good practice to import anything from the app config? Is the app config actually bundled with the app? Shouldn't we rather use expo constants for this?

Copy link
Contributor Author

@petrkonecny2 petrkonecny2 Jun 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it is bundled yes. It should just be a file like any other. I don't think importing from it should create any issues.

import easJson from 'eas.json'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i did try to build it through eas and try in testflight and it seemed to work fine.

import { Platform } from 'react-native'

import { config } from '~/config'

const applicationIdProd = config.applicationIdProd
const appleIdProd = config.appleIdProd
const applicationIdProd = getEnvironmentInfo('production').appIdentifier
const appleIdProd = easJson.submit.production.ios.ascAppId

type StoreLink = {
storeURI: string
Expand Down
Loading