3
votes

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

4
I also have the same problem.João Moreno
Hi Joao... this problem is still un-resolved for me.. to cope with this bizarre behaviour I do following thing: if I want any application to run on both 10.5 and 10.6, I prepare the Xcode project in 10.5 then transfer it to mac running 10.6 and compile it using setting - 10.5. The release thus obtained works on both Leopard and Snow!Devarshi

4 Answers

1
votes

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.

0
votes

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

0
votes

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

0
votes
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)