Cannot start my flutter app on an Iphone device for debugging on Mac M1

When I try to start the app, I get the following error.

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>Xcode build done. 18.7s
Failed to build iOS app
Could not build the precompiled application for the device.
Error output from Xcode build:
** BUILD FAILED **
2
Xcode's output:
Writing result bundle at path:
/var/folders/gx/0xqx8frn70b6846551t3qqtc0000gn/T/flutter_tools.0BGX7l/flutter_ios_build_temp_dir5JolwN/temporary_xcresult_bundle
5
ld: warning: ignoring duplicate libraries: '-lc++'
Unhandled exception:
Null check operator used on a null value
#0 Context.embedFlutterFrameworks (file:///Users/userabc/Developer/Tools/flutter/packages/flutter_tools/bin/xcode_backend.dart:235:68)
#1 Context.run (file:///Users/userabc/Developer/Tools/flutter/packages/flutter_tools/bin/xcode_backend.dart:59:9)
#2 main (file:///Users/userabc/Developer/Tools/flutter/packages/flutter_tools/bin/xcode_backend.dart:17:5)
#3 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:33)
#4 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
Command PhaseScriptExecution failed with a nonzero exit code
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 '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 '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')
note: Run script build phase 'Run Script' 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 'Thin Binary' 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')
</code>
<code>Xcode build done. 18.7s Failed to build iOS app Could not build the precompiled application for the device. Error output from Xcode build: ↳ ** BUILD FAILED ** 2 Xcode's output: ↳ Writing result bundle at path: /var/folders/gx/0xqx8frn70b6846551t3qqtc0000gn/T/flutter_tools.0BGX7l/flutter_ios_build_temp_dir5JolwN/temporary_xcresult_bundle 5 ld: warning: ignoring duplicate libraries: '-lc++' Unhandled exception: Null check operator used on a null value #0 Context.embedFlutterFrameworks (file:///Users/userabc/Developer/Tools/flutter/packages/flutter_tools/bin/xcode_backend.dart:235:68) #1 Context.run (file:///Users/userabc/Developer/Tools/flutter/packages/flutter_tools/bin/xcode_backend.dart:59:9) #2 main (file:///Users/userabc/Developer/Tools/flutter/packages/flutter_tools/bin/xcode_backend.dart:17:5) #3 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:33) #4 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12) Command PhaseScriptExecution failed with a nonzero exit code 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 '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 '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') note: Run script build phase 'Run Script' 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 'Thin Binary' 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') </code>
Xcode build done.                                           18.7s

Failed to build iOS app

Could not build the precompiled application for the device.

Error output from Xcode build:


↳


    ** BUILD FAILED **


2



Xcode's output:


↳


    Writing result bundle at path:


        /var/folders/gx/0xqx8frn70b6846551t3qqtc0000gn/T/flutter_tools.0BGX7l/flutter_ios_build_temp_dir5JolwN/temporary_xcresult_bundle





5
    ld: warning: ignoring duplicate libraries: '-lc++'


    Unhandled exception:


    Null check operator used on a null value


    #0      Context.embedFlutterFrameworks (file:///Users/userabc/Developer/Tools/flutter/packages/flutter_tools/bin/xcode_backend.dart:235:68)


    #1      Context.run (file:///Users/userabc/Developer/Tools/flutter/packages/flutter_tools/bin/xcode_backend.dart:59:9)


    #2      main (file:///Users/userabc/Developer/Tools/flutter/packages/flutter_tools/bin/xcode_backend.dart:17:5)


    #3      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:33)


    #4      _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)


    Command PhaseScriptExecution failed with a nonzero exit code


    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 '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 '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')


    note: Run script build phase 'Run Script' 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 'Thin Binary' 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')

I tried:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>cd ios
sudo arch -x86_64 gem install ffi
arch -x86_64 pod repo update
arch -x86_64 pod install
</code>
<code>cd ios sudo arch -x86_64 gem install ffi arch -x86_64 pod repo update arch -x86_64 pod install </code>
cd ios
sudo arch -x86_64 gem install ffi
arch -x86_64 pod repo update
arch -x86_64 pod install

It did not work at all.

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>> flutter --version
Flutter 3.22.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 761747bfc5 (5 days ago)2024-06-05 22:15:13 +0200
Engine • revision edd8546116
Tools • Dart 3.4.3 • DevTools 2.34.3
> pod --version
1.15.2
</code>
<code>> flutter --version Flutter 3.22.2 • channel stable • https://github.com/flutter/flutter.git Framework • revision 761747bfc5 (5 days ago) • 2024-06-05 22:15:13 +0200 Engine • revision edd8546116 Tools • Dart 3.4.3 • DevTools 2.34.3 > pod --version 1.15.2 </code>
> flutter --version
     Flutter 3.22.2 • channel stable • https://github.com/flutter/flutter.git
     Framework • revision 761747bfc5 (5 days ago) • 2024-06-05 22:15:13 +0200
     Engine • revision edd8546116
     Tools • Dart 3.4.3 • DevTools 2.34.3

> pod --version
     1.15.2

And if I run flutter doctor -v it says No issues found.

I spent hours on it with no success. Anyone who may have had the problem and solved it as well..?

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật