• 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: Can a command-line tool have a bundle ID?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can a command-line tool have a bundle ID?


  • Subject: Re: Can a command-line tool have a bundle ID?
  • From: Clark Cox <email@hidden>
  • Date: Mon, 25 Jan 2016 20:13:59 -0800

> On Jan 25, 2016, at 18:38, Roland King <email@hidden> wrote:
>
>
>> On 26 Jan 2016, at 10:20, Jens Alfke <email@hidden> wrote:
>>
>> Can an OS X command-line tool, i.e. a plain unbundled executable, have a bundle ID? I’ve got a tool that I’d like to store user defaults for, but without a bundle ID it doesn’t get any persistent defaults storage.
>>
>
> I knew I’d done this but couldn’t remember how nor did google help me.
>
> But I found this on the project build settings ‘other linker flags’
>
> -sectcreate __TEXT __Info_plist $(PROJECT_DIR)/nrfjprog/nrfjprog-Info.plist

There’s a simple setting in recent Xcode’s that will handle that for you (i.e. no need to remember obscure arguments to add to the linker):
Just set “Create Info.plist Section in Binary” (aka “CREATE_INFOPLIST_SECTION_IN_BINARY”) to Yes, and add the Info.plist to your project as you would for a normal bundled application.

> how I found that originally I really will never know. But the program has an info plist file which contains a bundle id and I I use NSBundle methods on it, and it stores persistent preferences.
>
> Perhaps that’s enough to get you started.
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Can a command-line tool have a bundle ID?
      • From: Wim Lewis <email@hidden>
References: 
 >Can a command-line tool have a bundle ID? (From: Jens Alfke <email@hidden>)
 >Re: Can a command-line tool have a bundle ID? (From: Roland King <email@hidden>)

  • Prev by Date: Re: Can a command-line tool have a bundle ID?
  • Next by Date: Re: Can a command-line tool have a bundle ID?
  • Previous by thread: Re: Can a command-line tool have a bundle ID?
  • Next by thread: Re: Can a command-line tool have a bundle ID?
  • Index(es):
    • Date
    • Thread