multipeer-connectivity

Can I have a multipeer connectivity session run in the background?

放肆的年华 提交于 2019-11-27 07:00:33
问题 I have two apps which are successfully utilising multipeer connectivity to send messages. Currently, when the "server" app moves to the background, I tear down the session and re-establish when returning to the foreground. Now, I need to make the server app responsive (to received messages) while in the background. By being responsive, I mean can accept an incoming message, do the processing and return an acknowledgment to the peer - no UI required. When the App returns to the foreground, the

Reconnecting to disconnected peers

主宰稳场 提交于 2019-11-27 05:28:49
问题 I'm using the iOS 7 Multipeer framework in my app but I'm experiencing a problem with devices disconnecting. If I open the app in two devices: device A and device B the two devices connect to each other automatically. However, after several seconds device A disconnects from device B. i.e. At first the connection is like this: A ---> B A <--- B After several seconds: A ---> B A B Device A maintains it's connection but device B get's a MCSessionStateNotConnected. This means that A can send data

Why does my MCSession peer disconnect randomly?

依然范特西╮ 提交于 2019-11-27 03:01:28
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 disconnecting? Andrew Cone This is a bug, which I just reported to Apple. The docs claim the didReceiveCertificate

Does startAdvertisingPeer work when app enters background?

♀尐吖头ヾ 提交于 2019-11-27 02:59:44
问题 I'd like the app to advertise a service even when the app enters the background. With Core Bluetooth, this is possible by setting bluetooth-peripheral for UIBackgroundModes. Does anyone know if the same can be achieved with MCNearbyServiceAdvertiser? Thanks. 回答1: When I was at WWDC this year I went to a Developer Lab for Multipeer Connectivity and was told by an Apple engineer that no, service advertisers and browsers will not work in the background. That said, I've been successfully

Convert any Data Type into NSData and back again

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-27 02:48:42
问题 I'm working on an app where you can send either a text, image or a contact over Multipeer Connectivity to another device. It will then save in the second device's Core Data. What I do is send the data over as an NSDictionary and convert it back again. So I am left with an NSDictionary on the receiving device. How then, can I save the object for the key of @"objectData" to Core Data? I'd like it to work with NSString, UIImage & ABPerson. // Create a new object in the managed object context.

multipeer connectivity for video streaming between iphones [closed]

不羁岁月 提交于 2019-11-27 02:20:36
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year . i've been searching on this for some days now. I've found how to connect devices with the multipeer connectivity protocol (http://techmaster.vn/2013/09/multipeer-connectivity-quick-tutorial/) and i've manage to send text or images. What i want to do is to stream video and audio from

Is iOS 7 Multipeer Connectivity compatible with Android Wi-Fi Direct?

南笙酒味 提交于 2019-11-27 00:22:31
问题 I've been looking at iOS 7's new P2P networking framework, MultipeerConnectivity, and from the description, it seems to me that it uses a combination of some kind of Wi-Fi Direct technology and Bluetooth PANs. Is the Wi-Fi Direct technology in this framework compatible with Android's Wi-Fi Direct? Can this framework actually be used for cross-platform P2P networking? 回答1: The device is not found by either when advertising or browsing with MultipeerConnectivity. Tried on Galaxy Tab 2: 回答2:

Is there a way of getting a Mac's icon given its model number?

前提是你 提交于 2019-11-26 17:25:53
问题 I know you can get the current machine's icon from cocoa using the following code: NSImage *machineIcon = [NSImage imageNamed:NSImageNameComputer]; But is it possible to get the icon when given just a model number? Such as MacBookPro11,3 ? The reason I need this is because I'm using MultiPeer Connectivity to browse devices on the network that I'd like to connect to. But I want to display the icons from those devices in a customized browser view. I know that OS X has pretty much every icon for