MTLBinaryArchive serializeToURL failed with no error

I created an empty binary archive and try to save it on disk, but it returned false without giving any error message.

The code is from https://developer.apple.com/documentation/metal/shader_libraries/metal_binary_archives/creating_binary_archives_from_device-built_pipeline_state_objects?language=objc

MTLBinaryArchive serializeToURL failed with no error
 
 
Q