Menu

Moving a notes library between iPhones without a server or iCloud
📰

Moving a notes library between iPhones without a server or iCloud

DEV Community: ios·Michael Lynx·4 days ago
#z5eIhsoD
#devtoios#devto#dev#document#library
Reading 0:00
15s threshold

I work on Diple, a Markdown writing app with a local document library. This article looks at one part of its implementation: moving that library between devices.

The transfer needs to preserve more than text files. Documents can have local images, notes and version history. Folders and Collections also carry relationships that need to survive the move.

Here are the protocol and import decisions in the current design, including the limits of its duplicate handling.

Separate the connection from the transfer

The existing transport uses Multipeer Connectivity. Both devices advertise and browse for the same service, and the user selects a peer and confirms the connection.

The session is configured to require encryption:

let session = MCSession ( peer : peerID , securityIdentity : nil , encryptionPreference : . required )

Enter fullscreen mode

Exit fullscreen mode

That configuration does not replace peer selection or user consent.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.