Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

revmacian

macrumors 68000
Original poster
Oct 20, 2018
1,745
1,468
USA
When I click on a apple.news link the article is opened in the Apple News app. I would like the article to open in Safari and not have the News app open at all. I figured I could just set a new URL scheme to open a .news link in Safari the same as if I clicked a .com link. I did a search and found some information about this but that information is years old and some of it recommends the user to install a third-party app for this purpose. I would rather not install a third-party app but instead learn how to do this myself. Being that the Terminal is quite powerful (I practically lived on the terminal during my 18 years in Linux), I would like to learn how to do this myself using the Terminal if at all possible. Isn't it as easy as editing a plist somewhere?
 
I think in macOS you can edit `~/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist` for this (with Xcode)

alternatively: https://github.com/Lord-Kamina/SwiftDefaultApps (third-party app)
Yes, I found that through Google too. But, as mentioned in the OP, I would rather not install a third-party app but instead learn how to do this myself. There has to be a way I can do this myself without installing or compiling anything. We can change the "open with" of any file by using the "Get Info" window, so we should be able to do the exact same thing with any URL without installing or compiling anything. I just need to learn how to do it.
 
Last edited:
Yes, I found that through Google too. But, as mentioned in the OP, I would rather not install a third-party app but instead learn how to do this myself. There has to be a way I can do this myself without installing or compiling anything. We can change the "open with" of any file by using the "Get Info" window, so we should be able to do the exact same thing with any URL without installing or compiling anything. I just need to learn how to do it.

yea like I mentioned you can just edit that `plist` file. Just add a new entry (or find the existing entry for the URL scheme you'd like to change) and set the correct `LSHandlerRoleAll` value to your preferred application.

More details here:
https://krypted.com/mac-security/lsregister-associating-file-types-in-mac-os-x/

It's pretty straight forward - the 3rd party app just makes things easier.
 
  • Like
Reactions: revmacian
yea like I mentioned you can just edit that `plist` file. Just add a new entry (or find the existing entry for the URL scheme you'd like to change) and set the correct `LSHandlerRoleAll` value to your preferred application.

More details here:
https://krypted.com/mac-security/lsregister-associating-file-types-in-mac-os-x/

It's pretty straight forward - the 3rd party app just makes things easier.
I don't believe that is the answer either. For instance, how does the system know to open an App Store URL in the App Store rather than open the URL in Safari as a web page? You can tweak an App Store URL so it opens in Safari as a web page. It's rather simple actually, just tweaking a URL instead of fiddling with a database. This is the same thing, I want to open an apple (dot) news URL in Safari rather than the News app.
 
Last edited:
I don't believe that is the answer either. For instance, how does the system know to open an App Store URL in the App Store rather than open the URL in Safari as a web page? You can tweak an App Store URL so it opens in Safari as a web page. It's rather simple actually, just tweaking a URL instead of fiddling with a database. This is the same thing, I want to open an apple (dot) news URL in Safari rather than the News app.

The system maintains a list of handlers for each URL scheme. That `plist` is just for most 3rd party apps.

You would have to write your own handler for `applenews://` scheme and programmatically replace it with `https://apple.news` (so it falls back to default `https` handler)

e.g.

applenews://AB6xvUvR6S5Onvii3TsuTWg?app=news&at=1000itu&ct=news_catchall&itscg=10703&itsct=news_catchall&linkId=78408223

https://apple.news/AB6xvUvR6S5Onvii...scg=10703&itsct=news_catchall&linkId=78408223

One thing to note is that news articles that are written exclusively for Apple News cannot be viewed in the browser (they won't have a redirect URL).
 
  • Like
Reactions: revmacian
The system maintains a list of handlers for each URL scheme. That `plist` is just for most 3rd party apps.

You would have to write your own handler for `applenews://` scheme and programmatically replace it with `https://apple.news` (so it falls back to default `https` handler)

e.g.

applenews://AB6xvUvR6S5Onvii3TsuTWg?app=news&at=1000itu&ct=news_catchall&itscg=10703&itsct=news_catchall&linkId=78408223

https://apple.news/AB6xvUvR6S5Onvii...scg=10703&itsct=news_catchall&linkId=78408223

One thing to note is that news articles that are written exclusively for Apple News cannot be viewed in the browser (they won't have a redirect URL).
I see what you mean. This seems like a lot of work for little gain. I think I’ll just blacklist Apple news articles, since they won’t open anyway because I deleted their silly unnecessary app.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.