Suresh Maidaragi
01/22/2024, 6:40 PMmoko resources
to new kmm project, can someone help to check..
Slack Conversationelectrolobzik
01/23/2024, 7:37 PMACCESS_BACKGROUND_LOCATION
is not included in moko-permissions
?SK
01/23/2024, 9:49 PMKatyrin Roman
01/25/2024, 6:41 AM- shared
-- resources
-- feature-1
-- feature-2
The only working solution that made my project build on both Android and iOS was to register the moko resources plugin for the iOS version, and remove this solution for Android. Also, when building the IOS, it is necessary to replace implementation(project(:resource)) with api(project(:resource))
My shared module:
plugins {
. . .
id("dev.icerock.mobile.multiplatform-resources") <- only for ios
}
kotlin {
androidTarget()
iosX64()
iosArm64()
iosSimulatorArm64()
cocoapods {
summary = "Some description for the Shared Module"
homepage = "Link to the Shared Module homepage"
ios.deploymentTarget = ProjectSettings.IOS_DEPLOYMENT_TARGET
version = ProjectSettings.VERSION_NAME
podfile = project.file("../iosApp/Podfile")
framework {
baseName = "shared"
isStatic = true
export(project(":resource"))
transitiveExport = true
}
}
sourceSets {
val commonMain by getting {
dependencies {
api(project(:resource)) <- api for ios, implementation for android
}
}
. . .
}
. . .
}
Is there a more automated way to build two versions without making changes to Gradle?
Thanks in advance for any answer or advice on what I'm doing wrong)
Kotlin: 1.9.10
Gradle plugin: 8.1.2
Moko-resources: 0.23.0Shakhzod Ilkhomov
01/25/2024, 12:30 PMmarschwar
01/29/2024, 6:50 PMmoko-resources
generally work together with android build flavors. I do experience an issue in Android Studio with version 0.24.0-alpha2. See https://github.com/icerockdev/moko-resources/discussions/625#discussioncomment-8287130 for details.alex009
01/31/2024, 3:03 PMSuresh Maidaragi
02/08/2024, 11:07 AMnon-flowable
version of currentBackStackEntry
available on precompose as like Compose as shown in screen shot
1st screen using precompose,
2nd screen using native composeSuresh Maidaragi
02/08/2024, 11:26 AMVaibhav Jaiswal
02/11/2024, 12:05 PMshared
|
| -> ui
|-> screens
|-> core (moko resources lie here)
|-> components
.........
Suresh Maidaragi
02/13/2024, 8:31 AMSavedStateHolder
from package moe.tlaster.precompose.stateholder
is same as Native SavedStateHandle
? from package androidx.lifecycle
If so, how can we access
access value as like in native in moko
savedStateHandle.get<String>(Screen.ARGS_KEY) //native code
Djuro
02/19/2024, 1:24 PMmoko-resources
issues when working with compose multiplatform, version 1.6.0-beta01
is not working
:common:linkDebugFrameworkIos FAILED
I had to change to 1.6.0-alpha01
Sean Proctor
02/19/2024, 1:40 PMmoko-resources-<buildType>
kevin.cianfarini
02/22/2024, 7:05 PMShowing Recent Messages
Cannot locate tasks that match ':shared:octopus:copyFrameworkResourcesToApp' as task 'copyFrameworkResourcesToApp' not found in project ':shared:octopus'.
I noticed in the multiple alpha releases this has come up as a bug that’s needed resolution. When I check what tasks are available on our umbrella shared framework, I see the following:
Moko-resources tasks
--------------------
copyResourcesDebugFrameworkIosSimulatorArm64
copyResourcesDebugTestIosSimulatorArm64
copyResourcesReleaseFrameworkIosSimulatorArm64
We are setting the base name of our prefix in our framework.
binaries {
framework {
baseName = "shared"
isStatic = true
Does this sound like a bug with moko-resources, or is there something obvious that we’re doing wrong?Bekzod
02/23/2024, 10:24 AMVaibhav Jaiswal
02/26/2024, 8:08 AMpainterResource()
, my composable recomposes as the instance changed but content is same
Is the painter instance returned from painterResource
not remembered?KimJason
02/27/2024, 7:10 AMmultiplatformResources {
resourcesPackage.set("com.icerockdev.library")
// multiplatformResourcesPackage = "com.icerockdev.library"
}
Marco Pierucci
03/04/2024, 2:57 PM:feature:auth:ui:iosArm64Main: Could not find dev.icerock.moko:moko-resources:0.24.0-alpha-5.
For the config being
plugins {
...
alias(libs.plugins.moko)
}
kotlin {
sourceSets {
commonMain.dependencies {
...
api(libs.moko.resources)
api(libs.moko.resources.compose)
}
}
}
android {
namespace = "app.kraken.field.feature.auth.ui"
}
multiplatformResources {
resourcesPackage = "app.kraken.field.feature.auth.ui.resources"
resourcesClassName = "SharedRes"
resourcesVisibility = MRVisibility.Internal // optional, default Public
iosBaseLocalizationRegion = "en" // optional, default "en"
}
brandonmcansh
03/05/2024, 10:29 PMSuresh Maidaragi
03/07/2024, 4:52 AMSuresh Maidaragi
03/10/2024, 9:44 AMjetpack compose to v1.6.0-rc03
and
multiplatform 2.0.0-Beta4
and tried running iOS building started seeing this issue for Strings, image, font
error: Object 'MR.images' is not abstract and does not implement abstract member 'nsBundle'.
error: Object 'MR.strings' is not abstract and does not implement abstract member 'nsBundle'.
error: Object 'MR.colors' is not abstract and does not implement abstract member 'nsBundle'.
error: Object 'MR.fonts' is not abstract and does not implement abstract member 'nsBundle'.ynsok
03/15/2024, 12:24 PMThomas
03/19/2024, 1:43 AMStringResource.desc().localized()
.
Is there a good way to obtain a string of a particular locale programmatically, without automatic locale resolution? Like perhaps a function that takes a NSLocale
object. Thanks.Suresh Maidaragi
03/19/2024, 11:05 AM* What went wrong:
A problem was found with the configuration of task ':kmm-pw-ui-module:iosX64SourcesJar' (type 'Jar').
- Gradle detected a problem with the following location: '/Users/sureshmaidaragi/StudioProjects/kmm-pw-pitara/kmm-pw-ui-module/build/generated/moko/commonMain/src'.
Reason: Task ':kmm-pw-ui-module:iosX64SourcesJar' uses this output of task ':kmm-pw-ui-module:generateMRcommonMain' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
Possible solutions:
1. Declare task ':kmm-pw-ui-module:generateMRcommonMain' as an input of ':kmm-pw-ui-module:iosX64SourcesJar'.
2. Declare an explicit dependency on ':kmm-pw-ui-module:generateMRcommonMain' from ':kmm-pw-ui-module:iosX64SourcesJar' using Task#dependsOn.
3. Declare an explicit dependency on ':kmm-pw-ui-module:generateMRcommonMain' from ':kmm-pw-ui-module:iosX64SourcesJar' using Task#mustRunAfter.
Can someone help me to know what I have missedAvadhut
03/25/2024, 8:28 AMmoko-socket-io
project
I'm able to run the sample android app after changing target sdk, jdk and installing pod dependencies but the ios sample app build is failing with following outputs.
I'm trying to implement changes for this issue. Please help me setup iOS project.
Thanks in advance!
1. ./gradlew build publishToMavenLocal syncMultiPlatformLibraryDebugFrameworkIosX64
> Task :sample:mpp-library:linkMultiPlatformLibraryDebugFrameworkIosArm64 FAILED
w: Following libraries are specified to be exported with -Xexport-library, but not included to the build:
/Users/whoknows/Developement/OSS/moko-socket-io/socket-io/build/libs/iosArm64/main/socket-io-cinterop-cocoapodMokoSocketIo.klib
2. cd sample/ios-app && set -o pipefail && xcodebuild -scheme TestProj -workspace TestProj.xcworkspace -configuration Debug -sdk iphonesimulator -arch x86_64 build CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution [CP-User]\ Compile\ Kotlin/Native /Users/whoknows/Library/Developer/Xcode/DerivedData/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/MultiPlatformLibrary.build/Script-BA95BCD441577347D0C821C3908AFD77.sh (in target 'MultiPlatformLibrary' from project 'Pods')
(1 failure)
Alejandro Rios
03/29/2024, 9:23 PMmoko-mvvm
, I'm updating the CMP version to 1.6.1, strangely, when I run the web JS version i'm getting this error, does anyone know what could it be or how to fix this?Bekzod
04/18/2024, 12:33 PMimport SwiftUI
import shared
@main
struct iOSApp: App {
init() {
//here
KoinHelperKt.doInitKoin()
}
var body: some Scene {
WindowGroup {
ContentView()
.preferredColorScheme(.light)
}
}
}
but later when I tried to call it in runtime, it did not work. re-opened app still no changes.
fun setLocale(locale: String) {
StringDesc.localeType = StringDesc.LocaleType.Custom(locale)
preferenceManager?.setLocale(locale)
}
If language changed from settings it works.
I'm new to iOS development, need some instructions. Thanks in advance!George Karpenko
04/21/2024, 10:22 PMkotlin:1.9.23
and moko-resources:0.24.0-beta-1
, cannot sync gradle files in project due to:
removeContentEntry: removed content entry url 'file:///Users/.../.../shared/build/generated/moko/iosArm64Main/res' still exists after removing
I've followed all upgrade steps from release notes, tried cleaning all caches, rebuilding project, and syncing again, nothing helped. And no more info in gradle build log :/
Did someone faced same issue?FaN
04/22/2024, 7:29 PMDarron Schall
04/23/2024, 5:11 PMcan't compile assets - 1
error on iOS. I'm not entirely sure it's a moko-resources bug, but perhaps there's a way to provide a better error diagnostic?
I'll put the details in a 🧵.