diff --git a/Code/ObjectMapping/RKObjectManager.h b/Code/ObjectMapping/RKObjectManager.h index da508a5a..5e550b1a 100644 --- a/Code/ObjectMapping/RKObjectManager.h +++ b/Code/ObjectMapping/RKObjectManager.h @@ -24,6 +24,7 @@ #import "RKObjectMappingProvider.h" #import "RKConfigurationDelegate.h" #import "RKObjectPaginator.h" +#import "RKMacros.h" @protocol RKParser; @@ -460,6 +461,6 @@ typedef enum { - (void)putObject:(id)object mapResponseWith:(RKObjectMapping *)objectMapping delegate:(id)delegate DEPRECATED_ATTRIBUTE; - (void)deleteObject:(id)object mapResponseWith:(RKObjectMapping *)objectMapping delegate:(id)delegate DEPRECATED_ATTRIBUTE; -@property (nonatomic, retain) RKManagedObjectStore *objectStore DEPRECATED_ATTRIBUTE; +@property (nonatomic, retain) RKManagedObjectStore *objectStore DEPRECATED_ATTRIBUTE_MESSAGE("Use managedObjectStore instead"); @end diff --git a/Code/Support/RKMacros.h b/Code/Support/RKMacros.h new file mode 100644 index 00000000..f70656f1 --- /dev/null +++ b/Code/Support/RKMacros.h @@ -0,0 +1,29 @@ +// +// RKMacros.h +// RestKit +// +// Created by Jawwad Ahmad on 7/18/12. +// Copyright (c) 2012 RestKit. All rights reserved. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + + +/** + Instead of using the normal DEPRECATED_ATTRIBUTE use DEPRECATED_ATTRIBUTE_MESSAGE(message) + to display a helpful recommendation message along with the deprecation message. + */ +#ifndef DEPRECATED_ATTRIBUTE_MESSAGE +#define DEPRECATED_ATTRIBUTE_MESSAGE(message) __attribute__((deprecated (message))) +#endif diff --git a/RestKit.xcodeproj/project.pbxproj b/RestKit.xcodeproj/project.pbxproj index 764cf172..e0d4ccdf 100644 --- a/RestKit.xcodeproj/project.pbxproj +++ b/RestKit.xcodeproj/project.pbxproj @@ -766,6 +766,8 @@ 49D275AE14C9F3020090845D /* RKISO8601DateFormatter.h in Headers */ = {isa = PBXBuildFile; fileRef = 49D275AB14C9F3020090845D /* RKISO8601DateFormatter.h */; settings = {ATTRIBUTES = (Public, ); }; }; 49D275AF14C9F3020090845D /* RKISO8601DateFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 49D275AC14C9F3020090845D /* RKISO8601DateFormatter.m */; }; 49D275B014C9F3020090845D /* RKISO8601DateFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 49D275AC14C9F3020090845D /* RKISO8601DateFormatter.m */; }; + 5CCC295615B7124A0045F0F5 /* RKMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CCC295515B7124A0045F0F5 /* RKMacros.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5CCC295715B7124A0045F0F5 /* RKMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CCC295515B7124A0045F0F5 /* RKMacros.h */; settings = {ATTRIBUTES = (Public, ); }; }; 73D3907414CA1AE00093E3D6 /* parent.json in Resources */ = {isa = PBXBuildFile; fileRef = 73D3907114CA19F90093E3D6 /* parent.json */; }; 73D3907514CA1AE20093E3D6 /* parent.json in Resources */ = {isa = PBXBuildFile; fileRef = 73D3907114CA19F90093E3D6 /* parent.json */; }; 73D3907614CA1AE60093E3D6 /* child.json in Resources */ = {isa = PBXBuildFile; fileRef = 73D3907314CA1A4A0093E3D6 /* child.json */; }; @@ -1273,6 +1275,7 @@ 49D2759C14C9EF1E0090845D /* README.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = README.txt; path = iso8601parser/README.txt; sourceTree = ""; }; 49D275AB14C9F3020090845D /* RKISO8601DateFormatter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RKISO8601DateFormatter.h; sourceTree = ""; }; 49D275AC14C9F3020090845D /* RKISO8601DateFormatter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKISO8601DateFormatter.m; sourceTree = ""; }; + 5CCC295515B7124A0045F0F5 /* RKMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RKMacros.h; sourceTree = ""; }; 7394DF3514CF157A00CE7BCE /* RKManagedObjectCaching.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RKManagedObjectCaching.h; sourceTree = ""; }; 7394DF3814CF168C00CE7BCE /* RKFetchRequestManagedObjectCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RKFetchRequestManagedObjectCache.h; sourceTree = ""; }; 7394DF3914CF168C00CE7BCE /* RKFetchRequestManagedObjectCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKFetchRequestManagedObjectCache.m; sourceTree = ""; }; @@ -1620,6 +1623,7 @@ 252A202C153471380078F8AD /* NSArray+RKAdditions.m */, 2572538B155C543000CB05ED /* RKPortCheck.h */, 2572538C155C543000CB05ED /* RKPortCheck.m */, + 5CCC295515B7124A0045F0F5 /* RKMacros.h */, ); path = Support; sourceTree = ""; @@ -2361,6 +2365,7 @@ 2597F99815AF551D00E547D7 /* NSManagedObject+ActiveRecord.h in Headers */, 2597F99C15AF6DC400E547D7 /* RKRelationshipConnectionOperation.h in Headers */, 25AFF8F115B4CF1F0051877F /* RKMappingErrors.h in Headers */, + 5CCC295615B7124A0045F0F5 /* RKMacros.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2492,6 +2497,7 @@ 258EA4B315A39090007E07A6 /* RKManagedObjectMappingOperationDataSource.h in Headers */, 2597F99D15AF6DC400E547D7 /* RKRelationshipConnectionOperation.h in Headers */, 25AFF8F215B4CF1F0051877F /* RKMappingErrors.h in Headers */, + 5CCC295715B7124A0045F0F5 /* RKMacros.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; };