Permalink
Browse files

Update a few deprecated methods to note that they won't be removed un…

…til version 4.0.

Yay, semantic versioning!
  • Loading branch information...
1 parent 06a8967 commit d63ce9f80cc36edda8636a6168f62db3a58aec1e @tonyarnold tonyarnold committed May 28, 2014
@@ -71,7 +71,7 @@
#pragma mark - Deprecated Methods — DO NOT USE
@interface NSManagedObject (MagicalRecordDeprecated)
-+ (instancetype) MR_createInContext:(NSManagedObjectContext *)context MR_DEPRECATED_AND_REPLACED_BY("MR_createEntityInContext:");
-- (BOOL) MR_deleteInContext:(NSManagedObjectContext *)context MR_DEPRECATED_AND_REPLACED_BY("MR_deleteEntityInContext:");
++ (instancetype) MR_createInContext:(NSManagedObjectContext *)context MR_DEPRECATED_WILL_BE_REMOVED_IN_PLEASE_USE("4.0", "MR_createEntityInContext:");
+- (BOOL) MR_deleteInContext:(NSManagedObjectContext *)context MR_DEPRECATED_WILL_BE_REMOVED_IN_PLEASE_USE("4.0", "MR_deleteEntityInContext:");
@end
@@ -120,10 +120,10 @@
#pragma mark - Deprecated Methods — DO NOT USE
@interface NSManagedObjectContext (MagicalRecordDeprecated)
-+ (NSManagedObjectContext *) MR_contextWithoutParent MR_DEPRECATED_WILL_BE_REMOVED_IN_PLEASE_USE("3.0", "MR_newPrivateQueueContext");
-+ (NSManagedObjectContext *) MR_newContext MR_DEPRECATED_WILL_BE_REMOVED_IN_PLEASE_USE("3.0", "MR_context");
-+ (NSManagedObjectContext *) MR_newContextWithParent:(NSManagedObjectContext *)parentContext MR_DEPRECATED_WILL_BE_REMOVED_IN_PLEASE_USE("3.0", "MR_contextWithParent:");
-+ (NSManagedObjectContext *) MR_newContextWithStoreCoordinator:(NSPersistentStoreCoordinator *)coordinator MR_DEPRECATED_WILL_BE_REMOVED_IN_PLEASE_USE("3.0", "MR_contextWithStoreCoordinator:");
++ (NSManagedObjectContext *) MR_contextWithoutParent MR_DEPRECATED_WILL_BE_REMOVED_IN_PLEASE_USE("4.0", "MR_newPrivateQueueContext");
++ (NSManagedObjectContext *) MR_newContext MR_DEPRECATED_WILL_BE_REMOVED_IN_PLEASE_USE("4.0", "MR_context");
++ (NSManagedObjectContext *) MR_newContextWithParent:(NSManagedObjectContext *)parentContext MR_DEPRECATED_WILL_BE_REMOVED_IN_PLEASE_USE("4.0", "MR_contextWithParent:");
++ (NSManagedObjectContext *) MR_newContextWithStoreCoordinator:(NSPersistentStoreCoordinator *)coordinator MR_DEPRECATED_WILL_BE_REMOVED_IN_PLEASE_USE("4.0", "MR_contextWithStoreCoordinator:");
@end
@@ -31,8 +31,6 @@ + (void) setupCoreDataStackWithStoreNamed:(NSString *)storeName
[NSPersistentStoreCoordinator MR_setDefaultStoreCoordinator:coordinator];
[NSManagedObjectContext MR_initializeDefaultContextWithCoordinator:coordinator];
-
- [NSManagedObjectContext MR_newContext];
}
+ (void) setupCoreDataStackWithAutoMigratingSqliteStoreNamed:(NSString *)storeName
@@ -3,6 +3,5 @@
// Copyright (c) 2014 Magical Panda Software LLC. All rights reserved.
//
-#define MR_DEPRECATED_AND_REPLACED_BY(METHOD) __attribute__((deprecated("This method has been deprecated. Please use `" METHOD "` instead.")))
#define MR_DEPRECATED_WILL_BE_REMOVED_IN(VERSION) __attribute__((deprecated("This method has been deprecated and will be removed in MagicalRecord " VERSION ".")))
#define MR_DEPRECATED_WILL_BE_REMOVED_IN_PLEASE_USE(VERSION, METHOD) __attribute__((deprecated("This method has been deprecated and will be removed in MagicalRecord " VERSION ". Please use `" METHOD "` instead.")))
@@ -76,9 +76,9 @@
+ (NSArray *) propertiesNamed:(NSArray *)properties;
+ (instancetype) createEntity;
+ (instancetype) createEntityInContext:(NSManagedObjectContext *)context;
-+ (instancetype) createInContext:(NSManagedObjectContext *)context MR_DEPRECATED_AND_REPLACED_BY("createEntityInContext:");
++ (instancetype) createInContext:(NSManagedObjectContext *)context MR_DEPRECATED_WILL_BE_REMOVED_IN_PLEASE_USE("4.0", "createEntityInContext:");
- (BOOL) deleteEntity;
-- (BOOL) deleteInContext:(NSManagedObjectContext *)context MR_DEPRECATED_AND_REPLACED_BY("deleteEntityInContext:");
+- (BOOL) deleteInContext:(NSManagedObjectContext *)context MR_DEPRECATED_WILL_BE_REMOVED_IN_PLEASE_USE("4.0", "deleteEntityInContext:");
- (BOOL) deleteEntityInContext:(NSManagedObjectContext *)context;
+ (BOOL) deleteAllMatchingPredicate:(NSPredicate *)predicate;
+ (BOOL) deleteAllMatchingPredicate:(NSPredicate *)predicate inContext:(NSManagedObjectContext *)context;

0 comments on commit d63ce9f

Please sign in to comment.