tags:

views:

310

answers:

4

Hi all,

I developed a simple application in Snow Leopard. The build configurations at which it was compiled in Snow Leopard are: (10.5 | Release | i386).

When I tried to compile it using above stated configurations it gave me this error in the application delegate file, which was created automatically when I created the project: cannot find protocol declaration for 'NSApplicationDelegate'. So I removed <NSApplicationDelegate> from its header file and it was compiled successfully.

Although it is running successfully in Snow Leopard, to my surprise its .app file is not appearing to be executable in Leopard.

Can anyone suggest me why it is showing such strange behavior and how can I resolve it

Thanks,

Miraaj

A: 

check your build settings. in particular Deployment:MacOS X Deployment Target

kent
I have checked it, it is set to Mac OS X 10.5
Miraaj
A: 

Check your Info.plist for the value of
Minimum system version (LSMinimumSystemVersion)

weichsel
It is ${MACOSX_DEPLOYMENT_TARGET}
Miraaj
+1  A: 

There are multiple settings that must all be set correctly in order to make this run. (One day, I'd love for Xcode to have a magic "What systems should this program run on?" list that then sets everything up correctly. But that's neither here nor there...)

Project -> Edit Project Settings -> Build Tab: make sure Architectures/Base SDK is set to Mac OS X 10.5.

Project -> Edit Project Settings -> Build Tab: make sure the Architectures/Valid Architectures list includes the system type you're running Leopard on (it's easy to leave out the ppc option).

Project -> Edit Project Settings -> Build Tab: make sure the Architectures/Build Active Architecture Only is unchecked

Project -> Edit Project Settings -> Build Tab: make sure the Deployment/Mac OS X Deployment Target is set to Mac OS X 10.5.

Under Project -> Edit Active Target -> Build Tab: check the same things


Now, you say you had to remove some 10.6 protocol declarations to get it to build. This implies that you'd already done all this (I mostly wrote the top part of the answer for Google's sake; but it's probably still worth double-checking). So now I'm curious what the symptoms for "is not appearing to be executable in Leopard" are.

Does it crash immediately? Does the OS not treat it as an executable bundle? Something else?

Have you tried running the executable from a command line on Leopard (cd into MyApp.app\Contents\MacOS, then run ./MyApp). What happens then? What gets printed to the console when you do it this way?

Basically, you haven't told us what's wrong in enough detail for us to really help out.

James Williams
in the release folder there appears a cross symbol above .app file so I just cannot run it! Moreover when I try to run it through console using command: open xyz.app it gave me this msg: The file does not exist!
Miraaj
unknown: Was your current working directory the build folder where Xcode placed xyz.app? That's a relative path, so it would need to be in your working directory for that to work. If you just do it in a new Terminal window, it'll look in the top level of your Home folder.
Peter Hosey
Yes it is build folder where Xcode placed xyz.app. I would like to provide you more input based on your previous recommendations- Project-> Edit Project Settings -> Build Tab: (Architectures : Standard (32/64-bit universal)), (Valid Architectures: i386 / ppc / ppc64 / ppc7400 / ppc970 / x86_64), (Build Active Architecture Only: unchecked), (Mac OS X Deployment Target: Mac OS X 10.5), for Project -> Edit Active Target -> Build Tab: All same as previous + Debug Information Format: DWARF with dSYM File.
Miraaj
Moreover.. when I am trying to double click the .app icon it is giving me this message: "You cannot use this version of the application XYZ with this version of Mac OS X"
Miraaj
Hmm. Well, that's bizarre and I've never run across it. What's the output when you run otool on the binary?
James Williams
output of otool is too long to post it as comment so I am posting it as answer!
Miraaj
A: 

miraaj:~ keyss$ otool -L -arch all /Users/keyss/Desktop/Release_2/XYZ.app/Contents/MacOS/* /Users/keyss/Desktop/Release_2/XYZ.app/Contents/MacOS/XYZ (architecture x86_64): /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 12.0.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.4) /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 227.0.0) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 32.0.0) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 476.18.0) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 677.24.0) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 949.46.0) /Users/keyss/Desktop/Release_2/XYZ.app/Contents/MacOS/XYZ (architecture i386): /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 12.0.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.4) /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 227.0.0) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 32.0.0) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 476.18.0) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 677.24.0) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 949.46.0) /Users/keyss/Desktop/Release_2/XYZ.app/Contents/MacOS/XYZ (architecture ppc7400): /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 12.0.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.4) /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 227.0.0) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 32.0.0) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 476.18.0) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 677.24.0) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 949.46.0)

Miraaj
That looks reasonable to me (though I'm far from an expert!). I'm out of ideas. I'm sorry I could not help.
James Williams
I see on another comment that you've got LSMinimumSystemVersion set to a variable. Try setting it to 10.5.0 and seeing what happens.
James Williams