Storing cache data in app/Library/Caches, how do you access this folder?
Hey all,
I'm trying to abide by the new rules to keep content that is not vital to the application yet very desirable to cache in 5.0.1. The original project was built using Flash IDE and FlashDevelop and stored files in the Documents folder. It was rejected from the app store for 2.23 for not putting those files in the app/Library/Caches folder.
I've checked to see if this folder auto-exists using a bunch of File.applicationDirectory.resolvePath() traces and I can't find this folders existence. I can see that /Library/Caches exists but I get errors trying to write to that so that can't be it.
For example, here's a bunch of traces using applicationDirectory and then applicationStorageDirectory and their outputs:
File.applicationDirectory.resolvePath('/Library/Caches');
File.applicationDirectory.resolvePath('./../../Library/Caches');
File.applicationDirectory.resolvePath('./../Library/Caches');
File.applicationDirectory.resolvePath('../Library/Caches');
File.applicationDirectory.resolvePath('Library/Caches');
File.applicationDirectory.resolvePath('./../Library/Caches');
----------------------------
File.applicationStorageDirectory.resolvePath('/Library/Caches');
File.applicationStorageDirectory.resolvePath('./../../Library/Caches');
File.applicationStorageDirectory.resolvePath('./../Library/Caches');
File.applicationStorageDirectory.resolvePath('./Library/Caches');
File.applicationStorageDirectory.resolvePath('Library/Caches');
File.applicationStorageDirectory.resolvePath('./../Library/Caches');
outputs:
cache 1 exists: /Library/Caches
cache 2 exists: /var/mobile/Applications/F6DD6D3B-E01A-44B5-849C-349170008DDD/myApp.app
cache 3 exists: /var/mobile/Applications/F6DD6D3B-E01A-44B5-849C-349170008DDD/myApp.app
cache 4 exists: /var/mobile/Applications/F6DD6D3B-E01A-44B5-849C-349170008DDD/myApp.app
cache 5 doesnt exist: /var/mobile/Applications/F6DD6D3B-E01A-44B5-849C-349170008DDD/myApp.app/Library/Caches
cache 6 exists: /var/mobile/Applications/F6DD6D3B-E01A-44B5-849C-349170008DDD/myApp.app
----------------------------
cache 1 exists: /Library/Caches
cache 2 exists: /var/mobile/Applications/F6DD6D3B-E01A-44B5-849C-349170008DDD/Library/Application Support/com.example.myApp/Local Store
cache 3 exists: /var/mobile/Applications/F6DD6D3B-E01A-44B5-849C-349170008DDD/Library/Application Support/com.example.myApp/Local Store
cache 4 doesnt exist: /var/mobile/Applications/F6DD6D3B-E01A-44B5-849C-349170008DDD/Library/Application Support/com.example.myApp/Local Store/Library/Caches
cache 5 doesnt exist: /var/mobile/Applications/F6DD6D3B-E01A-44B5-849C-349170008DDD/Library/Application Support/com.example.myApp/Local Store/Library/Caches
cache 6 exists: /var/mobile/Applications/F6DD6D3B-E01A-44B5-849C-349170008DDD/Library/Application Support/com.example.myApp/Local Store
I would have expected 'Library/Caches' to resolve.. You can see clearly 'cache 5 doesnt exist: /var/mobile/Applications/F6DD6D3B-E01A-44B5-849C-349170008DDD/myApp.app/Library/Caches' traced there.
I even made the folders Library\Caches included it as a folder in my publish options. I still don't see the directories existence. Now that's weird. I also include a 'data' folder and that exists if I trace for it.
Any tips on how I can find this "Library/Caches" path?
