Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

Commit

Permalink
More opt-ins
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbanes committed Jul 20, 2023
1 parent f9697a8 commit acbc9cc
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import app.tivi.core.analytics.Analytics
import app.tivi.data.traktauth.TraktLoginAction
import app.tivi.data.traktauth.TraktOAuthInfo
import app.tivi.data.traktauth.TraktRefreshTokenAction
import kotlin.experimental.ExperimentalNativeApi
import me.tatarka.inject.annotations.Component
import me.tatarka.inject.annotations.Provides
import platform.Foundation.NSBundle
Expand All @@ -26,6 +27,7 @@ abstract class IosApplicationComponent(

abstract val initializers: AppInitializers

@OptIn(ExperimentalNativeApi::class)
@ApplicationScope
@Provides
fun provideApplicationId(): ApplicationInfo = ApplicationInfo(
Expand All @@ -35,10 +37,7 @@ abstract class IosApplicationComponent(
versionName = NSBundle.mainBundle.infoDictionary
?.get("CFBundleShortVersionString") as? String
?: "",
versionCode = (
NSBundle.mainBundle.infoDictionary
?.get("CFBundleVersion") as? String
)
versionCode = (NSBundle.mainBundle.infoDictionary?.get("CFBundleVersion") as? String)
?.toIntOrNull()
?: 0,
)
Expand Down

0 comments on commit acbc9cc

Please sign in to comment.