File i/o works in Corona Simulator but not after build in Xcode simulator or device

My app has works fine in the corona simulator and has a clean build for iOS.

However after the build,  i/o functions like reading a file from the documents directory are not working on the iphone device or xcode simulator. Has anyone seen this before? Any help appreciated. Thank you.

Here is my code-

 local path = system.pathForFile( “answered.txt”, system.DocumentsDirectory)
 local file = io.open( path, “r” )
 local last_answer = tonumber(file:read( “*a” ))
 io.close( file )

It appears any files in the DocumentsDirectory do not get moved over during the build. I had to put a version in the Resources directory and move it in the code during startup

The build process only creates files in the Resource directory and it’s subdirectories. If you want files in the other directories, you need move them yourself. This is the same as building a native app.

It appears any files in the DocumentsDirectory do not get moved over during the build. I had to put a version in the Resources directory and move it in the code during startup

The build process only creates files in the Resource directory and it’s subdirectories. If you want files in the other directories, you need move them yourself. This is the same as building a native app.