CBLManagerOptions options = {NO, NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication};
NSError* error;
manager = [[CBLManager alloc] initWithDirectory: [CBLManager defaultDirectory]
options: &options error: &error];
On Nov 7, 2016, at 2:04 AM, Nick Pomfret <npom...@gmail.com> wrote:I understand that iOS will suspend and may eventually kill apps that are suspended. After which it will re-start them should something like a push notification arrive. I've noticed that couchbase lite does not always start happily under these conditions and the only response I can get back from the rest API is a `database error` with a 500 status code - with no error message at all.
--
You received this message because you are subscribed to a topic in the Google Groups "Couchbase Mobile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mobile-couchbase/gyuXLuUGLlM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mobile-couchbase+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/B1CCFC93-AD04-4592-A036-294F4C7CF20A%40couchbase.com.
On Nov 12, 2016, at 1:40 AM, Nick Pomfret <npom...@snowmonkey.co.uk> wrote:My theory was that databases created before I made the change suffered from the problem. And when they delete the app they delete the database and the new database gets created with the new code that uses NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication.
CBLManagerOptions options = {NO, NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication};
manager = [[CBLManager alloc] initWithDirectory: dir options: &options error: &error];
--
You received this message because you are subscribed to a topic in the Google Groups "Couchbase Mobile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mobile-couchbase/gyuXLuUGLlM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mobile-couchbase+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/3F2734A8-BCAC-4741-8E70-E40327D9CEA6%40couchbase.com.
On Nov 21, 2016, at 2:01 PM, Nick Pomfret <npom...@snowmonkey.co.uk> wrote:So in conclusion: if you want a CBL iOS app to work in the background (for things like background-fetch and push notifications), I believe that when the app is first installed you need to create the CBLManager using the NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication option:
--
You received this message because you are subscribed to a topic in the Google Groups "Couchbase Mobile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mobile-couchbase/gyuXLuUGLlM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mobile-couchba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/7B2FF7C6-6E44-4D04-BD46-3E381868359E%40couchbase.com.
On Nov 21, 2016, at 9:57 PM, Nick Pomfret <npom...@snowmonkey.co.uk> wrote:What's a background session?
When a push notification arrives what typically happens is the app gets started from scratch by the OS because it previously got suspended.
During start up the first thing the app does is a db query (it doesn't start replication until a bit after). It's that first query that fails with a 500 error and so my app won't start.
Very difficult to reproduce because there doesn't seem to be a way to reliably get the OS to suspend the backgrounded app.
[[UIApplication sharedApplication] beginBackgroundTaskWithName:taskName expirationHandler:^{
--
You received this message because you are subscribed to a topic in the Google Groups "Couchbase Mobile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mobile-couchbase/gyuXLuUGLlM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mobile-couchbase+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/485A7E21-E24E-48B2-8022-A7CA3FE4A6BF%40couchbase.com.