• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: getting the bundle name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >getting the bundle name (From: Donald Hall <email@hidden>)

  • Prev by Date: Service hotkeys on login
  • Next by Date: Re: Cocoa and UNIX txt files ??
  • Previous by thread: getting the bundle name
  • Next by thread: Re: getting the bundle name
  • Index(es):
    • Date
    • Thread