skip to Main Content

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.

4

Answers


  1. 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

    Login or Signup to reply.
  2. Try Selecting For install builds only in the run script in the Build phases tab.

    enter image description here

    Login or Signup to reply.
  3. 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.

    Login or Signup to reply.
  4. Two things need to change:

    First check the Dependancy for APNs if need to upgrade. Then Change the version in the POD file and then add

    pod ‘GoogleUtilities’
    To the POD target like following:

    target ‘Runner’ do
    use_frameworks!
    use_modular_headers!

    flutter_install_all_macos_pods File.dirname(File.realpath(FILE))
    pod ‘GoogleUtilities’
    end
    .

    After this Run Flutter pug get and Flutter run. It works for me.

    Ref screenshot for POD file

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search