fix: iOS compatibility (#861)

This commit is contained in:
Diego Beraldin 2024-05-17 23:33:30 +02:00 committed by GitHub
parent b22e9033cb
commit 8b4514b5e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
75 changed files with 198 additions and 176 deletions

View File

@ -24,7 +24,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "api"
baseName = "core.api"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "appearance"
baseName = "core.appearance"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "architecture"
baseName = "core.architecture"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "components"
baseName = "core.commonui.components"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "detailopener-api"
baseName = "core.commonui.detailopener-api"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "detailopener-impl"
baseName = "core.commonui.detailopener-impl"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "lemmyui"
baseName = "core.commonui.lemmyui"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "modals"
baseName = "core.commonui.modals"
isStatic = true
}
}

View File

@ -26,7 +26,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "l10n"
baseName = "core.l10n"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "markdown"
baseName = "core.markdown"
isStatic = true
}
}

View File

@ -22,7 +22,7 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "navigation"
baseName = "core.navigation"
isStatic = true
}
}
@ -34,7 +34,7 @@ kotlin {
implementation(compose.material3)
implementation(libs.koin.core)
implementation(libs.stately.common)
implementation(libs.voyager.navigator)
implementation(libs.voyager.tab)
implementation(libs.voyager.bottomsheet)

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "notifications"
baseName = "core.notifications"
isStatic = true
}
}

View File

@ -27,7 +27,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "persistence"
baseName = "core.persistence"
isStatic = true
}
}

View File

@ -21,7 +21,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "preferences"
baseName = "core.preferences"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "resources"
baseName = "core.resources"
isStatic = true
}
}

View File

@ -7,13 +7,13 @@ import androidx.compose.ui.text.font.FontStyle
import androidx.compose.ui.text.font.FontWeight
import kotlinx.coroutines.runBlocking
import org.jetbrains.compose.resources.ExperimentalResourceApi
import org.jetbrains.compose.resources.painterResource
import org.jetbrains.compose.resources.resource
import org.jetbrains.compose.resources.InternalResourceApi
import org.jetbrains.compose.resources.readResourceBytes
import androidx.compose.ui.text.platform.Font as PlatformFont
private val cache: MutableMap<String, Font> = mutableMapOf()
@OptIn(ExperimentalResourceApi::class)
@OptIn(InternalResourceApi::class)
@Composable
actual fun font(
name: String,
@ -24,7 +24,7 @@ actual fun font(
return cache.getOrPut(res) {
val byteArray =
runBlocking {
resource("font/$res.ttf").readBytes()
readResourceBytes("font/$res.ttf")
}
PlatformFont(res, byteArray, weight, style)
}
@ -33,5 +33,5 @@ actual fun font(
@OptIn(ExperimentalResourceApi::class)
@Composable
actual fun drawable(res: String): Painter {
return painterResource("drawable/$res")
return drawable("drawable/$res")
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "testutils"
baseName = "core.testutils"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "utils"
baseName = "core.utils"
isStatic = true
}
}

View File

@ -26,7 +26,7 @@ actual fun Long.toIso8601Timestamp(): String? {
dateFormatter.locale = NSLocale.autoupdatingCurrentLocale
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'"
dateFormatter.calendar = NSCalendar(calendarIdentifier = NSCalendarIdentifierGregorian)
val date = NSDate(timeIntervalSince1970: this)
val date = NSDate(timeIntervalSinceReferenceDate = (this.toDouble() / 1000))
return dateFormatter.stringFromDate(date)
}

View File

@ -22,7 +22,10 @@ class DefaultShareHelper : ShareHelper {
path: Any?,
mimeType: String,
) {
val shareActivity = UIActivityViewController(listOf(UIImage(contentsOfFile = path?.toString())), null)
val shareActivity = UIActivityViewController(
listOf(UIImage(contentsOfFile = path?.toString().orEmpty())),
null,
)
val rvc = UIApplication.sharedApplication().keyWindow?.rootViewController
rvc?.presentViewController(shareActivity, true, null)
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "identity"
baseName = "domain.identity"
isStatic = true
}
}

View File

@ -1,3 +1,7 @@
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompileCommon
plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.android.library)
@ -22,7 +26,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "inbox"
baseName = "domain.inbox"
isStatic = true
}
}
@ -66,3 +71,17 @@ android {
minSdk = libs.versions.android.minSdk.get().toInt()
}
}
// both :feature:inbox and :domain:inbox are called "inbox" so this causes a name clash
kotlin {
metadata {
compilations.configureEach {
if (name == KotlinSourceSet.COMMON_MAIN_SOURCE_SET_NAME) {
compileTaskProvider {
this as KotlinCompileCommon
moduleName.set("${project.group}:${moduleName.get()}")
}
}
}
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "data"
baseName = "domain.lemmy.data"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "pagination"
baseName = "domain.lemmy.pagination"
isStatic = true
}
}

View File

@ -21,7 +21,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "repository"
baseName = "domain.lemmy.repository"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "home"
baseName = "feature.home"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "inbox"
baseName = "feature.inbox"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "profile"
baseName = "feature.profile"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "search"
baseName = "feature.search"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "settings"
baseName = "feature.settings"
isStatic = true
}
}

View File

@ -28,6 +28,7 @@ mockk = "1.13.10"
multiplatform_markdown_renderer = "0.14.0"
multiplatform_settings = "1.1.1"
reorderable = "2.1.1"
stately = "2.0.6"
sqlcipher = "4.5.7"
sqldelight = "2.0.2"
turbine = "1.1.0"
@ -85,6 +86,8 @@ voyager_tab = { module = "cafe.adriel.voyager:voyager-tab-navigator", version.re
voyager_transition = { module = "cafe.adriel.voyager:voyager-transitions", version.ref = "voyager" }
voyager_koin = { module = "cafe.adriel.voyager:voyager-koin", version.ref = "voyager" }
stately_common = { module = "co.touchlab:stately-common", version.ref = "stately" }
sqlcipher = { module = "net.zetetic:sqlcipher-android", version.ref = "sqlcipher" }
sqldelight_android = { module = "app.cash.sqldelight:android-driver", version.ref = "sqldelight" }
sqldelight_native = { module = "app.cash.sqldelight:native-driver", version.ref = "sqldelight" }

View File

@ -11,45 +11,17 @@
058557D9273AAEEB004C7B11 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */; };
2152FB042600AC8F00CF470E /* iOSApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2152FB032600AC8F00CF470E /* iOSApp.swift */; };
7555FF83242A565900829871 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7555FF82242A565900829871 /* ContentView.swift */; };
BFAF59B009ED1477CC33209C /* Pods_iosApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 74D30A173B9A50997EC8DC54 /* Pods_iosApp.framework */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
7555FFB4242A642300829871 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
058557BA273AAA24004C7B11 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
16BEEF5D7302B8F7D45AAA0F /* 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 = "<group>"; };
2152FB032600AC8F00CF470E /* iOSApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSApp.swift; sourceTree = "<group>"; };
74D30A173B9A50997EC8DC54 /* Pods_iosApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_iosApp.framework; sourceTree = BUILT_PRODUCTS_DIR; };
7555FF7B242A565900829871 /* iosApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iosApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
7555FF7B242A565900829871 /* .app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; name = .app; path = "KMP App.app"; sourceTree = BUILT_PRODUCTS_DIR; };
7555FF82242A565900829871 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
7555FF8C242A565B00829871 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
EBB02E43F8C4EC7E8BBC6CE1 /* 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 = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
7555FF78242A565900829871 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
BFAF59B009ED1477CC33209C /* Pods_iosApp.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
058557D7273AAEEB004C7B11 /* Preview Content */ = {
isa = PBXGroup;
@ -59,16 +31,6 @@
path = "Preview Content";
sourceTree = "<group>";
};
3EE7BE2FC41928A6064CD1E5 /* Pods */ = {
isa = PBXGroup;
children = (
EBB02E43F8C4EC7E8BBC6CE1 /* Pods-iosApp.debug.xcconfig */,
16BEEF5D7302B8F7D45AAA0F /* Pods-iosApp.release.xcconfig */,
);
name = Pods;
path = Pods;
sourceTree = "<group>";
};
5B271BF248115C84A2352FE0 /* xcschemes */ = {
isa = PBXGroup;
children = (
@ -83,7 +45,6 @@
7555FF7D242A565900829871 /* iosApp */,
7555FF7C242A565900829871 /* Products */,
7555FFB0242A642200829871 /* Frameworks */,
3EE7BE2FC41928A6064CD1E5 /* Pods */,
5B271BF248115C84A2352FE0 /* xcschemes */,
);
sourceTree = "<group>";
@ -111,7 +72,6 @@
7555FFB0242A642200829871 /* Frameworks */ = {
isa = PBXGroup;
children = (
74D30A173B9A50997EC8DC54 /* Pods_iosApp.framework */,
);
name = Frameworks;
sourceTree = "<group>";
@ -123,12 +83,9 @@
isa = PBXNativeTarget;
buildConfigurationList = 7555FFA5242A565B00829871 /* Build configuration list for PBXNativeTarget "iosApp" */;
buildPhases = (
088A8FA4C71C8D7E9984B4C2 /* [CP] Check Pods Manifest.lock */,
7555FFB5242A651A00829871 /* ShellScript */,
F36B1CEB2AD83DDC00CB74D5 /* Compile Kotlin Framework */,
7555FF77242A565900829871 /* Sources */,
7555FF78242A565900829871 /* Frameworks */,
7555FF79242A565900829871 /* Resources */,
7555FFB4242A642300829871 /* Embed Frameworks */,
);
buildRules = (
);
@ -136,7 +93,7 @@
);
name = iosApp;
productName = iosApp;
productReference = 7555FF7B242A565900829871 /* iosApp.app */;
productReference = 7555FF7B242A565900829871 /* .app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
@ -185,29 +142,7 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
088A8FA4C71C8D7E9984B4C2 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-iosApp-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
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";
showEnvVarsInLog = 0;
};
7555FFB5242A651A00829871 /* ShellScript */ = {
F36B1CEB2AD83DDC00CB74D5 /* Compile Kotlin Framework */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@ -222,7 +157,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "cd \"$SRCROOT/..\"\n./gradlew :shared:embedAndSignAppleFrameworkForXcode\n";
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\nfi\ncd \"$SRCROOT/..\"\n./gradlew :shared:embedAndSignAppleFrameworkForXcode\n";
};
/* End PBXShellScriptBuildPhase section */
@ -297,6 +232,8 @@
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
GENERATE_INFOPLIST_FILE = YES;
};
name = Debug;
};
@ -351,23 +288,23 @@
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_VERSION = 5.0;
VALIDATE_PRODUCT = YES;
GENERATE_INFOPLIST_FILE = YES;
};
name = Release;
};
7555FFA6242A565B00829871 /* Debug */ = {
89389DD52BF79AD400144C44 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = EBB02E43F8C4EC7E8BBC6CE1 /* Pods-iosApp.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\"";
ENABLE_PREVIEWS = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)/../shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)",
"$(SRCROOT)/../shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)\n$(SRCROOT)/../shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)",
);
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
INFOPLIST_FILE = iosApp/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@ -377,26 +314,23 @@
"-framework",
shared,
);
PRODUCT_BUNDLE_IDENTIFIER = orgIdentifier.iosApp;
PRODUCT_NAME = "$(TARGET_NAME)";
PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_ID}${TEAM_ID}";
PRODUCT_NAME = "${APP_NAME}";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
7555FFA7242A565B00829871 /* Release */ = {
89389DD62BF79AD400144C44 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 16BEEF5D7302B8F7D45AAA0F /* Pods-iosApp.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\"";
ENABLE_PREVIEWS = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)/../shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)",
);
"$(SRCROOT)/../shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)\n$(SRCROOT)/../composeApp/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)",
);
INFOPLIST_FILE = iosApp/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@ -406,8 +340,9 @@
"-framework",
shared,
);
PRODUCT_BUNDLE_IDENTIFIER = orgIdentifier.iosApp;
PRODUCT_NAME = "$(TARGET_NAME)";
PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_ID}${TEAM_ID}";
PRODUCT_NAME = "${APP_NAME}";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
@ -425,11 +360,11 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7555FFA5242A565B00829871 /* Build configuration list for PBXNativeTarget "iosApp" */ = {
89389DD62BF79AD400144C44 /* Build configuration list for PBXNativeTarget "iosApp" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7555FFA6242A565B00829871 /* Debug */,
7555FFA7242A565B00829871 /* Release */,
89389DD52BF79AD400144C44 /* Debug */,
89389DD62BF79AD400144C44 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;

View File

@ -4,7 +4,4 @@
<FileRef
location = "group:iosApp.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>

View File

@ -2,18 +2,17 @@ import UIKit
import SwiftUI
import shared
struct ComposeView(): UIViewControllerRepresentable {
struct ComposeView: UIViewControllerRepresentable {
func makeUIViewController(context: Context) -> UIViewController {
Main_iosKt.MainViewController()
MainViewControllerKt.MainViewController()
}
func updateUIViewController(_ uiViewController: UIViewController, context: Context) {}
}
struct ContentView(): View {
struct ContentView: View {
var body: some View {
ComposeView()
.ignoresSafeArea(.all, edges: .bottom) // Compose has own keyboard handler
.ignoresSafeArea(.keyboard) // Compose has own keyboard handler
}
}
}

View File

@ -23,6 +23,7 @@ kotlin {
).forEach {
it.binaries.framework {
baseName = "shared"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "about"
baseName = "unit.about"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "accountsettings"
baseName = "unit.accountsettings"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "ban"
baseName = "unit.ban"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "chat"
baseName = "unit.chat"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "choosecolor"
baseName = "unit.choosecolor"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "choosefont"
baseName = "unit.choosefont"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "communitydetail"
baseName = "unit.communitydetail"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "communityinfo"
baseName = "unit.communityinfo"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "configurecontentview"
baseName = "unit.configurecontentview"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "configureswipeactions"
baseName = "unit.configureswipeactions"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "createcomment"
baseName = "unit.createcomment"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "createpost"
baseName = "unit.createpost"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "drafts"
baseName = "unit.drafts"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "drawer"
baseName = "unit.drawer"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "editcommunity"
baseName = "unit.editcommunity"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "explore"
baseName = "unit.explore"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "filteredcontents"
baseName = "unit.filteredcontents"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "instanceinfo"
baseName = "unit.instanceinfo"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "licences"
baseName = "unit.licences"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "login"
baseName = "unit.login"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "manageaccounts"
baseName = "unit.manageaccounts"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "manageban"
baseName = "unit.manageban"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "managesubscriptions"
baseName = "unit.managesubscriptions"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "mentions"
baseName = "unit.mentions"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "messages"
baseName = "unit.messages"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "moderatewithreason"
baseName = "unit.moderatewithreason"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "modlog"
baseName = "unit.modlog"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "multicommunity"
baseName = "unit.multicommunity"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "myaccount"
baseName = "unit.myaccount"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "postdetail"
baseName = "unit.postdetail"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "postlist"
baseName = "unit.postlist"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "rawcontent"
baseName = "unit.rawcontent"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "replies"
baseName = "unit.replies"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "reportlist"
baseName = "unit.reportlist"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "selectcommunity"
baseName = "unit.selectcommunity"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "selectinstance"
baseName = "unit.selectinstance"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "userdetail"
baseName = "unit.userdetail"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "userinfo"
baseName = "unit.userinfo"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "web"
baseName = "unit.web"
isStatic = true
}
}

View File

@ -22,7 +22,8 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "zoomableimage"
baseName = "unit.zoomableimage"
isStatic = true
}
}