Flutter run failed with IOS simulator error Flutter.h - ios

I'm getting error below when run app with simulator but i don't even have this package in my pubspec.yaml
Pubscpec.yaml
f
lutter_launcher_icons: ^0.8.1
cupertino_icons: ^1.0.0
cloud_firestore: ^0.16.0
firebase_core: ^0.7.0
material_floating_search_bar: ^0.2.6
theme_provider: ^0.4.0+1
modal_progress_hud: ^0.1.3
flutter_switch: ^0.2.0
algolia: ^0.1.7
font_awesome_flutter: ^8.11.0
carousel_slider: ^2.3.1
flutter_onboard: ^0.0.3+1
flutter_login: ^1.0.13
firebase_auth: ^0.20.0
shared_preferences: ^0.5.12+4
like_button: ^1.0.4
salomon_bottom_bar: ^2.0.1
firebase_admob: ^0.11.0+1
sliding_up_panel: ^1.0.2
date_format: ^1.0.9
firebase_analytics: ^7.0.1
flutter_staggered_animations: ^0.1.2
auto_size_text: ^2.1.0
google_fonts: ^1.1.2
url_launcher: ^5.7.10
flutter_bounce: ^1.0.8
flutter_html: ^1.2.0
page_transition: "^1.1.7+6"
cached_network_image: ^2.5.1
ERROR
** BUILD FAILED **
Xcode's output:
↳
In file included from /Users/emirkutlugun/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/JavaScriptChannelHandler.m:5:
/Users/emirkutlugun/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/JavaScriptChannelHandler.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max.
Exited (sigterm)
how can I fix it, tried removing podfile and deleting ios file with backup, flutter pub upgrade, and also tried to delete webview manually, it just keep throving same error with different package.

Related

Flutter The argument type 'void Function(TapDownDetails)' can't be assigned to the parameter type 'void Function(TapDragDownDetails)?

I'm getting the following error when I try to run the flutter app on my iPhone simulator.
Error (Xcode):
../../../../.pub-cache/hosted/pub.dev/flutter_math_fork-0.5.0/lib/src/widgets/selection/gesture_detector_builder.dart:186:20: Error: The argument type 'void Function(TapDownDetails)' can't be
assigned to the parameter type 'void Function(TapDragDownDetails)?'.
Could not build the application for the simulator.
Error launching application on iPhone 13 Pro Max.```
here is my dependancies
cupertino_icons: ^1.0.2
flutter_redux: ^0.10.0
dio: ^4.0.3
redux_thunk: ^0.4.0
url_launcher: ^6.1.5
modal_bottom_sheet: ^2.0.0
dropdown_search: ^5.0.5
flutter_html: ^2.1.5
linkable: ^3.0.1
lottie: ^2.2.0
flutter_rating_bar: ^4.0.0
shared_preferences: ^2.0.7
device_info_plus: ^8.0.0
percent_indicator: ^4.2.2
animated_widgets: ^1.1.0
skeletons: ^0.0.3
google_mobile_ads:
firebase_core:
firebase_analytics: ^10.1.0
webview_flutter_plus:
gsheets: ^0.4.2
get_it: ^7.2.0
woocommerce_api: ^0.1.0
skeleton_loader: ^2.0.0+4
I've tried the following.
am using the flutter stable channel.
flutter clean
flutter upgrade
by removing xCode derived data.
also I tried to fix the error showing by changing the parameter type even it's a package, but then I've to change the code on flutter sdk too. I tried to do that too but still not luck.
Since the flutter_math_fork is not a package that I use directly.
I had to find the issue by running flutter pub deps to see the dependancy graph and find the usage of the package. Then I realised that It is a dependancy of flutter_html then I tried to update the version of flutter_math_fork as well as flutter_html but it wasn't success. So I removed that package and used the following package flutter_widget_from_html as an alternative to the flutter_html then the problem solved.

Xcode archive generate this error : Failed to package, Command PhaseScriptExecution failed with a nonzero exit code

Project run well on iOS simulator but doesn't work on real device nor archiving via xcode , it gives me this error
"Command PhaseScriptExecution failed with a nonzero exit code"
script name?
/bin/sh -c /Users/Amr/Library/Developer/Xcode/DerivedData/Runner-ahbetghgyehinuhheozsxpjhchwh/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Runner.build/Release-iphoneos/Runner.build/Script-9740EEB61CF901F6004384FC.sh
Xcode log:
Failed to package /project.
Command PhaseScriptExecution failed with a nonzero exit code
flutter doctor log:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.10.3, on macOS 12.2.1 21D62 darwin-x64, locale en-SA)
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 13.3)
[✓] Android Studio (version 2021.1)
[✓] Connected device (1 available)
! Error: Amr’s iPhone is not connected. Xcode will continue when Amr’s iPhone is connected. (code -13)
[✓] HTTP Host Availability
• No issues found!
pubspec.yaml
cupertino_icons: ^1.0.2
http: ^0.13.3
introduction_screen: ^3.0.0
flutter_zoom_drawer: ^2.1.1
shared_preferences: ^2.0.7
device_info_plus: ^3.1.0
sms_autofill: ^2.0.1
sizer: ^2.0.13
flutter_spinkit: ^5.0.0
local_auth: ^1.1.7
flutter_contacts: ^1.1.1
share_plus: ^3.0.0
path_provider: ^2.0.4
flutter_page_indicator: ^0.0.3
json_annotation: ^4.4.0
json_serializable: ^6.1.5
build_runner: ^2.1.7
intl: ^0.17.0
smooth_page_indicator: ^1.0.0+2
circular_countdown_timer: ^0.2.0
circular_bottom_navigation: ^2.0.0
custom_navigation_bar: ^0.8.2
flutter_svg: ^1.0.3
flutter_svg_provider: ^1.0.3
tab_indicator_styler: ^2.0.0
flutter_rating_bar: ^4.0.0
flutter_staggered_grid_view: ^0.4.0
responsive_framework: ^0.1.4
url_launcher: ^6.0.10
webview_flutter: ^3.0.1
pie_chart: ^5.0.1
select_form_field: ^2.2.0
syncfusion_flutter_charts: ^19.3.44+1
cool_alert: ^1.1.0
image_picker: ^0.8.4+1
flutter_sound: ^9.1.7
just_audio: ^0.9.18
record: ^3.0.0
provider: ^6.0.1
permission_handler:
flutter_cached_pdfview:
loading:
git:
url: git://github.com/leonzone/loading.git
path: loading
ref: 8f5a63f
flutter_slidable: ^1.1.0
direct_select_flutter: ^1.1.1
pull_to_refresh: ^2.0.0
flutter_icons:
image_path: "assets/images/appicon.png"
android: true
ios: true
dev_dependencies:
flutter_test:
sdk: flutter
& xcode version: Version 13.3 (13E113)
Also getting this on terminal using "flutter build ios --release" command
Xcode's output:
↳
Writing result bundle at path:
/var/folders/p_/vscnsc151p94y69x5gpnshv40000gp/T/flutter_tools.Iz0teh/flutter_ios_build_temp_dirrfh0Oh/temporary_xcresult_bundle
Failed to package /Users/Amr/Developer/taqati.
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
Result bundle written to path:
/var/folders/p_/vscnsc151p94y69x5gpnshv40000gp/T/flutter_tools.Iz0teh/flutter_ios_build_temp_dirrfh0Oh/temporary_xcresult_bundle
[Xcode image is attached below][1]
Just make sure that your Project's Runner has all the configuration set.If any of the set is missing , please select it and rebuild again.
[1]: https://i.stack.imgur.com/UYobQ.png

Unable to run flutter. Throws "couldn't find package fluttery:" error

This is the error
description: A new Flutter project.
version: 0.9.91+50
environment:
sdk: ">=2.1.0 <3.0.0"
dependencies:
flutter:
SDK: flutter
cupertino_icons: ^0.1.2
audioplayers: ^0.11.0
agora_rtc_engine: ^0.9.4
cached_network_image: ^0.7.0
country_pickers: ^1.0.1
dio: ^2.0.22
flutter_launcher_icons: ^0.7.0
flutter_rating: ^0.0.2
fluttery: ^0.0.8
font_awesome_flutter: ^8.4.0
get_it: ^1.0.3
google_sign_in: ^4.0.1+3
image_picker: ^0.5.0+3
intl: ^0.15.7
intro_views_flutter: ^2.4.0
permission_handler: ^3.0.0
photo_view: ^0.2.1
razorpay_plugin: ^0.2.9
rxdart: ^0.21.0
shared_preferences: ^0.5.1+1
side_header_list_view: ^0.0.4
strings: ^0.1.0
url_launcher: ^5.0.2
path_provider: ^0.5.0+1
screen: ^0.0.5
flutter_typeahead: ^1.4.0
flutter_chips_input: ^1.2.0
intro_slider: ^1.2.0
dev_dependencies:
flutter_test:
sdk: flutter
flutter_icons:
android: "ic_launcher"
ios: true
image_path: "assets/images/ic_launcher.jpg"
# For information on the generic Dart part of this file, see the
# following page: https://www.dartlang.org/tools/pub/pubspec
# The following section is specific to Flutter.
flutter:
uses-material-design: true
# To add assets to your application, add an assets section, like this:
assets:
- assets/images/
- assets/
This is my pubspec.YAML file.
I have installed flutter and tried to run an existing flutter project on iPhone.
When I try running flutter, I get this error.
I tried searching for solutions but couldn't find one. Can anyone let me know what needs to be done?
I cannot find fluttery package in pub
Maybe is deleted. Check fluttery_dart2 as an alternative.
This is happening because flutter configured podfile that way. Default generated podfile by flutter won't allow ios build to download the nested dependencies.
To resolve you can alter podfile file by this and your issue would be resolved.
Search for this piece of code
target 'Runner' do
# Flutter Pod
And replace it with below
target 'Runner' do
use_frameworks!
# Flutter Pod
Update
Fluttery package is removed/temporary down due to flutter upgrade. So you should update your pubspec.yaml file with
fluttery_dart2: ^0.0.9
library to use the same functionality. Well this library will not be for long time once the original one will back.
Please read the note here

Has anyone seen this compile error with stripe_payments on iOS flutter?

I am running a flutter app on iOS with stripe_payment ^0.1.0.
The demo run with only stripe_payment package builds and runs fine.
It doesn't compile when I have multiple packages in my pubspec.
Tried clearing the pub cache and run flutter packages get, tried deleting pod file and run pod install again
Error:
/Users/../flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-0.1.0/ios/Classes/STPAddSourceViewController.m:42:32: error: property 'managedAccountCurrency' not found on object of type 'STPAddSourceViewController *' cardParams.currency = self.managedAccountCurrency; ^ 6 warnings and 1 error generated. Could not build the application for the simulator. Error launching application on iPhone Xs. Exited (sigterm)
My pubspec has the following dependencies:
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
flutter_local_notifications:
cupertino_icons: ^0.1.2
firebase_auth: ^0.14.0
firebase_core: ^0.4.0+8
cloud_firestore: ^0.12.9
google_sign_in: ^4.0.6
firebase_messaging: ^5.1.2
url_launcher: ^5.0.1
flutter_auth_buttons: ^0.3.1
geolocator: ^5.1.1
stripe_payment: ^0.1.0
cloud_functions: ^0.4.1
Does anyone know where this error is coming from?
I think it a conflict with one of the other packages, but not sure how to find that
I just updated the plugin to support the latest Stripe plugins on Android and iOS, which should have fixed your issue:
https://pub.dev/packages/stripe_payment/versions/0.1.1
I've changed my Podfile with:
platform :ios, '10.0'
And after flutter clean I can compile my project.

Flutter ios - app works on simulator fails on deploying to iphone - library not found for -lFirebaseCore

As the title states I can run my app on ios simulator but when I attempt to deploy my app to the iphone through Xcode I get the error message
:-1: library not found for -lFirebaseCore
Any suggestions on what I might be doing wrong ? This is my pubspec.yaml
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^0.1.0
http: "^0.11.3+16"
crypto: any
validate: "^1.6.0"
json_annotation: ^0.2.4
image_picker: "^0.4.1"
firebase_messaging: ^2.1.0
device_info: ^0.2.1
location: ^1.4.1
cached_network_image: "^0.4.1"
mutex: #"^0.0.1"
logging: "^0.11.3+1"
uuid: ">=1.0.0"
web_socket_channel: ^1.0.9
dev_dependencies:
flutter_test:
sdk: flutter
build_runner:
json_serializable: ^0.5.2
Any suggestions are more than welcome. Thanks
I don't remember exactly, but you have to include either firebase_database or firebase_auth in pubspec.yaml. I'll make a test and update this later.
Try cd into the iOS folder of your flutter projects directory and run
pod install

Resources