简体   繁体   English

iOS外部配件框架,用于使用蓝牙连接iPod

[英]iOS External accessories framework to connect iPod using bluetooth

I am using EADemo from apple 我正在使用Apple的EADemo

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

This is basically External Accessories framework demo code 这基本上是外部附件框架的演示代码

My info.plist have 我的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>

在此处输入图片说明 When I run this code 当我运行这段代码

_eaSessionController = [EADSessionController sharedController];
_accessoryList = [[NSMutableArray alloc] initWithArray:[[EAAccessoryManager sharedAccessoryManager] connectedAccessories]];

    if ([_accessoryList count] == 0) {
        [_noExternalAccessoriesPosterView setHidden:NO];
    } else {
        [_noExternalAccessoriesPosterView setHidden:YES];
    }

The count is always 0. I have paired a Mac Mini and an iPod with the device I am using and I believe these two are MFi complaint obviously. 该计数始终为0。我已将Mac Mini和iPod与正在使用的设备配对,我相信这两个显然是MFi投诉。

What am I missing ? 我想念什么? can anybody help please ? 有人可以帮忙吗?

Okay After a huge research I found this. 好吧,经过大量研究,我发现了这一点。 First of all apple does not take an iPod connected through cable or Bluetooth as an accessory. 首先,苹果不带通过电缆或蓝牙连接的iPod作为附件。

Next if any accessories connected through, it will show but you cant communicate with it if it is not under apple's MFi (Made for iOS) licence program and it is induced from iOS 10. Now how do you know the protocol string if the device is under MFi already. 接下来,如果连接了任何附件,它将显示,但如果它不在Apple的MFi(适用于iOS的Made)许可计划下,并且无法从iOS 10导出,则无法与之通信。现在,您如何知道设备使用的协议字符串在MFi下。 Here you need to contact the vendor or manufacturer to get the protocol string as it is sensitive data. 在这里,您需要联系供应商或制造商以获取协议字符串,因为它是敏感数据。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 iOS EAAccessory框架:唤醒以前配对的不自动连接的配件 - iOS EAAccessory framework: waking previously paired accessories that do not automatically connect 在iOS的背景中连续显示“打开蓝牙以允许应用程序连接到附件”警报消息 - Continuously Showing “Turn on Bluetooth to allow app to connect to accessories” alert message in background in ios iOS如何命名外部附件协议字符串 - iOS How to name External Accessories protocol string 检查 iOS 中的外部附件是否可以启动 EASession - Checking if external accessories in iOS can start an EASession AudioKit 在 IOS 上连接外部蓝牙麦克风 - AudioKit connect External Bluetooth mic on IOS 如何自定义文本“打开蓝牙以允许…连接至附件” - How can I customize the text “Turn On Bluetooth to Allow … to Connect to Accessories” CLBeaconRegion,如何关闭警告:打开蓝牙以允许*连接到附件 - CLBeaconRegion, how to turn off warning: Turn On Bluetooth to Allow * to Connect to Accessories 在xCode / Swift中,修改字符串“打开蓝牙以允许[app]连接到附件” - in xCode/Swift, modify string “turn on Bluetooth to Allow [app] to Connect to Accessories” 如何在IOS中打印出当前连接的蓝牙附件的列表 - How to print out a list of currently connected bluetooth accessories in IOS 使用外部附件和MFi时,iOS连接/重新连接到蓝牙设备 - iOS connect/reconnect to Bluetooth device when using external-accessory and MFi
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM