What is the proper way to install a pre-built database

Ok, I think I got it to work now by using this code:

// Borrow this functionality from Couchbase Lite
var dftFolder = Service.GetInstance<IDefaultDirectoryResolver>().DefaultDirectory();
var tmpFolder = Path.Combine(dftFolder, "tmp");
await seedService.CopyDatabaseAsync(tmpFolder);
Database.Copy(Path.Combine(tmpFolder, "angler.cblite2"), "angler", options);

I think the issue I had was that I did not have the full path to the directory to copy from entirely right.

However, the “copy” in “tmp” is not removed. As far as I understood from our discussions it should - so I guess I will have to clean it up manually to not have it taking up space…

One of the things I was hoping would disappear is a bunch of messages like this:

[DbDataStore]   Received ID: User:94D5A056E32C6065C1258499003EDFB2 (access removed)

These are probably related to the fact that the “User” type of documents have earlier been replicated to the app. As this was changed (in the sync formula in the sync .gateway) I took the database offline and ran a full resin on it. The database copy built for the “pre-built” package was then created after that.

Is there some extra “intermediate” steps I should have taken for the database not to know anything about some documents having been replicated in the past but not included anymore after it was created?

These tests were run on the iPhone simulator - if that makes any difference…