Skip to content
This repository has been archived by the owner on May 4, 2019. It is now read-only.
/ CMDataStorage Public archive

Simple and powerful API to work with NSData in IOS Cache, Documents and Temp folder.

License

Notifications You must be signed in to change notification settings

mureev/CMDataStorage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CMDataStorage

Build Status CocoaPods CocoaPods License MIT

Simple and powerful API to work with NSData in IOS Cache, Documents and Temp folder.

Features

  • Extremely simple implementation and powerful API
  • Separated GCD queues
  • Callbacks based on blocks
  • Safe file naming using MD5
  • Using modern NSURL iOS API for file paths
  • 100% bugs free. (Used in many projects)

Example Usage

Async save NSData in iOS Documents folder

NSString *uniqueKey = @"unique name";
[CMDataStorage.sharedDocumentsStorage storeData:data key:uniqueKey block:^(BOOL succeeds) {
    //
}];

Async save NSData in iOS Cache folder

NSString *uniqueKey = @"unique name";
[CMDataStorage.sharedCacheStorage storeData:data key:uniqueKey block:^(BOOL succeeds) {
    //
}];

Async read NSData from iOS Cache folder

NSString *uniqueKey = @"unique name";
[CMDataStorage.sharedCacheStorage dataForKey:uniqueKey block:^(NSData *data) {
    //
}];

Sync read NSData from iOS Documents folder

NSString *uniqueKey = @"unique name";
NSData *data = [CMDataStorage.sharedDocumentsStorage dataForKey:uniqueKey];

License

CMDataStorage is available under the MIT license. See the LICENSE file for more info.

About

Simple and powerful API to work with NSData in IOS Cache, Documents and Temp folder.

Resources

License

Stars

Watchers

Forks

Packages

No packages published