getditto / samples

Sample Codes using Ditto
14 stars 7 forks source link

Stop setting the persistence directory to .documentDirectory #154

Open nicolaskagami opened 3 months ago

nicolaskagami commented 3 months ago

Problem

As identified in the Expedition: Spont, the .documentDirectory (/Documents) in iOS is subject to iCloud sync which could be disastrous for multiple ditto instances for multiple reasons (cloning identities, changing metadata about replication sessions, etc).

We have sample code that does this, which may encourage customers to do the same.

Solution

Set the persistence directory to something else as default, such as .applicationSupportDirectory.

Slack discussion