The issue we were running into was "authorization denied" when the Watch was attempting to access Couchbase on the Phone while it was locked.
Our app is currently a WatchOS 1.0 app, so the architecture is a bit unintuitive. There is a proxy app on the phone that represents the watch app. We are using a mechanism that allows this proxy app to communicate directly with our iPhone app. The issue was cropping up when someone would access the Watch app while the main both the main iPhone app was out of memory and the Phone itself was locked. However, tentatively we may have come up with a fix. The combination of changing the CBLManagerOption.fileProtection to NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication as well as adding both the parent app and the watch proxy app to a single AppGroup seems to have resolved the issue. Frankly, I don't understand why using the AppGroup has fixed the issue, since it was the parent app the was launching Couchbase not the Watch, but somehow the Watch permissions must be transferring to the parent app in this instance. On Friday, September 11, 2015 at 7:13:43 PM UTC-7, Jens Alfke wrote: > > > > On Sep 11, 2015, at 5:20 PM, [email protected] <javascript:> wrote: > > > > For some reason, we are able to connect to Couchbase on the first > instance after installing the app while the phone is locked, but subsequent > attempts give the "authorization denied" message. > > Is this really the same issue? What is the exact NSError, or logged > warning, that you get? > > (Also, why would it matter if the phone is locked, since the app is > running on the watch? I'm assuming this is a WatchOS 2.0 app, right?) > > --Jens -- 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/b6b48224-f3a1-4fb8-ac9d-f544f2947dd6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
