V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
l453798303
V2EX  ›  iPhone

关于有没有第三方手环/手表能否获取 iOS 的专注状态

  •  
  •   l453798303 · Aug 15, 2023 · 11551 views
    This topic created in 990 days ago, the information mentioned may be changed or developed.

    主要是为了看看通知,来电提醒使用。

    但是貌似第三方无法正确获取 iOS 的专注状态。

    尤其是午休,或者晚上提前睡觉的时候,手机打开了勿扰,但是手表推送依旧,吵醒了就很烦。

    是不是苹果没用开放相关 API 供三方使用?

    1 replies    2023-08-16 01:41:02 +08:00
    Pazakui1259
        1
    Pazakui1259  
       Aug 16, 2023
    专注模式是有 API 供 app 使用的: https://developer.apple.com/documentation/appintents/focus/

    但是第三方手环手表都是直接支持 iOS 的 Apple Notification Center Service ,因为 app 没权限读取通知,通知都是只能接入系统的 ANCS 由 iOS 统一推送给蓝牙设备,但蓝牙设备目前没 API 读取专注模式(要是有也会难实现过滤吧),系统 ANCS 也会忽略专注模式把所有通知全部推送给蓝牙设备,所以做不到过滤。https://developer.apple.com/library/archive/documentation/CoreBluetooth/Reference/AppleNotificationCenterServiceSpecification/Specification/Specification.html
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   933 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 23:27 · PVG 07:27 · LAX 16:27 · JFK 19:27
    ♥ Do have faith in what you're doing.