Reputation: 783
I can't run my app on the iPhone simulator. Xcode 5.0 shows that it is currently "Attaching to [MyApp]" and will be stuck in this.
Previously in Xcode 4.2 I can change the debugger to GDB and it works, but in Xcode 5.0 there is only LLDB.
Anyone managed to solve this problem?
Upvotes: 2
Views: 2377
Reputation: 783
Make sure you have localhost mapped to 127.0.0.1 in your /etc/hosts file. As suggested by trojanfoe's link Why does the LLDB Debugger constantly fail to attach?.
Upvotes: 3
Reputation: 1713
If you need to kill Xcode to "solve" this it is a bug in Xcode. File a bug at Apple: https://bugreport.apple.com
Upvotes: 0
Reputation: 3914
Just quit the Xcode. Reset your simulator content and settings.
Clean and build your project again and you are ready to go.
Edited
delete the Derived Data in the Organizer under Projects or directly in ~/Library/Developer/Xcode/DerivedData
clean the Build Folder by choosing "Product" in the MenuBar and click while you press the Alt-key on "Clean Build Folder"
Restart Xcode
Then delete the app from your simulator if it is. Reset your simulator's content and settings.
Now clean and build your project. It should work fine.
Upvotes: 1
Reputation: 11233
I have observed this behavior mostly when during debugging the app is running and I stop the debugging using short-cut Cmd + .
and repeat this activity several times.
In order to fix it you can force close Xcode from the Finder
(or sit and wait to close once available) and just restart Xcode. Note that iPhone simulator should not be using your app in the meanwhile (if it is the case, press Home button of simulator)
I think there is no need to use simulator's Rest Content and Setting...
feature.
Hope it helps!
Upvotes: 0