Recent

Author Topic: Compatibility of your apps with specific Mac versions  (Read 12764 times)

pasquale

  • Sr. Member
  • ****
  • Posts: 267
    • Esposito Software
Re: Compatibility of your apps with specific Mac versions
« Reply #15 on: March 22, 2012, 11:19:23 pm »
Hi, I have found this in a discussion forum:

Quote
Apple repeatedly says that applications compiled against the 10.6 or 10.7 SDKs are backward-compatible to any earlier Mac OS X, so long as you stick to the earlier API. This is true, as far as it goes.

I would very much like to know whether this is really true. In other words, can I compile my application -- with Lazarus -- against the 10.6 SDK and be sure that it will work on 10.5?

As far as the earlier API is concerned, as I am only going to use code that is even compatible with MS Windows, I don't think that that code only works with the 10.6 SDK and above.

I was afraid the compilation against the 10.6 SDK made the resulting application incompatible with previous versions in any case, i.e. independently of the code that was used in it.

Can you please confirm that compiling against the 10.6 SDK does not break compatibility with previous versions if the new API is not used?

If this is true, then I don't need to install the 10.5 SDK on my iMac since my app would be backward-compatible.
« Last Edit: March 22, 2012, 11:24:14 pm by pasquale »
Apple loves breaking backward compatibility to make money. If you want to be sure that your apps will never stop working, use Windows and trash macOS!

jwdietrich

  • Hero Member
  • *****
  • Posts: 1232
    • formatio reticularis
Re: Compatibility of your apps with specific Mac versions
« Reply #16 on: March 23, 2012, 01:01:57 am »
If this is true, then I don't need to install the 10.5 SDK on my iMac since my app would be backward-compatible.
No, you need the SDK for the oldest operating system that you want to support. With the SDK for Mac OS X 10.4 your application will be compatible with 10.4, 10.5, 10.6 and 10.7, but not vice versa.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

pasquale

  • Sr. Member
  • ****
  • Posts: 267
    • Esposito Software
Re: Compatibility of your apps with specific Mac versions
« Reply #17 on: March 23, 2012, 07:46:22 am »
If this is true, then I don't need to install the 10.5 SDK on my iMac since my app would be backward-compatible.
No, you need the SDK for the oldest operating system that you want to support. With the SDK for Mac OS X 10.4 your application will be compatible with 10.4, 10.5, 10.6 and 10.7, but not vice versa.

Thanks for your reply.

Apparently, there are different lines of thinking about this issue. Some other developers say you only lose backward compatibility when you link to some libraries that change according to the version.

Please take a look at this link and, if you can, tell me what your conclusions are:

http://lists.apple.com/archives/xcode-users/2011/Jul/msg00223.html

Is there anybody in this Forum who can compile a "Hello World" application against Mac OS X 10.7 and then test it under Mac OS X 10.4? This test would sort out this issue once and for all.
Apple loves breaking backward compatibility to make money. If you want to be sure that your apps will never stop working, use Windows and trash macOS!

VTwin

  • Hero Member
  • *****
  • Posts: 1215
  • Former Turbo Pascal 3 user
Re: Compatibility of your apps with specific Mac versions
« Reply #18 on: March 23, 2012, 12:57:21 pm »
(2) In your app bundle's Info.plist file, set LSMinimumSystemVersion to this version as well. OS X will then try to display an error message if the app is run on an unsupported version (rather than just crashing the app).

Thanks for this tip Phil.

Cheers,
Frederick
“Talk is cheap. Show me the code.” -Linus Torvalds

Free Pascal Compiler 3.2.2
macOS 12.1: Lazarus 2.2.6 (64 bit Cocoa M1)
Ubuntu 18.04.3: Lazarus 2.2.6 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.2.6 (64 bit on VBox)

pasquale

  • Sr. Member
  • ****
  • Posts: 267
    • Esposito Software
Re: Compatibility of your apps with specific Mac versions
« Reply #19 on: March 23, 2012, 03:38:15 pm »
Please read the following extract taken from a site you have suggested:

Quote
When compiling an application on Mac OS X without any special options, the application is only guaranteed to work on that particular major Mac OS X release and later (e.g., when compiling under Mac OS X 10.6.8, the application is only guaranteed to work on Mac OS X 10.6.8 and later).
Here is an example of an error that you may encounter when running an application compiled for Mac OS X 10.5 under Mac OS X 10.4 in case you use the widestring manager:

Quote
dyld: Library not loaded: /usr/lib/libiconv.2.dylib
  Referenced from: /Volumes/..../yourprogram
  Reason: Incompatible library version: yourprogram requires version 7.0.0 or later, but libiconv.2.dylib provides version 5.0.0
Trace/BPT trap


A legitimate interpretation is that this error message only comes up in specific conditions, particularly when you make a reference to an incompatible library.

On the contrary, the following explanation is probably more ambiguous:

Quote
Here is an example of an error that you may encounter when running an application compiled for Mac OS X 10.6.8 under Mac OS X 10.6.7:

Runtime error 203

In the article it is not explained if runtime error 203 appears everytime an application compiled for Mac OS X 10.6.8 is launched under Mac OS X 10.6.7 or if it only appears in particular conditions.

I don't know if this Forum allows you to attach an application bundle or not. If it did, I may attach a "Hello World" app compiled under Mac OS X 10.7 and those of you who have a lower version could possibly tell me whether they get an error message.

Thank you in advance for any help you may want to give me.
Apple loves breaking backward compatibility to make money. If you want to be sure that your apps will never stop working, use Windows and trash macOS!

 

TinyPortal © 2005-2018