Flutter project Error (Xcode): Invalid depfile - ios

I am creating a cross platform app with Flutter and i am having issues with the iOS build. My app launch on web and android but not on the Iphone simulator. the error i am getting is this:
Launching lib/main.dart on iPhone 14 Pro Max in debug mode...
lib/main.dart:1
Xcode build done. 23,0s
Failed to build iOS app
Error (Xcode): Invalid depfile: /Users/anasseddaoudi/Documents/GitHub/of-mobile/.dart_tool/flutter_build/37678b21c2e582bdb0cea05ff46e8c2b/kernel_snapshot.d
Could not build the application for the simulator.
Error launching application on iPhone 14 Pro Max.
Exited
Here's my flutter doctor:
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
Flutter (Channel stable, 3.7.1, on macOS 13.2 22D49 darwin-arm64, locale fr-CA)
Android toolchain - develop for Android devices (Android SDK version 30.0.3)
Xcode - develop for iOS and macOS (Xcode 14.2)
Chrome - develop for the web
Android Studio (version 4.1)
IntelliJ IDEA Community Edition (version 2020.3.3)
VS Code (version 1.56.2)
Connected device (3 available)
HTTP Host Availability
No issues found!
and finaly here's my Pubspec.yaml
name: openfair
description: A new Flutter project.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.8.3+46
environment:
sdk: ">=2.17.0 <3.0.5"
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
cupertino_icons: ^1.0.0
Tools
easy_localization: ^3.0.1
get: ^4.6.5
get_it: 7.2.0
provider: ^6.0.2
intl: ^0.17.0
date_util: ^0.1.4
timeago: ^3.2.2
google_fonts: ^3.0.1
flutter_datetime_picker: 1.5.1
shared_preferences: ^2.0.13
collection: ^1.15.0
another_flushbar: ^1.10.28
google_sign_in: ^5.4.1
flutter_facebook_auth: ^5.0.7
the_apple_sign_in: ^1.1.1
flutter_screenutil: ^5.3.1
image_picker: 0.8.4+6
firebase_storage: ^10.3.1
flutter_stripe: ^4.0.0
flutter_stripe_web: ^1.2.0
firebase_auth: ^3.4.1
firebase_core: ^1.19.1
firebase_analytics: ^9.1.12
firebase_crashlytics: ^2.8.6
cloud_firestore: ^3.2.1
Online
dio: ^4.0.4
pretty_dio_logger: ^1.1.1
UI
flutter_svg: ^1.1.5
flutter_rating_bar: ^4.0.1
cached_network_image: ^3.2.0
modal_bottom_sheet: ^2.1.0
country_picker: ^2.0.19
country_code_picker: ^2.0.2
flutter_image_slideshow: ^0.1.2
firebase_remote_config: ^2.0.2
flutter_keyboard_visibility: ^5.2.0
keyboard_visibility_pro: ^0.0.1
shimmer: ^2.0.0
page_transition: ^2.0.5
http: ^0.13.4
syncfusion_flutter_sliders: ^20.2.36
syncfusion_flutter_charts: ^20.2.36
flutter_dropdown: ^1.0.0+hotfix.1
month_year_picker: ^0.2.0+1
country_state_city_picker: ^1.2.8
credit_card_validator: ^2.0.1
flutter_multi_formatter: ^2.5.8
syncfusion_flutter_datepicker: ^20.2.40
expandable: ^5.0.1
url_launcher: ^6.1.5
flutter_phoenix: ^1.0.0
pay: ^1.1.0
beamer: ^1.5.2
responsive_framework: ^0.2.0
country_phone_code_picker: ^0.0.41
google_tag_manager: ^0.1.0
file_picker: ^3.0.4
flutter_custom_tab_bar: ^1.2.0
email_validator: '^2.1.17'
dialogflow_flutter: ^1.0.0
dropdown_button2: ^1.8.2
badges: ^2.0.3
csv: ^5.0.1
uuid: ^3.0.6
flutter_isolate: ^2.0.4
dropdown_search: ^5.0.3
social_share: ^2.2.1
fluttertoast: ^8.1.2
cloud_functions: ^3.3.9
page_view_indicators: ^2.0.0
universal_html: ^2.0.8
pattern_formatter: ^2.0.0
js: ^0.6.5
dev_dependencies:
flutter_test:
sdk: flutter
flutter_launcher_icons: "^0.10.0"
flutter_icons:
android: "launcher_icon"
ios: true
image_path: "assets/icon.png"
min_sdk_android: 21 # android min sdk min:16, default 21
web:
generate: true
image_path: "assets/icon.png"
background_color: "#hexcode"
theme_color: "#hexcode"
flutter:
uses-material-design: true
assets:
assets/
assets/images/
assets/icons/
assets/of-chatbot-pokh-ee6e49888da7.json
assets/gpay.json
assets/Translation/
fonts:
family: OpenSans
fonts:
asset: fonts/open_sans_light.ttf
weight: 300
asset: fonts/open_sans_regular.ttf
weight: 400
asset: fonts/open_sans_semi_bold.ttf
weight: 600
asset: fonts/open_sans_bold.ttf
weight: 700
asset: fonts/open_sans_extra_bold.ttf
weight: 800
family: RozhaOne
fonts:
asset: fonts/rozhaone-regular.ttf
weight: 400
flutter_intl:
enabled: true
I tried flutter clean, deleting the ios repo, cleaning the Xcode cache, upgraded flutter and dart to the latest stable version and even took off dart:html

Related

Error: The non-abstract class 'InternalSelectableMathState' is missing implementations for these members:

I have a flutter app. It was working perfectly on my intel Mac mini.
Now, I am trying to run my app on my new M1 Macbook Pro 2020.
I completed all the steps correctly and run successfully example counter Flutter app on my new M1 Macbook Pro 2020.
https://docs.flutter.dev/get-started/test-drive?tab=vscode
I downloaded the latest Flutter version & latest VSCode & Latest Xcode.
on This new M1 macbook:
Flutter: 3.3.4
Xcode: 14.0.1
VSCode: 1.17.2
In fact my project was working without any problem on my older intel Mac Mini but versions was older.
on my older Intel Mac Mini:
Flutter: I don't remember but I am sure that it was not 3.3.4
Xcode: I don't remember but I am sure that it was not 14.0.1
VSCode: I don't remember.
Now, I am trying to Start Debugging on iPhone 14 Pro Max(iOS 16) but it gives error.
../../../../../../Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_math_fork-0.3.3+1/lib/src/widgets/selectable.dart:407:7: Error: The
non-abstract class 'InternalSelectableMathState' is missing implementations for these members:
- TextInputClient.insertTextPlaceholder
- TextInputClient.removeTextPlaceholder
- TextSelectionDelegate.copySelection
- TextSelectionDelegate.cutSelection
- TextSelectionDelegate.pasteText
- TextSelectionDelegate.selectAll
Try to either
- provide an implementation,
- inherit an implementation from a superclass or mixin,
- mark the class as abstract, or
- provide a 'noSuchMethod' implementation.
There is no
flutter_math_fork
dependency in my project but interestingly it says this library is problematic. How can it be possible? I did not use this library.
pubspec.yaml
name: app
description: Flutter application.
publish_to: 'none'
version: 1.0.0+1
environment:
sdk: '>=2.12.0 <3.0.0'
dependencies:
flutter:
sdk: flutter
badges: ^2.0.1
cached_network_image: ^3.0.0
cloud_firestore: ^2.3.0
cupertino_icons: ^1.0.3
dots_indicator: ^2.0.0
easy_localization: ^3.0.0
firebase_auth: ^2.0.0
firebase_core: ^1.3.0
firebase_messaging: ^10.0.3
firebase_storage: ^9.0.0
flutter_web_browser: ^0.14.0
flutter_html: ^2.1.0
flutter_widget_from_html: ^0.6.1
google_fonts: ^2.1.0
google_sign_in: ^5.0.4
html: ^0.15.0
html_unescape: ^2.0.0
image_picker: ^0.8.1+3
intl: ^0.17.0
introduction_screen: ^2.1.0
launch_review: ^3.0.1
line_icons: ^2.0.1
lottie: ^1.1.0
package_info: ^2.0.2
path_provider: ^2.0.2
provider: ^5.0.0
share: ^2.0.4
shared_preferences: ^2.0.6
skeleton_text: ^3.0.0
fluttertoast: ^8.0.7
url_launcher: ^6.0.9
youtube_player_flutter: ^8.0.0
youtube_plyr_iframe: ^2.0.7
rounded_loading_button: ^2.0.5
firebase_analytics: ^8.1.2
flutter_facebook_auth: ^3.5.0
the_apple_sign_in: ^1.1.1
video_player: ^2.1.10
flick_video_player: ^0.3.1
flutter_icons:
git:
url: https://github.com/adarsh-technocrat/flutter-icons
md2_tab_indicator:
git:
url: https://github.com/westdabestdb/md2_tab_indicator
google_mobile_ads: ^1.0.1 #^0.13.2
facebook_audience_network: ^1.0.0-nullsafety.0
dev_dependencies:
flutter_test:
sdk: flutter
flutter_launcher_icons: "^0.9.0"
flutter_icons:
android: "launcher_icon"
ios: true
remove_alpha_ios: true #added later.
image_path: "assets/images/icon.png"
# The following section is specific to Flutter.
flutter:
uses-material-design: true
assets:
- assets/images/
- assets/animation_files/
- assets/translations/
fonts:
- family: Poppins
fonts:
- asset: assets/fonts/Poppins-Light.ttf
weight: 400
- asset: assets/fonts/Poppins-Regular.ttf
weight: 500
- asset: assets/fonts/Poppins-Medium.ttf
weight: 600
- asset: assets/fonts/Poppins-SemiBold.ttf
weight: 700
- asset: assets/fonts/Poppins-Bold.ttf
weight: 800
- family: Open Sans
fonts:
- asset: assets/fonts/OpenSans-Light.ttf
weight: 400
- asset: assets/fonts/OpenSans-Regular.ttf
weight: 500
- family: Manrope
fonts:
# - asset: assets/fonts/Manrope-Light.ttf
# weight: 300
- asset: assets/fonts/Manrope-Regular.ttf
weight: 400
- asset: assets/fonts/Manrope-SemiBold.ttf
weight: 500
- asset: assets/fonts/Manrope-Medium.ttf
weight: 600
- asset: assets/fonts/Manrope-Bold.ttf
weight: 700
- asset: assets/fonts/Manrope-ExtraBold.ttf
weight: 900
Note that: I changed only platform :ios, '14.0' in Podfile. It was platform :ios, '10.0'
10.0 --> 14.0
If I make it 10.0 in this new M1 Macbook Pro, it gives
Stored properties cannot be marked potentially unavailable with
'#available',
error.
I changed it 10.0 --> 14.0 to solve this problem but now it gives
non-abstract class 'InternalSelectableMathState' is missing implementations for these members:
error as I stated above.
I'm new to Flutter, how can I solve my problem?
EDIT:
#Jora's solution is not working because I think
dependency_overrides:
flutter_math_fork: ^0.6.0
library conflicts with
provider: ^5.0.0
flick_video_player: ^0.3.1
flutter_widget_from_html: ^0.6.1
flutter_html: ^2.1.0
libraries. Then what is the simplest solution? Thanks...
The linked github issue mentions that this is a problem of flutter_math_fork.
You should upgrade it to a fixed version via
dependencies:
flutter_math_fork: ^0.6.0
or
dependency_overrides:
flutter_math_fork: ^0.6.0

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

flutter ios app shows white screen in testflight mode?

flutter app runs fine in debug mode on simulator but after uploading on app store and running in test flight and after installing to apple device it just shows white screen .app
`
name: lapress
description: A new Flutter project.
https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.1.0+1
environment:
sdk: ">=2.2.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
provider: ^4.3.1
flutter_cupertino_localizations: ^1.0.1
connectivity: ^0.4.9
easy_localization: ^1.4.1
flutter_launcher_icons: ^0.7.5
shared_preferences: ^0.5.8
path_provider: ^1.6.27
url_launcher: ^5.7.10
sqflite: ^1.3.2+2
fluttertoast: ^7.1.6
cupertino_icons: ^0.1.3
table_calendar: ^2.2.3
localstorage: ^3.0.2+5
dev_dependencies:
flutter_test:
sdk: flutter
datetime_picker_formfield: ^1.0.0
http: ^0.12.2
intl_translation: ^0.17.10
flutter_datetime_picker: ^1.5.0
dependency_overrides:
intl: ^0.17.0-nullsafety.2
flutter:
uses-material-design: true
assets:
- image/asset/
- image/asset/asset_lang/
Welcome to SOF ✨:
It actually means there is an error which is not displayed in production (it displays red screen in debug mode, but seems you have no error in debug mode), try displaying error even in production (TestFlight) :
flutter.dev/docs/testing/errors and stackoverflow.com/a/53640242/305135
Specifically for this, sometimes this helps:
Xcode (Good to do)
Product -> Clean
IDE/Command-line (Must do to fix)
Flutter clean
flutter build ios --release
Xcode (Have to do anyways)
Archive
Upload App Store

Submission Flutter App Binary Rejected iOS14

I'm trying to submit a new version of my Flutter App into the Apple Store but the binary from my app is being rejected and I'm not receiving any email's from Apple informing why. I used to receive them but I have no idea of what is going on.
The problem started since since the iOS14 was released.
Any possible ideas?
My pubspec:
name: approachapp
description: A new Flutter application.
version: 1.0.2+14
environment:
sdk: ">=2.2.2 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^0.1.2
firebase_core: ^0.4.4+3
firebase_analytics: ^5.0.11
firebase_auth: ^0.16.0
firebase_database: ^3.1.3
firebase_storage: ^3.1.5
cloud_firestore: ^0.13.5
device_info: ^0.4.1+4
apple_sign_in: ^0.1.0
google_sign_in: ^4.4.4
geolocator: ^5.3.2+2
intl: ^0.16.1
qr_flutter: ^3.1.0
flutter_geofire:
git:
url: git://github.com/marcuslindemannrohden/flutter_geofire
ref: update_query
image_cropper: ^1.3.1
font_awesome_flutter: ^8.8.1
image_picker: ^0.6.6+1
carousel_slider: ^2.2.1
google_nav_bar: ^2.2.0
cloud_functions: ^0.5.0
flutter_launcher_icons: ^0.7.5
cached_network_image: ^2.2.0+1
extended_image: ^0.9.0
url_launcher: ^5.4.11
flushbar: ^1.10.4
hive: ^1.4.4
path_provider: ^1.6.9
flutter_mobx: ^1.1.0+1
mobx: ^1.2.1+1
flutter_modular: ^1.3.0
shared_preferences: ^0.5.7+3
firebase_messaging: ^6.0.16
permission_handler: ^5.0.1+1
story_view: ^0.12.3
scrollable_positioned_list: ^0.1.7
dev_dependencies:
mockito: ^4.1.1
modular_codegen: ^1.0.1+3
mobx_codegen: ^1.1.0+1
build_runner: ^1.10.0
flutter_icons:
android: "launcher_icon"
ios: true
image_path: "assets/images/approachlaunchicon.png"
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
assets:
- assets/images/
vars:
runner: flutter pub run build_runner
clean: flutter clean
get: flutter pub get
scripts:
mobb: $clean & $get & $runner build --delete-conflicting-outputs
mobw: $clean & $get & $runner watch --delete-conflicting-outputs
updateIcons: flutter pub run flutter_launcher_icons:main
buildAndroidProd: flutter build appbundle --release --flavor prod --target lib/main_prod.dart
buildiOSProd: flutter build ios --release --flavor prod --target lib/main_prod.dart

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