I'm running OS X Mavericks and installed MacRuby last week in order to make a simple app in it. Anything I try to run in Xcode (even Hello World app or a downloaded example), I always get "Build Failed" and really similar errors to this:
I found in some forums that th Garbage Collection is really deprecated etc. but I could't find any solution. Therefore I would be very glad if someone has a solution for this.
And no, I can't just work in Objective-C since it's far too complicated for me and apps I'd make :)
Thank you!
MacRuby isn't currently compatible with 10.9, not just because of the garbage collector, but due to changes in the Objective-C runtime, LLVM, and Xcode. There is a thread (titled "Mavericks and Macruby") going on right now on the macruby-devel mailing list about these issues. Joshua Ballanco's message especially sheds a lot of light on what it would take to keep MacRuby going.
You can still use the garbage collector by setting GCC_ENABLE_OBJC_GC = supported in Xcode; but as I said, it won't make MacRuby actually usable (yet).
I suggest people interested in cocoa in ruby help out refining the
cocoa gem instead of hoping for any progress on macruby which is
abandoned by its creators for commercial interests. The cocoa gem
is quite useful already, but need to mature a bit in some cases.
https://github.com/patrickhno/cocoa
DISCLAIMER: Yes I am the author.
Related
This has been asked many times. Some of the answers are pretty old now. I have looked around everywhere for 2 things.This the last resort before I give up. Looking for:
Bindings that will enable GUI programming using Ruby (not Shoes) using Mavericks. I have found plenty bindings but with no activity for the past 3 or 4 years, with the exception of RubyMotion which seems very expensive while not taking advantage of Xcode features / does not have an IDE.
Way to package app for users as a regular OSX app so the user does not have to install anything by hand on OSX (if mutiplatform even better to target Windows too)
I have fallen in love with Ruby but without a means to tackle the above will be difficult to deploy for users, while I am not interested in Rails.
Feels like Rails popularity has in effect killed Ruby by putting it into a niche when it could be so much more.
Any new news on either of these 2 fronts or everything is abandoned / dead ?
Should I move on with Python / Objective-C ? (Which I like both but enjoy Ruby more)
I succesfully compiled scripts with tk, green shoes and gosu as a GUI to an executable with ocra but only have experience doing so on windows. If you want an actual, cross platform GUI try the java swing framework with jruby, here an example.
If you deploy a JAR or an executable nu further installations are needed.
I suppose you use MRI ruby now, the step to jruby is not so difficult.
require 'java'
# With the 'require' above, we can now refer to things that are part of the
# standard Java platform via their full paths.
frame = javax.swing.JFrame.new("Window") # Creating a Java JFrame
label = javax.swing.JLabel.new("Hello")
# We can transparently call Java methods on Java objects, just as if they were defined in Ruby.
frame.getContentPane.add(label) # Invoking the Java method 'getContentPane'.
frame.setDefaultCloseOperation(javax.swing.JFrame::EXIT_ON_CLOSE)
frame.pack
frame.setVisible(true)
RubyMotion is the best alternative. But if don't want to spend the money you should be able to use macruby.
Here are some resources
http://blog.phusion.nl/2010/03/12/creating-our-very-first-mac-application-with-ruby-how-exciting/
I must say that using macruby for a big project might not be a good idea. You should expect stuff breaking and few support. As of 2015, the [MacRuby page on GitHub][3] says that the project is in an indefinite hiatus due to the changes made by Apple in the Objective C garbage collection support that MacRuby depends on. They suggest using RubyMotion.
RubyMotion seems to be really good for what you want but for development the lack of a IDE is really a huge downside. Also from my experience rubymotion only comes handy if you already know the cocoa framework really well.
So my recommendation is for you to test rubymotion if you can. They give your money back in the first 30 days if you only want to try it out. So if you have the money give it a try.
If you are new to osx development and only want to develop for osx I think you should go with objective-c. The language is not that bad and you will get the best development environment available for it for free.
Ii am looking for a guide and information to specifically reading from and writing to Mac OS 10.6, 10.7, and 10.8 preference files using preferably C# Mono. However I am by far and large not picky and can pick up any other language to do the same thing.
Yes this is probably a duplicate question, I just haven't had the time to research it myself. I am not "just wanting the answer handed to me" because honestly that is not going to teach me anything in the long run. Thank you for your help and suggestions ^_^
Edit: BTW, working 8-10 hour days makes it difficult to do much of anything else. I have done some searching on and off and while I have found sparse materials on coding preferences for Mac in the Mac docs and a couple tuts here and there, there still is not much in the way of Mono driven preferences specifically. I will be checking out the answer with MonoMac, thanks for the reply.
Is there an API in the Mac OS SDK to do this?
If yes, chances are that this API is wrapped by MonoMac, and then you can just use that.
Apparently libncurses...dylib is broken OS X 10.6.3 relative to Mutt, and perhaps other applications, that use ncurses, although it works in 10.6 (as I can attest) and reportedly it works in 10.6.2.
Does anyone know if this is a bug or a feature in the view of Apple? If a feature, is there a workaround for people who want to upgrade 10.6..., but also want to use, for example, Mutt?
Thanks
As your post is pretty sparse in details, I guess you're talking about the bug in ncurses that breaks the way arrows works? (And may quit programs when you try to use the arrows, as a side effect)
I described it here: http://www.uponmyshoulder.com/blog/2010/os-x-10-6-3-broke-ncurses/
If we're talking about the same thing, I honestly think this is a bug. It doesn't match the documentation for ncurses, and actually makes no sense.
I submitted a bug report more than two weeks ago, without any answer from Apple so far.
A workaround (as suggested by Jonathan Groll) is to copy /usr/lib/libncurses.5.4.dylib and /usr/lib/libncurses.5.dylib from a 10.6.2 system. I don't really know what to think about such a libraries switch, as it might trigger other problems, but it does indeed fix this bug.
I've been told by Apple that my bug (ID #7812788) is a known issue currently being investigated by engineering, and has been filled as a duplicate of bug #7812932.
I'll keep you updated. :)
I need to decide whether I should support Mac OS X 10.4 / Tiger, and the decision likely hinges on what percentage of mac users are still running Tiger. I didn't find anything too reliable on the interwebs nor on Apple's developer website. Let's ignore the impending Snow Leopard release and it's impact on Mac OS version usage distribution.
Does anyone know of a study that might provide insight? Any other suggestions on how to figure this out? If you quote any numbers/percentages please include a pointer to the source.
Take a look at the Sparkle+ stats, that the Adium project is collecting.
The stats are available here.
OmniGroup keeps track of the system configurations that use their software updater. The current split is roughly 60/40 in Leopard's favor.
Keep in mind that, judging from previous releases, Apple will likely drop official support of Tiger once Snow Leopard is released, which should be any day now.
It really depends on what user audience your software has (whether they're likely to upgrade or not). I don't have a study, but considering how each major update costs money, I'm sure there are many non-power users who are still on older editions.
You're better off targeting Leopard only, especially with Snow Leopard coming out at the end of the week with a lot of changes to key technologies. Apple moves pretty quickly and soon enough supporting Leopard will be your legacy support.
From the Adium Sparkle+ stats that weichsel linked to:
10.3 : 2170 ( 1.3%)
10.4 : 28645 (16.3%)
10.5 or above: 134269 (82.4%)
How long does it take for an experienced Windows programmer to learn writing simple software for Mac OS X?
Where does one start and what tools will be necessary?
THIS. I came from a Win32 API background programming lately a lot in C# and I was able to pick up on Objective-C and Cocoa very quickly by working through the book. You will be pleasantly surprised, the APIs are very rich and just wonderful. Reflection is a first class citizen which makes things very easy.
Xcode is of course free and available on your Mac OS X installation disk.
Edit: it took me about 2 weeks to come up to speed and write simple applications. I think this is because the language and API are easy to learn and use and Aaron Hillegass's book was a big help.
You might want to check this post for info - pretty much a duplicate question to this one. Definitely just go with Xcode and I think you'll find the Mac community pretty helpful - I have, at least.
Start by checking out the Apple Developer Connection. There's a lot of documentation there. OS X comes with all the development tools you need to get started, just install XCode from the OSX CD.
I would start here:
http://www.cocoadevcentral.com/
It's a great site with good resources on learning obj-c and cocoa.
This is also a great book:
http://oreilly.com/catalog/9780596003012/?CMP=AFC-ak_book&ATT=Learning+Cocoa+with+Objective-C
Well, first you get a hoodie and a smug sense of entitlement....
All kidding aside, the Aaron Hillegass book, a great idea, and the Apple doco are all you need to get started (oh yeah, and a Mac). I think the biggest barrier for me was figuring out Xcode since I come from a Visual Studio background.
How long it takes is a function of the level of your interest and your passion about your project.
The tools have come a long, long way since the days of Interface Builder in Mac OS X 10.0, that's for sure.
I guess the "how long" question would depend on what languages you are used to using.
In terms of reference material, I have heard good things about "Cocoa Programming for Mac OS X", and I'd love to have time to play with it for myself. Unfortunately, the day job takes up enough of my time. :)
CS193E (from stanford) is a nice course. Lots of material. Really understanding the use of class clusters, delegation, etc. takes some time, getting started does not.
"Step into XCode" is a great intro to the development environment; since the book works through taking a simple command-line linear regression program all the way to a fairly sophisticated application (Core Data, Spotlight importers, etc.), you'll learn quite a lot by osmosis.
It's the little things... On
Windows, I liked the PowerToy called
"Open Command Here" that allowed me
to open a DOS CMD window from
Explorer and automatically set the
current directory. On the MAC, I got
"On My Command" which allows you to
create simple macros easily, and
comes with a library of useful ones,
like "Open Terminal Here", "New text
File...", etc.
Install Eclipse. I loved using
Eclipse on Windows, and it works
great on the MAC, making me feel
right at home. I even found that
Eclipse has plugins for Perl and
ActionScript.
Learn Unix (if you don't know it
already). I had years of Unix
experience prior to programming
Windows, and it comes in handy.
Knowing Perl helps a lot as well.
I started my new position last
October, which was when I made the
switch from Windows to MAC. By March
I was fairly comfortable in my
understanding of things. Then again,
my development platform is AS2 and
AS2 in Flash, which is
cross-platform.
An alternative is to try out the Qt SDK, and write cross-platform applications that run on Windows, Mac and other platforms.
I started learning Qt when I joined Qt software, and it didn't take long for me to start writing simple software, even though I don't work as a developer.