Skip to content

How does tauri hide the icon at the bottom macOS dock bar? #6093

Answered by l3ve
ghost asked this question in Q&A
Discussion options

You must be logged in to vote

Try this

   app.set_activation_policy(ActivationPolicy::Accessory);

  /// Sets the activation policy for the application. It is set to `NSApplicationActivationPolicyRegular` by default.
  ///
  /// # Examples
  /// ```,no_run
  /// let mut app = tauri::Builder::default()
  ///   // on an actual app, remove the string argument
  ///   .build(tauri::generate_context!("test/fixture/src-tauri/tauri.conf.json"))
  ///   .expect("error while building tauri application");
  /// #[cfg(target_os = "macos")]
  /// app.set_activation_policy(tauri::ActivationPolicy::Accessory);
  /// app.run(|_app_handle, _event| {});
  /// ```

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by amrbashir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant
Converted from issue

This discussion was converted from issue #6086 on January 18, 2023 12:19.