XCode 9.1 - Location simulation went missing - location

I just updated my XCode to 9.1 today, and surprisingly I can't find "Allow location simulation" in scheme setting, please refer to the screenshot below:
Has any one got the same problem? And any suggestion that I can fix it?
Apple's getting worse and worse lately.

I had this issue as well and the fix was to run the application in the Simulator and then go to Edit Scheme while the Simulator was running and the Core Location option magically reappears.

I just tried restarting XCode and running/stopping the app several times, then the checkbox magically appeared.
I've also fired a radar to Apple anyway.

Related

100+ "Class implemented in both MapKit and VectorKit" warnings with Xcode 9.0.1 and above

While running my project (which doesn't even use MapKit), my console gets spammed with more than a hundred class duplicate warnings:
objc[6377]: Class ___MKPlaceBusinessInfoItemAccessibility_super is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/AccessibilityBundles/MapKit.axbundle/MapKit (0x12f128f00) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/AccessibilityBundles/VectorKit.axbundle/VectorKit (0x12f2187b0). One of the two will be used. Which one is undefined.
These warnings were not present with Xcode 9.0.0, I am only experiencing this on Xcode 9.0.1 and above.
I am aware that this is a bug and I found a radar that is about this issue. Is there a way to silence these warnings without affecting the visibility of other SDK warnings?
This is actually a bug in the current iOS Framework and has nothing to do with anything in your app, module cache, libraries, etc. The reason this appears to be non deterministic is that it is only there when the Accessibility Layer is active, which it isn't on the simulator, except under very specific circumstances. The three I'm aware of:
The Accessibility Inspector is on
UI Instrumented Testing
VoiceOver for OSX is On (other ATs as well)
To get this to go away you should:
Exit Accessibility Inspector (if it's on)
Open Simulator
Hardware -> "Erase All Content and Settings"
Re run application.
Literally NEVER run this simulator with the Accessibility Inspector
Literally NEVER run UI tests on this simulator, which also rely on the Accessibility Layer to do their work, though I don't think doing so will cause the error to stick around until you "Erase all...." again, it will just be present for that test run.
Every time you do one of those last two bullet points, you will have to clear the data again...
The core issue is that MapKit and VectorKit both link to core accessibility bundles, but apparently have not done so dynamically, so those bundles are included in both modules. Such warnings are very safely ignored, though very verbose and frustrating.
Unfortunately there is no other fix for this... maybe you could download an old version of the simulator if you don't need iOS 11 features. Or just don't run instrumented tests/Accessibility Inspector/VoiceOver/I HOPE THEY FIX THIS SOON!
Got the same issue on 9.0.1.
You should quit Xcode and all Simulators.
Run rm -rf ~/Library/Developer/Xcode/DerivedData/ModuleCache.
Start Xcode again.
This issue was solved for me.
I don't give a damn about accessibility in the simulator so I just renamed one of the duplicate files so it wouldn't be found:
mv /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/AccessibilityBundles/MapKit.axbundle/MapKit /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/AccessibilityBundles/MapKit.axbundle/MapKit_
lol
Resetting the iOS simulator fixed this for me.
Simulator -> Hardware -> Erase All Content and Settings...
Exactly the same problem, in my case, I tried to delete all the files in DerivedData folder, but still not work.
And later I found that if I switch to another kind of simulator, for instance, switch from 'iPhone 8' to 'iPhone 8 plus', the warning would disappear.
So, simply delete the 'iPhone 8' simulator from simulator list, and then add the 'iPhone 8' simulator again, it works.
Not sure if the problem will come again, since it's also my third time dealing with this.
As you can see, there's something wrong with CoreSimulator of /Applications/Xcode.app. Apple Xcode Developer defined this symbol in both MapKit and VectorKit, which is the fundamental error.
You cannot modify Xcode, so only Apple's Staff can solve it.
Just stop wasting your time, except falling back to Xcode 9.0
Solved!
-On simulator
--Hardware
----Erase all content and settings
-Close xcode and simulators
-remove the content of ~/Library/Developer/Xcode/DerivedData/ModuleCache
-Start xcode...
My case is a bit different: I met this issue while running XCUITest.
After launching the XCUITest process, the target app crashes upon launch.
However, after I removed all the Web proxies, this issue is fixed!

Items in Root.plist are not display in settings. iOS9/Xcode7-beta5

None of my settings options are appearing for my project in iOS9. This happens not only with my project that has been converted to swift 2.0 but also the app from TestFlight which is Swift 1.2 compiled from Xcode 6. Is this an iOS 9 issue?
My problem is similar to this one. However, my setting never appear, even on the first launch.
Any ideas? Has anyone else come across this problem? Any input is welcome.
I found a solution to my problem here in the apple dev forums.
"My settings were blank, too, even though they were fine in the simulator. I ended up having to reset ALL settings and performing a full restore. This was a PITA, since it required re-entering passwords and my thumbprints. I sure don't want my users to have to go through this after the ios9 GM release"

XCode alert says UPDATING_LOCKED_* on launch

This is on OS X Yosemite. It appears when I try launching Xcode.
There are no updates shown in the App Store and there are no active downloading updates shown, either. Not exactly the pinnacle of Apple's great user experiences.
I hope I don't have to do a clean install…
This happened to me during the installation of iTunes 12.2.1 (1220C173).
I restarted my computer and ended the update, then Xcode opened properly.
Happened to me as well. Restarting the computer fixed it.
Restart fixed mine too - after restarting, it asked me if I wanted to install some required components, and once that was done it worked fine.
Opening Xcode from the App Store fixed this issue for me.
Looking at the screenshot it seems a weird error. I don't think there will be a easy solution for this error. You have to go through the hard way.
Update/Install xcode again. If it didn't then
Update iTunes and launch/download Xcode again. If it didn't then
Update your Mac OS and try the above
P.S: I usually download xcode from here rather than from Appstore( requires Apple ID to login) https://developer.apple.com/downloads/
In my case I attempted to download Xcode 6.4 from the AppStore and got this same message AND the AppStore progress indicator was stuck; I couldn't pause the download because the button was grayed out. I rebooted and restarted the download a few times to no avail. But then I decided to wait and let the thing work itself out, and it did. Aparently there is a bug in the AppStore download for Xcode 6.4 that DOES download it (and it took forever in my slow connection) but does not show a progress bar. When I opened the Activity Monitor's Network tab, there it was!

Cannot find executable for CFBundle CertUIFramework.axbundle

Just updated to Xcode 5 and this is the first error its throwing on the logger for all my apps. Can't seem to understand why this is happening.
2013-09-19 10:46:54.341 MyApp[1156:a0b] Cannot find executable
for CFBundle 0x8a7c7a0 </Applications/Xcode.app/Contents/Developer/Platforms/
iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/
System/Library/AccessibilityBundles/CertUIFramework.axbundle> (not loaded)
Edit (11-11-2013): To everyone reading, once I waiting for a solid working solution to accept and close. The highest voted answer works until you re-open the project only.
Edit (30-09-2014): I can see this has been sorted since XCode 6 has been released! Finally
Final Edit-
Temporary workaround: click iOS Simulator > Reset Content and
Settings... and run again.
This error message may reappear at random. For me, it happens when I
launch a different application. There are several threads in Apple dev
forums and in StackOverflow about this problem, but none have a
definitive answer. This seems to be a SDK error to be fixed in the
next Xcode version.
Updated: October 3.
CREDIT - Please check this answer - Xcode 5 Error CertUIFramework.axbundle
Further Edit
Although this was potentially the issue resolution at the time. I believe some of the newer answers below relating to the better touch tool are in fact the correct resolutions.
After reading Kirill's answer I did some digging as I didn't want to disable BetterTouchTool for everything just the "iOS Simulator" and you can.
Open the "iOS Simulator" and will it as the active app go to the BTT drop-down menu from the top bar (of that screen if you have more than one) and select "Disable BTT for Current App". It will turn to a play icon when it's disabled.
Make sure the app name on the bar is still "iOS Simulator" as mine jumped to "Finder" a few times when I clicked the top bar!
Now re-set the simulator (if it doesn't work) and rebuild. You shouldn't get the error! :)
Don't forget to clear the error if it's still there. ;)
BTT seems to remember what apps it's disabled for (or at least it does when you close and re-open the app that's disabled I haven't tried a system re-boot yet).
Its easy. Go iOS simulator and reset content and setting.
Thanks
If you are using XCode-5 then just reset the simulator "Reset Content and Settings" and run once again
So I was having this error too in Xcode 5 and 5.1. I wanted to figure out if it's Xcode bug or something else, so I did a fresh install of Mavericks 10.9.2 and Xcode 5.1. Everything seemed fine after multiple tests.
Here is where the problem began. I put the apps and settings that I mostly use and the error came back. So I deleted everything and started adding everything one by one. After couple days I had bingo! The problem is with BetterSnapTool and BetterTouchTool
Update 12.12.2014
Just started using Xcode 6.1 and noticed that this bug seems to be gone at least with Xcode 6.1 simulators and BTT 0.9985 versions.
Update:
As GasB pointed out, it is possible to disable BTT for certain apps. So just disable it for iOS Simulator. You just have to remember not to use gestures while using the simulator as that triggers the error message.
Simple solution:
Remove the ticks in preference pane, reset simulator and do clean build. The error message will disappear.
.
I had the same problem and solved it setting the 'Localization native development region' to match my systems region. In my case from 'en' to 'de'. The referenced files are stored in localized versions in your filesystem. So this setting is used to identify the needed version.
You can find that setting in your project settings at 'Info' -> 'Custom iOS Target Properties'.
Resetting the simulator ‘fixes’ it because it turns the accessibility support off. You can normally achieve the same by simply disabling the ‘Accessibility Inspector’ in the ‘Settings’ app.
If, however, you need it enabled, particularly hate this error message, and are feeling adventurous then you can use the following monkey patches to silence the error: https://gist.github.com/alloy/9277316. (Be sure to NOT include this in your release builds.)
Resetting the simulator is a PITA, I found a way to get rid of these messages without having to to this:
go to Settings > Accessibility
turn on Accessibility Inspector
turn off Accessibility Inspector
quit Simulator
I had this problem with Xcode 5 in ML 10.8.5
I re-installed Mountain Lion (in a Parallels' VM), then update ML to 10.8.5.
Then installrd Xcode 5, and it's worked fine.
I think that the error is caused by a third SW installed in ML.
The application Moom is also causing this issue, and I couldn't find a way to disable it for just the iOS Simulator. So for now I disabled it's accessibility features.
I'm on Mavericks (10.9.3) and encountered the same error in xCode(5.1.1).
I tried anything - reinstalling xCode from both AppStore and dmg. Resetting the emulator resulted in the same error and deleting the Simulator SDK folder gave no results too.
The issue on my end was indeed Moom as mentioned by #aorcsik! Disabling it's accessibility, followed by clean (cmd+shift+k) in xCode cleared the error.
Open Disk Utility and apply Repair Disk Permissions in Macintosh HD.
After doing above step, apply Reset Contents and Settings in iOS Simulator.
This above solution can definitely fix your problem.
I had this problem, and none of the answers in this thread could fix it. Mine was simple UI with a UIDatePicker. I resolved it by removing the UIDatePicker and the associated code, then added them in again. Problem solved!
For me it was Keyboard Maestro, adding the simulator to Maestro's exclude list silenced the warnings

Can't run Instruments from Xcode

I recently upgraded to Snow Leopard and since then I am having difficulty running Instrument to instrument my app from Xcode. The Record button would be grayed out, and nothing happens. There is no message in Xcode's console telling me what's wrong either. I used to be able to attach it to process or launch the process from Instruments as well, all these are no longer working.
Any idea what's causing this?
I had the same issue! I could only use Instruments on my iPhone but not on iPad or iPad2!
Whenever I started instruments with Xcode 4 it would just beep and the record button would be disabled..
I solved this issue by in XCode going to >Targets>Edit Scheme>Profile "yourAppName" and changing the Build Configuration from Release to Debug.
Then try to profile again Product>Profile
If you get the beep again..
You will see that it says "CHOOSE TARGET" next to the record button open the drop down >Choose Target> "yourAppName" then hit record.
This solved it for me and was finally able to run instruments again!
I know this post is old but i hope it helps someone.
I had this issue in Xcode 7. It turned out that, somehow, in the Profile section of my scheme settings, the Executable field had been cleared:
I set the Executable field to my target name and the menu enabled again.
I was unable to get instruments to work with my iPhone (it had previously worked). The behaviour I saw was that xcode would say "finished running - Profiling [app name]" before the instruments window was even shown (the choose instrument window).
I worked around this by going to product->scheme->edit scheme, select profile [app name] and select an instrument (i.e. Allocations) under the instrument drop down (instead of "ask on launch").
Once I did this, selecting Product->profile worked for me and the instruments was running.
I wanted the zombie instrument which strangely isn't in the xcode dropdown, I was able to use this by simply using file->new in instruments (while the allocations instrument was still connected and running) and I could then choose the zombies instrument and the record button wasn't greyed out!
All of this was with iOS 7.0.3 and xcode 5.0.1.
I hope this helps at least one other person to stop ripping their hair out, but knowing xcode I somehow doubt it!
I had the same problem after reinstalling Snow Leopard last week. I moved my /Developer folder to /Developer_old and re-ran the Xcode installer pkg, and now have Instruments back.
HTH
The problem is instrument needs a gateway to your app and simply pointing to it doesn't do it. The Instrument's workflow is as such: You need to profile it from Xcode first.
I highly recommend seeing Apple's own links shared in this answer. They are amazingly good and simple.
Apple's documentation says
If Instruments has access to information about your app’s source code,
a leak is reported as a class name. Otherwise, a leak is reported as a
memory address, such as Malloc-size. To ensure that Instruments has
access to information about your code, initiate profiling from Xcode
(see Profile from Xcode) or configure a symbol mappings file (see Map
Data to Source Code).
what worked for me was
running the app on Simulator
going back to Xcode's Debug Navigator (CMD+7)
selecting CPU/Memory
clicking Profile in Instruments
Note that if you have multiple targets, it is very likely that you need indeed to tell Xcode which one you want to profile. Use the edit targets scheme above
I've noticed that if I go to File->Record options, and press OK, the record button suddenly is enabled.
Make sure all of your instruments support recording modes. When I upgraded from Xcode6 to Xcode7, one of my instruments was marked as "This instrument's supported recording modes are none". When I deleted this specific instrument, the recording button becomed enabled.
As pointed out in Apple's discussion forum, restarting your machine works. It works for me.

Resources