Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change XPC Service product names to be more human readable #2096

Merged
merged 1 commit into from
Mar 7, 2022

Conversation

zorgiepoo
Copy link
Member

@zorgiepoo zorgiepoo commented Feb 28, 2022

The XPC Service names should not be bundle IDs because they may surface up in the UI.

Particularly, the Installer XPC Service may show up in the authorization prompt when authorization is required to install an update.

This will need an accompanying documentation PR change, and a notice that these services changed to whoever may be using custom scripts that process these services.

I doubt the AuthorizationRef APIs allow customizing this name that shows up (if it did, I would use the original app name). And last I tested, the CFBundleName and CFBundleDisplayName keys didn't affect the name shown here. Apparently the app's name only shows up on Monterey and not previous macOS releases like Big Sur.

Before:
Screen Shot 2022-02-27 at 6 45 19 PM

After:
Screen Shot 2022-02-27 at 6 44 20 PM

Fixes #2095

Misc Checklist:

  • My change requires a documentation update on Sparkle's website repository
  • My change requires changes to generate_appcast, generate_keys, or sign_update

Only bug fixes to regressions or security fixes are being backported to the 1.x (master) branch now. If you believe your change is significant enough to backport, please also create a separate pull request against the master branch.

Testing

I tested and verified my change by using one or multiple of these methods:

  • Sparkle Test App
  • Unit Tests
  • My own app
  • Other (please specify)

After the app is launched and before an update check is made I run:

sudo chown root <my-app-path>

Tested the authorization dialog shows "Installer" instead of "org.sparkle-project.InstallerLauncher" by default.
Tested app upgrading to new Sparkle version works
Tested that non-sandbox app still uses the original app's name.

macOS version tested: 12.1 (21C52)

They should not be bundle IDs because they may surface up in the UI.

Particularly, the Installer XPC Service may show up in the authorization prompt when authorization is required to install an update.
@zorgiepoo
Copy link
Member Author

zorgiepoo commented Feb 28, 2022

Hm for a non-sandbox app, it does use CFBundleName .. It doesn't do that for XPC Services in my testing.

@zorgiepoo
Copy link
Member Author

zorgiepoo commented Feb 28, 2022

I'll leave this here a bit to make sure there aren't any better solutions or if anyone has any insights. cc @DivineDominion @tonyarnold @danielpunkass

@DivineDominion
Copy link
Contributor

@zorgiepoo I noticed these titles in some apps, too -- thanks for figuring out where they come from.

So for the optimal readable title, one would

  • not need to change anything for non-Sandboxed apps b/c they use the app title anyway
  • maybe change "Installer" to e.g. "MyAppName Installer" to disambiguate for Sandboxed apps?

@danielpunkass
Copy link
Contributor

@DivineDominion If I understand the challenge right, the host app's name can't be systematically swapped in at runtime, so to have the "MyAppName Installer" solution it would have to be done as a packaging process by the host app's own build process. I have done some similar trickerey in my own apps to rename helpers to customize them for the host app.

@zorgiepoo
Copy link
Member Author

zorgiepoo commented Mar 2, 2022

Right I can’t figure out (or haven’t looked deep enough) on how to dynamically set the name. So there is a config variable to change it if any developer wants to go through the trouble of doing that, to build their own Sparkle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

InstallerLauncher bundle identifier visible on macOS Monterey
3 participants