首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用蓝牙连接iPod的iOS外部附件框架

使用蓝牙连接iPod的iOS外部附件框架
EN

Stack Overflow用户
提问于 2017-11-01 20:46:21
回答 1查看 316关注 0票数 0

我使用的是苹果公司的EADemo

https://developer.apple.com/library/content/samplecode/EADemo/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010079-Intro-DontLinkElementID_2

这基本上是外部附件框架演示代码

我的info.plist有

代码语言:javascript
复制
<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>

当我运行以下代码时

代码语言:javascript
复制
_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的问题。

我错过了什么?有谁能帮帮忙吗?

EN

回答 1

Stack Overflow用户

发布于 2017-11-06 16:59:43

好吧,经过大量的研究,我发现了这个。首先,苹果不会将通过电缆或蓝牙连接的iPod作为附件。

接下来,如果通过任何附件连接,它将显示,但如果它不是苹果的MFi (为iOS制造)许可计划,它是从iOS 10诱导的,你无法与它通信。现在,如果设备已经在MFi下,你如何知道协议字符串。这里您需要联系供应商或制造商来获取协议字符串,因为它是敏感数据。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/47055214

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档