पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

पैकेज विवरणv0.0.5

icloud_storage_sync

iCloud Sync Flutter प्लगइन के साथ अपने ऐप के डेटा को आसानी से सिंक और सुरक्षित करें, बिना किसी दिक्कत के iCloud एकीकरण प्राप्त करें।

iOSmacOS
30-दिन डाउनलोड
784
लाइक
45
Pub अंक
150

पैकेज इंस्टॉल करें

flutter pub add icloud_storage_sync

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

icloud_storage_sync पैकेज फ्लटर ऐप्स के लिए iOS और macOS पर सहज iCloud एकीकरण की अनुमति देता है, जिससे डेवलपर्स को आसानी से ऐप डेटा को iCloud में सिंक और सुरक्षित रूप से संग्रहीत करने में सक्षम बनाता है। यह उपयोगकर्ताओं को अपनी जानकारी को एक समान तरीके से प्राप्त करने की अनुमति देने के लिए डिवाइस के बीच डेटा स्थायित्व को प्रबंधित करने के लिए एक सीधा API प्रदान करता है। सुरक्षा को ध्यान में रखते हुए बनाया गया, यह प्लगइन Apple के iCloud सेवाओं का उपयोग करके संवेदनशील डेटा की रक्षा करता है जबकि प्रदर्शन और विश्वसनीयता बनाए रखता है। कम सेटअप के साथ क्रॉस-डिवाइस सिंक्रनाइज़ेशन की आवश्यकता वाले ऐप्स के लिए आदर्श है।

उपयोग

  • क्रॉस-डिवाइस डेटा सिंक्रनाइजेशन
  • उपयोगकर्ता डेटा के लिए सुरक्षित क्लाउड बैकअप
  • Flutter ऐप में सीमलेस iCloud एकीकरण
  • ऑफलाइन-प्रथम एप्लिकेशन्स के साथ क्लाउड सिंक
  • उपयोगकर्ता प्रोफ़ाइल और पसंद की स्थायित्व

मुख्य विशेषताएँ

  • iOS और macOS में मूल आईक्लाउड एकीकरण
  • उपकरणों के बीच स्वचालित डेटा सिंक्रनाइज़ेशन
  • एंड-टू-एंड एन्क्रिप्शन समर्थन
  • आसान कार्यान्वयन के लिए सरल Flutter API
  • मजबूत त्रुटि संभाल और स्थिति मॉनिटरिंग

इनके लिए उपयुक्त

  • iOS और macOS Flutter विकासकर्ता
  • लंबे समय तक उपयोगकर्ता डेटा की आवश्यकता वाले ऐप्स
  • गोपनीयता-केंद्रित एप्लिकेशन
  • मूल बादल समाधान खोज रहे विकासकर्ता
  • न्यूनतम कॉन्फ़िगरेशन वाले प्रोजेक्ट्स

विचार योग्य बातें

  • Apple डेवलपर खाता और iCloud क्षमताओं की आवश्यकता होती है
  • iOS और macOS प्लेटफॉर्म तक सीमित
  • सही iCloud अधिकारों और प्रोवीज़निंग पर निर्भर करता है
  • कंपनी के उपयोग के लिए अतिरिक्त सेटअप की आवश्यकता हो सकती है
  • Android या वेब प्लेटफॉर्म के साथ असंगत

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

📦☁️ iCloud_Storage_Sync Plugin

Seamless iCloud integration for your Flutter iOS apps!

iCloud Storage Sync Banner

🌟 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
🔍 Filter by path prefix
⏱️ Timeout support

Advanced Features:

  • 🔍 Path Filtering - Query specific subdirectories instead of entire container for better performance
  • ⏱️ Timeout Support - Set time limits on metadata queries to prevent indefinite hangs
  • 📊 Progress Tracking - Monitor upload/download progress with callbacks
  • 🔄 Stream Updates - Receive live updates as files change in iCloud

🚀 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. 🔧 Configure Your iCloud Container ID

Update your iCloud Container ID in the example app:

In example/lib/controller/icloud_plugin_controller.dart:

final iCloudContainerId = 'iCloud.com.yourcompany.appname'; // Replace with your container ID

In example/ios/Runner/Info.plist:

<key>iCloud.com.yourcompany.appname</key>  <!-- Replace with your container ID -->

In example/ios/Runner/Runner.entitlements and RunnerDebug.entitlements:

<string>iCloud.com.yourcompany.appname</string>  <!-- Replace with your container ID -->

ℹ️ Note: Your iCloud Container ID should match the format: iCloud.<your-team-id>.<your-bundle-id>

4. 💻 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);
}
📂 Gathering Files with Path Filtering & Timeout
// Gather files with optional path prefix filtering
Future<List<ICloudFile>> gatherFilesFromSubdirectory({
  required String containerId,
  required String pathPrefix,
}) async {
  return await icloudSyncPlugin.gather(
    containerId: containerId,
    relativePathPrefix: pathPrefix, // e.g., 'Documents/', 'Projects/MyApp/'
  );
}

// Gather files with timeout to prevent indefinite hangs
Future<List<ICloudFile>> gatherFilesWithTimeout({
  required String containerId,
  required Duration timeout,
}) async {
  try {
    return await icloudSyncPlugin.gather(
      containerId: containerId,
      timeout: timeout, // e.g., Duration(seconds: 30)
    );
  } on PlatformException catch (e) {
    if (e.code == 'METADATA_QUERY_TIMEOUT') {
      debugPrint('iCloud query timed out');
    }
    return [];
  }
}

// Combine both features for optimal performance
Future<List<ICloudFile>> gatherFilesOptimized({
  required String containerId,
  required String pathPrefix,
}) async {
  return await icloudSyncPlugin.gather(
    containerId: containerId,
    relativePathPrefix: pathPrefix,
    timeout: Duration(seconds: 30),
  );
}

Features:

  • 📂 relativePathPrefix - Filter to specific subdirectory for faster queries
  • ⏱️ timeout - Set time limit to prevent indefinite hangs
  • 🔄 Both parameters are optional and backwards compatible
📤 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,
  required bool isDirectory
}) async {
  await icloudSyncPlugin.delete(
    containerId: containerId,
    relativePath: relativePath,
    isDirectory: isDirectory
  );
}
🔄 Replace iCloud Files
Future replaceFile({
  required String updatedFilePath,
  required String relativePath
  }) async {
    await icloudSyncPlugin.replace(
      containerId: iCloudContainerId,
      updatedFilePath: updatedFilePath,
      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

  1. 👤 Log in to your Apple Developer account and select 'Certificates, IDs & Profiles'.

  2. 🆔 Create an App ID (if needed) and an iCloud Containers ID:

    iCloud Container ID
  3. 🔗 Assign the iCloud Container to your App ID:

    Assign iCloud Capability
  4. 💻 In Xcode, enable iCloud capability and select your container:

    Xcode Capability

🤝 Contributing


🙏 Acknowledgements

  • Thanks to all the contributors who have helped shape this plugin
  • Apple for providing the iCloud infrastructure

Made with ❤️ by the DevCodeSpace

श्रेणियाँ

निर्भरताएँ

निर्भरता सूची 4 आइटम

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट

अभी कोई डेटा उपलब्ध नहीं है।