Xcode 6, ios 8 simulator will not boot [duplicate] - ios

This question already has answers here:
Unable to boot iOS 8 Simulator
(2 answers)
Closed 8 years ago.
I'm getting the following error:
Error Code: (Domain = DTiPhoneSimulatorErrorDomain, Code = 2)
Any ideas?

Try opening the Simulator and from the menu select Reset Content and Settings then rebuilding your app

Is there anything interesting in ~/Library/Logs/CoreSimulator/CoreSimulator.log?
Do you see an "Unable to boot the iOS Simulator." error message in that log file or in a dialog in iOS Simulator.app? If so, that is almost always because launchd_crashed because DYLD_INSERT_LIBRARIES was set to something not compatible with the iOS Simulator runtime. Do you have any crash logs (eg: launchd_sim crashes) in ~/Library/Logs/DiagnosticReports? If so, check if they show DYLD_INSERT_LIBRARIES being set. If that's the case, your options are to either update to an OS X Yosemite host (which will deal with this issue) or unset DYLD_INSERT_LIBRARIES (likely set in /etc/launchd.conf or ~/.launchd.conf)
Another common cause of this error message is a bug mentioned in the release notes in which the current workaround is to just try again (there is a timing bug during install/launch).

Related

Coredata VFS flags - strange log

Since my latest update of Xcode, I get repeatedly the following log in my Coredata based app:
[logging] flag(s) 0x00000020 are reserved for VFS use and do not affect behaviour when passed to sqlite3_open_v2
Is this simply log noise or is it in any way relevant to me?
Update:
This happens under Xcode 13.2.1 on an iPhone with iOS 15.4. It does not happen on a Simulator with iOS 15.2.
I'm pretty sure this is something you can ignore, that will probably be fixed when iOS 15.4 is out of beta.
According to the SQLite file-open flag documentation,
Flag value 0x00000020 is SQLITE_OPEN_AUTOPROXY, for what that's worth
This flag is one of several flags that "...have historically been ignored by sqlite3_open_v2()", however...
"...future versions of SQLite might change so that an error is raised if any of the disallowed bits are passed into sqlite3_open_v2()"
What this seems to say is that the flag has no effect and hasn't had one for a while, so it doesn't matter if Core Data is using it internally. The message probably means that iOS 15.4 has a newer version of SQLite which has started to print warnings about it but hasn't started causing errors yet.
I'd expect this to be fixed when 15.4 is released, and in the meantime I encourage you to file a bug with Apple just in case.

Xcode 8 : PAC Fetch failed with error [NSURLErrorDomain:-1003] log on Console window

I’m getting some strange log on console window while working on project. These are mentioned below :
nw_parameters_set_source_application Failed to convert from PID (0) to UUID. This could lead to wrong data usage accounting.
PAC Fetch failed with error [NSURLErrorDomain:-1003]
nw_proxy_resolver_create_parsed_array PAC evaluation error
I”ve checked below links but didn’t found any useful.
Link 1
Link 2
Note : I’m using Xcode 8.3.2 with iPhone 6 Plus device (iOS 10.3) and Swift 3 language in Project. It seems that there is no issue with this.
These logs appears all of sudden although there is no change in my code.
Most important thing is that my project is working as usual. So why I’m getting this issue?
Apart from this will there be an issue when app is uploaded on AppStore?
It's system logs that does not make sense in 99% cases. You should disable this logs in scheme settings
Click on scheme icon -> Edit Scheme -> Arguments -> Environment Variables
And add that variable:

refreshPreferences HangTracerEnabled / HangTracerDuration messages in iOS 11 + Xcode 9

When update to iOS 11, after run app in iPhone, I receive this message in Xcode console:
SibDiet[924:111682] refreshPreferences: HangTracerEnabled: 0
SibDiet[924:111682] refreshPreferences: HangTracerDuration: 500
SibDiet[924:111682] refreshPreferences: ActivationLoggingEnabled: 0 ActivationLoggingTaskedOffByDA:0
And now I get this message in every simulator and app.
How can I solve this problem?
You can hide this message with click left mouse button on your target, and next Edit Scheme.
After that in section Environment Variables create variable with name OS_ACTIVITY_MODE and value disable as on the picture below.
At this point, there are no data to suggest that you need to respond to this spewing of internal debugger status. BTW, these messages also appear when developing on physical devices, not just simulators.
The prior answer of disabling the Xcode Environment Variable OS_ACTIVITY_MODE will stop all such internal system messages with the unfortunate side effect of turning off console logging from NSLog() calls in ObjC. I have not checked, but it may also disable Swift print() logging.
The Xcode team should really discriminate between disabling system logging and user logging!
It seems the (refresh preferences...) problem appears on multiple platforms.
I managed to fix it on High Sierra(10.13.1) XCode 9.1 and with iOS 11.0.3 by defining OS_ACTIVITY_MODE as disable by going in XCode via
Product > Scheme > Edit Scheme > Arguments > Environment Variables
add OS_ACTIVITY_MODE disable
Note: NSLog may not work after doing this.
Similar issue is reported in the question:
How to fix refreshPreferences Message in Xcode 9 [duplicate]

iOS 10 doesn't print NSLogs

Nothing prints from NSLog on Xcode 8.0 beta (8S128d). printf is unchanged
Here's my code:
NSLog(#"hello from NSLog");
printf("hello from printf");
Here's the output on iOS 9 Simulator:
2016-06-17 09:49:10.887 calmapp-dev[28517:567025] hello from NSLog
hello from printf
Here's the output on iOS 10 Simulator:
hello from printf
It could be that you added the property "OS_ACTIVITY_MODE": "disable" in the Scheme environment variables (to hide OS output from the simulator) and forgot about it, and now are running on a real device.
In Xcode 8:
Product -> Scheme -> Edit Scheme -> Run -> Arguments -> Environment Variables
Only add OS_ACTIVITY_MODE and check it(Don't add a value)
Summary:
This is a bug of Xcode 8 + iOS10, we can solve it in this way:
When using the simulator, add the Name "OS_ACTIVITY_MODE" and the Value "disable" and check it.
When on a real device, only add "OS_ACTIVITY_MODE" and check it(Don't add the Value).
You will see the NSLog in the Xcode8 Console.
If you check the Xcode 8 beta release notes, you'll find that it says:
When debugging an app running on Simulator, logs may not be visible in the console.
Workaround: Use command + / in Simulator.app to open the system log in the Console app to view NSLogs. (26457535)
the NSlog or print actually is executed but is hidden among lots of other console debug outputs to solve this issue
Open Xcode8:
Product -> Scheme -> Edit Scheme -> Run -> Arguments -> Environment Variables
add "OS_ACTIVITY_MODE" and set the Value to "disable" and check it.
click close
xcode9
add "OS_ACTIVITY_MODE" and set the Value to "default" and check it.
Also, make sure the Console is actually visible in Xcode (i.e., make sure the right-hand side icon is highlighted in blue, as per the image below). After I upgraded Xcode, it hide the Console and showed me just the Variables view. This made it look like NSLog() was not working properly, whereas it was indeed working correct, I just couldn't see the output.
I can't see NSLog output in real iOS 10 device neither. If you're using real devices, you can open Devices window from Xcode (Shift + Command + 2) and see device logs there, but it's hard to look at your app's logs because the console shows logs from system and all apps.
(I'm using Xcode 7, so it's may not Xcode's problem but iOS 10 problem)
For anyone who comes upon this in the future. The reason NSLog doesn't print to syslog in iOS 10 and iOS 11 is due to Apple changing to Unified Logging.
You can see the WWDC talk about it here: https://developer.apple.com/videos/play/wwdc2016/721/
Documentation here: https://developer.apple.com/documentation/os/logging
From 10 on you should be using os_log instead of NSLog.
How to find the logs on disk: https://www.blackbagtech.com/blog/2017/09/22/accessing-unified-logs-image/
To summarize, the logs are located in /var/db/diagnostics which can be found for a VM at /Users/USERNAME/Library/Developer/CoreSimulator/Devices/SIMULATOR-GUID/data/var/db/
Copy all items inside diagnostics and uuidtext into a single folder (don't include the folders diagnostics or uuidtext just what is inside).
Rename that folder foldername.xarchive.
Open it in Console.app or use the OSX util log: log show <path to archive> --info --predicate <options>
Hmmm... it seems like the property "OS_ACTIVITY_MODE": "disable" PREVENTS NSlog from showing up in the Xcode 9 log.
Unchecking this value in my scheme restored my logs.
I'm using Xcode 8,so I also encountered the same problem . And I solved this problem by adding value = disable on the simulator, but on a real machine I don't add value.
NSLog messages no longer displayed when I upgraded to Xcode 9.1 + iOS 11.1. Initially the accepted answer gave me a way to work around this using the Console app and enabling the Simulator (see Lucas' answer).
In the Console app under Action I tried selecting Include Debug Messages and deselecting Include Info Messages (so the Console isn't swamped with system messages). NSLog messages appeared in the Console window in Xcode but not in the Console app.
I realised there had to be a more direct way to disable or enable (i.e. default) NSLogs thanks to Coeur's comment in response to this answer. In my opinion it is the best answer because setting OS_ACTIVITY_MODE to disable or default will make more sense for beginners.

Xcode Organizer - The service is invalid

I'm using XCode 4.3 (on Lion) and my iPod touch 2nd generation does show up, but displays "The service is invalid" (0xE8000022). I've tried every possible combination of restarting/reconnecting the device and have even restored the OS on the device... any ideas on how to further figure this out?
EDIT - initially I suggested restarting the device but I realized you had already done this.
I think this answer might be valid:
Error : The service is invalid

Resources