3

I'm looking for a way to let users share data (word pairs) with other users of the same app. This means that my app should be able to send the data via Bluetooth/airdrop or a similar method to the same app on another device.

I have done some research and encountered a lot of information about sharing data between different apps on the same device and on using a UIActivityViewController to share data in general, but I'm actually looking for a way for the user to click a share button, then popping up a list of nearby devices (like Airdrop devices), have the user select one and then have the app on the other person's device automatically open and display or use the sent data (after accepting the transfer of course).

I'm not quite familiar with iOS and Apple devices in general yet, but I do know that Apple limits things like communication between devices. Is there any way to replicate what I'm trying to achieve here?

Axel Köhler
  • 911
  • 1
  • 8
  • 34

2 Answers2

1

You can do this by using CoreBluetooth Framework

Its more like a client server communication named as central and peripheral,one of your device will act as Central and other as Peripheral and this peripheral will advertise (broadcast) and central will establish the connections to it and communicate to each other..

Refer apple doc on CoreBluetooth https://developer.apple.com/documentation/corebluetooth

Other Options

Multipeerconnectivity https://developer.apple.com/documentation/multipeerconnectivity

GameCenter https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/GameKit_Guide/Matchmaking/Matchmaking.html#//apple_ref/doc/uid/TP40008304-CH9-SW1

Anshad Rasheed
  • 2,526
  • 1
  • 14
  • 32
  • Could you please help me out with this related question? https://stackoverflow.com/questions/57018851/how-to-get-uuid-of-device-via-airdrop – bibscy Jul 13 '19 at 12:38
0

You can do that using Multipeer Connectivity framework https://www.appcoda.com/intro-ios-multipeer-connectivity-programming/

TheGhost
  • 159
  • 1
  • 6