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