请问,如何在我的代码中指定外部附件使用的协议?在我的 info.plist 文件中,我输入了密钥,但我不知道我必须在项目中输入什么。谢谢
问问题
1627 次
2 回答
2
Examine the protocolStrings
property of the EAAccessory
object when you receive a EAAccessoryDidConnect
notification. Those are the protocols you should put in your info.plist file, under the key UISupportedExternalAccessoryProtocols
For example,
<key>UISupportedExternalAccessoryProtocols</key>
<array>
<string>PROTOCOL_NAME_HERE</string>
<string>PROTOCOL_NAME_HERE</string>
</array>
If you're unsure about how to implement the EAAccessoryDelegate
protocol to obtain what I describe above, have a look at EADemo
sample from Apple
于 2013-06-21T13:42:21.977 回答
1
大多数时候,您从硬件制造商处获得协议名称。
例如,如果您使用 Pebble watch 开发 iOS 应用程序,则该值将为“com.getpebble.public”
于 2016-04-26T21:52:57.417 回答