Skip to content

Commit

Permalink
Merge pull request #72 from Amattang/fix/#70-QA
Browse files Browse the repository at this point in the history
Fix/#70 qa
  • Loading branch information
11t518s authored Apr 1, 2022
2 parents 7354ee9 + ed231fc commit c221e53
Show file tree
Hide file tree
Showing 13 changed files with 91 additions and 185 deletions.
15 changes: 5 additions & 10 deletions App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@ import RootNav from './navigation/Main/RootNav';
import OnBoardingStack from './navigation/OnBoarding/StackNavigationOfOnBoarding';
import { BottomSheetModalProvider } from '@gorhom/bottom-sheet';
import { getAccessToken, isLoggedIn } from 'react-native-axios-jwt';
import { QueryClient, QueryClientProvider } from 'react-query';
import CheckListStore from './Context/CheckListByServer';
import axios from 'axios';

const queryClient = new QueryClient();

function App() {
const [isLogin, setIsLogin] = useState(false);

Expand All @@ -36,13 +33,11 @@ function App() {
<CheckListStore>
<NavigationContainer independent={true}>
<BottomSheetModalProvider>
<QueryClientProvider client={queryClient}>
{isLogin ? (
<RootNav setIsLogin={setIsLogin} />
) : (
<OnBoardingStack setIsLogin={setIsLogin} />
)}
</QueryClientProvider>
{isLogin ? (
<RootNav setIsLogin={setIsLogin} />
) : (
<OnBoardingStack setIsLogin={setIsLogin} />
)}
</BottomSheetModalProvider>
</NavigationContainer>
</CheckListStore>
Expand Down
23 changes: 19 additions & 4 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ apply from: "../../node_modules/react-native/react.gradle"
* Upload all the APKs to the Play Store and people will download
* the correct one based on the CPU architecture of their device.
*/
def enableSeparateBuildPerCPUArchitecture = false
def enableSeparateBuildPerCPUArchitecture = true

/**
* Run Proguard to shrink the Java bytecode in release builds.
*/
def enableProguardInReleaseBuilds = false
def enableProguardInReleaseBuilds = true

/**
* The preferred build flavor of JavaScriptCore.
Expand Down Expand Up @@ -138,11 +138,18 @@ android {

compileSdkVersion rootProject.ext.compileSdkVersion

lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}

defaultConfig {
applicationId "com.amattang"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionCode 2
versionName "1.0"
manifestPlaceholders = [GOOGLE_MAP_API_KEY:googleMapApiKey, KAKAO_NATIVE_APP_KEY:kakaoLoginApiKey]
// manifestPlaceholders = [KAKAO_NATIVE_APP_KEY:kakaoLoginApiKey]
Expand All @@ -162,6 +169,14 @@ android {
keyAlias 'androiddebugkey'
keyPassword 'android'
}
release {
if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
storeFile file(MYAPP_RELEASE_STORE_FILE)
storePassword MYAPP_RELEASE_STORE_PASSWORD
keyAlias MYAPP_RELEASE_KEY_ALIAS
keyPassword MYAPP_RELEASE_KEY_PASSWORD
}
}
}
buildTypes {
debug {
Expand All @@ -175,7 +190,7 @@ android {
release {
// Caution! In production, you need to generate your own keystore file.
// see https://reactnative.dev/docs/signed-apk-android.
signingConfig signingConfigs.debug
signingConfig signingConfigs.release
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
Expand Down
2 changes: 2 additions & 0 deletions android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:
-keep class com.facebook.hermes.unicode.** { *; }
-keep class com.facebook.jni.** { *; }
5 changes: 5 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
org.gradle.jvmargs=-Xms1024m -Xmx4096m

# Version of flipper SDK to use with React Native
FLIPPER_VERSION=0.99.0
MYAPP_RELEASE_STORE_FILE=amattang.keystore
MYAPP_RELEASE_KEY_ALIAS=amattang
MYAPP_RELEASE_STORE_PASSWORD=amattang1!
MYAPP_RELEASE_KEY_PASSWORD=amattang1!
18 changes: 16 additions & 2 deletions components/ProfileSetting/ProfileSettingComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,22 @@ import { View, Image, Pressable, Linking, ScrollView } from 'react-native';
import { DefaultText } from '../../CustomText';
import styles from './styles';
import { clearAuthTokens } from 'react-native-axios-jwt';
import axios from 'axios';
interface IProps {
setIsLogin: Dispatch<SetStateAction<boolean>>;
}

function ProfileSettingComponent({ setIsLogin }: IProps) {
const onWithdrawalHandler = async () => {
try {
await axios.delete('/user');
clearAuthTokens();
setIsLogin(false);
console.log('t');
} catch (error) {
console.log(error);
}
};
const onLogoutHandler = () => {
clearAuthTokens();
setIsLogin(false);
Expand All @@ -30,7 +41,7 @@ function ProfileSettingComponent({ setIsLogin }: IProps) {
</Pressable>

<Pressable
onPress={() => Linking.openURL('https://www.instagram.com/a_ma_ttang/')}
onPress={() => Linking.openURL('https://www.instagram.com/a.ma.ttang/')}
style={styles.profileSettingEachElementWrapper}
>
<DefaultText style={styles.profileSettingEachElementText}>
Expand Down Expand Up @@ -88,7 +99,10 @@ function ProfileSettingComponent({ setIsLogin }: IProps) {
>
<DefaultText style={styles.profileSettingEachElementText}>로그아웃</DefaultText>
</Pressable>
<Pressable style={styles.profileSettingEachElementWrapper}>
<Pressable
onPress={onWithdrawalHandler}
style={styles.profileSettingEachElementWrapper}
>
<DefaultText style={[styles.profileSettingEachElementText, styles.redText]}>
회원탈퇴
</DefaultText>
Expand Down
2 changes: 2 additions & 0 deletions components/camera/CameraAndGallery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,15 @@ function CameraAndGallery({ setOnModal, onModal }: IProps) {
multiple: true,
}).then((images: any) => {
onPostImageDataHandler(images);
setOnModal(!onModal);
});

const onCamera = () =>
ImagePicker.openCamera({
cropping: true,
}).then((images: any) => {
onPostImageDataHandler(images);
setOnModal(!onModal);
});

return (
Expand Down
2 changes: 1 addition & 1 deletion ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ target 'amattang' do
use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
:hermes_enabled => false
:hermes_enabled => true
)


Expand Down
28 changes: 27 additions & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ PODS:
- GoogleMaps/Base (5.1.0)
- GoogleMaps/Maps (5.1.0):
- GoogleMaps/Base
- hermes-engine (0.9.0)
- kakao-login (3.4.3):
- KakaoSDK (~> 2.4.0)
- KakaoSDKAuth (~> 2.4.0)
Expand Down Expand Up @@ -152,6 +153,12 @@ PODS:
- DoubleConversion
- fmt (~> 6.2.1)
- glog
- RCT-Folly/Futures (2021.06.28.00-v2):
- boost
- DoubleConversion
- fmt (~> 6.2.1)
- glog
- libevent
- RCTRequired (0.67.2)
- RCTTypeSafety (0.67.2):
- FBLazyVector (= 0.67.2)
Expand Down Expand Up @@ -318,6 +325,17 @@ PODS:
- React-logger (= 0.67.2)
- React-perflogger (= 0.67.2)
- React-runtimeexecutor (= 0.67.2)
- React-hermes (0.67.2):
- DoubleConversion
- glog
- hermes-engine
- RCT-Folly (= 2021.06.28.00-v2)
- RCT-Folly/Futures (= 2021.06.28.00-v2)
- React-cxxreact (= 0.67.2)
- React-jsi (= 0.67.2)
- React-jsiexecutor (= 0.67.2)
- React-jsinspector (= 0.67.2)
- React-perflogger (= 0.67.2)
- React-jsi (0.67.2):
- boost (= 1.76.0)
- DoubleConversion
Expand Down Expand Up @@ -502,7 +520,9 @@ DEPENDENCIES:
- FlipperKit/FlipperKitUserDefaultsPlugin (= 0.99.0)
- FlipperKit/SKIOSNetworkPlugin (= 0.99.0)
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
- hermes-engine (~> 0.9.0)
- "kakao-login (from `../node_modules/@react-native-seoul/kakao-login`)"
- libevent (~> 2.1.12)
- OpenSSL-Universal (= 1.1.180)
- RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
- RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
Expand All @@ -514,6 +534,7 @@ DEPENDENCIES:
- React-Core/RCTWebSocket (from `../node_modules/react-native/`)
- React-CoreModules (from `../node_modules/react-native/React/CoreModules`)
- React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`)
- React-hermes (from `../node_modules/react-native/ReactCommon/hermes`)
- React-jsi (from `../node_modules/react-native/ReactCommon/jsi`)
- React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
- React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
Expand Down Expand Up @@ -563,6 +584,7 @@ SPEC REPOS:
- fmt
- Google-Maps-iOS-Utils
- GoogleMaps
- hermes-engine
- KakaoSDK
- KakaoSDKAuth
- KakaoSDKCommon
Expand Down Expand Up @@ -606,6 +628,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/React/CoreModules"
React-cxxreact:
:path: "../node_modules/react-native/ReactCommon/cxxreact"
React-hermes:
:path: "../node_modules/react-native/ReactCommon/hermes"
React-jsi:
:path: "../node_modules/react-native/ReactCommon/jsi"
React-jsiexecutor:
Expand Down Expand Up @@ -691,6 +715,7 @@ SPEC CHECKSUMS:
glog: 85ecdd10ee8d8ec362ef519a6a45ff9aa27b2e85
Google-Maps-iOS-Utils: 95d5ca4d2004314eff88c1819b969db6cac37ab6
GoogleMaps: 086ae1dab659eaa7339bdb30fc88e2f44e7c597c
hermes-engine: bf7577d12ac6ccf53ab8b5af3c6ccf0dd8458c5c
kakao-login: f5633a612ae8af34edacf4f9d8bed87964a18117
KakaoSDK: 1e80d6877c0eac6a310f93c73fb15ca56c05f2bd
KakaoSDKAuth: fcba1c9ede431683f5bdd84c835a96981cb115a5
Expand All @@ -711,6 +736,7 @@ SPEC CHECKSUMS:
React-Core: e382655566b2b9a6e3b4f641d777b7bfdbe52358
React-CoreModules: cf262e82fa101c0aee022b6f90d1a5b612038b64
React-cxxreact: 69d53de3b30c7c161ba087ca1ecdffed9ccb1039
React-hermes: 0ce480a2225907bdcf4c8e931f89cf2dc1df8b27
React-jsi: ce9a2d804adf75809ce2fe2374ba3fbbf5d59b03
React-jsiexecutor: 52beb652bbc61201bd70cbe4f0b8edb607e8da4f
React-jsinspector: 595f76eba2176ebd8817a1fffd47b84fbdab9383
Expand Down Expand Up @@ -746,6 +772,6 @@ SPEC CHECKSUMS:
Yoga: 9b6696970c3289e8dea34b3eda93f23e61fb8121
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

PODFILE CHECKSUM: 4d8c02a502ba230519bdc76caaed1177ed2d3a33
PODFILE CHECKSUM: 9e0f7f3debdda237247d1098ba5474a256182282

COCOAPODS: 1.11.2
4 changes: 2 additions & 2 deletions ios/amattang.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
Expand Down Expand Up @@ -689,7 +689,7 @@
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
Expand Down
Loading

0 comments on commit c221e53

Please sign in to comment.