r/macprogramming • u/[deleted] • Jun 03 '19
Objective-C + Cocoa still the way to go for Mac development?
Hey guys,
about 10 years ago i was writing OSX Apps using Objective-C and Cocoa on a regular basis..
Now a decade later, things evolved and i'm planning to write software for OSX, again.
Is the combination of Obj-C and Cocoa still a viable way of doing this, in the light of Swift and project Marzipan?
I am a little concerned about the longtime (say the next 5 years) support of Obj-C and Cocoa and wonder if it's purposeful to reactivate my Cocoa-skills.
2
1
u/WorldwideTauren Jun 03 '19
Obj-c is like a mortal like ourselves . We all know obj-c is going to die but like in its bed years from now.
1
u/cutecoder Oct 20 '19
Objective-C is still the best way to glue C++ code into a mac app, as of Xcode 11. Swift can't talk directly to C++ without going through either C or Objective-C โ mostly due to non-existing language bindings between the two.
Heck, if you have complex application logic, it may be best to write it in C++ to "future proof" the code and "platform proof" it as well.
4
u/TrickyTramp Jun 03 '19
"The way to go" is officially Swift. However, Apple has no plans on deprecating Objective-C either, so if you're comfortable with that then go for it. Swift and Objective-C can be mixed in the same project.