container-migration.plist doesn't work in some cases

I have existing macOS application(pkg distribution) and now I need to release App Store version

I need to move all files from "Documents/My App" to app container

however container migration doesn't work in some cases

I've tested TestFlight build:

  • migration works fine if Mac uses Local Documents folder
  • migration doesn't work if Mac uses iCloud Documents and Desktop folders

Is there some way to fix this?

container-migration.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Move</key>
	<array>
		<string>${Documents}/My App</string>
	</array>
</dict>
</plist>
container-migration.plist doesn't work in some cases
 
 
Q