multipeer-connectivity

Cannot invoke initializer for type UnsafePointer<_> with an argument list of type (UnsafeMutableRawPointer)

守給你的承諾、 提交于 2019-12-10 11:17:37
问题 When I write the output stream in multipeer connectivity from audio buffer data I got the error Cannot invoke initializer for type UnsafePointer<_> with an argument list of type (UnsafeMutableRawPointer) I found the many solutions, but this solution not helpful for me. My code is: func send(_ buffer: AudioBuffer) { print(buffer.mData!) print(buffer.mDataByteSize) outputStreme?.write(UnsafePointer(buffer.mData), maxLength: buffer.mDataByteSize) } Thanks in advance..:) 回答1: Please check the

Multipeer Connectivity with personal Hotspot not working

泪湿孤枕 提交于 2019-12-08 13:21:30
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 info: [String: String] ? ) { browser.invitePeer(peerID, to: mcSession, withContext: nil, timeout: 10) }

MultipeerConnectivity - MCNearbyServiceBrowser constantly finding disconnected peers

守給你的承諾、 提交于 2019-12-08 06:15:18
问题 I´m working with MultipeerConnectivity Apple framework. Connection, advertiser and browser seems to work very well until now but I notice that when my any session connects a peer an then it disconnects for any reason my MCNearbyServiceBrowser still finding that peer even if it doesn´t exist anymore. Obviously MCSession reports a not connected status with the peer. Does anyone has an idea of why this is happening? I have override the dealloc method in my mc handler class like this: - (void

Multipeer connectivity with one device having app running in background

 ̄綄美尐妖づ 提交于 2019-12-06 12:05:32
问题 I would like to connect 2 devices using multipeer connectivity framework where one of those devices is running the app in the background, just like Firechat does (I can't confirm this is working, I have installed it on an iPhone 5S and 4, but they just can't find each other - but I have read somewhere this works). What's the best way to achieve this? I'm using the following two methods from an example code: -(void)setupPeerAndSessionWithDisplayName:(NSString *)displayName{ _peerID = [

Cannot invoke initializer for type UnsafePointer<_> with an argument list of type (UnsafeMutableRawPointer)

大城市里の小女人 提交于 2019-12-06 09:29:01
When I write the output stream in multipeer connectivity from audio buffer data I got the error Cannot invoke initializer for type UnsafePointer<_> with an argument list of type (UnsafeMutableRawPointer) I found the many solutions, but this solution not helpful for me. My code is: func send(_ buffer: AudioBuffer) { print(buffer.mData!) print(buffer.mDataByteSize) outputStreme?.write(UnsafePointer(buffer.mData), maxLength: buffer.mDataByteSize) } Thanks in advance..:) Please check the official reference when some sort of spec changes has affected with your code. In your case AudioBuffer.mData

Multipeer Connectivity crash when inviting peer that stopped advertising

自闭症网瘾萝莉.ら 提交于 2019-12-06 06:29:15
问题 I have the following scenario: Peer A is waiting for invitations in a custom UI (let's call it WaitingVC ). The MCNearbyServiceAdvertiser object is initialized at application start, and the advertising starts ( startAdvertisingPeer ) when the WaitingVC is presented. Peer B has the MCNearbyServiceBrowser up and running, also with custom UI (that is, not using the Apple provided MCBrowserViewController ). Peer B finds Peer A ( browser:foundPeer:withDiscoveryInfo: is called). Meanwhile Peer A

iOS Multi peer connectivity showing same device name twice

ε祈祈猫儿з 提交于 2019-12-06 05:54:29
问题 I am using iOS 7 multi peer technology for connecting my iPad and iPod touch. But whenever iPod touch or iPad goes to sleep it gets disconnected which is fine because multi peer dont work in background mode, but when i discover again it shows iPods name twice in the MCBrowserViewController list. Tried this with every sample code and every code has same issue any one know how to fix this bug. Also there is one weird issue with MCBrowserViewController if i connect a device and other device

iOS: Use WiFi and Mobile Data simultaneously

折月煮酒 提交于 2019-12-06 02:49:48
问题 Setup: My project involves a WiFi Camera which creates a WiFi hotspot. In order to stream video preview/browse media on the Camera, the user needs to connect to Camera's hotspot. Problem: The user cannot use the cellular data over 3G/4G simultaneously, as the iOS device is already connected to the camera via WiFi. What I have tried? / Investigations Customizing WiFi hotspot by setting Static IP, Subnet Mask and leaving all other fields empty. This works as expected, iOS connects to the

IOS7 Multipeer Connectivity Creating custom nearby browser list using advertiser's discovery Info

拥有回忆 提交于 2019-12-05 00:02:37
问题 I'm using Multipeer Connectivity Framework in IOS7 to make a chatting application. And I'm using the built-in MCBrowserViewController to display a list of nearby peers. I'd like to include the advertiser's profile info in the nearby peer list. So that browsers see a list that contains and image and some data about the nearby peers. I think it can be accomplished by passing data through discoveryInfo when the advertiser is initialized. I pass the discoveryInfo data in like this: // create

multipeer connectivity test on iphone and a simulator simultaneously

戏子无情 提交于 2019-12-04 17:49:28
问题 Hello I was searching in all topics of the forum about how can i test an app which uses multipeer connectivity framework. Can someone tell me how can i test an app by using an iPhone device and a simulator simultaneously, player one for device and player two on the simulator and vice versa. I already test the app by using two simulators one per mac - user on a mac and its working but it is not convenient to continuously switch users to test an app. I tried all the alternatives, running once