Skip to content
This repository
Browse code

Fixed compile problems and merge issues

  • Loading branch information...
commit 64f8b6d59c245db02f8fd2eef494c2aa82a5bf1b 1 parent c8ffde3
Saul Mora authored December 05, 2011
16  Magical Record.xcodeproj/project.pbxproj
@@ -13,8 +13,6 @@
13 13
 		C7005F1714140FB60061B9F4 /* NSAttributeDescription+MagicalDataImport.m in Sources */ = {isa = PBXBuildFile; fileRef = C7005F1514140FB60061B9F4 /* NSAttributeDescription+MagicalDataImport.m */; };
14 14
 		C7005F1A14140FD30061B9F4 /* NSRelationshipDescription+MagicalDataImport.m in Sources */ = {isa = PBXBuildFile; fileRef = C7005F1914140FD30061B9F4 /* NSRelationshipDescription+MagicalDataImport.m */; };
15 15
 		C7005F1B14140FD30061B9F4 /* NSRelationshipDescription+MagicalDataImport.m in Sources */ = {isa = PBXBuildFile; fileRef = C7005F1914140FD30061B9F4 /* NSRelationshipDescription+MagicalDataImport.m */; };
16  
-		C7005F1E1414100F0061B9F4 /* NSDictionary+MagicalDataImport.m in Sources */ = {isa = PBXBuildFile; fileRef = C7005F1D1414100F0061B9F4 /* NSDictionary+MagicalDataImport.m */; };
17  
-		C7005F1F1414100F0061B9F4 /* NSDictionary+MagicalDataImport.m in Sources */ = {isa = PBXBuildFile; fileRef = C7005F1D1414100F0061B9F4 /* NSDictionary+MagicalDataImport.m */; };
18 16
 		C7005F2214153A060061B9F4 /* NSEntityDescription+MagicalDataImport.m in Sources */ = {isa = PBXBuildFile; fileRef = C7005F2114153A060061B9F4 /* NSEntityDescription+MagicalDataImport.m */; };
19 17
 		C7005F2314153A060061B9F4 /* NSEntityDescription+MagicalDataImport.m in Sources */ = {isa = PBXBuildFile; fileRef = C7005F2114153A060061B9F4 /* NSEntityDescription+MagicalDataImport.m */; };
20 18
 		C70B6E7113D0F62500709450 /* NSPersisentStoreHelperTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C70B6E7013D0F62500709450 /* NSPersisentStoreHelperTests.m */; };
@@ -127,6 +125,8 @@
127 125
 		C7E37A78141577B800CE9BF5 /* libOCMock.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C721C83B13D0C6390097AB6F /* libOCMock.a */; };
128 126
 		C7E37A7C14157BFE00CE9BF5 /* libOCMock.a in CopyFiles */ = {isa = PBXBuildFile; fileRef = C721C83B13D0C6390097AB6F /* libOCMock.a */; };
129 127
 		C7E736DF1402FE64005657C9 /* SingleEntityWithNoRelationships.json in Resources */ = {isa = PBXBuildFile; fileRef = C7E736DE1402FE64005657C9 /* SingleEntityWithNoRelationships.json */; };
  128
+		C7F5EEB2148DC76700964607 /* NSObject+MagicalDataImport.m in Sources */ = {isa = PBXBuildFile; fileRef = C7F5EEB1148DC76700964607 /* NSObject+MagicalDataImport.m */; };
  129
+		C7F5EEB3148DC76700964607 /* NSObject+MagicalDataImport.m in Sources */ = {isa = PBXBuildFile; fileRef = C7F5EEB1148DC76700964607 /* NSObject+MagicalDataImport.m */; };
130 130
 /* End PBXBuildFile section */
131 131
 
132 132
 /* Begin PBXBuildRule section */
@@ -184,8 +184,6 @@
184 184
 		C7005F1514140FB60061B9F4 /* NSAttributeDescription+MagicalDataImport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSAttributeDescription+MagicalDataImport.m"; path = "DataImport/NSAttributeDescription+MagicalDataImport.m"; sourceTree = "<group>"; };
185 185
 		C7005F1814140FD30061B9F4 /* NSRelationshipDescription+MagicalDataImport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSRelationshipDescription+MagicalDataImport.h"; path = "DataImport/NSRelationshipDescription+MagicalDataImport.h"; sourceTree = "<group>"; };
186 186
 		C7005F1914140FD30061B9F4 /* NSRelationshipDescription+MagicalDataImport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSRelationshipDescription+MagicalDataImport.m"; path = "DataImport/NSRelationshipDescription+MagicalDataImport.m"; sourceTree = "<group>"; };
187  
-		C7005F1C1414100F0061B9F4 /* NSDictionary+MagicalDataImport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSDictionary+MagicalDataImport.h"; path = "DataImport/NSDictionary+MagicalDataImport.h"; sourceTree = "<group>"; };
188  
-		C7005F1D1414100F0061B9F4 /* NSDictionary+MagicalDataImport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSDictionary+MagicalDataImport.m"; path = "DataImport/NSDictionary+MagicalDataImport.m"; sourceTree = "<group>"; };
189 187
 		C7005F2014153A060061B9F4 /* NSEntityDescription+MagicalDataImport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSEntityDescription+MagicalDataImport.h"; path = "DataImport/NSEntityDescription+MagicalDataImport.h"; sourceTree = "<group>"; };
190 188
 		C7005F2114153A060061B9F4 /* NSEntityDescription+MagicalDataImport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSEntityDescription+MagicalDataImport.m"; path = "DataImport/NSEntityDescription+MagicalDataImport.m"; sourceTree = "<group>"; };
191 189
 		C70B6E6F13D0F62500709450 /* NSPersisentStoreHelperTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NSPersisentStoreHelperTests.h; path = "Unit Tests/NSPersisentStoreHelperTests.h"; sourceTree = "<group>"; };
@@ -346,6 +344,8 @@
346 344
 		C7C9A38913F4524B002C5B0C /* SingleEntityRelatedToMappedEntityUsingMappedPrimaryKey.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SingleEntityRelatedToMappedEntityUsingMappedPrimaryKey.m; sourceTree = "<group>"; };
347 345
 		C7C9A38C13F45438002C5B0C /* ImportSingleEntityRelatedToMappedEntityUsingMappedPrimaryKeyTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ImportSingleEntityRelatedToMappedEntityUsingMappedPrimaryKeyTests.m; path = "Unit Tests/ImportSingleEntityRelatedToMappedEntityUsingMappedPrimaryKeyTests.m"; sourceTree = "<group>"; };
348 346
 		C7E736DE1402FE64005657C9 /* SingleEntityWithNoRelationships.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = SingleEntityWithNoRelationships.json; path = "Unit Tests/Fixtures/SingleEntityWithNoRelationships.json"; sourceTree = "<group>"; };
  347
+		C7F5EEB0148DC76700964607 /* NSObject+MagicalDataImport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSObject+MagicalDataImport.h"; path = "DataImport/NSObject+MagicalDataImport.h"; sourceTree = "<group>"; };
  348
+		C7F5EEB1148DC76700964607 /* NSObject+MagicalDataImport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSObject+MagicalDataImport.m"; path = "DataImport/NSObject+MagicalDataImport.m"; sourceTree = "<group>"; };
349 349
 /* End PBXFileReference section */
350 350
 
351 351
 /* Begin PBXFrameworksBuildPhase section */
@@ -380,6 +380,8 @@
380 380
 		C7005F0E14140F690061B9F4 /* Data Import */ = {
381 381
 			isa = PBXGroup;
382 382
 			children = (
  383
+				C7F5EEB0148DC76700964607 /* NSObject+MagicalDataImport.h */,
  384
+				C7F5EEB1148DC76700964607 /* NSObject+MagicalDataImport.m */,
383 385
 				C75A4E7113D0D88D00790CEB /* NSManagedObject+MagicalDataImport.h */,
384 386
 				C75A4E7213D0D88D00790CEB /* NSManagedObject+MagicalDataImport.m */,
385 387
 				C7005F1014140F9B0061B9F4 /* NSNumber+MagicalDataImport.h */,
@@ -388,8 +390,6 @@
388 390
 				C7005F1514140FB60061B9F4 /* NSAttributeDescription+MagicalDataImport.m */,
389 391
 				C7005F1814140FD30061B9F4 /* NSRelationshipDescription+MagicalDataImport.h */,
390 392
 				C7005F1914140FD30061B9F4 /* NSRelationshipDescription+MagicalDataImport.m */,
391  
-				C7005F1C1414100F0061B9F4 /* NSDictionary+MagicalDataImport.h */,
392  
-				C7005F1D1414100F0061B9F4 /* NSDictionary+MagicalDataImport.m */,
393 393
 				C7005F2014153A060061B9F4 /* NSEntityDescription+MagicalDataImport.h */,
394 394
 				C7005F2114153A060061B9F4 /* NSEntityDescription+MagicalDataImport.m */,
395 395
 			);
@@ -965,8 +965,8 @@
965 965
 				C7005F1214140F9B0061B9F4 /* NSNumber+MagicalDataImport.m in Sources */,
966 966
 				C7005F1614140FB60061B9F4 /* NSAttributeDescription+MagicalDataImport.m in Sources */,
967 967
 				C7005F1A14140FD30061B9F4 /* NSRelationshipDescription+MagicalDataImport.m in Sources */,
968  
-				C7005F1E1414100F0061B9F4 /* NSDictionary+MagicalDataImport.m in Sources */,
969 968
 				C7005F2214153A060061B9F4 /* NSEntityDescription+MagicalDataImport.m in Sources */,
  969
+				C7F5EEB2148DC76700964607 /* NSObject+MagicalDataImport.m in Sources */,
970 970
 			);
971 971
 			runOnlyForDeploymentPostprocessing = 0;
972 972
 		};
@@ -1026,8 +1026,8 @@
1026 1026
 				C7005F1314140F9B0061B9F4 /* NSNumber+MagicalDataImport.m in Sources */,
1027 1027
 				C7005F1714140FB60061B9F4 /* NSAttributeDescription+MagicalDataImport.m in Sources */,
1028 1028
 				C7005F1B14140FD30061B9F4 /* NSRelationshipDescription+MagicalDataImport.m in Sources */,
1029  
-				C7005F1F1414100F0061B9F4 /* NSDictionary+MagicalDataImport.m in Sources */,
1030 1029
 				C7005F2314153A060061B9F4 /* NSEntityDescription+MagicalDataImport.m in Sources */,
  1030
+				C7F5EEB3148DC76700964607 /* NSObject+MagicalDataImport.m in Sources */,
1031 1031
 			);
1032 1032
 			runOnlyForDeploymentPostprocessing = 0;
1033 1033
 		};
12  Source/Categories/NSPersistentStoreCoordinator+MagicalRecord.h
@@ -22,15 +22,9 @@ extern NSString * const kMagicalRecordPSCDidCompleteiCloudSetupNotification;
22 22
 + (NSPersistentStoreCoordinator *) MR_coordinatorWithSqliteStoreNamed:(NSString *)storeFileName;
23 23
 + (NSPersistentStoreCoordinator *) MR_coordinatorWithAutoMigratingSqliteStoreNamed:(NSString *)storeFileName;
24 24
 + (NSPersistentStoreCoordinator *) MR_coordinatorWithPersitentStore:(NSPersistentStore *)persistentStore;
25  
-+ (NSPersistentStoreCoordinator *) MR_coordinatorWithiCloudContainerID:(NSString *)containerID 
26  
-                                                        contentNameKey:(NSString *)contentNameKey
27  
-                                                       localStoreNamed:(NSString *)localStoreName
28  
-                                               cloudStorePathComponent:(NSString *)subPathComponent;
29  
-+ (NSPersistentStoreCoordinator *) MR_coordinatorWithiCloudContainerID:(NSString *)containerID 
30  
-                                                        contentNameKey:(NSString *)contentNameKey
31  
-                                                       localStoreNamed:(NSString *)localStoreName
32  
-                                               cloudStorePathComponent:(NSString *)subPathComponent
33  
-                                                            completion:(void(^)(void))completionHandler;
  25
++ (NSPersistentStoreCoordinator *) MR_coordinatorWithiCloudContainerID:(NSString *)containerID contentNameKey:(NSString *)contentNameKey localStoreNamed:(NSString *)localStoreName cloudStorePathComponent:(NSString *)subPathComponent;
  26
+
  27
++ (NSPersistentStoreCoordinator *) MR_coordinatorWithiCloudContainerID:(NSString *)containerID contentNameKey:(NSString *)contentNameKey localStoreNamed:(NSString *)localStoreName cloudStorePathComponent:(NSString *)subPathComponent completion:(void(^)(void))completionHandler;
34 28
 
35 29
 - (NSPersistentStore *) MR_addInMemoryStore;
36 30
 - (NSPersistentStore *) MR_addAutoMigratingSqliteStoreNamed:(NSString *) storeFileName;
21  Source/MagicalRecordShorthand.h
@@ -8,12 +8,12 @@
8 8
 @interface NSManagedObject (NSManagedObject_DataImportShortHand)
9 9
 - (void) importValuesForKeysWithDictionary:(id)objectData;
10 10
 - (void) updateValuesForKeysWithDictionary:(id)objectData;
11  
-+ (id) importFromDictionary:(NSDictionary *)data;
12  
-+ (id) importFromDictionary:(NSDictionary *)data inContext:(NSManagedObjectContext *)context;
  11
++ (id) importFromDictionary:(id)data;
  12
++ (id) importFromDictionary:(id)data inContext:(NSManagedObjectContext *)context;
13 13
 + (NSArray *) importFromArray:(NSArray *)listOfObjectData;
14 14
 + (NSArray *) importFromArray:(NSArray *)listOfObjectData inContext:(NSManagedObjectContext *)context;
15  
-+ (id) updateFromDictionary:(NSDictionary *)objectData;
16  
-+ (id) updateFromDictionary:(NSDictionary *)objectData inContext:(NSManagedObjectContext *)context;
  15
++ (id) updateFromDictionary:(id)objectData;
  16
++ (id) updateFromDictionary:(id)objectData inContext:(NSManagedObjectContext *)context;
17 17
 @end
18 18
 @interface NSManagedObject (MagicalRecordShortHand)
19 19
 + (NSUInteger) defaultBatchSize;
@@ -89,7 +89,6 @@
89 89
 + (NSArray *) findByAttribute:(NSString *)attribute withValue:(id)searchValue andOrderBy:(NSString *)sortTerm ascending:(BOOL)ascending inContext:(NSManagedObjectContext *)context;
90 90
 - (id) inContext:(NSManagedObjectContext *)otherContext;
91 91
 - (id) inThreadContext;
92  
-#if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
93 92
 + (void) performFetch:(NSFetchedResultsController *)controller;
94 93
 + (NSFetchedResultsController *) fetchAllSortedBy:(NSString *)sortTerm ascending:(BOOL)ascending withPredicate:(NSPredicate *)searchTerm groupBy:(NSString *)groupingKeyPath delegate:(id<NSFetchedResultsControllerDelegate>)delegate;
95 94
 + (NSFetchedResultsController *) fetchAllSortedBy:(NSString *)sortTerm ascending:(BOOL)ascending withPredicate:(NSPredicate *)searchTerm groupBy:(NSString *)groupingKeyPath delegate:(id<NSFetchedResultsControllerDelegate>)delegate inContext:(NSManagedObjectContext *)context;
@@ -97,12 +96,13 @@
97 96
 + (NSFetchedResultsController *) fetchAllGroupedBy:(NSString *)group withPredicate:(NSPredicate *)searchTerm sortedBy:(NSString *)sortTerm ascending:(BOOL)ascending inContext:(NSManagedObjectContext *)context;
98 97
 + (NSFetchedResultsController *) fetchAllGroupedBy:(NSString *)group withPredicate:(NSPredicate *)searchTerm sortedBy:(NSString *)sortTerm ascending:(BOOL)ascending delegate:(id<NSFetchedResultsControllerDelegate>)delegate;
99 98
 + (NSFetchedResultsController *) fetchAllGroupedBy:(NSString *)group withPredicate:(NSPredicate *)searchTerm sortedBy:(NSString *)sortTerm ascending:(BOOL)ascending delegate:(id<NSFetchedResultsControllerDelegate>)delegate inContext:(NSManagedObjectContext *)context;
100  
-#endif
101 99
 @end
102 100
 @interface NSManagedObjectContext (MagicalRecordShortHand)
103 101
 - (void) observeContext:(NSManagedObjectContext *)otherContext;
104 102
 - (void) stopObservingContext:(NSManagedObjectContext *)otherContext;
105 103
 - (void) observeContextOnMainThread:(NSManagedObjectContext *)otherContext;
  104
+- (void) observeiCloudChangesInCoordinator:(NSPersistentStoreCoordinator *)coordinator;
  105
+- (void) stopObservingiCloudChangesInCoordinator:(NSPersistentStoreCoordinator *)coordinator;
106 106
 - (BOOL) save;
107 107
 - (BOOL) saveWithErrorHandler:(void (^)(NSError *))errorCallback;
108 108
 - (BOOL) saveOnMainThread;
@@ -131,6 +131,7 @@
131 131
 + (NSPersistentStore *) defaultPersistentStore;
132 132
 + (void) setDefaultPersistentStore:(NSPersistentStore *) store;
133 133
 + (NSURL *) urlForStoreName:(NSString *)storeFileName;
  134
++ (NSURL *) cloudURLForUbiqutiousContainer:(NSString *)bucketName;
134 135
 @end
135 136
 @interface NSPersistentStoreCoordinator (MagicalRecordShortHand)
136 137
 + (NSPersistentStoreCoordinator *) defaultStoreCoordinator;
@@ -138,9 +139,15 @@
138 139
 + (NSPersistentStoreCoordinator *) coordinatorWithInMemoryStore;
139 140
 + (NSPersistentStoreCoordinator *) newPersistentStoreCoordinator NS_RETURNS_RETAINED;
140 141
 + (NSPersistentStoreCoordinator *) coordinatorWithSqliteStoreNamed:(NSString *)storeFileName;
141  
-+ (NSPersistentStoreCoordinator *) coordinatorWithAutoMigratingSqliteStoreNamed:(NSString *) storeFileName;
  142
++ (NSPersistentStoreCoordinator *) coordinatorWithAutoMigratingSqliteStoreNamed:(NSString *)storeFileName;
142 143
 + (NSPersistentStoreCoordinator *) coordinatorWithPersitentStore:(NSPersistentStore *)persistentStore;
  144
++ (NSPersistentStoreCoordinator *) coordinatorWithiCloudContainerID:(NSString *)containerID contentNameKey:(NSString *)contentNameKey localStoreNamed:(NSString *)localStoreName cloudStorePathComponent:(NSString *)subPathComponent;
  145
++ (NSPersistentStoreCoordinator *) coordinatorWithiCloudContainerID:(NSString *)containerID contentNameKey:(NSString *)contentNameKey localStoreNamed:(NSString *)localStoreName cloudStorePathComponent:(NSString *)subPathComponent completion:(void(^)(void))completionHandler;
143 146
 - (NSPersistentStore *) addInMemoryStore;
  147
+- (NSPersistentStore *) addAutoMigratingSqliteStoreNamed:(NSString *) storeFileName;
  148
+- (NSPersistentStore *) addSqliteStoreNamed:(id)storeFileName withOptions:(__autoreleasing NSDictionary *)options;
  149
+- (void) addiCloudContainerID:(NSString *)containerID contentNameKey:(NSString *)contentNameKey localStoreNamed:(NSString *)localStoreName cloudStorePathComponent:(NSString *)subPathComponent;
  150
+- (void) addiCloudContainerID:(NSString *)containerID contentNameKey:(NSString *)contentNameKey localStoreNamed:(NSString *)localStoreName cloudStorePathComponent:(NSString *)subPathComponent completion:(void(^)(void))completionBlock;
144 151
 @end
145 152
 #endif
146 153
 
2  Unit Tests/Fixtures/iOS/TestEntities/_SingleEntityRelatedToManyMappedEntitiesUsingMappedPrimaryKey.m
@@ -71,7 +71,9 @@ - (void)setPrimitiveTestPrimaryKeyValue:(short)value_ {
71 71
 	
72 72
 - (NSMutableSet*)mappedEntitiesSet {
73 73
 	[self willAccessValueForKey:@"mappedEntities"];
  74
+  
74 75
 	NSMutableSet *result = (NSMutableSet*)[self mutableSetValueForKey:@"mappedEntities"];
  76
+  
75 77
 	[self didAccessValueForKey:@"mappedEntities"];
76 78
 	return result;
77 79
 }
4  Unit Tests/Fixtures/iOS/TestEntities/_SingleRelatedEntity.m
@@ -48,7 +48,9 @@ + (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key {
48 48
 	
49 49
 - (NSMutableSet*)testAbstractToManyRelationshipSet {
50 50
 	[self willAccessValueForKey:@"testAbstractToManyRelationship"];
  51
+  
51 52
 	NSMutableSet *result = (NSMutableSet*)[self mutableSetValueForKey:@"testAbstractToManyRelationship"];
  53
+  
52 54
 	[self didAccessValueForKey:@"testAbstractToManyRelationship"];
53 55
 	return result;
54 56
 }
@@ -63,7 +65,9 @@ - (NSMutableSet*)testAbstractToManyRelationshipSet {
63 65
 	
64 66
 - (NSMutableSet*)testConcreteToManyRelationshipSet {
65 67
 	[self willAccessValueForKey:@"testConcreteToManyRelationship"];
  68
+  
66 69
 	NSMutableSet *result = (NSMutableSet*)[self mutableSetValueForKey:@"testConcreteToManyRelationship"];
  70
+  
67 71
 	[self didAccessValueForKey:@"testConcreteToManyRelationship"];
68 72
 	return result;
69 73
 }

0 notes on commit 64f8b6d

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