Search code examples
flutterxcodeandroid-studioios-simulator

iOS simulator is not working anymore in Android Studio


I have a flutter project. I am able to run in Xcode but I can't run in Android Studio.

I had an old developer account and i deleted related certificates in keychain. Somehow Android Studio still looks for old credentials. Even though I delete the account in Xcode, it came back after I try to run in Android Studio. How can i fix that issue?

--- xcodebuild: WARNING: Using the first of multiple matching destinations:
    { platform:iOS Simulator, id:FEF8278D-959F-4D62-9A49-71CDCB82B074, OS:18.0, name:iPhone 16 Pro Max }
    { platform:iOS Simulator, id:FEF8278D-959F-4D62-9A49-71CDCB82B074, OS:18.0, name:iPhone 16 Pro Max }
    2024-09-22 21:29:49.077 xcodebuild[32544:1459090]  DVTDeveloperAccountManager: Failed to load credentials for B7074919-FC54-4A8F-94B8-A79D26E84839: Error Domain=DVTDeveloperAccountCredentialsError Code=0 "Invalid credentials in keychain for [email protected], missing Xcode-Token" UserInfo={NSLocalizedDescription=Invalid credentials in keychain for [email protected], missing Xcode-Token}
    2024-09-22 21:29:49.079 xcodebuild[32544:1459090]  DVTDeveloperAccountManager: Failed to load credentials for [email protected]: Error Domain=DVTDeveloperAccountCredentialsError Code=0 "Invalid credentials in keychain for [email protected], missing Xcode-Token" UserInfo={NSLocalizedDescription=Invalid credentials in keychain for [email protected], missing Xcode-Token}
    ** BUILD FAILED **
Could not build the application for the simulator.
Error launching application on iPhone 16 Pro Max.

Xcode Version 16.0 (16A242d)

Flutter (Channel stable, 3.24.0, on macOS 14.5 XXX darwin-arm64, locale en-TR)

  • Flutter version 3.24.0 on channel stable at /Users/handelika/Development/flutter/flutter_3.24.0_stable
  • Upstream repository https://github.com/flutter/flutter.git
  • Framework revision XXX (8 weeks ago), 2024-07-30 23:06:49 +0700
  • Engine revision XXX
  • Dart version 3.5.0
  • DevTools version 2.37.2

What I try;

  • Cleaned Android studio invalid cache among others.
  • Cleaned drived data
  • Cleaned iOS simulator contents and settings.
  • Pod update, delete, clean and install

Solution

  • After lots of try, I solve with like this.

    First; I deleted all xcode related and the mail related things in keychain. And then i reinstall xcode and login for signing. That warning gone after that.