I am trying to close, delete, and replace a database. iOS (only - Android and UWP work with same code) gives me a file in use message when I try to overwrite a database file even after closing it. I have stopped, and disposed the replicator and closed the database. The logs below seem to indicate that everything is closed successfully. Any thoughts?
2020-08-26 18:18:13.564573-0400 Redbook.Mobile.iOS[10049:573175] [53]| INFO) [Replicator] (WebSocketWrapper) [53] Closing socket normally due to request from LiteCore
Thread finished: #512020-08-26 18:18:13.565059-0400 Redbook.Mobile.iOS[10049:573175] [53]| INFO) [Network] {C4SocketImpl#13} Socket disconnected cleanly
2020-08-26 18:18:13.565337-0400 Redbook.Mobile.iOS[10049:573175] [53]| INFO) [Network] {C4SocketImpl#13} sent 268 bytes, rcvd 97, in 1.836 sec (146/sec, 53/sec)
2020-08-26 18:18:13.568847-0400 Redbook.Mobile.iOS[10049:573064] [14]| INFO) [Network] {Connection#9} Closed with WebSocket status 1000:
2020-08-26 18:18:13.569173-0400 Redbook.Mobile.iOS[10049:573070] [18]| INFO) [Replicator] {Repl#11} Connection closed with WebSocket status 1000: “” (state=3)
2020-08-26 18:18:13.569561-0400 Redbook.Mobile.iOS[10049:573064] [14]| INFO) [Replicator] {Puller#18} activityLevel=stopped: pendingResponseCount=0, _caughtUp=0, _pendingRevMessages=0, _activeIncomingRevs=0
2020-08-26 18:18:13.569935-0400 Redbook.Mobile.iOS[10049:573070] [18]| INFO) [Replicator] {Repl#11} activityLevel=busy: connectionState=0
2020-08-26 18:18:13.570293-0400 Redbook.Mobile.iOS[10049:573064] [14]| VERBOSE) [Replicator] {Puller#18} now stopped
2020-08-26 18:18:13.570907-0400 Redbook.Mobile.iOS[10049:573070] [18]| INFO) [Replicator] {Repl#11} pushStatus=stopped, pullStatus=stopped, progress=0/0
2020-08-26 18:18:13.571263-0400 Redbook.Mobile.iOS[10049:573070] [18]| INFO) [Replicator] {Repl#11} activityLevel=stopped: connectionState=0
2020-08-26 18:18:13.571703-0400 Redbook.Mobile.iOS[10049:573070] [18]| INFO) [Replicator] {Repl#11} now stopped
2020-08-26 18:18:13.572075-0400 Redbook.Mobile.iOS[10049:573070] [18]| INFO) [Replicator] BLIP sent 2 msgs (246 bytes), rcvd 0 msgs (89 bytes) in 1.843 sec. Max outbox depth was 1, avg 1.00Thread finished: #50
2020-08-26 18:18:13.575036-0400 Redbook.Mobile.iOS[10049:573070] [18]| VERBOSE) [Database] {DB#7} Pre-close housekeeping: 0 of 19840 pages free (0%)
2020-08-26 18:18:13.575978-0400 Redbook.Mobile.iOS[10049:573070] [18]| VERBOSE) [Database] {DB#7} Closed SQLite database
2020-08-26 18:18:13.576296-0400 Redbook.Mobile.iOS[10049:573070] [18]| INFO) [Database] {DB#7} Closing database
2020-08-26 18:18:13.664690-0400 Redbook.Mobile.iOS[10049:573058] [Thread Pool Worker]| VERBOSE) [Database] {DB#3} begin transaction
2020-08-26 18:18:13.665051-0400 Redbook.Mobile.iOS[10049:573078] [Thread Pool Worker]| VERBOSE) [Database] {DB#6} begin transaction
2020-08-26 18:18:13.666889-0400 Redbook.Mobile.iOS[10049:573058] [Thread Pool Worker]| VERBOSE) [Database] {DB#3} abort transaction
2020-08-26 18:18:13.667549-0400 Redbook.Mobile.iOS[10049:573078] [Thread Pool Worker]| VERBOSE) [Database] {DB#6} abort transaction
2020-08-26 18:18:13.669593-0400 Redbook.Mobile.iOS[10049:573078] [Thread Pool Worker]| INFO) [Database] (Database) [Thread Pool Worker (11)] DB[/Users/brian/Library/Developer/CoreSimulator/Devices/88377BDC-6E4D-4DF2-87F8-591857908790/data/Containers/Data/Application/57ABBEE2-32AB-47CE-BA74-1D5BCA687708/Library/ebook/RedbookLog.cblite2/] purged 0 expired documents
2020-08-26 18:18:13.669844-0400 Redbook.Mobile.iOS[10049:573058] [Thread Pool Worker]| INFO) [Database] (Database) [Thread Pool Worker (6)] DB[/Users/brian/Library/Developer/CoreSimulator/Devices/88377BDC-6E4D-4DF2-87F8-591857908790/data/Containers/Data/Application/57ABBEE2-32AB-47CE-BA74-1D5BCA687708/Library/ebook/RedbookCore.cblite2/] purged 0 expired documents
2020-08-26 18:18:13.671249-0400 Redbook.Mobile.iOS[10049:573058] [Thread Pool Worker]| VERBOSE) [Database] {DB#3} Next expiration time is 0
2020-08-26 18:18:13.671671-0400 Redbook.Mobile.iOS[10049:573058] [Thread Pool Worker]| INFO) [Database] (Database) [Thread Pool Worker (6)] No pending doc expirations
2020-08-26 18:18:13.672223-0400 Redbook.Mobile.iOS[10049:573078] [Thread Pool Worker]| VERBOSE) [Database] {DB#6} Next expiration time is 0
2020-08-26 18:18:13.672917-0400 Redbook.Mobile.iOS[10049:573078] [Thread Pool Worker]| INFO) [Database] (Database) [Thread Pool Worker (11)] No pending doc expirations
2020-08-26 18:18:18.630965-0400 Redbook.Mobile.iOS[10049:572981] Xamarin.iOS: Processing: ‘exit process’