Aleksey Zamulla
04/03/2024, 4:54 AMPablichjenkov
04/03/2024, 5:56 AMrusshwolf
04/03/2024, 3:06 PMAleksey Zamulla
04/03/2024, 4:27 PMthis Xcframework cannot contain assets or resourcesYes, that is still true, the framework itself does not contain resources. Right now only local integration works with resources, and we don't have it documented well, unfortunately, especially concerning resource usage. It's on the radar. You can reproduce the way the Compose Multiplatform plugin does bundling, but that's tinkering with build phases in Xcode.
Aleksey Zamulla
04/03/2024, 4:29 PMOne complication the article doesn't get into is authenticationThat's a good one, I'll bring it up with the team.
Thomas Flad
04/04/2024, 12:21 PMPablichjenkov
04/04/2024, 3:51 PMAleksey Zamulla
04/05/2024, 8:21 AMmonorepo setupIf I understand you correctly, that's what we want to touch on next: the projects that our wizard generates are essentially that. By the way, if those who are interested in SPM support are welcome to add their use cases here: https://youtrack.jetbrains.com/issue/KT-53877
Thomas Flad
04/05/2024, 9:24 AMbinaryTarget
option and let the SPM module use the generated XCFramework in the corresponding build path of the shared library. But Xcode will not notice changes and you have to recompile the whole project. It would be nice when an official SPM Gradle Plugin would be able to generate the SPM module for the current configuration (debug vs. release) and target type (iOS, watchOS, etc.) and handles the build efficiently.
Currently, we have a custom Gradle Plugin which is using the Xcode environment variables to determine build and target and builds the corresponding XCFramework (based on the
XCFrameworkTask
). Then it copies it to the corresponding SPM path and removes the relevant cache in the DerivedData folder. This task is executed as a Pre-action of the Scheme. We cannot use a Build Phase since Xcode will run Build Phases after resolving the SPM dependencies.Pablichjenkov
04/05/2024, 1:53 PMiOSApp
structure. The pattern I have seen is one project iOSApp
module that depends on a iOSAppPackage
module. The last one contains all Package.swift stuff.