Skip to content

Commit

Permalink
fix: kakao login crash
Browse files Browse the repository at this point in the history
  • Loading branch information
SJLEE316 committed Apr 25, 2022
1 parent ece607d commit 0fc0ff9
Show file tree
Hide file tree
Showing 4 changed files with 24,569 additions and 344 deletions.
7 changes: 7 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,12 @@ def googleMapApiKey = properties.getProperty('google.map.key')
// kakao login api key
def kakaoLoginApiKey = properties.getProperty('KAKAO_NATIVE_APP_KEY')

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('amattang.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}

android {
ndkVersion rootProject.ext.ndkVersion

Expand Down Expand Up @@ -188,6 +194,7 @@ android {
}
}
release {
minifyEnabled true
// Caution! In production, you need to generate your own keystore file.
// see https://reactnative.dev/docs/signed-apk-android.
signingConfig signingConfigs.release
Expand Down
3 changes: 3 additions & 0 deletions android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@
# Add any project specific keep options here:
-keep class com.facebook.hermes.unicode.** { *; }
-keep class com.facebook.jni.** { *; }

-keep class com.kakao.sdk.**.model.* { <fields>; }
-keep class * extends com.google.gson.TypeAdapter
3 changes: 1 addition & 2 deletions components/Login/KakaoLoginBtn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ const KakaoLoginBtn = ({ setIsLogin }: Props) => {
setAccessToken(accessToken);
} else {
// 처음 호출
accessToken = res_data.accessToken;
setAuthTokens({
accessToken: accessToken,
accessToken: res_data.accessToken,
refreshToken: res_data.refreshToken,
});
}
Expand Down
Loading

0 comments on commit 0fc0ff9

Please sign in to comment.