macos-mojave

How to get the user set computer name using python in MacOS Sierra/High Sierra

人盡茶涼 提交于 2019-12-06 06:04:50
问题 The question below has partly been answered, see the Solution section below. So I'm posting this partly to help others and also since the solution I have hasn't really solved the problem yet. Question So, the question is why the hostname as given by the following techniques (using python's platform and socket libs) gives different host names depending on which router you are attached to and why its also different to the computer name and also local host name. This is very mac specific too by

rJava installation fails on macOS 10.14

十年热恋 提交于 2019-12-06 04:12:48
After upgrading to MacOS Mojave (10.14.1), I'm no longer able to install rJava for R version 3.5.1 with Java version "1.8.0_102" installed. I tried the previous solution for MacOS 10.11 but it still did not work, giving this error: Error: package or namespace load failed for ‘rJava’: .onLoad failed in loadNamespace() for 'rJava', details: call: dyn.load(file, DLLpath = DLLpath, ...) error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.5/Resources/library/rJava/libs/rJava.so': dlopen(/Library/Frameworks/R.framework/Versions/3.5/Resources/library/rJava/libs/rJava.so, 6

MacOS Change menubar Icon using swift 4

时光总嘲笑我的痴心妄想 提交于 2019-12-06 03:47:59
With the new Dark mode in MacOS Mojave I would like to change the menubar icon of my app. In default, it is a white black bear and rather than just inverting the colors I would like to use an icon of a snoozing bear. I have all my code that sets up the menubar icon in AppDelegate in applicationDidFinishLaunching . So my question is: Is there a way to check if the dark mode was activated and then change the icon using swift 4? I tried: var inDarkMode: Bool { let mode = UserDefaults.standard.string(forKey: "AppleInterfaceStyle") return mode == "Dark" } and then an if statement around button

macOS Mojave 'ruby/config.h' file not found

好久不见. 提交于 2019-12-06 03:45:25
问题 When I try to build vim(8.1.0509) with ruby support(--enable-rubyinterp) on macOS Mojave(10.14.1) I get error: In file included from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby.h:33: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/ruby.h:24:10: fatal error: 'ruby/config.h' file not found #include "ruby/config.h" I have installed Xcode 10.1. xcode-select -p /Applications/Xcode.app/Contents/Developer Thanks P.S. See my

Mac Mojave + opengl

浪子不回头ぞ 提交于 2019-12-05 13:13:30
问题 Mac OS 10.14 Mojave was just released, and since June, we've known that OpenGL was to be deprecated in the OS. "OpenGL applications will continue to run, but you should switch to Metal," to paraphrase. However, there doesn't seem to be any documentation indicating whether you can still compile with OpenGL or if Apple prevents that or omits the proper development libraries. I am currently developing an OpenGL-based graphics program and cannot risk updating if compilation will no longer work.

“because it is not SIP-protected” - Apple event error in macOS Mojave

家住魔仙堡 提交于 2019-12-05 07:49:00
I have a properly sandboxed application in macOS, Objective-C that talks to third party applications by Apple Events (e.g. Adobe InDesign). In macOS Mojave everything breaks cause Apple's new SIP ( https://developer.apple.com/library/archive/documentation/Security/Conceptual/System_Integrity_Protection_Guide/Introduction/Introduction.html ) doesn't allow the communication. I didn't find any solution yet. Any help appreciated. This is the error message: skipped scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" because it is not SIP-protected. This is a pretty good summary

ntpdate command not found ? MacOS MOJAVE

给你一囗甜甜゛ 提交于 2019-12-05 01:29:41
问题 Hello I have a bash script who update the time of my mac but since the update of Majove the command isn't found: ntpdate -u time.apple.com return : ntpdate: command not found Where I going wrong ? Thanks to your reply 回答1: It's a duplicate. Please check this stackoverflow question. TL;DR use sudo sntp -sS time.apple.com instead. 回答2: For anyone trying to do this because their vm cannot connect to the update server while trying to install macos on a virtual machine, I switched my network

Netbeans 8.0.1 not opening on MacOS Mojave

♀尐吖头ヾ 提交于 2019-12-04 21:06:46
After upgrade to Mojave, Netbeans 8.0.1 is not opening anymore ; it shows the splash screen, but closes right after. It probably has to be with a JDK update; which JDK version it supports and how can i downgrade the JDK Thanks ! NetBeans reads a configuration file named netbeans.conf on startup. It is just a text file containing properties, located in its etc directory within the NetBeans installation. One of the properties it might specify is the path to the default JDK to be used via property netbeans_jdkhome . If that path becomes invalid (e.g. possibly due to upgrading on Mac) then

Swift macOS Process.run() port leak

好久不见. 提交于 2019-12-04 16:27:13
Current code: #!/usr/bin/swift import Foundation func runSleepProcess() { let sleepProcess = Process() sleepProcess.executableURL = URL(fileURLWithPath: "/bin/sleep") sleepProcess.arguments = ["0"] try? sleepProcess.run() sleepProcess.waitUntilExit() } while true { runSleepProcess() } Looking in activity monitor, it seems that the mach port usage increases by 1 each loop. Is this expected behavior when running an external process? If not, how do I fix the leak? Thanks. It's not expected behaviour and this problem is already reported. The workaround for this is using posix_spawn instead of

Repeated request for microphone permission on iOS Simulator

断了今生、忘了曾经 提交于 2019-12-04 15:57:48
问题 I'm working with Xcode 10.1 (10B61) on an app that needs permission to use the microphone. (Almost) Every time I start the app from Xcode (in simulator) I get a system popup: "Appname" would like to access the microphone "Privacy - Microphone Usage Description""> It doesn't matter if I select "Don't Allow" or "OK". This message keeps popping up. How can I fix it? Update [fixed] This issue seems to be fixed in Xcode 10.2 👍 回答1: You can get rid of this following this steps: Go to "Security &