multipeer-connectivity

Multipeer Connectivity with personal Hotspot not working

大憨熊 提交于 2019-12-23 02:51:05
问题 I am working with Multipeer connectivity. It works fine when all devices are connected to same wifi. I have 1 master and 5 slaves devices . I want to do connectivity with personal hotspot but everytime the connection will declined. This is my code : class SessionManager: NSObject, MCSessionDelegate, MCBrowserViewControllerDelegate, MCNearbyServiceAdvertiserDelegate, MCNearbyServiceBrowserDelegate { func browser(_ browser: MCNearbyServiceBrowser, foundPeer peerID: MCPeerID, withDiscoveryInfo

iOS Wifi-Direct Communication

强颜欢笑 提交于 2019-12-21 23:17:58
问题 I'm wondering if there's a way for two iPhones to communicate with Wifi-Direct Exclusively. (No Bluetooth, No Servers, Just Wifi-Direct) Correct me if I'm wrong, but MultiPeerConnectivity, GameKit, and CFNetServices don't allow using exclusively Wifi-Direct. If they do can someone show me an example? Thanks for your time! 回答1: The Multipeer Connectivity framework does not support Wi-Fi Direct but it does support direct ad-hoc connections between two iOS devices using a proprietary Apple

Multipeer Connectivity framework for up to 45 devices

邮差的信 提交于 2019-12-21 07:50:14
问题 I hope to use the Multipeer Connectivity framework, and would appreciate any voices of experience on how best to proceed. I need a connection between a "coach" device and up to 45 "player" devices. They will all be in the same space, but no way to predict wifi availability or connection. The coach device needs to send an instruction (a small data packet) to all player devices each second. Each "player" needs to send a reading from a Bluetooth Heartrate monitor (very small data packet) back to

Connect Browser & Advertiser without showing alert message in Multipeer connectivity

半腔热情 提交于 2019-12-21 05:41:15
问题 Currently i am exploring the multipeer connectivity framework.I have 2 option in my application Advertiser & Browser. So when user fire up the browser on one device, and the advertiser on another then they should be able to find each other. When the device appears in the browser, and the user taps on it, then the user with the advertising device will be presented with an alert allowing them to choose whether or not to make the connection. But i want when browser taps any particular advertiser

Disconnect individual peers from MCSession?

若如初见. 提交于 2019-12-20 01:48:08
问题 If I have an array of connected peers, let's say 3 (a->b, a->c, a->d) and I want to disconnect peer "c" only, what should I be doing? I've seen one response to a similar question state that you can only disconnect 'yourself' from a session: meaning that in the above scenario if I do this: [mySession disconnect]; that I all be disconnecting "a" from "b", "c" and "d" simultaneously. So the suggestion was to send a notification to the peer you want disconnected ("c") and tell it to disconnect

iOS8 AVAudioEngine how to send microphone data over Multipeer Connectivity?

爱⌒轻易说出口 提交于 2019-12-19 03:22:29
问题 I want to send microphone audio data over Multipeer Connectivity (iOS 8) and play it through the speaker of the receiving peer. I've also setup the AVAudioEngine and I can hear the microphone data from the (upper) speaker output, but I don't know how to send AVAudioPCMBuffer over the network. Here's my code snippet: AVAudioInputNode *inputNode =[self.engine inputNode]; AVAudioMixerNode *mainMixer = [self.engine mainMixerNode]; [self.engine connect:inputNode to:mainMixer format:[inputNode

Peer to peer android and iOS with Wifi direct (multipeer connectivity?)

微笑、不失礼 提交于 2019-12-17 17:32:16
问题 Well I'm working on this app to send data between android and iOS and I got it to work between iOS devices with Apple's Multipeer Connectivity framework, but I am currently wondering how do you achieve it between both platforms? even if you are willing to write it from scratch. How come Firechat is able to do it? As I remember, you can exchange data between both platforms with their app. Edit: https://www.opengarden.com/meshkit.html It seems the MeshKit SDK used in Firechat is now available

Why does my MCSession peer disconnect randomly?

萝らか妹 提交于 2019-12-17 07:05:59
问题 Im using MCNearbyServiceBrowser and MCNearbyServiceAdvertiser to join two peers to a MCSession. I am able to send data between them using MCSession's sendData method. All seems to be working as expected until I randomly (and not due to any event I control) receive a MCSessionStateNotConnected via the session's MCSessionDelegate didChangeState handler. Additionally, the MCSession's connectedPeers array no longer has my peers. Two questions: Why? and How do i keep the MCSession from

Swift 3 - Passing Variables and Functions Between View Controllers

风流意气都作罢 提交于 2019-12-13 06:48:24
问题 I am currently making a test app where you can draw and send pictures using multipeer connectivity. There is a connection view controller for the host and a separate one for the other peers. When peers have connected the host will play the game and all the peer's view controllers will go to the drawing VC proving they are connected. However, when I want to send data in the drawing VC, the console says the connected peers the session is 0 even though there are connected peers. I can test that

Disable connection alert (Multipeer connectivity)

独自空忆成欢 提交于 2019-12-13 04:22:38
问题 Since iOS 7.1 Apple removed: - (void)advertiser:(MCNearbyServiceAdvertiser *)advertiser didReceiveInvitationFromPeer:(MCPeerID *)peerID withContext:(NSData *)context invitationHandler:(void(^)(BOOL accept, MCSession *session))invitationHandler and added: - (void)advertiserAssitantWillPresentInvitation:(MCAdvertiserAssistant *)advertiserAssistant; - (void)advertiserAssistantDidDismissInvitation:(MCAdvertiserAssistant *)advertiserAssistant; Is there any ability not to show this message? 回答1: