From 55a4aaa3df2e1f88a2a30717a276d7073a4ce83b Mon Sep 17 00:00:00 2001 From: crc-32 Date: Mon, 11 Nov 2024 19:49:24 +0000 Subject: [PATCH] clean up iOS placeholder files --- .../io/rebble/cobble/shared/database/AppDatabase.ios.kt | 7 ------- .../rebble/cobble/shared/datastore/createDataStore.ios.kt | 6 ++++++ .../io/rebble/cobble/shared/domain/pbw/PbwApp.ios.kt | 8 -------- .../kotlin/io/rebble/cobble/shared/util/File.ios.kt | 6 ++++++ 4 files changed, 12 insertions(+), 15 deletions(-) delete mode 100644 android/shared/src/iosMain/kotlin/io/rebble/cobble/shared/domain/pbw/PbwApp.ios.kt diff --git a/android/shared/src/iosMain/kotlin/io/rebble/cobble/shared/database/AppDatabase.ios.kt b/android/shared/src/iosMain/kotlin/io/rebble/cobble/shared/database/AppDatabase.ios.kt index 33cb61f5..bacc16e0 100644 --- a/android/shared/src/iosMain/kotlin/io/rebble/cobble/shared/database/AppDatabase.ios.kt +++ b/android/shared/src/iosMain/kotlin/io/rebble/cobble/shared/database/AppDatabase.ios.kt @@ -5,11 +5,4 @@ import androidx.room.RoomDatabaseConstructor actual fun getDatabaseBuilder(): RoomDatabase.Builder { TODO("Not yet implemented") -} - -actual object AppDatabaseConstructor : RoomDatabaseConstructor { - override fun initialize(): AppDatabase { - TODO("Not yet implemented") - } - } \ No newline at end of file diff --git a/android/shared/src/iosMain/kotlin/io/rebble/cobble/shared/datastore/createDataStore.ios.kt b/android/shared/src/iosMain/kotlin/io/rebble/cobble/shared/datastore/createDataStore.ios.kt index 3aa36d05..e3144753 100644 --- a/android/shared/src/iosMain/kotlin/io/rebble/cobble/shared/datastore/createDataStore.ios.kt +++ b/android/shared/src/iosMain/kotlin/io/rebble/cobble/shared/datastore/createDataStore.ios.kt @@ -2,7 +2,13 @@ package io.rebble.cobble.shared.datastore import androidx.datastore.core.DataStore import androidx.datastore.preferences.core.Preferences +import kotlinx.cinterop.ExperimentalForeignApi +import platform.Foundation.NSDocumentDirectory +import platform.Foundation.NSFileManager +import platform.Foundation.NSURL +import platform.Foundation.NSUserDomainMask +@OptIn(ExperimentalForeignApi::class) fun createDataStore(): DataStore = createDataStore( producePath = { val documentDirectory: NSURL? = NSFileManager.defaultManager.URLForDirectory( diff --git a/android/shared/src/iosMain/kotlin/io/rebble/cobble/shared/domain/pbw/PbwApp.ios.kt b/android/shared/src/iosMain/kotlin/io/rebble/cobble/shared/domain/pbw/PbwApp.ios.kt deleted file mode 100644 index 698c07e1..00000000 --- a/android/shared/src/iosMain/kotlin/io/rebble/cobble/shared/domain/pbw/PbwApp.ios.kt +++ /dev/null @@ -1,8 +0,0 @@ -package io.rebble.cobble.shared.domain.pbw - -import io.rebble.cobble.shared.PlatformContext -import io.rebble.cobble.shared.util.File - -actual fun getPbwFile(platformContext: PlatformContext, uri: String): File { - TODO("Not yet implemented") -} \ No newline at end of file diff --git a/android/shared/src/iosMain/kotlin/io/rebble/cobble/shared/util/File.ios.kt b/android/shared/src/iosMain/kotlin/io/rebble/cobble/shared/util/File.ios.kt index 68065d15..4eb33658 100644 --- a/android/shared/src/iosMain/kotlin/io/rebble/cobble/shared/util/File.ios.kt +++ b/android/shared/src/iosMain/kotlin/io/rebble/cobble/shared/util/File.ios.kt @@ -1,7 +1,13 @@ package io.rebble.cobble.shared.util +import io.ktor.utils.io.ByteReadChannel + actual class File actual constructor(uri: String) { actual fun exists(): Boolean { TODO("Not yet implemented") } + + actual fun readChannel(): ByteReadChannel { + TODO("Not yet implemented") + } } \ No newline at end of file