compose-multiplatform icon indicating copy to clipboard operation
compose-multiplatform copied to clipboard

[1.6.10-beta02] [iOS] Gradle re-sync keep trying to update project.pbxproj incorrectly

Open AlexanderEggers opened this issue 1 year ago • 2 comments

Describe the bug After updating to 1.6.10-beta02, I noticed that almost every gradle re-sync attempts to make updates to the project.pbxproj file. The potential changes are sometimes around removing the [CP] Copy Pods Resources or [CP] Embed Pods Frameworks build phases. If I would allow these changes, my ios project would stop working - so ignoring these changes actually works fine at this moment.

Affected platforms

  • iOS

Versions

  • Kotlin version: 2.0.0-RC1
  • Compose Multiplatform version: 1.6.10-beta02

To Reproduce Steps and/or the code snippet to reproduce the behavior:

  1. Ensure that the project is setup with a shared folder which is exposed as a cocoapod static framework.
  2. Do a gradle sync
  3. See project.pbxproj changes

Expected behavior No incorrect changes to the project.pbxproj file which would break ios projects.

AlexanderEggers avatar Apr 26 '24 06:04 AlexanderEggers

Update: I had a closer look at the issue and the issue seems to be much more significant in regards to iOS. It doesn't actually automatically detect the composeResource folder anymore. I did a test and the relevant Pods-iosApp-resources-{configuration}-{input/output}-files.xcfilelist are not longer created for some reasons. If I add these manually, then everything seems to work but otherwise it just cannot find any shared resources anymore which might explain why the build system tries to remove the relevant build phase.

AlexanderEggers avatar Apr 27 '24 08:04 AlexanderEggers

Random thought.. the root cause could be around the fact that I named my compose (shared) code framework different than the folder name which is containing the code.

So my project folder structure is:

  • androidApp
  • iosApp
  • shared

The framework name for the "shared" folder is called "CommonLib". For the most part that seems to work but the podspec definition spec.resources keeps pointing to ['build/compose/ios/shared/compose-resources'] which is not correct. It should be ['build/compose/ios/CommonLib/compose-resources']. So I just renamed my shared framework to "shared" and finally the relevant xcfilelist files are generated again.

I hope some of these observations help to understand my issue.

Update: Nvm my last message... the issue is back with the project being unable to create the right xcfilelist files.. I had to manually add back the files if I would do a full clean of the ios project.

AlexanderEggers avatar Apr 27 '24 08:04 AlexanderEggers

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.

okushnikov avatar Aug 26 '24 13:08 okushnikov