From 855a83948d64af3a01d7e6c64bcd4e3de386a590 Mon Sep 17 00:00:00 2001 From: Cole Murray Date: Tue, 20 Jan 2026 19:35:58 -0800 Subject: [PATCH] fix(ios): use iCloud Documents folder for Documents scope The documentsDirectory property was incorrectly using the local sandbox Documents folder instead of the iCloud ubiquity container's Documents folder. This meant files written with CloudStorageScope.Documents were stored locally and not synced to iCloud, contrary to the documented behavior. Fixes #53 --- .../react-native-cloud-storage/ios/Utils/CloudKitUtils.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native-cloud-storage/ios/Utils/CloudKitUtils.swift b/packages/react-native-cloud-storage/ios/Utils/CloudKitUtils.swift index d49df4e..d8bf3df 100644 --- a/packages/react-native-cloud-storage/ios/Utils/CloudKitUtils.swift +++ b/packages/react-native-cloud-storage/ios/Utils/CloudKitUtils.swift @@ -107,6 +107,6 @@ enum CloudKitUtils { } static var documentsDirectory: URL? { - fileManager.urls(for: .documentDirectory, in: .userDomainMask).first + fileManager.url(forUbiquityContainerIdentifier: nil)?.appendingPathComponent("Documents") } }