0

The only offering for p2p support on iOS that I’m aware of is the MultipeerConnectivity framework. Based on its documentation, it only seems to support nearby devices (ref: https://developer.apple.com/documentation/multipeerconnectivity).

Now, by “truly decentralised”, I mean no use of a backend whatsoever.

Perhaps there’s something I might be missing. If wallet apps are indeed, truly decentralised, how do they achieve this?

2 Answers 2

1

From what I can tell, BRD or "Bread" wallet on iOS uses the P2P network directly to connect to bitcoin nodes. This makes it as decentralized as any other bitcoin node. To achieve that, they use walletkit (https://github.com/blockset-corp/walletkit/), an SPV client in C/Swift.

1
  • This is cool to know, however overall iOS I think is the non-decentralized common denominator regardless of the application.
    – Poseidon
    Commented Jan 14, 2023 at 2:16
0

An iOS app does not need to use any multiple connection framework provided by the iOS SDK at all. Apple does not need to have any API to support this since it can be done with threading and the normal network connection API.

An iOS app developer can use the standard Network connection framework in order to open a TCP connection to whatever nodes they want to. They can connect to multiple nodes by creating a thread for each node and each thread uses the Network connection framework to establish the connection. In this way, there is no need for anything like MultiPeerConnectivity or any special framework for connecting to multiple network targets.

2
  • If that makes it “decentralized” or not is another matter though.
    – Claris
    Commented Mar 25, 2019 at 3:11
  • @AndrewChow Thanks for that. Could you point me to a sample code snippet that makes use of the network connection API to send data to an IP/Port? I tried looking but couldn’t find any, only found the API reference.
    – AjLearning
    Commented Mar 25, 2019 at 13:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.