Skip to content

Commit

Permalink
#25 feat: 구글 플레이 앱체크 등록
Browse files Browse the repository at this point in the history
SeungWoo-Ahn committed Apr 18, 2024
1 parent a5914e9 commit 91ff1bb
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion app/src/main/java/io/tuttut/android/TutTutApplication.kt
Original file line number Diff line number Diff line change
@@ -3,15 +3,23 @@ package io.tuttut.android
import android.app.Application
import com.google.firebase.Firebase
import com.google.firebase.FirebaseApp
import com.google.firebase.appcheck.AppCheckProviderFactory
import com.google.firebase.appcheck.appCheck
import com.google.firebase.appcheck.debug.DebugAppCheckProviderFactory
import com.google.firebase.appcheck.playintegrity.PlayIntegrityAppCheckProviderFactory
import dagger.hilt.android.HiltAndroidApp
import io.tuttut.presentation.BuildConfig

@HiltAndroidApp
class TutTutApplication : Application() {
override fun onCreate() {
FirebaseApp.initializeApp(this)
Firebase.appCheck.installAppCheckProviderFactory(DebugAppCheckProviderFactory.getInstance())
Firebase.appCheck.installAppCheckProviderFactory(provideAppCheckProviderFactory())
super.onCreate()
}

private fun provideAppCheckProviderFactory(): AppCheckProviderFactory {
return if (BuildConfig.DEBUG) DebugAppCheckProviderFactory.getInstance()
else PlayIntegrityAppCheckProviderFactory.getInstance()
}
}

0 comments on commit 91ff1bb

Please sign in to comment.