Launch specific app when external accessory attached

和自甴很熟 提交于 2019-12-24 01:09:35

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/5975775/launch-specific-app-when-external-accessory-attached

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!