What is causing this problem in flutter? Class AMSupportURLConnectionDelegate? - xcode

Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
lib/main.dart:1
Xcode build done. 8.9s
Failed to build iOS app
Error output from Xcode build:
objc[19485]: Class AMSupportURLConnectionDelegate is implemented in both ?? (0x20ffb8188) and ?? (0x13047c2b8). One of the two will be used. Which one is undefined.
objc[19485]: Class AMSupportURLSession is implemented in both ?? (0x20ffb81d8) and ?? (0x13047c308). One of the two will be used. Which one is undefined.
** BUILD FAILED **
Xcode's output:
error: the following command failed with exit code 0 but produced no further output
CompileC /Users/RuideWang/Library/Developer/Xcode/DerivedData/Runner-fxrieyfdpcpzjtcjlryrysiwwmvu/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/geolocator.build/Objects-normal/x86_64/GeolocatorPlugin.o /Users/RuideWang/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/geolocator-7.0.3/ios/Classes/GeolocatorPlugin.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
/Users/RuideWang/Desktop/Programmieren/rift-1/ios/Runner/AppDelegate.swift:28:1: error: expected '}' in class
^
/Users/RuideWang/Desktop/Programmieren/rift-1/ios/Runner/AppDelegate.swift:6:45: note: to match this opening '{'
#objc class AppDelegate: FlutterAppDelegate {
^
/Users/RuideWang/Desktop/Programmieren/rift-1/ios/Runner/AppDelegate.swift:5:1: error: 'UIApplicationMain' attribute can only apply to one class in a module
#UIApplicationMain
^
/Users/RuideWang/Desktop/Programmieren/rift-1/ios/Runner/AppDelegate.swift:17:1: error: 'UIApplicationMain' attribute can only apply to one class in a module
#UIApplicationMain
^
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
note: Removed stale file '/Users/RuideWang/Library/Developer/Xcode/DerivedData/Runner-fxrieyfdpcpzjtcjlryrysiwwmvu/Build/Products/Debug-iphonesimulator/geolocator/geolocator.framework'
note: Removed stale file '/Users/RuideWang/Library/Developer/Xcode/DerivedData/Runner-fxrieyfdpcpzjtcjlryrysiwwmvu/Build/Products/Debug-iphonesimulator/google_maps_flutter/google_maps_flutter.framework'
note: Removed stale file '/Users/RuideWang/Library/Developer/Xcode/DerivedData/Runner-fxrieyfdpcpzjtcjlryrysiwwmvu/Build/Products/Debug-iphonesimulator/hexcolor/hexcolor.framework'
Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max.
Exited (sigterm)

Related

Can't launch flutter app on my iphone because of flutter_ios_build_temp_dirZZL8EG/temporary_xcresult_bundle?

I have an app that I can run on my PC, but when I try to run on my mac with the same code I have this error who stop running.
Error output from Xcode build:
↳
2022-07-03 23:09:28.039 xcodebuild[54309:270223] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTiOSFrameworks/DVTiOSFrameworks-18108/DTDeviceKitBase/DTDKRemoteDeviceData.m:371
Details: (null) deviceType from 00008030-000448183438802E was NULL when -platform called.
Object: <DTDKMobileDeviceToken: 0x7f957ae1c710>
Method: -platform
Thread: <NSThread: 0x7f957a9fcf80>{number = 6, name = (null)}
Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.
2022-07-03 23:09:28.311 xcodebuild[54309:270230] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTiOSFrameworks/DVTiOSFrameworks-18108/DTDeviceKitBase/DTDKRemoteDeviceData.m:371
Details: (null) deviceType from 00008030-000448183438802E was NULL when -platform called.
Object: <DTDKMobileDeviceToken: 0x7f957ae1c710>
Method: -platform
Thread: <NSThread: 0x7f9579005b50>{number = 3, name = (null)}
Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.
2022-07-03 23:09:28.406 xcodebuild[54309:270230] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTiOSFrameworks/DVTiOSFrameworks-18108/DTDeviceKitBase/DTDKRemoteDeviceData.m:371
Details: (null) deviceType from 00008030-000448183438802E was NULL when -platform called.
Object: <DTDKMobileDeviceToken: 0x7f957ae1c710>
Method: -platform
Thread: <NSThread: 0x7f9579005b50>{number = 3, name = (null)}
Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.
** BUILD FAILED **
Xcode's output:
↳
Writing result bundle at path:
/var/folders/19/zvrhzg415_b51k3jvc_vz1mr0000gn/T/flutter_tools.L5V1RD/flutter_ios_build_temp_dirZZL8EG/temporary_xcresult_bundle
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/percent_indicator-4.2.1/lib/linear_percent_indicator.dart:162:5: Warning: The class 'WidgetsBinding' cannot be null.
Try replacing '?.' with '.'
WidgetsBinding?.instance.addPostFrameCallback((_) {
^^^^^^^^^^^^^^
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/percent_indicator-4.2.1/lib/linear_percent_indicator.dart:162:30: Error: Method 'addPostFrameCallback' cannot be called on 'WidgetsBinding?' because it is potentially null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../Developer/flutter/packages/flutter/lib/src/widgets/binding.dart').
Try calling using ?. instead.
WidgetsBinding?.instance.addPostFrameCallback((_) {
^^^^^^^^^^^^^^^^^^^^
Failed to package /Users/XXXXX/AndroidStudioProjects/XXXX.
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
Result bundle written to path:
/var/folders/19/zvrhzg415_b51k3jvc_vz1mr0000gn/T/flutter_tools.L5V1RD/flutter_ios_build_temp_dirZZL8EG/temporary_xcresult_bundle
Could not build the precompiled application for the device.
Error launching application on iPhone.
After flutter pub cache clean I have some new issues
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
Writing result bundle at path:
/var/folders/19/zvrhzg415_b51k3jvc_vz1mr0000gn/T/flutter_tools.lzkxYb/flutter_ios_build_temp_dir6KlO8j/temporary_xcresult_bundle
/Users/quentinguichot/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/sensors_plus-1.3.2/ios/Classes/FLTSensorsPlusPlugin.m:45:24: warning: this old-style function definition is not preceded by a prototype [-Wstrict-prototypes]
void _initMotionManager() {
^
1 warning generated.
/Users/quentinguichot/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/sensors_plus-1.3.2/ios/Classes/FLTSensorsPlusPlugin.m:45:24: warning: this old-style function definition is not preceded by a prototype [-Wstrict-prototypes]
void _initMotionManager() {
^
1 warning generated.
In file included from /Users/quentinguichot/AndroidStudioProjects/ouiquit_v3/ios/Pods/FirebaseFirestore/Firestore/core/src/local/leveldb_index_manager.cc:43:
/Users/quentinguichot/AndroidStudioProjects/ouiquit_v3/ios/Pods/FirebaseFirestore/Firestore/core/src/util/set_util.h:36:11: warning: parameter 'before' not found in the function declaration [-Wdocumentation]
* #param before - The elements that exist in the original set.
^~~~~~
/Users/quentinguichot/AndroidStudioProjects/ouiquit_v3/ios/Pods/FirebaseFirestore/Firestore/core/src/util/set_util.h:37:11: warning: parameter 'after' not found in the function declaration [-Wdocumentation]
* #param after - The elements to diff against the original set.
^~~~~
2 warnings generated.
/Users/quentinguichot/AndroidStudioProjects/ouiquit_v3/ios/Pods/FirebaseFirestore/Firestore/Source/API/FIRFirestore.mm:343:20: warning: implicit conversion loses integer precision: 'NSInteger' (aka 'long') to 'int' [-Wshorten-64-to-32]
max_attempts = options.maxAttempts;
~ ^~~~~~~~~~~~~~~~~~~
1 warning generated.
In file included from /Users/quentinguichot/AndroidStudioProjects/ouiquit_v3/ios/Pods/FirebaseFirestore/Firestore/core/src/local/leveldb_index_manager.cc:43:
/Users/quentinguichot/AndroidStudioProjects/ouiquit_v3/ios/Pods/FirebaseFirestore/Firestore/core/src/util/set_util.h:36:11: warning: parameter 'before' not found in the function declaration [-Wdocumentation]
* #param before - The elements that exist in the original set.
^~~~~~
/Users/quentinguichot/AndroidStudioProjects/ouiquit_v3/ios/Pods/FirebaseFirestore/Firestore/core/src/util/set_util.h:37:11: warning: parameter 'after' not found in the function declaration [-Wdocumentation]
* #param after - The elements to diff against the original set.
^~~~~
2 warnings generated.
/Users/quentinguichot/AndroidStudioProjects/ouiquit_v3/ios/Pods/FirebaseFirestore/Firestore/Source/API/FIRFirestore.mm:343:20: warning: implicit conversion loses integer precision: 'NSInteger' (aka 'long') to 'int' [-Wshorten-64-to-32]
max_attempts = options.maxAttempts;
~ ^~~~~~~~~~~~~~~~~~~
1 warning generated.
In file included from /Users/quentinguichot/AndroidStudioProjects/ouiquit_v3/ios/Pods/FirebaseFirestore/Firestore/core/src/local/leveldb_index_manager.cc:43:
/Users/quentinguichot/AndroidStudioProjects/ouiquit_v3/ios/Pods/FirebaseFirestore/Firestore/core/src/util/set_util.h:36:11: warning: parameter 'before' not found in the function declaration [-Wdocumentation]
* #param before - The elements that exist in the original set.
^~~~~~
/Users/quentinguichot/AndroidStudioProjects/ouiquit_v3/ios/Pods/FirebaseFirestore/Firestore/core/src/util/set_util.h:37:11: warning: parameter 'after' not found in the function declaration [-Wdocumentation]
* #param after - The elements to diff against the original set.
^~~~~
2 warnings generated.
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/percent_indicator-4.2.1/lib/linear_percent_indicator.dart:162:5: Warning: The class 'WidgetsBinding' cannot be null.
Try replacing '?.' with '.'
WidgetsBinding?.instance.addPostFrameCallback((_) {
^^^^^^^^^^^^^^
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/percent_indicator-4.2.1/lib/linear_percent_indicator.dart:162:30: Error: Method 'addPostFrameCallback' cannot be called on 'WidgetsBinding?' because it is potentially null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../Developer/flutter/packages/flutter/lib/src/widgets/binding.dart').
Try calling using ?. instead.
WidgetsBinding?.instance.addPostFrameCallback((_) {
^^^^^^^^^^^^^^^^^^^^
Failed to package /Users/quentinguichot/AndroidStudioProjects/ouiquit_v3.
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
Result bundle written to path:
/var/folders/19/zvrhzg415_b51k3jvc_vz1mr0000gn/T/flutter_tools.lzkxYb/flutter_ios_build_temp_dir6KlO8j/temporary_xcresult_bundle
Could not build the application for the simulator.
Error launching application on iPhone 11.
The reason why it failed is that your Mac used flutter version 3 which has a change that widget binding cannot be null which required not to use? In Widget binding. The package percentage indicator is not flutter 3 compatible. Please change the version to percent_indicator: ^4.2.2 which is flutter 3 compatible. Do a flutter clean and pod install and it should work
Edit
To clean your pub cache you can run flutter pub cache clean
Please note that this will clear all your pub cache which after that you may have to run flutter pub get on all projects
Use the follow steps if you use M1 Mac
If you are using Firebase, try to use
cloud_firestore: 3.2.1
firebase_analytics: ^9.3.1
firebase_core: 1.19.1
firebase_auth: ^3.6.3
Change your Podfile
platform :ios, '14.0'
Terminal
flutter clean
sudo arch -x86_64 gem install ffi
arch -x86_64 pod update
Could take a bit time.
If not work
Other thing could be .. update your Mac SO, I read some about problems with Monterrey SO, then try to update ,also update Xcode . Good luck

Flutter build ios error Expected identifier RunnerVersionNumber on Runner_vers.c

When I run flutter build ios I'm facing the above error:
error generated.
/Users/user926689/Library/Developer/Xcode/DerivedData/Runner-emyehpjhqbfhbsc
xayqxsyftfyix/Build/Intermediates.noindex/Runner.build/Release-iphoneos/Runn
er.build/DerivedSources/Runner_vers.c:5:72: error: expected identifier
const double RunnerVersionNumber attribute ((used)) = (double)29 .;
flutter doctor is just fine. Last time I had no problem to build my app for ios.
What is RunnerVersionNumber? Does anyone know how to fix that?
Problem solved.
Mistakenly I have added a white space right after the build number on Runner -> General -> Identity -> build.

Why im getting this error Could not build the application for the simulator. Error launching application on iPhone 11 Pro Max?

When im trying to run my application on iOS emulator im getting this error
Does anyone know why im getting this ?
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
/Users/name/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.7.3/ios/Classes/FLTImagePickerPlugin.m:149:20: warning: 'UIAlertView' is deprecated: first deprecated in iOS 9.0 - UIAlertView is deprecated. Use UIAlertController with a preferredStyle of UIAlertControllerStyleAlert instead [-Wdeprecated-declarations]
[[[UIAlertView alloc] initWithTitle:NSLocalizedString(#"Error", nil)
^
In module 'UIKit' imported from /Users/name/project/project/ios/Pods/Target Support Files/image_picker/image_picker-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAlertView.h:27:12: note: 'UIAlertView' has been explicitly marked deprecated here
#interface UIAlertView : UIView
^
1 warning generated.
/Users/name/projectname/projectname/ios/Pods/Regift/Regift/AVAssetImageGeneratorTimePoints.swift:12:5: warning: 'public' modifier is redundant for instance method declared in a public extension
public func generateCGImagesAsynchronouslyForTimePoints(timePoints: [TimePoint], completionHandler: #escaping AVAssetImageGeneratorCompletionHandler) {
^~~~~~~
/Users/name/project/project/ios/Pods/Regift/Regift/Regift.swift:251:45: error: missing argument label 'preferredTimescale:' in call
let time = CMTimeMakeWithSeconds(seconds, Constants.TimeInterval)
^
preferredTimescale:
/Users/name/project/project/ios/Pods/Regift/Regift/Regift.swift:303:46: error: missing argument label 'preferredTimescale:' in call
let tolerance = CMTimeMakeWithSeconds(Constants.Tolerance, Constants.TimeInterval)
^
preferredTimescale:
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 11 Pro Max.
The app was running perfectly on the last week but I dont know why it dont built now ?
After taking some changes from user #Huthaifa Muayyad This is the error now
Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
lib/main.dart:1
Xcode build done. 25,2s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
/Users/name/projectname/projetcname/ios/Pods/Regift/Regift/AVAssetImageGeneratorTimePoints.swift:12:5: warning: 'public' modifier is redundant for instance method declared in a public extension
public func generateCGImagesAsynchronouslyForTimePoints(timePoints: [TimePoint], completionHandler: #escaping AVAssetImageGeneratorCompletionHandler) {
^~~~~~~
/Users/name/projectname/projectname/ios/Pods/Regift/Regift/Regift.swift:251:45: error: missing argument label 'preferredTimescale:' in call
let time = CMTimeMakeWithSeconds(seconds, Constants.TimeInterval)
^
preferredTimescale:
/Users/name/projectname/projectname/ios/Pods/Regift/Regift/Regift.swift:303:46: error: missing argument label 'preferredTimescale:' in call
let tolerance = CMTimeMakeWithSeconds(Constants.Tolerance, Constants.TimeInterval)
^
preferredTimescale:
gRPC-C++-gRPCCertificates-Cpp-cxhudvivvbfckkebvhcbvchzlxji
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 11 Pro Max.
Exited (sigterm)
Try uncommenting the first line ios/Podfile and update it to 10.0,
Your error also says UIAlertView is deprecated. Use UIAlertController with a preferredStyle of UIAlertControllerStyleAlert instead Try updating imagepicker if you are using it.

Platform Migration: Error when compiling project

A few weeks ago I started a Firebase course with flutter, and I was programming on a Windows computer, and now I've been using a Mac for a few days, to learn how to make firebase with iOS too. However, I have received these errors, and I do not know if I am missing a file, lines of code or if I have obsolete code. I tried some solutions I found on the internet, like deleting the files pubspec.lock, podfile, podfile.lock, reinstalling using pod init and pod install, but none of these solutions managed to solve the problem. I know very little about Swift / Objective-C, and this project is connected (android) on firebase.
/Users/mobileteam/Desktop/pasta_mary/aikoBot/aiko_bot/ios/Pods/FirebaseCrashlytics/Crashlytics/Shared/FIRCLSFABHost.m100:11: warning: 'UI_USER_INTERFACE_IDIOM' is deprecated: first deprecated in iOS 13.0 - Use -[UIDevice userInterfaceIdiom] directly. [-Wdeprecated-declarations]
switch (UI_USER_INTERFACE_IDIOM()) {
^
In module 'UIKit' imported from /Users/mobileteam/Desktop/pasta_mary/aikoBot/aiko_bot/ios/Pods/FirebaseCrashlytics/Crashlytics/Shared/FIRCLSFABHost.m:20:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIDevice.h:97:36: note: 'UI_USER_INTERFACE_IDIOM' has been explicitly marked deprecated here
static inline UIUserInterfaceIdiom UI_USER_INTERFACE_IDIOM() API_DEPRECATED("Use -[UIDevice userInterfaceIdiom] directly.", ios(2.0, 13.0), tvos(9.0, 11.0)) {
^
1 warning generated.
/Users/mobileteam/Desktop/pasta_mary/aikoBot/aiko_bot/ios/Runner/AppDelegate.swift:14:18: error: cannot override with a stored property 'window'
override var window: UIWindow?
^
Flutter.FlutterAppDelegate:2:14: note: attempt to override property here
open var window: UIWindow! { get set }
^
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description

Build failed of downloaded .mcp file in MPLAB for PIC18F2550 and PIC18F4550

I have installed Mplab version 8.9, I have downloaded a firmware package from this link
But, when I hit build all it shows me the following output and build fails:
----------------------------------------------------------------------
Debug build of project `D:\microchip\WFF Generic HID Demo 3\WFF_GenericHID_Demo_3.mcp' started.
Language tool versions: mplink.exe v9.80, mcc18.exe v9.80, mplib.exe v9.80
Preprocessor symbol `__DEBUG' is defined.
Thu May 29 15:44:49 2014
----------------------------------------------------------------------
Make: The target "D:\microchip\WFF Generic HID Demo 3\main.o" is out of date.
Executing: "C:\Program Files (x86)\Microchip\xc8\v1.31\bin\mcc18.exe" -p=18F4550 /i"..\Microchip Solutions v2011-07-14\Microchip\Include" "main.c" -fo="main.o" -D__DEBUG -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
Make: The target "D:\microchip\WFF Generic HID Demo 3\usb_descriptors.o" is out of date.
Executing: "C:\Program Files (x86)\Microchip\xc8\v1.31\bin\mcc18.exe" -p=18F4550 /i"..\Microchip Solutions v2011-07-14\Microchip\Include" "usb_descriptors.c" -fo="usb_descriptors.o" -D__DEBUG -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
usb_descriptors.c:
125: rom struct{BYTE report[28];}hid_rpt01={
(984) type redeclared ^
^ (1098) conflicting declarations for variable "hid_rpt01" (usb_descriptors.c:125)
(908) exit status = 1
(908) exit status = 1
Halting build on first failure as requested.
----------------------------------------------------------------------
Debug build of project `D:\microchip\WFF Generic HID Demo 3\WFF_GenericHID_Demo_3.mcp' failed.
Language tool versions: mplink.exe v9.80, mcc18.exe v9.80, mplib.exe v9.80
Preprocessor symbol `__DEBUG' is defined.
Thu May 29 15:44:51 2014
----------------------------------------------------------------------
BUILD FAILED
I tried to find the problem in this link also, but i could not find its root cause.
I started to try this because i wanted to make my own shields and pcb for my projects instead of arduino and the like.
Please help me with this problem.

Resources