icloud_storage_sync 0.0.1 icloud_storage_sync: ^0.0.1 copied to clipboard
Easily sync and secure your app's data with the iCloud Sync Flutter plugin for seamless iCloud integration.
📦☁️ iCloud_Storage_Sync Plugin #
Seamless iCloud integration for your Flutter iOS apps!
🌟 Introduction #
iCloud_Storage_Sync simplifies iCloud storage integration, bringing powerful cloud capabilities to your Flutter iOS apps:
🔄 Effortless backup and sync of app data
📱💻 Consistent user experience across all devices
🔒 Secure storage and retrieval of important information
☁️ Seamless integration with the iCloud ecosystem
✨ Features #
Feature | Description |
---|---|
📂 | Get iCloud files |
⬆️ | Upload files to iCloud |
✏️ | Rename iCloud files |
🗑️ | Delete iCloud files |
↔️ | Move iCloud files |
🚀 Getting Started #
1. 🛠️ Installation #
Add this to your pubspec.yaml
:
dependencies:
icloud_storage_sync: ^1.0.0
2. ⚙️ Install the Plugin #
Run:
flutter pub get
3. 💻 Usage #
Import in your Dart code:
import 'package:icloud_storage_sync/icloud_storage_sync.dart';
📋 Prerequisites #
Before diving in, make sure you have:
☑️ An Apple Developer account
☑️ App ID and iCloud Container ID
☑️ iCloud capability enabled and assigned
☑️ iCloud capability configured in Xcode
🔍 See How to set up iCloud Container for step-by-step instructions.
🧰 API Examples #
📥 Getting iCloud Files #
Future<List<CloudFiles>> getCloudFiles({required String containerId}) async {
return await icloudSyncPlugin.getCloudFiles(containerId: containerId);
}
📤 Uploading Files to iCloud #
Future<void> upload({
required String containerId,
required String filePath,
String? destinationRelativePath,
StreamHandler<double>? onProgress,
}) async {
await icloudSyncPlugin.upload(
containerId: containerId,
filePath: filePath,
destinationRelativePath: destinationRelativePath,
onProgress: onProgress,
);
}
🏷️ Renaming iCloud Files #
Future<void> rename({
required String containerId,
required String relativePath,
required String newName,
}) async {
await icloudSyncPlugin.rename(
containerId: containerId,
relativePath: relativePath,
newName: newName,
);
}
🗑️ Deleting iCloud Files #
Future<void> delete({
required String containerId,
required String relativePath,
}) async {
await icloudSyncPlugin.delete(
containerId: containerId,
relativePath: relativePath,
);
}
🔀 Moving iCloud Files #
Future<void> move({
required String containerId,
required String fromRelativePath,
required String toRelativePath,
}) async {
await IcloudSyncPlatform.instance.move(
containerId: containerId,
fromRelativePath: fromRelativePath,
toRelativePath: toRelativePath,
);
}
🛠 How to set up iCloud Container and enable the capability #
-
👤 Log in to your Apple Developer account and select 'Certificates, IDs & Profiles'.
-
🆔 Create an App ID (if needed) and an iCloud Containers ID:
-
🔗 Assign the iCloud Container to your App ID:
-
💻 In Xcode, enable iCloud capability and select your container:
🤝 Contributing #
🙏 Acknowledgements #
- Thanks to all the contributors who have helped shape this plugin
- Apple for providing the iCloud infrastructure
Made with ❤️ by the DevCodeSpace