[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem loading NSBundle in TalkSoup

From: Riccardo Mottola
Subject: Re: problem loading NSBundle in TalkSoup
Date: Sun, 15 Mar 2015 13:25:57 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:36.0) Gecko/20100101 Firefox/36.0 SeaMonkey/2.33


Richard Frith-Macdonald wrote:
This *sounds* like an application level bug ... each bundle should have a 
*unique* identifier (or have no identifier).

You should not be creating multiple bundles with the same identifier in 
OSX/Cocoa any more than you should in GNUstep.  In both cases the identifer is 
supposed to identify the bundle, and while you may have seen that break 
something in GNUstep (and not seen the same problem in Cocoa), it probably just 
breaks things in a different way in Cocoa (for sure I'd expect the 
bundleWithIdentifier: method to produce bad results in Cocoa if you have 
created multiple bundles with the same identifier).

It is more subtle: XCode changes the budle identifier on build. That is, the file has:

CFBundleIdentifier = "org.gnustep.${PRODUCT_NAME:rfc1034identifier}";

and it is the same for all bundle

but when I see the actual plist under Mac, it has:

Thus it probably does a variable substitution. Lots of magic in XCode going on.

Here is what the main gnustep-make documentation (which answers your question 
about how the principal class is found and how plists are handled) for building 
bundles says:

# The name of the bundle is in the BUNDLE_NAME variable.
# The list of bundle resource file are in xxx_RESOURCE_FILES
# The list of localized bundle resource files is in
#                               xxx_LOCALIZED_RESOURCE_FILES
# The list of languages the bundle supports is in xxx_LANGUAGES
# The list of bundle resource directories are in xxx_RESOURCE_DIRS
# The name of the principal class is xxx_PRINCIPAL_CLASS
# The header files are in xxx_HEADER_FILES
# The directory where the header files are located is xxx_HEADER_FILES_DIR
# The directory where to install the header files inside the library
# installation directory is xxx_HEADER_FILES_INSTALL_DIR
# where xxx is the bundle name
# If you want to insert your own entries into Info.plist (or
# Info-gnustep.plist) you should create a xxxInfo.plist file (where
# xxx is the bundle name) and gnustep-make will automatically
# read it and merge it into Info-gnustep.plist.

Well, technically it is picking up xxx-Info.plist, too, not just xxxInfo.plist :) since that is what happening. I also checked some older projects. Old stuff done by old ProjectBuilder named things Info-xxx.plist and they stayed out of the way. Now XCode names the same way. Older xcodes had an identifier directly named, just the latest ones do this trick. This is why I probably discovered the problem now.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]