Join GitHub today
Does getDocumentsPath return app only storage? #42
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 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.