├── .gitignore
├── androidApp
├── build.gradle.kts
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── com
│ │ └── bouyahya
│ │ └── chatmultiplatform
│ │ └── android
│ │ ├── ChatMultiplatformApp.kt
│ │ ├── MainActivity.kt
│ │ └── MyApplicationTheme.kt
│ └── res
│ ├── values
│ └── styles.xml
│ └── xml
│ ├── backup_rules.xml
│ ├── data_extraction_rules.xml
│ └── network_security_config.xml
├── build.gradle.kts
├── buildSrc
├── build.gradle.kts
└── src
│ └── main
│ └── kotlin
│ ├── Accompanist.kt
│ ├── Compose.kt
│ ├── Coroutines.kt
│ ├── Koin.kt
│ ├── KotlinPlugins.kt
│ ├── Kotlinx.kt
│ ├── Ktor.kt
│ ├── Material3.kt
│ ├── Moko.kt
│ ├── SplashScreen.kt
│ └── SqlDelight.kt
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── iosApp
├── Podfile
├── Podfile.lock
├── Pods
│ ├── Local Podspecs
│ │ └── shared.podspec.json
│ ├── Manifest.lock
│ ├── Pods.xcodeproj
│ │ └── project.pbxproj
│ └── Target Support Files
│ │ ├── Pods-iosApp
│ │ ├── Pods-iosApp-Info.plist
│ │ ├── Pods-iosApp-acknowledgements.markdown
│ │ ├── Pods-iosApp-acknowledgements.plist
│ │ ├── Pods-iosApp-dummy.m
│ │ ├── Pods-iosApp-frameworks-Debug-input-files.xcfilelist
│ │ ├── Pods-iosApp-frameworks-Debug-output-files.xcfilelist
│ │ ├── Pods-iosApp-frameworks-Release-input-files.xcfilelist
│ │ ├── Pods-iosApp-frameworks-Release-output-files.xcfilelist
│ │ ├── Pods-iosApp-frameworks.sh
│ │ ├── Pods-iosApp-resources-Debug-input-files.xcfilelist
│ │ ├── Pods-iosApp-resources-Debug-output-files.xcfilelist
│ │ ├── Pods-iosApp-resources-Release-input-files.xcfilelist
│ │ ├── Pods-iosApp-resources-Release-output-files.xcfilelist
│ │ ├── Pods-iosApp-resources.sh
│ │ ├── Pods-iosApp-umbrella.h
│ │ ├── Pods-iosApp.debug.xcconfig
│ │ ├── Pods-iosApp.modulemap
│ │ └── Pods-iosApp.release.xcconfig
│ │ └── shared
│ │ ├── shared.debug.xcconfig
│ │ └── shared.release.xcconfig
├── iosApp.xcodeproj
│ └── project.pbxproj
├── iosApp.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── iosApp
│ ├── Assets.xcassets
│ ├── AccentColor.colorset
│ │ └── Contents.json
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
│ ├── ComposeView.swift
│ ├── ContentView.swift
│ ├── Info.plist
│ ├── Preview Content
│ └── Preview Assets.xcassets
│ │ └── Contents.json
│ └── iOSApp.swift
├── settings.gradle.kts
└── shared
├── build.gradle.kts
├── shared.podspec
└── src
├── androidMain
└── kotlin
│ └── com
│ └── bouyahya
│ └── chatmultiplatform
│ ├── Platform.kt
│ ├── core
│ └── network
│ │ └── HttpClientFactory.kt
│ └── di
│ └── PlatformModule.kt
├── commonMain
└── kotlin
│ └── com
│ └── bouyahya
│ └── chatmultiplatform
│ ├── Greeting.kt
│ ├── Platform.kt
│ ├── core
│ ├── Constants.kt
│ ├── network
│ │ ├── HttpClient.kt
│ │ └── HttpClientFactory.kt
│ └── utils
│ │ └── Resource.kt
│ ├── data
│ └── ChatMultiplatformRepositoryImpl.kt
│ ├── di
│ ├── AppModule.kt
│ ├── NetworkModule.kt
│ └── PlatformModule.kt
│ ├── domain
│ ├── models
│ │ ├── MessageData.kt
│ │ └── User.kt
│ ├── repositories
│ │ └── ChatMultiplatformRepository.kt
│ └── usecases
│ │ └── ChatMultiplatformUseCase.kt
│ └── presentation
│ ├── ChatMultiplatformEvent.kt
│ ├── ChatMultiplatformScreen.kt
│ ├── ChatMultiplatformState.kt
│ ├── ChatMultiplatformViewModel.kt
│ └── components
│ ├── AppBarComponent.kt
│ ├── ChatComponent.kt
│ ├── ConnectComponent.kt
│ ├── ConnectedUsersComponent.kt
│ ├── CustomTextField.kt
│ ├── ReceiverComponent.kt
│ └── SenderComponent.kt
└── iosMain
└── kotlin
└── com
└── bouyahya
└── chatmultiplatform
├── App.kt
├── Platform.kt
├── core
└── network
│ └── HttpClientFactory.kt
└── di
└── PlatformModule.kt
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | .idea
4 | .DS_Store
5 | build
6 | captures
7 | .externalNativeBuild
8 | .cxx
9 | local.properties
10 | xcuserdata
--------------------------------------------------------------------------------
/androidApp/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | id("com.android.application")
3 | kotlin("android")
4 | id("org.jetbrains.compose")
5 | }
6 |
7 | android {
8 | namespace = "com.bouyahya.chatmultiplatform.android"
9 | compileSdk = 34
10 | defaultConfig {
11 | applicationId = "com.bouyahya.chatmultiplatform.android"
12 | minSdk = 24
13 | targetSdk = 33
14 | versionCode = 1
15 | versionName = "1.0"
16 | }
17 | buildFeatures {
18 | compose = true
19 | }
20 | composeOptions {
21 | kotlinCompilerExtensionVersion = "1.5.3"
22 | }
23 | packagingOptions {
24 | resources {
25 | excludes += "/META-INF/{AL2.0,LGPL2.1}"
26 | }
27 | }
28 | buildTypes {
29 | getByName("release") {
30 | isMinifyEnabled = false
31 | }
32 | }
33 | compileOptions {
34 | sourceCompatibility = JavaVersion.VERSION_1_8
35 | targetCompatibility = JavaVersion.VERSION_1_8
36 | }
37 | kotlinOptions {
38 | jvmTarget = "1.8"
39 | }
40 | }
41 |
42 | dependencies {
43 | implementation(project(":shared"))
44 | implementation(Koin.koinAndroid)
45 | implementation("androidx.compose.ui:ui:1.5.1")
46 | implementation("androidx.compose.ui:ui-tooling:1.5.1")
47 | implementation("androidx.compose.ui:ui-tooling-preview:1.5.1")
48 | implementation("androidx.compose.foundation:foundation:1.5.1")
49 | implementation("androidx.compose.material:material:1.5.1")
50 | implementation("androidx.activity:activity-compose:1.7.0")
51 | }
--------------------------------------------------------------------------------
/androidApp/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
19 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/androidApp/src/main/java/com/bouyahya/chatmultiplatform/android/ChatMultiplatformApp.kt:
--------------------------------------------------------------------------------
1 | package com.bouyahya.chatmultiplatform.android
2 |
3 | import android.app.Application
4 | import com.bouyahya.chatmultiplatform.di.initKoin
5 |
6 | class ChatMultiplatformApp : Application() {
7 | override fun onCreate() {
8 | super.onCreate()
9 | initKoin()
10 | }
11 | }
--------------------------------------------------------------------------------
/androidApp/src/main/java/com/bouyahya/chatmultiplatform/android/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.bouyahya.chatmultiplatform.android
2 |
3 | import android.os.Bundle
4 | import androidx.activity.ComponentActivity
5 | import androidx.activity.compose.setContent
6 | import androidx.compose.foundation.layout.fillMaxSize
7 | import androidx.compose.material.*
8 | import androidx.compose.runtime.Composable
9 | import androidx.compose.ui.Modifier
10 | import androidx.compose.ui.tooling.preview.Preview
11 | import com.bouyahya.chatmultiplatform.presentation.ChatMultiplatformScreen
12 | import org.koin.androidx.compose.getViewModel
13 |
14 | class MainActivity : ComponentActivity() {
15 | override fun onCreate(savedInstanceState: Bundle?) {
16 | super.onCreate(savedInstanceState)
17 | setContent {
18 | MyApplicationTheme {
19 | Surface(
20 | modifier = Modifier.fillMaxSize(),
21 | color = MaterialTheme.colors.background
22 | ) {
23 | ChatMultiplatformScreen(
24 | chatMultiplatformViewModel = getViewModel()
25 | )
26 | }
27 | }
28 | }
29 | }
30 | }
31 |
32 | @Composable
33 | fun GreetingView(text: String) {
34 | Text(text = text)
35 | }
36 |
37 | @Preview
38 | @Composable
39 | fun DefaultPreview() {
40 | MyApplicationTheme {
41 | GreetingView("Hello, Android!")
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/androidApp/src/main/java/com/bouyahya/chatmultiplatform/android/MyApplicationTheme.kt:
--------------------------------------------------------------------------------
1 | package com.bouyahya.chatmultiplatform.android
2 |
3 | import androidx.compose.foundation.isSystemInDarkTheme
4 | import androidx.compose.foundation.shape.RoundedCornerShape
5 | import androidx.compose.material.MaterialTheme
6 | import androidx.compose.material.Shapes
7 | import androidx.compose.material.Typography
8 | import androidx.compose.material.darkColors
9 | import androidx.compose.material.lightColors
10 | import androidx.compose.runtime.Composable
11 | import androidx.compose.ui.graphics.Color
12 | import androidx.compose.ui.text.TextStyle
13 | import androidx.compose.ui.text.font.FontFamily
14 | import androidx.compose.ui.text.font.FontWeight
15 | import androidx.compose.ui.unit.dp
16 | import androidx.compose.ui.unit.sp
17 |
18 | @Composable
19 | fun MyApplicationTheme(
20 | darkTheme: Boolean = isSystemInDarkTheme(),
21 | content: @Composable () -> Unit
22 | ) {
23 | val colors = if (darkTheme) {
24 | darkColors(
25 | primary = Color(0xFFBB86FC),
26 | primaryVariant = Color(0xFF3700B3),
27 | secondary = Color(0xFF03DAC5)
28 | )
29 | } else {
30 | lightColors(
31 | primary = Color(0xFF6200EE),
32 | primaryVariant = Color(0xFF3700B3),
33 | secondary = Color(0xFF03DAC5)
34 | )
35 | }
36 | val typography = Typography(
37 | body1 = TextStyle(
38 | fontFamily = FontFamily.Default,
39 | fontWeight = FontWeight.Normal,
40 | fontSize = 16.sp
41 | )
42 | )
43 | val shapes = Shapes(
44 | small = RoundedCornerShape(4.dp),
45 | medium = RoundedCornerShape(4.dp),
46 | large = RoundedCornerShape(0.dp)
47 | )
48 |
49 | MaterialTheme(
50 | colors = colors,
51 | typography = typography,
52 | shapes = shapes,
53 | content = content
54 | )
55 | }
56 |
--------------------------------------------------------------------------------
/androidApp/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/androidApp/src/main/res/xml/backup_rules.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
13 |
--------------------------------------------------------------------------------
/androidApp/src/main/res/xml/data_extraction_rules.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
12 |
13 |
19 |
--------------------------------------------------------------------------------
/androidApp/src/main/res/xml/network_security_config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform").apply(false)
3 | id("com.android.application").apply(false)
4 | id("com.android.library").apply(false)
5 | id("org.jetbrains.compose").apply(false)
6 | id("org.jetbrains.kotlin.plugin.serialization").version("1.4.21").apply(false)
7 | }
8 |
9 | tasks.register("clean", Delete::class) {
10 | delete(rootProject.buildDir)
11 | }
12 |
--------------------------------------------------------------------------------
/buildSrc/build.gradle.kts:
--------------------------------------------------------------------------------
1 | repositories{
2 | mavenLocal()
3 | mavenCentral()
4 | jcenter()
5 | }
6 |
7 | plugins{
8 | `kotlin-dsl`
9 | }
--------------------------------------------------------------------------------
/buildSrc/src/main/kotlin/Accompanist.kt:
--------------------------------------------------------------------------------
1 | object Accompanist {
2 | private const val version = "0.26.2-beta"
3 | const val coil = "io.coil-kt:coil-compose:2.1.0"
4 | private const val systemUIControllerVersion = "0.24.3-alpha"
5 | const val systemUIController =
6 | "com.google.accompanist:accompanist-systemuicontroller:$systemUIControllerVersion"
7 | private const val accompanistPagerVersion = "0.24.3-alpha"
8 | const val pager = "com.google.accompanist:accompanist-pager:$accompanistPagerVersion"
9 | const val pagerIndicator = "com.google.accompanist:accompanist-pager-indicators:$accompanistPagerVersion"
10 | const val webview = "com.google.accompanist:accompanist-webview:$version"
11 |
12 | }
--------------------------------------------------------------------------------
/buildSrc/src/main/kotlin/Compose.kt:
--------------------------------------------------------------------------------
1 | object Compose {
2 | const val compose_version = "1.4.3"
3 | const val compose_ui_version = "1.3.0-beta02"
4 | const val composeUI = "androidx.compose.ui:ui:$compose_version"
5 | const val composeMaterial = "androidx.compose.material:material:$compose_ui_version"
6 | const val composeToolingDebug = "androidx.compose.ui:ui-tooling:$compose_ui_version"
7 |
8 | //const val composeToolingRelease
9 | const val composeActivity = "androidx.activity:activity-compose:1.4.0"
10 | const val util = "androidx.compose.ui:ui-util:$compose_ui_version"
11 | }
--------------------------------------------------------------------------------
/buildSrc/src/main/kotlin/Coroutines.kt:
--------------------------------------------------------------------------------
1 | object Coroutines {
2 | private const val coroutineVersion = "1.6.4"
3 | val coroutines = "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutineVersion"
4 | }
--------------------------------------------------------------------------------
/buildSrc/src/main/kotlin/Koin.kt:
--------------------------------------------------------------------------------
1 | object Koin {
2 | private const val version = "3.1.2"
3 | const val koinAndroid = "io.insert-koin:koin-androidx-compose:$version"
4 | const val koin = "io.insert-koin:koin-core:3.1.4"
5 | }
--------------------------------------------------------------------------------
/buildSrc/src/main/kotlin/KotlinPlugins.kt:
--------------------------------------------------------------------------------
1 | object KotlinPlugins {
2 | const val android = "android"
3 | const val multiplatform = "multiplatform"
4 | const val cocoapods = "native.cocoapods"
5 | const val serialization = "plugin.serialization"
6 | const val parcelize = "kotlin-parcelize"
7 | }
--------------------------------------------------------------------------------
/buildSrc/src/main/kotlin/Kotlinx.kt:
--------------------------------------------------------------------------------
1 | object Kotlinx {
2 | private const val kotlinxSerialization = "1.3.3"
3 | private const val kotlinxDatetimeVersion = "0.3.3"
4 | const val datetime = "org.jetbrains.kotlinx:kotlinx-datetime:${kotlinxDatetimeVersion}"
5 | const val serializationCore =
6 | "org.jetbrains.kotlinx:kotlinx-serialization-core:${kotlinxSerialization}"
7 | }
--------------------------------------------------------------------------------
/buildSrc/src/main/kotlin/Ktor.kt:
--------------------------------------------------------------------------------
1 | object Ktor {
2 | private const val ktorVersion = "2.1.0"
3 | const val clientCore = "io.ktor:ktor-client-core:${ktorVersion}"
4 | const val clientJson = "io.ktor:ktor-client-json:${ktorVersion}"
5 | const val clientLogging = "io.ktor:ktor-client-logging:${ktorVersion}"
6 | const val clientSerialization = "io.ktor:ktor-client-serialization:${ktorVersion}"
7 | const val contentNegotiation = "io.ktor:ktor-client-content-negotiation:${ktorVersion}"
8 | const val json = "io.ktor:ktor-serialization-kotlinx-json:${ktorVersion}"
9 | const val clientAndroid = "io.ktor:ktor-client-android:${ktorVersion}"
10 | const val clientAndroidOkhttp = "io.ktor:ktor-client-okhttp:${ktorVersion}"
11 | const val clientIos = "io.ktor:ktor-client-ios:${ktorVersion}"
12 | const val webSocketClient = "io.ktor:ktor-client-websockets:${ktorVersion}"
13 | }
--------------------------------------------------------------------------------
/buildSrc/src/main/kotlin/Material3.kt:
--------------------------------------------------------------------------------
1 | object Material3 {
2 | private const val version = "1.0.0-rc01"
3 | val material3 = "androidx.compose.material3:material3:$version"
4 | val window = "androidx.compose.material3:material3-window-size-class:$version"
5 | }
--------------------------------------------------------------------------------
/buildSrc/src/main/kotlin/Moko.kt:
--------------------------------------------------------------------------------
1 | object Moko {
2 | private var mokoMvvmVersion = "0.13.1"
3 | val mokoMVVMCore = "dev.icerock.moko:mvvm-core:$mokoMvvmVersion"
4 | }
--------------------------------------------------------------------------------
/buildSrc/src/main/kotlin/SplashScreen.kt:
--------------------------------------------------------------------------------
1 | object SplashScreen {
2 | private const val version = "1.0.0-beta02"
3 | const val splashScreen = "androidx.core:core-splashscreen:$version"
4 | }
--------------------------------------------------------------------------------
/buildSrc/src/main/kotlin/SqlDelight.kt:
--------------------------------------------------------------------------------
1 | object SqlDelight {
2 | // GRADLE PLUGINS
3 | private const val sqlDelightGradleVersion = "1.5.3"
4 | const val sqlDelightGradlePlugin = "com.squareup.sqldelight:gradle-plugin:$sqlDelightGradleVersion"
5 | // SQLDELIGHT
6 | private const val sqlDelightVersion = "1.5.4"
7 | const val sqlDelightRuntime = "com.squareup.sqldelight:runtime:$sqlDelightVersion"
8 | const val sqlDelightAndroidDriver = "com.squareup.sqldelight:android-driver:$sqlDelightVersion"
9 | const val sqlDelightNativeDriver = "com.squareup.sqldelight:native-driver:$sqlDelightVersion"
10 | const val sqlDelightCoroutinesExtensions = "com.squareup.sqldelight:coroutines-extensions:$sqlDelightVersion"
11 | }
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | #Gradle
2 | org.gradle.jvmargs=-Xmx2048M -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options\="-Xmx2048M"
3 | #Kotlin
4 | kotlin.code.style=official
5 | #Android
6 | android.useAndroidX=true
7 | android.nonTransitiveRClass=true
8 | #MPP
9 | kotlin.mpp.enableCInteropCommonization=true
10 | kotlin.mpp.androidSourceSetLayoutVersion=2
11 | kotlin.version=1.9.10
12 | agp.version=7.4.2
13 | compose.version=1.5.1
14 | org.jetbrains.compose.experimental.uikit.enabled=true
15 | kotlin.native.cacheKind=none
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bouyahyaa/ChatMultiplatform/2c17c6090de6b01d4e4f8a93866c9d9d3f16a769/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Sep 11 20:32:31 CET 2023
2 | distributionBase=GRADLE_USER_HOME
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
4 | distributionPath=wrapper/dists
5 | zipStorePath=wrapper/dists
6 | zipStoreBase=GRADLE_USER_HOME
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | #
4 | # Copyright 2015 the original author or authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # https://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | ##
21 | ## Gradle start up script for UN*X
22 | ##
23 | ##############################################################################
24 |
25 | # Attempt to set APP_HOME
26 | # Resolve links: $0 may be a link
27 | PRG="$0"
28 | # Need this for relative symlinks.
29 | while [ -h "$PRG" ] ; do
30 | ls=`ls -ld "$PRG"`
31 | link=`expr "$ls" : '.*-> \(.*\)$'`
32 | if expr "$link" : '/.*' > /dev/null; then
33 | PRG="$link"
34 | else
35 | PRG=`dirname "$PRG"`"/$link"
36 | fi
37 | done
38 | SAVED="`pwd`"
39 | cd "`dirname \"$PRG\"`/" >/dev/null
40 | APP_HOME="`pwd -P`"
41 | cd "$SAVED" >/dev/null
42 |
43 | APP_NAME="Gradle"
44 | APP_BASE_NAME=`basename "$0"`
45 |
46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48 |
49 | # Use the maximum available, or set MAX_FD != -1 to use that value.
50 | MAX_FD="maximum"
51 |
52 | warn () {
53 | echo "$*"
54 | }
55 |
56 | die () {
57 | echo
58 | echo "$*"
59 | echo
60 | exit 1
61 | }
62 |
63 | # OS specific support (must be 'true' or 'false').
64 | cygwin=false
65 | msys=false
66 | darwin=false
67 | nonstop=false
68 | case "`uname`" in
69 | CYGWIN* )
70 | cygwin=true
71 | ;;
72 | Darwin* )
73 | darwin=true
74 | ;;
75 | MINGW* )
76 | msys=true
77 | ;;
78 | NONSTOP* )
79 | nonstop=true
80 | ;;
81 | esac
82 |
83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84 |
85 |
86 | # Determine the Java command to use to start the JVM.
87 | if [ -n "$JAVA_HOME" ] ; then
88 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
89 | # IBM's JDK on AIX uses strange locations for the executables
90 | JAVACMD="$JAVA_HOME/jre/sh/java"
91 | else
92 | JAVACMD="$JAVA_HOME/bin/java"
93 | fi
94 | if [ ! -x "$JAVACMD" ] ; then
95 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
96 |
97 | Please set the JAVA_HOME variable in your environment to match the
98 | location of your Java installation."
99 | fi
100 | else
101 | JAVACMD="java"
102 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
103 |
104 | Please set the JAVA_HOME variable in your environment to match the
105 | location of your Java installation."
106 | fi
107 |
108 | # Increase the maximum file descriptors if we can.
109 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
110 | MAX_FD_LIMIT=`ulimit -H -n`
111 | if [ $? -eq 0 ] ; then
112 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
113 | MAX_FD="$MAX_FD_LIMIT"
114 | fi
115 | ulimit -n $MAX_FD
116 | if [ $? -ne 0 ] ; then
117 | warn "Could not set maximum file descriptor limit: $MAX_FD"
118 | fi
119 | else
120 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
121 | fi
122 | fi
123 |
124 | # For Darwin, add options to specify how the application appears in the dock
125 | if $darwin; then
126 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
127 | fi
128 |
129 | # For Cygwin or MSYS, switch paths to Windows format before running java
130 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
131 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
132 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
133 |
134 | JAVACMD=`cygpath --unix "$JAVACMD"`
135 |
136 | # We build the pattern for arguments to be converted via cygpath
137 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
138 | SEP=""
139 | for dir in $ROOTDIRSRAW ; do
140 | ROOTDIRS="$ROOTDIRS$SEP$dir"
141 | SEP="|"
142 | done
143 | OURCYGPATTERN="(^($ROOTDIRS))"
144 | # Add a user-defined pattern to the cygpath arguments
145 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
146 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
147 | fi
148 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
149 | i=0
150 | for arg in "$@" ; do
151 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
152 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
153 |
154 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
155 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
156 | else
157 | eval `echo args$i`="\"$arg\""
158 | fi
159 | i=`expr $i + 1`
160 | done
161 | case $i in
162 | 0) set -- ;;
163 | 1) set -- "$args0" ;;
164 | 2) set -- "$args0" "$args1" ;;
165 | 3) set -- "$args0" "$args1" "$args2" ;;
166 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
167 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
168 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
169 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
170 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
171 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
172 | esac
173 | fi
174 |
175 | # Escape application args
176 | save () {
177 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
178 | echo " "
179 | }
180 | APP_ARGS=`save "$@"`
181 |
182 | # Collect all arguments for the java command, following the shell quoting and substitution rules
183 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
184 |
185 | exec "$JAVACMD" "$@"
186 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34 |
35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37 |
38 | @rem Find java.exe
39 | if defined JAVA_HOME goto findJavaFromJavaHome
40 |
41 | set JAVA_EXE=java.exe
42 | %JAVA_EXE% -version >NUL 2>&1
43 | if "%ERRORLEVEL%" == "0" goto execute
44 |
45 | echo.
46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47 | echo.
48 | echo Please set the JAVA_HOME variable in your environment to match the
49 | echo location of your Java installation.
50 |
51 | goto fail
52 |
53 | :findJavaFromJavaHome
54 | set JAVA_HOME=%JAVA_HOME:"=%
55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56 |
57 | if exist "%JAVA_EXE%" goto execute
58 |
59 | echo.
60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61 | echo.
62 | echo Please set the JAVA_HOME variable in your environment to match the
63 | echo location of your Java installation.
64 |
65 | goto fail
66 |
67 | :execute
68 | @rem Setup the command line
69 |
70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71 |
72 |
73 | @rem Execute Gradle
74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75 |
76 | :end
77 | @rem End local scope for the variables with windows NT shell
78 | if "%ERRORLEVEL%"=="0" goto mainEnd
79 |
80 | :fail
81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82 | rem the _cmd.exe /c_ return code!
83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84 | exit /b 1
85 |
86 | :mainEnd
87 | if "%OS%"=="Windows_NT" endlocal
88 |
89 | :omega
90 |
--------------------------------------------------------------------------------
/iosApp/Podfile:
--------------------------------------------------------------------------------
1 | target 'iosApp' do
2 | use_frameworks!
3 | platform :ios, '14.1'
4 | pod 'shared', :path => '../shared'
5 | end
--------------------------------------------------------------------------------
/iosApp/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - shared (1.0)
3 |
4 | DEPENDENCIES:
5 | - shared (from `../shared`)
6 |
7 | EXTERNAL SOURCES:
8 | shared:
9 | :path: "../shared"
10 |
11 | SPEC CHECKSUMS:
12 | shared: 127df190ceb5435a70bd50987bdedc2dc0030f7b
13 |
14 | PODFILE CHECKSUM: f282da88f39e69507b0a255187c8a6b644477756
15 |
16 | COCOAPODS: 1.12.1
17 |
--------------------------------------------------------------------------------
/iosApp/Pods/Local Podspecs/shared.podspec.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "shared",
3 | "version": "1.0",
4 | "homepage": "Link to the Shared Module homepage",
5 | "source": {
6 | "http": ""
7 | },
8 | "authors": "",
9 | "license": "",
10 | "summary": "Some description for the Shared Module",
11 | "vendored_frameworks": "build/cocoapods/framework/shared.framework",
12 | "libraries": "c++",
13 | "platforms": {
14 | "ios": "14.1"
15 | },
16 | "pod_target_xcconfig": {
17 | "KOTLIN_PROJECT_PATH": ":shared",
18 | "PRODUCT_MODULE_NAME": "shared"
19 | },
20 | "script_phases": [
21 | {
22 | "name": "Build shared",
23 | "execution_position": "before_compile",
24 | "shell_path": "/bin/sh",
25 | "script": " if [ \"YES\" = \"$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED\" ]; then\n echo \"Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \"YES\"\"\n exit 0\n fi\n set -ev\n REPO_ROOT=\"$PODS_TARGET_SRCROOT\"\n \"$REPO_ROOT/../gradlew\" -p \"$REPO_ROOT\" $KOTLIN_PROJECT_PATH:syncFramework -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME -Pkotlin.native.cocoapods.archs=\"$ARCHS\" -Pkotlin.native.cocoapods.configuration=\"$CONFIGURATION\"\n"
26 | }
27 | ],
28 | "resources": [
29 | "build/compose/ios/shared/compose-resources"
30 | ]
31 | }
32 |
--------------------------------------------------------------------------------
/iosApp/Pods/Manifest.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - shared (1.0)
3 |
4 | DEPENDENCIES:
5 | - shared (from `../shared`)
6 |
7 | EXTERNAL SOURCES:
8 | shared:
9 | :path: "../shared"
10 |
11 | SPEC CHECKSUMS:
12 | shared: 127df190ceb5435a70bd50987bdedc2dc0030f7b
13 |
14 | PODFILE CHECKSUM: f282da88f39e69507b0a255187c8a6b644477756
15 |
16 | COCOAPODS: 1.12.1
17 |
--------------------------------------------------------------------------------
/iosApp/Pods/Pods.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXAggregateTarget section */
10 | 8777C9F6889E59EFFD631D80AEE9048B /* shared */ = {
11 | isa = PBXAggregateTarget;
12 | buildConfigurationList = 8349D8E2EC974421A14EF8ABFF6AD6DC /* Build configuration list for PBXAggregateTarget "shared" */;
13 | buildPhases = (
14 | BEA8885189D408D600647BDC228A6A20 /* [CP-User] Build shared */,
15 | );
16 | dependencies = (
17 | );
18 | name = shared;
19 | };
20 | /* End PBXAggregateTarget section */
21 |
22 | /* Begin PBXBuildFile section */
23 | 648F16425FEF89525AE0325F5A984B86 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */; };
24 | 8749C8E8DC500B064FA0BC7A78C38A2A /* Pods-iosApp-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BC3BD8CAFAE0C8EB92CD04E5FC24E61 /* Pods-iosApp-dummy.m */; };
25 | 8801CBFD38B946597BD07145B2EEFC9F /* Pods-iosApp-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 70E8DFC7821955063C886C71258CBE53 /* Pods-iosApp-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
26 | /* End PBXBuildFile section */
27 |
28 | /* Begin PBXContainerItemProxy section */
29 | 3B3DD97234976EAE23DEF848B521F3BD /* PBXContainerItemProxy */ = {
30 | isa = PBXContainerItemProxy;
31 | containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */;
32 | proxyType = 1;
33 | remoteGlobalIDString = 8777C9F6889E59EFFD631D80AEE9048B;
34 | remoteInfo = shared;
35 | };
36 | /* End PBXContainerItemProxy section */
37 |
38 | /* Begin PBXFileReference section */
39 | 008A9DE816B822B93AFB1BC05161EE9F /* shared.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = shared.debug.xcconfig; sourceTree = ""; };
40 | 203F11D202CA1846ED6084F2F3A2CCD4 /* compose-resources */ = {isa = PBXFileReference; includeInIndex = 1; name = "compose-resources"; path = "build/compose/ios/shared/compose-resources"; sourceTree = ""; };
41 | 257390D34074D2442461A69FE6970CBD /* Pods-iosApp-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-iosApp-resources.sh"; sourceTree = ""; };
42 | 4D3E6DCB9CAB65A8A05C467E2BBC1F0D /* Pods-iosApp-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-iosApp-acknowledgements.markdown"; sourceTree = ""; };
43 | 6A3C5EB0586A09C512019B6B6A2DE103 /* Pods-iosApp-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-iosApp-Info.plist"; sourceTree = ""; };
44 | 70E8DFC7821955063C886C71258CBE53 /* Pods-iosApp-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-iosApp-umbrella.h"; sourceTree = ""; };
45 | 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; };
46 | 76A970C5768DEF9352C145D1637136A3 /* shared.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = shared.release.xcconfig; sourceTree = ""; };
47 | 9BC3BD8CAFAE0C8EB92CD04E5FC24E61 /* Pods-iosApp-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-iosApp-dummy.m"; sourceTree = ""; };
48 | 9C49AEBC7AA7C80C03295804C6F07963 /* Pods-iosApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-iosApp.release.xcconfig"; sourceTree = ""; };
49 | 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
50 | B097DD7534E741D5C41838011D755842 /* Pods-iosApp */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = "Pods-iosApp"; path = Pods_iosApp.framework; sourceTree = BUILT_PRODUCTS_DIR; };
51 | CB3DDB432A4FDC06767575C61C8ADA0A /* shared.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; path = shared.podspec; sourceTree = ""; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
52 | CEF5FB4EEEFBEA291F9DDEDDDF0BE0C4 /* shared.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = shared.framework; path = build/cocoapods/framework/shared.framework; sourceTree = ""; };
53 | F6DF6FB4000E345BDEE186C956C36ABF /* Pods-iosApp-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-iosApp-acknowledgements.plist"; sourceTree = ""; };
54 | F981EE0C95E2DFD40CA16F05D2C35B8A /* Pods-iosApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-iosApp.debug.xcconfig"; sourceTree = ""; };
55 | FB978CA3A69A4DEF4DC035E9CD8D83A4 /* Pods-iosApp.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-iosApp.modulemap"; sourceTree = ""; };
56 | /* End PBXFileReference section */
57 |
58 | /* Begin PBXFrameworksBuildPhase section */
59 | CC3CD5459C4A5476C5A93268587E63E7 /* Frameworks */ = {
60 | isa = PBXFrameworksBuildPhase;
61 | buildActionMask = 2147483647;
62 | files = (
63 | 648F16425FEF89525AE0325F5A984B86 /* Foundation.framework in Frameworks */,
64 | );
65 | runOnlyForDeploymentPostprocessing = 0;
66 | };
67 | /* End PBXFrameworksBuildPhase section */
68 |
69 | /* Begin PBXGroup section */
70 | 11C970DEAE48C6D0282DFE54684F53F1 /* Targets Support Files */ = {
71 | isa = PBXGroup;
72 | children = (
73 | 4C16E8CC03E90AF9CABF8C82B813AE97 /* Pods-iosApp */,
74 | );
75 | name = "Targets Support Files";
76 | sourceTree = "";
77 | };
78 | 1F86AA6785DF34AFD5A71790761717DE /* Products */ = {
79 | isa = PBXGroup;
80 | children = (
81 | B097DD7534E741D5C41838011D755842 /* Pods-iosApp */,
82 | );
83 | name = Products;
84 | sourceTree = "";
85 | };
86 | 39F973608F645D55C358F8551EDDE8C5 /* Frameworks */ = {
87 | isa = PBXGroup;
88 | children = (
89 | CEF5FB4EEEFBEA291F9DDEDDDF0BE0C4 /* shared.framework */,
90 | );
91 | name = Frameworks;
92 | sourceTree = "";
93 | };
94 | 4C16E8CC03E90AF9CABF8C82B813AE97 /* Pods-iosApp */ = {
95 | isa = PBXGroup;
96 | children = (
97 | FB978CA3A69A4DEF4DC035E9CD8D83A4 /* Pods-iosApp.modulemap */,
98 | 4D3E6DCB9CAB65A8A05C467E2BBC1F0D /* Pods-iosApp-acknowledgements.markdown */,
99 | F6DF6FB4000E345BDEE186C956C36ABF /* Pods-iosApp-acknowledgements.plist */,
100 | 9BC3BD8CAFAE0C8EB92CD04E5FC24E61 /* Pods-iosApp-dummy.m */,
101 | 6A3C5EB0586A09C512019B6B6A2DE103 /* Pods-iosApp-Info.plist */,
102 | 257390D34074D2442461A69FE6970CBD /* Pods-iosApp-resources.sh */,
103 | 70E8DFC7821955063C886C71258CBE53 /* Pods-iosApp-umbrella.h */,
104 | F981EE0C95E2DFD40CA16F05D2C35B8A /* Pods-iosApp.debug.xcconfig */,
105 | 9C49AEBC7AA7C80C03295804C6F07963 /* Pods-iosApp.release.xcconfig */,
106 | );
107 | name = "Pods-iosApp";
108 | path = "Target Support Files/Pods-iosApp";
109 | sourceTree = "";
110 | };
111 | 4F9652C7FDB8CFF118333C17A5A41C8F /* Pod */ = {
112 | isa = PBXGroup;
113 | children = (
114 | CB3DDB432A4FDC06767575C61C8ADA0A /* shared.podspec */,
115 | );
116 | name = Pod;
117 | sourceTree = "";
118 | };
119 | 5010BA8DC1346A70C49ED90E48C98857 /* Support Files */ = {
120 | isa = PBXGroup;
121 | children = (
122 | 008A9DE816B822B93AFB1BC05161EE9F /* shared.debug.xcconfig */,
123 | 76A970C5768DEF9352C145D1637136A3 /* shared.release.xcconfig */,
124 | );
125 | name = "Support Files";
126 | path = "../iosApp/Pods/Target Support Files/shared";
127 | sourceTree = "";
128 | };
129 | 578452D2E740E91742655AC8F1636D1F /* iOS */ = {
130 | isa = PBXGroup;
131 | children = (
132 | 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */,
133 | );
134 | name = iOS;
135 | sourceTree = "";
136 | };
137 | 58AAD176B64323B9974E5B70EC8B12DC /* Development Pods */ = {
138 | isa = PBXGroup;
139 | children = (
140 | 8BADB6F22C77C34444BC9D80F04C298D /* shared */,
141 | );
142 | name = "Development Pods";
143 | sourceTree = "";
144 | };
145 | 8BADB6F22C77C34444BC9D80F04C298D /* shared */ = {
146 | isa = PBXGroup;
147 | children = (
148 | 203F11D202CA1846ED6084F2F3A2CCD4 /* compose-resources */,
149 | 39F973608F645D55C358F8551EDDE8C5 /* Frameworks */,
150 | 4F9652C7FDB8CFF118333C17A5A41C8F /* Pod */,
151 | 5010BA8DC1346A70C49ED90E48C98857 /* Support Files */,
152 | );
153 | name = shared;
154 | path = ../../shared;
155 | sourceTree = "";
156 | };
157 | CF1408CF629C7361332E53B88F7BD30C = {
158 | isa = PBXGroup;
159 | children = (
160 | 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */,
161 | 58AAD176B64323B9974E5B70EC8B12DC /* Development Pods */,
162 | D210D550F4EA176C3123ED886F8F87F5 /* Frameworks */,
163 | 1F86AA6785DF34AFD5A71790761717DE /* Products */,
164 | 11C970DEAE48C6D0282DFE54684F53F1 /* Targets Support Files */,
165 | );
166 | sourceTree = "";
167 | };
168 | D210D550F4EA176C3123ED886F8F87F5 /* Frameworks */ = {
169 | isa = PBXGroup;
170 | children = (
171 | 578452D2E740E91742655AC8F1636D1F /* iOS */,
172 | );
173 | name = Frameworks;
174 | sourceTree = "";
175 | };
176 | /* End PBXGroup section */
177 |
178 | /* Begin PBXHeadersBuildPhase section */
179 | DA71CB665A4F7860DB550FAA48FB6AD2 /* Headers */ = {
180 | isa = PBXHeadersBuildPhase;
181 | buildActionMask = 2147483647;
182 | files = (
183 | 8801CBFD38B946597BD07145B2EEFC9F /* Pods-iosApp-umbrella.h in Headers */,
184 | );
185 | runOnlyForDeploymentPostprocessing = 0;
186 | };
187 | /* End PBXHeadersBuildPhase section */
188 |
189 | /* Begin PBXNativeTarget section */
190 | ED39C638569286489CD697A6C8964146 /* Pods-iosApp */ = {
191 | isa = PBXNativeTarget;
192 | buildConfigurationList = 9F1E85ECB672A0CC96333A6C6DF60EE6 /* Build configuration list for PBXNativeTarget "Pods-iosApp" */;
193 | buildPhases = (
194 | DA71CB665A4F7860DB550FAA48FB6AD2 /* Headers */,
195 | EB28A529759E3D2117E28CE3CB8387D3 /* Sources */,
196 | CC3CD5459C4A5476C5A93268587E63E7 /* Frameworks */,
197 | 0EC1C62FF9B25EAB2D236D122EAF4C98 /* Resources */,
198 | );
199 | buildRules = (
200 | );
201 | dependencies = (
202 | 6D08CF75140F29DD6A6970543E494B09 /* PBXTargetDependency */,
203 | );
204 | name = "Pods-iosApp";
205 | productName = Pods_iosApp;
206 | productReference = B097DD7534E741D5C41838011D755842 /* Pods-iosApp */;
207 | productType = "com.apple.product-type.framework";
208 | };
209 | /* End PBXNativeTarget section */
210 |
211 | /* Begin PBXProject section */
212 | BFDFE7DC352907FC980B868725387E98 /* Project object */ = {
213 | isa = PBXProject;
214 | attributes = {
215 | LastSwiftUpdateCheck = 1300;
216 | LastUpgradeCheck = 1300;
217 | };
218 | buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */;
219 | compatibilityVersion = "Xcode 9.3";
220 | developmentRegion = en;
221 | hasScannedForEncodings = 0;
222 | knownRegions = (
223 | Base,
224 | en,
225 | );
226 | mainGroup = CF1408CF629C7361332E53B88F7BD30C;
227 | productRefGroup = 1F86AA6785DF34AFD5A71790761717DE /* Products */;
228 | projectDirPath = "";
229 | projectRoot = "";
230 | targets = (
231 | ED39C638569286489CD697A6C8964146 /* Pods-iosApp */,
232 | 8777C9F6889E59EFFD631D80AEE9048B /* shared */,
233 | );
234 | };
235 | /* End PBXProject section */
236 |
237 | /* Begin PBXResourcesBuildPhase section */
238 | 0EC1C62FF9B25EAB2D236D122EAF4C98 /* Resources */ = {
239 | isa = PBXResourcesBuildPhase;
240 | buildActionMask = 2147483647;
241 | files = (
242 | );
243 | runOnlyForDeploymentPostprocessing = 0;
244 | };
245 | /* End PBXResourcesBuildPhase section */
246 |
247 | /* Begin PBXShellScriptBuildPhase section */
248 | BEA8885189D408D600647BDC228A6A20 /* [CP-User] Build shared */ = {
249 | isa = PBXShellScriptBuildPhase;
250 | buildActionMask = 2147483647;
251 | files = (
252 | );
253 | name = "[CP-User] Build shared";
254 | runOnlyForDeploymentPostprocessing = 0;
255 | shellPath = /bin/sh;
256 | shellScript = " if [ \"YES\" = \"$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED\" ]; then\n echo \"Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \"YES\"\"\n exit 0\n fi\n set -ev\n REPO_ROOT=\"$PODS_TARGET_SRCROOT\"\n \"$REPO_ROOT/../gradlew\" -p \"$REPO_ROOT\" $KOTLIN_PROJECT_PATH:syncFramework -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME -Pkotlin.native.cocoapods.archs=\"$ARCHS\" -Pkotlin.native.cocoapods.configuration=\"$CONFIGURATION\"\n";
257 | };
258 | /* End PBXShellScriptBuildPhase section */
259 |
260 | /* Begin PBXSourcesBuildPhase section */
261 | EB28A529759E3D2117E28CE3CB8387D3 /* Sources */ = {
262 | isa = PBXSourcesBuildPhase;
263 | buildActionMask = 2147483647;
264 | files = (
265 | 8749C8E8DC500B064FA0BC7A78C38A2A /* Pods-iosApp-dummy.m in Sources */,
266 | );
267 | runOnlyForDeploymentPostprocessing = 0;
268 | };
269 | /* End PBXSourcesBuildPhase section */
270 |
271 | /* Begin PBXTargetDependency section */
272 | 6D08CF75140F29DD6A6970543E494B09 /* PBXTargetDependency */ = {
273 | isa = PBXTargetDependency;
274 | name = shared;
275 | target = 8777C9F6889E59EFFD631D80AEE9048B /* shared */;
276 | targetProxy = 3B3DD97234976EAE23DEF848B521F3BD /* PBXContainerItemProxy */;
277 | };
278 | /* End PBXTargetDependency section */
279 |
280 | /* Begin XCBuildConfiguration section */
281 | 02DDCCED053337F381DEBAFDEC6F354F /* Release */ = {
282 | isa = XCBuildConfiguration;
283 | baseConfigurationReference = 9C49AEBC7AA7C80C03295804C6F07963 /* Pods-iosApp.release.xcconfig */;
284 | buildSettings = {
285 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
286 | CLANG_ENABLE_OBJC_WEAK = NO;
287 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
288 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
289 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
290 | CURRENT_PROJECT_VERSION = 1;
291 | DEFINES_MODULE = YES;
292 | DYLIB_COMPATIBILITY_VERSION = 1;
293 | DYLIB_CURRENT_VERSION = 1;
294 | DYLIB_INSTALL_NAME_BASE = "@rpath";
295 | INFOPLIST_FILE = "Target Support Files/Pods-iosApp/Pods-iosApp-Info.plist";
296 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
297 | IPHONEOS_DEPLOYMENT_TARGET = 14.1;
298 | LD_RUNPATH_SEARCH_PATHS = (
299 | "$(inherited)",
300 | "@executable_path/Frameworks",
301 | "@loader_path/Frameworks",
302 | );
303 | MACH_O_TYPE = staticlib;
304 | MODULEMAP_FILE = "Target Support Files/Pods-iosApp/Pods-iosApp.modulemap";
305 | OTHER_LDFLAGS = "";
306 | OTHER_LIBTOOLFLAGS = "";
307 | PODS_ROOT = "$(SRCROOT)";
308 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}";
309 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
310 | SDKROOT = iphoneos;
311 | SKIP_INSTALL = YES;
312 | TARGETED_DEVICE_FAMILY = "1,2";
313 | VALIDATE_PRODUCT = YES;
314 | VERSIONING_SYSTEM = "apple-generic";
315 | VERSION_INFO_PREFIX = "";
316 | };
317 | name = Release;
318 | };
319 | 593F10BFFA94DAC7D6E17FB8A7F32D72 /* Release */ = {
320 | isa = XCBuildConfiguration;
321 | buildSettings = {
322 | ALWAYS_SEARCH_USER_PATHS = NO;
323 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
324 | CLANG_ANALYZER_NONNULL = YES;
325 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
326 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
327 | CLANG_CXX_LIBRARY = "libc++";
328 | CLANG_ENABLE_MODULES = YES;
329 | CLANG_ENABLE_OBJC_ARC = YES;
330 | CLANG_ENABLE_OBJC_WEAK = YES;
331 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
332 | CLANG_WARN_BOOL_CONVERSION = YES;
333 | CLANG_WARN_COMMA = YES;
334 | CLANG_WARN_CONSTANT_CONVERSION = YES;
335 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
336 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
337 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
338 | CLANG_WARN_EMPTY_BODY = YES;
339 | CLANG_WARN_ENUM_CONVERSION = YES;
340 | CLANG_WARN_INFINITE_RECURSION = YES;
341 | CLANG_WARN_INT_CONVERSION = YES;
342 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
343 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
344 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
345 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
346 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
347 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
348 | CLANG_WARN_STRICT_PROTOTYPES = YES;
349 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
350 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
351 | CLANG_WARN_UNREACHABLE_CODE = YES;
352 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
353 | COPY_PHASE_STRIP = NO;
354 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
355 | ENABLE_NS_ASSERTIONS = NO;
356 | ENABLE_STRICT_OBJC_MSGSEND = YES;
357 | GCC_C_LANGUAGE_STANDARD = gnu11;
358 | GCC_NO_COMMON_BLOCKS = YES;
359 | GCC_PREPROCESSOR_DEFINITIONS = (
360 | "POD_CONFIGURATION_RELEASE=1",
361 | "$(inherited)",
362 | );
363 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
364 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
365 | GCC_WARN_UNDECLARED_SELECTOR = YES;
366 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
367 | GCC_WARN_UNUSED_FUNCTION = YES;
368 | GCC_WARN_UNUSED_VARIABLE = YES;
369 | IPHONEOS_DEPLOYMENT_TARGET = 14.1;
370 | MTL_ENABLE_DEBUG_INFO = NO;
371 | MTL_FAST_MATH = YES;
372 | PRODUCT_NAME = "$(TARGET_NAME)";
373 | STRIP_INSTALLED_PRODUCT = NO;
374 | SWIFT_COMPILATION_MODE = wholemodule;
375 | SWIFT_OPTIMIZATION_LEVEL = "-O";
376 | SWIFT_VERSION = 5.0;
377 | SYMROOT = "${SRCROOT}/../build";
378 | };
379 | name = Release;
380 | };
381 | A0374B8CF9A7D6A45F6D116D698D1C19 /* Debug */ = {
382 | isa = XCBuildConfiguration;
383 | buildSettings = {
384 | ALWAYS_SEARCH_USER_PATHS = NO;
385 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
386 | CLANG_ANALYZER_NONNULL = YES;
387 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
388 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
389 | CLANG_CXX_LIBRARY = "libc++";
390 | CLANG_ENABLE_MODULES = YES;
391 | CLANG_ENABLE_OBJC_ARC = YES;
392 | CLANG_ENABLE_OBJC_WEAK = YES;
393 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
394 | CLANG_WARN_BOOL_CONVERSION = YES;
395 | CLANG_WARN_COMMA = YES;
396 | CLANG_WARN_CONSTANT_CONVERSION = YES;
397 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
398 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
399 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
400 | CLANG_WARN_EMPTY_BODY = YES;
401 | CLANG_WARN_ENUM_CONVERSION = YES;
402 | CLANG_WARN_INFINITE_RECURSION = YES;
403 | CLANG_WARN_INT_CONVERSION = YES;
404 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
405 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
406 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
407 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
408 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
409 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
410 | CLANG_WARN_STRICT_PROTOTYPES = YES;
411 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
412 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
413 | CLANG_WARN_UNREACHABLE_CODE = YES;
414 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
415 | COPY_PHASE_STRIP = NO;
416 | DEBUG_INFORMATION_FORMAT = dwarf;
417 | ENABLE_STRICT_OBJC_MSGSEND = YES;
418 | ENABLE_TESTABILITY = YES;
419 | GCC_C_LANGUAGE_STANDARD = gnu11;
420 | GCC_DYNAMIC_NO_PIC = NO;
421 | GCC_NO_COMMON_BLOCKS = YES;
422 | GCC_OPTIMIZATION_LEVEL = 0;
423 | GCC_PREPROCESSOR_DEFINITIONS = (
424 | "POD_CONFIGURATION_DEBUG=1",
425 | "DEBUG=1",
426 | "$(inherited)",
427 | );
428 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
429 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
430 | GCC_WARN_UNDECLARED_SELECTOR = YES;
431 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
432 | GCC_WARN_UNUSED_FUNCTION = YES;
433 | GCC_WARN_UNUSED_VARIABLE = YES;
434 | IPHONEOS_DEPLOYMENT_TARGET = 14.1;
435 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
436 | MTL_FAST_MATH = YES;
437 | ONLY_ACTIVE_ARCH = YES;
438 | PRODUCT_NAME = "$(TARGET_NAME)";
439 | STRIP_INSTALLED_PRODUCT = NO;
440 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
441 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
442 | SWIFT_VERSION = 5.0;
443 | SYMROOT = "${SRCROOT}/../build";
444 | };
445 | name = Debug;
446 | };
447 | A7B4967B71249851CABD6EC29251E481 /* Debug */ = {
448 | isa = XCBuildConfiguration;
449 | baseConfigurationReference = 008A9DE816B822B93AFB1BC05161EE9F /* shared.debug.xcconfig */;
450 | buildSettings = {
451 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
452 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
453 | CLANG_ENABLE_OBJC_WEAK = NO;
454 | IPHONEOS_DEPLOYMENT_TARGET = 14.1;
455 | LD_RUNPATH_SEARCH_PATHS = (
456 | "$(inherited)",
457 | "@executable_path/Frameworks",
458 | );
459 | SDKROOT = iphoneos;
460 | TARGETED_DEVICE_FAMILY = "1,2";
461 | };
462 | name = Debug;
463 | };
464 | A96D4527F178BD8C0DEB7EE72B9AAE09 /* Release */ = {
465 | isa = XCBuildConfiguration;
466 | baseConfigurationReference = 76A970C5768DEF9352C145D1637136A3 /* shared.release.xcconfig */;
467 | buildSettings = {
468 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
469 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
470 | CLANG_ENABLE_OBJC_WEAK = NO;
471 | IPHONEOS_DEPLOYMENT_TARGET = 14.1;
472 | LD_RUNPATH_SEARCH_PATHS = (
473 | "$(inherited)",
474 | "@executable_path/Frameworks",
475 | );
476 | SDKROOT = iphoneos;
477 | TARGETED_DEVICE_FAMILY = "1,2";
478 | VALIDATE_PRODUCT = YES;
479 | };
480 | name = Release;
481 | };
482 | AF088B6CD92A52AC4DCB62DEEC871231 /* Debug */ = {
483 | isa = XCBuildConfiguration;
484 | baseConfigurationReference = F981EE0C95E2DFD40CA16F05D2C35B8A /* Pods-iosApp.debug.xcconfig */;
485 | buildSettings = {
486 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
487 | CLANG_ENABLE_OBJC_WEAK = NO;
488 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
489 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
490 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
491 | CURRENT_PROJECT_VERSION = 1;
492 | DEFINES_MODULE = YES;
493 | DYLIB_COMPATIBILITY_VERSION = 1;
494 | DYLIB_CURRENT_VERSION = 1;
495 | DYLIB_INSTALL_NAME_BASE = "@rpath";
496 | INFOPLIST_FILE = "Target Support Files/Pods-iosApp/Pods-iosApp-Info.plist";
497 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
498 | IPHONEOS_DEPLOYMENT_TARGET = 14.1;
499 | LD_RUNPATH_SEARCH_PATHS = (
500 | "$(inherited)",
501 | "@executable_path/Frameworks",
502 | "@loader_path/Frameworks",
503 | );
504 | MACH_O_TYPE = staticlib;
505 | MODULEMAP_FILE = "Target Support Files/Pods-iosApp/Pods-iosApp.modulemap";
506 | OTHER_LDFLAGS = "";
507 | OTHER_LIBTOOLFLAGS = "";
508 | PODS_ROOT = "$(SRCROOT)";
509 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}";
510 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
511 | SDKROOT = iphoneos;
512 | SKIP_INSTALL = YES;
513 | TARGETED_DEVICE_FAMILY = "1,2";
514 | VERSIONING_SYSTEM = "apple-generic";
515 | VERSION_INFO_PREFIX = "";
516 | };
517 | name = Debug;
518 | };
519 | /* End XCBuildConfiguration section */
520 |
521 | /* Begin XCConfigurationList section */
522 | 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = {
523 | isa = XCConfigurationList;
524 | buildConfigurations = (
525 | A0374B8CF9A7D6A45F6D116D698D1C19 /* Debug */,
526 | 593F10BFFA94DAC7D6E17FB8A7F32D72 /* Release */,
527 | );
528 | defaultConfigurationIsVisible = 0;
529 | defaultConfigurationName = Release;
530 | };
531 | 8349D8E2EC974421A14EF8ABFF6AD6DC /* Build configuration list for PBXAggregateTarget "shared" */ = {
532 | isa = XCConfigurationList;
533 | buildConfigurations = (
534 | A7B4967B71249851CABD6EC29251E481 /* Debug */,
535 | A96D4527F178BD8C0DEB7EE72B9AAE09 /* Release */,
536 | );
537 | defaultConfigurationIsVisible = 0;
538 | defaultConfigurationName = Release;
539 | };
540 | 9F1E85ECB672A0CC96333A6C6DF60EE6 /* Build configuration list for PBXNativeTarget "Pods-iosApp" */ = {
541 | isa = XCConfigurationList;
542 | buildConfigurations = (
543 | AF088B6CD92A52AC4DCB62DEEC871231 /* Debug */,
544 | 02DDCCED053337F381DEBAFDEC6F354F /* Release */,
545 | );
546 | defaultConfigurationIsVisible = 0;
547 | defaultConfigurationName = Release;
548 | };
549 | /* End XCConfigurationList section */
550 | };
551 | rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */;
552 | }
553 |
--------------------------------------------------------------------------------
/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | ${PODS_DEVELOPMENT_LANGUAGE}
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-acknowledgements.markdown:
--------------------------------------------------------------------------------
1 | # Acknowledgements
2 | This application makes use of the following third party libraries:
3 | Generated by CocoaPods - https://cocoapods.org
4 |
--------------------------------------------------------------------------------
/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-acknowledgements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreferenceSpecifiers
6 |
7 |
8 | FooterText
9 | This application makes use of the following third party libraries:
10 | Title
11 | Acknowledgements
12 | Type
13 | PSGroupSpecifier
14 |
15 |
16 | FooterText
17 | Generated by CocoaPods - https://cocoapods.org
18 | Title
19 |
20 | Type
21 | PSGroupSpecifier
22 |
23 |
24 | StringsTable
25 | Acknowledgements
26 | Title
27 | Acknowledgements
28 |
29 |
30 |
--------------------------------------------------------------------------------
/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_iosApp : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_iosApp
5 | @end
6 |
--------------------------------------------------------------------------------
/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-frameworks-Debug-input-files.xcfilelist:
--------------------------------------------------------------------------------
1 | ${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-frameworks.sh
2 | ${PODS_ROOT}/../../shared/build/cocoapods/framework/shared.framework
--------------------------------------------------------------------------------
/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-frameworks-Debug-output-files.xcfilelist:
--------------------------------------------------------------------------------
1 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared.framework
--------------------------------------------------------------------------------
/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-frameworks-Release-input-files.xcfilelist:
--------------------------------------------------------------------------------
1 | ${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-frameworks.sh
2 | ${PODS_ROOT}/../../shared/build/cocoapods/framework/shared.framework
--------------------------------------------------------------------------------
/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-frameworks-Release-output-files.xcfilelist:
--------------------------------------------------------------------------------
1 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared.framework
--------------------------------------------------------------------------------
/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-frameworks.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 | set -u
4 | set -o pipefail
5 |
6 | function on_error {
7 | echo "$(realpath -mq "${0}"):$1: error: Unexpected failure"
8 | }
9 | trap 'on_error $LINENO' ERR
10 |
11 | if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then
12 | # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy
13 | # frameworks to, so exit 0 (signalling the script phase was successful).
14 | exit 0
15 | fi
16 |
17 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
18 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
19 |
20 | COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}"
21 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
22 | BCSYMBOLMAP_DIR="BCSymbolMaps"
23 |
24 |
25 | # This protects against multiple targets copying the same framework dependency at the same time. The solution
26 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
27 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
28 |
29 | # Copies and strips a vendored framework
30 | install_framework()
31 | {
32 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
33 | local source="${BUILT_PRODUCTS_DIR}/$1"
34 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then
35 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")"
36 | elif [ -r "$1" ]; then
37 | local source="$1"
38 | fi
39 |
40 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
41 |
42 | if [ -L "${source}" ]; then
43 | echo "Symlinked..."
44 | source="$(readlink -f "${source}")"
45 | fi
46 |
47 | if [ -d "${source}/${BCSYMBOLMAP_DIR}" ]; then
48 | # Locate and install any .bcsymbolmaps if present, and remove them from the .framework before the framework is copied
49 | find "${source}/${BCSYMBOLMAP_DIR}" -name "*.bcsymbolmap"|while read f; do
50 | echo "Installing $f"
51 | install_bcsymbolmap "$f" "$destination"
52 | rm "$f"
53 | done
54 | rmdir "${source}/${BCSYMBOLMAP_DIR}"
55 | fi
56 |
57 | # Use filter instead of exclude so missing patterns don't throw errors.
58 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\""
59 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
60 |
61 | local basename
62 | basename="$(basename -s .framework "$1")"
63 | binary="${destination}/${basename}.framework/${basename}"
64 |
65 | if ! [ -r "$binary" ]; then
66 | binary="${destination}/${basename}"
67 | elif [ -L "${binary}" ]; then
68 | echo "Destination binary is symlinked..."
69 | dirname="$(dirname "${binary}")"
70 | binary="${dirname}/$(readlink "${binary}")"
71 | fi
72 |
73 | # Strip invalid architectures so "fat" simulator / device frameworks work on device
74 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then
75 | strip_invalid_archs "$binary"
76 | fi
77 |
78 | # Resign the code if required by the build settings to avoid unstable apps
79 | code_sign_if_enabled "${destination}/$(basename "$1")"
80 |
81 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7.
82 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then
83 | local swift_runtime_libs
84 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u)
85 | for lib in $swift_runtime_libs; do
86 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\""
87 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}"
88 | code_sign_if_enabled "${destination}/${lib}"
89 | done
90 | fi
91 | }
92 | # Copies and strips a vendored dSYM
93 | install_dsym() {
94 | local source="$1"
95 | warn_missing_arch=${2:-true}
96 | if [ -r "$source" ]; then
97 | # Copy the dSYM into the targets temp dir.
98 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\""
99 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}"
100 |
101 | local basename
102 | basename="$(basename -s .dSYM "$source")"
103 | binary_name="$(ls "$source/Contents/Resources/DWARF")"
104 | binary="${DERIVED_FILES_DIR}/${basename}.dSYM/Contents/Resources/DWARF/${binary_name}"
105 |
106 | # Strip invalid architectures from the dSYM.
107 | if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then
108 | strip_invalid_archs "$binary" "$warn_missing_arch"
109 | fi
110 | if [[ $STRIP_BINARY_RETVAL == 0 ]]; then
111 | # Move the stripped file into its final destination.
112 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\""
113 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.dSYM" "${DWARF_DSYM_FOLDER_PATH}"
114 | else
115 | # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing.
116 | mkdir -p "${DWARF_DSYM_FOLDER_PATH}"
117 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.dSYM"
118 | fi
119 | fi
120 | }
121 |
122 | # Used as a return value for each invocation of `strip_invalid_archs` function.
123 | STRIP_BINARY_RETVAL=0
124 |
125 | # Strip invalid architectures
126 | strip_invalid_archs() {
127 | binary="$1"
128 | warn_missing_arch=${2:-true}
129 | # Get architectures for current target binary
130 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)"
131 | # Intersect them with the architectures we are building for
132 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)"
133 | # If there are no archs supported by this binary then warn the user
134 | if [[ -z "$intersected_archs" ]]; then
135 | if [[ "$warn_missing_arch" == "true" ]]; then
136 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)."
137 | fi
138 | STRIP_BINARY_RETVAL=1
139 | return
140 | fi
141 | stripped=""
142 | for arch in $binary_archs; do
143 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then
144 | # Strip non-valid architectures in-place
145 | lipo -remove "$arch" -output "$binary" "$binary"
146 | stripped="$stripped $arch"
147 | fi
148 | done
149 | if [[ "$stripped" ]]; then
150 | echo "Stripped $binary of architectures:$stripped"
151 | fi
152 | STRIP_BINARY_RETVAL=0
153 | }
154 |
155 | # Copies the bcsymbolmap files of a vendored framework
156 | install_bcsymbolmap() {
157 | local bcsymbolmap_path="$1"
158 | local destination="${BUILT_PRODUCTS_DIR}"
159 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}""
160 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"
161 | }
162 |
163 | # Signs a framework with the provided identity
164 | code_sign_if_enabled() {
165 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
166 | # Use the current code_sign_identity
167 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
168 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'"
169 |
170 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
171 | code_sign_cmd="$code_sign_cmd &"
172 | fi
173 | echo "$code_sign_cmd"
174 | eval "$code_sign_cmd"
175 | fi
176 | }
177 |
178 | if [[ "$CONFIGURATION" == "Debug" ]]; then
179 | install_framework "${PODS_ROOT}/../../shared/build/cocoapods/framework/shared.framework"
180 | fi
181 | if [[ "$CONFIGURATION" == "Release" ]]; then
182 | install_framework "${PODS_ROOT}/../../shared/build/cocoapods/framework/shared.framework"
183 | fi
184 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
185 | wait
186 | fi
187 |
--------------------------------------------------------------------------------
/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-resources-Debug-input-files.xcfilelist:
--------------------------------------------------------------------------------
1 | ${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources.sh
2 | ${PODS_ROOT}/../../shared/build/compose/ios/shared/compose-resources
--------------------------------------------------------------------------------
/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-resources-Debug-output-files.xcfilelist:
--------------------------------------------------------------------------------
1 | ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/compose-resources
--------------------------------------------------------------------------------
/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-resources-Release-input-files.xcfilelist:
--------------------------------------------------------------------------------
1 | ${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources.sh
2 | ${PODS_ROOT}/../../shared/build/compose/ios/shared/compose-resources
--------------------------------------------------------------------------------
/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-resources-Release-output-files.xcfilelist:
--------------------------------------------------------------------------------
1 | ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/compose-resources
--------------------------------------------------------------------------------
/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-resources.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 | set -u
4 | set -o pipefail
5 |
6 | function on_error {
7 | echo "$(realpath -mq "${0}"):$1: error: Unexpected failure"
8 | }
9 | trap 'on_error $LINENO' ERR
10 |
11 | if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then
12 | # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy
13 | # resources to, so exit 0 (signalling the script phase was successful).
14 | exit 0
15 | fi
16 |
17 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
18 |
19 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
20 | > "$RESOURCES_TO_COPY"
21 |
22 | XCASSET_FILES=()
23 |
24 | # This protects against multiple targets copying the same framework dependency at the same time. The solution
25 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
26 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
27 |
28 | case "${TARGETED_DEVICE_FAMILY:-}" in
29 | 1,2)
30 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone"
31 | ;;
32 | 1)
33 | TARGET_DEVICE_ARGS="--target-device iphone"
34 | ;;
35 | 2)
36 | TARGET_DEVICE_ARGS="--target-device ipad"
37 | ;;
38 | 3)
39 | TARGET_DEVICE_ARGS="--target-device tv"
40 | ;;
41 | 4)
42 | TARGET_DEVICE_ARGS="--target-device watch"
43 | ;;
44 | *)
45 | TARGET_DEVICE_ARGS="--target-device mac"
46 | ;;
47 | esac
48 |
49 | install_resource()
50 | {
51 | if [[ "$1" = /* ]] ; then
52 | RESOURCE_PATH="$1"
53 | else
54 | RESOURCE_PATH="${PODS_ROOT}/$1"
55 | fi
56 | if [[ ! -e "$RESOURCE_PATH" ]] ; then
57 | cat << EOM
58 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script.
59 | EOM
60 | exit 1
61 | fi
62 | case $RESOURCE_PATH in
63 | *.storyboard)
64 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
65 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
66 | ;;
67 | *.xib)
68 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
69 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
70 | ;;
71 | *.framework)
72 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
73 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
74 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
75 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
76 | ;;
77 | *.xcdatamodel)
78 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true
79 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom"
80 | ;;
81 | *.xcdatamodeld)
82 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true
83 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd"
84 | ;;
85 | *.xcmappingmodel)
86 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true
87 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm"
88 | ;;
89 | *.xcassets)
90 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH"
91 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE")
92 | ;;
93 | *)
94 | echo "$RESOURCE_PATH" || true
95 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY"
96 | ;;
97 | esac
98 | }
99 | if [[ "$CONFIGURATION" == "Debug" ]]; then
100 | install_resource "${PODS_ROOT}/../../shared/build/compose/ios/shared/compose-resources"
101 | fi
102 | if [[ "$CONFIGURATION" == "Release" ]]; then
103 | install_resource "${PODS_ROOT}/../../shared/build/compose/ios/shared/compose-resources"
104 | fi
105 |
106 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
107 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
108 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then
109 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
110 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
111 | fi
112 | rm -f "$RESOURCES_TO_COPY"
113 |
114 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ]
115 | then
116 | # Find all other xcassets (this unfortunately includes those of path pods and other targets).
117 | OTHER_XCASSETS=$(find -L "$PWD" -iname "*.xcassets" -type d)
118 | while read line; do
119 | if [[ $line != "${PODS_ROOT}*" ]]; then
120 | XCASSET_FILES+=("$line")
121 | fi
122 | done <<<"$OTHER_XCASSETS"
123 |
124 | if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then
125 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
126 | else
127 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist"
128 | fi
129 | fi
130 |
--------------------------------------------------------------------------------
/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
14 | FOUNDATION_EXPORT double Pods_iosAppVersionNumber;
15 | FOUNDATION_EXPORT const unsigned char Pods_iosAppVersionString[];
16 |
17 |
--------------------------------------------------------------------------------
/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp.debug.xcconfig:
--------------------------------------------------------------------------------
1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/../../shared/build/cocoapods/framework"
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"c++" -framework "shared"
6 | PODS_BUILD_DIR = ${BUILD_DIR}
7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
9 | PODS_ROOT = ${SRCROOT}/Pods
10 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
11 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
12 |
--------------------------------------------------------------------------------
/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp.modulemap:
--------------------------------------------------------------------------------
1 | framework module Pods_iosApp {
2 | umbrella header "Pods-iosApp-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp.release.xcconfig:
--------------------------------------------------------------------------------
1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/../../shared/build/cocoapods/framework"
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"c++" -framework "shared"
6 | PODS_BUILD_DIR = ${BUILD_DIR}
7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
9 | PODS_ROOT = ${SRCROOT}/Pods
10 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
11 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
12 |
--------------------------------------------------------------------------------
/iosApp/Pods/Target Support Files/shared/shared.debug.xcconfig:
--------------------------------------------------------------------------------
1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/shared
3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/../../shared/build/cocoapods/framework"
4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
5 | KOTLIN_PROJECT_PATH = :shared
6 | OTHER_LDFLAGS = $(inherited) -l"c++"
7 | PODS_BUILD_DIR = ${BUILD_DIR}
8 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
9 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE}
10 | PODS_ROOT = ${SRCROOT}
11 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../../shared
12 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
13 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
14 | PRODUCT_MODULE_NAME = shared
15 | SKIP_INSTALL = YES
16 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
17 |
--------------------------------------------------------------------------------
/iosApp/Pods/Target Support Files/shared/shared.release.xcconfig:
--------------------------------------------------------------------------------
1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/shared
3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/../../shared/build/cocoapods/framework"
4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
5 | KOTLIN_PROJECT_PATH = :shared
6 | OTHER_LDFLAGS = $(inherited) -l"c++"
7 | PODS_BUILD_DIR = ${BUILD_DIR}
8 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
9 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE}
10 | PODS_ROOT = ${SRCROOT}
11 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../../shared
12 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
13 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
14 | PRODUCT_MODULE_NAME = shared
15 | SKIP_INSTALL = YES
16 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
17 |
--------------------------------------------------------------------------------
/iosApp/iosApp.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 058557BB273AAA24004C7B11 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 058557BA273AAA24004C7B11 /* Assets.xcassets */; };
11 | 058557D9273AAEEB004C7B11 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */; };
12 | 2152FB042600AC8F00CF470E /* iOSApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2152FB032600AC8F00CF470E /* iOSApp.swift */; };
13 | 7555FF83242A565900829871 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7555FF82242A565900829871 /* ContentView.swift */; };
14 | ABE52147678C41EB11F9A35E /* Pods_iosApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C00783F9EC96F9B1337FDBD /* Pods_iosApp.framework */; };
15 | B7F184DB2AAFA9D300FC16E9 /* ComposeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7F184DA2AAFA9D300FC16E9 /* ComposeView.swift */; };
16 | /* End PBXBuildFile section */
17 |
18 | /* Begin PBXFileReference section */
19 | 008D490509C1F0E3F2D47A23 /* Pods-iosApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iosApp.debug.xcconfig"; path = "Target Support Files/Pods-iosApp/Pods-iosApp.debug.xcconfig"; sourceTree = ""; };
20 | 058557BA273AAA24004C7B11 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
21 | 058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; };
22 | 2152FB032600AC8F00CF470E /* iOSApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSApp.swift; sourceTree = ""; };
23 | 4C00783F9EC96F9B1337FDBD /* Pods_iosApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_iosApp.framework; sourceTree = BUILT_PRODUCTS_DIR; };
24 | 7555FF7B242A565900829871 /* iosApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iosApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
25 | 7555FF82242A565900829871 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; };
26 | 7555FF8C242A565B00829871 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
27 | 8FBDCABA4A19177E7526742C /* Pods-iosApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iosApp.release.xcconfig"; path = "Target Support Files/Pods-iosApp/Pods-iosApp.release.xcconfig"; sourceTree = ""; };
28 | B7F184DA2AAFA9D300FC16E9 /* ComposeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComposeView.swift; sourceTree = ""; };
29 | /* End PBXFileReference section */
30 |
31 | /* Begin PBXFrameworksBuildPhase section */
32 | EF7CAA2A8BF7848B7A777144 /* Frameworks */ = {
33 | isa = PBXFrameworksBuildPhase;
34 | buildActionMask = 2147483647;
35 | files = (
36 | ABE52147678C41EB11F9A35E /* Pods_iosApp.framework in Frameworks */,
37 | );
38 | runOnlyForDeploymentPostprocessing = 0;
39 | };
40 | /* End PBXFrameworksBuildPhase section */
41 |
42 | /* Begin PBXGroup section */
43 | 058557D7273AAEEB004C7B11 /* Preview Content */ = {
44 | isa = PBXGroup;
45 | children = (
46 | 058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */,
47 | );
48 | path = "Preview Content";
49 | sourceTree = "";
50 | };
51 | 1A8B22CBE2F6E26D66B533E8 /* Pods */ = {
52 | isa = PBXGroup;
53 | children = (
54 | 008D490509C1F0E3F2D47A23 /* Pods-iosApp.debug.xcconfig */,
55 | 8FBDCABA4A19177E7526742C /* Pods-iosApp.release.xcconfig */,
56 | );
57 | path = Pods;
58 | sourceTree = "";
59 | };
60 | 34EDA76A4BF59EAAA9A6C334 /* Frameworks */ = {
61 | isa = PBXGroup;
62 | children = (
63 | 4C00783F9EC96F9B1337FDBD /* Pods_iosApp.framework */,
64 | );
65 | name = Frameworks;
66 | sourceTree = "";
67 | };
68 | 7555FF72242A565900829871 = {
69 | isa = PBXGroup;
70 | children = (
71 | 7555FF7D242A565900829871 /* iosApp */,
72 | 7555FF7C242A565900829871 /* Products */,
73 | 1A8B22CBE2F6E26D66B533E8 /* Pods */,
74 | 34EDA76A4BF59EAAA9A6C334 /* Frameworks */,
75 | );
76 | sourceTree = "";
77 | };
78 | 7555FF7C242A565900829871 /* Products */ = {
79 | isa = PBXGroup;
80 | children = (
81 | 7555FF7B242A565900829871 /* iosApp.app */,
82 | );
83 | name = Products;
84 | sourceTree = "";
85 | };
86 | 7555FF7D242A565900829871 /* iosApp */ = {
87 | isa = PBXGroup;
88 | children = (
89 | 058557BA273AAA24004C7B11 /* Assets.xcassets */,
90 | 7555FF82242A565900829871 /* ContentView.swift */,
91 | 7555FF8C242A565B00829871 /* Info.plist */,
92 | 2152FB032600AC8F00CF470E /* iOSApp.swift */,
93 | 058557D7273AAEEB004C7B11 /* Preview Content */,
94 | B7F184DA2AAFA9D300FC16E9 /* ComposeView.swift */,
95 | );
96 | path = iosApp;
97 | sourceTree = "";
98 | };
99 | /* End PBXGroup section */
100 |
101 | /* Begin PBXNativeTarget section */
102 | 7555FF7A242A565900829871 /* iosApp */ = {
103 | isa = PBXNativeTarget;
104 | buildConfigurationList = 7555FFA5242A565B00829871 /* Build configuration list for PBXNativeTarget "iosApp" */;
105 | buildPhases = (
106 | 068F018904405DF7A432931F /* [CP] Check Pods Manifest.lock */,
107 | 7555FF77242A565900829871 /* Sources */,
108 | 7555FF79242A565900829871 /* Resources */,
109 | EF7CAA2A8BF7848B7A777144 /* Frameworks */,
110 | B0BC01ABF09F6526BF66617E /* [CP] Copy Pods Resources */,
111 | );
112 | buildRules = (
113 | );
114 | dependencies = (
115 | );
116 | name = iosApp;
117 | productName = iosApp;
118 | productReference = 7555FF7B242A565900829871 /* iosApp.app */;
119 | productType = "com.apple.product-type.application";
120 | };
121 | /* End PBXNativeTarget section */
122 |
123 | /* Begin PBXProject section */
124 | 7555FF73242A565900829871 /* Project object */ = {
125 | isa = PBXProject;
126 | attributes = {
127 | LastSwiftUpdateCheck = 1130;
128 | LastUpgradeCheck = 1130;
129 | ORGANIZATIONNAME = orgName;
130 | TargetAttributes = {
131 | 7555FF7A242A565900829871 = {
132 | CreatedOnToolsVersion = 11.3.1;
133 | };
134 | };
135 | };
136 | buildConfigurationList = 7555FF76242A565900829871 /* Build configuration list for PBXProject "iosApp" */;
137 | compatibilityVersion = "Xcode 9.3";
138 | developmentRegion = en;
139 | hasScannedForEncodings = 0;
140 | knownRegions = (
141 | en,
142 | Base,
143 | );
144 | mainGroup = 7555FF72242A565900829871;
145 | productRefGroup = 7555FF7C242A565900829871 /* Products */;
146 | projectDirPath = "";
147 | projectRoot = "";
148 | targets = (
149 | 7555FF7A242A565900829871 /* iosApp */,
150 | );
151 | };
152 | /* End PBXProject section */
153 |
154 | /* Begin PBXResourcesBuildPhase section */
155 | 7555FF79242A565900829871 /* Resources */ = {
156 | isa = PBXResourcesBuildPhase;
157 | buildActionMask = 2147483647;
158 | files = (
159 | 058557D9273AAEEB004C7B11 /* Preview Assets.xcassets in Resources */,
160 | 058557BB273AAA24004C7B11 /* Assets.xcassets in Resources */,
161 | );
162 | runOnlyForDeploymentPostprocessing = 0;
163 | };
164 | /* End PBXResourcesBuildPhase section */
165 |
166 | /* Begin PBXShellScriptBuildPhase section */
167 | 068F018904405DF7A432931F /* [CP] Check Pods Manifest.lock */ = {
168 | isa = PBXShellScriptBuildPhase;
169 | buildActionMask = 2147483647;
170 | files = (
171 | );
172 | inputFileListPaths = (
173 | );
174 | inputPaths = (
175 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
176 | "${PODS_ROOT}/Manifest.lock",
177 | );
178 | name = "[CP] Check Pods Manifest.lock";
179 | outputFileListPaths = (
180 | );
181 | outputPaths = (
182 | "$(DERIVED_FILE_DIR)/Pods-iosApp-checkManifestLockResult.txt",
183 | );
184 | runOnlyForDeploymentPostprocessing = 0;
185 | shellPath = /bin/sh;
186 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
187 | showEnvVarsInLog = 0;
188 | };
189 | B0BC01ABF09F6526BF66617E /* [CP] Copy Pods Resources */ = {
190 | isa = PBXShellScriptBuildPhase;
191 | buildActionMask = 2147483647;
192 | files = (
193 | );
194 | inputFileListPaths = (
195 | "${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources-${CONFIGURATION}-input-files.xcfilelist",
196 | );
197 | name = "[CP] Copy Pods Resources";
198 | outputFileListPaths = (
199 | "${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources-${CONFIGURATION}-output-files.xcfilelist",
200 | );
201 | runOnlyForDeploymentPostprocessing = 0;
202 | shellPath = /bin/sh;
203 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources.sh\"\n";
204 | showEnvVarsInLog = 0;
205 | };
206 | /* End PBXShellScriptBuildPhase section */
207 |
208 | /* Begin PBXSourcesBuildPhase section */
209 | 7555FF77242A565900829871 /* Sources */ = {
210 | isa = PBXSourcesBuildPhase;
211 | buildActionMask = 2147483647;
212 | files = (
213 | B7F184DB2AAFA9D300FC16E9 /* ComposeView.swift in Sources */,
214 | 2152FB042600AC8F00CF470E /* iOSApp.swift in Sources */,
215 | 7555FF83242A565900829871 /* ContentView.swift in Sources */,
216 | );
217 | runOnlyForDeploymentPostprocessing = 0;
218 | };
219 | /* End PBXSourcesBuildPhase section */
220 |
221 | /* Begin XCBuildConfiguration section */
222 | 7555FFA3242A565B00829871 /* Debug */ = {
223 | isa = XCBuildConfiguration;
224 | buildSettings = {
225 | ALWAYS_SEARCH_USER_PATHS = NO;
226 | CLANG_ANALYZER_NONNULL = YES;
227 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
228 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
229 | CLANG_CXX_LIBRARY = "libc++";
230 | CLANG_ENABLE_MODULES = YES;
231 | CLANG_ENABLE_OBJC_ARC = YES;
232 | CLANG_ENABLE_OBJC_WEAK = YES;
233 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
234 | CLANG_WARN_BOOL_CONVERSION = YES;
235 | CLANG_WARN_COMMA = YES;
236 | CLANG_WARN_CONSTANT_CONVERSION = YES;
237 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
238 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
239 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
240 | CLANG_WARN_EMPTY_BODY = YES;
241 | CLANG_WARN_ENUM_CONVERSION = YES;
242 | CLANG_WARN_INFINITE_RECURSION = YES;
243 | CLANG_WARN_INT_CONVERSION = YES;
244 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
245 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
246 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
247 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
248 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
249 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
250 | CLANG_WARN_STRICT_PROTOTYPES = YES;
251 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
252 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
253 | CLANG_WARN_UNREACHABLE_CODE = YES;
254 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
255 | COPY_PHASE_STRIP = NO;
256 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
257 | ENABLE_STRICT_OBJC_MSGSEND = YES;
258 | ENABLE_TESTABILITY = YES;
259 | GCC_C_LANGUAGE_STANDARD = gnu11;
260 | GCC_DYNAMIC_NO_PIC = NO;
261 | GCC_NO_COMMON_BLOCKS = YES;
262 | GCC_OPTIMIZATION_LEVEL = 0;
263 | GCC_PREPROCESSOR_DEFINITIONS = (
264 | "DEBUG=1",
265 | "$(inherited)",
266 | );
267 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
268 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
269 | GCC_WARN_UNDECLARED_SELECTOR = YES;
270 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
271 | GCC_WARN_UNUSED_FUNCTION = YES;
272 | GCC_WARN_UNUSED_VARIABLE = YES;
273 | IPHONEOS_DEPLOYMENT_TARGET = 14.1;
274 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
275 | MTL_FAST_MATH = YES;
276 | ONLY_ACTIVE_ARCH = YES;
277 | SDKROOT = iphoneos;
278 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
279 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
280 | };
281 | name = Debug;
282 | };
283 | 7555FFA4242A565B00829871 /* Release */ = {
284 | isa = XCBuildConfiguration;
285 | buildSettings = {
286 | ALWAYS_SEARCH_USER_PATHS = NO;
287 | CLANG_ANALYZER_NONNULL = YES;
288 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
289 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
290 | CLANG_CXX_LIBRARY = "libc++";
291 | CLANG_ENABLE_MODULES = YES;
292 | CLANG_ENABLE_OBJC_ARC = YES;
293 | CLANG_ENABLE_OBJC_WEAK = YES;
294 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
295 | CLANG_WARN_BOOL_CONVERSION = YES;
296 | CLANG_WARN_COMMA = YES;
297 | CLANG_WARN_CONSTANT_CONVERSION = YES;
298 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
299 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
300 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
301 | CLANG_WARN_EMPTY_BODY = YES;
302 | CLANG_WARN_ENUM_CONVERSION = YES;
303 | CLANG_WARN_INFINITE_RECURSION = YES;
304 | CLANG_WARN_INT_CONVERSION = YES;
305 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
306 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
307 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
308 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
309 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
310 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
311 | CLANG_WARN_STRICT_PROTOTYPES = YES;
312 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
313 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
314 | CLANG_WARN_UNREACHABLE_CODE = YES;
315 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
316 | COPY_PHASE_STRIP = NO;
317 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
318 | ENABLE_NS_ASSERTIONS = NO;
319 | ENABLE_STRICT_OBJC_MSGSEND = YES;
320 | GCC_C_LANGUAGE_STANDARD = gnu11;
321 | GCC_NO_COMMON_BLOCKS = YES;
322 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
323 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
324 | GCC_WARN_UNDECLARED_SELECTOR = YES;
325 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
326 | GCC_WARN_UNUSED_FUNCTION = YES;
327 | GCC_WARN_UNUSED_VARIABLE = YES;
328 | IPHONEOS_DEPLOYMENT_TARGET = 14.1;
329 | MTL_ENABLE_DEBUG_INFO = NO;
330 | MTL_FAST_MATH = YES;
331 | SDKROOT = iphoneos;
332 | SWIFT_COMPILATION_MODE = wholemodule;
333 | SWIFT_OPTIMIZATION_LEVEL = "-O";
334 | VALIDATE_PRODUCT = YES;
335 | };
336 | name = Release;
337 | };
338 | 7555FFA6242A565B00829871 /* Debug */ = {
339 | isa = XCBuildConfiguration;
340 | baseConfigurationReference = 008D490509C1F0E3F2D47A23 /* Pods-iosApp.debug.xcconfig */;
341 | buildSettings = {
342 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
343 | CODE_SIGN_STYLE = Automatic;
344 | DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\"";
345 | ENABLE_PREVIEWS = YES;
346 | INFOPLIST_FILE = iosApp/Info.plist;
347 | LD_RUNPATH_SEARCH_PATHS = (
348 | "$(inherited)",
349 | "@executable_path/Frameworks",
350 | );
351 | PRODUCT_BUNDLE_IDENTIFIER = orgIdentifier.iosApp;
352 | PRODUCT_NAME = "$(TARGET_NAME)";
353 | SWIFT_VERSION = 5.0;
354 | TARGETED_DEVICE_FAMILY = "1,2";
355 | };
356 | name = Debug;
357 | };
358 | 7555FFA7242A565B00829871 /* Release */ = {
359 | isa = XCBuildConfiguration;
360 | baseConfigurationReference = 8FBDCABA4A19177E7526742C /* Pods-iosApp.release.xcconfig */;
361 | buildSettings = {
362 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
363 | CODE_SIGN_STYLE = Automatic;
364 | DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\"";
365 | ENABLE_PREVIEWS = YES;
366 | INFOPLIST_FILE = iosApp/Info.plist;
367 | LD_RUNPATH_SEARCH_PATHS = (
368 | "$(inherited)",
369 | "@executable_path/Frameworks",
370 | );
371 | PRODUCT_BUNDLE_IDENTIFIER = orgIdentifier.iosApp;
372 | PRODUCT_NAME = "$(TARGET_NAME)";
373 | SWIFT_VERSION = 5.0;
374 | TARGETED_DEVICE_FAMILY = "1,2";
375 | };
376 | name = Release;
377 | };
378 | /* End XCBuildConfiguration section */
379 |
380 | /* Begin XCConfigurationList section */
381 | 7555FF76242A565900829871 /* Build configuration list for PBXProject "iosApp" */ = {
382 | isa = XCConfigurationList;
383 | buildConfigurations = (
384 | 7555FFA3242A565B00829871 /* Debug */,
385 | 7555FFA4242A565B00829871 /* Release */,
386 | );
387 | defaultConfigurationIsVisible = 0;
388 | defaultConfigurationName = Release;
389 | };
390 | 7555FFA5242A565B00829871 /* Build configuration list for PBXNativeTarget "iosApp" */ = {
391 | isa = XCConfigurationList;
392 | buildConfigurations = (
393 | 7555FFA6242A565B00829871 /* Debug */,
394 | 7555FFA7242A565B00829871 /* Release */,
395 | );
396 | defaultConfigurationIsVisible = 0;
397 | defaultConfigurationName = Release;
398 | };
399 | /* End XCConfigurationList section */
400 | };
401 | rootObject = 7555FF73242A565900829871 /* Project object */;
402 | }
403 |
--------------------------------------------------------------------------------
/iosApp/iosApp.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/iosApp/iosApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/iosApp/iosApp/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
--------------------------------------------------------------------------------
/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "scale" : "2x",
6 | "size" : "20x20"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "scale" : "3x",
11 | "size" : "20x20"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "scale" : "2x",
16 | "size" : "29x29"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "scale" : "3x",
21 | "size" : "29x29"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "scale" : "2x",
26 | "size" : "40x40"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "scale" : "3x",
31 | "size" : "40x40"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "scale" : "2x",
36 | "size" : "60x60"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "scale" : "3x",
41 | "size" : "60x60"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "scale" : "1x",
46 | "size" : "20x20"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "scale" : "2x",
51 | "size" : "20x20"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "scale" : "1x",
56 | "size" : "29x29"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "scale" : "2x",
61 | "size" : "29x29"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "scale" : "1x",
66 | "size" : "40x40"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "scale" : "2x",
71 | "size" : "40x40"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "scale" : "1x",
76 | "size" : "76x76"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "scale" : "2x",
81 | "size" : "76x76"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "scale" : "2x",
86 | "size" : "83.5x83.5"
87 | },
88 | {
89 | "idiom" : "ios-marketing",
90 | "scale" : "1x",
91 | "size" : "1024x1024"
92 | }
93 | ],
94 | "info" : {
95 | "author" : "xcode",
96 | "version" : 1
97 | }
98 | }
--------------------------------------------------------------------------------
/iosApp/iosApp/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
--------------------------------------------------------------------------------
/iosApp/iosApp/ComposeView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ComposeView.swift
3 | // iosApp
4 | //
5 | // Created by Bilel Bouyahya on 10/7/2023.
6 | // Copyright © 2023 orgName. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import SwiftUI
11 | import shared
12 |
13 | struct ComposeView : UIViewControllerRepresentable {
14 |
15 | func updateUIViewController(_ uiViewController: UIViewControllerType, context: Context) {}
16 |
17 | func makeUIViewController(context: Context) -> some UIViewController {
18 | AppKt.MainViewController()
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/iosApp/iosApp/ContentView.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 | import shared
3 |
4 | struct ContentView: View {
5 |
6 | var body: some View {
7 | ComposeView()
8 | }
9 | }
10 |
11 | struct ContentView_Previews: PreviewProvider {
12 | static var previews: some View {
13 | ContentView()
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/iosApp/iosApp/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UIApplicationSceneManifest
24 |
25 | UIApplicationSupportsMultipleScenes
26 |
27 |
28 | UIRequiredDeviceCapabilities
29 |
30 | armv7
31 |
32 | UISupportedInterfaceOrientations
33 |
34 | UIInterfaceOrientationPortrait
35 | UIInterfaceOrientationLandscapeLeft
36 | UIInterfaceOrientationLandscapeRight
37 |
38 | UISupportedInterfaceOrientations~ipad
39 |
40 | UIInterfaceOrientationPortrait
41 | UIInterfaceOrientationPortraitUpsideDown
42 | UIInterfaceOrientationLandscapeLeft
43 | UIInterfaceOrientationLandscapeRight
44 |
45 | UILaunchScreen
46 |
47 |
48 |
--------------------------------------------------------------------------------
/iosApp/iosApp/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
--------------------------------------------------------------------------------
/iosApp/iosApp/iOSApp.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 | import shared
3 |
4 | @main
5 | struct iOSApp: App {
6 |
7 | init(){
8 | AppModuleKt.doInitKoin()
9 | }
10 |
11 | var body: some Scene {
12 | WindowGroup {
13 | ContentView()
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/settings.gradle.kts:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | repositories {
3 | google()
4 | gradlePluginPortal()
5 | mavenCentral()
6 | maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
7 | }
8 |
9 | plugins {
10 | val kotlinVersion = extra["kotlin.version"] as String
11 | val agpVersion = extra["agp.version"] as String
12 | val composeVersion = extra["compose.version"] as String
13 |
14 | kotlin("jvm").version(kotlinVersion)
15 | kotlin("multiplatform").version(kotlinVersion)
16 | kotlin("android").version(kotlinVersion)
17 |
18 | id("com.android.application").version(agpVersion)
19 | id("com.android.library").version(agpVersion)
20 |
21 | id("org.jetbrains.compose").version(composeVersion)
22 | }
23 |
24 | }
25 |
26 | dependencyResolutionManagement {
27 | repositories {
28 | google()
29 | mavenCentral()
30 | maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
31 | }
32 | }
33 |
34 | rootProject.name = "ChatMultiplatform"
35 | include(":androidApp")
36 | include(":shared")
--------------------------------------------------------------------------------
/shared/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | kotlin("native.cocoapods")
4 | id("com.android.library")
5 | id("org.jetbrains.compose")
6 | kotlin("plugin.serialization") version "1.4.21"
7 | }
8 |
9 | kotlin {
10 | android {
11 | compilations.all {
12 | kotlinOptions {
13 | jvmTarget = "1.8"
14 | }
15 | }
16 | }
17 | iosX64()
18 | iosArm64()
19 | iosSimulatorArm64()
20 |
21 | cocoapods {
22 | summary = "Some description for the Shared Module"
23 | homepage = "Link to the Shared Module homepage"
24 | version = "1.0"
25 | ios.deploymentTarget = "14.1"
26 | podfile = project.file("../iosApp/Podfile")
27 | framework {
28 | baseName = "shared"
29 | isStatic = true
30 | }
31 | }
32 |
33 | sourceSets {
34 | val commonMain by getting {
35 | dependencies {
36 | implementation(compose.runtime)
37 | implementation(compose.foundation)
38 | implementation(compose.material)
39 | @OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class)
40 | implementation(compose.components.resources)
41 | implementation("org.jetbrains.kotlinx:atomicfu:0.17.3")
42 | api("io.github.qdsfdhvh:image-loader:1.6.7")
43 | with(Ktor) {
44 | implementation(webSocketClient)
45 | implementation(clientCore)
46 | implementation(clientJson)
47 | implementation(clientLogging)
48 | implementation(clientSerialization)
49 | implementation(contentNegotiation)
50 | implementation(json)
51 | }
52 |
53 | with(Koin) {
54 | implementation(koin)
55 | }
56 | with(Kotlinx) {
57 | implementation(serializationCore)
58 | implementation(datetime)
59 | }
60 |
61 | with(Moko) {
62 | api(mokoMVVMCore)
63 | }
64 |
65 | with(Coroutines) {
66 | implementation(coroutines)
67 | }
68 | }
69 | }
70 | val commonTest by getting {
71 | dependencies {
72 | implementation(kotlin("test"))
73 | }
74 | }
75 | val androidMain by getting {
76 | dependencies {
77 | implementation(Ktor.clientAndroidOkhttp)
78 | implementation(Koin.koinAndroid)
79 | }
80 | }
81 |
82 | val androidUnitTest by getting
83 | val iosX64Main by getting
84 | val iosArm64Main by getting
85 | val iosSimulatorArm64Main by getting
86 | val iosMain by creating {
87 | dependencies {
88 | implementation(Ktor.clientIos)
89 | }
90 | dependsOn(commonMain)
91 | iosX64Main.dependsOn(this)
92 | iosArm64Main.dependsOn(this)
93 | iosSimulatorArm64Main.dependsOn(this)
94 | }
95 | val iosX64Test by getting
96 | val iosArm64Test by getting
97 | val iosSimulatorArm64Test by getting
98 | val iosTest by creating {
99 | dependsOn(commonTest)
100 | iosX64Test.dependsOn(this)
101 | iosArm64Test.dependsOn(this)
102 | iosSimulatorArm64Test.dependsOn(this)
103 | }
104 | }
105 | }
106 |
107 | android {
108 | namespace = "com.bouyahya.chatmultiplatform"
109 | compileSdk = 34
110 | defaultConfig {
111 | minSdk = 24
112 | }
113 | }
--------------------------------------------------------------------------------
/shared/shared.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |spec|
2 | spec.name = 'shared'
3 | spec.version = '1.0'
4 | spec.homepage = 'Link to the Shared Module homepage'
5 | spec.source = { :http=> ''}
6 | spec.authors = ''
7 | spec.license = ''
8 | spec.summary = 'Some description for the Shared Module'
9 | spec.vendored_frameworks = 'build/cocoapods/framework/shared.framework'
10 | spec.libraries = 'c++'
11 | spec.ios.deployment_target = '14.1'
12 |
13 |
14 | spec.pod_target_xcconfig = {
15 | 'KOTLIN_PROJECT_PATH' => ':shared',
16 | 'PRODUCT_MODULE_NAME' => 'shared',
17 | }
18 |
19 | spec.script_phases = [
20 | {
21 | :name => 'Build shared',
22 | :execution_position => :before_compile,
23 | :shell_path => '/bin/sh',
24 | :script => <<-SCRIPT
25 | if [ "YES" = "$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED" ]; then
26 | echo "Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \"YES\""
27 | exit 0
28 | fi
29 | set -ev
30 | REPO_ROOT="$PODS_TARGET_SRCROOT"
31 | "$REPO_ROOT/../gradlew" -p "$REPO_ROOT" $KOTLIN_PROJECT_PATH:syncFramework \
32 | -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME \
33 | -Pkotlin.native.cocoapods.archs="$ARCHS" \
34 | -Pkotlin.native.cocoapods.configuration="$CONFIGURATION"
35 | SCRIPT
36 | }
37 | ]
38 | spec.resources = ['build/compose/ios/shared/compose-resources']
39 | end
--------------------------------------------------------------------------------
/shared/src/androidMain/kotlin/com/bouyahya/chatmultiplatform/Platform.kt:
--------------------------------------------------------------------------------
1 | package com.bouyahya.chatmultiplatform
2 |
3 | class AndroidPlatform : Platform {
4 | override val name: String = "Android ${android.os.Build.VERSION.SDK_INT}"
5 | }
6 |
7 | actual fun getPlatform(): Platform = AndroidPlatform()
--------------------------------------------------------------------------------
/shared/src/androidMain/kotlin/com/bouyahya/chatmultiplatform/core/network/HttpClientFactory.kt:
--------------------------------------------------------------------------------
1 | package com.bouyahya.chatmultiplatform.core.network
2 |
3 | import io.ktor.client.*
4 | import io.ktor.client.engine.okhttp.*
5 |
6 | actual fun createPlatformHttpClient(): HttpClient {
7 | return HttpClient(OkHttp)
8 | }
--------------------------------------------------------------------------------
/shared/src/androidMain/kotlin/com/bouyahya/chatmultiplatform/di/PlatformModule.kt:
--------------------------------------------------------------------------------
1 | package com.bouyahya.chatmultiplatform.di
2 |
3 | import com.bouyahya.chatmultiplatform.data.ChatMultiplatformRepositoryImpl
4 | import com.bouyahya.chatmultiplatform.domain.repositories.ChatMultiplatformRepository
5 | import com.bouyahya.chatmultiplatform.domain.usecases.ChatMultiplatformUseCase
6 | import com.bouyahya.chatmultiplatform.presentation.ChatMultiplatformViewModel
7 | import io.ktor.client.engine.okhttp.*
8 | import org.koin.dsl.module
9 |
10 | actual fun platformModule() = module {
11 |
12 | single {
13 | OkHttp.create()
14 | }
15 |
16 | single {
17 | ChatMultiplatformRepositoryImpl(
18 | httpClient = get()
19 | )
20 | }
21 |
22 | single {
23 | ChatMultiplatformUseCase(chatMultiplatformRepository = get())
24 | }
25 |
26 | single {
27 | ChatMultiplatformViewModel(
28 | chatMultiplatformUseCase = get()
29 | )
30 | }
31 | }
--------------------------------------------------------------------------------
/shared/src/commonMain/kotlin/com/bouyahya/chatmultiplatform/Greeting.kt:
--------------------------------------------------------------------------------
1 | package com.bouyahya.chatmultiplatform
2 |
3 | class Greeting {
4 | private val platform: Platform = getPlatform()
5 |
6 | fun greet(): String {
7 | return "Hello, ${platform.name}!"
8 | }
9 | }
--------------------------------------------------------------------------------
/shared/src/commonMain/kotlin/com/bouyahya/chatmultiplatform/Platform.kt:
--------------------------------------------------------------------------------
1 | package com.bouyahya.chatmultiplatform
2 |
3 | interface Platform {
4 | val name: String
5 | }
6 |
7 | expect fun getPlatform(): Platform
--------------------------------------------------------------------------------
/shared/src/commonMain/kotlin/com/bouyahya/chatmultiplatform/core/Constants.kt:
--------------------------------------------------------------------------------
1 | package com.bouyahya.chatmultiplatform.core
2 |
3 | object Constants {
4 | val Images = listOf(
5 | "https://images.unsplash.com/photo-1545418776-a37fba72a75d?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8NXx8cGVyc29uc3xlbnwwfHwwfHx8MA%3D%3D&auto=format&fit=crop&w=800&q=60",
6 | "https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2970&q=80",
7 | "https://images.unsplash.com/flagged/photo-1570612861542-284f4c12e75f?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2970&q=80",
8 | "https://images.unsplash.com/photo-1552058544-f2b08422138a?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=3099&q=80"
9 | )
10 |
11 | fun String.toFormattedUrlNav(): String {
12 | return this.replace(
13 | ":",
14 | "%3A"
15 | ).replace("/", "%2F")
16 | }
17 | }
--------------------------------------------------------------------------------
/shared/src/commonMain/kotlin/com/bouyahya/chatmultiplatform/core/network/HttpClient.kt:
--------------------------------------------------------------------------------
1 | package com.bouyahya.chatmultiplatform.core.network
2 |
3 | import io.ktor.client.*
4 | import io.ktor.client.plugins.contentnegotiation.*
5 | import io.ktor.client.plugins.logging.*
6 | import io.ktor.client.plugins.websocket.*
7 | import io.ktor.serialization.kotlinx.json.*
8 |
9 | internal fun createHttpClient(enableLogging: Boolean): HttpClient {
10 | return createPlatformHttpClient().config {
11 | install(ContentNegotiation) {
12 | json()
13 | }
14 |
15 | install(WebSockets)
16 |
17 | install(Logging) {
18 | logger = Logger.DEFAULT
19 | level = LogLevel.ALL
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/shared/src/commonMain/kotlin/com/bouyahya/chatmultiplatform/core/network/HttpClientFactory.kt:
--------------------------------------------------------------------------------
1 | package com.bouyahya.chatmultiplatform.core.network
2 |
3 | import io.ktor.client.HttpClient
4 |
5 | expect fun createPlatformHttpClient(): HttpClient
--------------------------------------------------------------------------------
/shared/src/commonMain/kotlin/com/bouyahya/chatmultiplatform/core/utils/Resource.kt:
--------------------------------------------------------------------------------
1 | package com.bouyahya.chatmultiplatform.core.utils
2 |
3 | sealed class Resource(val data: T? = null, val message: String? = null) {
4 | class Success(data: T) : Resource(data)
5 | class Error(message: String, data: T? = null) : Resource(data, message)
6 | class Loading(data: T? = null) : Resource(data)
7 | }
--------------------------------------------------------------------------------
/shared/src/commonMain/kotlin/com/bouyahya/chatmultiplatform/data/ChatMultiplatformRepositoryImpl.kt:
--------------------------------------------------------------------------------
1 | package com.bouyahya.chatmultiplatform.data
2 |
3 | import com.bouyahya.chatmultiplatform.domain.models.MessageData
4 | import com.bouyahya.chatmultiplatform.domain.repositories.ChatMultiplatformRepository
5 | import io.ktor.client.*
6 | import io.ktor.client.plugins.websocket.*
7 | import io.ktor.http.*
8 | import io.ktor.websocket.*
9 | import kotlinx.serialization.encodeToString
10 | import kotlinx.serialization.json.Json
11 |
12 | class ChatMultiplatformRepositoryImpl(
13 | private val httpClient: HttpClient,
14 | ) : ChatMultiplatformRepository {
15 | override suspend fun connect(
16 | username: String,
17 | userId: Long,
18 | profileImage: String,
19 | ): WebSocketSession {
20 | println("ChatMultiplatformIsHere")
21 | return httpClient.webSocketSession(
22 | method = HttpMethod.Get,
23 | host = "",
24 | port = 8080,
25 | path = "/chat/${userId}/${username}/${profileImage}"
26 | )
27 | }
28 |
29 | override suspend fun send(session: WebSocketSession, messageData: MessageData) {
30 | session.send(Json.encodeToString(messageData))
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/shared/src/commonMain/kotlin/com/bouyahya/chatmultiplatform/di/AppModule.kt:
--------------------------------------------------------------------------------
1 | package com.bouyahya.chatmultiplatform.di
2 |
3 | import org.koin.core.context.startKoin
4 | import org.koin.dsl.KoinAppDeclaration
5 |
6 | fun initKoin(enableNetworkLogs: Boolean = false, appDeclaration: KoinAppDeclaration = {}) =
7 | startKoin {
8 | appDeclaration()
9 | modules(
10 | networkModule(enableNetworkLogs),
11 | platformModule()
12 | )
13 | }
14 |
15 |
16 | //Called by iOS
17 | fun initKoin() = initKoin(enableNetworkLogs = true) {}
--------------------------------------------------------------------------------
/shared/src/commonMain/kotlin/com/bouyahya/chatmultiplatform/di/NetworkModule.kt:
--------------------------------------------------------------------------------
1 | package com.bouyahya.chatmultiplatform.di
2 |
3 | import com.bouyahya.chatmultiplatform.core.network.createHttpClient
4 | import org.koin.core.module.Module
5 | import org.koin.dsl.module
6 |
7 | val networkModule: (enableLogging: Boolean) -> Module
8 | get() = { enableLogging ->
9 | module {
10 | single { createHttpClient(enableLogging) }
11 | }
12 | }
--------------------------------------------------------------------------------
/shared/src/commonMain/kotlin/com/bouyahya/chatmultiplatform/di/PlatformModule.kt:
--------------------------------------------------------------------------------
1 | package com.bouyahya.chatmultiplatform.di
2 |
3 | import org.koin.core.module.Module
4 |
5 | expect fun platformModule(): Module
6 |
--------------------------------------------------------------------------------
/shared/src/commonMain/kotlin/com/bouyahya/chatmultiplatform/domain/models/MessageData.kt:
--------------------------------------------------------------------------------
1 | package com.bouyahya.chatmultiplatform.domain.models
2 |
3 | import kotlinx.serialization.Serializable
4 |
5 | @Serializable
6 | data class MessageData(
7 | val id: Long,
8 | val message: String,
9 | val senderId: Long,
10 | )
--------------------------------------------------------------------------------
/shared/src/commonMain/kotlin/com/bouyahya/chatmultiplatform/domain/models/User.kt:
--------------------------------------------------------------------------------
1 | package com.bouyahya.chatmultiplatform.domain.models
2 |
3 | import kotlinx.serialization.Serializable
4 |
5 | @Serializable
6 | data class User(
7 | val id: Long,
8 | val username: String,
9 | val profileImage: String,
10 | )
--------------------------------------------------------------------------------
/shared/src/commonMain/kotlin/com/bouyahya/chatmultiplatform/domain/repositories/ChatMultiplatformRepository.kt:
--------------------------------------------------------------------------------
1 | package com.bouyahya.chatmultiplatform.domain.repositories
2 |
3 | import com.bouyahya.chatmultiplatform.domain.models.MessageData
4 | import com.bouyahya.chatmultiplatform.domain.models.User
5 | import io.ktor.websocket.*
6 |
7 | interface ChatMultiplatformRepository {
8 | suspend fun connect(username: String, userId: Long, profileImage: String): WebSocketSession
9 |
10 | suspend fun send(session: WebSocketSession, messageData: MessageData)
11 | }
--------------------------------------------------------------------------------
/shared/src/commonMain/kotlin/com/bouyahya/chatmultiplatform/domain/usecases/ChatMultiplatformUseCase.kt:
--------------------------------------------------------------------------------
1 | package com.bouyahya.chatmultiplatform.domain.usecases
2 |
3 | import com.bouyahya.chatmultiplatform.core.utils.Resource
4 | import com.bouyahya.chatmultiplatform.domain.models.MessageData
5 | import com.bouyahya.chatmultiplatform.domain.repositories.ChatMultiplatformRepository
6 | import io.ktor.websocket.*
7 | import kotlinx.coroutines.flow.Flow
8 | import kotlinx.coroutines.flow.flow
9 |
10 | class ChatMultiplatformUseCase(
11 | private val chatMultiplatformRepository: ChatMultiplatformRepository,
12 | ) {
13 | suspend operator fun invoke(
14 | username: String,
15 | userId: Long,
16 | profilePicture: String,
17 | ): Flow> = flow {
18 | try {
19 | emit(Resource.Loading())
20 | val webSocketSession =
21 | chatMultiplatformRepository.connect(username, userId, profilePicture)
22 | emit(Resource.Success(webSocketSession))
23 | } catch (e: Exception) {
24 | emit(Resource.Error(e.message ?: "An unexpected error occur"))
25 | }
26 | }
27 |
28 | suspend operator fun invoke(session: WebSocketSession, messageData: MessageData) {
29 | chatMultiplatformRepository.send(session, messageData)
30 | }
31 | }
--------------------------------------------------------------------------------
/shared/src/commonMain/kotlin/com/bouyahya/chatmultiplatform/presentation/ChatMultiplatformEvent.kt:
--------------------------------------------------------------------------------
1 | package com.bouyahya.chatmultiplatform.presentation
2 |
3 | sealed class ChatMultiplatformEvent {
4 | data class OnChangeUserName(val username: String) : ChatMultiplatformEvent()
5 | data class OnChangeMessageText(val text: String) : ChatMultiplatformEvent()
6 | data class Connect(val name: String) : ChatMultiplatformEvent()
7 | data class SendMessage(val messageText: String) : ChatMultiplatformEvent()
8 | }
--------------------------------------------------------------------------------
/shared/src/commonMain/kotlin/com/bouyahya/chatmultiplatform/presentation/ChatMultiplatformScreen.kt:
--------------------------------------------------------------------------------
1 | package com.bouyahya.chatmultiplatform.presentation
2 |
3 | import androidx.compose.runtime.Composable
4 | import androidx.compose.runtime.collectAsState
5 | import androidx.compose.runtime.getValue
6 | import com.bouyahya.chatmultiplatform.presentation.components.ChatComponent
7 | import com.bouyahya.chatmultiplatform.presentation.components.ConnectComponent
8 |
9 | @Composable
10 | fun ChatMultiplatformScreen(
11 | chatMultiplatformViewModel: ChatMultiplatformViewModel,
12 | ) {
13 | val state by chatMultiplatformViewModel.state.collectAsState()
14 |
15 | if (state.currentUser != null) {
16 | ChatComponent(
17 | state = state,
18 | chatMultiplatformViewModel = chatMultiplatformViewModel
19 | )
20 | } else {
21 | ConnectComponent(
22 | state = state,
23 | chatMultiplatformViewModel = chatMultiplatformViewModel
24 | )
25 | }
26 | }
--------------------------------------------------------------------------------
/shared/src/commonMain/kotlin/com/bouyahya/chatmultiplatform/presentation/ChatMultiplatformState.kt:
--------------------------------------------------------------------------------
1 | package com.bouyahya.chatmultiplatform.presentation
2 |
3 | import com.bouyahya.chatmultiplatform.domain.models.MessageData
4 | import com.bouyahya.chatmultiplatform.domain.models.User
5 | import io.ktor.websocket.*
6 |
7 | data class ChatMultiplatformState(
8 | val usernameText: String = "",
9 | val messageText: String = "",
10 | val currentUser: User? = null,
11 | val connectedUsers: List = emptyList(),
12 | val session: WebSocketSession? = null,
13 | val messages: List = emptyList(),
14 | )
--------------------------------------------------------------------------------
/shared/src/commonMain/kotlin/com/bouyahya/chatmultiplatform/presentation/ChatMultiplatformViewModel.kt:
--------------------------------------------------------------------------------
1 | package com.bouyahya.chatmultiplatform.presentation
2 |
3 | import com.bouyahya.chatmultiplatform.core.Constants.Images
4 | import com.bouyahya.chatmultiplatform.core.Constants.toFormattedUrlNav
5 | import com.bouyahya.chatmultiplatform.core.utils.Resource
6 | import com.bouyahya.chatmultiplatform.domain.models.MessageData
7 | import com.bouyahya.chatmultiplatform.domain.models.User
8 | import com.bouyahya.chatmultiplatform.domain.usecases.ChatMultiplatformUseCase
9 | import dev.icerock.moko.mvvm.viewmodel.ViewModel
10 | import io.ktor.websocket.*
11 | import kotlinx.coroutines.flow.MutableStateFlow
12 | import kotlinx.coroutines.flow.asStateFlow
13 | import kotlinx.coroutines.flow.update
14 | import kotlinx.coroutines.launch
15 | import kotlinx.serialization.decodeFromString
16 | import kotlinx.serialization.json.Json
17 | import kotlin.math.abs
18 |
19 | class ChatMultiplatformViewModel(
20 | private val chatMultiplatformUseCase: ChatMultiplatformUseCase,
21 | ) : ViewModel() {
22 | private val _state = MutableStateFlow(ChatMultiplatformState())
23 | var state = _state.asStateFlow()
24 | fun onEvent(event: ChatMultiplatformEvent) {
25 | when (event) {
26 |
27 | is ChatMultiplatformEvent.OnChangeUserName -> {
28 | _state.update {
29 | it.copy(usernameText = event.username)
30 | }
31 | }
32 |
33 | is ChatMultiplatformEvent.OnChangeMessageText -> {
34 | _state.update {
35 | it.copy(messageText = event.text)
36 | }
37 | }
38 |
39 | is ChatMultiplatformEvent.Connect -> {
40 | connect()
41 | }
42 |
43 | is ChatMultiplatformEvent.SendMessage -> {
44 | viewModelScope.launch {
45 | val messageData = MessageData(
46 | id = abs((0..999999999999).random()),
47 | message = event.messageText,
48 | senderId = _state.value.currentUser!!.id
49 | )
50 | chatMultiplatformUseCase.invoke(_state.value.session!!, messageData)
51 | }
52 | }
53 | }
54 | }
55 |
56 | private fun connect() {
57 | viewModelScope.launch {
58 | val username = _state.value.usernameText
59 | val userId = abs((0..999999999999).random())
60 | val image = Images.random()
61 | chatMultiplatformUseCase.invoke(
62 | username = username,
63 | userId = userId,
64 | profilePicture = image.toFormattedUrlNav()
65 | ).collect { result ->
66 | when (result) {
67 | is Resource.Success -> {
68 | println("Connection Success")
69 | val currentUser = User(
70 | id = userId,
71 | username = username,
72 | profileImage = image
73 | )
74 | _state.update {
75 | it.copy(
76 | currentUser = currentUser,
77 | session = result.data,
78 | )
79 | }
80 | receiveMessages()
81 | }
82 |
83 | is Resource.Error -> {
84 | println("Connection Error : ${result.message}")
85 | }
86 |
87 | is Resource.Loading -> {
88 | println("Connection Loading")
89 | }
90 | }
91 | }
92 | }
93 | }
94 |
95 | private fun receiveMessages() {
96 | viewModelScope.launch {
97 | while (true) {
98 | val frame = _state.value.session?.incoming?.receive()
99 | if (frame is Frame.Text) {
100 | val data = frame.readText()
101 | println(data)
102 | if (data != "You are connected!") {
103 | if (data[0] == '[') {
104 | val users = Json.decodeFromString>(data)
105 | _state.update {
106 | it.copy(connectedUsers = users)
107 | }
108 | println(_state.value.connectedUsers)
109 | } else {
110 | val messageData = Json.decodeFromString(data)
111 | _state.update {
112 | it.copy(
113 | messages = _state.value.messages.plus(messageData),
114 | messageText = ""
115 | )
116 | }
117 | }
118 | }
119 | }
120 | }
121 | }
122 | }
123 | }
--------------------------------------------------------------------------------
/shared/src/commonMain/kotlin/com/bouyahya/chatmultiplatform/presentation/components/AppBarComponent.kt:
--------------------------------------------------------------------------------
1 | package com.bouyahya.chatmultiplatform.presentation.components
2 |
3 | import androidx.compose.foundation.layout.Box
4 | import androidx.compose.foundation.layout.fillMaxWidth
5 | import androidx.compose.material.Icon
6 | import androidx.compose.material.IconButton
7 | import androidx.compose.material.MaterialTheme
8 | import androidx.compose.material.Text
9 | import androidx.compose.material.icons.Icons
10 | import androidx.compose.material.icons.filled.Add
11 | import androidx.compose.material.icons.filled.ArrowBack
12 | import androidx.compose.material.icons.filled.Close
13 | import androidx.compose.runtime.Composable
14 | import androidx.compose.ui.Alignment
15 | import androidx.compose.ui.Modifier
16 | import androidx.compose.ui.graphics.Color
17 | import androidx.compose.ui.unit.sp
18 | import com.bouyahya.chatmultiplatform.domain.models.User
19 |
20 | @Composable
21 | fun AppBarComponent(
22 | participantsVisibility: Boolean,
23 | connectedUsers: List,
24 | onTrailingIconClick: () -> Unit,
25 | ) {
26 | Box(modifier = Modifier.fillMaxWidth()) {
27 | IconButton(
28 | modifier = Modifier.align(Alignment.CenterStart),
29 | onClick = {}
30 | ) {
31 | Icon(
32 | imageVector = Icons.Default.ArrowBack,
33 | contentDescription = "Back"
34 | )
35 | }
36 | Text(
37 | modifier = Modifier.align(Alignment.Center),
38 | text = "ChatMultiplatform",
39 | style = MaterialTheme.typography.subtitle1.copy(
40 | fontSize = 20.sp,
41 | color = Color.Black
42 | )
43 | )
44 | if (connectedUsers.isNotEmpty())
45 | IconButton(
46 | modifier = Modifier.align(Alignment.CenterEnd),
47 | onClick = {
48 | onTrailingIconClick()
49 | }
50 | ) {
51 | Icon(
52 | imageVector = if (participantsVisibility) Icons.Default.Close else Icons.Default.Add,
53 | contentDescription = "Participants Visibility"
54 | )
55 | }
56 | }
57 | }
--------------------------------------------------------------------------------
/shared/src/commonMain/kotlin/com/bouyahya/chatmultiplatform/presentation/components/ChatComponent.kt:
--------------------------------------------------------------------------------
1 | package com.bouyahya.chatmultiplatform.presentation.components
2 |
3 | import androidx.compose.foundation.*
4 | import androidx.compose.foundation.layout.*
5 | import androidx.compose.runtime.*
6 | import androidx.compose.ui.Alignment
7 | import androidx.compose.ui.Modifier
8 | import androidx.compose.ui.unit.dp
9 | import com.bouyahya.chatmultiplatform.presentation.ChatMultiplatformEvent
10 | import com.bouyahya.chatmultiplatform.presentation.ChatMultiplatformState
11 | import com.bouyahya.chatmultiplatform.presentation.ChatMultiplatformViewModel
12 |
13 | @Composable
14 | fun ChatComponent(
15 | state: ChatMultiplatformState,
16 | chatMultiplatformViewModel: ChatMultiplatformViewModel,
17 | ) {
18 |
19 | val scrollState = rememberScrollState()
20 | var participantsVisibility by remember {
21 | mutableStateOf(true)
22 | }
23 |
24 | Column(
25 | modifier = Modifier
26 | .fillMaxSize(),
27 | verticalArrangement = Arrangement.Bottom,
28 | horizontalAlignment = Alignment.CenterHorizontally
29 | ) {
30 | AppBarComponent(
31 | participantsVisibility,
32 | state.connectedUsers,
33 | onTrailingIconClick = {
34 | participantsVisibility = !participantsVisibility
35 | }
36 | )
37 |
38 | Spacer(modifier = Modifier.size(10.dp))
39 |
40 | ConnectedUsersComponent(participantsVisibility, state.connectedUsers)
41 |
42 | Box(
43 | modifier = Modifier
44 | .weight(10F)
45 | .fillMaxWidth()
46 | ) {
47 | Column(
48 | modifier = Modifier
49 | .padding(10.dp)
50 | .verticalScroll(
51 | state = scrollState,
52 | reverseScrolling = true
53 | )
54 | .align(Alignment.BottomCenter),
55 | ) {
56 | for (message in state.messages) {
57 | Box(modifier = Modifier.fillMaxWidth()) {
58 | Row(
59 | modifier = Modifier
60 | .align(
61 | if (message.senderId == state.currentUser!!.id)
62 | Alignment.CenterEnd else
63 | Alignment.CenterStart
64 | ),
65 | ) {
66 | if (message.senderId == state.currentUser.id) {
67 | SenderComponent(
68 | message = message,
69 | state = state
70 | )
71 | } else {
72 | ReceiverComponent(
73 | message = message,
74 | state = state
75 | )
76 | }
77 | }
78 | }
79 | Spacer(modifier = Modifier.size(20.dp))
80 | }
81 | }
82 | }
83 |
84 | CustomTextField(
85 | modifier = Modifier.weight(1.3F),
86 | state = state,
87 | onValueChange = {
88 | chatMultiplatformViewModel.onEvent(ChatMultiplatformEvent.OnChangeMessageText(it))
89 | },
90 | onTrailingIconClick = {
91 | if (state.messageText.isNotEmpty()) {
92 | chatMultiplatformViewModel.onEvent(
93 | ChatMultiplatformEvent.SendMessage(
94 | state.messageText
95 | )
96 | )
97 | }
98 | }
99 | )
100 | }
101 | }
--------------------------------------------------------------------------------
/shared/src/commonMain/kotlin/com/bouyahya/chatmultiplatform/presentation/components/ConnectComponent.kt:
--------------------------------------------------------------------------------
1 | package com.bouyahya.chatmultiplatform.presentation.components
2 |
3 | import androidx.compose.foundation.layout.Arrangement
4 | import androidx.compose.foundation.layout.Box
5 | import androidx.compose.foundation.layout.Column
6 | import androidx.compose.foundation.layout.fillMaxSize
7 | import androidx.compose.material.Button
8 | import androidx.compose.material.Text
9 | import androidx.compose.material.TextField
10 | import androidx.compose.runtime.Composable
11 | import androidx.compose.ui.Alignment
12 | import androidx.compose.ui.Modifier
13 | import androidx.compose.ui.text.style.TextAlign
14 | import androidx.compose.ui.unit.dp
15 | import com.bouyahya.chatmultiplatform.presentation.ChatMultiplatformEvent
16 | import com.bouyahya.chatmultiplatform.presentation.ChatMultiplatformState
17 | import com.bouyahya.chatmultiplatform.presentation.ChatMultiplatformViewModel
18 |
19 | @Composable
20 | fun ConnectComponent(
21 | state: ChatMultiplatformState,
22 | chatMultiplatformViewModel: ChatMultiplatformViewModel,
23 | ) {
24 | Box(modifier = Modifier.fillMaxSize()) {
25 | Column(
26 | modifier = Modifier.align(Alignment.Center),
27 | verticalArrangement = Arrangement.spacedBy(20.dp),
28 | horizontalAlignment = Alignment.CenterHorizontally
29 | ) {
30 | TextField(
31 | value = state.usernameText,
32 | onValueChange = {
33 | chatMultiplatformViewModel.onEvent(
34 | ChatMultiplatformEvent.OnChangeUserName(
35 | it
36 | )
37 | )
38 | }
39 | )
40 |
41 | Button(
42 | enabled = state.usernameText.isNotBlank(),
43 | onClick = {
44 | chatMultiplatformViewModel.onEvent(ChatMultiplatformEvent.Connect(state.usernameText))
45 | }
46 | ) {
47 | Text(
48 | text = "Connect",
49 | textAlign = TextAlign.Center
50 | )
51 | }
52 | }
53 | }
54 | }
--------------------------------------------------------------------------------
/shared/src/commonMain/kotlin/com/bouyahya/chatmultiplatform/presentation/components/ConnectedUsersComponent.kt:
--------------------------------------------------------------------------------
1 | package com.bouyahya.chatmultiplatform.presentation.components
2 |
3 | import androidx.compose.animation.AnimatedVisibility
4 | import androidx.compose.foundation.Image
5 | import androidx.compose.foundation.background
6 | import androidx.compose.foundation.layout.*
7 | import androidx.compose.foundation.lazy.LazyRow
8 | import androidx.compose.foundation.lazy.items
9 | import androidx.compose.foundation.shape.CircleShape
10 | import androidx.compose.material.MaterialTheme
11 | import androidx.compose.material.Text
12 | import androidx.compose.runtime.Composable
13 | import androidx.compose.ui.Alignment
14 | import androidx.compose.ui.Modifier
15 | import androidx.compose.ui.draw.clip
16 | import androidx.compose.ui.graphics.Color
17 | import androidx.compose.ui.layout.ContentScale
18 | import androidx.compose.ui.unit.dp
19 | import androidx.compose.ui.unit.sp
20 | import com.bouyahya.chatmultiplatform.domain.models.User
21 | import com.seiko.imageloader.rememberImagePainter
22 |
23 | @Composable
24 | fun ConnectedUsersComponent(
25 | participantsVisibility: Boolean,
26 | connectedUsers: List,
27 | ) {
28 | AnimatedVisibility(
29 | visible = participantsVisibility,
30 | ) {
31 | LazyRow(
32 | modifier = Modifier
33 | .fillMaxWidth()
34 | .padding(10.dp),
35 | horizontalArrangement = Arrangement.spacedBy(35.dp),
36 | verticalAlignment = Alignment.CenterVertically
37 | ) {
38 | items(connectedUsers) { participant ->
39 | Column(
40 | modifier = Modifier.fillMaxWidth(),
41 | verticalArrangement = Arrangement.spacedBy(6.dp),
42 | horizontalAlignment = Alignment.CenterHorizontally
43 | ) {
44 | Box(modifier = Modifier.fillMaxWidth()) {
45 | Image(
46 | modifier = Modifier.size(50.dp).clip(CircleShape),
47 | painter = rememberImagePainter(participant.profileImage),
48 | contentDescription = "",
49 | contentScale = ContentScale.Crop
50 | )
51 | Box(
52 | modifier = Modifier
53 | .size(10.dp)
54 | .clip(CircleShape)
55 | .background(color = Color.Green)
56 | .align(Alignment.BottomEnd)
57 | )
58 | }
59 | Text(
60 | modifier = Modifier.fillMaxWidth(),
61 | text = participant.username,
62 | style = MaterialTheme.typography.subtitle1.copy(
63 | fontSize = 12.sp,
64 | color = Color.Black
65 | )
66 | )
67 | }
68 | }
69 | }
70 | }
71 | }
--------------------------------------------------------------------------------
/shared/src/commonMain/kotlin/com/bouyahya/chatmultiplatform/presentation/components/CustomTextField.kt:
--------------------------------------------------------------------------------
1 | package com.bouyahya.chatmultiplatform.presentation.components
2 |
3 | import androidx.compose.foundation.BorderStroke
4 | import androidx.compose.foundation.border
5 | import androidx.compose.foundation.layout.fillMaxWidth
6 | import androidx.compose.foundation.layout.padding
7 | import androidx.compose.foundation.shape.RoundedCornerShape
8 | import androidx.compose.material.*
9 | import androidx.compose.material.icons.Icons
10 | import androidx.compose.material.icons.filled.Send
11 | import androidx.compose.runtime.Composable
12 | import androidx.compose.ui.Modifier
13 | import androidx.compose.ui.graphics.Brush
14 | import androidx.compose.ui.graphics.Color
15 | import androidx.compose.ui.text.input.VisualTransformation
16 | import androidx.compose.ui.unit.dp
17 | import com.bouyahya.chatmultiplatform.presentation.ChatMultiplatformState
18 |
19 | @Composable
20 | fun CustomTextField(
21 | modifier: Modifier,
22 | state: ChatMultiplatformState,
23 | onValueChange: (String) -> Unit,
24 | onTrailingIconClick: () -> Unit,
25 | ) {
26 | TextField(
27 | modifier = modifier.fillMaxWidth()
28 | .border(
29 | border = BorderStroke(
30 | 0.dp,
31 | Brush.horizontalGradient(
32 | colors = listOf(
33 | Color(0xFF7ea1ad),
34 | Color(0xFF151517),
35 | ),
36 | )
37 | ),
38 | shape = RoundedCornerShape(10.dp)
39 | ).padding(10.dp),
40 | value = state.messageText,
41 | onValueChange = {
42 | onValueChange(it)
43 | },
44 | colors = TextFieldDefaults.textFieldColors(
45 | backgroundColor = Color.White,
46 | cursorColor = Color.Black,
47 | disabledLabelColor = Color.LightGray,
48 | focusedIndicatorColor = Color.Transparent,
49 | unfocusedIndicatorColor = Color.Transparent
50 | ),
51 | shape = RoundedCornerShape(10.dp),
52 | singleLine = true,
53 | placeholder = {
54 | Text(text = "Type a message...")
55 | },
56 | visualTransformation = VisualTransformation.None,
57 | trailingIcon = {
58 | IconButton(
59 | onClick = {
60 | onTrailingIconClick()
61 | }) {
62 | Icon(
63 | imageVector = Icons.Default.Send,
64 | contentDescription = "Send Message"
65 | )
66 | }
67 | }
68 | )
69 | }
--------------------------------------------------------------------------------
/shared/src/commonMain/kotlin/com/bouyahya/chatmultiplatform/presentation/components/ReceiverComponent.kt:
--------------------------------------------------------------------------------
1 | package com.bouyahya.chatmultiplatform.presentation.components
2 |
3 | import androidx.compose.foundation.Image
4 | import androidx.compose.foundation.background
5 | import androidx.compose.foundation.layout.Spacer
6 | import androidx.compose.foundation.layout.padding
7 | import androidx.compose.foundation.layout.size
8 | import androidx.compose.foundation.shape.CircleShape
9 | import androidx.compose.foundation.shape.RoundedCornerShape
10 | import androidx.compose.material.Text
11 | import androidx.compose.material.icons.Icons
12 | import androidx.compose.material.icons.filled.Person
13 | import androidx.compose.runtime.Composable
14 | import androidx.compose.ui.Modifier
15 | import androidx.compose.ui.draw.clip
16 | import androidx.compose.ui.graphics.Color
17 | import androidx.compose.ui.layout.ContentScale
18 | import androidx.compose.ui.unit.dp
19 | import com.bouyahya.chatmultiplatform.domain.models.MessageData
20 | import com.bouyahya.chatmultiplatform.presentation.ChatMultiplatformState
21 | import com.seiko.imageloader.rememberImagePainter
22 |
23 | @Composable
24 | fun ReceiverComponent(
25 | message: MessageData,
26 | state: ChatMultiplatformState,
27 | ) {
28 |
29 | if (state.connectedUsers.map { it.id }.contains(message.senderId)) {
30 | Image(
31 | modifier = Modifier.size(50.dp).clip(CircleShape),
32 | painter = rememberImagePainter(state.connectedUsers.first { it.id == message.senderId }.profileImage),
33 | contentDescription = "profileImage",
34 | contentScale = ContentScale.Crop
35 | )
36 | } else {
37 | Image(
38 | modifier = Modifier.size(50.dp),
39 | imageVector = Icons.Default.Person,
40 | contentDescription = "profileImage",
41 | )
42 | }
43 |
44 |
45 | Spacer(modifier = Modifier.size(10.dp))
46 |
47 | Text(
48 | modifier = Modifier
49 | .background(
50 | color = if (message.senderId == state.currentUser!!.id)
51 | Color.Blue.copy(
52 | alpha = 0.5f
53 | ) else
54 | Color.White,
55 | shape = RoundedCornerShape(20.dp)
56 | )
57 | .padding(10.dp),
58 | text = message.message,
59 | color = if (message.senderId == state.currentUser.id)
60 | Color.White else
61 | Color.Black
62 | )
63 | }
--------------------------------------------------------------------------------
/shared/src/commonMain/kotlin/com/bouyahya/chatmultiplatform/presentation/components/SenderComponent.kt:
--------------------------------------------------------------------------------
1 | package com.bouyahya.chatmultiplatform.presentation.components
2 |
3 | import androidx.compose.foundation.Image
4 | import androidx.compose.foundation.background
5 | import androidx.compose.foundation.layout.Spacer
6 | import androidx.compose.foundation.layout.padding
7 | import androidx.compose.foundation.layout.size
8 | import androidx.compose.foundation.shape.CircleShape
9 | import androidx.compose.foundation.shape.RoundedCornerShape
10 | import androidx.compose.material.Text
11 | import androidx.compose.runtime.Composable
12 | import androidx.compose.ui.Modifier
13 | import androidx.compose.ui.draw.clip
14 | import androidx.compose.ui.graphics.Color
15 | import androidx.compose.ui.layout.ContentScale
16 | import androidx.compose.ui.unit.dp
17 | import com.bouyahya.chatmultiplatform.domain.models.MessageData
18 | import com.bouyahya.chatmultiplatform.presentation.ChatMultiplatformState
19 | import com.seiko.imageloader.rememberImagePainter
20 |
21 | @Composable
22 | fun SenderComponent(
23 | message: MessageData,
24 | state: ChatMultiplatformState,
25 | ) {
26 | Text(
27 | modifier = Modifier
28 | .background(
29 | color = if (message.senderId == state.currentUser!!.id)
30 | Color.Blue.copy(
31 | alpha = 0.5f
32 | ) else
33 | Color.White,
34 | shape = RoundedCornerShape(20.dp)
35 | )
36 | .padding(10.dp),
37 | text = message.message,
38 | color = if (message.senderId == state.currentUser.id)
39 | Color.White else
40 | Color.Black
41 | )
42 |
43 |
44 | Spacer(modifier = Modifier.size(10.dp))
45 |
46 | Image(
47 | modifier = Modifier.size(50.dp).clip(CircleShape),
48 | painter = rememberImagePainter(state.currentUser.profileImage),
49 | contentDescription = "profile Image",
50 | contentScale = ContentScale.Crop
51 | )
52 | }
--------------------------------------------------------------------------------
/shared/src/iosMain/kotlin/com/bouyahya/chatmultiplatform/App.kt:
--------------------------------------------------------------------------------
1 | package com.bouyahya.chatmultiplatform
2 |
3 | import androidx.compose.ui.window.ComposeUIViewController
4 | import com.bouyahya.chatmultiplatform.di.ViewModels
5 | import com.bouyahya.chatmultiplatform.presentation.ChatMultiplatformScreen
6 |
7 | fun MainViewController() = ComposeUIViewController {
8 | val viewModel = ViewModels.getChatMultiplatformViewModel()
9 | ChatMultiplatformScreen(
10 | chatMultiplatformViewModel = viewModel
11 | )
12 | }
--------------------------------------------------------------------------------
/shared/src/iosMain/kotlin/com/bouyahya/chatmultiplatform/Platform.kt:
--------------------------------------------------------------------------------
1 | package com.bouyahya.chatmultiplatform
2 |
3 | import platform.UIKit.UIDevice
4 |
5 | class IOSPlatform: Platform {
6 | override val name: String = UIDevice.currentDevice.systemName() + " " + UIDevice.currentDevice.systemVersion
7 | }
8 |
9 | actual fun getPlatform(): Platform = IOSPlatform()
--------------------------------------------------------------------------------
/shared/src/iosMain/kotlin/com/bouyahya/chatmultiplatform/core/network/HttpClientFactory.kt:
--------------------------------------------------------------------------------
1 | package com.bouyahya.chatmultiplatform.core.network
2 |
3 | import io.ktor.client.HttpClient
4 | import io.ktor.client.engine.darwin.Darwin
5 |
6 | actual fun createPlatformHttpClient(): HttpClient {
7 | return HttpClient(Darwin)
8 | }
--------------------------------------------------------------------------------
/shared/src/iosMain/kotlin/com/bouyahya/chatmultiplatform/di/PlatformModule.kt:
--------------------------------------------------------------------------------
1 | package com.bouyahya.chatmultiplatform.di
2 |
3 | import com.bouyahya.chatmultiplatform.data.ChatMultiplatformRepositoryImpl
4 | import com.bouyahya.chatmultiplatform.domain.repositories.ChatMultiplatformRepository
5 | import com.bouyahya.chatmultiplatform.domain.usecases.ChatMultiplatformUseCase
6 | import com.bouyahya.chatmultiplatform.presentation.ChatMultiplatformViewModel
7 | import io.ktor.client.engine.darwin.*
8 | import org.koin.core.component.KoinComponent
9 | import org.koin.core.component.get
10 | import org.koin.dsl.module
11 |
12 | actual fun platformModule() = module {
13 | single {
14 | Darwin.create()
15 | }
16 |
17 | single {
18 | ChatMultiplatformRepositoryImpl(
19 | httpClient = get()
20 | )
21 | }
22 |
23 | single {
24 | ChatMultiplatformUseCase(chatMultiplatformRepository = get())
25 | }
26 |
27 | single {
28 | ChatMultiplatformViewModel(
29 | chatMultiplatformUseCase = get()
30 | )
31 | }
32 | }
33 |
34 | object ViewModels : KoinComponent {
35 | fun getChatMultiplatformViewModel() = get()
36 | }
--------------------------------------------------------------------------------