I'm having issues trying to add cloud_firestore dependence to any project I create. I've created fresh project which builds and runs in iOS (I haven't installed an android simulator yet). But when I add the cloud_firestore dependency line into the pubspec.yaml, get the dependency, and then try and build, I get the following error:
Launching lib/main.dart on iPhone X in debug mode...
Xcode build done. 2.3s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
/Flutter/hello_world/hello_world/ios/Pods/leveldb-library/table/block.cc:13:10:
fatal error: 'util/coding.h' file not found
#include "util/coding.h"
^~~~~~~~~~~~~~~
1 error generated.
Could not build the application for the simulator.
My pubspec.xaml file:
name: hello_world
description: A new Flutter project.
version: 1.0.0+1
environment:
sdk: ">=2.0.0-dev.68.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cloud_firestore:
cupertino_icons: ^0.1.2
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
Related
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 just upgraded my Flutter version to 1.22.0. After upgrading and making some changes for Firebase my Android app started working, but I am unable to build and run the iOS app on emulator or on physical device.
The terminal shows the following errors when I try to run the app in the emulator or physical device. The emulator runs on iOS 14 and the physical device is on 14.0.1.
Emulator: ld: symbol(s) not found for architecture x86_64
Actual device: ld: symbol(s) not found for architecture arm64
I also executed the following commands but still not working...
flutter clean && \
rm ios/Podfile ios/Podfile.lock pubspec.lock && \
rm -rf ios/Pods ios/Runner.xcworkspace && \
flutter run
Flutter Doctor:
[✓] Flutter (Channel stable, 1.22.0, on Mac OS X 10.15.7 19H2, locale en-US)
• Flutter version 1.22.0 at /Volumes/demouser/Flutter/FlutterSDK/flutter
• Framework revision d408d302e2 (7 days ago), 2020-09-29 11:49:17 -0700
• Engine revision 5babba6c4d
• Dart version 2.10.0
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/demouserdemouser/Library/Android/sdk
• Platform android-29, build-tools 29.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.0.1, Build version 12A7300
• CocoaPods version 1.9.3
[✓] Android Studio (version 4.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 49.0.2
• Dart plugin version 193.7547
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[✓] VS Code (version 1.49.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.14.1
[✓] Connected device (1 available)
• AOSP on IA Emulator (mobile) • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)
• No issues found!
pubspec.yaml
name: demo
description: demo
version: 1.0.0+1
environment:
sdk: ">=2.5.2 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.0
firebase_auth: ^0.18.1+1
cloud_firestore: ^0.14.1+2
firebase_messaging: ^6.0.16
firebase_storage: ^5.0.0-dev.2
firebase_core: ^0.5.0
firebase_admob: ^0.10.0+1
intl_translation: ^0.17.10+1
http: ^0.12.2
xml: ^4.5.1
shared_preferences: ^0.5.12
flutter_staggered_grid_view: ^0.3.0
flutter_signin_button: ^1.0.0
image_picker: ^0.6.7+11
mlkit: ^0.15.1
cached_network_image: ^2.3.2+1
permission_handler: ^5.0.1+1
url_launcher: ^5.7.2
share: ^0.6.5+2
simple_connectivity: ^0.1.1
us_states: ^1.0.3
cloud_functions: ^0.6.0+1
email_validator: ^1.0.4
package_info: ^0.4.3
device_info: ^0.4.2+8
expandable: ^4.1.4
launch_review: ^2.0.0
xml2json: ^4.4.0
purchases_flutter: ^1.3.1
dev_dependencies:
flutter_test:
sdk: flutter
flutter_launcher_icons: ^0.7.5
flutter_icons:
image_path: "icon/new_icon.png"
android: false
ios: true
Terminal's output:
> Launching lib/main.dart on physical iPhone in debug mode...
> Automatically signing iOS for device deployment using specified
> development team in Xcode project: 5ABCDEFG9 Running Xcode build...
> Xcode build done. 118.3s
> Failed to build iOS app Error output from Xcode build: ↳
> 2020-10-06 10:59:58.676 xcodebuild[7528:47880] DTDeviceKit: deviceType from a578d1d6cb0d414525f7dc4c6cee was NULL
> 2020-10-06 10:59:58.778 xcodebuild[7528:47881] DTDeviceKit: deviceType from a578d1d6cb0d414525f7dc4c6cee was NULL
> 2020-10-06 10:59:58.778 xcodebuild[7528:47881] DTDeviceKit: deviceType from a578d1d6cb0d414525f7dc4c6cee was NULL
> ** BUILD FAILED **
Xcode's output:
↳
/Volumes/driveD/Flutter/FlutterSDK/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.7.2/ios/Classes/FLTURLLauncherPlugin.m:153:57: warning: 'keyWindow' is deprecated: first deprecated in iOS 13.0 - Should not be used for applications that support multiple scenes as it returns a key window across all connected scenes [-Wdeprecated-declarations]
.keyWindow.rootViewController];
^
In module 'UIKit' imported from /Volumes/driveD/projects/new/demo/ios/Pods/Target Support Files/url_launcher/url_launcher-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:134:51: note: 'keyWindow' has been explicitly marked deprecated here
#property(nullable, nonatomic,readonly) UIWindow *keyWindow API_DEPRECATED("Should not be used for applications that support multiple scenes as it returns a key window across all connected scenes", ios(2.0, 13.0));
-------
ld: symbol(s) not found for architecture arm64
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
Could not build the precompiled application for the device.
Error launching application on physical’s iPhone.
It looks like this problem is coming due to RevenueCat API. When I comment out the import purchases_flutter in the pubspec.yaml file then I am able to install the app but it crashes at startup saying connection lost.
rm -f ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings fixed the issue for me
There are a couple of different answers for this here on stackoverflow. If I am not mistaken, the switch to channel "stable" solved the issue for me, last time.
I have a similar erro
ld: symbol(s) not found for architecture x86_64
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
I also having problems after I upgrade to 1.22.0, I had to also upgrade the flutterFire package, and that seems to be my problem.
the versions that I'm using on pubspec.yaml:
firebase_core: ^0.5.0
cloud_firestore: ^0.14.1+2
firebase_auth: ^0.18.1+1
firebase_analytics: ^5.0.0
cloud_functions: ^0.6.0+1
firebase_storage: ^4.0.1
firebase_crashlytics: ^0.1.0+3
firebase_messaging: ^7.0.2
when trying to run it says to update the CocoaPods spec by running pod repo update, done that, but still got the same error, then running pod install or pod update got the error
tried the commands: pod install --repo-update and pod update Firebase/Storage but still got the same error message
Just remove old flutter installed folder like [.cache] / [pub-cache] because you might have upgraded the flutter version but iOStools and other tools are pointing to older version and it causes these architecture issue.
Finally after doing lot of changes, I found out that the culprit was the purchases_flutter: ^1.3.1 package.
When I remove the package from my yaml file then it starts working. There is a bug already opened for it https://github.com/RevenueCat/purchases-flutter/issues/120.
Thank you every one for your time and help.
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
Cordova version 6.1.1
Cordova ios platform version 6.1.1
I am unable to find any solution for the following error
The following build commands failed:
CompileAssetCatalog build/emulator/myapp1.app myapp1/Images.xcassets
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/appdev/Desktop/All-Apps/myapp1/platforms/ios/cordova/build-debug.xcconfig,-project,myapp1.xcodeproj,ARCHS=i386,-target,myapp1,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Users/appdev/Desktop/All-Apps/myapp1/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/appdev/Desktop/All-Apps/myapp1/platforms/ios/build/sharedpch