Some problems with Asset Keys

I have some problems after updating Codea to the version 3.1 or later. Would you please give me some suggestions?
After following the instruction requirements of version 3.1 or later, using Asset Keys instead of Project:MySprite Something goes wrong.
Firstly, the project doesn’t work in Xcode because asset.documents.XXX outputs this error:

XXX: expect userdata,got nil
stack traceback:
      [C]: in function ‘readImage’
      XXX: in field ‘init’
      ... false
end

Secondly, when I click Export Xcode Project and choose ”included assets - auto”. I can’t get any assets in the exported files.
Only by using the old version’s “Documents:XXX” instead of asset.documents.XXX can I solve the problems.
Can you solve the problems in the later versions?

Fixed code formatting in post above

@Rim can you try exporting the project from Codea 3.2.1

Sorry about the auto-include assets bug. I’ll need to fix this one

@Simeon I did it as you said.It didn’t work and still prompted ‘readImage’ error in Codea 3.2.1.But when I used “Documents:XXX” to write,it returned to normal.For details, I sent you an email with pictures and videos.

@Simeon did you fix that the auto assets for the xcode export should include ‘hidden’ and ‘blocks’ ?