React Native 0.73.6
Expo SDK 50.0.14
Expo Router
Airbnb ESLint & Prettier
React Native Paper
- Clone the repository:
git clone https://github.com/inha-tanple/tanple-client.git
- Navigate to the project directory:
cd tanple-client
- Install dependencies:
npm install
- Make [.env] file in root directory
# google Ouath 2.0 client ID
ANDROID_CLIENT_ID=
IOS_CLIENT_ID=
EXPO_CLIENT_ID=
WEB_CLIENT_ID=
# your backend server URL
SERVER_URL=
- Make [env.d.ts] file in root directory
declare module '@env' {
export const ANDROID_CLIENT_ID: string
export const IOS_CLIENT_ID: string
export const EXPO_CLIENT_ID: string
export const WEB_CLIENT_ID: string
export const SERVER_URL: string
}
- Make [expo-env.d.ts] file in root directory
/// <reference types="expo/types" />
// NOTE: This file should not be edited and should be in your git ignore
- Package Install & Edit file like this
./node_modules/react-native-snap-carousel/src/carousel/Carousel.js
./node_modules/react-native-snap-carousel/src/Pagination/Pagination.js
./node_modules/react-native-snap-carousel/src/Pagination/PaginationDot.js
./node_modules/react-native-snap-carousel/src/ParallaxImage/ParallaxImage.js
npm install
// from
import { ... ,ViewPropTypes } from 'react-native';
// to
import { ... } from 'react-native';
import {ViewPropTypes} from 'deprecated-react-native-prop-types';
-
Put google-services.json on root directory
You need to register a firebase key for the notification service.
Follow the instructions at the address below. https://docs.expo.dev/push-notifications/fcm-credentials/ -
(Optional) You can toggle the Storybook screen by commenting out the below in '/src/app/layout.tsx'.
[Current react-native-skia version doesn't support storybook]
// other codes ...
export { default } from '../../.storybook'
// other codes ...
You can build it by creating an [eas.json] file and adding env option.
{
"cli": {
"version": ">= 7.6.2"
},
"build": {
"preview": {
"distribution": "internal",
"env": {
"ANDROID_CLIENT_ID": "",
"IOS_CLIENT_ID": "",
"EXPO_CLIENT_ID": "",
"WEB_CLIENT_ID": "",
"SERVER_URL": "",
"ANDROID_NDK": "/home/expo/Android/Sdk/ndk/25.1.8937393"
},
"ios": {
"simulator": true
},
"android": {
"ndk": "25.1.8937393"
}
},
"production": {}
},
"submit": {
"production": {}
}
}
# run on ios simulator
npm run ios
# run on android emulator
npm run android
# build android
eas build -p android --profile preview
# build ios
eas build -p ios --profile preview