Skip to content
Browse files

Updated documentation, and revised the version number code

  • Loading branch information...
1 parent 7f21a3f commit 42a6413999fd119e59362b21f6bfb3f588453cee @tonyarnold tonyarnold committed May 25, 2014
Showing with 35 additions and 13 deletions.
  1. +33 −9 MagicalRecord/Core/MagicalRecord.h
  2. +2 −4 MagicalRecord/Core/MagicalRecord.m
View
42 MagicalRecord/Core/MagicalRecord.h
@@ -5,31 +5,55 @@
// Copyright 2010 Magical Panda Software, LLC All rights reserved.
//
-#if TARGET_OS_IPHONE == 0
-#define MAC_PLATFORM_ONLY YES
-#endif
+/**
+ Defines current and history version numbers of MagicalRecord.
+
+ @since Available in v2.3 and later.
+ */
+typedef NS_ENUM(NSUInteger, MagicalRecordVersionNumber)
+{
+ /** Version 2.2.0 */
+ MagicalRecordVersionNumber2_2 = 220,
+
+ /** Version 2.3.0 */
+ MagicalRecordVersionNumber2_3 = 230
+};
// enable to use caches for the fetchedResultsControllers (iOS only)
// #define STORE_USE_CACHE
#ifdef NS_BLOCKS_AVAILABLE
-#define MagicalRecordVersionNumber2_2 220
-#define MagicalRecordVersionNumber2_3 230
-
-extern const double MagicalRecordVersionNumber;
-
extern NSString * const kMagicalRecordCleanedUpNotification;
@class NSManagedObjectContext;
typedef void (^CoreDataBlock)(NSManagedObjectContext *context);
#endif
+/**
+ Provides class methods to help setup, save, handle errors and provide information about the currently loaded version of MagicalRecord.
+
+ @since Available in v1.0 and later
+ */
@interface MagicalRecord : NSObject
-+ (double) version;
+/**
+ Returns the current version of MagicalRecord. See the MagicalRecordVersionNumber enumeration for valid current and historical values.
+
+ @return The current version as a double.
+
+ @since Available in v2.3 and later
+ */
++ (MagicalRecordVersionNumber) version;
+
+/**
+ Provides information about the current stack, including the model, coordinator, persistent store, the default context and any parent contexts of the default context.
+
+ @return Description of the current state of the stack.
+ @since Available in v2.3 and later
+ */
+ (NSString *) currentStack;
+ (void) cleanUp;
View
6 MagicalRecord/Core/MagicalRecord.m
@@ -7,8 +7,6 @@
#import "CoreData+MagicalRecord.h"
-const double MagicalRecordVersionNumber = MagicalRecordVersionNumber2_3;
-
NSString * const kMagicalRecordCleanedUpNotification = @"kMagicalRecordCleanedUpNotification";
@interface MagicalRecord (Internal)
@@ -27,9 +25,9 @@ + (void) MR_cleanUp;
@implementation MagicalRecord
-+ (double) version
++ (MagicalRecordVersionNumber) version
{
- return MagicalRecordVersionNumber;
+ return MagicalRecordVersionNumber2_3;
}
+ (void) cleanUp

0 comments on commit 42a6413

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