The require paths for sub-folders does work fine while you are testing the code using corona simulator and corona sdk (standalone). However, when you integrate the same code using corona cards within ios/android, the require paths for sub folders do not work:
local xml = require("libs.xml") composer.gotoScene("app.reader", {time=250, effect="crossFade", params = options})
I am testing this on iOS and if this works I want to test this on android before I purchase the license.
I would also greatly appreciate if you can give me reference pointers on how to load images in the temp folder? Sample workflow I am trying to achieve:
Download the zip file from s3
Unzip the file
Corona Cards would load images from the downloaded folder
Now I’m confused … your Lua code doesn’t mention require() at all and the errors you posted indicate missing images. Also the Lua code is not a complete project so it isn’t useful for investigating the issue.
Can you PM me a small project that reproduces the issue you are seeing? I understand that I’ll have to run it both in the Simulator and in a CoronaCards app.
However, I ignored step 4 as this was throwing an error as it was unable to copy. But my sample corona application was working fine.
Now I imported my sample corona sdk project into the Corona folder. Here’s the folder structure: link (As you can notice, I have moved some files/assets to assets folder)
Now, when I run the application in the simulator, it does not work and throws the above error.
After some research, I realized that the files were not bundled into the app when I ran it on simulator
I then add the script specified in step 4 and the error came back. After looking at the error closely, I realized the “Corona” folder must be created at the root level (meaning at .xcodeproj file level) and not inside the project folder where you find the AppDelegate files. (I hope you can state this explicitly in the documentation :-))
After moving folder to root level, all the images load on the screen fine.
The require paths for sub-folders does work fine while you are testing the code using corona simulator and corona sdk (standalone). However, when you integrate the same code using corona cards within ios/android, the require paths for sub folders do not work:
local xml = require("libs.xml") composer.gotoScene("app.reader", {time=250, effect="crossFade", params = options})