I have found a way to solve it and if someone else has the same problem:
1000-limit-error is not the same error as @logicat encountered, the problem seems to be that when iOS atomic write to a file, system first create a temporary file and then write data to it, and if the temporary file is accidentally interrupted while writing.
For example, [MLModel compileModelAtURL] will temporarily create XXXX /Temp/(A Document Being Saved By yourApp)/***.mlmodelc when it is accidentally interrupted, (A Document Being Saved By ***) - temporary files will not be deleted, causing all atomic writes to fail, even if you restart your app.
Try the following solve it(Language: Objective-C):
1.Use nonatomic write, e.g.
[NSData writeToFile:path options:0 error:&error]; // No temporary file, nonatomic
[NSData writeToFile:path atomically:NO];
[NSString writeToFile:path atomically:NO encoding:enc error:&error];
[NSDictionary writeToURL:url atomically:NO];
2.To solve the problem completely, you need to remove the temporary file from the problem folder, which is a hidden file like ***/(A Document Being Saved By yourApp)/xxxx
So I restore the atomic write ability after I clear the temporary file or temporary folder(Note: Do not delete some files generated by the system).
Hope the above tips help you.