Have you tried using “Live Builds”?
Question: What about some code that built directory files in each directory in simulator, then a patch to LFS? That would simulate a lot of LFS, wouldn’t it? Is that a crazy little chunk o’ code to come up with? That would allow us to check for any file we wanted (that we created), etc.
Have you tried live builds? Its lets you edit your Lua code and just like the simulator updates, once on start a live build based on-device build it will update just like the simulator does except you get live device testing without having to constantly re-install to the device every build.
See: https://coronalabs.com/blog/2016/12/02/sneak-peek-corona-live-builds/
This can really make your device required testing a glorious experience.
Rob
Rob, I did get the live builds working, it is much easier to work with. However, once I compiled the app not as a live build, it failed again. I suspect live builds is giving me different results to the live app, esp. when it comes to trying to read the list of directories in a directory.
I actually dumped my old fixes when live build starting showing results…then discovered I’ll have to recreate them! Argh!
The results below show (to me) that the Live Build reads subdirectories using LFS, while the non-Live Build does not.
Live Build Results:
Oct 11 12:27:56.167 d) Checking for built-in books in _user/books
builtInOtherShelvesPath = _user/books
Yes, found the doc_path, checking for files
Oct 11 12:27:56.167 Check . inside _user/books
Check … inside _user/books
Check .DS_Store inside _user/books
Check books.txt inside _user/books
Check point-lobos-ecosystem inside _user/books
OK, now check _user/books/point-lobos-ecosystem
isShelfItem(): Does this file exist? _user/books/point-lobos-ecosystem/item.json
Oct 11 12:27:56.167 yes _user/books/point-lobos-ecosystem/item.json
Oct 11 12:27:56.168 Found a shelf item! _user/books/point-lobos-ecosystem
Build & Download Results:
10-11 10:30:05.413 24671 24687 I Corona : d) Checking for built-in books in /data/user/0/com.mimetic.dgross.photobook/files/coronaResources/_user/books
10-11 10:30:05.413 24671 24687 I Corona : builtInOtherShelvesPath = _user/books
10-11 10:30:05.413 24671 24687 I Corona : Yes, found the doc_path, checking for files
10-11 10:30:05.413 24671 24687 I Corona : Check . inside _user/books
10-11 10:30:05.414 24671 24687 I Corona : Check … inside _user/books
10-11 10:30:05.414 24671 24687 I Corona : Check books.txt inside _user/books
Indeed. Live Builds file structure have some differences compared to regular build. Live build assets are not compiled as they would be in regular build - this may simply not be possible sometimes. I will take a look if there something we can do to make behavior more similar.