PDA

View Full Version : Remote Development using XCode locally




luksen
Jul 3, 2009, 05:08 AM
Hey there,

Is it possible to use the XCode IDE to code but have it compiled on a linux machine?

The current setup is as follows. The Linux machine has AFS installed, which I have on my mac as well, thus I see my linux home directory as a network drive. So, I ssh into the linux machine checkout the Code using subversion, add the checked out files to an XCode project, edit them there, but can't compile. I need to ssh back to the linux machine to compile the Code. Can this process be automated?

I think I read this was possible, at least with emacs, bit I would like to use the XCode IDE

cheers,

luksen



theunixgeek
Jul 3, 2009, 08:03 AM
I'm not sure I quite understand your situation, but have you considered writing a quick BASH script to make SSH'ing a bit quicker? As far as I can tell, you could also try to write a quick application in Automator, especially since it can record what you do (where you click, what you type, etc).

luksen
Jul 3, 2009, 09:27 AM
yes writing a bash script would probably work.. but I was wondering if one could still use XCode as a full IDE.. ie with debugging etc. and compile from within XCode (but have it somehow ssh to the linux machine and use its compiler)

as it is now xcode is just a more or less bloated text editor..

maybe this is just not possible?

Cromulent
Jul 3, 2009, 10:00 AM
maybe this is just not possible?

Not with Xcode.

luksen
Jul 3, 2009, 10:07 AM
Ok thanks, that was what I was expecting...

So is there an IDE with which I could do that? Maybe Eclipse?

lee1210
Jul 3, 2009, 10:33 AM
I would set the DISPLAY environment variable on the Linux machine to the IP and first display of your mac, then start X11.app on the mac, and run xhost + with the IP of the Linux machine. I would then run eclipse on the Linux machine, and it will display on the mac.

There may be a way to have the IDE run on the mac, but have it run all the supporting programs remotely, but it seems like it would be very involved.

-Lee

luksen
Dec 14, 2010, 06:18 AM
I remembered recently that I posted this question here a long time ago and wanted to state how i solved the problem

I eventually added a shell script target that would do

ssh user@host "cd path/to/makefile;make"

this needs ssh keys to have passwordless access to the host but it has worked ever since. you do lose the debugging functionalities (but you loose this anyway when using makefiles) but at least you can build from xcode using command-Q