Ordinarily, it is not required to explicitly register an application with Launch Services -- this is done automatically on system boot, on new user login, and whenever Finder becomes aware of a new application. However, because our application autoupdates itself in a unique way, I think sometimes Launch Services doesn't learn about the new update quickly enough. This PR adds a call to LSRegisterURL to manually perform this registration.
It is acceptable to have multiple app bundle paths registered for the same app in Launch Services. Per the documentation, Launch Services should choose the registered application with the latest version. This is pretty good for our use case, at least for now. However, this doesn't appear to work with development versions the way we expect, and wouldn't necessarily cover the use case where we want to roll back to an earlier version -- so we will probably, at some point, want to unregister older app bundles too.
Ordinarily, it is not required to explicitly register an application with Launch Services -- this is done automatically on system boot, on new user login, and whenever Finder becomes aware of a new application. However, because our application autoupdates itself in a unique way, I think sometimes Launch Services doesn't learn about the new update quickly enough. This PR adds a call to LSRegisterURL to manually perform this registration.
It is acceptable to have multiple app bundle paths registered for the same app in Launch Services. Per the documentation, Launch Services should choose the registered application with the latest version. This is pretty good for our use case, at least for now. However, this doesn't appear to work with development versions the way we expect, and wouldn't necessarily cover the use case where we want to roll back to an earlier version -- so we will probably, at some point, want to unregister older app bundles too.
Useful sections in the Launch Services documentation:
Application Registration
Preferred Application for a URL
This relates to previous universal link support work: https://github.com/kolide/launcher/pull/1727.