moko-kswift icon indicating copy to clipboard operation
moko-kswift copied to clipboard

Describe Xcode integration ways

Open Alex009 opened this issue 3 years ago • 3 comments

How to integrate without cocoapods, directly to project - https://github.com/Alex009/moko-kswift-usage-sample/tree/regular-framework How to integrate with cocoapods - call kswift****podspec task, add generated podspec to project podfile (sample in moko-kswift use this way)

Alex009 avatar May 10 '22 03:05 Alex009

is this working for you? I tried using the snippet in your example to copy the swift file to generated, but still can't use swift framework, actually, it doesn't even create a framework for swift, it's only one file...

alandoni avatar May 19 '22 13:05 alandoni

plugin not generates any framework. it generates swift files that you can compile with your project and kotlin framework. maybe links here help you

Alex009 avatar May 28 '22 09:05 Alex009

well, it seems that with cocoapods it generates the library by itself, so I thought that it would generate the framework as well

alandoni avatar May 30 '22 23:05 alandoni

Is there any other way to integrate with Xcode without Cocoapods? If you copy it into Xcode, the file will be out of date whenever you change a sealed class. And my whole idea of using this project is not too miss any cases. And also creating an Xcode reference doesn't work since the file is put into a folder such as iosSimulatorArm64/debugFramework which changes based on current architecture and build configuration. I even tried to copy the file in an Xcode Run Script phase but that also doesn't work since the current architecture cannot be used during that (and is actually undefined). Or perhaps I am missing something?

lammertw avatar Oct 04 '22 21:10 lammertw

Is there any other way to integrate with Xcode without Cocoapods? If you copy it into Xcode, the file will be out of date whenever you change a sealed class. And my whole idea of using this project is not too miss any cases. And also creating an Xcode reference doesn't work since the file is put into a folder such as iosSimulatorArm64/debugFramework which changes based on current architecture and build configuration. I even tried to copy the file in an Xcode Run Script phase but that also doesn't work since the current architecture cannot be used during that (and is actually undefined). Or perhaps I am missing something?

See my comment https://github.com/icerockdev/moko-kswift/issues/55#issuecomment-1269254912

hoc081098 avatar Oct 06 '22 03:10 hoc081098