Is an app created in Qt on Mavericks executable on other osx - macos

I usually use a computer on snow leopard to create apps compatible upwards but I'm on holidays at the moment and only have my macbook pro with Mavericks on it.
I need to send an app to a customer who's on snow leopard (or lion)
Is this possible? Can I create a compatible app building it on Mavericks.

I'm not an expert on building on Mac, but I believe it is/can be. If the target computer also has Qt 5, then it should work.

There used to be "Universal" binaries that would work with both Intel based Macs and with Power PC based macs... I've seen that break on my Mavericks install for some things that were built with a "Universal" binary. It might be just a problem with that one or two programs I was running.
The default compiler for Mavericks and Qt 5 is clang64, and so it should work on any 64 bit Intel based mac. Make sure you are using the commandline deployment tool for qt mac deployment, so that all the dylib's get included in your app package.
Hope that helps.

Related

Is it possible to develop PowerPC applications on OS X Yosemite?

I have an iMac g3 running Tiger 10.4.11. I'm really interested in developing applications for it, but I would like to do all of the programming on my Macbook Pro(running Yosemite).
Is it possible to build an application on Yosemite that will run on PowerPC macs? I've tried downloading xCode 3.1.4, but it isn't supported on Yosemite.
Yes, you can. What you need to do is restore PowerPC support in your version of Xcode like described here: https://github.com/devernay/xcodelegacy
I'd imagine you cannot. Apple stripped PowerPC emulation from it's latest versions of OSX so if you can't run the apps it's only logical to think that you couldn't develop or compile them.
As far as I'm aware the latest version of OSX that can run PPC apps is Snow Leopard, although I cannot comment on Xcode support for developing for PowerPC architectures.
Yosemite as far as I'm aware definitely will not serve as a platform to develop PowerPC apps.

Compile for 10.5/10.6 & PPC

I'm needing to compile a C++/C/Objective-C project for 10.5 (ppc, intel)+ however Xcode 4+ (using 4.6) drops support for 10.6 and i believe Xcode 4 completely dropped support for 10.4/ppc. I have read existing StackOverflow and other posts about installing Xcode 3.2.6 on Mountain Lion but i don't want to do this if it's unconfirmed/will break my system..
I've tried virtualising Snow Leopard in a VMware Fusion 5 Pro VM but it doesn't allow me to as it is not a server version.
Besides buying a Snow Leopard Server DVD, how else can i compile my project for 10.4+ (ppc,intel)? I am currently running OS X Mountain Lion 10.8.3. Setting the deployment target does not work in my Xcode version, doesn't compile. I've also considered virtualising Lion, however i do not have a backup copy of (my purchased via app store) install dmg/app and i can't seem to find the download in the App Store.
Can anyone suggest what i should do or am i basically left with one option.. Dual boot Snow Leopard?.
Thanks!

Simulate run on older OS X version

How can simulate a run on a older OS X version ?
Right now my app works on 10.7 and 10.8 but I want to make it compatible with 10.6. Since I'm using some new apis I'm still compiling with the 10.8 base SDK, I can only change the deployment target.
So on my OS X 10.8, how can I simulate a run on OS X 10.6 ? (If it's possible)
Thanks
TheZ mentions virtual machines. Lots of hoops to jump through with licensing.
My personal "path of least resistance" was to use an old PPC Mac Mini and an almost-as-old intel-based. PPC runs 10.4 for old app testing; Intel mini boots various OS versions with which to test. All install images are disposable and can be restored from a network volume for a clean environment no matter what I do to it.
If you don't care about PPC, then just get a used Intel Mac Mini, partition it for the older OS versions and use it exclusively as a test environment.
2022 Update: Apple has relaxed their stance on virtualization. Today I use VMWare (Parallels works too).

How do I add Leopard and Snow Leopard support to a Lion Cocoa App?

I have developed a Cocoa App on Lion and now I would like to add compatibility with Leopard and Snow Leopard.
I tried to set the development target to 10.5 but it still has crash problems on Leopard and Snow Leopard.
I tried also to open the project with old versions of Xcode, but I get hundreds of compile errors (I guess it's because I can't compile the program with the old Mac OS SDK)
Do you have any advice about solving the retro-compatibility problems of Cocoa Apps?
I think it's generally not a very good idea to develop for the latest OS then try to support older OSes at the last minute. If you've used any APIs that were introduced in an OS later than the oldest you're trying to support, you'll have to rewrite code to avoid using those APIs. It's generally not worth the trouble.
That said, there's no secret to supporting older OSes. You just need to make sure that you only use APIs (classes, methods, functions) that are available on the oldest OS you're trying to support. You'll notice when looking at the documentation that for each method, under "Availability", it will tell you which versions of the OS include that method. Something like:
Availability
Available in Mac OS X v10.6 and later.
Assuming you don't use any APIs not available on an OS version you're targeting, all you need to do is set the deployment target to the lowest OS you're targeting, and build. You will of course also want to test thoroughly on each OS version you're supporting.
Your question would be easier to answer in more detail if you elaborated on the "crash problems" you're seeing on Leopard and Snow Leopard.
First, install the 10.5 SDK on your Mac. This may not be necessary, but do it anyway. You can find instructions on the Internet. Keep in mind that compiling with the 10.5 SDK will ensure compatibility, but you won't be able to use newer OS X features unless you load them dynamically.
Second, go into your .xib files and on the File Properties tab (first notch in the Inspector pane) disable auto layout and set the deployment target to 10.5.

Xcode built app on 10.6 wont run on 10.5.8

I am new here and new in Xcode world.
I made a simple app with Xcode 3.2 on Snow Leopard.
The resulting built app works on snow leopard, however it will not even start on leopard (10.5.8) - I get message "You cannot use this version of application with this version of Mac OS X". Is it normal?
Or is there a way to make app that will work both on Snow Leopard and Leopard? Please advise, as I have no way to find out myself
Thanks for any input
You need to change the deployment target in your Build Settings. You should set it to the lowest version of OS X that you're willing to provide support for. You should set your base SDK to the latest available public SDK.
If you do this, you must ensure that you only use new 10.6-only APIs after doing runtime checks for their existence. To do this, you can use functions like NSClassFromString and respondsToSelector:.
Any Frameworks or libraries that are new to 10.6 should be weak-linked. This will prevent the app from trying to load those frameworks on 10.5 and thus cause the program to crash when it doesn't find the frameworks.
All explained in the SDK Compatibility Guide from Apple (Requires (free) login).

Resources