Mac OS X programmig intro - macos

I have been using Mac for a while and I am a senior CS major. I want to start making apps for Mac however I dont know where to start. Currently I know java, c++ , c , python as my main languages. Do I need to learn another language like objective-c ? Can anyone point me to a place to start ?

Well, the first two things you will need to do is learn how to use Xcode and then you will need to learn Objective-C.
To learn how to use Xcode, I would start with the Xcode Workspace Guide
To learn Objective-C, Apple has a great, free book - The Objective-C Programming Language. The one aspect of Objective-C which makes it easier to learn for many is that it is a true superset of C (C++, for example, is not). If you already know C, Objective-C just adds a little bit to support objects.
Then, I would pick up a copy of Cocoa(R) Programming for Mac(R) OS X (3rd Edition) by Aaron Pablo Hillegass. This book is the standard for starting out to learn Cocoa and build real Mac applications.

Yes, you will need to learn objective-c. Start here.

Yes, you should learn Objective-C. While there are other ways to create applications for MacOS X, the Cocoa framework is the best supported and the one to know going forward. Given that you already know several other C-based languages, picking up Objective-C won't be all that difficult. You'll spend much more time learning to use the framework properly than learning the actual language. I'd suggest picking up a book to get you started, and also get familiar with the Cocoa documentation.

actually it's for iOS development but they provide also and good introduction into --> Objective-C Intro

Objective-C is the official language to use when writing applications for the Mac, although since it's a superset of C, you can also use C code in your app.
Here is a good starting point.

Related

Languages in XCode

I'm just about to start learning how to program using XCode. I've had Java lessons in my school for half a year now, and will continue with that for the next 2 years.
As far as I've looked into XCode, it looks like it just uses Objective C, which at my brief first sight, looks pretty different from Java syntax-wise.
Look at C at the other hand, looks a lot more like Java.
Now I am wondering, is it possible to write iOS applications in C using XCode? It definitely would easen up my learning curve not having to learn a whole new syntax on top of a new language.
Edit: If it is indeed possible, would there be any disadvantages in using C instead of the (seems encouraged?) Objective-C?
First of all welcome in XCode.
XCode is just an IDE. Now it is on you, whether you want to learn iOS or MacOS Applications.
And I would suggest you if you have a good knowlegde of C, then have some knowledge on Object oriented language like C++ or Java. Then you will feel comfortable with Objective-C.
Objective-C is a language, superset of C, so not much to think only one day learning is required to see the changeover from C to Obj-C.
And Obj-C language makes framework called "Cocoa" which is the core for ios and mac based development. This will take some time, but mind you, you will get thousands of API, which are easier to use and remember than what you will make and use from 'C'.
You can refer many sites, I would like to share my learning process with you.
You can follow these, even I started learning with these sources.
Stanford lectures CS193
Lynda's Videos
Cocoa Programming for Mac OS X by Aaron Hillegas
Cocoadevcentral.com
Last one is of course Stack Overflow... This is the best place to sort out all your doubts.
You can effectively write most of your app in C but when you interact with the iOS SDK, the part that communicates with the device, you will need to use obj-c. Objective-c isn't hard to learn really, don't feel daunted about it.
You definitely can write code in C. Objective-C is a C language wrapped by defines.
However, I'd recommend to learn Objective-C. This allows you to write code using Object Oriented principles. There are numerous online tutorials for this.

Right programing language for developing application for Mac

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 days ago.
Improve this question
I'm planing to buy a Mac. I would like to be able to develop GUI applications for Mac as well. Currently I develop in C# using VisualStudio as IDE. I also know Java and I'm familiar with NetBeans IDE. Application created in both of this languages can run on Mac (as can NetBeans IDE) but I was told that neither C# nor Java is recomended for MacOS X development.
So what language is recomended for MacOS X development ? I guess there is some recommendation from Apple for the developers ? I would prefer Object-oriented easy-to-use programing language (nothing like C) with good IDE that supports GUI creating (GUI designer).
Thank you for answers
There really is only one choice and that's Objective-C and XCode, anything else and you'll be running into problems and/or limitations.
As some have mentioned Python is one suggestion but what GUI toolkit to use? Then packaging becomes a problem.
Mono is OK but still a little buggy (and slooooow) on Mac's.
I haven't tried Java but the Apple port of the Java VM has just beed deprecated, make of that what you will.
XCode is very very good and integrates nicely with Mac/iPhone/iPad etc. but Obj-C takes a while to learn coming from a C#/Java background, plus XCode forces you to use MVC patterns in everything which again can be a culture shock.
I would say go with Obj-C and XCode and learn something new.
Objective-C with Cocoa should be your first, second, and third choices. That being said the learning curve can be steep but half the fun of this business is learning something new.
At my job (Seapine Software) we extensively use C++ with the Qt framework on the Mac and it also seems to work fine. If I were starting out I'd definitely go with Objective-C.
It's Objective-C. But if you want a beautiful and easy language, you can use python with wxPython. It'll look as native and, furthermore, it will make your applications multi-platform.
For the GUI designer, check wxFormBuilder. It supports wxPython for exporting.
I'm an iOS developer & use Objective-C every day, but if I were writing an OS X app, I'd definitely try out MacRuby. However, there is little controversy that, at present, if you want to write OS X native apps, you eventually must learn Objective-C. Most, like myself, grow to like it. Moreover, on OS X you have the advantage that you can run it garbage-collected and possibly save yourself some bookkeeping.
Daniel Steinberg says it well in the introduction to his Cocoa Programming book:
Use Objective-C. Sure, you can write Cocoa applications in other languages. But for now, learn the native language. There is a lot of support for new developers on the various Apple lists and in the support documentation, tutorials, and sample code accessible from Xcode. You will have an easier time of getting your question answered if you use the lingua franca of Cocoa development.
Yes it's Objective C. But check this out.
If you are familiar with HTML, CSS and Java Script, you can build platform independent desktop apps using Electron by Github. It's indeed amazing.
The desktop Apps like slack, atom, postman are built using this framework.
Please refer: https://electron.atom.io/
You can also use Qt which is a great cross-platform application development framework that is based on C++.
Please refer: https://www.qt.io/developers/
I started using swift to develop only Mac applications. But I wanted to use c for high performance apps, so I started using objective-c.

Scripting languages in XCode

I notice that Java has a number of ancillary scripting languages. Clojure and Groovy for example. My understanding is that these can be used when the full might and power of Java does not need to be applied and a speedy cludge can be hacked in Groovy/Clojure. But at the end of the day the scripting tools contribution gets compiled into the application
Question 1. Is there a similar scripting in XCode? I was not so interested in Python or Ruby in this situation as they are languages in their own right added in, as indeed I think can happen in Java, but I was looking for a purpose built tools.
Question 2. If there is such a tool would it count the application out vis-a-vis the new Apple guidelines as to what can be used to generate iXxx apps?
F-Script is a scripting language that integrates well with Objective-C/Cocoa applications. Might not be exactly what you're looking for, but it's worth a look.
For such things there is AppleScript, with its own IDE AppleScript Studio. It has bindings to control Cocoa Applications, be embedded inside of them or even work as stand-alone scripts.
The problem is that it cannot be integrated inside iXxx applications because iPhone-OS Cocoa Foundation framework doesn't include it.
As mentioned by mipadi, you can use F-Script for Cocoa applicaitons.
If you are staying mainly in C, then Lua is another option.

Is Smalltalk a viable development language for Mac OS X?

Every time I see a discussion on software development, always someone suggests or exalts the qualities of Smalltalk, be it the beautiful language constructs or the better implementation of basically everything.
So I was curious, is anybody developing in Smalltalk? can Smalltalk actually be used to develop software on the Mac? Or what is the target platform for Smalltalk? What is the poster child for this apparently fantastic but unpopular language?
Smalltalk isn't really used for GUI application development on the Mac in any major way. The only distribution that could produce native apps was Ambrai Smalltalk, and that died in beta AFAIK. Squeak is the most popular Smalltalk variant nowadays, but you will be torn limb from limb if you release a Mac OS X app that looks like Squeak. It's worth checking out if you're interested in learning the language (which is still unique in a lot of ways), but you're probably not going to be developing OS X apps with it.
If you would like something similar, check out MacRuby. Ruby is as close as you can get to Smalltalk without actually being Smalltalk — total object orientation, dynamic, 100% message-based, heavy use of blocks, etc. MacRuby is an implementation being developed by Apple specifically for making OS X applications.
Mac OS X's native Objective-C is also heavily Smalltalk-inspired (it's basically a big chunk of Smalltalk's object system and syntax bolted onto C), but owing to its extreme C compatibility, it falls a little further from the tree.
Take a look at fscript, which is essentially a smalltalk-like language for Objective C.
Luis: do you want to do desktop application for Mac ? or you want to program in Mac? If you want to do a web application for example, you can perfectly use Squeak or Pharo. If you want to do native mac applications, you should see the Mars project for Squeak:
http://smallworks.com.ar/productos/Mars
As an example, most of the Pharo users and developers are under Mac.
http://www.pharo-project.org/home
download and try it at least for a couple of hours!
I still believe that Squeak is well worth investigating, if only to broaden your mind a little. As for the poster child for Smalltalk, it's probably Seaside.
Squeak isn't its UI. You can configure Morphic heavily (look at how similar Pharo's is to OSX, for instance). Or you can just use native widgets with wxSqueak.
This deserves some attention:
"Objective-Smalltalk was created specifically to solve practical problems that have been encountered in 25 years of Objective-C and Smalltalk use, but with a theoretical framework that solves many of these problems elegantly and minimally, rather than by bolting on special feature after special feature."
http://objective.st/

How easy to get started on making apps for Mac?

I've done some delving into AppleScript but I'm interested in how difficult and long it would take to make semi-useful Mac apps.
What really good resources besides Apple Documentation?
"Cocoa Programming For Mac OS X" from Aaron Hillegass. Nice book that gives you an introduction into Objective C and Cocoa programming.
As stesch said "Cocoa Programming For Mac OS X" is the best book available for an introduction into Cocoa and Objective-C. However if you already know python or ruby you can easily make great looking applications using their cocoabindings.
"how difficult and long it would take" depends on what you already know. If you can program in C, Java, or C++ with a good understanding of object-orientation and vague idea of how the model-view-controller design paradigm works, then you will be in good stead.
Come up with a small but interesting idea that will keep you motivated to continue learning Cocoa/Objective-C because the learning curve can be steep at the start.
If you want to make widgets, they are actually little web pages, often with JavaScript.

Resources