两个应用程序可以同时运行在相同的iDevice通过蓝牙通信? [英] Can Two Apps Running Simultaneously On The Same iDevice Communicate through Bluetooth?

查看:168
本文介绍了两个应用程序可以同时运行在相同的iDevice通过蓝牙通信?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题是这样的标题描述。

Question is as title describes.

我有两个应用,一是CBPeripheralDelegate和一个CBCentralManagerDelegate。外围发布时,它是在前台(我想,我没有别的BTLE设备进行测试),但如果我运行在手机上的前景和背景中的外围中央应用程序,既不似乎看到了其他

I have two apps, one CBPeripheralDelegate and one CBCentralManagerDelegate. The peripheral advertises when it is in the foreground (I think, I have no other BTLE devices to test it), but if I run the Central app in the foreground on the phone and the peripheral in the background, neither seems to see the other.

我已经启用UIBackgroundModes:蓝牙外设在外设的info.plist按的<一个href=\"https://developer.apple.com/library/ios/documentation/NetworkingInternetWeb/Conceptual/CoreBluetooth_concepts/CoreBluetoothBackgroundProcessingForIOSApps/PerformingTasksWhileYourAppIsInTheBackground.html\"相对=nofollow>为CoreBluetooth后台执行文档。

I have enabled UIBackgroundModes:bluetooth-peripheral in the peripherals info.plist as per the documentation for CoreBluetooth background execution.

我发现有几个人试图在背景上做广告这里,但没有在同一设备上的应用程序。

I've found a few people trying to advertise in the background on here, but none to an app on the same device.

我们先来说说我的问题的缘故,我的code完美的作品......可以蓝牙信号'环'回到原来的iPhone?

Let's say for the sake of my question that my code works perfectly... Can the bluetooth signal be 'looped' back into the same iPhone?

推荐答案

在短,没有它做不到。

虽然两种不同的应用程序可以被广告和搜索为自己服务,在一天结束时,他们仍然访问相同的芯片组。苹果刚刚口罩了所有的相关细节,以简化蓝牙开发。

Although two different apps may be advertising and searching for their own services, at the end of the day they are still accessing the same chipset. Apple just masks away all the gritty details to streamline bluetooth dev.

浏览围绕以下链接,如果你想打入一些比较底层的细节涉及的蓝牙核心系统架构

Browse around the following link, if you want to break into some of the more underlying details involving Bluetooth Core System Architecture

这篇关于两个应用程序可以同时运行在相同的iDevice通过蓝牙通信?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆