App do not run on second Simulator? - ios

I am trying to run a app on multiple simulators. I did manage to run 2 simulators see link Xcode6: Run two instances of the simulator.
I can run other apps on the two simulators. I did manage to run this app on the two simulators in the past.
For some reason when I try to run a second simulator there is a pause I can see IOS system log trying to open the it just closes.
I searched the IOS Log file found that both simulators have the same data (unhelpfull). I would appreciate it if someone can just point me in a direction where to start searching for the problem?
My Mac memory is fine do not have to few. The start file is also not have anything I can see that might cause this problem.
Thanks in advance.

My problem was localisation that is why the add did not run on default english setting. The add worked correctly throw Xcode because the Sceme helped set the language.

Related

How to debug an app run from the iOS simulator directly? (not from xcode run)

we all know that if we build and run an app from XCode, we can see all the debugging, but what if we want to debug an app preinstalled on iPhone Simulator, I can't seem to find a way to do this, is this possible? how?
I tried iOS Console, but it doesn't seem to even work, the beta has expired.
thanks
If you just want to see the log output (e.g. NSLog()), see the following answer explaining where to find the simulator's system.log file.
https://stackoverflow.com/a/10165649
Note that if you are using Swift, "print" statements will not be written to the log file; they will only be displayed in Xcode's console.
the best way for me was
tail -f /Users/userName/Library/Logs/CoreSimulator/appID/system.log
it prints all data into mac terminal even though if you are not running the app from XCode or something, I wish I knew that before...

Simulator in use XCode 7

I have facing this issue frequently, and would like to fix permanently. There are a few known solutions I have like reset the simulator or quitting. But is there a proper fix?
You can run only one application on simulator at one time, So you can used below steps for resolve your problem as:-
A. Quit all other application and run simulator.
Or
B. Quit simulator and re-start application.
Or
C. Reset simulator or derived data based on your requirement.
Simple SoLution My friend
First of all quit your simulator.
And then quit and restart Xcode.
And then run your project.
it will work like Smoothly. try once.. its working 100 %
Then after it does't Work then
Try doing a reset content and settings
Another Way,
If you have two projects open in Xcode and one is running on the simulator, you can't run the other. Go through each project window and see if any are running, and if they are, press the "Stop" button on the top left
Another Way
multiple-projects-using-the-simulator then Here is the p[erfect answer, you can use ot. might be helpful to you.

Xcode6 can't run any app in simulator ( Domain = NSPOSIXErrorDomain, Code = 3 )

No app can run in my simulator, although building is good.
Error messsage is below:
Unable to run app in Simulator
An error was encountered while running (Domain = NSPOSIXErrorDomain, Code = 3)
In my case, I tried to run the app on a iPhone 6 simulator when I got this error. Quitted the simulator only and re-ran the app on iPhone 5s (8.1) - it worked fine.
After a while I changed the target back to iPhone 6 (without quitting it), and ran the app against it - no error shown.
As mentioned in the Xcode 6.1 Release Notes and in my sticky post in the Apple Developer Forums for the iOS Simulator, this is a known bug in iOS.
Upon installation of an app, SpringBoard will SIGKILL that app's
process in order to force a relaunch of the app with the new
executable. The problem is that there is a race condition whereby
SpringBoard may accidentally SIGKILL a new process that we just
launched rather than the old process. Which of the various error
messages you get depends on exactly when in the launch process the
SIGKILL was delivered. Normally, this shouldn't happen, so the advise
is to just try again (sorry =/). If you find that this happes to you
all the time or more frequently than you can tollerate, we are
incredibly sorry. We are aware that systems with slower disk I/O will
see this happen more frequently than faster systems, so if you are
using an NFS home directory, you may want to create a local directory
for your simulator data and setup a simlink to it from
~/Library/Developer/CoreSimulator
By Quitting the Simulator and Run the application worked for me.
For me , just Reset Content and setting in your simulator
Restart Mac can solve the problem for me.
This error is less severe than "Domain = DTiPhoneSimulatorErrorDomain, Code = 2" error that I had when I switched to Xcode 6.
For this one, I just reset and cleared contents on my Simulator...quit. Rebuilt and ran my app...and it works.
Every time this has happened to me (as of this writing, still happening on Xcode 6.1) I do not need to restart my mac to fix it. Instead I only had to restart the simulator. I exit the simulator by right-clicking on its icon in the tray and selecting the option to Quit. The I re-run my app and the simulator starts from scratch and runs my app with no error. Much quicker than re-starting the mac.
Well, I had the same error popping up, but since I force quitted the simulator then ran the project again I got it fixed and running fine. Hope that helps you :)
If this error occurs with ionic framework, make sure you have an app id given in your config.xml
This is a generic error which says that it is unable to launch the app. The real error is in the log file. Go to the Simulator menu, Debug / Open System Log. Then press Reveal button to open the folder with actual Simulator logs. In my case it was CoreSimulator.log.
Here you will find the real error. My error was Could not register service com.apple.gputools.agent.producer.sim .
After a lot to struggle and trying all suggestions for half a day, I just went to simulator menu and chose File / GPU Selection / Use External GPU when available. That's it.
please download new xcode_6 beta 4. your project will work in simulator. As i have tested as well.
Sometimes the beta version of XCode is wrongly configured to use the command line tools from the previous xcode version.
This solution should fix the issue for you : https://stackoverflow.com/a/25415781/512504

Xcode blocked at “Attaching to (app name)” when I launch my app in the simulator

I know there's a lot of posts with the same that problem. I just spent at least 2 hours to read them and I tried everything I saw in the responses but it still doesn't work. I don't know what to do anymore. Can someone help me?
I use Xcode 4.2.1
This problem occurs regularly for me, and the solution was always to kill the process named SimulatorBridge.
And to simplify the solution you can add a custom 'behavior' in Xcode to do the task by following these steps:
Make a shell script file with this command:
#!/bin/sh
killall SimulatorBridge
Save it in ~/Library/Developer/Xcode/UserData/Behaviors/ as KillSimulatorBridge.sh.
Open Xcode > Preferences > Behaviors, and add a new behavior to run the shell script:
Now, you can run this behavior whenever Xcode hangs while trying to attach to your app, and you can even have a keyboard shortcut to run it.
Hope this helps someone.
It can also happen when a different user account has the simulator running on the same computer. In that case, close the simulator on the other user's account and try again.
Restart your computer.
The simulator sometimes gets stuck and this is the only way I know to reset it. The same thing can happen to the device as well and you just have to switch it off and on again.
If that doesn't work, you may have to reinstall the SDK.

ios Simulator Could Not Find The Application To Simulate

I'm having trouble with the iOS simulator. I'm currently on 10.7 and was using the simulator to test my website. During the testing, I switched the iOS version via the tool bar, and the application froze and quit. Upon restarting, I get the following error message, with a finder window, inviting me to choose an application:
"ios Simulator Could Not Find The Application To Simulate"
Here's what I've tried to fix the issue:
1: Attempt to identify the application it needs, but the only thing i could see to open was a printer app and the ios simulator app, which just results in a "only one iOS simulator can run at a time" error message.
2: Restart the Mac.
3: Download the new Xcode tools from the app store.
4: Restart again.
None of this has helped, and I'm really stuck without it at the moment. If anyone knows how to resolve the problem, I would be grateful to hear any suggestions. Thanks.
Give this a shot.
Open up a new shell, and shoot of this command: sudo <Xcode>/Library/uninstall-devtools --mode=all (assuming thats the location of the instal).
Then run the Xcode installer you got from the app store.
This removes all the plist files that were also installed with xcode, which aren't removed when you simply reinstall. This is as close as you can come to a complete xcode refresh without reinstalling your OS.
Here's an alternative solution that worked for me... the answer selected here did not. I created a blank, "hello world" project and simply ran it. When you run the app, it sends the app to the simulator and voila! iOS Simulator has an app to simulate. From that point forward, you should be able to open the iOS Simulator without a problem.
After a while longer trying various things, it seems like I may have fixed it.
When asking for an application to open, I opened Xcode, and (weirdly) that opened up and left the testing shell visible, with the tool bar intact. I then selected the current version from the device options and hit the home button, and suddenly everything appeared.
Weird thing to have suddenly happened, but there you go.
I still can't test in iOS 3, so that's a bit of a problem, but not a disaster either!

Resources