moko-resources
moko-resources copied to clipboard
Xcode code completion issue with copyFrameworkResourcesToApp and cocoapods with pod dependencies
we use org.jetbrains.kotlin.native.cocoapods plugin
with the following config
cocoapods {
framework {
isStatic = true
}
}
and in xcode
"$SRCROOT/../gradlew" -p "$SRCROOT/../" :shared:copyFrameworkResourcesToApp \
-Pmoko.resources.PLATFORM_NAME=$PLATFORM_NAME \
-Pmoko.resources.CONFIGURATION=$CONFIGURATION \
-Pmoko.resources.BUILT_PRODUCTS_DIR=$BUILT_PRODUCTS_DIR \
-Pmoko.resources.CONTENTS_FOLDER_PATH=$CONTENTS_FOLDER_PATH\
-Pkotlin.native.cocoapods.platform=$PLATFORM_NAME \
-Pkotlin.native.cocoapods.archs="$ARCHS" \
-Pkotlin.native.cocoapods.configuration=$CONFIGURATION
as soon as we add a pod dependency (e.g. pod("nanopb")) the code completion in xcode for the shared lib does not work anymore
if we build without the shared:copyFrameworkResourcesToApp the code completion works.
I could see that during the build the file project/shared.bundle in the folder build/cocoapods/framework/shared.framework is like 20MB large. But after the task shared:copyFrameworkResourcesToApp its only 6 KB anymore.
Hi @Alex009, I've made a minimal project to reproduce this issue: https://github.com/Ustimov/KMMMR. The problem is that the copyFrameworkResourcesToApp task somehow removes the framework's header file and replaces it with placeholder.h. Do you have any idea how to fix it?
will be fixed in 0.24.0, please check in 0.24.0-alpha-6
fixed in 0.24.0-beta-1