Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resource usage from multiple modules - org.jetbrains.compose.resources.MissingResourceException #4418

Closed
1 of 5 tasks
IlyaPavlovskii opened this issue Mar 3, 2024 · 4 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists resources

Comments

@IlyaPavlovskii
Copy link

IlyaPavlovskii commented Mar 3, 2024

Describe the bug

I've tried to use a new stable version of compose multiplatform resources and found one problem with iOS build.
When my application module includes internal submodules with resource usage - I always receive runtime crash on iOS app version.
To solve this problem, I have to copy-paste resources from ALL submodules into the APP module. Looks like an iOS bug.

image

here is the commit with solution: IlyaPavlovskii/YouTubePlayer@9e26611#diff-1b4fc3f655cfb0189c13c5849ed6e536963e18bd502fb3ff8af5a0975180e939

Affected platforms

  • Desktop (Windows, Linux, macOS)
  • iOS
  • Web (K/Wasm) - Canvas based API
  • Web (K/JS) - Canvas based API
  • Web (K/JS) - HTML library

Versions

  • Kotlin version*: 1.9.22
  • Compose Multiplatform version*: 1.6.0
  • OS version(s)* (required for Desktop and iOS issues): N/A
  • OS architecture (x86 or arm64): all
  • Device (model or simulator for iOS issues): simulator - iOS 17.2
  • JDK (for desktop issues): -

Expected behavior
Build without copy-paste resources from submodules for iOS build.

@IlyaPavlovskii IlyaPavlovskii added bug Something isn't working submitted labels Mar 3, 2024
@MatkovIvan
Copy link
Member

Currently using resources from multiple modules is not supported. Documented here: https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-images-resources.html

Duplicate of #4229

@MatkovIvan MatkovIvan added duplicate This issue or pull request already exists resources and removed submitted labels Mar 4, 2024
@kingsword09
Copy link

@MatkovIvan In the compose-multiplatform 1.6.1 version, the multiple modules composeResources is still not supported on the iOS platform. Is there a plan on which version this feature will be added?

@MatkovIvan
Copy link
Member

@terrakok is already working on it (please note that it will require KGP >= 2.0.0-Beta05)

@okushnikov
Copy link

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists resources
Projects
None yet
Development

No branches or pull requests

4 participants