-
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #397 from hieuwu/feature/set-up-ios-chat-demo
Set up iOS for chat demo
- Loading branch information
Showing
45 changed files
with
1,152 additions
and
575 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
...t-demo-mpp/chatdemoios/chatdemoios.xcodeproj/project.xcworkspace/contents.xcworkspacedata
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...chat-demo-mpp/common/src/androidMain/kotlin/io/github/jan/supabase/common/di/viewModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...chat-demo-mpp/common/src/desktopMain/kotlin/io/github/jan/supabase/common/di/viewModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
demos/chat-demo-mpp/common/src/iosArm64Main/kotlin/io/github/jan/supabase/common/App.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package io.github.jan.supabase.common | ||
|
||
import androidx.compose.ui.window.ComposeUIViewController | ||
import org.koin.core.component.KoinComponent | ||
import org.koin.core.component.inject | ||
import platform.UIKit.UIViewController | ||
|
||
|
||
class RootComponent : KoinComponent { | ||
private val viewModel: ChatViewModel by inject() | ||
fun getViewModel(): ChatViewModel = viewModel | ||
} | ||
|
||
fun AppIos(viewModel: ChatViewModel): UIViewController = ComposeUIViewController { | ||
App(viewModel = viewModel) | ||
} |
10 changes: 10 additions & 0 deletions
10
...chat-demo-mpp/common/src/iosArm64Main/kotlin/io/github/jan/supabase/common/MPViewModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package io.github.jan.supabase.common | ||
|
||
import kotlinx.coroutines.CoroutineScope | ||
import kotlinx.coroutines.Dispatchers | ||
|
||
actual open class MPViewModel actual constructor() { | ||
|
||
actual val coroutineScope = CoroutineScope(Dispatchers.Default) | ||
|
||
} |
8 changes: 8 additions & 0 deletions
8
...p/common/src/iosArm64Main/kotlin/io/github/jan/supabase/common/di/platformGoTrueConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package io.github.jan.supabase.common.di | ||
|
||
import io.github.jan.supabase.gotrue.GoTrueConfig | ||
|
||
actual fun GoTrueConfig.platformGoTrueConfig() { | ||
scheme = "io.jan.supabase" | ||
host = "login" | ||
} |
7 changes: 7 additions & 0 deletions
7
...hat-demo-mpp/common/src/iosArm64Main/kotlin/io/github/jan/supabase/common/di/viewModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.github.jan.supabase.common.di | ||
|
||
import org.koin.core.module.Module | ||
|
||
actual fun Module.viewModel() { | ||
single { createViewModule() } | ||
} |
7 changes: 7 additions & 0 deletions
7
...common/src/iosArm64Main/kotlin/io/github/jan/supabase/common/ui/components/AlertDialog.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.github.jan.supabase.common.ui.components | ||
|
||
import androidx.compose.runtime.Composable | ||
|
||
@Composable | ||
actual fun AlertDialog(text: String, close: () -> Unit) { | ||
} |
15 changes: 15 additions & 0 deletions
15
...hat-demo-mpp/common/src/iosSimulatorArm64Main/kotlin/io/github/jan/supabase/common/App.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package io.github.jan.supabase.common | ||
|
||
import androidx.compose.ui.window.ComposeUIViewController | ||
import org.koin.core.component.KoinComponent | ||
import org.koin.core.component.inject | ||
import platform.UIKit.UIViewController | ||
|
||
class RootComponent : KoinComponent { | ||
private val viewModel: ChatViewModel by inject() | ||
fun getViewModel(): ChatViewModel = viewModel | ||
} | ||
|
||
fun AppIos(viewModel: ChatViewModel): UIViewController = ComposeUIViewController { | ||
App(viewModel = viewModel) | ||
} |
8 changes: 8 additions & 0 deletions
8
...-mpp/common/src/iosSimulatorArm64Main/kotlin/io/github/jan/supabase/common/MPViewModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package io.github.jan.supabase.common | ||
|
||
import kotlinx.coroutines.CoroutineScope | ||
import kotlinx.coroutines.Dispatchers | ||
|
||
actual open class MPViewModel actual constructor() { | ||
actual val coroutineScope = CoroutineScope(Dispatchers.Default) | ||
} |
8 changes: 8 additions & 0 deletions
8
...src/iosSimulatorArm64Main/kotlin/io/github/jan/supabase/common/di/platformGoTrueConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package io.github.jan.supabase.common.di | ||
|
||
import io.github.jan.supabase.gotrue.GoTrueConfig | ||
|
||
actual fun GoTrueConfig.platformGoTrueConfig() { | ||
scheme = "io.jan.supabase" | ||
host = "login" | ||
} |
7 changes: 7 additions & 0 deletions
7
...mpp/common/src/iosSimulatorArm64Main/kotlin/io/github/jan/supabase/common/di/viewModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.github.jan.supabase.common.di | ||
|
||
import org.koin.core.module.Module | ||
|
||
actual fun Module.viewModel() { | ||
single { createViewModule() } | ||
} |
7 changes: 7 additions & 0 deletions
7
...c/iosSimulatorArm64Main/kotlin/io/github/jan/supabase/common/ui/components/AlertDialog.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.github.jan.supabase.common.ui.components | ||
|
||
import androidx.compose.runtime.Composable | ||
|
||
@Composable | ||
actual fun AlertDialog(text: String, close: () -> Unit) { | ||
} |
1 change: 0 additions & 1 deletion
1
demos/chat-demo-mpp/common/src/jsMain/kotlin/io/github/jan/supabase/common/di/viewModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
kotlin.code.style=official | ||
kotlin.native.enableDependencyPropagation=false | ||
android.useAndroidX=true | ||
org.jetbrains.compose.experimental.jscanvas.enabled=true | ||
org.gradle.jvmargs=-Xmx4096m | ||
kotlin.mpp.androidSourceSetLayoutVersion=2 | ||
kotlin.mpp.androidSourceSetLayoutVersion=2 | ||
org.jetbrains.compose.experimental.uikit.enabled=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.