Hi All. I'm getting this error for the `linkPodDeb...
# multiplatform
x
Hi All. I'm getting this error for the
linkPodDebugFrameworkIosSimulatorArm64
task
Copy code
output:
ld: warning: object file (/var/folders/46/j7qr6bgj4f777vw39y0810d40000gp/T/konan_temp559333242603376004/result.o) was built for newer iOS Simulator version (14.0) than being linked (9.0)
Undefined symbols for architecture arm64:
  "_kfun:main#MainDomain(){}MainState", in result.o
  "_kfun:settings#SettingsDomain(){}SettingsState", in result.o
ld: symbol(s) not found for architecture arm64

> Task :app:linkPodDebugFrameworkIosSimulatorArm64 FAILED
Not sure how I can debug this issue 🤔 Had a scan through all my dependencies and they all seem to support that target. Any help is appreciated
1
p
Are you exposing any composable function as public in your code. I usually get a similar error when not using internal in the immediate library that is compiled to iOS. But don't quite recall if it is the same error.
x
I am, I'm exposing Molecule composables
x
keeping my composables as
internal
for now seems to work 🙌 Thanks for your help
p
There is a workaround if you still want to keep them public. It consists of placing them in another library, that is not directly consumed by the iOS App. Notice that, the problem only occurs in the module that uses cocoapods/xcframework integration. But you could restructure your modules as bellow: iosApp --> sharedLib1(all composable internal) --> sharedLib2(public composable ok) --> anotherLib3 (public composable ok) So basically the limitation is only in the last layer to be used to generate the xcframework. The under layers are fine.
So you can use sharedLib1 only for the iOS bindings and consume sharedLib2 and sharedLib3 directly in the case of the other targets