Unsure of how to fix this Flutter error. nb_utils issue - xcode

I have been running into this same issue for the past several days while trying to build on iOS. I have tried a ton of different supposed solutions online but nothing has worked. If anyone has run into this issue recently and knows how to fix it please let me know. Any and all help would be much appreciated and thank you in advance. Below is the error output, flutter doctor output, flutter version, Xcode version, and my podfile. Please also let me know if there is any other information I can provide to help.
ERROR OUTPUT
Launching lib/main.dart on iPhone 14 Pro Max in debug mode...
Running pod install...
Running Xcode build...
Xcode build done. 45.9s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
Writing result bundle at path:
/var/folders/9r/ww9pfkld2rz5fggbg7tysf0c0000gn/T/flutter_tools.a2Y2jQ/flutter_ios_build_temp_diriIb8LW/temporary_xcresult_bundle
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-4.4.12/lib/nb_utils.dart:180:50: Error: The argument type 'Duration?' can't be assigned to the parameter type 'Duration' because 'Duration?' is nullable and 'Duration' isn't.
- 'Duration' is from 'dart:core'.
buildPageRoute(widget, pageRouteAnimation, duration),
^
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-4.4.12/lib/nb_utils.dart:185:50: Error: The argument type 'Duration?' can't be assigned to the parameter type 'Duration' because 'Duration?' is nullable and 'Duration' isn't.
- 'Duration' is from 'dart:core'.
buildPageRoute(widget, pageRouteAnimation, duration),
^
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-4.4.12/lib/src/utils/common.dart:67:20: Error: The argument type 'Duration?' can't be assigned to the parameter type 'Duration' because 'Duration?' is nullable and 'Duration' isn't.
- 'Duration' is from 'dart:core'.
toastDuration: duration,
^
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-4.4.12/lib/src/utils/common.dart:199:20: Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.
- 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('../../Developer/flutter/packages/flutter/lib/src/scheduler/binding.dart').
SchedulerBinding.instance!.addPostFrameCallback((_) => onCreated?.call());
^
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-4.4.12/lib/src/utils/common.dart:275:29: Warning: Operand of null-aware operation '??' has type 'Duration' which excludes null.
- 'Duration' is from 'dart:core'.
transitionDuration: duration ?? 1000.milliseconds,
^
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-4.4.12/lib/src/utils/common.dart:282:29: Warning: Operand of null-aware operation '??' has type 'Duration' which excludes null.
- 'Duration' is from 'dart:core'.
transitionDuration: duration ?? 700.milliseconds,
^
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-4.4.12/lib/src/utils/common.dart:289:29: Warning: Operand of null-aware operation '??' has type 'Duration' which excludes null.
- 'Duration' is from 'dart:core'.
transitionDuration: duration ?? 700.milliseconds,
^
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-4.4.12/lib/src/utils/common.dart:299:29: Warning: Operand of null-aware operation '??' has type 'Duration' which excludes null.
- 'Duration' is from 'dart:core'.
transitionDuration: duration ?? 500.milliseconds,
^
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-4.4.12/lib/src/utils/common.dart:309:29: Warning: Operand of null-aware operation '??' has type 'Duration' which excludes null.
- 'Duration' is from 'dart:core'.
transitionDuration: duration ?? 500.milliseconds,
^
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-4.4.12/lib/src/extensions/widget_extensions.dart:267:51: Error: The argument type 'Duration?' can't be assigned to the parameter type 'Duration' because 'Duration?' is nullable and 'Duration' isn't.
- 'Duration' is from 'dart:core'.
buildPageRoute(this!, pageRouteAnimation, duration),
^
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-4.4.12/lib/src/extensions/widget_extensions.dart:272:51: Error: The argument type 'Duration?' can't be assigned to the parameter type 'Duration' because 'Duration?' is nullable and 'Duration' isn't.
- 'Duration' is from 'dart:core'.
buildPageRoute(this!, pageRouteAnimation, duration),
^
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-4.4.12/lib/src/utils/after_layout.dart:11:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../Developer/flutter/packages/flutter/lib/src/widgets/binding.dart').
WidgetsBinding.instance!
^
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-4.4.12/lib/src/widgets/OverlayCustomWidget.dart:59:22: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../Developer/flutter/packages/flutter/lib/src/widgets/binding.dart').
WidgetsBinding.instance!.addPostFrameCallback((_) => showOverlay());
^
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-4.4.12/lib/src/widgets/OverlayCustomWidget.dart:66:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../Developer/flutter/packages/flutter/lib/src/widgets/binding.dart').
WidgetsBinding.instance!
^
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-4.4.12/lib/src/widgets/OverlayCustomWidget.dart:73:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../Developer/flutter/packages/flutter/lib/src/widgets/binding.dart').
WidgetsBinding.instance!
^
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-4.4.12/lib/src/widgets/TimerWidget.dart:41:20: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../Developer/flutter/packages/flutter/lib/src/widgets/binding.dart').
WidgetsBinding.instance?.addObserver(this);
^
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-4.4.12/lib/src/widgets/TimerWidget.dart:56:20: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../Developer/flutter/packages/flutter/lib/src/widgets/binding.dart').
WidgetsBinding.instance?.removeObserver(this);
^
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_datetime_picker-1.5.1/lib/flutter_datetime_picker.dart:311:32: Warning: Operand of null-aware operation '??' has type 'Color' which excludes null.
- 'Color' is from 'dart:ui'.
color: theme.backgroundColor ?? Colors.white,
^
Failed to package /Users/ryannapolitano/Desktop/Skape/ios/...
Command PhaseScriptExecution failed with a nonzero exit code
note: Building targets in dependency order
warning: Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'BoringSSL-GRPC' from project 'Pods')
warning: Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Libuv-gRPC' from project 'Pods')
warning: Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'abseil' from project 'Pods')
warning: Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'gRPC-Core' from project 'Pods')
warning: Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'gRPC-C++' from project 'Pods')
warning: Run script build phase 'Run Script' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Runner' from project 'Runner')
warning: Run script build phase 'Thin Binary' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Runner' from project 'Runner')
note: Run script build phase '[CP] Copy Pods Resources' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'Runner' from project 'Runner')
note: Run script build phase '[CP] Embed Pods Frameworks' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'Runner' from project 'Runner')
Result bundle written to path:
/var/folders/9r/ww9pfkld2rz5fggbg7tysf0c0000gn/T/flutter_tools.a2Y2jQ/flutter_ios_build_temp_diriIb8LW/temporary_xcresult_bundle
Could not build the application for the simulator.
Error launching application on iPhone 14 Pro Max.
FLUTTER DOCTOR OUTPUT
[✓] Flutter (Channel stable, 3.0.5, on macOS 13.0.1 22A400 darwin-x64, locale en-US)
• Flutter version 3.0.5 at /Users/ryannapolitano/Developer/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision f1875d570e (6 months ago), 2022-07-13 11:24:16 -0700
• Engine revision e85ea0e79c
• Dart version 2.17.6
• DevTools version 2.12.2
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
• Android SDK at /Users/ryannapolitano/Library/Android/sdk
• Platform android-33-ext4, build-tools 33.0.1
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
[✓] Connected device (3 available)
• iPhone 14 Pro Max (mobile) • A53BC5BD-D103-44D5-BC9A-E1CA0ECFDD15 • ios • com.apple.CoreSimulator.SimRuntime.iOS-16-2 (simulator)
• macOS (desktop) • macos • darwin-x64 • macOS 13.0.1 22A400 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 109.0.5414.87
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
FLUTTER VERSION
Flutter 3.0.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision f1875d570e (6 months ago) • 2022-07-13 11:24:16 -0700
Engine • revision e85ea0e79c
Tools • Dart 2.17.6 • DevTools 2.12.2
XCODE VERSION
Version 14.2 (14C18)
PODFILE
platform :ios, '12.0'
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
flutter_ios_podfile_setup
target 'Runner' do
use_frameworks!
use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64'
end
end
end

Related

Not able to run flutter application in simulator (iOS 15)

I have update flutter version from 1.x to 2.8.x and now I am trying to run application in Xcode 13.1 and Simulator iOS 15. I am facing this error. 'mobileffmpeg/LogDelegate.h' file not found and Command CompileSwiftSources failed with a nonzero exit code I tried some available solutions but it won't work for me.
I am using latest cocoa pod version 1.11.3
Error-Log (After performing flutter clean and flutter pub get and pod install in iOS)
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
/Users/username/Library/Developer/Xcode/DerivedData/Runner-ewlkrnytkuoiywhfslyuauileapw/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/mobile-ffmpeg-https.build/Script-4C68ADEB2D24F6C2D2249598537085F9.sh:
line 2: /Users/username/Documents/spieler_coach part 2/ios/Pods/Target Support Files/mobile-ffmpeg-https/mobile-ffmpeg-https-xcframeworks.sh: Permission denied
Command PhaseScriptExecution failed with a nonzero exit code
error: the following command failed with exit code 0 but produced no further output
CompileC /Users/username/Library/Developer/Xcode/DerivedData/Runner-ewlkrnytkuoiywhfslyuauileapw/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/webview_flutter_wkwebview.build/Objects-normal/arm64/FlutterWebView.o /Users/username/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview-2.7.1/ios/Classes/FlutterWebView.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'webview_flutter_wkwebview' from project 'Pods')
note: Building targets in dependency order
warning: Run script build phase 'Run Script' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Runner' from project 'Runner')
warning: Run script build phase 'Thin Binary' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Runner' from project 'Runner')
Could not build the application for the simulator.
When you upgrade your flutter version some libs can not work anymore. Have you know meaning of ^ yet? For example: you're using lib abc in version 5.10 like this
abc: ^5.1.0 and abc has other version 5.2.0, ...5.9.0 and 6.0.0. If you use ^ that means version range is from 5.1.0 to 5.9.0. Maybe it has issue in ver 5.9.0. Moreover, sometimes the cause is not your library but its dependency. The abc lib uses xyz inside then it uses higher version that conflict with your flutter version.
So solution here is:
Try fix hard version of all libraries, remove using ^: abc: 5.1.0
If problem comes from dependency of your lib such as xyz. Check your xyz ver from pubspec.lock then add more package xyz into pubspec.yaml with compatible version.
Update:
You seems get issue with package https://pub.dev/packages/flutter_ffmpeg, please check Readme at section label:
2.1.2 iOS (Flutter >= 2.x) then replace two lines below:
def flutter_install_ios_plugin_pods(ios_application_path = nil)
↓
def flutter_install_plugin_pods(application_path = nil, relative_symlink_dir, platform)
plugin_pods = flutter_parse_plugins_file(plugins_file)
↓
plugin_pods = flutter_parse_plugins_file(plugins_file, platform)
Moreover, because the package was discontinued. You should change to https://pub.dev/packages/ffmpeg_kit_flutter

flutter run on ios emulator

Error output from Xcode build:
↳
2022-06-08 15:01:02.170 xcodebuild[77786:964621] 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-06-08 15:01:02.171 xcodebuild[77786:964621] 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/gd/tsbhn_r55f1bzmqmjwj99zzw0000gn/T/flutter_tools.mQ0a7x/flutter_ios_build_temp_dir7medmZ/temporary_xcresult_bundle
Failed to package /Users/thura/Project_studio/bliss.
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
/Users/thura/Project_studio/bliss/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.5.99. (in target 'leveldb-library' from project 'Pods')
Result bundle written to path:
/var/folders/gd/tsbhn_r55f1bzmqmjwj99zzw0000gn/T/flutter_tools.mQ0a7x/flutter_ios_build_temp_dir7medmZ/temporary_xcresult_bundle
"Command PhaseScriptExecution failed with a nonzero exit code" may come from many different sources.
Common ways to fix it:
Delete Derived Datas
Restart your Mac
flutter clean + flutter pub get
in ios folder: pod deintegrate + pod install

App stop running on iOS after upgrading Flutter and Xcode

After upgrading flutter 2.2.0 and Xcode 12.4 iOS app stops running from IDE. However app runs when I run from Xcode itself.
Here is some logs to see.
Flutter run console output
Launching lib/main.dart on iPhone SE (2nd generation) in debug mode...
Xcode build done. 38.3s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
1 warning generated.
10 warnings generated.
/Users/pc/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.10/ios/Classes/TPSStripeManager.m:309:42: warning: comparison of distinct pointer types ('NSString *' and 'NSNull * _Nonnull') [-Wcompare-distinct-pointer-types]
if (_stripeAccount && _stripeAccount != [NSNull null]) {
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~
/Users/pc/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.10/ios/Classes/TPSStripeManager.m:731:42: warning: 'startPollingSourceWithId:clientSecret:timeout:completion:' is deprecated: You should poll your own backend to update based on source status change webhook events it may receive. [-Wdeprecated-declarations]
[stripeAPIClient startPollingSourceWithId:sourceID clientSecret:clientSecret timeout:10 completion:^(STPSource *source, NSError *error) {
^
In module 'Stripe' imported from /Users/pc/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.10/ios/Classes/TPSStripeManager.h:11:
/Users/pc/Desktop/Kishan/touch_ticket_client_app/ios/Pods/Stripe/Stripe/PublicHeaders/STPAPIClient.h:370:243: note: 'startPollingSourceWithId:clientSecret:timeout:completion:' has been explicitly marked deprecated here
- (void)startPollingSourceWithId:(NSString *)identifier clientSecret:(NSString *)secret timeout:(NSTimeInterval)timeout completion:(STPSourceCompletionBlock)completion NS_EXTENSION_UNAVAILABLE("Source polling is not available in extensions") DEPRECATED_MSG_ATTRIBUTE("You should poll your own backend to update based on source status change webhook events it may receive.");
^
In module 'Foundation' imported from /Users/pc/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.10/ios/Classes/TPSStripeManager.h:9:
In module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/AvailabilityMacros.h:183:64: note: expanded from macro 'DEPRECATED_MSG_ATTRIBUTE'
#define DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s)))
^
/Users/pc/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.10/ios/Classes/TPSStripeManager.m:798:20: warning: 'setPublishableKey:' is deprecated: If you used [STPPaymentConfiguration sharedConfiguration].publishableKey, use [STPAPIClient sharedClient].publishableKey instead. If you passed a STPPaymentConfiguration instance to an SDK component, create an STPAPIClient, set publishableKey on it, and set the SDK component's APIClient property. [-Wdeprecated-declarations]
[configuration setPublishableKey:nextPublishableKey];
^
In module 'Stripe' imported from /Users/pc/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.10/ios/Classes/TPSStripeManager.h:11:
/Users/pc/Desktop/Kishan/touch_ticket_client_app/ios/Pods/Stripe/Stripe/PublicHeaders/STPPaymentConfiguration.h:126:50: note: property 'publishableKey' is declared deprecated here
#property (nonatomic, copy, readwrite) NSString *publishableKey DEPRECATED_MSG_ATTRIBUTE("If you used [STPPaymentConfiguration sharedConfiguration].publishableKey, use [STPAPIClient sharedClient].publishableKey instead. If you passed a STPPaymentConfiguration instance to an SDK component, create an STPAPIClient, set publishableKey on it, and set the SDK component's APIClient property.");
^
/Users/pc/Desktop/Kishan/touch_ticket_client_app/ios/Pods/Stripe/Stripe/PublicHeaders/STPPaymentConfiguration.h:126:65: note: 'setPublishableKey:' has been explicitly marked deprecated here
#property (nonatomic, copy, readwrite) NSString *publishableKey DEPRECATED_MSG_ATTRIBUTE("If you used [STPPaymentConfiguration sharedConfiguration].publishableKey, use [STPAPIClient sharedClient].publishableKey instead. If you passed a STPPaymentConfiguration instance to an SDK component, create an STPAPIClient, set publishableKey on it, and set the SDK component's APIClient property.");
^
In module 'Foundation' imported from /Users/pc/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.10/ios/Classes/TPSStripeManager.h:9:
In module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/AvailabilityMacros.h:183:64: note: expanded from macro 'DEPRECATED_MSG_ATTRIBUTE'
#define DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s)))
^
/Users/pc/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.10/ios/Classes/TPSStripeManager.m:1104:23: warning: 'metadata' is deprecated: Metadata is no longer returned to clients using publishable keys. Retrieve them on your server using yoursecret key instead. [-Wdeprecated-declarations]
TPSEntry(metadata),
^
In module 'Stripe' imported from /Users/pc/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.10/ios/Classes/TPSStripeManager.h:11:
/Users/pc/Desktop/Kishan/touch_ticket_client_app/ios/Pods/Stripe/Stripe/PublicHeaders/STPPaymentMethod.h:138:89: note: 'metadata' has been explicitly marked deprecated here
#property (nonatomic, nullable, readonly) NSDictionary<NSString*, NSString *> *metadata DEPRECATED_MSG_ATTRIBUTE("Metadata is no longer returned to clients using publishable keys. Retrieve them on your server using yoursecret key instead.");
^
In module 'Foundation' imported from /Users/pc/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.10/ios/Classes/TPSStripeManager.h:9:
In module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/AvailabilityMacros.h:183:64: note: expanded from macro 'DEPRECATED_MSG_ATTRIBUTE'
#define DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s)))
^
/Users/pc/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.10/ios/Classes/TPSStripeManager.m:1377:16: warning: 'metadata' is deprecated: Metadata is no longer returned to clients using publishable keys. Retrieve them on your server using yoursecret key instead. [-Wdeprecated-declarations]
if (source.metadata) {
^
In module 'Stripe' imported from /Users/pc/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.10/ios/Classes/TPSStripeManager.h:11:
/Users/pc/Desktop/Kishan/touch_ticket_client_app/ios/Pods/Stripe/Stripe/PublicHeaders/STPSource.h:143:89: note: 'metadata' has been explicitly marked deprecated here
#property (nonatomic, nullable, readonly) NSDictionary<NSString*, NSString *> *metadata DEPRECATED_MSG_ATTRIBUTE("Metadata is no longer returned to clients using publishable keys. Retrieve them on your server using yoursecret key instead.");
^
In module 'Foundation' imported from /Users/pc/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.10/ios/Classes/TPSStripeManager.h:9:
In module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/AvailabilityMacros.h:183:64: note: expanded from macro 'DEPRECATED_MSG_ATTRIBUTE'
#define DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s)))
^
/Users/pc/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.10/ios/Classes/TPSStripeManager.m:1378:33: warning: 'metadata' is deprecated: Metadata is no longer returned to clients using publishable keys. Retrieve them on your server using yoursecret key instead. [-Wdeprecated-declarations]
[result setValue:source.metadata forKey:#"metadata"];
^
In module 'Stripe' imported from /Users/pc/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.10/ios/Classes/TPSStripeManager.h:11:
/Users/pc/Desktop/Kishan/touch_ticket_client_app/ios/Pods/Stripe/Stripe/PublicHeaders/STPSource.h:143:89: note: 'metadata' has been explicitly marked deprecated here
#property (nonatomic, nullable, readonly) NSDictionary<NSString*, NSString *> *metadata DEPRECATED_MSG_ATTRIBUTE("Metadata is no longer returned to clients using publishable keys. Retrieve them on your server using yoursecret key instead.");
^
In module 'Foundation' imported from /Users/pc/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.10/ios/Classes/TPSStripeManager.h:9:
In module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/AvailabilityMacros.h:183:64: note: expanded from macro 'DEPRECATED_MSG_ATTRIBUTE'
#define DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s)))
^
/Users/pc/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.10/ios/Classes/TPSStripeManager.m:1731:16: warning: 'STPBillingAddressFieldsZip' is deprecated: Use STPBillingAddressFieldsPostalCode [-Wdeprecated-declarations]
return STPBillingAddressFieldsZip;
^~~~~~~~~~~~~~~~~~~~~~~~~~
STPBillingAddressFieldsPostalCode
In module 'Stripe' imported from /Users/pc/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.10/ios/Classes/TPSStripeManager.h:11:
/Users/pc/Desktop/Kishan/touch_ticket_client_app/ios/Pods/Stripe/Stripe/PublicHeaders/STPAddress.h:48:47: note: 'STPBillingAddressFieldsZip' has been explicitly marked deprecated here
STPBillingAddressFieldsZip __attribute__((deprecated("Use STPBillingAddressFieldsPostalCode", "STPBillingAddressFieldsPostalCode"))) = STPBillingAddressFieldsPostalCode,
^
7 warnings generated.
ld: building for iOS Simulator, but linking in object file built for iOS, file '/Users/pc/Desktop/Kishan/touch_ticket_client_app/ios/Pods/Stripe/InternalFrameworks/libStripe3DS2.a' 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
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 14.4.99. (in target 'Toast' from project 'Pods')
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 14.4.99. (in target 'Flutter' from project 'Pods')
Could not build the application for the simulator.
Error launching application on iPhone SE (2nd generation).
Exited (sigterm)
Flutter Doctor -v output
[✓] Flutter (Channel stable, 2.2.1, on Mac OS X 10.15.7 19H2 darwin-x64, locale en-IN)
• Flutter version 2.2.1 at /Users/pc/Desktop/flutter
• Framework revision 02c026b03c (3 weeks ago), 2021-05-27 12:24:44 -0700
• Engine revision 0fdb562ac8
• Dart version 2.13.1
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Users/pc/Library/Android/sdk
• Platform android-S, build-tools 30.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.10.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 4.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)
[✓] VS Code (version 1.57.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.23.0
[✓] Connected device (2 available)
• iPhone SE (2nd generation) (mobile) • 1996F394-57D4-419A-ABB6-C55113BED393 • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
• Chrome (web) • chrome • web-javascript • Google Chrome 91.0.4472.106
• No issues found!
What I have tried so far:
1) CLEAN BUILD AND RUN
flutter clean
flutter build ios
flutter run
2) RUN AGAIN AFTER FOLLOWING COMMAND
flutter clean && \
rm ios/Podfile ios/Podfile.lock pubspec.lock && \
rm -rf ios/Pods ios/Runner.xcworkspace && \
flutter run
3) REMOVED WorkspaceSettings.xcsettings FILE
rm -f ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
4) REPAIRED PUB CATCH
flutter pub cache repair
Did you try to run these commands? Same problem happened to me after upgrading my Flutter project and with these commands I was able to run my project again on iOS.
cd ios
pod deintegrate
rm Flutter/Flutter.podspec
rm podfile.lock
pod init
pod install
flutter clean
flutter pub get
flutter run
And make sure you have flutter_additional_ios_build_settings in your podfile.
This is mine usually.
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
config.build_settings['SWIFT_VERSION'] = '5.0'
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
flutter_additional_ios_build_settings(target)
end
end
Additionally, consider using pod install --repo-update instead of pod install
Also, can you try to run your project in Xcode through .xcworkspace file? In my experience, Xcode built it with no problem on iOS Simulator but flutter can't. So I was trying to figure out if you encounter the same problem as I had.
EDIT: I also suggest you to update Stripe library to the latest version.
I've had this compatibility problem before, but because of the different projects, there's
no fixed answer;
Step 1. Back up an existing project (I usually create a compression package directly);
Step 2. Working with The iOS Simulator deployment target, change to the lowest supported version of ios 9 instead of iOS 8. (Try to run)
Step 3. Adjust the code one by one according to log prompts, including replacing deprecation methods, updating third-party libraries, and so on.
Important: Error logs are your best helper, follow instructions to deal with, and problems are bound to be resolved.
After many attempts and applying possible solutions now I think that the answers to this question depend on the project and dependencies and there can not be one only perfect solution.
- From my side to solve This problem what I have done is:
Back up the Existing project.
Create a new flutter project.
Copy the mentioned files from the existing project into the new project you just created.
Files
pubspec.yaml
Androidmanifest.xml
Folders
assets
lib
Beside this files and folder you have to also copy the file which you manually updated in the Android or ios folder for your project.
After make sure you copied all files and folders you want for your project try running your newly created flutter project.
i update my firebase packege ( do it if u have ) then :
cd ios
rm podfile.lock
flutter clean
flutter pub get
pod install
last thing clean there project from code product->clean build folder then run it from code
I hope that fix the problim

Macosx Deployment target firestore/firebase_core

Hello I get this error when I Run Flutter Code that contains firestore/firebase_core
i tried more than one deployment target but still, i get an error
Launching lib/main.dart on macOS in debug mode...
Building macOS application...
Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:
- package:firebase_core
- package:firebase_core_platform_interface
- package:quiver
- package:plugin_platform_interface
- package:cloud_firestore
- package:cloud_firestore_platform_interface
For solutions, see https://dart.dev/go/unsound-null-safety
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
warning: The macOS deployment target 'MACOSX_DEPLOYMENT_TARGET' is set to 10.7, but the range of supported deployment target versions is 10.9 to 11.0.99. (in target 'BoringSSL-GRPC' from project 'Pods')
warning: The macOS deployment target 'MACOSX_DEPLOYMENT_TARGET' is set to 10.6, but the range of supported deployment target versions is 10.9 to 11.0.99. (in target 'nanopb' from project 'Pods')
warning: The macOS deployment target 'MACOSX_DEPLOYMENT_TARGET' is set to 10.7, but the range of supported deployment target versions is 10.9 to 11.0.99. (in target 'leveldb-library' from project 'Pods')
** BUILD FAILED **
Exception: Build process failed
This error happens because you’re trying to run your application with libraries that don’t support null safety. You can fix that by running your application with this command:
flutter run --no-sound-null-safety
In case that you’re using an IDE, you need to change the running configurations, for example in VSCode will be:
Code => Preferences => Settings => Search setting, type in "flutter test" => Dart: Flutter Test Additional Args, Add item => Add "--no-sound-null-safety
I suggest that you check this link in order to understand how to understand this error better.

pod command is not recognized when running flutter project

I have tried every suggestion and solution in stack overflow and GitHub and yet I am not able to run pod install and I get pod : command not found , also my pod file is empty.
Warning: CocoaPods not installed. Skipping pod install.
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds
to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To install:
sudo gem install cocoapods
Running Xcode build...
Xcode build done. 6.4s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
error: /Users/seyedaliaghamali/Documents/projects/my_app/ios/Flutter/Debug.xcconfig:1:
could not find included file 'Pods/Target Support Files/Pods-Runner/Pods-
Runner.debug.xcconfig' in search paths (in target 'Runner')
error: /Users/seyedaliaghamali/Documents/projects/my_app/ios/Flutter/Debug.xcconfig:1:
could not find included file 'Pods/Target Support Files/Pods-Runner/Pods-
Runner.debug.xcconfig' in search paths (in target 'Runner')
error: /Users/seyedaliaghamali/Documents/projects/my_app/ios/Flutter/Debug.xcconfig:1:
could not find included file 'Pods/Target Support Files/Pods-Runner/Pods-
Runner.debug.xcconfig' in search paths (in target 'Runner')
error: /Users/seyedaliaghamali/Documents/projects/my_app/ios/Flutter/Debug.xcconfig:1:
could not find included file 'Pods/Target Support Files/Pods-Runner/Pods-
Runner.debug.xcconfig' in search paths (in target 'Runner')
error: /Users/seyedaliaghamali/Documents/projects/my_app/ios/Flutter/Debug.xcconfig:1:
could not find included file 'Pods/Target Support Files/Pods-Runner/Pods-
Runner.debug.xcconfig' in search paths (in target 'Runner')
error: /Users/seyedaliaghamali/Documents/projects/my_app/ios/Flutter/Debug.xcconfig:1:
could not find included file 'Pods/Target Support Files/Pods-Runner/Pods-
Runner.debug.xcconfig' in search paths (in target 'Runner')
warning: Capabilities for Runner may not function correctly because its entitlements
use a placeholder team ID. To resolve this, select a development team in the build settings
editor. (in target 'Runner')
note: Using new build systemnote: Planning buildnote: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone Xʀ.
The error was caused by CocoaPods not being installed, therefore pod install can't be run. Simply install CocoaPods to solve this issue. Run either sudo gem install cocoapods or install it without sudo following this guide.

Resources