How can solve this issues? Error (Xcode): Framework not found Flutter
Asked Answered
A

11

11

How can solve this issues? Error (Xcode): Framework not found Flutter

I tried to more methods,

tried to delete ios then pod install...

tried to flutter clean...

tried to create new project etc.

but still cannot solve.

Launching lib/main.dart on iPhone 13 Pro Max in debug mode...
/Users/pin-chientseng/Desktop/yomate/ios/Runner/Info.plist: Property List error: Found non-key inside <dict> at line 56 / JSON error:
JSON text did not start with array or object and option to allow fragments not set. around line 1, column 0.
Xcode build done.                                           221.1s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    Writing result bundle at path:
        /var/folders/rg/v6d4v6m545949bhd3pv5555r0000gn/T/flutter_tools.hhxYin/flutter_ios_build_temp_dirsANWae/temporary_xcresult_bundle

    ld: framework not found Flutter
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    note: Using new build system
    note: Planning
    note: Build preparation complete
    note: Building targets in dependency order
    warning: Stale file '/Users/pin-chientseng/Desktop/yomate/build/ios/Debug-iphonesimulator/Runner.app/GoogleService-Info.plist' is
    located outside of the allowed root paths.

    note: Removed stale file
    '/Users/pin-chientseng/Library/Developer/Xcode/DerivedData/Runner-bfllcubjuppngacurzilkdnplylp/Build/Intermediates.noindex/Runner
    .build/Debug-iphonesimulator/Runner.build/InputFileList-5F0225AF943341352A9BA345-Pods-Runner-resources-Debug-input-files-37e3c74e
    61b246db180ac6f1b6f5519a-resolved.xcfilelist'

    note: Removed stale file
    '/Users/pin-chientseng/Library/Developer/Xcode/DerivedData/Runner-bfllcubjuppngacurzilkdnplylp/Build/Intermediates.noindex/Runner
    .build/Debug-iphonesimulator/Runner.build/InputFileList-678E497CE5823DAA4909D0F3-Pods-Runner-frameworks-Debug-input-files-6f17fb4
    132a6c963427e5fd8c0f46475-resolved.xcfilelist'

    note: Removed stale file
    '/Users/pin-chientseng/Library/Developer/Xcode/DerivedData/Runner-bfllcubjuppngacurzilkdnplylp/Build/Intermediates.noindex/Runner
    .build/Debug-iphonesimulator/Runner.build/OutputFileList-5F0225AF943341352A9BA345-Pods-Runner-resources-Debug-output-files-2b94b0
    84fd7edee03f689887bc427bd3-resolved.xcfilelist'

    note: Removed stale file
    '/Users/pin-chientseng/Library/Developer/Xcode/DerivedData/Runner-bfllcubjuppngacurzilkdnplylp/Build/Intermediates.noindex/Runner
    .build/Debug-iphonesimulator/Runner.build/OutputFileList-678E497CE5823DAA4909D0F3-Pods-Runner-frameworks-Debug-output-files-3dbe4
    531b144e8e556eea6741f7e46e6-resolved.xcfilelist'

    note: Removed stale file
    '/Users/pin-chientseng/Library/Developer/Xcode/DerivedData/Runner-bfllcubjuppngacurzilkdnplylp/Build/Intermediates.noindex/Runner
    .build/Debug-iphonesimulator/Runner.build/Script-5F0225AF943341352A9BA345.sh'

    note: Removed stale file
    '/Users/pin-chientseng/Library/Developer/Xcode/DerivedData/Runner-bfllcubjuppngacurzilkdnplylp/Build/Intermediates.noindex/Runner
    .build/Debug-iphonesimulator/Runner.build/Script-678E497CE5823DAA4909D0F3.sh'

    note: Removed stale file
    '/Users/pin-chientseng/Library/Developer/Xcode/DerivedData/Runner-bfllcubjuppngacurzilkdnplylp/Build/Intermediates.noindex/Runner
    .build/Debug-iphonesimulator/Runner.build/Script-69D48C77EE5D169DAA62588C.sh'

    /Users/pin-chientseng/Desktop/yomate/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
    'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.2.99. (in target
    'FMDB' from project 'Pods')
    /Users/pin-chientseng/Desktop/yomate/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
    'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.2.99. (in target
    'leveldb-library' from project 'Pods')

    Result bundle written to path:
        /var/folders/rg/v6d4v6m545949bhd3pv5555r0000gn/T/flutter_tools.hhxYin/flutter_ios_build_temp_dirsANWae/temporary_xcresult_bundle


Error (Xcode): Framework not found Flutter


Could not build the application for the simulator.
Error launching application on iPhone 13 Pro Max.

enter image description here

enter image description here

if I used this methods,

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      if Gem::Version.new('8.0') > Gem::Version.new(config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'])
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '8.0'
      end
    end
  end
end

i will got this error...

Launching lib/main.dart on iPhone 13 Pro Max in debug mode...
Running pod install...                                             38.2s
Running Xcode build...                                                  
Xcode build done.                                           28.7s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    Writing result bundle at path:
        /var/folders/rg/v6d4v6m545949bhd3pv5555r0000gn/T/flutter_tools.gk0YEl/flutter_ios_build_temp_dirWL743Q/temporary_xcresult_bundle

    /Users/pin-chientseng/Development/flutter/.pub-cache/hosted/pub.dartlang.org/video_player_avfoundation-2.3.4/ios/Classes/messages
    .g.m:7:9: fatal error: 'Flutter/Flutter.h' file not found
    #import <Flutter/Flutter.h>
            ^~~~~~~~~~~~~~~~~~~
    1 error generated.
    note: Using new build system
    note: Planning
    note: Build preparation complete
    note: Building targets in dependency order

    Result bundle written to path:
        /var/folders/rg/v6d4v6m545949bhd3pv5555r0000gn/T/flutter_tools.gk0YEl/flutter_ios_build_temp_dirWL743Q/temporary_xcresult_bundle


Lexical or Preprocessor Issue (Xcode): 'Flutter/Flutter.h' file not found
/Users/pin-chientseng/Development/flutter/.pub-cache/hosted/pub.dartlang.org/video_player_avfoundation-2.3.4/ios/Classes/messages.g.m
:6:8


Could not build the application for the simulator.
Error launching application on iPhone 13 Pro Max.
Ancier answered 17/5, 2022 at 0:48 Comment(3)
try flutter pub cache repair Marni
@Marni same issues..Ancier
check this answer: https://mcmap.net/q/844763/-cocoapods-framework-not-found-firebasecorediagnosticsWoody
P
15

In my case, I got this error after deleting the flutter instances while trying to clean up some storage on my 258go macbook to update Xcode :(, in doing so I probably deleted the flutter.framework.

The solutions given here have not changed anything for me.

So I tried to clean up everything in the pod, including the cache. The pod install command failed because it missed the ios tools, which can be downloaded with flutter precache --ios.

So the complete process to solve this problem for me was :

cd ios
pod cache clean --all
rm -rf ~/Library/Caches/CocoaPods
rm -rf Pods
rm -rf ~/Library/Developer/Xcode/DerivedData/*
pod deintegrate
flutter precache --ios
pod install

I hope that this solution will help someone and prevent them from losing a whole day's work as it did for me.

Poe answered 18/5, 2022 at 1:1 Comment(3)
has problem....Xcode's output: ↳ Writing result bundle at path: /var/folders/rg/v6d4v6m545949bhd3pv5555r0000gn/T/flutter_tools.WB2dli/flutter_ios_build_temp_dirDaUUqz/temporary_xcresult_bundle ld: framework not found Flutter clang: error: linker command failed with exit code 1 (use -v to see invocation) note: Using new build system note: Planning note: Build preparation complete note: Building targets in dependency order Result bundle written to path: Error (Xcode): Framework not found FlutterAncier
This is the exact scenario for me, except after trying your solution, I had to upgrade flutter and run my project from the command line using flutter run.Malmo
This was the same case for me, however, running flutter upgrade was enough to fix the issue for me.Mimosaceous
R
6

Solved the same problem:

  1. flutter upggrade
  2. flutter clean
  3. flutter run
Rammish answered 17/3, 2023 at 21:33 Comment(0)
W
5

I have tried many solutions for this error. The only possible solution is to delete the flutter folder in the FLUTTER PATH, and re-copy the flutter folder.

This solved my error.

Wyman answered 17/5, 2022 at 0:59 Comment(4)
So I need to backup my project then delete it. Create again then paste back?Ancier
@Ancier Just need to delete flutter folder and then you can put flutter folder to the same path and extract latest flutter zip and restart system,it will work..Wyman
what's the extract latest flutter zip? I tried to delete ios>flutter folder, then I create new project. Copy the ios>fullter folder then paste to old project ios>fullter. I got same error... Error (Xcode): Framework not found Flutter & The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.2.99. (in target 'FMDB' from project 'Pods')Ancier
Thank you, I wouldn't think that this was a flutter folder issue, after I deleted the flutter and added it again from the original zip file, I got the real error, before it was building without clear error, thank youResource
D
4

I had the same error after renaming the project and changing bundleId. Fixed it:

cd ios
pod cache clean --all
flutter clean
flutter pub get
Dipsomania answered 14/5, 2023 at 7:59 Comment(0)
M
3

That problem of not finding FMDB framework is related to a bug in Cocoapods.

You can solve by it editing the Pods-Runner-frameworks.sh script:

Replace:

if [ -L "${source}" ]; then
  echo "Symlinked..."
  source="$(readlink "${source}")"
fi

with:

if [ -L "${source}" ]; then
  echo "Symlinked..."
  source="$(readlink -f "${source}")"
fi

Note that -f was added.

Then you can archive it and upload your app.

Melanous answered 23/7, 2023 at 4:23 Comment(1)
I think this is default now.Peppard
T
2

I have tried all the answers, the only thing worked for me was to remove Flutter and reinstall it again.

Troupe answered 20/4, 2023 at 6:35 Comment(0)
P
1

I was cleaning data storage on my mac and cleared xcode cache, that's why this problem appeared. I had stable Flutter 3.0.0 version in my projects and have problems with last version So my solution was

  1. flutter upgrade (wait .....)
  2. flutter downgrade
  3. flutter pub get
Photocathode answered 5/5, 2023 at 9:47 Comment(0)
P
1

I have fixed it by adding share_plus: to pubspec.yaml file

Pagandom answered 12/8, 2023 at 16:14 Comment(0)
M
1

I have this error too, in my case I have error after delete dependencies in pubspec.yaml:

flutter 'Error (Xcode): Framework not found OrderedSet'

I fix it by find ‘OrderedSet’ in project.pbxproj and delete

"-framework",
"\"OrderedSet\"",

enter image description here

Meshed answered 4/4, 2024 at 10:2 Comment(0)
P
0

1- flutter channel beta 2- flutter upgrade 3- flutter run 4- flutter channel stable 5- flutter upgrade 6- flutter run

Phionna answered 3/12, 2022 at 1:52 Comment(1)
You might find this info helpful: stackoverflow.com/editing-helpJessamine
F
0

Maybe you forgot to add PATH to your shell command enter image description here

https://docs.flutter.dev/get-started/install/macos/desktop?tab=download#add-flutter-to-your-path

Felisafelise answered 23/4, 2024 at 2:20 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.