All Projects → anas-p → Save-To-iCloud-Drive

anas-p / Save-To-iCloud-Drive

Licence: other
Save documents to iCloud drive

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Save-To-iCloud-Drive

Tothepenny
A budget tracker app for iOS
Stars: ✭ 82 (+182.76%)
Mutual labels:  icloud
Cloudkit Demo.swift
Stars: ✭ 244 (+741.38%)
Mutual labels:  icloud
iCloud-Photo-Downloader
iCloud Photo Downloader - Fetch Originals from iCloud Photo Library
Stars: ✭ 17 (-41.38%)
Mutual labels:  icloud
Fcuuid
iOS UUID / Universally Unique Identifiers library as alternative to UDID and identifierForVendor. 📱
Stars: ✭ 1,387 (+4682.76%)
Mutual labels:  icloud
Hxphotopicker
图片/视频选择器 - 支持LivePhoto、GIF图片选择、3DTouch预览、在线下载iCloud上的资源、编辑图片/视频、浏览网络图片 功能 Imitation wx photo/image picker - support for LivePhoto, GIF image selection, 3DTouch preview, Download the resources on iCloud online, browse the web image function
Stars: ✭ 2,363 (+8048.28%)
Mutual labels:  icloud
node-red-contrib-ical-events
Node-RED module to get events from a iCal Calender (Google e.g.), icloud or Caldav Server via kalender-events
Stars: ✭ 38 (+31.03%)
Mutual labels:  icloud
Docker Icloudpd
An Alpine Linux 3.13 container for the iCloud Photos Downloader command line utility
Stars: ✭ 76 (+162.07%)
Mutual labels:  icloud
iCloudDownloader
CLI for downloading iCloud file
Stars: ✭ 82 (+182.76%)
Mutual labels:  icloud
Pdf Archiver
A tool for tagging files and archiving tasks.
Stars: ✭ 182 (+527.59%)
Mutual labels:  icloud
syncTabs
Sync your firefox tabs with Safari on iOS
Stars: ✭ 25 (-13.79%)
Mutual labels:  icloud
Cloudkitgdpr
Framework for allowing users to manage data stored in iCloud
Stars: ✭ 126 (+334.48%)
Mutual labels:  icloud
React Native Icloudstore
A drop in replacement for React Native's AsyncStorage API that wraps the iCloud Ubiquitous Key-Value Store.
Stars: ✭ 143 (+393.1%)
Mutual labels:  icloud
NAS-Nav-iCloud
NAS-Nav导航仿iCloud风格
Stars: ✭ 25 (-13.79%)
Mutual labels:  icloud
Hardchoice
有时候作抉择真的很痛苦,Swift写的生活类APP
Stars: ✭ 90 (+210.34%)
Mutual labels:  icloud
iBadApple
First ever: Windows, free iCloud & activation lock bypass... that isn't a malware!
Stars: ✭ 133 (+358.62%)
Mutual labels:  icloud
Swiftassetspickercontroller
A simple assets picker controller based on iOS 8 Photos framework. Supports iCloud photos and videos. It's written in Swift.
Stars: ✭ 81 (+179.31%)
Mutual labels:  icloud
icloud3
iCloud3 - An advanced device_tracker custom_component for iPhones, iPads, etc. It monitors zone & location updates triggered by the HA iOS App and supports Apple 2fa verification.
Stars: ✭ 304 (+948.28%)
Mutual labels:  icloud
cloud-ignore-files
Make Cloud sync ignore certain project files
Stars: ✭ 70 (+141.38%)
Mutual labels:  icloud
pi-cloud-frame
An icloud-powered digital frame running on a Raspberry Pi. Downloads a random sample of photos from your icloud account, crops them to the correct aspect ratio and displays them. Supports parallel slideshows, interactive menus, GPS/EXIF lookup and auto rotation via a MPU-6050 accelerometer.
Stars: ✭ 21 (-27.59%)
Mutual labels:  icloud
icloud
Access the iCloud API
Stars: ✭ 34 (+17.24%)
Mutual labels:  icloud

Save-To-iCloud-Drive

Save a document to iCloud drive

Steps to follow:

  1. Start new Project

  2. Enable iCloud Documents with Xcode, from tab Capabilities

  3. Create App Id and enable iCloud feature to your App Id

  4. Go to Info.plist of you application and add something similar to this.

    Note: You need to have NSUbiquitousContainerIsDocumentScopePublic=true in Info.plist before you run the app for the first time, Otherwise directory will not be shown in iCloud Drive, It will be a hidden directory.

    <key>NSUbiquitousContainers</key>
    <dict>
    	<key>iCloud.$(PRODUCT_BUNDLE_IDENTIFIER)</key>
    	<dict>
    		<key>NSUbiquitousContainerIsDocumentScopePublic</key>
    		<true/>
    		<key>NSUbiquitousContainerName</key>
    		<string>Folder_Name</string>
    		<key>NSUbiquitousContainerSupportedFolderLevels</key>
    		<string>Any</string>
    	</dict>
    </dict>
  5. In ViewController Create Directory

    func createDirectory(){
        if let iCloudDocumentsURL = FileManager.default.url(forUbiquityContainerIdentifier: nil)?.appendingPathComponent("Documents") {
            if (!FileManager.default.fileExists(atPath: iCloudDocumentsURL.path, isDirectory: nil)) {
                do {
                    try FileManager.default.createDirectory(at: iCloudDocumentsURL, withIntermediateDirectories: true, attributes: nil)
                }
                catch {
                    //Error handling
                    print("Error in creating doc")
                }
            }
        }
    }
  6. Then put all files inside to this Directory

    func copyDocumentsToiCloudDirectory() {
        guard let localDocumentsURL = FileManager.default.urls(for: FileManager.SearchPathDirectory.documentDirectory, in: .userDomainMask).last else { return }
        
        guard let iCloudDocumentsURL = FileManager.default.url(forUbiquityContainerIdentifier: nil)?.appendingPathComponent("Documents").appendingPathComponent("Subdirectory") else { return }
        
        var isDir:ObjCBool = false
        
        if FileManager.default.fileExists(atPath: iCloudDocumentsURL.path, isDirectory: &isDir) {
            do {
                try FileManager.default.removeItem(at: iCloudDocumentsURL)
            }
            catch {
                //Error handling
                print("Error in remove item")
            }
        }
        
        do {
            try FileManager.default.copyItem(at: localDocumentsURL, to: iCloudDocumentsURL)
        }
        catch {
            //Error handling
            print("Error in copy item")
        }
    }

    7: Run the application

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].