Failed to codesign when running flutter on ios simulation

I was just setting up flutter and when running flutter run with the IOS simulator open it gives the following error:

Error (Xcode): Target debug_unpack_ios failed: Exception: Failed to
codesign
/Users/diegoochoa/Documents/Flutter_Projects/workout2/build/ios/Debug
-iphonesimulator/Flutter.framework/Flutter with identity -.


Could not build the application for the simulator.
Error launching application on iPhone 15 Pro.

with verbose on it is the following:


[   +1 ms] Error (Xcode): [+1130 ms] Target debug_unpack_ios failed:
Exception:
Failed to codesign

/Users/diegoochoa/Documents/Flutter_Projects/workout2/build/ios/Debug
           -iphonesimulator/Flutter.framework/Flutter with identity
-.

[   +3 ms] Could not build the application for the simulator.
Error launching application on iPhone 15 Pro.
[   +1 ms] "flutter run" took 142,531ms.
[   +7 ms] 
           #0      throwToolExit
           (package:flutter_tools/src/base/common.dart:10:3)
           #1      RunCommand.runCommand
           (package:flutter_tools/src/commands/run.dart:874:9)
           <asynchronous suspension>
           #2      FlutterCommand.run.<anonymous closure>

(package:flutter_tools/src/runner/flutter_command.dart:1408:27)
           <asynchronous suspension>
           #3      AppContext.run.<anonymous closure>
           (package:flutter_tools/src/base/context.dart:153:19)
           <asynchronous suspension>
           #4      CommandRunner.runCommand
           (package:args/command_runner.dart:212:13)
           <asynchronous suspension>
           #5      FlutterCommandRunner.runCommand.<anonymous
closure>

(package:flutter_tools/src/runner/flutter_command_runner.dart:420:9)
           <asynchronous suspension>
           #6      AppContext.run.<anonymous closure>
           (package:flutter_tools/src/base/context.dart:153:19)
           <asynchronous suspension>
           #7      FlutterCommandRunner.runCommand

(package:flutter_tools/src/runner/flutter_command_runner.dart:364:5)
           <asynchronous suspension>
           #8      run.<anonymous closure>.<anonymous closure>
           (package:flutter_tools/runner.dart:130:9)
           <asynchronous suspension>
           #9      AppContext.run.<anonymous closure>
           (package:flutter_tools/src/base/context.dart:153:19)
           <asynchronous suspension>
           #10     main (package:flutter_tools/executable.dart:93:3)
           <asynchronous suspension>


[  +65 ms] ensureAnalyticsSent: 63ms
Running 2 shutdown hooks
[   +1 ms] Shutdown hooks complete
[   +1 ms] exiting with code 1

I’ve spent a lot of time trying to fix it but to no avail, I hope this question helps me solve it

I tried flutter run and I was expecting it to show on the emulator but it didn’t O’m using xcode for the ios emulator

in case it is useful I ran flutter doctor and the following is the result:


diegoochoa@Diegos-Air-M2 workout2 % flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.0, on macOS 14.5 23F79
darwin-arm64, locale en-CA)
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from:
https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android
SDK components.
(or visit https://flutter.dev/to/macos-android-setup for
detailed instructions).
If the Android SDK has been installed to a custom location,
please use
`flutter config --android-sdk` to update to that location.

[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[!] Android Studio (not installed)
[✓] VS Code (version 1.90.2)
[✓] Connected device (4 available)
! Error: Browsing on the local area network for DIΣGӨ,Ƨ IPΛD ΛIЯ
4ƬΉ GΣП. Ensure the device is unlocked and attached with a
cable or associated with the same local area network as this
Mac.
The device must be opted into Developer Mode to connect
wirelessly. (code -27)
[✓] Network resources

! Doctor found issues in 2 categories.
diegoochoa@Diegos-Air-M2 workout2 %

New contributor

Diego Ochoa Arteaga is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

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