James
03/25/2025, 11:34 AMtapchicoma
03/25/2025, 12:54 PMTimofey Solonin
03/25/2025, 12:57 PMit fails to find the search paths in our QA variantDo you see a compilation error in the consuming Swift/Objective-C code or is it a linkage error or something different?
Timofey Solonin
03/25/2025, 1:15 PMFramework Search Paths
at all. Since 2.0.0
just calling embedAndSignAppleFrameworkForXcode
should be enough and K/N generated framework should be produced by Kotlin Gradle Plugin at search paths Xcode build system passes to the compilers and the linker implicitly.James
03/25/2025, 2:02 PMJames
03/25/2025, 2:03 PMJames
03/25/2025, 2:27 PMFramework Search Paths
just shows the big ?
whenever I try and drill into something in the generated lib. 😅James
03/25/2025, 2:37 PM?
when trying to get details for items in the generated lib. If I look at composeApp/build/xcode-frameworks
I just see a Debug-QA
folder (the name of my config) with the framework.
If I build to prod scheme and config then in the same place I get a Debug
folder with the framework in it. Selecting items now works and I do not get the ?
. Removing this again and the ?
appears again. (this also works if you rename the -QA
dir to remove that suffix, so somewhere it’s still expecting the non-suffixed version).
In my mind reading through the docs the KOTLIN_FRAMEWORK_BUILD_TYPE
felt like it was trying to normalise this. So whatever config you’ve made in Xcode, you’ll just get a Debug
and Release
dir in xcode-frameworks
. So I’m wondering if I’ve misunderstood this, missed something or found an issue. 😅Timofey Solonin
03/25/2025, 5:04 PM./gradlew :composeApp:embedAndSignAppleFrameworkForXcode
change the call to be
CONFIGURATION="$([ "$CONFIGURATION" = "Debug" ] || [ "$CONFIGURATION" = "Release" ] && echo "$CONFIGURATION" || echo "$KOTLIN_FRAMEWORK_BUILD_TYPE")" ./gradlew :composeApp:embedAndSignAppleFrameworkForXcode
then add the FRAMEWORK_SEARCH_PATH
entry:
$(SRCROOT)/../composeApp/build/xcode-frameworks/$(KOTLIN_FRAMEWORK_BUILD_TYPE)/$(SDK_NAME)
and also specify KOTLIN_FRAMEWORK_BUILD_TYPE
for each of your Xcode configurations to be either debug
or release
Does the Xcode code completion and the build work as you expect with these changes?James
03/25/2025, 7:19 PMCONFIGURATION="$([ "$CONFIGURATION" = "Debug" ] || [ "$CONFIGURATION" = "Release" ] && echo "$CONFIGURATION" || echo "$KOTLIN_FRAMEWORK_BUILD_TYPE")"
cd "$SRCROOT/.."
./gradlew :composeApp:embedAndSignAppleFrameworkForXcode
But that seems to work. Now in xocde-frameworks
there’s a Debug
dir when build the QA config/schemeJames
03/25/2025, 7:20 PMKOTLIN_FRAMEWORK_BUILD_TYPE
, does it matter about the capitalisation of Debug
and Release
? I’ve left it as capatalised (like the docs show) but I’ve seen it a few places lowercase 🤔Timofey Solonin
03/25/2025, 7:24 PMcapitalisation ofCapitalization doesn't matterandDebug
Release
James
03/25/2025, 7:30 PMJames
03/25/2025, 7:32 PMTimofey Solonin
03/25/2025, 7:33 PMwe can continue to use the extra lines in the run script as a work around for now?Yes
James
03/25/2025, 7:33 PM