• 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: Adding helper target to macOS app?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding helper target to macOS app?


  • Subject: Re: Adding helper target to macOS app?
  • From: João Varela via Cocoa-dev <email@hidden>
  • Date: Sun, 5 Apr 2020 20:38:12 +0100

Hi Jean-Daniel

Good, complex question, and perhaps I am doing something wrong, but this was
the solution that worked every time.

My reasons are the following:

1) Because I rolled out my automatic versioning system and needed to edit
automatically the info.plist files of the main app, of the helpers and of the
common framework that all apps are using

2) Because very often, if not always, Xcode would complain that a product was
already present in a given location and would fail copying the new version of
the helper (perhaps that issue was already resolved, but that was my
experience) -> This is only true for locations inside the bundle to which Xcode
does not offer an option using the popup menu of the Copy Files phase. For
example, for putting frameworks in the right location, that’s not needed.

3) I found easier to use scripts to create the Helpers and the LoginItems
directories inside the bundle and only then use the copy files phases to copy
the apps to the proper locations

4) To better control the stripping of the executables, because when I started
working with Xcode the stripping process was not as thorough as I wanted it to
be.

Perhaps, I’m doing a few extra steps right now, but if things are working, I’m
not going to change them.

HTH

João


> On 4 Apr 2020, at 20:26, Jean-Daniel <email@hidden> wrote:
>
>
>
>> Le 3 avr. 2020 à 15:44, João Varela via Cocoa-dev
>> <email@hidden> a écrit :
>>
>> Hello, Laurent
>>
>> As far as I know, the documentation is still valid.
>>
>> I would start reading this:
>>
>> https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/DesigningDaemons.html#//apple_ref/doc/uid/10000172i-SW4-BBCBHBFB
>>
>> <https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/DesigningDaemons.html#//apple_ref/doc/uid/10000172i-SW4-BBCBHBFB>
>>
>> and this:
>>
>> https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/DesigningDaemons.html#//apple_ref/doc/uid/10000172i-SW4-BBCBHBFB
>>
>> <https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/DesigningDaemons.html#//apple_ref/doc/uid/10000172i-SW4-BBCBHBFB>
>>
>> and this:
>>
>> https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/Introduction/Introduction.html#//apple_ref/doc/uid/10000123i-CH1-SW1
>>
>> <https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/Introduction/Introduction.html#//apple_ref/doc/uid/10000123i-CH1-SW1>
>>
>>
>> macOS has a plethora of options, and that depends a lot on what you want to
>> achieve and the degree of security you need / you want to impose on the main
>> app and its helpers.
>>
>> Personally, I have an app bundle that look like this:
>>
>> MainApp.app/
>>  Contents/
>>     info.plist
>>     MacOS/
>>       MainExecutable
>>     Helpers/
>>       Helper1.app
>>       Helper2.app
>>     Library/
>>       LoginItems/
>>          LoginItem.app
>>     Resources/
>>        … all resources here, including help and icon files
>>
>> I create different targets for the main app and for each helper and login
>> item and then use scripts to build the whole bundle
>
> Out of curiosity, why are you using custom scripts and not simply some « Copy
> File » Build step to assemble the bundle ?
>

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Adding helper target to macOS app? (From: João Varela via Cocoa-dev <email@hidden>)
 >Re: Adding helper target to macOS app? (From: Jean-Daniel via Cocoa-dev <email@hidden>)

  • Prev by Date: Re: Adding helper target to macOS app?
  • Next by Date: Voice Control not working with my App
  • Previous by thread: Re: Adding helper target to macOS app?
  • Next by thread: Re: Image GPS Properties Question
  • Index(es):
    • Date
    • Thread