TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Mar 2016 |
Maintained by Joey Lee.
JLCoreDataHelper is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "JLCoreDataHelper"
application:didFinishLaunchingWithOptions:
method is recommended for this.#import <JLCoreDataHelper/JLCoreDataHelper.h>
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[JLCoreDataHelper initializeWithDataModelName:@"Data Model file name here" saveFolderName:@"folder name"];
}
[JLCoreDataHelper setStoreType:JLCoreDataStoreTypeMemory forEntity:@"Entity Name"];
use below public methods to manage data.
#pragma mark -get
- (NSMutableArray *)getObjectsWithEntity:(NSString *)entityName;
- (NSMutableArray *)getObjectsWithCondition:(NSString *)condition
entity:(NSString *)entityName;
- (NSMutableArray *)getObjectsWithCondition:(NSString *)condition
sortingKeys:(NSArray *)skeys
entity:(NSString *)entityName;
- (NSMutableArray *)getObjectsWithCondition:(NSString *)condition
sortingKeys:(NSArray *)skeys
ascending:(BOOL)ascending
entity:(NSString *)entityName;
#pragma mark -set, update
- (id)set:(NSDictionary *)keyValue condition:(NSString *)condition entityName:(NSString *)entityName;
- (void)update:(NSDictionary *)keyValue condition:(NSString *)condition entityName:(NSString *)entityName;
#pragma mark -create
- (id)create:(NSDictionary *)newValue entityName:(NSString *)entityName;
- (id)createWithoutSaving:(NSDictionary *)newValue entityName:(NSString *)entityName;
- (id)createForEntityName:(NSString *)entityName initBlock:(void(^)(id newObject))initBlock;
#pragma mark -delete
- (BOOL)deleteObject:(id)object;
- (void)deleteAllObjectsForEntityName:(NSString *)entityName;
JLCoreDataHelper is available under the MIT license. See the LICENSE file for more info.