Post

Replies

Boosts

Views

Activity

How to set monospaced font for a NSTextView
Hi,I'm trying to set a textview to use a monospaced font, the default monospace font and while it's working, I'm getting this warning.The code I'm using is the one from Apple's docs:textView.font = NSFont.monospacedSystemFont(ofSize: 12, weight: .regular)but when I run my app the warning below shows up:2020-04-04 09:18:10.725876-0500 Xcutioner[58296:2835209] CoreText note: Client requested name ".SFNSMono-Bold", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].Any idea on how to get rid of this warning? Is the preferred way to set a monospaced font not the one in Apple's documentation?Thanks
3
0
1.6k
Apr ’20
How to use NSTask from a sandboxed XPC service
I have an app, well, a prototype of an app. The main app is sandboxed. The XPC service is sandboxed as well. When I try to use NSTask from the XPC service it fails with: Exception: launch path not accessible The binary I'm trying to launch from the XPC is located inside the XPC sandbox folder. It has the correct permissions, and it runs fine. If I disable the XPC service sandbox, it works. If I go back and enable it, it fails with the error from above. Does anyone knows what's failing here and how to make it work?
7
0
1.3k
Sep ’20