Skip to content

Commit c06cb58

Browse files
authored
fix: support react native 0.81 (#227)
* fix: support react native 0.81 * chore: disable new arch example
1 parent 2829211 commit c06cb58

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

android/src/main/java/com/dooboolab/naverlogin/RNNaverLoginModule.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,14 @@ class RNNaverLoginModule(reactContext: ReactApplicationContext) : ReactContextBa
5252
fun login(promise: Promise) {
5353
UiThreadUtil.runOnUiThread {
5454
loginPromise = promise
55-
if (currentActivity == null) {
55+
val activity = reactApplicationContext.currentActivity
56+
if (activity == null) {
5657
onLoginFailure("현재 실행중인 Activity 를 찾을 수 없습니다")
5758
return@runOnUiThread
5859
}
5960
try {
6061
NaverIdLoginSDK.authenticate(
61-
currentActivity!!,
62+
activity,
6263
object : OAuthLoginCallback {
6364
override fun onSuccess() {
6465
onLoginSuccess()

example/android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
2727
# your application. You should enable this flag either if you want
2828
# to write custom TurboModules/Fabric components OR use libraries that
2929
# are providing them.
30-
newArchEnabled=true
30+
newArchEnabled=false
3131
# Use this property to enable or disable the Hermes JS engine.
3232
# If set to false, you will be using JSC instead.
3333
hermesEnabled=true

0 commit comments

Comments
 (0)