multipeer-connectivity

Working with MultipeerConnectivity in iOS swift

巧了我就是萌 提交于 2019-12-11 16:08:39
问题 I'm working with MultipeerConnectivity framework in iOS, followed a nice tutorial and it worked well. I have one question, I have two devices with wifi turned OFF but Bluetooth is ON, for the above approach to work, is it necessary for the two devices to be paired(via bluetooth, manually by the user in iOS settings)? Will it work even if the devices are not paired manually? If yes, do I need any special code setup or the above code will just work?(I have tried, for me It didn't work. Might be

Multi-peer connectivity without BrowserViewController UI

荒凉一梦 提交于 2019-12-11 13:34:45
问题 I am using Multi-peer connectivity framework and have tried Apple example it works fine, but I want to modify it and instead of using inbuilt browser view controller UI i want to do it with my own UI / code , is it possible to discover devices without the inbuilt UI ? Please help. 回答1: See my answer here. I think you'll find the answer there but the short of it is that it is possible. Here is a link to a post at NSHipster that will walk you through the work too. 来源: https://stackoverflow.com

WebRTC Adding remote stream to PeerConnection

柔情痞子 提交于 2019-12-11 05:23:59
问题 I'm working on WebRTC for Android. And successful create and establish Conference. Using single MediaStream and several PeerConnection. Now I want to find a better way, and one of them it's relay connection. My question is, crating relay as described on Chromium Report. And I supposed to do same thing, but there several issues. So lets start. Make a successful peer connection. (A -> B) Relay the remote media stream using another peer connection ( B -> C). The relayed media stream (A ->-> C)

When we are working with MCSessionState, didChangeState responds very slowly we could not find why

戏子无情 提交于 2019-12-11 05:17:32
问题 We are using following code to inform user about peer to peer connection state. But there is a problem " labelState.text = state.displayName " changes label text almost 10 seconds after " println ("State Changed to \(state.displayName) " is showed the state. Is there anyone faces the same problem. func session(session: MCSession!, peer peerID: MCPeerID!, didChangeState state: MCSessionState) { println("State Changed to \(peerID.displayName)") labelState.text = peerID.displayName } 回答1:

How do I detect a non-programmatic disconnection from the MCSession of the current device?

冷暖自知 提交于 2019-12-11 05:03:45
问题 To avoid being an XY problem, I will explain the situation first. I am developing a game in which multiple devices can connect with each other to have a multiplayer game. I am using Multipeer Connectivity for this. The game supports 2-4 players. Now I need to handle the case of a player disconnecting from all the other players. The game should still continue when a player disconnects, unless there is only one player left. However, I want an alert to be displayed to all the still-connected

Disable WiFi from Multi Peer Connectivity

余生颓废 提交于 2019-12-11 04:06:40
问题 I have gone over the documentation, but there isn't much information on Multipeer Connectivity related to choosing a possible medium for peers to connect. Multipeer Connectivity automatically discovers peers based on WiFi, or Bluetooth. Is there a way to limit this to only Bluetooth? 回答1: As @kdogisthebest correctly states, there's no way to force Multipeer Connectivity to use a particular network technology, but as your question relates to a particular problem with WiFi, this answer details

iOS13 - Detect if bluetooth is enabled without prompting bluetooth usage request

谁说我不能喝 提交于 2019-12-11 03:18:13
问题 In previous iOS versions you could detect if the user had bluetooth enabled or not without actually prompting the user's permission to access bluetooth. In iOS13, CBCentralManager now prompts bluetooth permission just to check if they have bluetooth turned on or not, regardless of if the app is actually going to use bluetooth directly. Our app uses Apple's multipeer connectivity framework to communicate between devices (peer to peer) which uses a combination of wifi and bluetooth, or just

Cannot connect through bluetooth in multipeer connectivity iOS 10

三世轮回 提交于 2019-12-11 03:06:15
问题 I have developed an application that communicates with nearby devices using multipeer connectivity framework in Swift 3 iOS10 SDK. It works as expected in iPads using only Bluetooth but it doesn't work in iPhones if wifi is set to off, and I want to use only Bluetooth. If it is the issue with IPv6 then how to enable it. Thanks, 回答1: The current consensus is this is a bug in iOS 10 (we're in the same boat, it just stopped working.) https://forums.developer.apple.com/thread/62306 From Apple via

Multipeer connectivity over Bluetooth?

混江龙づ霸主 提交于 2019-12-10 19:24:22
问题 I started to advertise, started to browse. When on the same WiFi, it works . But when I turn WiFi off, and leaving only Bluetooth , nor even the -(void)browser:(MCNearbyServiceBrowser*) browser foundPeer:(MCPeerID*) peerID withDiscoveryInfo:(NSDictionary*) info gets called. Do I have to indicate to advertise on Bluetooth explicitly somehow ? Or should it work this way seamlessly? With GameKit there was a setting for this. I can't find any similar in MC. 回答1: The same code will work. No need

Sending and Receiving an Invitation with Multipeer Connectivity

喜夏-厌秋 提交于 2019-12-10 19:06:19
问题 I know this question has been asked before, but I was just wondering why it isn't working in my particular case. I am trying to send an invitation from multipeer connectivity from one view controller and receive it on another. My code for sending it is: [self invitePeer:selectedPeerID toSession:self.mySession withContext:nil timeout:timeInterval ]; and method is just blank: - (void)invitePeer:(MCPeerID *)peerID toSession:(MCSession *)session withContext:(NSData *)context timeout: