I've reproduced this on these 2 setups using the same iCloud account:
Xcode 26.0 beta 4 (17A5285i) & iPhone 12 running iOS 26.0 (23A5326a)
Xcode 16.4 (16F6) & iPhone 16 Pro running iOS 18.6.1 (22G90)
Deleting the iCloud data for the app from one device also allows me to reproduce the issue on the other device.
The error printed in the sample project by the console is:
You don’t have permission to save the file “Documents” in the folder “iCloud~com~hfriia~SimpleiCloudDocument1”.
Failed to save a document!
I just tested on this setup using another iCloud account and it functions as expected - I can immediately recreate the documents folder and save a document:
Xcode 26.0 beta 4 (17A5285i) & iPhone 7 running iOS 15.8.4 (19H390)
Xcode 26.0 beta 4 (17A5285i) & iPhone XR running iOS 18.6.1 (22G90)
Maybe there's something wrong with the first iCloud account?
Topic:
App & System Services
SubTopic:
iCloud & Data