3

I'm writing a command line tool in Objective-C (within xCode) that uses the Foundation Framework. I have to use Objective-C because I need to unarchive objects previously archived by NSKeyedArchiver.

My question is, I'm wondering if I can now use this compiled application on my Linux web server.

I'm not sure if there would be a runtime issue or if the executable could be its own standalone program that could actually run on my Linux server.

I'd appreciate any feedback.

3 Answers 3

3

You can use The Cocotron to build your app targeted to Linux. It is an actual Cocoa implementation meant to fully interoperate (although it's not 100% complete of course), as opposed to GNUstep which is not meant to work that way. I use this and it is awesome.

Sign up to request clarification or add additional context in comments.

11 Comments

Is Cocotron active? There seems to have been no blog activity for over 2 years which doesn't fill me with confidence. I've looked at GNUstep in the past too and they both seem like interesting projects in need of some extra love and TLC.
@Roger: there are still active commits going in in the Cocotron source tree, so I guess it's still active.
It's very active, and very capable - if you check the google code page you can see that. It's got a learning curve but it's great once you get going. A lot of people see the webpage and think it's out of date and have trouble finding up to date info - I've started to put together a user's guide but it's not even at a draft yet.. eventually it will exist!
@nektarios, @JeremyP thanks both for the info, looks like it's worth another look after all. It's a very interesting idea and just the sort of thing we might be interested in for a couple of projects ...
@Roger Feel free to contact the project founder (and other developers) on the Cocotron Developers Google group.
|
2

No, you cannot run a program that was compiled on and for a Mac on a Linux system. So you will have to compile it for (and on) Linux. Apple's Foundation framework is not available for Linux, but have a look at GNUstep, a free and open Cocoa implementation.

I don't know if GNUstep can read archives that have been archived with Cocoa's NSKeyedArchiver, though.

Comments

2

I have provided a wrap-up on how to compile a command line tool based on the Cocotron Foundation framework on my blog.

This does also include a step by step guide on how to cross compile the Foundation framework for Ubuntu Linux.

Hope this is helpful!

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.