Programmatic way to get full path to CBLDatabase instance file?

33 views
Skip to first unread message

Jeremy Kelley

unread,
Sep 9, 2015, 10:58:59 AM9/9/15
to mobile-c...@googlegroups.com
I see that on CBLManager, there is the directory property, but is there a way to get the full path to the corresponding database file (path/to/db.cblite2) without piecing it together?

My concern is that the extension could change, etc and I'd have an out of date constant sitting around.

Thanks,
Jeremy

Jeremy Kelley

unread,
Sep 9, 2015, 11:01:52 AM9/9/15
to mobile-c...@googlegroups.com
I apologize, I menat to the corresponding database "directory", not file.  -j

Jens Alfke

unread,
Sep 9, 2015, 11:30:24 AM9/9/15
to mobile-c...@googlegroups.com

On Sep 9, 2015, at 7:58 AM, Jeremy Kelley <jer...@33ad.org> wrote:

I see that on CBLManager, there is the directory property, but is there a way to get the full path to the corresponding database file (path/to/db.cblite2) without piecing it together?

There’s no public API for that. What’s the reason you need to know the path?

—Jens

Jeremy Kelley

unread,
Sep 9, 2015, 11:33:02 AM9/9/15
to mobile-c...@googlegroups.com
Apple is rejected an app update because the database (and some other files I was writing out for caching) is/are getting put into icloud for backup.

-j



--
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 mobile-couchba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/BCA82955-C805-4A2D-A0A6-A66BC8A573FC%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Jens Alfke

unread,
Sep 9, 2015, 11:35:05 AM9/9/15
to mobile-c...@googlegroups.com

On Sep 9, 2015, at 8:32 AM, Jeremy Kelley <jer...@33ad.org> wrote:

Apple is rejected an app update because the database (and some other files I was writing out for caching) is/are getting put into icloud for backup.

Set CBLManager.excludedFromBackup to YES.

—Jens

Jeremy Kelley

unread,
Sep 9, 2015, 11:46:24 AM9/9/15
to mobile-c...@googlegroups.com

--
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 mobile-couchba...@googlegroups.com.

Jeremy Kelley

unread,
Sep 9, 2015, 11:47:18 AM9/9/15
to mobile-c...@googlegroups.com
Doh - hit send too fast...

Is that relatively new?

Thanks Jen! 

-j


Jens Alfke

unread,
Sep 9, 2015, 11:55:39 AM9/9/15
to mobile-c...@googlegroups.com

On Sep 9, 2015, at 8:46 AM, Jeremy Kelley <jer...@33ad.org> wrote:

PS - that's not on the documentation.

That documentation only covers the cross-platform API. That property isn't cross-platform because it involves an iOS-specific feature (iCloud backup.)

The most comprehensive information on the API is the header files — all the methods and properties are documented there. We have Cocoa API documentation that’s auto-generated (by Doxygen) from the headers, but it looks like currently it’s only up to date with version 1.0.3.

There are also tech notes on the iOS/Mac wiki, which document larger features that haven’t been implemented on the other platforms yet.

—Jens
Reply all
Reply to author
Forward
0 new messages