Skip to content
Browse files

More documentation

  • Loading branch information...
1 parent 968eb90 commit ab3cb824afd06caf55392ca3b7afe38df29acb4d @tonyarnold tonyarnold committed May 2, 2014
Showing with 47 additions and 14 deletions.
  1. +46 −13 MagicalRecord/Core/MagicalRecord+Options.h
  2. +1 −1 MagicalRecord/Core/MagicalRecord+Options.m
View
59 MagicalRecord/Core/MagicalRecord+Options.h
@@ -62,30 +62,63 @@ typedef NS_ENUM (NSInteger, MagicalRecordLoggingMask)
@interface MagicalRecord (Options)
-//global options
-// enable/disable logging
-// add logging provider
-// autocreate new PSC per Store
-// autoassign new instances to default store
+/**
+ @name Configuration Options
+ */
+
+/**
+ If this is true, the default managed object model will be automatically created if it doesn't exist when calling `[NSManagedObjectModel MR_defaultManagedObjectModel]`.
+
+ @return current value of shouldAutoCreateManagedObjectModel.
+ @since Available in v2.0.4 and later
+ */
+ (BOOL) shouldAutoCreateManagedObjectModel;
+
+/**
+ Setting this to true will make MagicalRecord create the default managed object model automatically if it doesn't exist when calling `[NSManagedObjectModel MR_defaultManagedObjectModel]`.
+
+ @param shouldAutoCreate BOOL value that flags whether the default persistent store should be automatically created.
+
+ @since Available in v2.0.4 and later
+ */
+ (void) setShouldAutoCreateManagedObjectModel:(BOOL)shouldAutoCreate;
+
+/**
+ If this is true, the default persistent store will be automatically created if it doesn't exist when calling `[NSPersistentStoreCoordinator MR_defaultStoreCoordinator]`.
+
+ @return current value of shouldAutoCreateDefaultPersistentStoreCoordinator.
+
+ @since Available in v2.0.4 and later
+ */
+ (BOOL) shouldAutoCreateDefaultPersistentStoreCoordinator;
+
+/**
+ Setting this to true will make MagicalRecord create the default persistent store automatically if it doesn't exist when calling `[NSPersistentStoreCoordinator MR_defaultStoreCoordinator]`.
+
+ @param shouldAutoCreate BOOL value that flags whether the default persistent store should be automatically created.
+
+ @since Available in v2.0.4 and later
+ */
+ (void) setShouldAutoCreateDefaultPersistentStoreCoordinator:(BOOL)shouldAutoCreate;
/**
- * If this is true and MagicalRecord encounters a store with a version that does not match that of the model, the store will be removed from the disk.
- * This is extremely useful during development where frequent model changes can potentially require a delete and reinstall of the app.
- *
- * @return current value of shouldDeleteStoreOnModelMismatch
+ If this is true and MagicalRecord encounters a store with a version that does not match that of the model, the store will be removed from the disk.
+ This is extremely useful during development where frequent model changes can potentially require a delete and reinstall of the app.
+
+ @return current value of shouldDeleteStoreOnModelMismatch
+
+ @since Available in v2.0.4 and later
*/
+ (BOOL) shouldDeleteStoreOnModelMismatch;
/**
- * Setting this to true will make MagicalRecord delete any stores that it encounters which do not match the version of their model.
- * This is extremely useful during development where frequent model changes can potentially require a delete and reinstall of the app.
- *
- * @param shouldDeleteStoreOnModelMismatch BOOL value that flags whether mismatched stores should be deleted
+ Setting this to true will make MagicalRecord delete any stores that it encounters which do not match the version of their model.
+ This is extremely useful during development where frequent model changes can potentially require a delete and reinstall of the app.
+
+ @param shouldDeleteStoreOnModelMismatch BOOL value that flags whether mismatched stores should be deleted
+
+ @since Available in v2.0.4 and later
*/
+ (void) setShouldDeleteStoreOnModelMismatch:(BOOL)shouldDeleteStoreOnModelMismatch;
View
2 MagicalRecord/Core/MagicalRecord+Options.m
@@ -16,7 +16,7 @@
@implementation MagicalRecord (Options)
-#pragma mark - Options
+#pragma mark - Configuration Options
+ (BOOL) shouldAutoCreateManagedObjectModel;
{

0 comments on commit ab3cb82

Please sign in to comment.
Something went wrong with that request. Please try again.