I got confirmation from one of my testers today that a change in App Wrapper solves the problem whereby my application’s files were being created in the Trash.
Which strengthens my theory that the macOS function “Move to Trash”, which is normally Synchronous, becomes Asynchronous with iCloud Backup enabled. App Wrapper uses “Move to Trash” just on the off-chance that the user may need those files.
- Take a copy of the NativePath of the folderitem (in theory any path format should work).
- Rename the existing item.
- Call “Move to Trash” on the renamed item.
- Recreate the folderitem from the saved path.
- Continue normally.
btw: I am using [NSFileManager trashItemAtURL:resultingItemURL:error:]
I can find no evidence of behavior changes in the documentation.
https://developer.apple.com/documentation/foundation/nsfilemanager/1414306-trashitematurl?language=objc