连接外部配件后启动特定的应用程序 [英] Launch specific app when external accessory attached

查看:81
本文介绍了连接外部配件后启动特定的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看过有关Apple的文档,并且据我所知向Info.plist添加了正确的协议后,它应该启动相应的应用程序?

能够与外部附件通信的应用程序应在其Info.plist文件中声明其支持的协议.声明对特定协议的支持可使系统知道在连接该附件时可以启动您的应用程序.如果没有应用程序支持所连接的附件,则系统可以选择启动App Store并指出支持该功能的应用程序.

我已完成此操作,但插入附件后没有任何反应.否则,该应用程序可与附件配合使用.

我知道这是可能的,因为我看过其他配件可以做到这一点,但无法弄清楚自己做错了什么或缺少了什么.任何帮助将不胜感激.

谢谢.

解决方案

要使应用在启动时启动,您应该首先在硬件中使用RequestApplicationLaunch.请参阅Apple的MFi附件固件规范R42第183页.

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.

解决方案

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.

这篇关于连接外部配件后启动特定的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆