我使用的是苹果公司的EADemo
这基本上是外部附件框架演示代码
我的info.plist有
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
<string>bluetooth-central</string>
<string>bluetooth-peripheral</string>
<string>external-accessory</string>
<string>fetch</string>
<string>location</string>
<string>newsstand-content</string>
<string>remote-notification</string>
</array>
<key>UISupportedExternalAccessoryProtocols</key>
<array>
<string>com.apple.p1</string>
<string>com.apple.p2</string>
</array>

当我运行以下代码时
_eaSessionController = [EADSessionController sharedController];
_accessoryList = [[NSMutableArray alloc] initWithArray:[[EAAccessoryManager sharedAccessoryManager] connectedAccessories]];
if ([_accessoryList count] == 0) {
[_noExternalAccessoriesPosterView setHidden:NO];
} else {
[_noExternalAccessoriesPosterView setHidden:YES];
}计数始终为0。我已经在我使用的设备上配了一台Mac Mini和一台iPod,我相信这两个显然是MFi的问题。
我错过了什么?有谁能帮帮忙吗?
发布于 2017-11-06 16:59:43
好吧,经过大量的研究,我发现了这个。首先,苹果不会将通过电缆或蓝牙连接的iPod作为附件。
接下来,如果通过任何附件连接,它将显示,但如果它不是苹果的MFi (为iOS制造)许可计划,它是从iOS 10诱导的,你无法与它通信。现在,如果设备已经在MFi下,你如何知道协议字符串。这里您需要联系供应商或制造商来获取协议字符串,因为它是敏感数据。
https://stackoverflow.com/questions/47055214
复制相似问题