-
Notifications
You must be signed in to change notification settings - Fork 44
Does getDocumentsPath return app only storage? #42
Comments
iOS part is app/user specific that other apps/users has no access. |
What about Android? Also it would be really good to call these issues out in your documentation so that programmers understand what they are getting when they call this function. |
Android also returns app specific path but the level of isolation is questionable comparing to iOS. |
@yaronyg docs are updated. Thanks |
@plika and @obastemur thanks for the clarification but as I explain in jxcore/jxcore-cordova#52 I think the behavior still isn't quite right. |
We need to fix this for iOS as well. We need the ability to pick the right directory on iOS so that we can choose if we want a location that is backed up or not. So we need an API that is iOS aware. |
The problem we had for iOS with
Ideally, JXCore-cordova would keep Mobile.getDocumentsPath, and add Mobile.getAppStorage path or something. On Android, it would likely point to the same location as Mobile.getDocumentsPath (although there may be a better stop in newer versions). As an added bonus while we are in this code, it would be beneficial to expose the cache directory too. For android, the cache dir = the temp dir, but on iOS, there is a specific location for this. So adding Mobile.getCachePath would be nice. We did this by manually building it, which is not a good thing. Here are Apple's docs on file locations. |
Note that we don't actually choose where pouchDB goes. Whomever is calling Thali does. So while we should follow up on this to give good advice it is not a blocker for now. So off to icebox it goes. |
In Android there is an idea of storage that just belongs to an app and "general storage" that any app with local read permissions can get to. I don't know if iOS has a similar feature.
Does getDocumentsPath return app specific storage or general storage? This matters in our case because we are storing private keys and we need to make sure they aren't in general storage.
The text was updated successfully, but these errors were encountered: