Finished running <App> on iPhone 6.1 Simulator
Asked Answered
T

6

6

I'm developing a new application for Iphone, using Xcode (Version 4.6 (4H127)) and the iPhone 6.1 simulator (Versión 6.0 (369.2)).

At the beginning everything was great: every time I pressed the "run" button, the application was loaded into the simulator and I was able to test it. But sometimes it is not working: when I press the run button, I only get the message "Finished running on iPhone 6.1 Simulator". The code successfully compiles (only minor warnings).

enter image description here

The main problem is that when I get this message, the only way I can use the simulator again (in this project, the rest of the xcode projects seems to work properly) is by starting a new project and adding every file to it.

I've tried to delete de derived data, restart de simulator, restart de computer, etc. Even I made a snapshot when the simulator was working, but when I go back to the snapshot state, the simulator still don't work.

What can I do? Any idea?

Therewith answered 22/2, 2013 at 8:51 Comment(7)
Reset the simulator. no need to develop a new project every time.Unitary
In build setting, What's your deployment target? Is that set properly ?Demetri
Nothing happened :-( Thank youTherewith
@OKNC2, I think the build settings are correct: Debud (Yes), Base SDK (Latest iOS), Architectures (Standard armv7, armv7s), valid architectures (armv7 armv7s)... Do you need any specific information of the build setting? Thank youTherewith
Ok, I just realized that the output was error: "failed to attach to process ID 0". This problem was treated in many other threads. I'm not able to solve this already, but I think I should close this thread. Thank you to all of you who answered!Therewith
Once you solve it, post your answer and accept it. (Or accept someone else's if their answer worked.)Thresher
I didn't solved yet, so I cannot choose any of the answers as the correct one. I'm sorry :-(Therewith
G
11

1.Manually launch the iOS Simulator.

2.From the "iOS Simulator" menu, click "Reset content and settings",

3.Close and rebuild your app.

Genoa answered 22/2, 2013 at 9:3 Comment(0)
J
2

This problem may arise when you have problems with your project's plist's target membership. Select your info plist file from project navigator folder structure's Supporting Files, go to interface builder pane(Utilities Section under View in Top Bar), then look for Target Membership in File Inspector pane, if it is checked, uncheck it. Clean & Build, Hope it helps.

Joijoice answered 22/2, 2013 at 9:0 Comment(2)
It was unchecked, but anyway I tried to check, uncheck. clean and rebuilld, but nothing happened, still not working. Thank you anywayTherewith
Go to File -> Open Recent. See this list, if same project name appears in this list more than one time, maybe this is causing the problems. If so, you have to clean it up, by deleting these opened project workspaces from Xcode environment.Joijoice
T
1

Library > Application Support > iPhone Simulator > 6.1 (or whichever you're using) > Applications > Your Application and delete it.

enter image description here Rebuild your app and relaunch.

Thresher answered 22/2, 2013 at 9:23 Comment(7)
Since I made a "Reset content and setting" in the simulator, the application is not in the simulator anymore, so there's not an "Application" folder in the 6.1 folder. Thank youTherewith
Bit of a long shot but have you tried getting rid of the warnings then rebuilding?Thresher
Now I have not any warning at all and still "finished running..." :-(Therewith
Another long shot: Go to Product > Scheme > Edit Scheme select Debugger and change from GDB to LLDB (or vice versa).Thresher
When I set the debugger to GDB, it seems that xcode freezes with the message "Attaching to XXX.app" and the output: GNU gdb 6.3.50-20050815 (Apple version gdb-1824) (Thu Nov 15 10:42:43 UTC 2012) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-apple-darwin". sharedlibrary apply-load-rules allTherewith
Even if I don't set any debugger, I cannot atach the application to the debuggerTherewith
Hmmm... I'm out of ideas, I'm afraid.Thresher
P
1

I had the same problem, with the same "failed to attach to process ID 0" (I actually didn't notice that error until I saw that you said you had that error). In one of my projects the 6.0 simulator didn't work, but works in my other projects. Also my 5.1 simulator worked.

What worked for me was based off this other answer for a similar question: https://mcmap.net/q/187629/-failed-to-attach-to-process-id-xcode

  • Go to the Product menu and find the Edit Scheme menu there.
  • While in Edit Scheme window, select the "Run" option on the left hand side of the screen and then on the right hand side, change the debugger from LLDB to GDB.
  • Run the project, this worked in the simulator.
  • Then Go back to the Edit Scheme and set back to LLDB.

I noticed you've tried setting the debugger to GDB and not a debugger, but thought I'd mention what helped me, since you're question helped me get to the bottom of my problem (i.e. seeing the "failed to attach to process ID 0" message).

Phonon answered 19/3, 2013 at 4:51 Comment(2)
I couldn't find the correct answer to my problem, but since the last time I re-created the project it is working properly. I did everything like always, the only difference is that now my mac-user has not administrator privileges; I don't know if this affects something, but I haven't now all those problem.Therewith
Well, glad it's working for you now anyways. It's an annoying problem for sure.Phonon
G
1

This problem may arise due to presence of more than one info.plist file.

I also faced a similar problem, and eventually found that while adding some resource file from another project I also added its info.plist file.

Once check your Build phases> Copy Bundle Resources, whether another info.plist file exist there or not. If exists then delete it, clean the project and rebuild it. Hope it helps.....

Guberniya answered 22/4, 2013 at 6:49 Comment(0)
D
1

I ran into the same issue and somehow was able to fix it and almost immediately it went back to being broken. I can tell what broke it though.

I added a couple of folders (folder references) with files in them to the copy bundle resources section. That broke it. If I recall right, I had removed both of those and was messing around with DeploymentTarget. I might have reset the simulator earlier. Regardless, it started working. So,

  • there is hope for a fix
  • this thing is caused by folder resources that need to be copied into the bundle

Updated:

I was able to get it working again. Here is what I did.. - Cleared out the derived data folder - Shut down the simulator app - Also cleared the deployment in the simulator folders (Users/XXXXXX/Library/Application Support/iPhone simulator/6.1/Applications)

Since last time adding the folders to the bundle caused it to lock up, I tried it step by step adding one folder to the bundle and trying. Turns out one of my folders was named Resources and it dawned on me that particular name could potentially be colliding with something else the app looks for. So I renamed that folder to Res and tried it. It works now.

So there you have it.. Follow the steps above to get out of the problem. Avoid copying folders called Resources to your bundle.

Dao answered 27/6, 2013 at 4:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.