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

MacOS: Correct name in Launch Services #3759

Open
ondrejfuhrer opened this issue Mar 18, 2019 · 1 comment
Open

MacOS: Correct name in Launch Services #3759

ondrejfuhrer opened this issue Mar 18, 2019 · 1 comment

Comments

@ondrejfuhrer
Copy link

@ondrejfuhrer ondrejfuhrer commented Mar 18, 2019

Description

Hey guys,

I'm using defaultbrowser script to change my default browser (via Alfred Workflow) and I noticed that when listing available browsers (it is taking the info from Launch Services API) the brave browser is listed as "browser", which is not ideal. Would be great if you could update that to "brave" 🙂

Steps to Reproduce

  1. run i.e. defaultbrowser script

Actual result:

~> defaultbrowser
  seamonkey
  chrome
  torbrowser
  firefox
  firefoxdeveloperedition
  nightly
* browser
  vivaldi
  safari

Expected result:

~> defaultbrowser
  seamonkey
  chrome
  torbrowser
  firefox
  firefoxdeveloperedition
  nightly
* brave
  vivaldi
  safari

Reproduces how often:

Easily reproduced

Brave version (brave://version info)

0.61.51 Chromium: 73.0.3683.75 (Official Build) (64-bit)

@ondrejfuhrer ondrejfuhrer changed the title Correct name in Launch Services MacOS: Correct name in Launch Services Mar 18, 2019
@rebron rebron added this to Untriaged Backlog in General Mar 19, 2019
@cndouglas
Copy link
Contributor

@cndouglas cndouglas commented Mar 19, 2019

The script assumes that the browser's name is the last component of the browser's bundle identifier (CFBundleIdentifier in the app's Info.plist file):
https://github.com/kerma/defaultbrowser/blob/dba87e7d8764ea24502d27da7a4c80c3475b4f25/src/main.m#L9-L11

NSString* app_name_from_bundle_id(NSString *app_bundle_id) {
    return [[app_bundle_id componentsSeparatedByString:@"."] lastObject];
}

Brave's bundle identifier is com.brave.Browser. The last component is Browser, so that is why the name is shown as "browser". The proper bundle identifier form is com.company.app, like Safari's com.apple.Safari. So Brave's bundle identifier should be changed to com.brave.Brave.

The bundle identifier is set here: https://github.com/brave/brave-core/blob/7c13b83f5aecc7628c8fce7e81cbdadbd06a88fa/app/theme/brave/BRANDING#L8

MAC_BUNDLE_ID=com.brave.Browser

It was changed in 1b2b1b6 with the following note:

Update Apple app id's to use com.brave.Browser and add all profiles
Needed because com.brave.Brave wasn't available for every release we
needed.

@rebron rebron added the priority/P5 label Mar 19, 2019
@rebron rebron moved this from Untriaged Backlog to P5 Backlog in General Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
General
  
P5 Backlog
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.