希望支持通知自定义操作按钮 / 后台 URL Action,用于远程审批场景
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
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
标题:希望支持通知自定义操作按钮 / 后台 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 能力。
可能的实现方向:
- 发送推送时允许传入
actions参数; - 每个 action 包含
label、url、method等字段; - 用户点击通知按钮后,App 在后台请求对应 URL;
- 如果系统限制后台请求,也可以先支持前台打开 Bark 后再执行 callback;
- 为了安全,可以限制 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Finb/Bark
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
希望增加支持非对称(公钥)加密推送Open
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
希望能在APP中自定义应用图标Open
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
希望增加AppleWatch的支持Open
Difficulty 5/5 Over a week Newbie friendliness 20/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
raullenchai/Rapid-MLX#4889 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
iOS-2026
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
mozilla-mobile/firefox-ios#36150 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
-
HTMLFormatter applies the wrong column alignment to table cells that follow a spanned cellPossibly taken @auraseb claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
swiftlang/swift-markdown#296 ·