Flutter AMSupportURLConnectionDelegate is implemented in both ?? Error

5,272

Solution 1

I was getting this error

Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib

NOTE:

Try this first if you have updated to flutter 2.10 from <=2.8

flutter pub upgrade 

Solution: Please open podfile and update with this script

installer.pods_project.build_configurations.each do |config|
    config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end

enter image description here

flutter clean
flutter pub get
cd ios
pod install  

or instead of last command you can try below for M1

arch -x86_64 pod install // for M1 

Run your app.

Solution 2

I was getting the same "error output from Xcode build" with my M1 macbook recently as well after updating to Flutter 2.x.

I was able to clear this issue on mine by doing the following:

  • Change directory to your project's path and sub-directory:

your_project/build/ios/Debug-iphonesimulator/

  • Run $ xattr -lr Runner.app
  • Run $ xattr -cr Runner.app

Apparently flutter projects have extended attributes in project app bundles containing Finder info which causes an error.

I found these links that helped for reference. https://developer.apple.com/library/archive/qa/qa1940/_index.html https://github.com/flutter/flutter/issues/72492

Share:
5,272
Miles
Author by

Miles

I program native mobile apps on Flutter, code python programs, write code on quantum computers (with Qiskit), design objects for my projects on Autodesk's Fusion 360, and make electronic circuits on Eagle. In detail, I program esp8266's on Arduino to create IOT modules for an autonomous house that communicates with the app that I created on Flutter (for mobile) and Amazon's AI, Alexa for voice commands. I use the library Qiskit on python to run circuits that I code on a quantum computer via cloud communication. I have now an official certificate from Qubit by Qubit about that.

Updated on December 27, 2022

Comments

  • Miles
    Miles over 1 year

    I am facing many issues since I migrated my project to an Apple Silicon mac. I finally managed to reduce the problems but not sure the answer to this.

    Running "flutter pub get" in Flutter_the app copy 3...        760ms
    Launching lib/main.dart on iPhone 11 in debug mode...
    Running pod install...                                             986ms
    Running Xcode build...                                                  
    Xcode build done.                                            1.5s
    Failed to build iOS app
    Error output from Xcode build:
    ↳
       objc[95181]: Class AMSupportURLConnectionDelegate is implemented in both ?? (0x20ba238f0) and ??
       (0x1160dc2b8). One of the two will be used. Which one is undefined.
       objc[95181]: Class AMSupportURLSession is implemented in both ?? (0x20ba23940) and ?? (0x1160dc308). One
       of the two will be used. Which one is undefined.
       ** BUILD FAILED **
    
    
    Xcode's output:
    ↳
       note: Using new build system
       note: Building targets in parallel
       note: Planning build
       note: Constructing build description
       error: /Users/gorkem/Documents/flutter_workspace/Flutter_the app copy 3/ios/Flutter/Debug.xcconfig:
       unable to open file (in target "Runner" in project "Runner") (in target 'Runner' from project 'Runner')
       error: /Users/gorkem/Documents/flutter_workspace/Flutter_the app copy 3/ios/Flutter/Debug.xcconfig:
       unable to open file (in target "Runner" in project "Runner") (in target 'Runner' from project 'Runner')
       error: /Users/gorkem/Documents/flutter_workspace/Flutter_the app copy 3/ios/Flutter/Debug.xcconfig:
       unable to open file (in target "Runner" in project "Runner") (in target 'Runner' from project 'Runner')
       warning: Unable to read contents of XCFileList '/Target Support
       Files/Pods-Runner/Pods-Runner-frameworks-Debug-output-files.xcfilelist' (in target 'Runner' from project
       'Runner')
       error: Unable to load contents of file list: '/Target Support
       Files/Pods-Runner/Pods-Runner-frameworks-Debug-input-files.xcfilelist' (in target 'Runner' from project
       'Runner')
       error: Unable to load contents of file list: '/Target Support
       Files/Pods-Runner/Pods-Runner-frameworks-Debug-output-files.xcfilelist' (in target 'Runner' from project
       'Runner')
    
    Could not build the application for the simulator.
    Error launching application on iPhone 11.
    

    Is there any way to solve this. I am not sure if the problem is even written in there.