The last days I sent a new build of my app to Apple to fix some minor bugs with macOS Catalina. This evening Apple called me and explained that they are refusing the new version in the AppStore because the application monitors keystrokes. I use the Clipy/Magnet library (github.com/Clipy/Magnet) to manage the hotkeys. This library uses a Carbon API. Admittedly, I'm a little surprised - on the one hand that Apple is calling me directly via phone about this and on the other hand the use of this library has not caused any problems so far. The only thing I noticed about the new build was that Catalina asks for "Input-Monitoring" at the first start of the program. I've installed several other programs that also respond to global hotkeys and none of them require the permission for "input monitoring".
Does anyone have a similar phenomenon under Catalina or how do you solve the problem of query/monitoring global hotkeys?
I know of numerous applications using the MASShortcut framework, and I don't believe they've had issues with the store. It also uses a carbon API, but I think the issue in Magnet is the call to CGEvent.tapCreate which can globally monitor all keyboard input, and which MASShortcut doesn't use.
Related
I want to write my own camera filters for videochat, and ideally apply them in any/all of the popular videochat applications (Zoom, Hangouts, Skype, etc.). The way I imagine this working is to write a macOS application that reads the camera feed, applies my filters, and exposes an additional virtual camera. This virtual camera could then be selected in whichever videochat application.
I've spent many hours researching how to do this and I'm still not clear if it's even possible with modern macOS APIs. There are a few similar questions on StackOverflow (e.g. here, here), but they are either unanswered or very old. I'm hoping this question will collect advice/links/ideas in the right direction for how to do this as of 2020.
Here's what I got so far:
There's a popular tool in the live streaming community called OBS Studio. It captures input from different sources (camera, desktop, etc.), has a plugin system for applying effects, and then streams the output to popular services (e.g. Twitch). However, there is no functionality to expose the stream as a virtual camera on macOS. In discussions about this (thread, thread), folks talk about a tool called Syphon and a tool called CamTwist.
Unfortunately, Syphon doesn't expose a virtual camera anymore: "SyphonInject NO LONGER WORKS IN macOS 10.14 (Mojave). Apple closed up the loophole that allows scripting additions in global directories to load into any process. Trying to inject into any process will silently fail. It will work if SIP is disabled, but that's a terrible idea and I'm not going to suggest or help anyone do that."
Fortunately, CamTwist works. I got it running on my macOS Catalina, applied some of its builtin effects on my camera stream, and saw it show up as a new camera in my Hangouts settings (after restarting Chrome). This was encouraging.
Unfortunately, CamTwist is rather old and not well maintained. It uses Quartz Composer for implementing effects, but Quartz Composer was deprecated by Apple and it's probably living its last days in Catalina.
The macOS SDK used to have an API called CoreMediaIO, which might have been the way to expose a virtual camera, but this API was also deprecated. It's not clear if/what is a modern alternative.
I guess another way of asking this whole question is: how is CamTwist implemented, how come it still works in macOS Catalina, and how would you implement the same thing in 2020?
Anything that sheds some light on all of this would be highly appreciated!
I also want to create own camera filter like Snap Camera.
So I researched around CoreMediaIO and Syphon.
Did you check this Github project?
https://github.com/lvsti/CoreMediaIO-DAL-Example
This repository started off as a fork of the official CoreMediaIO sample code by Apple.
You know, the original code didn't age well since it was last updated in 2012.
So the owner of the repository changed to make it compile on modern systems.
And you can know that the code works in macOS 10.14 (Mojave) to see the following issue.
https://github.com/lvsti/CoreMediaIO-DAL-Example/issues/4
Actually I have not created the camera filter yet because I don't know how to send images to virtual camera that builded by CoreMediaIO.
I would like to know more information. If you know please tell me.
CamTwist uses CoreMedioIO. What makes you think that's deprecated? Looking at the headers in the 10.15 SDK, I see no indication that it's deprecated. There were updates as recently as 10.14.
I'm trying to modify the functionality of mission control which belongs to dock.app and I'm wondering what the preferred method of doing so would be. I've looked into using the simpler method of defaults but that won't give me enough control. I'm curious if people use something like Application Enhancer by Unsanity to execute custom code for these purposes.
Application Enhancer is effectively a dead project at this point -- while the current version does advertise support for Lion, Mountain Lion is slated for release within the next month, and it is unlikely that they will ever support it (as neither the Unsanity site nor their Twitter account has not been updated at all since last November). I would recommend strongly against using it for new products.
Under previous releases of OS X, SIMBL and PlugSuit have been popular, but neither one is available on Lion. The options seem to be more limited now; however, Rentzch's mach_star (mach_override / mach_inject) code seems to still be working.
I am not sure even of a starting point with this.. however knowing that Silverlight works across win/mac platforms (as far as I know!), is it possible to create a silverlight based screensaver?
If not, are there any tools (no flash skills unfortunately!)
Any starter points would be cool..
Thanks!
By now Silvelight is being deprecated, but if you need to run web pages as a screensaver, my startup is creating a product to do exactly that, it's called Screensaver Ninja and you can find more about it at https://screensaver.ninja. That means that all you have to do is develop the web app and leave the screensaver part to us.
Here's a screenshot of how you configure it:
Silverlight is only usable as a web browser plugin on Mac OS X. It cannot be practically used to build screensavers.
Additionally, there's good reason to believe that Silverlight is being abandoned by Microsoft. I'd avoid it for any new development.
I have a macbook pro. I would like to have my screen lock when I (my phone) moves away from the laptop. I'm sure third party solutions exist, but if I'd like to code something from scratch, what libraries or hooks should I be looking at?
http://web.mac.com/jhollington/technocrat/The_Technocrat/Entries/2007/3/18_Bluetooth_Proximity_Detection_on_OS_X.html has a pretty good step-by-step on how to do a lot of this, although it's using an existing app. That app is open source though, so maybe this will help too? http://code.google.com/p/reduxcomputing-proximity/
I know it's an old question, but I've stumbled upon it today and have an answer.
Here's an opensource third-party solution: BLEUnlock
Lock/unlock your Mac with your iPhone, Apple Watch, or any other Bluetooth LE devices
It contains a modern version of all the code you need. Plus, the app itself supports hooks so you can add a hook to the app instead of writing your own.
Background: This is for a university managed lab environment. Upper management wants to know how often users are using the various software we purchase for the labs. I've already implemented a solution for our Windows machines which consists of a client that tracks user process invocation and sends the results to a web service.
Now I need to create an equivalent Mac client but I have zero experience developing for the Mac platform and its various APIs. Our Macs are currently running 10.4, but will eventually be moving to 10.6 within the next year. I think I've got a handle on consuming the web service using something like gSOAP or even Mono. For the process tracking, I was looking at the Carbon Event Manager. But I've been reading that the Carbon APIs are on the road to being deprecated and I'd rather find something that will be supported moving forward.
Should I just use the Carbon stuff for as long as it works? Or is there some equivalent library I could be using that won't be phased out anytime soon?
Carbon APIs are not being deprecated, Carbon applications are. Feel free to use the event manager.
See The myth of Carbon’s 64-bit unavailability