Re: getting the bundle name
Re: getting the bundle name
- Subject: Re: getting the bundle name
- From: John Blackburn <email@hidden>
- Date: Sun, 24 Mar 2002 00:14:16 -0800
The bundle identifier should be something more like
"com.mysite.RaiseMan". It's an optional field you add yourself.
Do this:
1. Go to Target Settings.
2. Choose Application Settings.
3. Click the Expert button.
4. Make sure there's an entry for CFBundleIdentifier in the list.
From
<
http://developer.apple.com/techpubs/macosx/ReleaseNotes/InfoPlist.html>:
A Java package style name (like "com.foo.MyBundle") which can be
used to
uniquely identify the bundle and locate its CFBundleRef at runtime.
CFPreferences uses this key, if provided, as the domain name to
store app-specific user preferences under.
You can find more about how this key is used for accessing preferences
at
<
http://developer.apple.com/techpubs/macosx/Essentials/SystemOverview/SoftwareConfig/
The_Preferences_System.html>.
John Blackburn
On Saturday, March 23, 2002, at 11:43 PM, Donald Hall wrote:
I am trying to get the bundle name for my app using NSBundle methods,
but am not having any luck. Can anyone help?
Here is a code fragment:
NSString *bundleName;
NSBundle *myBundle;
myBundle = [NSBundle mainBundle];
NSLog(@"main bundle is %@", myBundle);
bundleName= [myBundle bundleIdentifier];
NSLog(@"bundle name is %s", bundleName);
results of logging:
2002-03-24 00:35:58.129 RaiseMan[531] main bundle is NSBundle
</Users/dhall/Documents/RaiseMan/build/RaiseMan.app> (loaded)
2002-03-24 00:35:58.129 RaiseMan[531] bundle name is (null)
As you can see, the bundle name is returned as null instead of
"RaiseMan" as I think it should be.
(Yes, I am working through the Hillegass book!)
Don
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.