Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

希望支持通知自定义操作按钮 / 后台 URL Action,用于远程审批场景

Open
#358 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
ios, swift
Domain
mobile

Research direction

No files, tests, or code entry points are named in the issue. Start by locating the iOS notification Action and background callback handling, then determine how push payloads are parsed and where security limits belong. Done should include configurable notification actions, callback behavior, and coverage for the supported foreground or background flow.

Written by the indexing model from the issue text.

Description

in progress

标题:希望支持通知自定义操作按钮 / 后台 URL Action,用于远程审批场景

你好,感谢 Bark 这个项目。

我想提一个功能建议:希望 Bark 能支持“通知自定义操作按钮”,也就是在发送推送时,可以通过参数为这条通知附带几个按钮,例如:

  • 允许
  • 拒绝
  • 稍后处理 / 打开 App 查看

点击按钮后,Bark 可以在后台请求一个指定的 URL,例如:

{
  "title": "需要审批",
  "body": "Agent 想执行一个危险操作:git push --force",
  "actions": [
    {
      "label": "允许",
      "url": "https://example.com/callback?id=xxx&decision=allow",
      "method": "GET"
    },
    {
      "label": "拒绝",
      "url": "https://example.com/callback?id=xxx&decision=deny",
      "method": "GET"
    }
  ]
}

我的使用场景是:一些本地 AI Agent / 自动化工具在执行危险操作前,需要用户确认。目前 Bark 已经可以很好地把通知推送到 iPhone,但如果只能点开通知跳转 URL,交互链路还是有点长。希望可以直接在 iPhone 通知上点“允许 / 拒绝”,然后 Bark 在后台把结果回调给服务端。

这个需求主要是先针对 iPhone 通知本身的交互能力。因为如果未来想在 Apple Watch 上实现类似的审批体验,前提也是 iPhone 端的通知 Action 机制先支持起来;Apple Watch 通常会继承或展示 iPhone 通知的可操作按钮。所以我觉得可以先不把重点放在 watchOS App 适配上,而是先支持 iOS 通知的自定义 Action / callback 能力。

可能的实现方向:

  1. 发送推送时允许传入 actions 参数;
  2. 每个 action 包含 label、url、method 等字段;
  3. 用户点击通知按钮后,App 在后台请求对应 URL;
  4. 如果系统限制后台请求,也可以先支持前台打开 Bark 后再执行 callback;
  5. 为了安全,可以限制 action 数量、URL scheme,或者提供开关让用户手动启用该能力。

这个功能对于远程审批、CI/CD 确认、Home Assistant 场景、脚本自动化确认、AI Agent 危险操作确认等都很有用。

再次感谢维护这个项目,希望可以考虑一下这个能力。

Dominant language
Swift
Stars
9.3k
Forks
718
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Finb/Bark

All issues in Finb/Bark

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.