Cannot enable Mac OSX Lion Location Services with Safari - macos

I just hit a frustrating problem while debugging that I am hoping that someone else has encountered...and solved. I am troubleshooting an app that uses the javascript Geolocation app on OS X Lion. I have been using Safari and everything was working fine.
After a reboot, Safari reported that access to Geolocation services was denied. In the Safari preferences, under privacy, the option to "Limit Website Access to Location Services" the setting is indeed set to "Deny without prompting".
The problem is that I cannot seem to enable this setting. According the Apple doc, you need to first enable location services for the application in the System Settings. This is under Security and Privacy -> Privacy. I have seen cases where this is empty and Safari simply doesn't show up. Finally, after another reboot, Safari.app actually showed up here. Unfortunately, after enabling Safari here, I still could not enable location services in the Safari settings. It is almost like the settings are out of sync with each other.
Any thoughts would be greatly appreciated!

I just ran into the same issue but found a solution on a support forum.
Solution 1:
Cycling "Set timezone automatically using current location" in the Date & Time > Time Zone preference pane fixed my issue. It's possible that a legacy preference left over from my Snow Leopard install was causing a problem there.
Solution 2:
For me, I had to quit the iPhone simulator to toggle the option on.
The second solution did the trick, but maybe only because I tried the first one, uh, first.

Related

Installing MagicDraw “libjvm.dylib” cannot be opened because the developer cannot be verified on mac M2 pro

I installed MagicDraw 190_sp3 on my mac but it couldn't be opened. When I try to open it shows the error that the developer couldn't be verified. Can anyone help me in this regard, please?
Is your macOS showing an error alert like below?
If so, your app is not signed and notarized.
If you’re certain that an app you want to install is from a trustworthy source and hasn’t been tampered with, you can temporarily override your Mac security settings to open it.
If you still want to open an app for which the developer cannot be verified, open System Preferences. Go to Security & Privacy. Make sure Allowed apps downloaded from is set to App Store and identified developers. Click the Open Anyway button in the General pane to confirm your intent to open or install the app.
The warning prompt reappears, and if you're absolutely sure you want to open the app anyway, you can click Open.
The app is now saved as an exception to your security settings, and you can open it in the future by double-clicking it, just as you can any authorized app.
See this KB from apple for details
Thanks for your answer kakaiikaka.
I did all of those steps but it was still showing the problem, then I found out the problem was with my JDK version on my JVM. So, I installed JDK version 8 and again tried to open this and it worked as a charm!

macOS app on Catalina through Xcode receives "TCC deny IOHIDDeviceOpen"

With Catalina out, I have took time to update and tried to run my app but I am facing a weird issue.
My app is monitoring key events therefore needing the new authorization to monitor inputs.
If I run through the signed bundle, I do get the warning telling me to turn it on in the system preferences which I do. It then works fine.
If I do the same running through Xcode or through Iterm2, I always have the "TCC deny IOHIDDeviceOpen". I have tried to authorize products of the build but it does not change anything.
Anyone with an idea ?
If that doesn't work, make sure your terminal program (e.g. iTerm.app) is also checked in the "Input Monitoring" permissions.
I had a similar problem. I found that removing all entries for my app from System Preferences->Security & Privacy->Input Monitoring and then re-running under Xcode worked. It is almost like Catalina recognises the app as one in the store and doesn't ask about turning support on but then sees it as a different app when it actually comes to opening devices

Network Link Conditioner Freezes and Wont Start

I have downloaded Hardware IO Tools for Xcode 7.1 from the Apple Developer site and installed it by opening the DMG and then double clicking Network Link Conditioner.prefPane.
I then go to my System Preferences and can see the Network Link Conditioner is there. I can go into it but as soon as I click the switch to turn it on the whole System Preferences freezes up. Also, I noticed that my keyboard seems to stop working...somewhat. I can still do cmd + spacebar and then type in there to search my system but I can't type into the URL field on safari for example.
My Mac: OS X Yosemite v10.10.5
My Xcode: v7.2.1 (7C1002)
By the way, I downloaded the 7.1 version of the Hardware IO Tools as they only have a 7.1 or 7.3 version, there doesn't seem to be a version for 7.2. Maybe that is the issue? I can't currently upgrade to 7.3 as that requires me to upgrade OS X to 10.11 but our company policy does not currently allow for that.
Anybody know how I could fix this?
Could this be caused by the fact that I am not an admin on my machine?
My suspicion was correct, it wouldn't start as it needs to be run as an admin.
If you're not an admin, you need to run a command such as
sudo /Applications/System\ Preferences.app/Contents/MacOS/System\ Preferences
or in my case I had to get an admin in the office to do:
su - <admin_username> /Applications/System\ Preferences.app/Contents/MacOS/System\ Preferences
These commands will open the System Preferences as an admin user.
I have noticed that when he Network Link Condition is open in the System Preferences, my keyboard stops working in certain areas still. For example, I couldn't type in here whilst the panel was open (even with it turned off) but as soon as I closed the panel I could type again. I will possibly open another question at a later dare about this though.

Safari Web inspector keeps disconnecting

I've Safari 8.0.6 with iOS 8.3 on my iPad, while debugging through Web Inspector on my Mac (10.10.3), the connection keeps on disconnecting (I don't see the device name under Develop menu upon disconnection) but can resume if I quit safari followed by a relaunch then I'm able to refresh and inspect remotely again.
There are a few things to try:
1. Test on the Xcode Simulator:
Open the iPhone simulator in Xcode and debug there with Safari Web Inspector.
Sidenote: Maybe you need to download the Safari Technology Preview
2. Reset your location and privacy settings on your device.
Settings > General > Reset > Reset Location & Privacy
3. Debugging on a real device
With this configuration it seems to work right now.
iPhone X, iOS Version 12.1.3
macOS Mojave Version 10.14.2 (18C54)
Safari Version 12.0.2 (14606.3.4)
Edit 2019.08.13
Settings -> Safari -> Advanced -> Check that Webinformation is toggled on.
It was suddenly toggled off and I couldn't connect via the Web Inspector. After toggling it on, it worked.
For other devices / versions, please read further down (Maybe you can decrease your build size).
EDIT: 2018.09.20
#Chet found out, the Web Inspector keeps disconnecting for too large JS files and map files
https://stackoverflow.com/a/52338231/4641479
Issue on Github:
https://github.com/google/ios-webkit-debug-proxy/issues/275
https://github.com/google/ios-webkit-debug-proxy/issues/274
I could confirm this on a real device with a production build (1.8 MB + 2.4 MB files), the Safari Web Inspector stays always connected.
Since for the development build it is not:
Before my web inspector very rarely worked and often just stopped working - but was still open. After the safari update the web inspector opens and closes immediately. If you encounter such problems..
This will work:
Step 1. Get the latest Safari Browser
Safari: 11.1 (12605.1.33.1.2)
https://developer.apple.com/safari/download
macOS Sierra and OS X El Capitan (I assume macOS high Sierra is also supported)
Maybe you need to download the Safari Technology Preview
Step 2. Reset your location and privacy settings
On your device go to:
Settings > General > Reset > Reset Location & Privacy
Source: https://forums.developer.apple.com/thread/87181
Step 3. Connect your device
Open Safari on OS X
If you had connected your iPhone device with an usb cable, disconnect it first.
Now plug it in.
On OS X Safari go to:
Develop > Device name > Apply for development
Now on your phone there is a permission question. Choose trust and now you can choose the open tab on your devices safari and debug.
Happy debug!
Now the web inspector stays connected.
Do you have a lot of backgrounded apps running on your iPhone? Kill them and try again.
We showed this issue to Apple developers at WWDC, and they suspected it was due to memory constraints on the iPhone. Sure enough, killing most of our backgrounded apps resolved the issue for us.
Working Solution (as of 24th Mar 2020)
Well, after so many trials and opening thousands of blog posts to figure out a solution, I managed to get it working without a single case of failure.
For me, this has been always a problem with my Ionic+Cordova application.
My subconscious mind started to think about this problem when I saw that this issue (of Safari getting disconnected) is not there when I run a plain simple Cordova or Ionic application. And then suddenly, I tried another thing and it worked.
Basically, the Safari web inspector disconnects when the size of any files are too large (not sure about the limit). Maybe, some image, some script, and CSS. In my case, it used to because of the JavaScript & their source map files.
So, when I started to run my iOS application without source maps, the problem is gone. For that, all I had to do is to pass --source-map=false to my ionic cordova commands like:
ionic cordova run ios --source-map=false
ionic cordova run ios -lc --source-map=false
I wrote a small article about this to elaborate this in detail https://medium.com/wizpanda/a-small-tip-to-speed-up-development-with-angular-or-ionic-d5764f639c0c
Original Answer
Most of the answers listed here worked for me for a while but after a few hours they also stopped working and my Safari web console again keeps disconnecting as it opens.
Other few options that worked for me:
Option 1 - Empty Cache From Safari
Safari on MacOS -> Develop -> Empty Cache
Option 2 - Clear Trusted Computers
On iOS Device -> Settings -> Developer -> Clear Trusted Computers then reconnect the USB cable and then try to debug again
Option 3 - Make the debugger fool (as of 14th Jan 2019)
This solution is working for a long time now. Since this is an issue related to connection between iOS & Mac so I opened my Console app and just kept my iPhone selected. (This is somehow kept my iOS device connected to my Mac)
Then opening the Developer's console on Safari worked fine for me without disconnecting.
Option 4 - Run via Xcode
This is also a kind of workaround and a hack to see it functional. You can basically prepare your iOS app by ionic cordova prepare ios and then run the app using Xcode and deploy it to your iPhone.
At least, I'm able to see the console logs and sometimes, it even works with Safari web inspector.
Option 5 - Run on iPhone simulators
I think this is the most working solution. This option is suitable when your system is not running too many applications as firing a simulator suckup a good amount of system resources.
Basically, instead of running your app on a real device, run your app in an iPhone simulator via Xcode and debug it normally in your Safari web inspector and this problem will not occur.
This is probably because the files being transferred to Safari inspector is from the system itself.
Sounds strange but it may be happening due to the battery being full triggering a disconnect: https://forums.developer.apple.com/thread/92290
The disconnection seems to occur when the battery of the Iphone is full. (So for the moment we turn the flash and the camera on to kill the battery while inspecting ...)
This is only necessary for physical devices. Physical devices can be forcefully disconnected by Safari if the device's battery is full. ("Full battery? Well then, let's just disconnect you as you don't need to charge anymore -- and there goes your debugging session too...")
You will want to select Connect via Network in Develop > [device], and then attach your debugger to the page you want to debug. If you do not have the Develop menu in Safari, go to Safari > Preferences > Advanced and select Show Develop menu in menu bar.
If this doesn't work, you may try upgrading your OS/Safari through the App Store first.
If things are still breaking, disconnect your iOS device. Go into your iOS device into Settings > Safari > Web Inspector and turn it off and then back on. Force quit out of Safari. Re-plug in your iOS device and start up Safari again and re-attach your iOS device through Safari > Develop menu.
Closing XCode first helped for me.
This plagued me for a long time with very inconsistent behaviour, here are a few things I have found that help, I also wrote a blog post on this here.
Update both mac safari and ios - I have found after having the latest of both versions it started working for me, there could be debugging incompatibilities between Safari's.
Check that web inspector in ios is enabled - It has been known that this setting can be switched off after an upgrade, check in settings > safari > advanced > web inspector.
Check the port you are connected to - I have had mine plugged into a cheap hub / via apple keyboard/monitor hub and found that going directly into the mac works much better.
Are you using a good quality cable? - I have found that better quality / official cables that aren't worn out have better reliability when in debug.
Other notable observations - other people have commented that making sure cookies are enabled in safari, enabling private mode and trying whilst Xcode is open have affected the reliability of this, although I haven't seen this myself it may help others to try.
I can't say I have a solution, but a step in the right direction.
I tried using ios-webkit-debug-proxy so I can use the Chrome Dev Tools instead of Safari Dev Tools.
Note, in order to get it to work, I can to upgrade my iOS to the latest 11.4.1 and MacOS 10.13.65, then reinstall the latest versions:
brew update
brew install ios-webkit-debug-proxy
brew reinstall --HEAD libimobiledevice
brew reinstall -s ios-webkit-debug-proxy
ios_webkit_debug_proxy
After running ios_webkit_debug_proxy, I was able to try to connect through chrome://inspect and it disconnected immediately again:
Listing devices on :9221
Connected :9222 to Chet's Phone (6a028994cf281be807bf80c5557c3f2eb3fbb8b0)
Invalid packet header 0x1ffffff91ffffffa0ffffff9d == .... == 26321053
Disconnected :9222 from Chet's Phone (6a028994cf281be807bf80c5557c3f2eb3fbb8b0)
However, we have a clue! Invalid packet header. Sounds like a lower level bug somewhere. Not sure where to submit this but to though...
The magic solution worked for me:
Reboot your MAC
Reboot your iPhone
09-07-2020
Still this issue on Latest MacOs (Catalina 10.15.5) on Safari (13.1.1)
Solution on Ionic/Capacitor:
ionic cap run ios -l --external --source-map=false
The most recent Safari Technology preview appears to have solved it for me.
https://developer.apple.com/safari/technology-preview/
MacOS Mojave / Catalina Solution
For me the issue started right after I upgraded to the new macOS Mojave, this might have been mentioned somewhere above but for me I just needed to download the new "Safari Technology Preview" app that is built for Mojave.
Safari Download Page
https://developer.apple.com/safari/download/
Direct Download for Mojave
https://secure-appldnld.apple.com/STP/041-71285-20190604-6d0dcb17-07e5-40a0-b418-dba732cefe64/SafariTechnologyPreview.dmg
For me using a different adapter and cable solved the problem.
Every time you connect, it should ask for "Trust this device" like prompt on smartphone, if not then it's the cable/adapter issue.
When using a content-blocker (e.g. 1Blocker) on your iOS device, make sure it is disabled for the domain you want to debug.
Disabling 1Blocker stopped the Web Inspector (Mac) from closing immediately after opening it, and allowed me to get back to work.
I know there's a lot of answers already, but I wanted to post because none of them worked for me just now. But, my phone's battery was in "low mode" ... but since I'm plugging it up for development, I didn't think that was a big deal. But, going into settings on my phone and turning off low battery mode fixed my problem. Now safari doesn't disconnect.
Just wanted to post that in case someone runs into this with a low battery.
Working solution for ionic app:
ionic cordova build ios --source-map=false
Capacitor, Ionic, Cordova
rm -rf platforms/ios/**/*.map
I've been seeing this issue when using live preview in Capacitor while building an Ionic Angular project on macOS Monterey previewing on iPhone Xs. Here are a few ways I can get over this bug and continue development...
Make sure you're using Safari Technology Preview and not the regular version of Safari.
Close and Re-Open Safari Technology Preview if it continues. You could also try inspecting using regular version of Safari after installing Safari Technology Preview. It may work for debugging almost as well.
On your device, open the app switcher and close all background applications before starting development on your app.
Toggle 'Connect via Network' in Safari on your computer by using: Develop > Device Name > Connect via Network in the Safari menu.
Disconnect and reconnect the lightning cable of your device. Make sure it has a steady firm connection to the computer. Off-brand cables can cause intermittent development issues.
Quit your app, go to the app switcher and force close your application by swiping it away. Then re-open it using the app icon in the launcher. Try inspecting it again.
Try rebooting your computer and rendering your app again. After a lot of up-time there may be some built-up log data that needs to be dumped.

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

Resources