GithubHelp home page GithubHelp logo

cloudstorages's Introduction

#CloudStorages SDK for iOS ##What this is "CloudStorages SDK is a classlib for manageing all sorts of cloud datas such as the following ten: Box、DropBox、GoogleDrive、GoogleDocs、FTP、MyDisk、WebDav、EverNote、SugarSync、skyDrive. Current version:1.0" #Operating Environment

  • armv7 supported
  • iOS 5.0 and above supported

#File Import

###File Import process

####1. Import CloudStorages SDK; ####2.Add Dependency Framework

  • - storeKit.framework
  • - SystemConfiguration.framework
  • - QuartzCore.framework
  • - Security.framework
  • - MobileCoreServices.framework
  • - libxml2.dylib
  • - UIKit.framework
  • - Foundation.framework
  • - CoreGraphics.framework
  • - CFNetwork.framework
  • - libz.dylib

####3. Set up the Cloud AppKey Open sdk/sur/CSCloudServerConfigurator.m, set AppKey information of cloud services accordingly.

  • Register for an Box API ClientID and ClientSecret
  • Register for an DropBox API ClientSecret
  • Register for an GoogleDrive API ClientID and ClientSecret
  • Register for an Evernote API ClientID and ClientSecret
  • Register for an sugarSync API AppID、AccessKey and privateAccessKey
  • Register for an skyDrive API ClientID

####4. Configurate URL Schema

  • Open X-Info.plist (X means the name of your project) and create URL types in File setting (omit if it exists.); Extend URL types – URL Schemes and create AppKey:db-(DropBoxAppkey) for DropBox authorization and create another AppKey for Evernote authorization under URL Schemes.
  • The ASIHTTPRequest Library used in this SDK does not support ARC modes. If the project is under ARC mode, please set compile flags -fno-obj-arc for all ASIHTTPRequest source files.

####5. Modify your AppDelegate

  • In file "AppDelegate.m", import the header file#import <CloudSDK/CSCloudServer.h>
  • In - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions, add code: [CSCloudServer setCloudConfigurator];
  • In - (void)applicationDidBecomeActive:(UIApplication *)application, add code: [CSCloudServer handleDidBecomeActive];
  • In - (BOOL) application:(UIApplication *) application openURL:(NSURL *) url sourceApplication:(NSString *) sourceApplication annotation:(id) annotation, add code:{return [CSCloudServer openURL: url];}

##Using the CloudStorages SDK from your code Example of use

  1. CSCloudServer *cloudServer = [CSCloudServer cloudServerForType:serverType]; //Cloud service object initialization

  2. if (cloudServer.isWebLogin){ [cloudServer loginFromController:self]; // Login the cloud when the cloud land mode is weblogin; }else{ cloudServer.useName = useName; cloudServer.password = password; cloudServer.hostname = hostname; cloudServer.port = port;
    [cloudServer loginFromController:nil]; // Land cloud is a custom window; land mode parameters is nil; }

  3. [cloudServer logout]; //Log out

  4. [cloudServer getRootListAndFolder];//Access root directory

  5. [cloudServer getListAndFolderByFoler:folder];//Access folder directory path

  6. [cloudServer downloadFile:fileObject toPath:savePath];//Download file

  7. [cloudServer uploadFilePath:localFilePath toFolder:destinationFolder];//Upload a single file [cloudServer uploadFiles:localFilePathArr toFolder:destinationFolder];//Upload multiple files

  8. [cloudServer createNewFolder:folderName inFolder:destinationFolder];//Create new folder

  9. [cloudServer deleteFile:fileObject];//Delete the file

  10. [cloudServer renameFile:fileObject withName:newName];//Rename

  11. [cloudServer addToDownloadList:file withSavePath:path];//Add to download list

  12. [cloudServer getPermissionList:file]; //Check administrators who have file permission

  13. [cloudServer insertPermission:userName wihtRole:@"reader" toFile:file]; //Add visitors with file permission

  14. [cloudServer deletePermission:file atPermissionID:permission]; //Remove this user's file permission. Note: you can't remove the file owner.

Attention

  • Initialize a cloud object to continue other relative operations before these operations;

  • Link the latest update to the Third-party libraries ASHTTPRequest TBXML in sugar sync.

    Connect:

    Email: [email protected]

Copyright (c) 2013, Kdan Mobile

cloudstorages's People

Contributors

wanmingkdanmobile avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.