diff --git a/app_builder/lib/app_builder/macos.ex b/app_builder/lib/app_builder/macos.ex
index 2c4976887..be6c2e8a4 100644
--- a/app_builder/lib/app_builder/macos.ex
+++ b/app_builder/lib/app_builder/macos.ex
@@ -98,7 +98,8 @@ defmodule AppBuilder.MacOS do
:info_plist,
:url_schemes,
:document_types,
- :additional_paths
+ :additional_paths,
+ :is_agent_app
])
app_name = Keyword.fetch!(options, :name)
@@ -301,7 +302,11 @@ defmodule AppBuilder.MacOS do
<% end %>
-
+ <%= if options[:is_agent_app] do %>
+ LSUIElement
+
+ <% end %>
+
"""
diff --git a/mix.exs b/mix.exs
index 73435dbde..075d1cb29 100644
--- a/mix.exs
+++ b/mix.exs
@@ -192,12 +192,18 @@ defmodule Livebook.MixProject do
]
defp build_mac_app(release) do
- AppBuilder.build_mac_app(release, @app_options)
+ options =
+ [
+ is_agent_app: true
+ ] ++ @app_options
+
+ AppBuilder.build_mac_app(release, options)
end
defp build_mac_app_dmg(release) do
options =
[
+ is_agent_app: true,
codesign: [
identity: System.fetch_env!("CODESIGN_IDENTITY")
],