CocoaPods trunk is moving to be read-only. Read more on the blog, there are 13 months to go.
| TestsTested | ✗ |
| LangLanguage | Obj-CObjective C |
| License | MIT |
| ReleasedLast Release | Dec 2014 |
Maintained by Unclaimed.
| Depends on: | |
| AFNetworking | ~> 1.3 |
| SSKeychain | >= 0 |
| UIAlertView-Blocks | >= 0 |
| AFKissXMLRequestOperation | >= 0 |
| ISO8601DateFormatter | >= 0 |
| QuickDialog | = 0.8 |
| AFOAuth2Client | >= 0 |
Fed up with different/inconsistent/non-existent SDKs for cloud file storage services? Try GDFileManagerKit! GDFileManagerKit lets you access Dropbox, Google Drive, SugarSync and WebDAV with a consistent, NSFileManager-like API.
Features of GDFileManagerKit include:
GDFileManagerKit is currently beta-quality software, but I am using it in my app PocketBib. See my blog post for details.
File service list. To add an account, tap the 'plus' button.
Adding an account...
Downloading a file. (To upload a test file, tap the 'plus' button in the left navigation bar).
Get the contents of a directory:
[[GDFileManager sharedManager] getContentsOfDirectoryAtURL:url success:^(NSArray *contents) {
for (GDURLMetadata *metadata in contents) {
NSLog(@"Found %@ called \"%@\"", [metadata isDirectory] ? @"folder" : @"file", metadata.filename);
}
} failure:^(NSError *error) {
NSLog(@"error: %@", error);
}];
Check the local cache for the file, download it if it has been updated, and cache the result:
GDFileManager *fileManager = [GDFileManager new];
GDFileManagerDownloadOperation *downloadOperation = [fileManager cachedDownloadOperationFromSourceURL:url
success:^(NSURL *localURL, GDURLMetadata *metadata) {
NSLog(@"success: %@; metadata = %@", localURL, metadata);
} failure:^(NSError *error) {
if ([[error domain] isEqualToString:NSURLErrorDomain] && [error code] == NSURLErrorCancelled) {
} else
NSLog(@"download failed: %@", error);
}];
[fileManager enqueueFileManagerOperation:downloadOperation];
To set your Dropbox API key:
[GDDropboxAPIToken registerTokenWithKey:@"<dropbox_key>"
secret:@"<dropbox_secret>"
root:GDDropboxRootDropbox]; // This token has access to the entire dropbox folder
See the included GDFileManagerExample for more examples. To run the demo app, run pod install, and then open GDFileManagerExample.xcworkspace and build.
iOS 5.0+, uses a number of external libraries including AFNetworking 1.x, SSKeychain, AFOAuth2Client.
Graham Dennis, [email protected]
GDFileManagerKit is available under the MIT license. See the LICENSE file for more info. If you require a non-attribution license, please contact me at [email protected]