I am working on a flutter project which uses local database. For local database I am using sqflite plugin https://pub.dartlang.org/packages/sqflite. My application is working fine without installing sqflite. However, as soon as I install sqflite. It stops running for ios. I am receiving below errors.
import
1 error generated.
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
In file included from /Users/user/Documents/DEVELOPMENT/Flutter_Dev/Flutter_project/FlutterDatabaseSQFLite-master/ios/Runner/AppDelegate.m:1:
/Users/user/Documents/DEVELOPMENT/Flutter_Dev/Flutter_project/FlutterDatabaseSQFLite-master/ios/Runner/AppDelegate.h:2:9: fatal error: 'Flutter/Flutter.h' file not found
import
^~~~~~~~~~~~~~~~~~~
1 error generated.
/Users/user/Documents/DEVELOPMENT/Flutter_Dev/Flutter_project/FlutterDatabaseSQFLite-master/ios/Runner/main.m:2:9: fatal error: 'Flutter/Flutter.h' file not found
import
^~~~~~~~~~~~~~~~~~~
1 error generated.
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
ld: file not found: /Users/user/Library/Developer/Xcode/DerivedData/Runner-ctqhqjwcexxoquevqxydctpmagio/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/Objects-normal/x86_64/AppDelegate.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Could not build the application for the simulator.
Error launching application on iPhone 8 Plus.
. And the strange thing is after this error, if I create new project of flutter it gives me below error.
/Users/user/Documents/DEVELOPMENT/Flutter_Dev/Flutter_project/local_db/ios/Runner/AppDelegate.h:1:9: fatal error: 'Flutter/Flutter.h' file not found import ^~~~~~~~~~~~~~~~~~~ 1 error generated. === BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug === /Users/user/Documents/DEVELOPMENT/Flutter_Dev/Flutter_project/local_db/ios/Runner/main.m:1:9: fatal error: 'Flutter/Flutter.h' file not found #import ^~~~~~~~~~~~~~~~~~~ 1 error generated. === BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug === In file included from /Users/user/Documents/DEVELOPMENT/Flutter_Dev/Flutter_project/local_db/ios/Runner/GeneratedPluginRegistrant.m:5: /Users/user/Documents/DEVELOPMENT/Flutter_Dev/Flutter_project/local_db/ios/Runner/GeneratedPluginRegistrant.h:8:9: fatal error: 'Flutter/Flutter.h' file not found #import ^~~~~~~~~~~~~~~~~~~ 1 error generated. === BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug === ld: file not found: /Users/user/Library/Developer/Xcode/DerivedData/Runner-eqhuhphzvosrgvdilnpudqzvakju/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/Objects-normal/x86_64/AppDelegate.o clang: error: linker command failed with exit code 1 (use -v to see invocation) Could not build the application for the simulator. Error launching application on iPhone 8 Plus.
And the application stops working. Here is the output of flutter doctor command.
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v0.8.7-pre.6, on Mac OS X 10.14 18A384a, locale en-IN)
[!] Android toolchain - develop for Android devices (Android SDK 28.0.2)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✓] iOS toolchain - develop for iOS devices (Xcode 9.3)
[✓] Android Studio (version 3.1)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.27.2)
[✓] Connected devices (1 available)
Please help me in this. Thanks in advance.
Try changing the Flutter channel from Master to Beta
In the terminal open the flutter directory and set the export path the type
flutter channel beta
Related
I'm working on a project of a team and get this error when i try to debug.
My flutter doctor found no issue and I am not familiar with the code since I get the project repo from someone else.
Launching lib/main.dart on iPhone 13 in debug mode...
lib/main.dart:1
Xcode build done. 1.8s
Failed to build iOS app
Error output from Xcode build:
↳
objc[52692]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x21604eb90) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1079642c8). One of the two will be used. Which one is undefined.
objc[52692]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x21604ebe0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x107964318). One of the two will be used. Which one is undefined.
** BUILD FAILED **
Xcode's output:
↳
Writing result bundle at path:
/var/folders/v_/6mfr50g51js_jftp_690pynr0000gn/T/flutter_tools.JycZbC/flutter_ios_build_temp_dirAePF6Z/temporary_xcresult_bundle
In file included from /Users/furkansuren/FlutterDev/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/FLTWKNavigationDelegate.m:5:
/Users/furkansuren/FlutterDev/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/FLTWKNavigationDelegate.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
In file included from /Users/furkansuren/FlutterDev/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/FLTCookieManager.m:5:
/Users/furkansuren/FlutterDev/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/FLTCookieManager.h:5: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/v_/6mfr50g51js_jftp_690pynr0000gn/T/flutter_tools.JycZbC/flutter_ios_build_temp_dirAePF6Z/temporary_xcresult_bundle
Lexical or Preprocessor Issue (Xcode): 'Flutter/Flutter.h' file not found
/Users/furkansuren/FlutterDev/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/FLTWKNavigationDelegate.h:4:8
2
Lexical or Preprocessor Issue (Xcode): 'Flutter/Flutter.h' file not found
/Users/furkansuren/FlutterDev/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/FLTCookieManager.h:4:8
2
Could not build the application for the simulator.
Error launching application on iPhone 13.
Exited (sigterm)
EDIT:
After I deleted the derived data and tried: flutter clean > flutter pub get > cd ios > pod install > pod update and try to build the app again, i get the same error.
Ran into this issue myself, all SO answers seem to point towards cleaning, pod install,... The correct answer is buried deep in the Flutter
However, this is caused by the checkbox "For install builds only" on the "Run Script" inside of the Xcode project Build Phases for the target Runner. This needs to be unselected.
https://github.com/flutter/flutter/issues/99387#issuecomment-1081238267
downgrade your XCode to 13.4.1 and wait for cocoaspods to adapt XCode 14 project file
This is happening with my HomewidgetExtension target (as I checked in Xcode) which I implemented using home_widget plugin.
I tried pod deintegrate/install/update, deleting and restoring flutter, flutter upgrade etc but it was not helpful.
Flutter version:2.10.3
Xcode version: 13.3
macOS Monterey
Please help me.
flutter run results:
`Launching lib/main.dart on iPhone SE (3rd generation) in debug mode...
Running pod install...
Running Xcode build...
Xcode build done. 42.5s
Failed to build iOS app
Error output from Xcode build:
↳
2022-03-28 20:49:33.569 xcodebuild[5209:41927] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-03-28 20:49:33.569 xcodebuild[5209:41927] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
** BUILD FAILED **
Xcode's output:
↳
Writing result bundle at path:
/var/folders/v5/kpr5p68x3pq_y1zffc3fycq00000gn/T/flutter_tools.DnSqEu/flutter_ios_build_temp_dirDdzw4s/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
Error (Xcode): Framework not found Flutter
Could not build the application for the simulator.
Error launching application on iPhone SE (3rd generation).`
Running "flutter pub get" in my_app... 362ms
Launching lib/main.dart on iPhone 11 in debug mode...
Running Xcode build...
└─Compiling, linking and signing... 1,375ms
Xcode build done. 6.7s
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: Building targets in parallel
note: Planning build
note: Constructing build description
Try this
Delete the flutter folder at the FLUTTER PATH, and recopy the same path in the flutter folder.
I cannot run Flutter for iOS simulator, I use iPhone XS Simulator. There is nothing issue when I run with Android Emulator.
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
While building module 'Flutter' imported from /Users/user/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/connectivity-0.4.8+1/ios/Classes/FLTConnectivityPlugin.h:5:
In file included from <module-includes>:1:
/Users/user/AndroidStudioProjects/app/ios/Pods/../Flutter/Flutter.framework/Headers/Flutter.h:54:10: fatal error: 'FlutterAppDelegate.h' file not found
#include "FlutterAppDelegate.h"
^~~~~~~~~~~~~~~~~~~~~~
1 error generated.
In file included from /Users/user/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/connectivity-0.4.8+1/ios/Classes/FLTConnectivityPlugin.m:5:
/Users/user/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/connectivity-0.4.8+1/ios/Classes/FLTConnectivityPlugin.h:5:9: fatal error: could not build module 'Flutter'
#import <Flutter/Flutter.h>
~~~~~~~^
2 errors generated.
Could not build the application for the simulator.
Error launching application on iPhone Xs.
This is flutter doctor detail.
[✓] Flutter (Channel beta, v1.14.6, on Mac OS X 10.14.6 18G87, locale en-ID)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 10.3)
[✓] Android Studio (version 3.4)
[✓] VS Code (version 1.43.2)
[✓] Connected device (1 available)
Anyone can help me? thank you...
steps to reproduce:
react-native init FirstProject
cd FirstProject
open ios/FirstProject.xcodeproj
... Xcode opens the project:
I select build target iOS Simulator -> Iphone XR
A terminal window opens in the background:
However, Xcode returns a build error:
ld: library not found for -lDoubleConversion
clang: error: linker command failed with exit code 1 (use -v to see invocation)
shown with warnings here https://gist.github.com/jasonfb/7b51a260df419590c6fadda93fb49348
You should be opening the workspace, not the project file as indicated per instructions at the end of the project creation script:
• cd "/Users/xxx/FirstProject" && npx react-native run-ios
- or -
• Open FirstProject/ios/FirstProject.xcworkspace in Xcode or run "xed -b ios"
• Hit the Run button```