Flutter Build errors xcode ios - ios

After upgrading to Xcode 14, I got these errors messages when I try build/run my project on Mac:
Android studio -> Build -> Flutter -> Build iOS
shared_preferences: ^2.0.15
Flutter version: 3.3.2
Note that everything were working without any problem before the upgrading, and no problem in Windows.
Automatically signing iOS for device deployment using specified development team in Xcode project: 65456KJ35R
Running Xcode build...
Xcode build done. 18.4s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
Writing result bundle at path:
/var/folders/cc/3b8b8j7s3nd92qwt4_6zgzhh0000gn/T/flutter_tools.DBua0Q/flutter_ios_build_temp_dirdSTTIY/temporary_xcresult_bundle
/Users/test/.pub-cache/hosted/pub.dartlang.org/shared_preferences_ios-2.1.1/ios/Classes/FLTSharedPreferencesPlugin.m:27:41: error: no type or protocol named 'FlutterPluginRegistrar'
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar> *)registrar {
^
/Users/test/.pub-cache/hosted/pub.dartlang.org/shared_preferences_ios-2.1.1/ios/Classes/FLTSharedPreferencesPlugin.m:29:34: error: property 'messenger' not found on object of type 'NSObject *'
UserDefaultsApiSetup(registrar.messenger, plugin);
^
3 errors generated.
Command SwiftCompile failed with a nonzero exit code
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')
Result bundle written to path:
/var/folders/cc/3b8b8j7s3nd92qwt4_6zgzhh0000gn/T/flutter_tools.DBua0Q/flutter_ios_build_temp_dirdSTTIY/temporary_xcresult_bundle
Generics Issue (Xcode): No type or protocol named 'FlutterPlugin'
/Users/test/.pub-cache/hosted/pub.dartlang.org/shared_preferences_ios-2.1.1/ios/Classes/FLTSharedPreferencesPlugin.h:5:50
Generics Issue (Xcode): No type or protocol named 'FlutterPluginRegistrar'
/Users/test/.pub-cache/hosted/pub.dartlang.org/shared_preferences_ios-2.1.1/ios/Classes/FLTSharedPreferencesPlugin.m:26:40
Semantic Issue (Xcode): Property 'messenger' not found on object of type 'NSObject *'
/Users/test/.pub-cache/hosted/pub.dartlang.org/shared_preferences_ios-2.1.1/ios/Classes/FLTSharedPreferencesPlugin.m:28:33
Uncategorized (Xcode): Command SwiftCompile failed with a nonzero exit code
Encountered error while building for device.
Process finished with exit code 1
flutter run -v
flutter.txt
flutter build ios -v
iosbuild.log
I tested to build the new project with only shared_preferences: ^2.0.15 package and here is the result :
buildlog.log
Following packages have also conflicts while building for iOS in Mac
searchable_dropdown: ^1.1.3
file_picker: ^4.6.1
html_editor_enhanced: ^2.5.0
image_cropper: ^3.0.0

Related

Error runing Xcode build on Flutter using TensorFlowLite

I'm creating an app on Flutter using the TensorFlowLite library and after finishing all the Flutter Code, I'm trying to debug it on a iOS Simulator and on the console I'm getting the following error:
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
Writing result bundle at path:
/var/folders/13/q8h3_c012wvc3mxcfpzrf6fr0000gn/T/flutter_tools.8a658a/flutter_ios_build_temp_dirNlQoAO/temporary_xcresult_bundle
/Users/chrisley/terminal-addons/flutter/.pub-cache/hosted/pub.dartlang.org/tflite-1.1.2/ios/Classes/TflitePlugin.mm:20:9: fatal error: 'TensorFlowLiteC.h' file not found
#import "TensorFlowLiteC.h"
^~~~~~~~~~~~~~~~~~~
1 error generated.
error: the following command failed with exit code 1 but produced no further output
CompileC /Users/chrisley/Library/Developer/Xcode/DerivedData/Runner-eguofderrkwgjseuiagmsjusmxtx/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/tflite.build/Objects-normal/arm64/TflitePlugin.o /Users/chrisley/terminal-addons/flutter/.pub-cache/hosted/pub.dartlang.org/tflite-1.1.2/ios/Classes/TflitePlugin.mm normal arm64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'tflite' from project 'Pods')
note: Building targets in dependency order
/Users/chrisley/Documents/Development/Flutter/tensorflow_test/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to 16.0.99. (in target 'TensorFlowLiteC' 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')
Result bundle written to path:
/var/folders/13/q8h3_c012wvc3mxcfpzrf6fr0000gn/T/flutter_tools.8a658a/flutter_ios_build_temp_dirNlQoAO/temporary_xcresult_bundle
Lexical or Preprocessor Issue (Xcode): 'TensorFlowLiteC.h' file not found
/Users/chrisley/terminal-addons/flutter/.pub-cache/hosted/pub.dartlang.org/tflite-1.1.2/ios/Classes/TflitePlugin.mm:19:8
2
Could not build the application for the simulator.
Error launching application on iPhone 14 Pro Max.
I tried to solve the error adding pod 'TensorFlowLiteObjC' in the Podfile but it didn't work.

fatal error: 'Flutter/Flutter.h' file not found in flutter IOS Build

Launching lib/main.dart on iPhone 14 Pro in debug mode...
Running pod install...
Running Xcode build...
Xcode build done. 14.5s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
Writing result bundle at path:
/var/folders/d7/k5tgg8zx1fb1hlrnhzbg4l_40000gn/T/flutter_tools.FBHN8u/flutter_ios_build_temp_dirQbWTC1/temporary_xcresult_bundle
In file included from /usr/local/Caskroom/flutter/3.3.3/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_ios-6.0.17/ios/Classes/FLTURLLauncherPlugin.m:7:
/usr/local/Caskroom/flutter/3.3.3/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_ios-6.0.17/ios/Classes/FLTURLLauncherPlugin.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
In file included from /usr/local/Caskroom/flutter/3.3.3/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_ios-2.1.1/ios/Classes/FLTSharedPreferencesPlugin.m:5:
/usr/local/Caskroom/flutter/3.3.3/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_ios-2.1.1/ios/Classes/FLTSharedPreferencesPlugin.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
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')
Result bundle written to path:
/var/folders/d7/k5tgg8zx1fb1hlrnhzbg4l_40000gn/T/flutter_tools.FBHN8u/flutter_ios_build_temp_dirQbWTC1/temporary_xcresult_bundle
Lexical or Preprocessor Issue (Xcode): 'Flutter/Flutter.h' file not found
/usr/local/Caskroom/flutter/3.3.3/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_ios-6.0.17/ios/Classes/FLTURLLauncherPlugin.h:4:8
Lexical or Preprocessor Issue (Xcode): 'Flutter/Flutter.h' file not found
/usr/local/Caskroom/flutter/3.3.3/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_ios-2.1.1/ios/Classes/FLTSharedPreferencesPlugin.h:4:8
Could not build the application for the simulator.
Error launching application on iPhone 14 Pro.
right now and after downgrading cocopods to 1.10.0 and platform :ios, '13.0' the build works but the runner stopped when launching the app in the emulator
this is the
Running pod install... Running Xcode build... Xcode build done. 307,7s Exception: Unable to launch com.xxxxxxx.xxx on D94FEC60-1F58-427F-8C7D-2E8C216362C5: ProcessException: Process exited abnormally: An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=1): The request to open "com.xxxxxxxxxx.xxx" failed. The request was denied by service delegate (SBMainWorkspace). Underlying error (domain=FBProcessExit, code=128): The operation couldn’t be completed. The process exited. The process exited. Command: xcrun simctl launch D94FEC60-1F58-427F-8C7D-2E8C216362C5 com.xxxxxxx.xxxx --enable-dart-profiling --enable-checked-mode --verify-entry-points --start-paused --observatory-port=0 Error launching application on iPhone 14 Pro.

Cann't run the app from android studio but it run by Xcode normally

after I did integrate google maps flutter I couldn't run the by android studio but it runs successfully by the Xcode
Error output from Xcode build:
objc[16091]: Class AMSupportURLConnectionDelegate is implemented in both /usr/Lib/Libamsupport.dylib
(0x1ee18f130) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice
„framework/Versions/A/MobiLeDevice (ex1067bc2c8). One of the two will be used. Which one is undefined.
objc(16091]: Class AMSupportURLSession is implemented in both /us/Lib/Libamsupport.dylib (Oxlee18f180) and
/Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice(0x1067bc318)
One of the two will be used. Which one is undefined.
** BUILD FAILED **
Flutter Performance
Flutter Outine
Flutter Inspector
E TODO
Xcode's output:
Ld: building for 10S Simulator, but Linking in object file built for 10S, file
"/Users/hamada/StudioProjects/3XTravel/ios/Pods/GoogLeMaps/Maps/Frameworks/GoogLeMaps.framework/GoogleMaps'
for architecture arm64
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
/Users/hamada/StudioProjects/3X Travel/ios/Pods/Pods.xcodeproi: 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.2.99. (in target
"FMDB" from project
Pods")
/Users/hamada/StudioProjects/3X Travel/ios/Pods/Pods.xcodeproj: warning: The 10S Simulator depLoyment

I am running flutter app and getting this error

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.

My app is not building debug console says Could not build the application for the simulator

This is the output when trying to build the basic application when creating a new file. Launching lib/main.dart on iPhone XR in debug mode...
Xcode build done.
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
While building module 'Flutter' imported from /Users/davywavy/Desktop/Flutter Projects/premium/ios/Runner/GeneratedPluginRegistrant.h:8:
In file included from :1:
In file included from /Users/davywavy/Desktop/Flutter Projects/premium/ios/Flutter/Flutter.framework/Headers/Flutter.h:37:
In file included from /Users/davywavy/Desktop/Flutter Projects/premium/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:11:
/Users/davywavy/Desktop/Flutter Projects/premium/ios/Flutter/Flutter.framework/Headers/FlutterPlugin.h:140:58: warning: this block declaration is not a prototype [-Wstrict-prototypes]
completionHandler:(nonnull void (^)())completionHandler;
^
void
1 warning generated.
1 warning generated.
ld: framework not found Flutter
clang: error: linker command failed with exit code 1 (use -v to see invocation)
note: Using new build systemnote: Planning buildnote: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone XR.
Exited (sigterm)
I have tried fixing my path flutter upgrade, flutter doctor -v everything looks right.
Launching lib/main.dart on iPhone XR in debug mode...
Xcode build done.
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
error: /Users/davywavy/Desktop/Flutter Projects/premium/ios/Flutter/Debug.xcconfig: unable to open file (in project "Runner") (in target 'Runner')
error: /Users/davywavy/Desktop/Flutter Projects/premium/ios/Flutter/Debug.xcconfig: unable to open file (in project "Runner") (in target 'Runner')
error: /Users/davywavy/Desktop/Flutter Projects/premium/ios/Flutter/Debug.xcconfig: unable to open file (in project "Runner") (in target 'Runner')
error: /Users/davywavy/Desktop/Flutter Projects/premium/ios/Flutter/Debug.xcconfig: unable to open file (in project "Runner") (in target 'Runner')
error: /Users/davywavy/Desktop/Flutter Projects/premium/ios/Flutter/Debug.xcconfig: unable to open file (in project "Runner") (in target 'Runner')
error: /Users/davywavy/Desktop/Flutter Projects/premium/ios/Flutter/Debug.xcconfig: unable to open file (in project "Runner") (in target 'Runner')
note: Using new build systemnote: Planning buildnote: Using build description from disk
Could not build the application for the simulator.
Error launching application on iPhone XR.
Exited (sigterm)
new output

Resources