Skip to content

Missing ExplicitPrecompiledModules/*.pcm files after flutter build ios-framework (Flutter 3.27.4 + Xcode 16.1) #172965

@canhth

Description

@canhth

Description

When building my add-to-app Flutter module on Flutter 3.27.4 with Xcode 16.1, the intermediate Clang/Swift .pcm files under Release/iphoneos/ExplicitPrecompiledModules/ appear during the build but are deleted before the final frameworks are exported.
This might lead to spurious warnings at runtime and prevent me from using the debugger (po commands fail, log found in swift-healthcheck command).

Environment

  • Flutter SDK: 3.27.4
  • Xcode: 16.1
  • Integrating via CocoaPods into a host app

Reproduction Steps

  1. In my Flutter module directory run:
flutter build ios-framework \
  --xcframework --cocoapods --static \
  --output=../ios_add_to_app_module

  1. Add the generated Flutter/*.xcframework into your host app via CocoaPods.
  2. Archive or run on a real device under Xcode 16.1 (iOS 18+).

What I See

  • During the build you can watch:
…/iosFramework/Release/iphoneos/ExplicitPrecompiledModules/ObjectiveC-… .pcm  ← exists
…/iosFramework/Release/iphoneos/ExplicitPrecompiledModules/… .pcm  ← exists
  • But once the script finishes, the entire ExplicitPrecompiledModules directory (and all .pcm files) is gone.

  • Then run/build my main iOS application and Xcode logs warnings like:

<CI_DIR_WHERE_THE_CLONE_AND_BUILD_IS_RUN>/iosFramework/Release/iphoneos/ExplicitPrecompiledModules/ObjectiveC-A6MDA3W50IZMQAM3P5D5ZTBK0.pcm: No such file or directory
<CI_DIR_WHERE_THE_CLONE_AND_BUILD_IS_RUN>/iosFramework/Release/iphoneos/ExplicitPrecompiledModules/Darwin-8B8MY6TXFKP1K3OAGPFJCYSW9.pcm: No such file or directory
<CI_DIR_WHERE_THE_CLONE_AND_BUILD_IS_RUN>/iosFramework/Release/iphoneos/ExplicitPrecompiledModules/GoogleDataTransport-D0TFDRIV54DRZP7TMY32S30TN.pcm: No such file or directory
<CI_DIR_WHERE_THE_CLONE_AND_BUILD_IS_RUN>/iosFramework/Release/iphoneos/ExplicitPrecompiledModules/GoogleUtilities-73PDH4YWHG17DDMLJBSMN3QOW.pcm: No such file or directory
<CI_DIR_WHERE_THE_CLONE_AND_BUILD_IS_RUN>/iosFramework/Release/iphoneos/ExplicitPrecompiledModules/Foundation-4BPD4XDPYK3N0Y6OENZI8LWD3.pcm: No such file or directory
<CI_DIR_WHERE_THE_CLONE_AND_BUILD_IS_RUN>/iosFramework/Release/iphoneos/ExplicitPrecompiledModules/nanopb-3U4LXQVEWVII32INECRMVF908.pcm: No such file or directory
<CI_DIR_WHERE_THE_CLONE_AND_BUILD_IS_RUN>/iosFramework/Release/iphoneos/ExplicitPrecompiledModules/DarwinFoundation-DFO6DUIPJKU11ULBPN5MNQV1V.pcm: No such file or directory

What I Expect

  • Either the .pcm files should be carried through into the exported framework slice so the debugger has its module cache
  • Or Flutter’s build script should disable explicit module generation (and silence these warnings) when producing standalone xcframeworks

Could someone from the Flutter tools/engine team weigh in on:

  1. Is this expected behavior on 3.27.4 + Xcode 16?

  2. What is the recommended way to either preserve the .pcm module cache in an add-to-app xcframework or disable its generation cleanly?

  3. Any pointer to new build flags or upcoming fixes in later Flutter releases?

Metadata

Metadata

Assignees

No one assigned

    Labels

    in triagePresently being triaged by the triage teamwaiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter responds

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions