views:

131

answers:

3

Hello. I am programming some applications for the iDevice market using the unofficial Open SDK, but am having difficulty installing the open toolchain on Windows, rather than Linux (I would use Linux, but I cannot on my work computer), so I am programming it in GNU Assembler (GAS).

Is it possible for GAS to target an iDevice as a format for output files? If not, are there any Windows or Linux-based assemblers (preferably open-source) that can assemble to the iPod touch?

+2  A: 

Note that gcc or gas is not the last step in producing an iOS app bundle. In the official Xcode build sequence, there follows linking, UniversalBinary merging, packaging and codesigning. So you might need tools for at least a few of these steps that run on your chosen development platform.

hotpaw2
+3  A: 

Even if it is technically possible, I'd rather not embark on such an enterprise. You may face massive problems, not only concerning codesigning but also app store approval. Apple is very keen on people using only their official tools and prohibits any use of cross compilers and the like. If they find the slightest hint that your app has been created in a way as you proposed, they may very well reject it.

Even if they maybe won't - that's a risk I wouldn't take. Imagine developing the workflow, doing all the work, solving all the codesigning and other problems and then apple rejecting your app.

Getting used to work with a Mac is not that hard. At least give it a try before taking chances.

Toastor
A: 

Technically, yes, you can make a cross-assembler and even a cross-compiler with the GNU toolchain to target the iPhone. The magic is passing the correct arch-string to binutils' "configure". It should be --target=arm-apple-darwin plus an argument that I don't remember to tell binutils which ARM comandset to use by default. So making a cross-assembler is possible and even nit that hard.

But that would only be one small step. You would also need a linker that can handle Mach-O files and I've got no idea how to set that up. I know that there was a complete toolchain for cross-compiling to iPhone on Linux, using the original Apple SDK but with a custom cross-gcc. However, Apple has explicitely forbidden to use cross-compilers, mainly to ban the Flash-to-iPhone cross-compiler. Also, you need to code-sign the app and I've got no idea if there's an OSS tool that would be able to do that.

As others have already said, get a Mac Mini, maybe a used one from eBay. You won't get very far without a Mac, and even if you still wanted to you would first need intimate knowledge about compiling for iPhone, and you only get that knowledge on a Mac.

Also you certainly don't want to live without the good debugger, Instruments and Interface Builder for easy debugging, memory leak finding and GUI building. Without Interface Builder you would need to code the GUI completely manually and that will take you a lot more time, and time is money. A lot of books and howtos would be useless to you to a large degree. All in all, it will cost your company more money if you try to hack an app with cross-compiling than it would cost them to give you a nice shiny iMac plus development time.

DarkDust