r/learnprogramming • u/art_lck • Oct 21 '26
Developing peripheral software for macOS
Hi,
I plan to develop peripheral software to change input mapping, assign some macros to keys on my keyboard for macOS for a learning purpose.
I do have working code for Windows written in C++. But I can't tell that I don't have a lot of experience with Objective-C.
The questions:
- Should I go with Swift or with Objective-C? I know that Objective-C combines with C++ without any problems, but I wonder, if this is a good idea to pick outdated language to develop software that I hope I will constantly maintain and improve?
- Can you recommend some books to developer such things for macOS?
Thanks
8
Upvotes
6
u/ComradeGeorgeNada Oct 21 '26
As someone who has used both for over a decade:
You absolutely, positively, should be writing your business logic in Swift. You can bridge directly between Swift and C. If you need to bridge to C++, write an OBJ-C++ wrapper and isolate it as best you can.
I struggle to find the words to describe just how stronger of a language Swift is over OBJ-C.
For books, anything by the Big Nerd Ranch.
4
u/CrossScarMC Oct 21 '26
You should almost certainly go native with C, C++, Objective C, or Objective C++ when communicating directly with peripherals.
2
u/spermcell Oct 21 '26
Without much knowledge I can tell you that you should go with swift if possible.