连接外部配件时启动特定应用程序
我查看了有关此的 Apple 文档,根据我的理解,在将正确的协议添加到 Info.plist 后,它似乎应该启动相应的应用程序?
能够与外部附件通信的应用程序应在 Info.plist 文件中声明它们支持的协议。声明对特定协议的支持可以让系统知道在连接该附件时可以启动您的应用程序。如果没有应用程序支持所连接的配件,系统可能会选择启动 App Store 并指出支持的应用程序。
我已经这样做了,但是当我插入配件时没有任何反应。否则该应用程序与配件配合得很好。
我知道这是可能的,因为我见过其他配件可以做到这一点,但无法弄清楚我做错了什么或缺少什么。任何帮助将不胜感激。
谢谢。
I've looked at the Apple docs on this and it seems after adding the correct protocol to the Info.plist from my understanding it should launch the corresponding app?
Applications that are able to communicate with an external accessory should declare the ?protocols they support in their Info.plist file. Declaring support for specific protocols lets the system know that your application can be launched when that accessory is connected. If no application supports the connected accessory, the system may choose to launch the App Store and point out applications that do.
I've done this but nothing happens when I plug the accessory in. The app works great with the accessory otherwise.
I know this is possible, because I've seen other accessories that do it, but can't figure out what I'm doing wrong or what I'm missing. Any help would be greatly appreciated.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要使应用程序在启动时启动,您应该首先在硬件中请求ApplicationLaunch。请参阅苹果的MFi配件固件规范R42第183页。
to make the app launch at start,you should first RequestApplicationLaunch in your hardware.Pls refer to apple's MFi Accessory Firmware Specification R42 page 183.