Repository: flutter
Issue: dyld[40089]: Library not loaded: @rpath/FBLPromises.framework/Versions/A/FBLPromises
Labels: c: crash,tool,platform-mac,t: xcode,a: desktop,P2,team-macos,triaged-macos

### Steps to reproduce

From last week I am facing this issue while building my app for MacOS. I have tried pod deintegrate, flutter pub cache clean, flutter clean and many other solutions available on Internet, but not able to resolve this.
I believe it is coming from PromisesObjc Pod. So I don't know which flutter dependency is causing this, hence not able to give reproductions steps.

### Expected results

App should run in MacOS, as it was till last week.

### Actual results

Crashing on build

### Logs

<details><summary>Logs</summary>

```console
Launching lib/main.dart on macOS in debug mode...
Building macOS application...                                   
2023-09-06 12:10:51.093 xcodebuild[39048:2903520] DVTCoreDeviceEnabledState: DVTCoreDeviceEnabledState_Disabled set via user default (DVTEnableCoreDevice=disabled)
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:arm64, id:00006000-000445A80CA3801E }
{ platform:macOS, arch:x86_64, id:00006000-000445A80CA3801E }
dyld[40089]: Library not loaded: @rpath/FBLPromises.framework/Versions/A/FBLPromises
  Referenced from: <8D411ADD-B3DB-317D-8797-BAD7D66A93C3> /Users/akshay/Documents/GitHub/pm_tool_unflavor/build/macos/Build/Products/Debug/pm_tool_unflavor.app/Contents/MacOS/pm_tool_unflavor
  Reason: tried: '/usr/lib/swift/FBLPromises.framework/Versions/A/FBLPromises' (no such file, not in dyld cache), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/swift/FBLPromises.framework/Versions/A/FBLPromises' (no such file), '/usr/lib/swift/FBLPromises.framework/Versions/A/FBLPromises' (no such file, not in dyld cache), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/swift/FBLPromises.framework/Versions/A/FBLPromises' (no such file), '/Users/akshay/Documents/GitHub/pm_tool_unflavor/build/macos/Build/Products/Debug/pm_tool_unflavor.app/Contents/Frameworks/FBLPromises.framework/Versions/A/FBLPromises' (code signature invalid in <B1B299F1-F908-385A-81AF-0CDEEFFC4DE2> '/Users/akshay/Documents/GitHub/pm_tool_unflavor/build/macos/Build/Products/Debug/pm_tool_unflavor.app/Contents/Frameworks/FBLPromises.framework/Versions/A/FBLPromises' (errno=1) sliceOffset=0x00000000, codeBlobOffset=0x00032860, codeBlobSize=0x000052C0), '/Users/akshay/Documents/GitHub/pm_tool_unflavor/build/macos/Build/Products/Debug/pm_tool_unflavor.app/Contents/MacOS/Frameworks/FBLPromises.framework/Versions/A/FBLPromises' (no such file), '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/FBLPromises.framework/Versions/A/FBLPromises' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/FBLPromises.framework/Versions/A/FBLPromises' (no such file), '/Users/akshay/Documents/GitHub/pm_tool_unflavor/build/macos/Build/Products/Debug/pm_tool_unflavor.app/Contents/MacOS/../Frameworks/FBLPromises.framework/Versions/A/FBLPromises' (code signature invalid in <B1B299F1-F908-385A-81AF-0CDEEFFC4DE2> '/Users/akshay/Documents/GitHub/pm_tool_unflavor/build/macos/Build/Products/Debug/pm_tool_unflavor.app/Contents/Frameworks/FBLPromises.framework/Versions/A/FBLPromises' (errno=1) sliceOffset=0x00000000, codeBlobOffset=0x00032860, codeBlobSize=0x000052C0), '/usr/lib/swift/FBLPromises.framework/Versions/A/FBLPromises' (no such file, not in dyld cache), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/swift/FBLPromises.framework/Versions/A/FBLPromises' (no such file), '/Users/akshay/Documents/GitHub/pm_tool_unflavor/build/macos/Build/Products/Debug/pm_tool_unflavor.app/Contents/Frameworks/FBLPromises.framework/Versions/A/FBLPromises' (code signature invalid in <B1B299F1-F908-385A-81AF-0CDEEFFC4DE2> '/Users/akshay/Documents/GitHub/pm_tool_unflavor/build/macos/Build/Products/Debug/pm_tool_unflavor.app/Contents/Frameworks/FBLPromises.framework/Versions/A/FBLPromises' (errno=1) sliceOffset=0x00000000, codeBlobOffset=0x00032860, codeBlobSize=0x000052C0), '/usr/lib/swift/FBLPromises.framework/Versions/A/FBLPromises' (no such file, not in dyld cache), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/swift/FBLPromises.framework/Versions/A/FBLPromises' (no such file), '/usr/lib/swift/FBLPromises.framework/Versions/A/FBLPromises' (no such file, not in dyld cache), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/swift/FBLPromises.framework/Versions/A/FBLPromises' (no such file), '/Users/akshay/Documents/GitHub/pm_tool_unflavor/build/macos/Build/Products/Debug/pm_tool_unflavor.app/Contents/Frameworks/FBLPromises.framework/Versions/A/FBLPromises' (code signature invalid in <B1B299F1-F908-385A-81AF-0CDEEFFC4DE2> '/Users/akshay/Documents/GitHub/pm_tool_unflavor/build/macos/Build/Products/Debug/pm_tool_unflavor.app/Contents/Frameworks/FBLPromises.framework/Versions/A/FBLPromises' (errno=1) sliceOffset=0x00000000, codeBlobOffset=0x00032860, codeBlobSize=0x000052C0), '/Users/akshay/Documents/GitHub/pm_tool_unflavor/build/macos/Build/Products/Debug/pm_tool_unflavor.app/Contents/MacOS/Frameworks/FBLPromises.framework/Versions/A/FBLPromises' (no such file), '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/FBLPromises.framework/Versions/A/FBLPromises' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/FBLPromises.framework/Versions/A/FBLPromises' (no such file), '/Users/akshay/Documents/GitHub/pm_tool_unflavor/build/macos/Build/Products/Debug/pm_tool_unflavor.app/Contents/MacOS/../Frameworks/FBLPromises.framework/Versions/A/FBLPromises' (code signature invalid in <B1B299F1-F908-385A-81AF-0CDEEFFC4DE2> '/Users/akshay/Documents/GitHub/pm_tool_unflavor/build/macos/Build/Products/Debug/pm_tool_unflavor.app/Contents/Frameworks/FBLPromises.framework/Versions/A/FBLPromises' (errno=1) sliceOffset=0x00000000, codeBlobOffset=0x00032860, codeBlobSize=0x000052C0), '/usr/lib/swift/FBLPromises.framework/Versions/A/FBLPromises' (no such file, not in dyld cache), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/swift/FBLPromises.framework/Versions/A/FBLPromises' (no such file), '/Users/akshay/Documents/GitHub/pm_tool_unflavor/build/macos/Build/Products/Debug/pm_tool_unflavor.app/Contents/Frameworks/FBLPromises.framework/Versions/A/FBLPromises' (code signature invalid in <B1B299F1-F908-385A-81AF-0CDEEFFC4DE2> '/Users/akshay/Documents/GitHub/pm_tool_unflavor/build/macos/Build/Products/Debug/pm_tool_unflavor.app/Contents/Frameworks/FBLPromises.framework/Versions/A/FBLPromises' (errno=1) sliceOffset=0x00000000, codeBlobOffset=0x00032860, codeBlobSize=0x000052C0), '/Library/Frameworks/FBLPromises.framework/Versions/A/FBLPromises' (no such file), '/System/Library/Frameworks/FBLPromises.framework/Versions/A/FBLPromises' (no such file, not in dyld cache)
Error waiting for a debug connection: The log reader stopped unexpectedly, or never started.
Error launching application on macOS.
```

</details>


### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
fvm flutter doctor -v
[✓] Flutter (Channel stable, 3.13.2, on macOS 13.5.1 22G90 darwin-arm64, locale en-IN)
    • Flutter version 3.13.2 on channel stable at /Users/akshay/fvm/versions/stable
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ff5b5b5fa6 (13 days ago), 2023-08-24 08:12:28 -0500
    • Engine revision b20183e040
    • Dart version 3.1.0
    • DevTools version 2.25.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/akshay/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E300c
    • CocoaPods version 1.12.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (version unknown)
    • Android Studio at /Applications/Android Studio Preview.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    ✗ Unable to determine Android Studio version.
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] VS Code (version 1.81.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.72.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 13.5.1 22G90 darwin-arm64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 116.0.5845.140

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.
```

</details>