-
Notifications
You must be signed in to change notification settings - Fork 29.1k
Description
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
- In my Flutter module directory run:
flutter build ios-framework \
--xcframework --cocoapods --static \
--output=../ios_add_to_app_module
- Add the generated Flutter/*.xcframework into your host app via CocoaPods.
- 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:
-
Is this expected behavior on 3.27.4 + Xcode 16?
-
What is the recommended way to either preserve the .pcm module cache in an add-to-app xcframework or disable its generation cleanly?
-
Any pointer to new build flags or upcoming fixes in later Flutter releases?