Test universal binary for mac - xcode

I am developing a mac program in an intel mac, under OS X. It needs to be also an universal binary, so guess with Xcode one can create the universal binary (UB), am I wrong?
But my question is if there is some kind of virtual machine or such other method, so I can test whether the binary powerpc part runs ok, but I have only the intel mac.
I have also a PS3, and as it has a pwerpc proc, I wonder if the command line application could be tested here.
Thanks

Xcode can make a universal binary
It can be tested using rosetta on your intel mac. To test with rosetta, select the file in finder, select file>>get info, tick "Open using rosetta", and then start the app
It can not be tested on your PS3

Related

Build universal binary (Apple Silicon & Intel) in GUI of Xcode without make file?

For a long time I'm using Xcode and compile my project using Product/Build command. Then I find the compiled app when right click on "Products" files. So I can get it from there and copy it to where ever I want.
But how to create a universal binary with Apple Silicon & Intel without using a make file? On my M1 MBP it creates only for itself. My Mac Mini with INTEL inside wont run that app. I'm compiling it on my Mac Mini as well to get a version which runs there too.
Any hints? (maybe with some screenshots)?
Got it! In the top line right of the stop button you can choose the build option getting a universal binary. Seems to be a new option I didn't found till now.

Portable Cocoa for Windows

So Im working on a project in Xcode and would like to also be able to work on it on my PC work laptop when travelling. Is there anything I could run off of a USB?
You can try installing Mac OS in your PC!!!
Many of my friends have installed dual Mac OS X Mountain Lion & Mac OS X Mountain-Lion in their Intel Based PC using VMWare 9 and its running fine. But I tried with no success as I am using AMD Processor.
You can edit all of the text files using a normal text editor, like Notepad++. I don't think that there's any software for Windows that can edit all of the different things you would have in your project, like the .xib files and such.
If you were ambitious you could try gnustep, but that is pretty tough to set up on cigwin, and would only be a very close fit for Mac OS X and not iOS.

Writing code for a Mac using Lazarus

I have done a little work on lazarus' free pascal. So when a client asked me to write an application for a mac, after the initial, "it can't be done" stage. (followed by an asp.net maybe stage) i thought about writing it using lazarus.
Question is. I have only a virtual machine running mac OSX, this means that i do not really want to develop on the mac. However, i just cannot seem to get the applications that i have written in lazarus on windows to work on the mac. I have tried the deployment using the Lazarus Wiki and the MACOS folder is empty and so when i put it on the mac it doesn't run the application.
What is the best way of doing this or am i barking up the wrong tree?
It seems you want to do cross-compiling, which is theoretically possible, but may not be practical, for the reasons mentioned by Marco above.
As an alternative, you could install XCode, FreePascal, and Lazarus on a MacOX machine. You could still do your development and some testing on Windows/Linux. When you hit a certain milestone, you can copy your source code to the Mac and compile your application to test and give to the user.
Even if it were possible to easily cross-compile, there some minor differences between platforms, so (especially if it's a GUI app), you would want to test it on an actual MacOS box before giving it to the client.
I've taken the route described by Noah - and I was incredibly surprised that after about three weeks development on Windows, it took about 10 minutes to get the application running on the Mac.
My route was to install Xcode 4.3 on an old Mac Mini running snow leopard, then install Lazarus using the fink version as described here. This took a while but was done in an evening.
Then I just copied my folder across to the Mac, opened the lpi on the Mac, compiled it. It failed so I removed a windows references, recompiled, and it was working. I was truly amazed.
What linker and assembler do you use to generate binaries? To my best knowledge the linker for recent OS X versions is not available in source.
Afaik what you want (crosscompiling to Mac) is not possible for recent versions (and I've done it for PowerPC myself in the past).
The easiest is to use the Unix "file" command on the binary to see what is generated, and make sure it reads something with "MachO" in it. Easiest is if you have a Linux install (where this command is pretty standard), but versions can be found for windows too (cygwin, mingw and 3rd party)

MonoTouch on OS X VM within Windows?

We're getting into iOS development with MonoTouch. All of our machines are Mac Pros with Windows 7 installed via BootCamp. I'm not crazy about rebooting into OS X just to access the MonoTouch IDE. I'm wondering if it's legal and possible to install OS X on a VM within Windows (if I'm already on Apple hardware, it should be ok, right?). Any other issues with Apple's SDK in a VM (I heard they do some hardware checking of some sort). Thanks in advance for any suggestions!
You can't really run OSX on a VM under windows without going the hacking route. The only way to properly virtualize OSX is to run OSX Server under OSX itself, which is not what you want.
The best option for you is to do what I do: run OSX on your Mac, then use something like VMWare or Parallels to run the Windows you have on your BootCamp as a VM. Works beautifully.
Yup, Eduardo is right, running OSX under non-apple hardware is considered illegal according to apple's license. Moreover, you may run into some issues when creating your developer's account or sumbitting apps.
However, if you still want go the hack way, you can refer to osx86project or just search google for "how to create a hackintosh".

Force a Mac OS X 32/64-bit universal binary to run 32-bit on an old OS version only?

I want to ship a single 32/64-bit universal binary of my desktop Mac OS X Cocoa app. I don't want to ship two versions.
I want it to run as a 64-bit process on Snow Leopard.
However, if the app is launched on Leopard, I want to always force it to run as a 32-bit process.
NOTE: I know that in the Finder 'Get Info' window you can click the 'Open in 32-bit mode' checkbox to achieve this. That's nice, but what I really want is a way to automatically, always force this behavior on Leopard only. On Snow Leopard the app should run 64-bit unless the user wants to change the setting mentioned above.
Can this be done? If so, how? thx.
Set the minimum system version per architecture key in your Info.plist file :)

Resources