xcode-kotlin icon indicating copy to clipboard operation
xcode-kotlin copied to clipboard

Add sources as folder reference instead of using xcodeSync Gradle plugin

Open remysanfeliu opened this issue 4 years ago • 3 comments

Using the xcode gradle sync plugin add the Kotlin source files in groups inside the XCode project. This forces the script to be run everytime a Kotlin source file is created or moved.

Instead, I suggest creating Folder References on the XCode project pointing to the commonMain and iOSMain in the Kotlin project. This allows debugging in the same way in Xcode, and ensures that the sources are always being up to date.

Special notice : be careful not to add the folder reference to the target, otherwise all your Kotlin sources will be exported in your .ipa bundle.

remysanfeliu avatar Feb 28 '20 12:02 remysanfeliu

This is great. I figured there was possibly another way to do this, but hadn't researched it enough apparently.

kpgalligan avatar Feb 28 '20 19:02 kpgalligan

I see, that this issue is still open. What kind of work is still expected on xcode-kotlin plugin side?

AlexTrotsenko avatar Sep 22 '20 10:09 AlexTrotsenko

Assigning to me. I want to make sure the docs describe how to do this accurately, then will close.

kpgalligan avatar Mar 20 '22 12:03 kpgalligan