RushDroid
RushDroid

Reputation: 1600

Flutter iOS "ld: framework not found Flutter"

I have created on sample project and was successfully running on both platform. But I have updated the android studio and then after iOS app stops working. I am not able to run iOS app. Here are the logs which I am facing.

    Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    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 parallel
    note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/gRPC-C++/gRPCCertificates-Cpp.bundle'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/sqflite/sqflite.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/fluttertoast/fluttertoast.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/firebase_storage/firebase_storage.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/firebase_core/firebase_core.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/flutter_facebook_auth/flutter_facebook_auth.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/firebase_auth/firebase_auth.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/cloud_firestore/cloud_firestore.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/Pods_Runner.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/GoogleUtilities/GoogleUtilities.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/GoogleDataTransport/GoogleDataTransport.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/gRPC-C++/grpcpp.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/FirebaseCoreDiagnostics/FirebaseCoreDiagnostics.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/FirebaseCore/FirebaseCore.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/gRPC-Core/grpc.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/FirebaseFirestore/FirebaseFirestore.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/FBSDKCoreKit_Basics/FBSDKCoreKit_Basics.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/path_provider_ios/path_provider_ios.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/Toast/Toast.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/PromisesObjC/FBLPromises.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/shared_preferences_ios/shared_preferences_ios.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/nanopb/nanopb.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/image_picker/image_picker.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/abseil/absl.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/leveldb-library/leveldb.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/FMDB/FMDB.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/GTMSessionFetcher/GTMSessionFetcher.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/BoringSSL-GRPC/openssl_grpc.framework'

/Users/Rushabh/Documents/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.0.99. (in target 'FMDB' from project 'Pods')
/Users/Rushabh/Documents/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.0.99. (in target 'Toast' from project 'Pods')
/Users/Rushabh/Documents/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.0.99. (in target 'BoringSSL-GRPC' from project 'Pods')
/Users/Rushabh/Documents/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.0.99. (in target 'abseil' from project 'Pods')
/Users/Rushabh/Documents/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.0.99. (in target 'leveldb-library' from project 'Pods')
/Users/Rushabh/Documents/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.0.99. (in target 'gRPC-Core' from project 'Pods')
/Users/Rushabh/Documents/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.0.99. (in target 'gRPC-C++' from project 'Pods')
/Users/Rushabh/Documents/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.0.99. (in target 'gRPC-C++-gRPCCertificates-Cpp' from project 'Pods')

Could not build the application for the simulator. Error launching application on iPhone 11.

I am using bumblebee version of android studio. I have tried pod deintegrated and pod install but still not working.

Thanks is advance.

Upvotes: 1

Views: 8858

Answers (3)

Wei Liu
Wei Liu

Reputation: 575

Reinstall flutter solved the problem for me.

I am using fvm and have a project using flutter 3.3.4. When I build my project

fvm flutter build ios 

I got:

Error (Xcode): Framework not found Flutter

Error (Xcode): Linker command failed with exit code 1 (use -v to see invocation)

After reinstall flutter, the project builds without error.

fvm remove 3.3.4
fvm install 3.3.4

Upvotes: 2

Vishal Zaveri
Vishal Zaveri

Reputation: 1557

You need upgrade packages according to your iOS deployment target & flutter SDK version.

Then try below steps.

  1. Run flutter clean
  2. Run flutter pub get
  3. Remove xcode derived data - check this link
  4. Remove Pods folder form project iOS folder.
  5. Remove Podfile.lock file from project iOS folder.
  6. Remove project.workspace file
  7. Run again in iOS platform.

Upvotes: 4

Tran Phan
Tran Phan

Reputation: 1

Also faced the same issue, what I did is uninstalling flutter and installing it again https://docs.flutter.dev/get-started/install

Upvotes: 0

Related Questions