iOS-在快捷方式选项时,连接到蓝牙外围设备不起作用。被禁用
在我的应用程序中,快捷方式的意图处理程序正在扫描蓝牙设备,并基于给定的选择,它连接到他们的设备并执行一些操作。
现在,一旦设置为禁用的选项“显示在运行时”,蓝牙CentralManager确实不再连接到任何外围设备,设备扫描仍在工作,而Siri运行的快捷方式也可以正常工作。 结果,自动化行不通,显然我不能将快捷方式用作锁屏上的小部件。
除了在完成快捷方式完成后提高用户通知外,有谁知道“运行时”选项还有什么?
这可能是丢失的许可问题吗?我已经在Info.plist上添加了“蓝牙访问”中所需的键,并在应用程序和快捷键目标上添加了蓝牙背景选项。
In my app the shortcut intent handler is scanning for Bluetooth devices and based of a given selection it connects to them devices and perform some actions.
Now as soon the option 'Show When Run' is set to disabled, the Bluetooth centralManager does no longer connect to any peripheral, device scanning is still working though and running the shortcut by Siri is working as well.
As a result, automation doesn't work and apparently I cannot use the shortcut as widget on lockscreen.
Does anyone know what else the 'Show When Run' option does, apart from raising a user notification after the shortcut completed?
Could this be a missing permission issue? I already added required keys on the info.plist for Bluetooth access and added Bluetooth background option on both app and shortcut targets.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可以通过完成对蓝牙外围设备完成的检查过程的检查来解决我的问题,并且如果成功或失败,则只能致电完成处理程序。
Could solve my issue by implementing a check if write process to bluetooth peripheral completed, and only call the completion handler if that was either successful or failed.