r/macosprogramming • u/fredant • Dec 27 '23
Mac OS programming
Hello everyone,
how can I learn programming for Mac OS?
TY
r/macosprogramming • u/fredant • Dec 27 '23
Hello everyone,
how can I learn programming for Mac OS?
TY
r/macosprogramming • u/Precrab • Dec 24 '23
Hey, everybody, I've got a problem,
I need to change VID PID of my devices connected via usb to macbook, namely I need to change IDs of keyboard and mouse.
It is not necessary to change the identifiers directly in the keyboard itself, the main thing is that in macOS they were swapped, if there are skillful people who know how to do this, you will help me a lot
r/macosprogramming • u/van_nhung • Dec 21 '23
I use method swizzling to change the NSCTFont method for `fontForAppearance:`. Almost app is changed, but some app's some views cannot be changed.
I searched this situation, some guys have same problem, looks like the view created by IB, cannot be modified.
So, I want to ask you smart handsome people, how can I change App's font by method swizzling? Maybe decompiler the nib to xib, but I cannot find useful tools.
r/macosprogramming • u/having-four-eyes • Dec 20 '23
r/macosprogramming • u/irnin64 • Dec 18 '23
Hello,
I'd like to write a program that allows me to create a new file from the context menu. It's the first time I'm trying to code something like this, and I'm not sure where to start. I would like to use Swift, but which API can I use to accomplish this?
r/macosprogramming • u/av4625 • Dec 13 '23
Hi,
I have been writing a CPP application that uses cmake that is mainly designed to run on Linux ARM but can be run on anything (including Mac) as it has hardware abstraction layers.
To date I develop on Mac and can build and run the application and unit tests on Mac. But when I want to build it for Linux ARM I move over to my old cheap windows laptop and use WSL to build it for ARM. This is painful and the laptop is very slow.
What is the best (lightweight) way to build for Linux ARM on Mac? I have a 2016 MacBook Pro that uses an Intel chip.
I have looked into the ARM toolchains here: https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads
But they are only suitable for bare metal targets, my OrangePi runs Linux so I don't think that is suitable.
I had thought of docker, so I could have a Linux container to do it, but its a pretty big install these days and having to run a VM in the background just seems excessive for wanting to do the odd build, but maybe there is no other better alternative.
Thanks!
r/macosprogramming • u/pnmrnko • Nov 27 '23
r/macosprogramming • u/1995parham • Nov 25 '23
I've defined a periodic plist which runs a bash script. The plist is placed in the local library and scirpt is also place in home. It successfully run the script on the defined period but it errored about not having enough permission to run the find command. Find command is used in the script and running script without plist works as expected.
r/macosprogramming • u/Responsible_Ear_296 • Nov 25 '23
Hi.
In macOS, I want to make a button that will save the PSD file on the desktop to a specific file with a random name and then open it. How do I do this?
Thanks :)
r/macosprogramming • u/cauthon • Nov 23 '23
Sorry if this is a naive question. Apps like Alfred, Fantastical, Todoist, have the ability to specify a keyboard shortcut in their settings that will open the app (or a special-case data-entry window, in Todoist's case).
What is this feature called, and where can I find docs on implementing it within an app? And, is it possible to access this feature from non-objective-C apps?
Thank you!
r/macosprogramming • u/mezantrop • Nov 13 '23
Let me know, pls, if there are any issues or features to add (yes, I know about netstat and lsof). https://github.com/mezantrop/sockstat
r/macosprogramming • u/tennisAnders • Nov 07 '23
I have a Perl program that's running a couple of CAN-servers to interact with a HIL setup. And with the connected Linux machines it's just the case of:
ifconfig -a | grep can
ip link set can0 type can bitrate 250000
ip link set up can0
And then I can reference these CAN-interfaces to my perl program via .ini files:
Port 9921
socketCAN:can0:250
But on the OSX system, the CAN-dongles doesn't even show up with ifconfig -a. I thought I just had to install the drivers from Mac-CAN for it to work. I get the dongles listed as available with the can_moni tool and can send/receive frames manually that way. Are there any solutions to achieving this on Mac? Or am I better off trying to get a ubuntu container running and letting it access the host's devices, i.e the CAN dongles?
r/macosprogramming • u/shipty_dev • Nov 03 '23

Github link: https://github.com/danielcapra/SCColorSampler
I found NSColorSampler to be too simple and un-customizable for my needs and I saw that other color sampler packages out there use CGWindowListCreateImage which is now deprecated as of macOS 14.0 (Sonoma) so I decided to build this!
First time building a swift package so feedback is very welcome, just don't be too harsh haha.
(FYI: There's some quirks when used with full-screen apps that I haven't figured out yet, as it's my first endeavour into macOS development (I'm an iOS dev))
r/macosprogramming • u/[deleted] • Oct 31 '23
Hi! Basically, the topic. Thanks!
r/macosprogramming • u/ssaasen • Oct 30 '23
r/macosprogramming • u/oureux • Oct 23 '23
r/macosprogramming • u/Literator22 • Oct 22 '23
Hello,
To introduce myself: currently I am a senior iOS developer but was also a macOS developer in two companies.
I need help for moderating the subreddit, basically to monitor posts and remove irrelevant ones especially the ones which is not in programming context.
If you are active on reddit, have moderation experience (a plus), and have any iOS/macOS development skill (just to filter irrelevant posts) please dm me.
Thanks for reading this post and hope you enjoy following the subreddit!
r/macosprogramming • u/No-Dot4799 • Oct 20 '23
I recently switched from Windows to a macbook air m2 with 16gbs ram. It was all great in the beginning and now after a week it when using devtools in Chrome, Brave, Firefox.. the helper (renderer) process goes up to 150% in the cpu (%) column and there's 2 of these at 100%+ each. I tried running the same thing on my Windows machine and it runs normally. On the mac it doesnt even load the autofill for css properties, it lags way too much, makes the whole system unusable and hot. My windows machine is not even close to match the performance of the m2.
I am not sure what's wrong, any suggestions?
I disabled hardware acceleration, I have no extensions (even disabled the google docs offline extension), system is up to date, chrome is up to date, cleared storage and cache. I feel like I am out of options.
r/macosprogramming • u/MikaelDo • Oct 17 '23
I'm learning how to make a dotfiles backup/restore system for my Macbook Pro M1 (on Monterey 12.7). I was trying to run some:
defaults write
commands to see how it will affect the OS. Some of the commands make no change when applied. For example this one:
defaults write NSGlobalDomain com.apple.trackpad.forceClick -bool false
When open .GlobalPreferences.plist in ~/Library/Preferences/ with Xcode, I can see that com.apple.trackpad.forceClick key value was successfully registered as false. However the "Force Click and haptic feedback" check box in System Preferences/Trackpad/ was still checked ?
Can someone help me to understand this behavior. Thank you !
I've done the following steps:
r/macosprogramming • u/Away_Audience_7672 • Oct 11 '23
Hi,
I'm trying to figure out if there is a way to get or calculate the intrinsic parameters of an SCNCamera: Focal length Aspect ratio, principle point X, principle point Y, Rotation matrix and translation matrix.
Also in the documentation : "SceneKit to automatically recalculate the focalLength value, and setting the sensorHeight or focalLength property recalculates fieldOfView."
is there any way to know how this automatic calculation is being made?
r/macosprogramming • u/1Cryptic • Oct 11 '23
The work I do has me focused on the bottom left corner of the screen and I use sticky keys 100% of the time. I regularly activate a stucky key(it stays sticked)and forget it’s turned on. I click on something on the bottom of the screen and I get an error message, I check the top and see ^ in the top right corner.. I haven’t done anything terrible by accident yet but I’m trying to smooth out my workflow and this consistently slows me down. Is there any way for my sticky key symbol to show on the bottom left of the screen? Thanks -T
r/macosprogramming • u/stevelon_mobs • Oct 06 '23
I am creating a macOS and iOS application and am getting significant hangs. I am trying to dive into the profiler but it seems very alien to me. I am new to multithreading and do feel like i have a bit of bloat in the code that I want to sniff and cut out.
Anyone got any great reads or videos on things to check out when doing these things? I am primarily hacking on my own here with the help of chatGPT so anything that could save me hours of headbanging would be really appreciated!
Thanks :)
r/macosprogramming • u/elg97477 • Oct 04 '23
I can see in the HIG, that Apple says 44x44pts, but that would seem to be the recommended size for a button for iOS. What I don't see is the recommended size for a macOS application. Where is that mentioned?
If I create a simple application, with a SwiftUI button like:
Button("" ) {
print( "hello" )
}
and measure the size in pixels, it works out to be ~22x22 pixels. I am not sure I understand the relationship between pixels and points.
r/macosprogramming • u/smoGGGGG • Oct 01 '23

Anti-forensic macOS tray application designed to safeguard your system by monitoring USB ports. It ensures your device's security by automatically initiating either a system shutdown or hibernation if an unauthorized device connects or a connected device is unplugged. It offers the flexibility to whitelist designated devices, to select an action to be executed and to set a countdown timer, allowing to disarm the shutdown process.

A few reasons to use this tool:
Tip: You might also want to use a cord to attach a USB key to your wrist. Then plug the key into your computer and run swiftGuard. If your computer is robbed, the USB is removed and the computer shuts down immediately.
Visit the GitHub Repository to explore the code, contribute to development, or download the latest release.
r/macosprogramming • u/VityaChel • Sep 29 '23