Comments (10)
@ASalavei Here is the minimal reproducer https://github.com/Medial-Tech/Medial-App-Reproducer/tree/main
It builds fine on 1.5.11 but as soon as i upgrade to 1.6.2 it throws "Duplicate symbols" when built from Android Studio
from compose-multiplatform.
Hi!
We're using CMPUIKit static library in compose framework. You're importing 2 frameworks both have own copy of it.
I would recommend to use only one top-level dependency of Multiplatform framework. In your case if shared-ui-screens
uses shared-ui
as dependency, I would include only the first one into iOS App, and propagate symbols from dependent shared-ui
.
Also, you can provide minimum viable repro application sample to let us make close look into it.
from compose-multiplatform.
Hi,
shared-ui
module uses shared-ui-screens
as an implementation
dependency
Same, shared
uses shared-ui
as an implementation
dependency
shared-ui
kotlin {
sourceSets {
commonMain.dependencies {
implementation(project(":shared:core"))
implementation(project(":shared:ui:core"))
implementation(project(":shared:ui:components"))
implementation(project(":shared:ui:screens"))
implementation(project(":shared:domain"))
implementation(libs.bundles.decompose)
implementation(libs.moko.permissions)
}
}
}
shared
kotlin {
cocoapods {
podfile = project.file("../iosApp/Podfile")
}
sourceSets {
commonMain.dependencies {
implementation(project(":shared:core"))
implementation(project(":shared:ui"))
implementation(project(":shared:domain"))
implementation(libs.decompose.core)
implementation(libs.moko.permissions)
}
androidMain.dependencies {
implementation(androidLibs.activity.compose)
}
}
}
from compose-multiplatform.
Could you please remove everything valuable from your project and upload minimal sources set that reproduces your issue on GitHub to do proper investigation?
from compose-multiplatform.
Thank you for the reproducer. I can see you're using 4 multiplatform frameworks added via CocoaPods to you iOS app.
It's recommended to create umbrella framework to solve this issue. Also you can use export dependencies to propagate symbols to your umbrella framework.
As a bonus, you will get reduced application size and faster launch time.
from compose-multiplatform.
Thank you for the reproducer. I can see you're using 4 multiplatform frameworks added via CocoaPods to you iOS app.
It's recommended to create umbrella framework to solve this issue. Also you can use export dependencies to propagate symbols to your umbrella framework.
As a bonus, you will get reduced application size and faster launch time.
The pod dependencies in all those child modules which are exported as a separate framework is not actually used in the iOS native side, but only within the shared module.
Do i still need to include those in the umbrella framework?
Do i also need to include all other child modules, even those which dont have any pod dependencies?
I only need the files from the parent "shared" module in iOSApp, none from the child modules. Thats why I have used implementation()
everywhere instead of api()
As said here
I use pods like GoogleSignIn, Ably, Reachability, Amplitude which are only used in the shared module and not in Swift
from compose-multiplatform.
I only need the files from the parent "shared" module in iOSApp, none from the child modules. Thats why I have used implementation() everywhere instead of api()
Hmm.. your iOS app currently depends on 4 frameworks that was build from different modules. Do you really need these dependencies? If you can remove safely all except one, then the issue will be solved.
from compose-multiplatform.
I only need the files from the parent "shared" module in iOSApp, none from the child modules. Thats why I have used implementation() everywhere instead of api()
Hmm.. your iOS app currently depends on 4 frameworks that was build from different modules. Do you really need these dependencies? If you can remove safely all except one, then the issue will be solved.
I tried, but then I get Undefined Symbols issue
Mentioning some files of Ably, Reachability, Amplitude and other pods
If I mention those pods again in iosApp/PodFile
it works, but I dont think this is right as I only use them in shared and are already defined in the child module its used in
Had to add the last 4 pods here to fix the Undefined Symbols issue, but I dont use them directly in Swift
Used only inside shared
target 'Medial' do
use_frameworks!
platform :ios, '14.1'
pod 'shared', :path => '../shared'
pod 'FirebaseMessaging'
pod 'FirebaseAnalytics'
pod 'FirebaseCrashlytics'
pod 'Siren'
pod 'BranchSDK'
pod 'Ably'
pod 'Reachability'
pod 'GoogleSignIn'
pod 'Amplitude', '8.17.1'
end
from compose-multiplatform.
It means your iOS app does not know where to find these frameworks. Something (Someone) should tell this info to iOS app via Build Settings > Framework Search Paths
. Maybe it can be done using podespec
of the shared
framework - see script inside each file. Unfortunately I don't know how to do it exactly, but it definitely the way to go. Try to ask in our Slack channels: https://kotlinlang.slack.com/archives/C3PQML5NU https://kotlinlang.slack.com/archives/C0346LWVBJ4
Btw, the Podfile
you shared looks OK until you are using dynamic frameworks (use_frameworks!
option).
from compose-multiplatform.
Thanks for the help @ASalavei
I will check this out
from compose-multiplatform.
Related Issues (20)
- Desktop. Native distribution. `intallationPath` doesn't work if `dirChooser` = false
- Reduce variety of Preview annotations HOT 5
- Being able to create a ComposePanel with vsync disabled
- Need to tap the touchpad thrice for double click action when using combined clickable. However, Button clicks are only required to clicked twice. HOT 4
- ImageVector is blurry when used with `Image()` + `Modifier.scale()` HOT 2
- [Compose Resources] commonMainResourceAccessors is not generated in multi-module architecture using Kotlin 2.0.0 HOT 4
- `Dialogs` are not rendered as expected when used inside a `ImageComposeScene`
- Unable to compile kotlinjs
- "No such file or directory" when using `Res.getUri()` HOT 6
- FocusRequester is not working on web both js(IR) and WASM the same as in JVM HOT 1
- Support getting resources by key
- Failed to use common source set to manage compose multi-language string resources HOT 2
- PointerInputChange onDrag events always emit ID of 0 on desktop HOT 3
- Default Proguard rules cause release task failure when using Material 3 instead of 2 in Compose Desktop HOT 1
- Jetsnack images are not loading HOT 1
- syncPodComposeResourcesForIos: Cannot query the value of this provider because it has no value available.
- [Gradle] tryGetSkikoRuntimeIfNeeded() eagerly resolves KMP runtime configuration on task creation HOT 2
- [Compose Resources] `MissingResourceException` in Auto-Updater application with different folders HOT 1
- Cannot change preferredStatusBarStyle on ComposeUIViewController HOT 1
- Buuld release not working with kotlin 2 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from compose-multiplatform.