Xcode 11 running on simulator failed with error Could not attach to pid - xcode11

I find a weird issue, every time when I close my WiFi, then Xcode command+R running my project on simulator will be failed with error like:
Details
Could not attach to pid : “1682”
Domain: IDEDebugSessionErrorDomain
Code: 3
Failure Reason: Error 1
Error 1
Domain: IDEDebugSessionErrorDomain
Code: 3
and when I open Wi-Fi, and connect to Internet, run on simulator will be fine.
My Xcode version:Version 11.3.1 (11C504)
OS: macOS Catalina 10.15.3 (19D76)
I have googled and found some similar issue like this one [https://forums.developer.apple.com/thread/120282
][1]
I tried all the solution I have googled, but none of them helped in any way.
Does anyone know how to solve this issue, or this is a bug of Xcode 11?
Thanks for any help!

clear data and restart Xcode it works for me.

Try running on a different simulator. That worked for me.
After that, I tried running on the previous simulator where I encountered the issue and it worked normally again.

Xcode 11.3.1: Restarting the Xcode resolved the issue.

Related

Xcode 12.3: Failed to re-create a coordinator for com.me.myapp

I'm getting the following message while trying to launch simulator
Details
Failed to re-create a coordinator for com.me.myapp.
Domain: IXErrorDomain
Code: 29
Failure Reason: Coordinator already exists.
User Info: {
FunctionName = "+[IXAppInstallCoordinator(IXSimpleInstaller) _beginInstallForURL:consumeSource:options:completion:]_block_invoke";
SourceFileLine = 313;
}
--
System Information
macOS Version 10.15.5 (Build 19F101)
Xcode 12.3 (17715) (Build 12C33)
Timestamp: 2021-01-25T15:50:20+01:00
I also found that it works Ok if i launch it on another device simulator (lets say iphone 11 pro instead of 12 pro) but i'd like to fix this somehow.
What i had already tried:
cmd+shift+K
rebooting mac
quitting xcode
Xcode: Version 12.3 (12C33)
any ideas on how to get it fixed would be appreciated
On simulador menu:
Device -> Erase all Content and Settings...
I solved it by uninstalling the app from the simulator and running it again.
Found the solution:
xcrun simctl erase all
Hope it helps someone facing the same problem.

How to resolve missing required file for Flutter iOS Build

I have written my first non-trivial flutter app and have successfully built and run it on both the Android and iOS simulators and an Android device (MOTO G7). In attempting to build it for an Xs Max connected to my iMac I get the following error during the Xcode build:
/Users/dev/FirstApp/ios/Runner/GeneratedPluginRegistrant.m:6:9: 'path_provider/PathProviderPlugin.h' file not found
I have searched the disk and found the following:
/Users/dev/FirstApp/build/ios/Debug-iphonesimulator/path_provider/path_provider.framework/Headers/PathProviderPlugin.h
/Users/dev/FirstApp/build/path_provider/intermediates/javac/debug/compileDebugJavaWithJavac/classes/io/flutter/plugins/pathprovider/PathProviderPlugin.class
I have googled and checked SO for various hints/solutions. None of the, few, suggested fixes has worked for me. My Flutter Doctor -v command display all checkmarks and no issues.
Am I missing something? Is this a Flutter/Xcode bug? I am using Xcode 10.3 and Flutter 1.7.x. Any suggestions or outright fixes would be appreciated.
In your xcode Open the *.xcworkspace file instead of *.xcodeproj file then
Product>Clean
Product>Archive
and waiting

Failed to find a suitable device for the type IBSimDev

I'm getting the following 2 errors that seem that alternate every time I try to build. I just upgrade my iOS to 12.2 which forced me to upgrade my osx to Mojave 10.14.4 and my xcode to 10.2.
Failed to find or create execution context for description.
Filed to find a suitable device for the type IBSimDeviceTypeiPad2x in
Assets.xcassets
This I have tried:
Cleaning Build Folder (repeatedly)
Closing and restarting Xcode and the simulator
Deleting Derived Data
I had faced the same issue my issue resolved by doing:
Clean build folder (shift + command + K)
Restart your system (Mac)
Note: Also missing simulator after updating to Xcode 10.3 fix by this solution.
Run this command in the terminal to make sure all simulator process in the background are killed :
sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService
Well I don't know how many other people this is going to help out but here was my issue:
I poked around and finally got another error that said that my simulator runtime is not available. What ended up solving it was simply restarting my macbook found from this thread: The iOS 8.1 simulator runtime is not available error in Xcode 6.1

Xcode does not open on Mac yosemite 10.10.3

My Xcode got crash and it does not open when I try to reopen. I've tried to open other versions of Xcode from applications too. None of the Xcode app responding.
I've tried restarting the Machine too. No luck. When I try to open from terminal (using sudo open --new /Applications/Xcode.app).
I'm getting this error
LSOpenURLsWithRole() failed with error -10810 for the file
/Applications/Xcode.app.
I've got wasted lot of time on this. Please help me out.
Your Xcode installation seems corrupted. Delete and reinstall Xcode from the app store.

XCode 4.6.3 showing link error ibtool failed with exit code 10

I installed XCode 4.6.3. Initially I was able to successfully able to build and run my code on it. However, all of a sudden when trying to configure my build on my iOS device, the build failed and showed the following error message - Command/Applications/Xcode 4.6.3.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ibtool failed with exit code 10
I tried various methods. I cleaned the App. I reinstalled Xcode. I deleted keys and certificates from Keychain Access. Its of no use. The Xcode is always showing this same error message. I created a fresh new sample project in this Xcode, it is still showing the same error message.
My Mac machine previously was Snow Leopard. I recently upgraded it to Lion OS X version 10.7.5
Please tell me what I should do to solve this issue. Thanks in advance.
Try making a clean new project, and see if the error persists.
And make sure you don't delete any important files like the
main storyboard or any xib-files.

Resources