diff --git a/MagicalRecord/Categories/DataImport/NSAttributeDescription+MagicalDataImport.m b/MagicalRecord/Categories/DataImport/NSAttributeDescription+MagicalDataImport.m index d44bf564a..19dc9f6bd 100644 --- a/MagicalRecord/Categories/DataImport/NSAttributeDescription+MagicalDataImport.m +++ b/MagicalRecord/Categories/DataImport/NSAttributeDescription+MagicalDataImport.m @@ -7,6 +7,8 @@ // #import "NSAttributeDescription+MagicalDataImport.h" +#import "NSManagedObject+MagicalDataImport.h" +#import "MagicalImportFunctions.h" @implementation NSAttributeDescription (MagicalRecord_DataImport) @@ -43,4 +45,5 @@ - (id) MR_valueForKeyPath:(NSString *)keyPath fromObjectData:(id)objectData; return value == [NSNull null] ? nil : value; } + @end diff --git a/MagicalRecord/Categories/DataImport/NSRelationshipDescription+MagicalDataImport.m b/MagicalRecord/Categories/DataImport/NSRelationshipDescription+MagicalDataImport.m index 050861b64..770d14c6a 100644 --- a/MagicalRecord/Categories/DataImport/NSRelationshipDescription+MagicalDataImport.m +++ b/MagicalRecord/Categories/DataImport/NSRelationshipDescription+MagicalDataImport.m @@ -8,6 +8,7 @@ #import "NSRelationshipDescription+MagicalDataImport.h" #import "NSManagedObject+MagicalDataImport.h" +#import "MagicalImportFunctions.h" #import "MagicalRecord.h" @implementation NSRelationshipDescription (MagicalRecord_DataImport) diff --git a/MagicalRecord/Categories/NSManagedObject/NSManagedObject+MagicalAggregation.m b/MagicalRecord/Categories/NSManagedObject/NSManagedObject+MagicalAggregation.m index c3e5aab81..2d5ffb0a2 100644 --- a/MagicalRecord/Categories/NSManagedObject/NSManagedObject+MagicalAggregation.m +++ b/MagicalRecord/Categories/NSManagedObject/NSManagedObject+MagicalAggregation.m @@ -7,6 +7,12 @@ // #import "NSManagedObject+MagicalAggregation.h" +#import "NSManagedObjectContext+MagicalRecord.h" +#import "NSManagedObjectContext+MagicalThreading.h" +#import "NSManagedObject+MagicalRequests.h" +#import "NSManagedObject+MagicalRecord.h" +#import "NSManagedObject+MagicalFinders.h" +#import "MagicalRecord+ErrorHandling.h" @implementation NSManagedObject (MagicalAggregation) diff --git a/MagicalRecord/Categories/NSManagedObject/NSManagedObject+MagicalFinders.m b/MagicalRecord/Categories/NSManagedObject/NSManagedObject+MagicalFinders.m index 15a21aa2a..01c623db8 100644 --- a/MagicalRecord/Categories/NSManagedObject/NSManagedObject+MagicalFinders.m +++ b/MagicalRecord/Categories/NSManagedObject/NSManagedObject+MagicalFinders.m @@ -7,6 +7,9 @@ // #import "NSManagedObject+MagicalFinders.h" +#import "NSManagedObject+MagicalRequests.h" +#import "NSManagedObject+MagicalRecord.h" +#import "NSManagedObjectContext+MagicalThreading.h" @implementation NSManagedObject (MagicalFinders) diff --git a/MagicalRecord/Categories/NSManagedObject/NSManagedObject+MagicalRequests.m b/MagicalRecord/Categories/NSManagedObject/NSManagedObject+MagicalRequests.m index 8cbc399f5..d572ee8ae 100644 --- a/MagicalRecord/Categories/NSManagedObject/NSManagedObject+MagicalRequests.m +++ b/MagicalRecord/Categories/NSManagedObject/NSManagedObject+MagicalRequests.m @@ -7,6 +7,8 @@ // #import "NSManagedObject+MagicalRequests.h" +#import "NSManagedObject+MagicalRecord.h" +#import "NSManagedObjectContext+MagicalThreading.h" @implementation NSManagedObject (MagicalRequests) diff --git a/MagicalRecord/Categories/NSManagedObjectContext/NSManagedObjectContext+MagicalObserving.m b/MagicalRecord/Categories/NSManagedObjectContext/NSManagedObjectContext+MagicalObserving.m index c6f3d7dd2..03d0ba8be 100644 --- a/MagicalRecord/Categories/NSManagedObjectContext/NSManagedObjectContext+MagicalObserving.m +++ b/MagicalRecord/Categories/NSManagedObjectContext/NSManagedObjectContext+MagicalObserving.m @@ -7,6 +7,9 @@ // #import "NSManagedObjectContext+MagicalObserving.h" +#import "NSManagedObjectContext+MagicalRecord.h" +#import "MagicalRecord.h" +#import "MagicalRecord+iCloud.h" static void const * kMagicalRecordNotifiesMainContextAssociatedValueKey = @"kMagicalRecordNotifiesMainContextOnSave"; NSString * const kMagicalRecordDidMergeChangesFromiCloudNotification = @"kMagicalRecordDidMergeChangesFromiCloudNotification"; diff --git a/MagicalRecord/Categories/NSManagedObjectContext/NSManagedObjectContext+MagicalSaves.m b/MagicalRecord/Categories/NSManagedObjectContext/NSManagedObjectContext+MagicalSaves.m index c41b47cce..4f19c7c22 100644 --- a/MagicalRecord/Categories/NSManagedObjectContext/NSManagedObjectContext+MagicalSaves.m +++ b/MagicalRecord/Categories/NSManagedObjectContext/NSManagedObjectContext+MagicalSaves.m @@ -7,6 +7,9 @@ // #import "NSManagedObjectContext+MagicalSaves.h" +#import "MagicalRecord+ErrorHandling.h" +#import "NSManagedObjectContext+MagicalRecord.h" +#import "MagicalRecord.h" @interface NSManagedObjectContext (InternalMagicalSaves) diff --git a/MagicalRecord/Categories/NSManagedObjectContext/NSManagedObjectContext+MagicalThreading.m b/MagicalRecord/Categories/NSManagedObjectContext/NSManagedObjectContext+MagicalThreading.m index b2ad3d742..1e032852b 100644 --- a/MagicalRecord/Categories/NSManagedObjectContext/NSManagedObjectContext+MagicalThreading.m +++ b/MagicalRecord/Categories/NSManagedObjectContext/NSManagedObjectContext+MagicalThreading.m @@ -7,6 +7,8 @@ // #import "NSManagedObjectContext+MagicalThreading.h" +#import "NSManagedObject+MagicalRecord.h" +#import "NSManagedObjectContext+MagicalRecord.h" static NSString const * kMagicalRecordManagedObjectContextKey = @"MagicalRecord_NSManagedObjectContextForThreadKey"; diff --git a/MagicalRecord/Core/MagicalRecord+Setup.m b/MagicalRecord/Core/MagicalRecord+Setup.m index c29a7cc36..1d5c1fdeb 100644 --- a/MagicalRecord/Core/MagicalRecord+Setup.m +++ b/MagicalRecord/Core/MagicalRecord+Setup.m @@ -7,6 +7,9 @@ // #import "MagicalRecord+Setup.h" +#import "NSManagedObject+MagicalRecord.h" +#import "NSPersistentStoreCoordinator+MagicalRecord.h" +#import "NSManagedObjectContext+MagicalRecord.h" @implementation MagicalRecord (Setup) diff --git a/MagicalRecord/Core/MagicalRecord+ShorthandSupport.h b/MagicalRecord/Core/MagicalRecord+ShorthandSupport.h index a4be81313..f283599ad 100644 --- a/MagicalRecord/Core/MagicalRecord+ShorthandSupport.h +++ b/MagicalRecord/Core/MagicalRecord+ShorthandSupport.h @@ -10,6 +10,8 @@ @interface MagicalRecord (ShorthandSupport) +#ifdef MR_SHORTHAND + (void) swizzleShorthandMethods; +#endif @end diff --git a/MagicalRecord/Core/MagicalRecord+iCloud.m b/MagicalRecord/Core/MagicalRecord+iCloud.m index 9cb2e8510..bcaf0dc4d 100644 --- a/MagicalRecord/Core/MagicalRecord+iCloud.m +++ b/MagicalRecord/Core/MagicalRecord+iCloud.m @@ -7,6 +7,8 @@ // #import "MagicalRecord+iCloud.h" +#import "NSPersistentStoreCoordinator+MagicalRecord.h" +#import "NSManagedObjectContext+MagicalRecord.h" static BOOL _iCloudEnabled = NO; diff --git a/MagicalRecord/Core/MagicalRecord.h b/MagicalRecord/Core/MagicalRecord.h index 29c348f1e..a9eee09ea 100644 --- a/MagicalRecord/Core/MagicalRecord.h +++ b/MagicalRecord/Core/MagicalRecord.h @@ -9,6 +9,30 @@ #define MAC_PLATFORM_ONLY YES #endif +// enable to use caches for the fetchedResultsControllers (iOS only) +// #define STORE_USE_CACHE + +#define kCreateNewCoordinatorOnBackgroundOperations 0 + +#ifndef MR_ENABLE_ACTIVE_RECORD_LOGGING + #ifdef DEBUG + #define MR_ENABLE_ACTIVE_RECORD_LOGGING 1 + #else + #define MR_ENABLE_ACTIVE_RECORD_LOGGING 0 + #endif +#endif + +#if MR_ENABLE_ACTIVE_RECORD_LOGGING != 0 + #ifdef LOG_VERBOSE + extern int ddLogLevel; + #define MRLog(...) DDLogVerbose(__VA_ARGS__) + #else + #define MRLog(...) NSLog(@"%s(%p) %@", __PRETTY_FUNCTION__, self, [NSString stringWithFormat:__VA_ARGS__]) + #endif +#else + #define MRLog(...) ((void)0) +#endif + #ifdef NS_BLOCKS_AVAILABLE @class NSManagedObjectContext; diff --git a/MagicalRecord/CoreData+MagicalRecord.h b/MagicalRecord/CoreData+MagicalRecord.h index 7d4729086..e73d595e1 100644 --- a/MagicalRecord/CoreData+MagicalRecord.h +++ b/MagicalRecord/CoreData+MagicalRecord.h @@ -1,38 +1,14 @@ -// enable to use caches for the fetchedResultsControllers (iOS only) -// #define STORE_USE_CACHE - -#define kCreateNewCoordinatorOnBackgroundOperations 0 - -#ifndef MR_ENABLE_ACTIVE_RECORD_LOGGING - #ifdef DEBUG - #define MR_ENABLE_ACTIVE_RECORD_LOGGING 1 - #else - #define MR_ENABLE_ACTIVE_RECORD_LOGGING 0 - #endif -#endif - -#ifdef __OBJC__ - -#if MR_ENABLE_ACTIVE_RECORD_LOGGING != 0 -#ifdef LOG_VERBOSE - #define MRLog(...) DDLogVerbose(__VA_ARGS__) -#else - #define MRLog(...) NSLog(@"%s(%p) %@", __PRETTY_FUNCTION__, self, [NSString stringWithFormat:__VA_ARGS__]) -#endif -#else - #define MRLog(...) ((void)0) -#endif - - #ifndef NS_BLOCKS_AVAILABLE -#warning MagicalRecord requires blocks + #warning MagicalRecord requires blocks #endif +#ifdef __OBJC__ // #if !( __has_feature(objc_arc) && __has_feature(objc_arc_weak) ) // #error MagicalRecord now requires ARC to be enabled // #endif + #import #import #ifdef MR_SHORTHAND @@ -69,3 +45,18 @@ #import "NSEntityDescription+MagicalDataImport.h" #endif +g.h" + #import "NSPersistentStoreCoordinator+MagicalRecord.h" + #import "NSManagedObjectModel+MagicalRecord.h" + #import "NSPersistentStore+MagicalRecord.h" + + #import "MagicalImportFunctions.h" + #import "NSManagedObject+MagicalDataImport.h" + #import "NSNumber+MagicalDataImport.h" + #import "NSObject+MagicalDataImport.h" + #import "NSString+MagicalDataImport.h" + #import "NSAttributeDescription+MagicalDataImport.h" + #import "NSRelationshipDescription+MagicalDataImport.h" + #import "NSEntityDescription+MagicalDataImport.h" + +#endif diff --git a/Project Files/Magical Record.xcodeproj/project.pbxproj b/Project Files/Magical Record.xcodeproj/project.pbxproj index 135d48972..69e69a55f 100644 --- a/Project Files/Magical Record.xcodeproj/project.pbxproj +++ b/Project Files/Magical Record.xcodeproj/project.pbxproj @@ -25,13 +25,12 @@ C721C80713D0C3CD0097AB6F /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = C721C80513D0C3CD0097AB6F /* InfoPlist.strings */; }; C721C82413D0C45E0097AB6F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C721C7E313D0C3A00097AB6F /* Foundation.framework */; }; C721C82513D0C4660097AB6F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C721C7E313D0C3A00097AB6F /* Foundation.framework */; }; - C721C83C13D0C6390097AB6F /* GHUnitIOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C721C82F13D0C6390097AB6F /* GHUnitIOS.framework */; }; - C721C83D13D0C6390097AB6F /* OCHamcrestIOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C721C83013D0C6390097AB6F /* OCHamcrestIOS.framework */; }; - C721C84E13D0C6460097AB6F /* GHUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C721C84113D0C6460097AB6F /* GHUnit.framework */; }; C738127A1410398A0054EEF0 /* ImportSingleEntityRelatedToManyMappedEntitiesUsingListOfPrimaryKeysTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C73812781410383B0054EEF0 /* ImportSingleEntityRelatedToManyMappedEntitiesUsingListOfPrimaryKeysTests.m */; }; C738127B141039900054EEF0 /* SingleEntityRelatedToManyMappedEntitiesUsingListOfPrimaryKeys.json in Resources */ = {isa = PBXBuildFile; fileRef = C7381275141037E80054EEF0 /* SingleEntityRelatedToManyMappedEntitiesUsingListOfPrimaryKeys.json */; }; + C74F8E601555E39D0008B054 /* GHUnitIOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C74F8E541555E39D0008B054 /* GHUnitIOS.framework */; }; + C74F8E611555E39D0008B054 /* OCHamcrestIOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C74F8E551555E39D0008B054 /* OCHamcrestIOS.framework */; }; + C74F8E621555E39D0008B054 /* libOCMock.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C74F8E5F1555E39D0008B054 /* libOCMock.a */; }; C753897413DB61CE002B2F57 /* GHUnitTestMain.m in Sources */ = {isa = PBXBuildFile; fileRef = C753897313DB61CE002B2F57 /* GHUnitTestMain.m */; }; - C753897613DB6322002B2F57 /* GHUnit.framework in Copy GHUnit into App Bundle */ = {isa = PBXBuildFile; fileRef = C721C84113D0C6460097AB6F /* GHUnit.framework */; }; C75C7D6B147220D400D0C2FE /* generateShorthandFile.rb in Resources */ = {isa = PBXBuildFile; fileRef = C75C7D69147220D300D0C2FE /* generateShorthandFile.rb */; }; C763783213E10BEC0009A6CA /* GHUnitIOSTestMain.m in Sources */ = {isa = PBXBuildFile; fileRef = C763783113E10BEC0009A6CA /* GHUnitIOSTestMain.m */; }; C76AF7E513DBC08F00CE2E05 /* FixtureHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = C77E5FBA13D0D2AE00298F87 /* FixtureHelpers.m */; }; @@ -44,8 +43,6 @@ C76AF7EC13DBC08F00CE2E05 /* NSManagedObjectHelperTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C70B6E7C13D0F69A00709450 /* NSManagedObjectHelperTests.m */; }; C76AF7ED13DBC09800CE2E05 /* SampleJSONDataForImport.json in Resources */ = {isa = PBXBuildFile; fileRef = C77E5FB413D0D1EC00298F87 /* SampleJSONDataForImport.json */; }; C76AF7EE13DBC09B00CE2E05 /* SingleEntityWithNoRelationships.plist in Resources */ = {isa = PBXBuildFile; fileRef = C77E5FB213D0D1D100298F87 /* SingleEntityWithNoRelationships.plist */; }; - C76AF7F213DBC12500CE2E05 /* OCHamcrest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C721C84213D0C6460097AB6F /* OCHamcrest.framework */; }; - C76AF7F413DBC34300CE2E05 /* OCHamcrest.framework in Copy OCHamcrest into App Bundle */ = {isa = PBXBuildFile; fileRef = C721C84213D0C6460097AB6F /* OCHamcrest.framework */; }; C76AF7FB13DBEB5500CE2E05 /* ImportSingleRelatedEntityTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C76AF7FA13DBEB5500CE2E05 /* ImportSingleRelatedEntityTests.m */; }; C76AF7FC13DBEB5500CE2E05 /* ImportSingleRelatedEntityTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C76AF7FA13DBEB5500CE2E05 /* ImportSingleRelatedEntityTests.m */; }; C76AF82A13DBEE5A00CE2E05 /* SingleRelatedEntity.json in Resources */ = {isa = PBXBuildFile; fileRef = C76AF82913DBEE5A00CE2E05 /* SingleRelatedEntity.json */; }; @@ -60,8 +57,6 @@ C77E5FBB13D0D2AE00298F87 /* FixtureHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = C77E5FBA13D0D2AE00298F87 /* FixtureHelpers.m */; }; C784349013F0FEE000463CEE /* _MappedEntity.m in Sources */ = {isa = PBXBuildFile; fileRef = C784348C13F0FEE000463CEE /* _MappedEntity.m */; }; C784349213F0FEE000463CEE /* MappedEntity.m in Sources */ = {isa = PBXBuildFile; fileRef = C784348E13F0FEE000463CEE /* MappedEntity.m */; }; - C789901B150692140016F493 /* OCMock.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FD73E54814AC4D9A00922CA4 /* OCMock.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; - C789901C150692860016F493 /* libOCMock.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C721C83B13D0C6390097AB6F /* libOCMock.a */; }; C78990211506937E0016F493 /* MappedEntity.m in Sources */ = {isa = PBXBuildFile; fileRef = C784348E13F0FEE000463CEE /* MappedEntity.m */; }; C7899022150693D50016F493 /* _SingleEntityRelatedToMappedEntityWithSecondaryMappings.m in Sources */ = {isa = PBXBuildFile; fileRef = C78F8FDC13FDC3FD00549DD8 /* _SingleEntityRelatedToMappedEntityWithSecondaryMappings.m */; }; C7899023150693D50016F493 /* _AbstractRelatedEntity.m in Sources */ = {isa = PBXBuildFile; fileRef = C7BD887913DBFA6200274567 /* _AbstractRelatedEntity.m */; }; @@ -176,12 +171,9 @@ C7DD7306150F832B00216827 /* MagicalRecord+ShorthandSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = C7DD72D0150F832A00216827 /* MagicalRecord+ShorthandSupport.m */; }; C7DD7307150F832B00216827 /* MagicalRecord.m in Sources */ = {isa = PBXBuildFile; fileRef = C7DD72D2150F832A00216827 /* MagicalRecord.m */; }; C7DD7308150F832B00216827 /* MagicalRecord.m in Sources */ = {isa = PBXBuildFile; fileRef = C7DD72D2150F832A00216827 /* MagicalRecord.m */; }; - C7E37A7C14157BFE00CE9BF5 /* libOCMock.a in CopyFiles */ = {isa = PBXBuildFile; fileRef = C721C83B13D0C6390097AB6F /* libOCMock.a */; }; C7E736DF1402FE64005657C9 /* SingleEntityWithNoRelationships.json in Resources */ = {isa = PBXBuildFile; fileRef = C7E736DE1402FE64005657C9 /* SingleEntityWithNoRelationships.json */; }; C7F5EEB2148DC76700964607 /* (null) in Sources */ = {isa = PBXBuildFile; }; - FD73E53F14AC462F00922CA4 /* OCMock.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C721C84313D0C6460097AB6F /* OCMock.framework */; }; FD73E54614AC4AC700922CA4 /* MagicalDataImportTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = C7913B9C13FAFC13007E09CC /* MagicalDataImportTestCase.m */; }; - FD73E54914AC4D9A00922CA4 /* OCMock.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = FD73E54814AC4D9A00922CA4 /* OCMock.framework */; }; /* End PBXBuildFile section */ /* Begin PBXBuildRule section */ @@ -204,7 +196,6 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - C753897613DB6322002B2F57 /* GHUnit.framework in Copy GHUnit into App Bundle */, ); name = "Copy GHUnit into App Bundle"; runOnlyForDeploymentPostprocessing = 0; @@ -215,7 +206,6 @@ dstPath = ""; dstSubfolderSpec = 16; files = ( - C76AF7F413DBC34300CE2E05 /* OCHamcrest.framework in Copy OCHamcrest into App Bundle */, ); name = "Copy OCHamcrest into App Bundle"; runOnlyForDeploymentPostprocessing = 0; @@ -226,7 +216,6 @@ dstPath = "$(BUILT_PRODUCTS_DIR)"; dstSubfolderSpec = 0; files = ( - C7E37A7C14157BFE00CE9BF5 /* libOCMock.a in CopyFiles */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -236,7 +225,6 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - FD73E54914AC4D9A00922CA4 /* OCMock.framework in CopyFiles */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -265,12 +253,6 @@ C721C80413D0C3CD0097AB6F /* iOS App Unit Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "iOS App Unit Tests-Info.plist"; sourceTree = ""; }; C721C80613D0C3CD0097AB6F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; C721C80A13D0C3CD0097AB6F /* iOS App Unit Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "iOS App Unit Tests-Prefix.pch"; sourceTree = ""; }; - C721C82F13D0C6390097AB6F /* GHUnitIOS.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = GHUnitIOS.framework; sourceTree = ""; }; - C721C83013D0C6390097AB6F /* OCHamcrestIOS.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = OCHamcrestIOS.framework; sourceTree = ""; }; - C721C83B13D0C6390097AB6F /* libOCMock.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libOCMock.a; sourceTree = ""; }; - C721C84113D0C6460097AB6F /* GHUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = GHUnit.framework; sourceTree = ""; }; - C721C84213D0C6460097AB6F /* OCHamcrest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = OCHamcrest.framework; sourceTree = ""; }; - C721C84313D0C6460097AB6F /* OCMock.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = OCMock.framework; sourceTree = ""; }; C721C84713D0C6460097AB6F /* NSNotificationCenter+OCMAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSNotificationCenter+OCMAdditions.h"; sourceTree = ""; }; C721C84813D0C6460097AB6F /* OCMArg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMArg.h; sourceTree = ""; }; C721C84913D0C6460097AB6F /* OCMConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMConstraint.h; sourceTree = ""; }; @@ -280,6 +262,15 @@ C721C84D13D0C6460097AB6F /* libOCMock.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libOCMock.a; sourceTree = ""; }; C7381275141037E80054EEF0 /* SingleEntityRelatedToManyMappedEntitiesUsingListOfPrimaryKeys.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = SingleEntityRelatedToManyMappedEntitiesUsingListOfPrimaryKeys.json; path = "Unit Tests/Fixtures/SingleEntityRelatedToManyMappedEntitiesUsingListOfPrimaryKeys.json"; sourceTree = ""; }; C73812781410383B0054EEF0 /* ImportSingleEntityRelatedToManyMappedEntitiesUsingListOfPrimaryKeysTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ImportSingleEntityRelatedToManyMappedEntitiesUsingListOfPrimaryKeysTests.m; path = "Unit Tests/Fixtures/ImportSingleEntityRelatedToManyMappedEntitiesUsingListOfPrimaryKeysTests.m"; sourceTree = ""; }; + C74F8E541555E39D0008B054 /* GHUnitIOS.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = GHUnitIOS.framework; sourceTree = ""; }; + C74F8E551555E39D0008B054 /* OCHamcrestIOS.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = OCHamcrestIOS.framework; sourceTree = ""; }; + C74F8E591555E39D0008B054 /* NSNotificationCenter+OCMAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSNotificationCenter+OCMAdditions.h"; sourceTree = ""; }; + C74F8E5A1555E39D0008B054 /* OCMArg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMArg.h; sourceTree = ""; }; + C74F8E5B1555E39D0008B054 /* OCMConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMConstraint.h; sourceTree = ""; }; + C74F8E5C1555E39D0008B054 /* OCMock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMock.h; sourceTree = ""; }; + C74F8E5D1555E39D0008B054 /* OCMockObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMockObject.h; sourceTree = ""; }; + C74F8E5E1555E39D0008B054 /* OCMockRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMockRecorder.h; sourceTree = ""; }; + C74F8E5F1555E39D0008B054 /* libOCMock.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libOCMock.a; sourceTree = ""; }; C753897313DB61CE002B2F57 /* GHUnitTestMain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GHUnitTestMain.m; sourceTree = ""; }; C75C7D69147220D300D0C2FE /* generateShorthandFile.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = generateShorthandFile.rb; sourceTree = ""; }; C763783113E10BEC0009A6CA /* GHUnitIOSTestMain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GHUnitIOSTestMain.m; sourceTree = ""; }; @@ -408,7 +399,6 @@ C7DD72D3150F832A00216827 /* MagicalRecordShorthand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MagicalRecordShorthand.h; sourceTree = ""; }; C7DD72D4150F832A00216827 /* CoreData+MagicalRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CoreData+MagicalRecord.h"; sourceTree = ""; }; C7E736DE1402FE64005657C9 /* SingleEntityWithNoRelationships.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = SingleEntityWithNoRelationships.json; path = "Unit Tests/Fixtures/SingleEntityWithNoRelationships.json"; sourceTree = ""; }; - FD73E54814AC4D9A00922CA4 /* OCMock.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OCMock.framework; path = "../../Mac App Unit Tests/Frameworks/OCMock.framework"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -418,9 +408,6 @@ files = ( C721C7DF13D0C3A00097AB6F /* Cocoa.framework in Frameworks */, C721C82413D0C45E0097AB6F /* Foundation.framework in Frameworks */, - C76AF7F213DBC12500CE2E05 /* OCHamcrest.framework in Frameworks */, - C721C84E13D0C6460097AB6F /* GHUnit.framework in Frameworks */, - FD73E53F14AC462F00922CA4 /* OCMock.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -432,10 +419,9 @@ C77E5F9E13D0CA2100298F87 /* CoreGraphics.framework in Frameworks */, C721C82513D0C4660097AB6F /* Foundation.framework in Frameworks */, C77E5F9B13D0CA0A00298F87 /* CoreData.framework in Frameworks */, - C721C83C13D0C6390097AB6F /* GHUnitIOS.framework in Frameworks */, - C721C83D13D0C6390097AB6F /* OCHamcrestIOS.framework in Frameworks */, - C789901C150692860016F493 /* libOCMock.a in Frameworks */, - C789901B150692140016F493 /* OCMock.framework in Frameworks */, + C74F8E601555E39D0008B054 /* GHUnitIOS.framework in Frameworks */, + C74F8E611555E39D0008B054 /* OCHamcrestIOS.framework in Frameworks */, + C74F8E621555E39D0008B054 /* libOCMock.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -518,31 +504,19 @@ C721C82E13D0C6390097AB6F /* Frameworks */ = { isa = PBXGroup; children = ( - FD73E54814AC4D9A00922CA4 /* OCMock.framework */, + C74F8E541555E39D0008B054 /* GHUnitIOS.framework */, + C74F8E551555E39D0008B054 /* OCHamcrestIOS.framework */, + C74F8E561555E39D0008B054 /* OCMockLibrary */, C77E5F9F13D0CA2700298F87 /* UIKit.framework */, C77E5F9C13D0CA1800298F87 /* CoreGraphics.framework */, - C721C82F13D0C6390097AB6F /* GHUnitIOS.framework */, - C721C83013D0C6390097AB6F /* OCHamcrestIOS.framework */, - C721C83213D0C6390097AB6F /* OCMockLibrary */, ); path = Frameworks; sourceTree = ""; }; - C721C83213D0C6390097AB6F /* OCMockLibrary */ = { - isa = PBXGroup; - children = ( - C721C83B13D0C6390097AB6F /* libOCMock.a */, - ); - path = OCMockLibrary; - sourceTree = ""; - }; C721C84013D0C6460097AB6F /* Frameworks */ = { isa = PBXGroup; children = ( C721C7DE13D0C3A00097AB6F /* Cocoa.framework */, - C721C84113D0C6460097AB6F /* GHUnit.framework */, - C721C84213D0C6460097AB6F /* OCHamcrest.framework */, - C721C84313D0C6460097AB6F /* OCMock.framework */, C721C84413D0C6460097AB6F /* OCMockLibrary */, ); path = Frameworks; @@ -578,6 +552,36 @@ path = OCMock; sourceTree = ""; }; + C74F8E561555E39D0008B054 /* OCMockLibrary */ = { + isa = PBXGroup; + children = ( + C74F8E571555E39D0008B054 /* Headers */, + C74F8E5F1555E39D0008B054 /* libOCMock.a */, + ); + path = OCMockLibrary; + sourceTree = ""; + }; + C74F8E571555E39D0008B054 /* Headers */ = { + isa = PBXGroup; + children = ( + C74F8E581555E39D0008B054 /* OCMock */, + ); + path = Headers; + sourceTree = ""; + }; + C74F8E581555E39D0008B054 /* OCMock */ = { + isa = PBXGroup; + children = ( + C74F8E591555E39D0008B054 /* NSNotificationCenter+OCMAdditions.h */, + C74F8E5A1555E39D0008B054 /* OCMArg.h */, + C74F8E5B1555E39D0008B054 /* OCMConstraint.h */, + C74F8E5C1555E39D0008B054 /* OCMock.h */, + C74F8E5D1555E39D0008B054 /* OCMockObject.h */, + C74F8E5E1555E39D0008B054 /* OCMockRecorder.h */, + ); + path = OCMock; + sourceTree = ""; + }; C76AF7F513DBC6E900CE2E05 /* Data Import Tests */ = { isa = PBXGroup; children = ( diff --git a/Project Files/Unit Tests/ImportSingleEntityWithNoRelationshipsTests.m b/Project Files/Unit Tests/ImportSingleEntityWithNoRelationshipsTests.m index 60180cd25..fb0cb594c 100644 --- a/Project Files/Unit Tests/ImportSingleEntityWithNoRelationshipsTests.m +++ b/Project Files/Unit Tests/ImportSingleEntityWithNoRelationshipsTests.m @@ -152,7 +152,7 @@ - (void) testImportDateAttributeToEntity assertThat(testEntity.dateTestAttribute, is(equalTo(expectedDate))); } -- (void) testImportDataAttributeWithCustomFormat +- (void) testImportDateAttributeWithCustomFormat { NSDate *expectedDate = [self dateFromString:@"2011-08-05 00:56:04 +0000"]; assertThat(testEntity.dateWithCustomFormat, is(equalTo(expectedDate))); diff --git a/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Headers b/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Headers new file mode 120000 index 000000000..a177d2a6b --- /dev/null +++ b/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers \ No newline at end of file diff --git a/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/OCMock b/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/OCMock new file mode 120000 index 000000000..c388ea8df --- /dev/null +++ b/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/OCMock @@ -0,0 +1 @@ +Versions/Current/OCMock \ No newline at end of file diff --git a/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Resources b/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Resources new file mode 120000 index 000000000..953ee36f3 --- /dev/null +++ b/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/A/Headers/NSNotificationCenter+OCMAdditions.h b/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/A/Headers/NSNotificationCenter+OCMAdditions.h new file mode 100644 index 000000000..ab4832bbf --- /dev/null +++ b/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/A/Headers/NSNotificationCenter+OCMAdditions.h @@ -0,0 +1,15 @@ +//--------------------------------------------------------------------------------------- +// $Id$ +// Copyright (c) 2009 by Mulle Kybernetik. See License file for details. +//--------------------------------------------------------------------------------------- + +#import + +@class OCMockObserver; + + +@interface NSNotificationCenter(OCMAdditions) + +- (void)addMockObserver:(OCMockObserver *)notificationObserver name:(NSString *)notificationName object:(id)notificationSender; + +@end diff --git a/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/A/Headers/OCMArg.h b/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/A/Headers/OCMArg.h new file mode 100644 index 000000000..669c09487 --- /dev/null +++ b/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/A/Headers/OCMArg.h @@ -0,0 +1,33 @@ +//--------------------------------------------------------------------------------------- +// $Id$ +// Copyright (c) 2009-2010 by Mulle Kybernetik. See License file for details. +//--------------------------------------------------------------------------------------- + +#import + +@interface OCMArg : NSObject + +// constraining arguments + ++ (id)any; ++ (void *)anyPointer; ++ (id)isNil; ++ (id)isNotNil; ++ (id)isNotEqual:(id)value; ++ (id)checkWithSelector:(SEL)selector onObject:(id)anObject; +#if NS_BLOCKS_AVAILABLE ++ (id)checkWithBlock:(BOOL (^)(id))block; +#endif + +// manipulating arguments + ++ (id *)setTo:(id)value; + +// internal use only + ++ (id)resolveSpecialValues:(NSValue *)value; + +@end + +#define OCMOCK_ANY [OCMArg any] +#define OCMOCK_VALUE(variable) [NSValue value:&variable withObjCType:@encode(__typeof__(variable))] diff --git a/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/A/Headers/OCMConstraint.h b/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/A/Headers/OCMConstraint.h new file mode 100644 index 000000000..3ae126460 --- /dev/null +++ b/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/A/Headers/OCMConstraint.h @@ -0,0 +1,64 @@ +//--------------------------------------------------------------------------------------- +// $Id$ +// Copyright (c) 2007-2010 by Mulle Kybernetik. See License file for details. +//--------------------------------------------------------------------------------------- + +#import + + +@interface OCMConstraint : NSObject + ++ (id)constraint; +- (BOOL)evaluate:(id)value; + +// if you are looking for any, isNil, etc, they have moved to OCMArg + +// try to use [OCMArg checkWith...] instead of the constraintWith... methods below + ++ (id)constraintWithSelector:(SEL)aSelector onObject:(id)anObject; ++ (id)constraintWithSelector:(SEL)aSelector onObject:(id)anObject withValue:(id)aValue; + + +@end + +@interface OCMAnyConstraint : OCMConstraint +@end + +@interface OCMIsNilConstraint : OCMConstraint +@end + +@interface OCMIsNotNilConstraint : OCMConstraint +@end + +@interface OCMIsNotEqualConstraint : OCMConstraint +{ + @public + id testValue; +} + +@end + +@interface OCMInvocationConstraint : OCMConstraint +{ + @public + NSInvocation *invocation; +} + +@end + +#if NS_BLOCKS_AVAILABLE + +@interface OCMBlockConstraint : OCMConstraint +{ + BOOL (^block)(id); +} + +- (id)initWithConstraintBlock:(BOOL (^)(id))block; + +@end + +#endif + + +#define CONSTRAINT(aSelector) [OCMConstraint constraintWithSelector:aSelector onObject:self] +#define CONSTRAINTV(aSelector, aValue) [OCMConstraint constraintWithSelector:aSelector onObject:self withValue:(aValue)] diff --git a/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/A/Headers/OCMock.h b/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/A/Headers/OCMock.h new file mode 100644 index 000000000..e18de58a1 --- /dev/null +++ b/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/A/Headers/OCMock.h @@ -0,0 +1,10 @@ +//--------------------------------------------------------------------------------------- +// $Id$ +// Copyright (c) 2004-2008 by Mulle Kybernetik. See License file for details. +//--------------------------------------------------------------------------------------- + +#import +#import +#import +#import +#import diff --git a/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/A/Headers/OCMockObject.h b/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/A/Headers/OCMockObject.h new file mode 100644 index 000000000..ebd2ba35e --- /dev/null +++ b/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/A/Headers/OCMockObject.h @@ -0,0 +1,43 @@ +//--------------------------------------------------------------------------------------- +// $Id$ +// Copyright (c) 2004-2008 by Mulle Kybernetik. See License file for details. +//--------------------------------------------------------------------------------------- + +#import + +@interface OCMockObject : NSProxy +{ + BOOL isNice; + BOOL expectationOrderMatters; + NSMutableArray *recorders; + NSMutableArray *expectations; + NSMutableArray *rejections; + NSMutableArray *exceptions; +} + ++ (id)mockForClass:(Class)aClass; ++ (id)mockForProtocol:(Protocol *)aProtocol; ++ (id)partialMockForObject:(NSObject *)anObject; + ++ (id)niceMockForClass:(Class)aClass; ++ (id)niceMockForProtocol:(Protocol *)aProtocol; + ++ (id)observerMock; + +- (id)init; + +- (void)setExpectationOrderMatters:(BOOL)flag; + +- (id)stub; +- (id)expect; +- (id)reject; + +- (void)verify; + +// internal use only + +- (id)getNewRecorder; +- (BOOL)handleInvocation:(NSInvocation *)anInvocation; +- (void)handleUnRecordedInvocation:(NSInvocation *)anInvocation; + +@end diff --git a/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/A/Headers/OCMockRecorder.h b/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/A/Headers/OCMockRecorder.h new file mode 100644 index 000000000..b11a25387 --- /dev/null +++ b/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/A/Headers/OCMockRecorder.h @@ -0,0 +1,32 @@ +//--------------------------------------------------------------------------------------- +// $Id$ +// Copyright (c) 2004-2010 by Mulle Kybernetik. See License file for details. +//--------------------------------------------------------------------------------------- + +#import + +@interface OCMockRecorder : NSProxy +{ + id signatureResolver; + NSInvocation *recordedInvocation; + NSMutableArray *invocationHandlers; +} + +- (id)initWithSignatureResolver:(id)anObject; + +- (BOOL)matchesInvocation:(NSInvocation *)anInvocation; +- (void)releaseInvocation; + +- (id)andReturn:(id)anObject; +- (id)andReturnValue:(NSValue *)aValue; +- (id)andThrow:(NSException *)anException; +- (id)andPost:(NSNotification *)aNotification; +- (id)andCall:(SEL)selector onObject:(id)anObject; +#if NS_BLOCKS_AVAILABLE +- (id)andDo:(void (^)(NSInvocation *))block; +#endif +- (id)andForwardToRealObject; + +- (NSArray *)invocationHandlers; + +@end diff --git a/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/A/OCMock b/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/A/OCMock new file mode 100755 index 000000000..717447156 Binary files /dev/null and b/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/A/OCMock differ diff --git a/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/A/Resources/Info.plist b/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/A/Resources/Info.plist new file mode 100644 index 000000000..a1e931a3a --- /dev/null +++ b/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,42 @@ + + + + + BuildMachineOSBuild + 10K549 + CFBundleDevelopmentRegion + English + CFBundleExecutable + OCMock + CFBundleIdentifier + com.mulle-kybernetik.OCMock + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + OCMock + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 4C199 + DTPlatformVersion + GM + DTSDKBuild + 10K549 + DTSDKName + macosx10.6 + DTXcode + 0420 + DTXcodeBuild + 4C199 + NSHumanReadableCopyright + Copyright © 2004-2011 Mulle Kybernetik. + + diff --git a/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/A/Resources/en.lproj/InfoPlist.strings b/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/A/Resources/en.lproj/InfoPlist.strings new file mode 100644 index 000000000..5e45963c3 Binary files /dev/null and b/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/A/Resources/en.lproj/InfoPlist.strings differ diff --git a/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/Current b/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/Current new file mode 120000 index 000000000..8c7e5a667 --- /dev/null +++ b/Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/Project Files/iOS App Unit Tests/Frameworks/OCMockLibrary/libOCMock.a b/Project Files/iOS App Unit Tests/Frameworks/OCMockLibrary/libOCMock.a index 9ff9ed272..dae5ac185 100644 Binary files a/Project Files/iOS App Unit Tests/Frameworks/OCMockLibrary/libOCMock.a and b/Project Files/iOS App Unit Tests/Frameworks/OCMockLibrary/libOCMock.a differ