Sample Hello World apps

Guglielmo Braguglia guglielmo at braguglia.ch
Mon May 21 02:00:25 EDT 2012


Hi Jacque,
all OSX .app have, more or less, the same structure (/... I have about 
600 .app in my /Application folder/) ...

... as you already know, the .app, on OSX, it's a folder containing 
inside one principal folder 'Contents' which, in turn, contains some 
other folders and files.

The minimum that you find inside 'ApplicationName.app/Contents/' it's an 
Info.plist file, a PkgInfo file, a Resources/ folder and a MacOS/ 
folder. Besides this 'minimum' you can have other folders depending on 
the application ... a Frameworks/ folder e.g. to contains some .dylib, a 
Plugins/ folder with e.g. some 'language specific' files, etc. etc.

If the .app is 'Code Signed', on the 'Contents' folder you have another 
fixed folder : '_CodeSignature' , normally containing a file named 
'CodeResources' which is the ... fingerprint of your .app and is used by 
the OS to verify the 'author' of the .app and that the .app as not been 
tampered.

More, if the .app was regularly purchased on the Apple Store, on the 
'Contents' folder you have another mandatory folder, the : 
'_MASReceipt', normally containing a file named 'receipt', which link 
together : the .app id, the user name used to buy the .app on the Apple 
Store and the UDID of the Mac on which the .app was bought.
This receipt file link, in a indissoluble way, the .app to the Mac on 
which the .app is installed, BUT ... Apple don't make any check on this 
... it's up to the .app to verify the validity of this receipt ... here 
the details : 
https://developer.apple.com/library/mac/#releasenotes/General/ValidateAppStoreReceipt/_index.html

Next, on the 'ApplicationName.app/Contents/Resources/', you find the 
.app resources, e.g. icons, .nib, images, the .lproj files, etc, etc, 
while, in the  'ApplicationName.app/Contents/MacOS' folder, you find the 
real binary code of your .app (normally the same .app name, without the 
.app) together with other files that the programmer may have decided to 
put inside the same folder (/... e.g. normally, for a LiveCode .app, the 
Externals folder is located in this position/).

So ... this is the basic structure ... let me know if you need more info 
... :-)

Regards,

Guglielmo


On 20.05.2012 23:41, J. Landman Gay wrote:
> On 5/20/12 1:47 PM, Pierre Sahores wrote:
>> Hi Jacque,
>>
>> If you just wants to see how a GCC compiled app looks like, it's just
>> binary code and to see how it looks, you just have to drag any app on
>> TextWrangler or BBEdit (TextMate is too slow to open such files).
>
> Actually, I should have mentioned I only need to see apps for OS X. 
> I'm not so interested in what is in the binary, I want to see how the 
> app bundle is structured and what common elements they have.
>



More information about the use-livecode mailing list