tauri-apps / tauri-apps/plugins-workspace

Use SMAppService to register the app to LoginItems instead of an AppleScript

Open
#2,720 4 comments 1 reaction 0 assignees View on GitHub
platform: macos plugin: autostart type: feature request
Dominant language
Rust
Stars
1.8k
Forks
602
Avg merge
4d 14h
Merged PRs (30d)
9

Description

At [Hopp](https://gethopp.app/), we want our app to start automatically on user login. Initially, we used the `autostart` plugin, which does the job but we thought that user experience can be improved.

In particular we found the two notifications the user receives slightly annoying.

![Image](https://github.com/user-attachments/assets/74d18898-60a4-4710-8e79-193cf8ff80ed)

![Image](https://github.com/user-attachments/assets/8d998d4b-4578-434a-92c4-3875a1bd320d)

We didn't like them because
* They are two instead of just one when using a native API.
* It isn’t entirely clear from the pop-ups which app is being added to the login items.

To address these, I decided to make [smappservice-rs](https://crates.io/crates/smappservice-rs), which is just a rust wrapper for macOS's `ServiceManagement` framework. When it is used instead of `auto-launch` it gives only one notification.

Would you consider accepting an enhancement to the `autostart` plugin that introduces a third option leveraging `smappservice-rs`?

I can also try extending `auto-launch` If you think that this change is more appropriate there. The reason I am first trying here is that `auto-launch` can be used to launch any app on start up, while `smappservice-rs` is for the running app only.

**Note:** I tested whether issue #2342 could be resolved using `smappservice-rs`, and it appears to work. Perhaps someone else could verify this as well.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.