Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xcode code completion issue with copyFrameworkResourcesToApp and cocoapods with pod dependencies #387

Closed
peterfromearth opened this issue Oct 4, 2022 · 3 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@peterfromearth
Copy link

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.

@Ustimov
Copy link

Ustimov commented Apr 1, 2023

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?

@ExNDY
Copy link
Contributor

ExNDY commented Apr 17, 2024

will be fixed in 0.24.0, please check in 0.24.0-alpha-6

@Alex009 Alex009 added the bug Something isn't working label Apr 19, 2024
@Alex009
Copy link
Member

Alex009 commented Apr 19, 2024

fixed in 0.24.0-beta-1

@Alex009 Alex009 closed this as completed Apr 19, 2024
@Alex009 Alex009 mentioned this issue Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants