https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
a

arnis71

12/14/2020, 6:31 PM
Hello, has anyone tried to add cocoapods integration for
ios()
target? I’ve found that imports for cocoapods dependencies in
iosMain
do not work. Only if i specify
iosArm64()
or
iosX64()
target it starts working. Is it supposed to be like this? If so how can I use cocoapods dependencies for all ios targets at once?
a

Artyom Degtyarev [JB]

12/15/2020, 6:34 AM
Hello, @arnis71! What do you mean under the “dependencies do not work” here? AFAIK, the high-lightning shouldn’t work correctly for a configuration like that, but the framework should build as expected. If this is your case, please consider looking at this issue(https://youtrack.jetbrains.com/issue/KT-42319), describing the problem’s causes and possible workarounds.
a

arnis71

12/15/2020, 7:24 AM
I meant that dependencies are not highlighted in this case. Thank you for the link this is exactly the issue I am facing. As I understand it will be fixed in the future? Right now i’ve found building either x64 or arm64 depending on the flag sufficeint for me.
a

Artyom Degtyarev [JB]

12/15/2020, 7:29 AM
Yes, there is a plan to make it better(see the task here, one can subscribe for updates if interested), but there is no ETA yet.
👍 1
m

Mayank

12/15/2020, 12:39 PM
You can try using one of the 2 workarounds mentioned in https://kotlinlang.org/docs/reference/migrating-multiplatform-project-to-14.html#try-the-hierarchical-project-structure Though platform dependencies seem to work fine without these workarounds but in case of cocoapods, applying these seems to do the trick
a

Artur Matsehor

12/18/2020, 11:45 AM
@esdudnik
2 Views