I have a case when a user should to be able to log out of the application 
(local database should be deleted) and log in again using a different or 
the same account. When a user logs in I access the database using 
CBLManager.sharedManager() and set up replication.

So for the initial case everything works perfectly. When a user logs out, I 
call db.deleteDatabase() and close it. But then when a user logs back the 
database is not accessible unless the application is restarted. 
createQuery() method returns nils, attempts to insert something fails with 

*Foundation._GenericObjCError.NilError: file 
/Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-700.1.101.15/src/swift/stdlib/public/core/ErrorType.swift,
 
line 50*


I use Typhoon so the class that holds manager and database should be the 
same. I've tried to recreate the CBLDatabase object on re-login but it 
doesn't change anything.


What is a correct workflow to drop the database and then to recreate and 
reconnect to it?

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/9283c146-c37b-4b7a-ba17-5e06ddfc8ae6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to