From 4d9353eeb2ab06878fcf4b4971daea5300ae8c7a Mon Sep 17 00:00:00 2001 From: JeanLebrument Date: Thu, 12 Nov 2015 15:04:30 +0100 Subject: [PATCH] Podspec created --- APContactEasyMapping.podspec | 37 + Example/Pods/APAddressBook/LICENSE.txt | 7 + .../Core/Private/Builders/APContactBuilder.h | 19 + .../Core/Private/Builders/APContactBuilder.m | 95 ++ .../Private/Builders/APContactListBuilder.h | 20 + .../Private/Builders/APContactListBuilder.m | 47 + .../Extractors/APContactDataExtractor.h | 36 + .../Extractors/APContactDataExtractor.m | 255 +++++ .../Private/Extractors/APImageExtractor.h | 18 + .../Private/Extractors/APImageExtractor.m | 35 + .../Private/Helpers/APSocialServiceHelper.h | 16 + .../Private/Helpers/APSocialServiceHelper.m | 42 + .../Routine/APAddressBookAccessRoutine.h | 18 + .../Routine/APAddressBookAccessRoutine.m | 49 + .../Routine/APAddressBookContactsRoutine.h | 22 + .../Routine/APAddressBookContactsRoutine.m | 71 ++ .../APAddressBookExternalChangeDelegate.h | 15 + .../APAddressBookExternalChangeRoutine.h | 17 + .../APAddressBookExternalChangeRoutine.m | 60 ++ .../Routine/Base/APAddressBookBaseRoutine.h | 19 + .../Routine/Base/APAddressBookBaseRoutine.m | 27 + .../Pod/Core/Private/Thread/APThread.h | 16 + .../Pod/Core/Private/Thread/APThread.m | 46 + .../Private/Wrapper/APAddressBookRefWrapper.h | 17 + .../Private/Wrapper/APAddressBookRefWrapper.m | 49 + .../Pod/Core/Public/APAddressBook.h | 63 ++ .../Pod/Core/Public/APAddressBook.m | 209 +++++ .../Pod/Core/Public/Models/APAddress.h | 20 + .../Pod/Core/Public/Models/APAddress.m | 13 + .../Pod/Core/Public/Models/APContact.h | 39 + .../Pod/Core/Public/Models/APContact.m | 12 + .../Pod/Core/Public/Models/APEmail.h | 17 + .../Pod/Core/Public/Models/APEmail.m | 13 + .../Pod/Core/Public/Models/APJob.h | 16 + .../Pod/Core/Public/Models/APJob.m | 12 + .../Pod/Core/Public/Models/APName.h | 18 + .../Pod/Core/Public/Models/APName.m | 12 + .../Pod/Core/Public/Models/APPhone.h | 17 + .../Pod/Core/Public/Models/APPhone.m | 21 + .../Pod/Core/Public/Models/APRecordDate.h | 16 + .../Pod/Core/Public/Models/APRecordDate.m | 12 + .../Pod/Core/Public/Models/APRelatedPerson.h | 17 + .../Pod/Core/Public/Models/APRelatedPerson.m | 20 + .../Pod/Core/Public/Models/APSocialProfile.h | 19 + .../Pod/Core/Public/Models/APSocialProfile.m | 13 + .../Pod/Core/Public/Models/APSource.h | 16 + .../Pod/Core/Public/Models/APSource.m | 12 + .../Pod/Core/Public/Models/APTypes.h | 46 + Example/Pods/APAddressBook/README.md | 194 ++++ .../EasyMapping/EKCoreDataImporter.h | 82 ++ .../EasyMapping/EKCoreDataImporter.m | 265 ++++++ .../EasyMapping/EKManagedObjectMapper.h | 101 ++ .../EasyMapping/EKManagedObjectMapper.m | 226 +++++ .../EasyMapping/EKManagedObjectMapping.h | 127 +++ .../EasyMapping/EKManagedObjectMapping.m | 124 +++ .../EasyMapping/EKManagedObjectModel.h | 46 + .../EasyMapping/EKManagedObjectModel.m | 46 + .../Pods/EasyMapping/EasyMapping/EKMapper.h | 71 ++ .../Pods/EasyMapping/EasyMapping/EKMapper.m | 107 +++ .../EasyMapping/EasyMapping/EKMappingBlocks.h | 39 + .../EasyMapping/EasyMapping/EKMappingBlocks.m | 50 + .../EasyMapping/EKMappingProtocol.h | 43 + .../EasyMapping/EasyMapping/EKObjectMapping.h | 293 ++++++ .../EasyMapping/EasyMapping/EKObjectMapping.m | 264 ++++++ .../EasyMapping/EasyMapping/EKObjectModel.h | 43 + .../EasyMapping/EasyMapping/EKObjectModel.m | 49 + .../EasyMapping/EKPropertyHelper.h | 63 ++ .../EasyMapping/EKPropertyHelper.m | 216 +++++ .../EasyMapping/EKPropertyMapping.h | 62 ++ .../EasyMapping/EKPropertyMapping.m | 28 + .../EasyMapping/EKRelationshipMapping.h | 27 + .../EasyMapping/EKRelationshipMapping.m | 39 + .../EasyMapping/EasyMapping/EKSerializer.h | 83 ++ .../EasyMapping/EasyMapping/EKSerializer.m | 194 ++++ .../EasyMapping/EasyMapping/EasyMapping.h | 34 + .../EasyMapping/NSArray+FlattenArray.h | 30 + .../EasyMapping/NSArray+FlattenArray.m | 40 + .../NSDateFormatter+EasyMappingAdditions.h | 45 + .../NSDateFormatter+EasyMappingAdditions.m | 47 + Example/Pods/EasyMapping/LICENSE | 8 + Example/Pods/EasyMapping/README.md | 233 +++++ .../Headers/Private/APAddressBook/APAddress.h | 1 + .../Private/APAddressBook/APAddressBook.h | 1 + .../APAddressBookAccessRoutine.h | 1 + .../APAddressBook/APAddressBookBaseRoutine.h | 1 + .../APAddressBookContactsRoutine.h | 1 + .../APAddressBookExternalChangeDelegate.h | 1 + .../APAddressBookExternalChangeRoutine.h | 1 + .../APAddressBook/APAddressBookRefWrapper.h | 1 + .../Headers/Private/APAddressBook/APContact.h | 1 + .../Private/APAddressBook/APContactBuilder.h | 1 + .../APAddressBook/APContactDataExtractor.h | 1 + .../APAddressBook/APContactListBuilder.h | 1 + .../Headers/Private/APAddressBook/APEmail.h | 1 + .../Private/APAddressBook/APImageExtractor.h | 1 + .../Headers/Private/APAddressBook/APJob.h | 1 + .../Headers/Private/APAddressBook/APName.h | 1 + .../Headers/Private/APAddressBook/APPhone.h | 1 + .../Private/APAddressBook/APRecordDate.h | 1 + .../Private/APAddressBook/APRelatedPerson.h | 1 + .../Private/APAddressBook/APSocialProfile.h | 1 + .../APAddressBook/APSocialServiceHelper.h | 1 + .../Headers/Private/APAddressBook/APSource.h | 1 + .../Headers/Private/APAddressBook/APThread.h | 1 + .../Headers/Private/APAddressBook/APTypes.h | 1 + .../Private/EasyMapping/EKCoreDataImporter.h | 1 + .../EasyMapping/EKManagedObjectMapper.h | 1 + .../EasyMapping/EKManagedObjectMapping.h | 1 + .../EasyMapping/EKManagedObjectModel.h | 1 + .../Headers/Private/EasyMapping/EKMapper.h | 1 + .../Private/EasyMapping/EKMappingBlocks.h | 1 + .../Private/EasyMapping/EKMappingProtocol.h | 1 + .../Private/EasyMapping/EKObjectMapping.h | 1 + .../Private/EasyMapping/EKObjectModel.h | 1 + .../Private/EasyMapping/EKPropertyHelper.h | 1 + .../Private/EasyMapping/EKPropertyMapping.h | 1 + .../EasyMapping/EKRelationshipMapping.h | 1 + .../Private/EasyMapping/EKSerializer.h | 1 + .../Headers/Private/EasyMapping/EasyMapping.h | 1 + .../EasyMapping/NSArray+FlattenArray.h | 1 + .../NSDateFormatter+EasyMappingAdditions.h | 1 + .../Headers/Public/APAddressBook/APAddress.h | 1 + .../Public/APAddressBook/APAddressBook.h | 1 + .../APAddressBookAccessRoutine.h | 1 + .../APAddressBook/APAddressBookBaseRoutine.h | 1 + .../APAddressBookContactsRoutine.h | 1 + .../APAddressBookExternalChangeDelegate.h | 1 + .../APAddressBookExternalChangeRoutine.h | 1 + .../APAddressBook/APAddressBookRefWrapper.h | 1 + .../Headers/Public/APAddressBook/APContact.h | 1 + .../Public/APAddressBook/APContactBuilder.h | 1 + .../APAddressBook/APContactDataExtractor.h | 1 + .../APAddressBook/APContactListBuilder.h | 1 + .../Headers/Public/APAddressBook/APEmail.h | 1 + .../Public/APAddressBook/APImageExtractor.h | 1 + .../Pods/Headers/Public/APAddressBook/APJob.h | 1 + .../Headers/Public/APAddressBook/APName.h | 1 + .../Headers/Public/APAddressBook/APPhone.h | 1 + .../Public/APAddressBook/APRecordDate.h | 1 + .../Public/APAddressBook/APRelatedPerson.h | 1 + .../Public/APAddressBook/APSocialProfile.h | 1 + .../APAddressBook/APSocialServiceHelper.h | 1 + .../Headers/Public/APAddressBook/APSource.h | 1 + .../Headers/Public/APAddressBook/APThread.h | 1 + .../Headers/Public/APAddressBook/APTypes.h | 1 + .../Public/EasyMapping/EKCoreDataImporter.h | 1 + .../EasyMapping/EKManagedObjectMapper.h | 1 + .../EasyMapping/EKManagedObjectMapping.h | 1 + .../Public/EasyMapping/EKManagedObjectModel.h | 1 + .../Headers/Public/EasyMapping/EKMapper.h | 1 + .../Public/EasyMapping/EKMappingBlocks.h | 1 + .../Public/EasyMapping/EKMappingProtocol.h | 1 + .../Public/EasyMapping/EKObjectMapping.h | 1 + .../Public/EasyMapping/EKObjectModel.h | 1 + .../Public/EasyMapping/EKPropertyHelper.h | 1 + .../Public/EasyMapping/EKPropertyMapping.h | 1 + .../EasyMapping/EKRelationshipMapping.h | 1 + .../Headers/Public/EasyMapping/EKSerializer.h | 1 + .../Headers/Public/EasyMapping/EasyMapping.h | 1 + .../Public/EasyMapping/NSArray+FlattenArray.h | 1 + .../NSDateFormatter+EasyMappingAdditions.h | 1 + Example/Pods/Manifest.lock | 17 + Example/Pods/Pods.xcodeproj/project.pbxproj | 883 ++++++++++++++++++ .../APAddressBook/APAddressBook-dummy.m | 5 + .../APAddressBook/APAddressBook-prefix.pch | 4 + .../APAddressBook/APAddressBook.xcconfig | 5 + .../EasyMapping/EasyMapping-dummy.m | 5 + .../EasyMapping/EasyMapping-prefix.pch | 4 + .../EasyMapping/EasyMapping.xcconfig | 5 + .../Pods/Pods-acknowledgements.markdown | 26 + .../Pods/Pods-acknowledgements.plist | 60 ++ .../Target Support Files/Pods/Pods-dummy.m | 5 + .../Pods/Pods-frameworks.sh | 84 ++ .../Pods/Pods-resources.sh | 95 ++ .../Pods/Pods.debug.xcconfig | 5 + .../Pods/Pods.release.xcconfig | 5 + .../APContact+EasyMapping.h | 0 .../APContact+EasyMapping.m | 0 .../project.pbxproj | 12 +- .../Base.lproj/Main.storyboard | 8 +- 180 files changed, 6324 insertions(+), 9 deletions(-) create mode 100644 APContactEasyMapping.podspec create mode 100644 Example/Pods/APAddressBook/LICENSE.txt create mode 100644 Example/Pods/APAddressBook/Pod/Core/Private/Builders/APContactBuilder.h create mode 100644 Example/Pods/APAddressBook/Pod/Core/Private/Builders/APContactBuilder.m create mode 100644 Example/Pods/APAddressBook/Pod/Core/Private/Builders/APContactListBuilder.h create mode 100644 Example/Pods/APAddressBook/Pod/Core/Private/Builders/APContactListBuilder.m create mode 100644 Example/Pods/APAddressBook/Pod/Core/Private/Extractors/APContactDataExtractor.h create mode 100644 Example/Pods/APAddressBook/Pod/Core/Private/Extractors/APContactDataExtractor.m create mode 100644 Example/Pods/APAddressBook/Pod/Core/Private/Extractors/APImageExtractor.h create mode 100644 Example/Pods/APAddressBook/Pod/Core/Private/Extractors/APImageExtractor.m create mode 100644 Example/Pods/APAddressBook/Pod/Core/Private/Helpers/APSocialServiceHelper.h create mode 100644 Example/Pods/APAddressBook/Pod/Core/Private/Helpers/APSocialServiceHelper.m create mode 100644 Example/Pods/APAddressBook/Pod/Core/Private/Routine/APAddressBookAccessRoutine.h create mode 100644 Example/Pods/APAddressBook/Pod/Core/Private/Routine/APAddressBookAccessRoutine.m create mode 100644 Example/Pods/APAddressBook/Pod/Core/Private/Routine/APAddressBookContactsRoutine.h create mode 100644 Example/Pods/APAddressBook/Pod/Core/Private/Routine/APAddressBookContactsRoutine.m create mode 100644 Example/Pods/APAddressBook/Pod/Core/Private/Routine/APAddressBookExternalChangeDelegate.h create mode 100644 Example/Pods/APAddressBook/Pod/Core/Private/Routine/APAddressBookExternalChangeRoutine.h create mode 100644 Example/Pods/APAddressBook/Pod/Core/Private/Routine/APAddressBookExternalChangeRoutine.m create mode 100644 Example/Pods/APAddressBook/Pod/Core/Private/Routine/Base/APAddressBookBaseRoutine.h create mode 100644 Example/Pods/APAddressBook/Pod/Core/Private/Routine/Base/APAddressBookBaseRoutine.m create mode 100644 Example/Pods/APAddressBook/Pod/Core/Private/Thread/APThread.h create mode 100644 Example/Pods/APAddressBook/Pod/Core/Private/Thread/APThread.m create mode 100644 Example/Pods/APAddressBook/Pod/Core/Private/Wrapper/APAddressBookRefWrapper.h create mode 100644 Example/Pods/APAddressBook/Pod/Core/Private/Wrapper/APAddressBookRefWrapper.m create mode 100755 Example/Pods/APAddressBook/Pod/Core/Public/APAddressBook.h create mode 100755 Example/Pods/APAddressBook/Pod/Core/Public/APAddressBook.m create mode 100755 Example/Pods/APAddressBook/Pod/Core/Public/Models/APAddress.h create mode 100755 Example/Pods/APAddressBook/Pod/Core/Public/Models/APAddress.m create mode 100755 Example/Pods/APAddressBook/Pod/Core/Public/Models/APContact.h create mode 100755 Example/Pods/APAddressBook/Pod/Core/Public/Models/APContact.m create mode 100644 Example/Pods/APAddressBook/Pod/Core/Public/Models/APEmail.h create mode 100644 Example/Pods/APAddressBook/Pod/Core/Public/Models/APEmail.m create mode 100644 Example/Pods/APAddressBook/Pod/Core/Public/Models/APJob.h create mode 100644 Example/Pods/APAddressBook/Pod/Core/Public/Models/APJob.m create mode 100644 Example/Pods/APAddressBook/Pod/Core/Public/Models/APName.h create mode 100644 Example/Pods/APAddressBook/Pod/Core/Public/Models/APName.m create mode 100755 Example/Pods/APAddressBook/Pod/Core/Public/Models/APPhone.h create mode 100755 Example/Pods/APAddressBook/Pod/Core/Public/Models/APPhone.m create mode 100644 Example/Pods/APAddressBook/Pod/Core/Public/Models/APRecordDate.h create mode 100644 Example/Pods/APAddressBook/Pod/Core/Public/Models/APRecordDate.m create mode 100644 Example/Pods/APAddressBook/Pod/Core/Public/Models/APRelatedPerson.h create mode 100644 Example/Pods/APAddressBook/Pod/Core/Public/Models/APRelatedPerson.m create mode 100644 Example/Pods/APAddressBook/Pod/Core/Public/Models/APSocialProfile.h create mode 100644 Example/Pods/APAddressBook/Pod/Core/Public/Models/APSocialProfile.m create mode 100644 Example/Pods/APAddressBook/Pod/Core/Public/Models/APSource.h create mode 100644 Example/Pods/APAddressBook/Pod/Core/Public/Models/APSource.m create mode 100644 Example/Pods/APAddressBook/Pod/Core/Public/Models/APTypes.h create mode 100644 Example/Pods/APAddressBook/README.md create mode 100644 Example/Pods/EasyMapping/EasyMapping/EKCoreDataImporter.h create mode 100644 Example/Pods/EasyMapping/EasyMapping/EKCoreDataImporter.m create mode 100644 Example/Pods/EasyMapping/EasyMapping/EKManagedObjectMapper.h create mode 100644 Example/Pods/EasyMapping/EasyMapping/EKManagedObjectMapper.m create mode 100644 Example/Pods/EasyMapping/EasyMapping/EKManagedObjectMapping.h create mode 100644 Example/Pods/EasyMapping/EasyMapping/EKManagedObjectMapping.m create mode 100644 Example/Pods/EasyMapping/EasyMapping/EKManagedObjectModel.h create mode 100644 Example/Pods/EasyMapping/EasyMapping/EKManagedObjectModel.m create mode 100644 Example/Pods/EasyMapping/EasyMapping/EKMapper.h create mode 100644 Example/Pods/EasyMapping/EasyMapping/EKMapper.m create mode 100644 Example/Pods/EasyMapping/EasyMapping/EKMappingBlocks.h create mode 100644 Example/Pods/EasyMapping/EasyMapping/EKMappingBlocks.m create mode 100644 Example/Pods/EasyMapping/EasyMapping/EKMappingProtocol.h create mode 100644 Example/Pods/EasyMapping/EasyMapping/EKObjectMapping.h create mode 100644 Example/Pods/EasyMapping/EasyMapping/EKObjectMapping.m create mode 100644 Example/Pods/EasyMapping/EasyMapping/EKObjectModel.h create mode 100644 Example/Pods/EasyMapping/EasyMapping/EKObjectModel.m create mode 100644 Example/Pods/EasyMapping/EasyMapping/EKPropertyHelper.h create mode 100644 Example/Pods/EasyMapping/EasyMapping/EKPropertyHelper.m create mode 100644 Example/Pods/EasyMapping/EasyMapping/EKPropertyMapping.h create mode 100644 Example/Pods/EasyMapping/EasyMapping/EKPropertyMapping.m create mode 100644 Example/Pods/EasyMapping/EasyMapping/EKRelationshipMapping.h create mode 100644 Example/Pods/EasyMapping/EasyMapping/EKRelationshipMapping.m create mode 100644 Example/Pods/EasyMapping/EasyMapping/EKSerializer.h create mode 100644 Example/Pods/EasyMapping/EasyMapping/EKSerializer.m create mode 100644 Example/Pods/EasyMapping/EasyMapping/EasyMapping.h create mode 100644 Example/Pods/EasyMapping/EasyMapping/NSArray+FlattenArray.h create mode 100644 Example/Pods/EasyMapping/EasyMapping/NSArray+FlattenArray.m create mode 100644 Example/Pods/EasyMapping/EasyMapping/NSDateFormatter+EasyMappingAdditions.h create mode 100644 Example/Pods/EasyMapping/EasyMapping/NSDateFormatter+EasyMappingAdditions.m create mode 100644 Example/Pods/EasyMapping/LICENSE create mode 100644 Example/Pods/EasyMapping/README.md create mode 120000 Example/Pods/Headers/Private/APAddressBook/APAddress.h create mode 120000 Example/Pods/Headers/Private/APAddressBook/APAddressBook.h create mode 120000 Example/Pods/Headers/Private/APAddressBook/APAddressBookAccessRoutine.h create mode 120000 Example/Pods/Headers/Private/APAddressBook/APAddressBookBaseRoutine.h create mode 120000 Example/Pods/Headers/Private/APAddressBook/APAddressBookContactsRoutine.h create mode 120000 Example/Pods/Headers/Private/APAddressBook/APAddressBookExternalChangeDelegate.h create mode 120000 Example/Pods/Headers/Private/APAddressBook/APAddressBookExternalChangeRoutine.h create mode 120000 Example/Pods/Headers/Private/APAddressBook/APAddressBookRefWrapper.h create mode 120000 Example/Pods/Headers/Private/APAddressBook/APContact.h create mode 120000 Example/Pods/Headers/Private/APAddressBook/APContactBuilder.h create mode 120000 Example/Pods/Headers/Private/APAddressBook/APContactDataExtractor.h create mode 120000 Example/Pods/Headers/Private/APAddressBook/APContactListBuilder.h create mode 120000 Example/Pods/Headers/Private/APAddressBook/APEmail.h create mode 120000 Example/Pods/Headers/Private/APAddressBook/APImageExtractor.h create mode 120000 Example/Pods/Headers/Private/APAddressBook/APJob.h create mode 120000 Example/Pods/Headers/Private/APAddressBook/APName.h create mode 120000 Example/Pods/Headers/Private/APAddressBook/APPhone.h create mode 120000 Example/Pods/Headers/Private/APAddressBook/APRecordDate.h create mode 120000 Example/Pods/Headers/Private/APAddressBook/APRelatedPerson.h create mode 120000 Example/Pods/Headers/Private/APAddressBook/APSocialProfile.h create mode 120000 Example/Pods/Headers/Private/APAddressBook/APSocialServiceHelper.h create mode 120000 Example/Pods/Headers/Private/APAddressBook/APSource.h create mode 120000 Example/Pods/Headers/Private/APAddressBook/APThread.h create mode 120000 Example/Pods/Headers/Private/APAddressBook/APTypes.h create mode 120000 Example/Pods/Headers/Private/EasyMapping/EKCoreDataImporter.h create mode 120000 Example/Pods/Headers/Private/EasyMapping/EKManagedObjectMapper.h create mode 120000 Example/Pods/Headers/Private/EasyMapping/EKManagedObjectMapping.h create mode 120000 Example/Pods/Headers/Private/EasyMapping/EKManagedObjectModel.h create mode 120000 Example/Pods/Headers/Private/EasyMapping/EKMapper.h create mode 120000 Example/Pods/Headers/Private/EasyMapping/EKMappingBlocks.h create mode 120000 Example/Pods/Headers/Private/EasyMapping/EKMappingProtocol.h create mode 120000 Example/Pods/Headers/Private/EasyMapping/EKObjectMapping.h create mode 120000 Example/Pods/Headers/Private/EasyMapping/EKObjectModel.h create mode 120000 Example/Pods/Headers/Private/EasyMapping/EKPropertyHelper.h create mode 120000 Example/Pods/Headers/Private/EasyMapping/EKPropertyMapping.h create mode 120000 Example/Pods/Headers/Private/EasyMapping/EKRelationshipMapping.h create mode 120000 Example/Pods/Headers/Private/EasyMapping/EKSerializer.h create mode 120000 Example/Pods/Headers/Private/EasyMapping/EasyMapping.h create mode 120000 Example/Pods/Headers/Private/EasyMapping/NSArray+FlattenArray.h create mode 120000 Example/Pods/Headers/Private/EasyMapping/NSDateFormatter+EasyMappingAdditions.h create mode 120000 Example/Pods/Headers/Public/APAddressBook/APAddress.h create mode 120000 Example/Pods/Headers/Public/APAddressBook/APAddressBook.h create mode 120000 Example/Pods/Headers/Public/APAddressBook/APAddressBookAccessRoutine.h create mode 120000 Example/Pods/Headers/Public/APAddressBook/APAddressBookBaseRoutine.h create mode 120000 Example/Pods/Headers/Public/APAddressBook/APAddressBookContactsRoutine.h create mode 120000 Example/Pods/Headers/Public/APAddressBook/APAddressBookExternalChangeDelegate.h create mode 120000 Example/Pods/Headers/Public/APAddressBook/APAddressBookExternalChangeRoutine.h create mode 120000 Example/Pods/Headers/Public/APAddressBook/APAddressBookRefWrapper.h create mode 120000 Example/Pods/Headers/Public/APAddressBook/APContact.h create mode 120000 Example/Pods/Headers/Public/APAddressBook/APContactBuilder.h create mode 120000 Example/Pods/Headers/Public/APAddressBook/APContactDataExtractor.h create mode 120000 Example/Pods/Headers/Public/APAddressBook/APContactListBuilder.h create mode 120000 Example/Pods/Headers/Public/APAddressBook/APEmail.h create mode 120000 Example/Pods/Headers/Public/APAddressBook/APImageExtractor.h create mode 120000 Example/Pods/Headers/Public/APAddressBook/APJob.h create mode 120000 Example/Pods/Headers/Public/APAddressBook/APName.h create mode 120000 Example/Pods/Headers/Public/APAddressBook/APPhone.h create mode 120000 Example/Pods/Headers/Public/APAddressBook/APRecordDate.h create mode 120000 Example/Pods/Headers/Public/APAddressBook/APRelatedPerson.h create mode 120000 Example/Pods/Headers/Public/APAddressBook/APSocialProfile.h create mode 120000 Example/Pods/Headers/Public/APAddressBook/APSocialServiceHelper.h create mode 120000 Example/Pods/Headers/Public/APAddressBook/APSource.h create mode 120000 Example/Pods/Headers/Public/APAddressBook/APThread.h create mode 120000 Example/Pods/Headers/Public/APAddressBook/APTypes.h create mode 120000 Example/Pods/Headers/Public/EasyMapping/EKCoreDataImporter.h create mode 120000 Example/Pods/Headers/Public/EasyMapping/EKManagedObjectMapper.h create mode 120000 Example/Pods/Headers/Public/EasyMapping/EKManagedObjectMapping.h create mode 120000 Example/Pods/Headers/Public/EasyMapping/EKManagedObjectModel.h create mode 120000 Example/Pods/Headers/Public/EasyMapping/EKMapper.h create mode 120000 Example/Pods/Headers/Public/EasyMapping/EKMappingBlocks.h create mode 120000 Example/Pods/Headers/Public/EasyMapping/EKMappingProtocol.h create mode 120000 Example/Pods/Headers/Public/EasyMapping/EKObjectMapping.h create mode 120000 Example/Pods/Headers/Public/EasyMapping/EKObjectModel.h create mode 120000 Example/Pods/Headers/Public/EasyMapping/EKPropertyHelper.h create mode 120000 Example/Pods/Headers/Public/EasyMapping/EKPropertyMapping.h create mode 120000 Example/Pods/Headers/Public/EasyMapping/EKRelationshipMapping.h create mode 120000 Example/Pods/Headers/Public/EasyMapping/EKSerializer.h create mode 120000 Example/Pods/Headers/Public/EasyMapping/EasyMapping.h create mode 120000 Example/Pods/Headers/Public/EasyMapping/NSArray+FlattenArray.h create mode 120000 Example/Pods/Headers/Public/EasyMapping/NSDateFormatter+EasyMappingAdditions.h create mode 100644 Example/Pods/Manifest.lock create mode 100644 Example/Pods/Pods.xcodeproj/project.pbxproj create mode 100644 Example/Pods/Target Support Files/APAddressBook/APAddressBook-dummy.m create mode 100644 Example/Pods/Target Support Files/APAddressBook/APAddressBook-prefix.pch create mode 100644 Example/Pods/Target Support Files/APAddressBook/APAddressBook.xcconfig create mode 100644 Example/Pods/Target Support Files/EasyMapping/EasyMapping-dummy.m create mode 100644 Example/Pods/Target Support Files/EasyMapping/EasyMapping-prefix.pch create mode 100644 Example/Pods/Target Support Files/EasyMapping/EasyMapping.xcconfig create mode 100644 Example/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown create mode 100644 Example/Pods/Target Support Files/Pods/Pods-acknowledgements.plist create mode 100644 Example/Pods/Target Support Files/Pods/Pods-dummy.m create mode 100755 Example/Pods/Target Support Files/Pods/Pods-frameworks.sh create mode 100755 Example/Pods/Target Support Files/Pods/Pods-resources.sh create mode 100644 Example/Pods/Target Support Files/Pods/Pods.debug.xcconfig create mode 100644 Example/Pods/Target Support Files/Pods/Pods.release.xcconfig rename APContact+EasyMapping.h => Sources/APContact+EasyMapping.h (100%) rename APContact+EasyMapping.m => Sources/APContact+EasyMapping.m (100%) diff --git a/APContactEasyMapping.podspec b/APContactEasyMapping.podspec new file mode 100644 index 0000000..97d3307 --- /dev/null +++ b/APContactEasyMapping.podspec @@ -0,0 +1,37 @@ +# +# Be sure to run `pod lib lint APContactEasyMapping.podspec' to ensure this is a +# valid spec before submitting. +# +# Any lines starting with a # are optional, but their use is encouraged +# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html +# + +Pod::Spec.new do |s| + s.name = "APContactEasyMapping" + s.version = "0.1.0" + s.summary = "Category to easily map APContact model with EasyMapping." + +# This description is used to generate tags and improve search results. +# * Think: What does it do? Why did you write it? What is the focus? +# * Try to keep it short, snappy and to the point. +# * Write the description between the DESC delimiters below. +# * Finally, don't worry about the indent, CocoaPods strips it! + s.description = "This package is a category that permits to easily map APContact model with EasyMapping." + + s.homepage = "https://github.com/JeanLebrument/APContact-EasyMapping" + # s.screenshots = "www.example.com/screenshots_1", "www.example.com/screenshots_2" + s.license = 'MIT' + s.author = { "JeanLebrument" => "jean.lebrument@gmail.com" } + s.source = { :git => "https://github.com/JeanLebrument/APContact-EasyMapping.git", :tag => s.version.to_s } + # s.social_media_url = 'https://twitter.com/' + + s.platform = :ios, '7.0' + s.requires_arc = true + + s.source_files = 'Sources/*' + + # s.public_header_files = 'Pod/Classes/**/*.h' + # s.frameworks = 'UIKit', 'MapKit' + s.dependency 'APAddressBook' + s.dependency 'EasyMapping' +end diff --git a/Example/Pods/APAddressBook/LICENSE.txt b/Example/Pods/APAddressBook/LICENSE.txt new file mode 100644 index 0000000..475597b --- /dev/null +++ b/Example/Pods/APAddressBook/LICENSE.txt @@ -0,0 +1,7 @@ +Copyright (c) 2013 Alterplay + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Example/Pods/APAddressBook/Pod/Core/Private/Builders/APContactBuilder.h b/Example/Pods/APAddressBook/Pod/Core/Private/Builders/APContactBuilder.h new file mode 100644 index 0000000..b7df126 --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Private/Builders/APContactBuilder.h @@ -0,0 +1,19 @@ +// +// APContactBuilder +// AddressBook +// +// Created by Alexey Belkevich on 21.09.15. +// Copyright © 2015 alterplay. All rights reserved. +// + +#import +#import +#import "APTypes.h" + +@class APContact; + +@interface APContactBuilder : NSObject + +- (APContact *)contactWithRecordRef:(ABRecordRef)recordRef fieldMask:(APContactField)fieldMask; + +@end \ No newline at end of file diff --git a/Example/Pods/APAddressBook/Pod/Core/Private/Builders/APContactBuilder.m b/Example/Pods/APAddressBook/Pod/Core/Private/Builders/APContactBuilder.m new file mode 100644 index 0000000..4ef0e7c --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Private/Builders/APContactBuilder.m @@ -0,0 +1,95 @@ +// +// APContactBuilder +// AddressBook +// +// Created by Alexey Belkevich on 21.09.15. +// Copyright © 2015 alterplay. All rights reserved. +// + +#import "APContactBuilder.h" +#import "APContactDataExtractor.h" +#import "APContact.h" +#import "APImageExtractor.h" + +@interface APContactBuilder () +@property (nonatomic, strong) APContactDataExtractor *extractor; +@end + +@implementation APContactBuilder + +#pragma mark - life cycle + +- (instancetype)init +{ + self = [super init]; + self.extractor = [[APContactDataExtractor alloc] init]; + return self; +} + +#pragma mark - public + +- (APContact *)contactWithRecordRef:(ABRecordRef)recordRef fieldMask:(APContactField)fieldMask +{ + self.extractor.recordRef = recordRef; + APContact *contact = [[APContact alloc] init]; + contact.recordID = @(ABRecordGetRecordID(recordRef)); + if (fieldMask & APContactFieldName) + { + contact.name = [self.extractor name]; + } + if (fieldMask & APContactFieldJob) + { + contact.job = [self.extractor job]; + } + if (fieldMask & APContactFieldThumbnail) + { + contact.thumbnail = [APImageExtractor thumbnailWithRecordRef:recordRef]; + } + if (fieldMask & APContactFieldPhonesOnly || fieldMask & APContactFieldPhonesWithLabels) + { + contact.phones = [self.extractor phonesWithLabels:(fieldMask & APContactFieldPhonesWithLabels)]; + } + if (fieldMask & APContactFieldEmailsOnly || fieldMask & APContactFieldEmailsWithLabels) + { + contact.emails = [self.extractor emailsWithLabels:(fieldMask & APContactFieldEmailsWithLabels)]; + } + if (fieldMask & APContactFieldAddresses) + { + contact.addresses = [self.extractor addresses]; + } + if (fieldMask & APContactFieldSocialProfiles) + { + contact.socialProfiles = [self.extractor socialProfiles]; + } + if (fieldMask & APContactFieldBirthday) + { + contact.birthday = [self.extractor dateProperty:kABPersonBirthdayProperty]; + } + if (fieldMask & APContactFieldWebsites) + { + contact.websites = [self.extractor arrayProperty:kABPersonURLProperty]; + } + if (fieldMask & APContactFieldNote) + { + contact.note = [self.extractor stringProperty:kABPersonNoteProperty]; + } + if (fieldMask & APContactFieldRelatedPersons) + { + contact.relatedPersons = [self.extractor relatedPersons]; + } + if (fieldMask & APContactFieldLinkedRecordIDs) + { + contact.linkedRecordIDs = [self.extractor linkedRecordIDs]; + } + if (fieldMask & APContactFieldSource) + { + contact.source = [self.extractor source]; + } + if (fieldMask & APContactFieldRecordDate) + { + contact.recordDate = [self.extractor recordDate]; + } + return contact; +} + +@end \ No newline at end of file diff --git a/Example/Pods/APAddressBook/Pod/Core/Private/Builders/APContactListBuilder.h b/Example/Pods/APAddressBook/Pod/Core/Private/Builders/APContactListBuilder.h new file mode 100644 index 0000000..a92b661 --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Private/Builders/APContactListBuilder.h @@ -0,0 +1,20 @@ +// +// APContactListBuilder +// AddressBook +// +// Created by Alexey Belkevich on 06.10.15. +// Copyright © 2015 alterplay. All rights reserved. +// + +#import + +@class APContact; + +@interface APContactListBuilder : NSObject + +@property (nonatomic, strong) BOOL (^filterBlock)(APContact *contact); +@property (nonatomic, strong) NSArray *sortDescriptors; + +- (NSArray *)contactListWithAllContacts:(NSArray *)allContacts; + +@end \ No newline at end of file diff --git a/Example/Pods/APAddressBook/Pod/Core/Private/Builders/APContactListBuilder.m b/Example/Pods/APAddressBook/Pod/Core/Private/Builders/APContactListBuilder.m new file mode 100644 index 0000000..93153e1 --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Private/Builders/APContactListBuilder.m @@ -0,0 +1,47 @@ +// +// APContactListBuilder +// AddressBook +// +// Created by Alexey Belkevich on 06.10.15. +// Copyright © 2015 alterplay. All rights reserved. +// + +#import "APContactListBuilder.h" +#import "APContact.h" + +@implementation APContactListBuilder + +#pragma mark - public + +- (NSArray *)contactListWithAllContacts:(NSArray *)allContacts +{ + NSMutableArray *mutableContacts = allContacts.mutableCopy; + [self filterContacts:mutableContacts]; + [self sortContacts:mutableContacts]; + return mutableContacts.copy; +} + +#pragma mark - private + +- (void)filterContacts:(NSMutableArray *)contacts +{ + if (self.filterBlock) + { + NSPredicate *predicate; + predicate = [NSPredicate predicateWithBlock:^BOOL(APContact *contact, NSDictionary *bindings) + { + return self.filterBlock(contact); + }]; + [contacts filterUsingPredicate:predicate]; + } +} + +- (void)sortContacts:(NSMutableArray *)contacts +{ + if (self.sortDescriptors) + { + [contacts sortUsingDescriptors:self.sortDescriptors]; + } +} + +@end \ No newline at end of file diff --git a/Example/Pods/APAddressBook/Pod/Core/Private/Extractors/APContactDataExtractor.h b/Example/Pods/APAddressBook/Pod/Core/Private/Extractors/APContactDataExtractor.h new file mode 100644 index 0000000..c41c2e0 --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Private/Extractors/APContactDataExtractor.h @@ -0,0 +1,36 @@ +// +// APContactDataExtractor +// AddressBook +// +// Created by Alexey Belkevich on 22.09.15. +// Copyright © 2015 alterplay. All rights reserved. +// + +#import +#import +#import + +@class APName; +@class APJob; +@class APSource; +@class APRecordDate; + +@interface APContactDataExtractor : NSObject + +@property (nonatomic, assign) ABRecordRef recordRef; + +- (APName *)name; +- (APJob *)job; +- (NSArray *)phonesWithLabels:(BOOL)needLabels; +- (NSArray *)emailsWithLabels:(BOOL)needLabels; +- (NSArray *)addresses; +- (NSArray *)socialProfiles; +- (NSArray *)relatedPersons; +- (NSArray *)linkedRecordIDs; +- (APSource *)source; +- (APRecordDate *)recordDate; +- (NSString *)stringProperty:(ABPropertyID)property; +- (NSArray *)arrayProperty:(ABPropertyID)property; +- (NSDate *)dateProperty:(ABPropertyID)property; + +@end \ No newline at end of file diff --git a/Example/Pods/APAddressBook/Pod/Core/Private/Extractors/APContactDataExtractor.m b/Example/Pods/APAddressBook/Pod/Core/Private/Extractors/APContactDataExtractor.m new file mode 100644 index 0000000..13d33a3 --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Private/Extractors/APContactDataExtractor.m @@ -0,0 +1,255 @@ +// +// APContactDataExtractor +// AddressBook +// +// Created by Alexey Belkevich on 22.09.15. +// Copyright © 2015 alterplay. All rights reserved. +// + +#import "APContactDataExtractor.h" +#import "APName.h" +#import "APJob.h" +#import "APPhone.h" +#import "APEmail.h" +#import "APAddress.h" +#import "APSocialProfile.h" +#import "APSocialServiceHelper.h" +#import "APSource.h" +#import "APRelatedPerson.h" +#import "APRecordDate.h" + +@implementation APContactDataExtractor + +#pragma mark - public + +- (APName *)name +{ + APName *name = [[APName alloc] init]; + name.firstName = [self stringProperty:kABPersonFirstNameProperty]; + name.lastName = [self stringProperty:kABPersonLastNameProperty]; + name.middleName = [self stringProperty:kABPersonMiddleNameProperty]; + name.compositeName = [self compositeName]; + return name; +} + +- (APJob *)job +{ + APJob *job = [[APJob alloc] init]; + job.company = [self stringProperty:kABPersonOrganizationProperty]; + job.jobTitle = [self stringProperty:kABPersonJobTitleProperty]; + return job; +} + +- (NSArray *)phonesWithLabels:(BOOL)needLabels +{ + return [self mapMultiValueOfProperty:kABPersonPhoneProperty + withBlock:^id(ABMultiValueRef multiValue, CFTypeRef value, CFIndex index) + { + APPhone *phone; + if (value) + { + phone = [[APPhone alloc] init]; + phone.number = (__bridge NSString *)value; + if (needLabels) + { + phone.originalLabel = [self originalLabelFromMultiValue:multiValue index:index]; + phone.localizedLabel = [self localizedLabelFromMultiValue:multiValue index:index]; + } + } + return phone; + }]; +} + +- (NSArray *)emailsWithLabels:(BOOL)needLabels +{ + return [self mapMultiValueOfProperty:kABPersonEmailProperty + withBlock:^id(ABMultiValueRef multiValue, CFTypeRef value, CFIndex index) + { + APEmail *email; + if (value) + { + email = [[APEmail alloc] init]; + email.address = (__bridge NSString *)value; + if (needLabels) + { + email.originalLabel = [self originalLabelFromMultiValue:multiValue index:index]; + email.localizedLabel = [self localizedLabelFromMultiValue:multiValue index:index]; + } + } + return email; + }]; +} + +- (NSArray *)addresses +{ + NSMutableArray *addresses = [[NSMutableArray alloc] init]; + NSArray *array = [self arrayProperty:kABPersonAddressProperty]; + for (NSDictionary *dictionary in array) + { + APAddress *address = [[APAddress alloc] init]; + address.street = dictionary[(__bridge NSString *)kABPersonAddressStreetKey]; + address.city = dictionary[(__bridge NSString *)kABPersonAddressCityKey]; + address.state = dictionary[(__bridge NSString *)kABPersonAddressStateKey]; + address.zip = dictionary[(__bridge NSString *)kABPersonAddressZIPKey]; + address.country = dictionary[(__bridge NSString *)kABPersonAddressCountryKey]; + address.countryCode = dictionary[(__bridge NSString *)kABPersonAddressCountryCodeKey]; + [addresses addObject:address]; + } + return addresses.copy; +} + +- (NSArray *)socialProfiles +{ + NSMutableArray *profiles = [[NSMutableArray alloc] init]; + NSArray *array = [self arrayProperty:kABPersonSocialProfileProperty]; + for (NSDictionary *dictionary in array) + { + APSocialProfile *profile = [[APSocialProfile alloc] init]; + NSString *socialService = dictionary[(__bridge NSString *)kABPersonSocialProfileServiceKey]; + profile.socialNetwork = [APSocialServiceHelper socialNetworkTypeWithString:socialService]; + profile.url = dictionary[(__bridge NSString *)kABPersonSocialProfileURLKey]; + profile.username = dictionary[(__bridge NSString *)kABPersonSocialProfileUsernameKey]; + profile.userIdentifier = dictionary[(__bridge NSString *)kABPersonSocialProfileUserIdentifierKey]; + [profiles addObject:profile]; + } + return profiles.copy; +} + +- (NSArray *)relatedPersons +{ + return [self mapMultiValueOfProperty:kABPersonRelatedNamesProperty + withBlock:^id(ABMultiValueRef multiValue, CFTypeRef value, CFIndex index) + { + APRelatedPerson *relatedPerson; + if (value) + { + relatedPerson = [[APRelatedPerson alloc] init]; + relatedPerson.name = (__bridge NSString *)value; + relatedPerson.originalLabel = [self originalLabelFromMultiValue:multiValue index:index]; + relatedPerson.localizedLabel = [self localizedLabelFromMultiValue:multiValue index:index]; + } + return relatedPerson; + }]; +} + +- (NSArray *)linkedRecordIDs +{ + NSMutableOrderedSet *linkedRecordIDs = [[NSMutableOrderedSet alloc] init]; + CFArrayRef linkedPeopleRef = ABPersonCopyArrayOfAllLinkedPeople(self.recordRef); + CFIndex count = CFArrayGetCount(linkedPeopleRef); + NSNumber *contactRecordID = @(ABRecordGetRecordID(self.recordRef)); + for (CFIndex i = 0; i < count; i++) + { + ABRecordRef linkedRecordRef = CFArrayGetValueAtIndex(linkedPeopleRef, i); + NSNumber *linkedRecordID = @(ABRecordGetRecordID(linkedRecordRef)); + if (![linkedRecordID isEqualToNumber:contactRecordID]) + { + [linkedRecordIDs addObject:linkedRecordID]; + } + } + CFRelease(linkedPeopleRef); + return linkedRecordIDs.array; +} + +- (APSource *)source +{ + APSource *source; + ABRecordRef sourceRef = ABPersonCopySource(self.recordRef); + if (sourceRef) + { + source = [[APSource alloc] init]; + source.sourceType = [self stringProperty:kABSourceNameProperty fromRecordRef:sourceRef]; + source.sourceID = @(ABRecordGetRecordID(sourceRef)); + CFRelease(sourceRef); + } + return source; +} + +- (APRecordDate *)recordDate +{ + APRecordDate *recordDate = [[APRecordDate alloc] init]; + recordDate.creationDate = [self dateProperty:kABPersonCreationDateProperty]; + recordDate.modificationDate = [self dateProperty:kABPersonModificationDateProperty]; + return recordDate; +} + +- (NSString *)stringProperty:(ABPropertyID)property +{ + return [self stringProperty:property fromRecordRef:self.recordRef]; +} + +- (NSArray *)arrayProperty:(ABPropertyID)property +{ + return [self mapMultiValueOfProperty:property withBlock:^id(ABMultiValueRef multiValue, CFTypeRef value, CFIndex index) + { + return (__bridge NSString *)value; + }]; +} + +- (NSDate *)dateProperty:(ABPropertyID)property +{ + CFDateRef dateRef = ABRecordCopyValue(self.recordRef, property); + return (__bridge_transfer NSDate *)dateRef; +} + +#pragma mark - private + +- (NSString *)compositeName +{ + CFStringRef compositeNameRef = ABRecordCopyCompositeName(self.recordRef); + return (__bridge_transfer NSString *)compositeNameRef; +} + +- (NSString *)originalLabelFromMultiValue:(ABMultiValueRef)multiValue index:(CFIndex)index +{ + CFTypeRef rawLabel = ABMultiValueCopyLabelAtIndex(multiValue, index); + NSString *label = (__bridge_transfer NSString *)rawLabel; + return label; +} + +- (NSString *)localizedLabelFromMultiValue:(ABMultiValueRef)multiValue index:(CFIndex)index +{ + NSString *label; + CFTypeRef rawLabel = ABMultiValueCopyLabelAtIndex(multiValue, index); + if (rawLabel) + { + CFStringRef localizedLabel = ABAddressBookCopyLocalizedLabel(rawLabel); + if (localizedLabel) + { + label = (__bridge_transfer NSString *)localizedLabel; + } + CFRelease(rawLabel); + } + return label; +} + +- (NSArray *)mapMultiValueOfProperty:(ABPropertyID)property + withBlock:(id (^)(ABMultiValueRef multiValue, CFTypeRef value, CFIndex index))block +{ + NSMutableArray *array = [[NSMutableArray alloc] init]; + ABMultiValueRef multiValue = ABRecordCopyValue(self.recordRef, property); + if (multiValue) + { + CFIndex count = ABMultiValueGetCount(multiValue); + for (CFIndex i = 0; i < count; i++) + { + CFTypeRef value = ABMultiValueCopyValueAtIndex(multiValue, i); + id object = block(multiValue, value, i); + if (object) + { + [array addObject:object]; + } + CFRelease(value); + } + CFRelease(multiValue); + } + return array.count > 0 ? array.copy : nil; +} + +- (NSString *)stringProperty:(ABPropertyID)property fromRecordRef:(ABRecordRef)recordRef +{ + CFTypeRef valueRef = (ABRecordCopyValue(recordRef, property)); + return (__bridge_transfer NSString *)valueRef; +} + +@end \ No newline at end of file diff --git a/Example/Pods/APAddressBook/Pod/Core/Private/Extractors/APImageExtractor.h b/Example/Pods/APAddressBook/Pod/Core/Private/Extractors/APImageExtractor.h new file mode 100644 index 0000000..50c280b --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Private/Extractors/APImageExtractor.h @@ -0,0 +1,18 @@ +// +// APImageExtractor +// AddressBook +// +// Created by Alexey Belkevich on 29.09.15. +// Copyright © 2015 alterplay. All rights reserved. +// + +#import +#import +#import + +@interface APImageExtractor : NSObject + ++ (UIImage *)thumbnailWithRecordRef:(ABRecordRef)recordRef; ++ (UIImage *)photoWithRecordRef:(ABRecordRef)recordRef; + +@end \ No newline at end of file diff --git a/Example/Pods/APAddressBook/Pod/Core/Private/Extractors/APImageExtractor.m b/Example/Pods/APAddressBook/Pod/Core/Private/Extractors/APImageExtractor.m new file mode 100644 index 0000000..def80cc --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Private/Extractors/APImageExtractor.m @@ -0,0 +1,35 @@ +// +// APImageExtractor +// AddressBook +// +// Created by Alexey Belkevich on 29.09.15. +// Copyright © 2015 alterplay. All rights reserved. +// + +#import "APImageExtractor.h" + +@implementation APImageExtractor + +#pragma mark - public + ++ (UIImage *)thumbnailWithRecordRef:(ABRecordRef)recordRef +{ + return [self imageWithRecordRef:recordRef fullSize:NO]; +} + ++ (UIImage *)photoWithRecordRef:(ABRecordRef)recordRef +{ + return [self imageWithRecordRef:recordRef fullSize:YES]; +} + +#pragma mark - private + ++ (UIImage *)imageWithRecordRef:(ABRecordRef)recordRef fullSize:(BOOL)isFullSize +{ + ABPersonImageFormat format = isFullSize ? kABPersonImageFormatOriginalSize : + kABPersonImageFormatThumbnail; + NSData *data = (__bridge_transfer NSData *)ABPersonCopyImageDataWithFormat(recordRef, format); + return [UIImage imageWithData:data scale:UIScreen.mainScreen.scale]; +} + +@end \ No newline at end of file diff --git a/Example/Pods/APAddressBook/Pod/Core/Private/Helpers/APSocialServiceHelper.h b/Example/Pods/APAddressBook/Pod/Core/Private/Helpers/APSocialServiceHelper.h new file mode 100644 index 0000000..7ec8042 --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Private/Helpers/APSocialServiceHelper.h @@ -0,0 +1,16 @@ +// +// APSocialServiceHelper +// AddressBook +// +// Created by Alexey Belkevich on 22.09.15. +// Copyright © 2015 alterplay. All rights reserved. +// + +#import +#import "APTypes.h" + +@interface APSocialServiceHelper : NSObject + ++ (APSocialNetworkType)socialNetworkTypeWithString:(NSString *)string; + +@end \ No newline at end of file diff --git a/Example/Pods/APAddressBook/Pod/Core/Private/Helpers/APSocialServiceHelper.m b/Example/Pods/APAddressBook/Pod/Core/Private/Helpers/APSocialServiceHelper.m new file mode 100644 index 0000000..c7cbc47 --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Private/Helpers/APSocialServiceHelper.m @@ -0,0 +1,42 @@ +// +// APSocialServiceHelper +// AddressBook +// +// Created by Alexey Belkevich on 22.09.15. +// Copyright © 2015 alterplay. All rights reserved. +// + +#import +#import "APSocialServiceHelper.h" + +@implementation APSocialServiceHelper + ++ (APSocialNetworkType)socialNetworkTypeWithString:(NSString *)string +{ + if ([string isEqualToString:(__bridge NSString *)kABPersonSocialProfileServiceFacebook]) + { + return APSocialNetworkFacebook; + } + else if ([string isEqualToString:(__bridge NSString *)kABPersonSocialProfileServiceTwitter]) + { + return APSocialNetworkTwitter; + } + else if ([string isEqualToString:(__bridge NSString *)kABPersonSocialProfileServiceLinkedIn]) + { + return APSocialNetworkLinkedIn; + } + else if ([string isEqualToString:(__bridge NSString *)kABPersonSocialProfileServiceFlickr]) + { + return APSocialNetworkFlickr; + } + else if ([string isEqualToString:(__bridge NSString *)kABPersonSocialProfileServiceGameCenter]) + { + return APSocialNetworkGameCenter; + } + else + { + return APSocialNetworkUnknown; + } +} + +@end \ No newline at end of file diff --git a/Example/Pods/APAddressBook/Pod/Core/Private/Routine/APAddressBookAccessRoutine.h b/Example/Pods/APAddressBook/Pod/Core/Private/Routine/APAddressBookAccessRoutine.h new file mode 100644 index 0000000..7382d97 --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Private/Routine/APAddressBookAccessRoutine.h @@ -0,0 +1,18 @@ +// +// APAddressBookAccessRoutine +// AddressBook +// +// Created by Alexey Belkevich on 21.09.15. +// Copyright © 2015 alterplay. All rights reserved. +// + +#import +#import "APAddressBookBaseRoutine.h" +#import "APTypes.h" + +@interface APAddressBookAccessRoutine : APAddressBookBaseRoutine + +- (void)requestAccessWithCompletion:(void (^)(BOOL granted, NSError *error))completionBlock; ++ (APAddressBookAccess)accessStatus; + +@end \ No newline at end of file diff --git a/Example/Pods/APAddressBook/Pod/Core/Private/Routine/APAddressBookAccessRoutine.m b/Example/Pods/APAddressBook/Pod/Core/Private/Routine/APAddressBookAccessRoutine.m new file mode 100644 index 0000000..6d90bb3 --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Private/Routine/APAddressBookAccessRoutine.m @@ -0,0 +1,49 @@ +// +// APAddressBookAccessRoutine +// AddressBook +// +// Created by Alexey Belkevich on 21.09.15. +// Copyright © 2015 alterplay. All rights reserved. +// + +#import +#import "APAddressBookAccessRoutine.h" +#import "APAddressBookRefWrapper.h" + +@implementation APAddressBookAccessRoutine + +#pragma mark - public + ++ (APAddressBookAccess)accessStatus +{ + ABAuthorizationStatus status = ABAddressBookGetAuthorizationStatus(); + switch (status) + { + case kABAuthorizationStatusDenied: + case kABAuthorizationStatusRestricted: + return APAddressBookAccessDenied; + + case kABAuthorizationStatusAuthorized: + return APAddressBookAccessGranted; + + default: + return APAddressBookAccessUnknown; + } +} + +- (void)requestAccessWithCompletion:(void (^)(BOOL granted, NSError *error))completionBlock +{ + if (!self.wrapper.error) + { + ABAddressBookRequestAccessWithCompletion(self.wrapper.ref, ^(bool granted, CFErrorRef error) + { + completionBlock ? completionBlock(granted, (__bridge NSError *)error) : nil; + }); + } + else + { + completionBlock ? completionBlock(NO, self.wrapper.error) : nil; + } +} + +@end \ No newline at end of file diff --git a/Example/Pods/APAddressBook/Pod/Core/Private/Routine/APAddressBookContactsRoutine.h b/Example/Pods/APAddressBook/Pod/Core/Private/Routine/APAddressBookContactsRoutine.h new file mode 100644 index 0000000..55ee7b9 --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Private/Routine/APAddressBookContactsRoutine.h @@ -0,0 +1,22 @@ +// +// APAddressBookContactsRoutine +// AddressBook +// +// Created by Alexey Belkevich on 21.09.15. +// Copyright © 2015 alterplay. All rights reserved. +// + +#import +#import +#import "APAddressBookBaseRoutine.h" +#import "APTypes.h" + +@class APContact; + +@interface APAddressBookContactsRoutine : APAddressBookBaseRoutine + +- (NSArray *)allContactsWithContactFieldMask:(APContactField)fieldMask; +- (APContact *)contactByRecordID:(NSNumber *)recordID withFieldMask:(APContactField)fieldMask; +- (UIImage *)imageWithRecordID:(NSNumber *)recordID; + +@end \ No newline at end of file diff --git a/Example/Pods/APAddressBook/Pod/Core/Private/Routine/APAddressBookContactsRoutine.m b/Example/Pods/APAddressBook/Pod/Core/Private/Routine/APAddressBookContactsRoutine.m new file mode 100644 index 0000000..66db5f1 --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Private/Routine/APAddressBookContactsRoutine.m @@ -0,0 +1,71 @@ +// +// APAddressBookContactsRoutine +// AddressBook +// +// Created by Alexey Belkevich on 21.09.15. +// Copyright © 2015 alterplay. All rights reserved. +// + +#import +#import "APAddressBookContactsRoutine.h" +#import "APAddressBookRefWrapper.h" +#import "APContactBuilder.h" +#import "APImageExtractor.h" +#import "APContact.h" + +@interface APAddressBookContactsRoutine () +@property (nonatomic, strong) APContactBuilder *builder; +@end + +@implementation APAddressBookContactsRoutine + +#pragma mark - life cycle + +- (instancetype)initWithAddressBookRefWrapper:(APAddressBookRefWrapper *)wrapper +{ + self = [super initWithAddressBookRefWrapper:wrapper]; + self.builder = [[APContactBuilder alloc] init]; + return self; +} + +#pragma mark - public + +- (NSArray *)allContactsWithContactFieldMask:(APContactField)fieldMask +{ + NSMutableArray *contacts = [[NSMutableArray alloc] init]; + if (!self.wrapper.error) + { + CFArrayRef peopleArrayRef = ABAddressBookCopyArrayOfAllPeople(self.wrapper.ref); + CFIndex count = CFArrayGetCount(peopleArrayRef); + for (CFIndex i = 0; i < count; i++) + { + ABRecordRef recordRef = CFArrayGetValueAtIndex(peopleArrayRef, i); + APContact *contact = [self.builder contactWithRecordRef:recordRef fieldMask:fieldMask]; + [contacts addObject:contact]; + } + CFRelease(peopleArrayRef); + } + return contacts.count > 0 ? contacts.copy : nil; +} + +- (APContact *)contactByRecordID:(NSNumber *)recordID withFieldMask:(APContactField)fieldMask +{ + if (!self.wrapper.error) + { + ABRecordRef recordRef = ABAddressBookGetPersonWithRecordID(self.wrapper.ref, recordID.intValue); + return recordRef != NULL ? [self.builder contactWithRecordRef:recordRef fieldMask:fieldMask] : nil; + } + return nil; +} + +- (UIImage *)imageWithRecordID:(NSNumber *)recordID +{ + if (!self.wrapper.error) + { + ABRecordRef recordRef = ABAddressBookGetPersonWithRecordID(self.wrapper.ref, recordID.intValue); + return recordRef != NULL ? [APImageExtractor photoWithRecordRef:recordRef] : nil; + } + return nil; +} + +@end \ No newline at end of file diff --git a/Example/Pods/APAddressBook/Pod/Core/Private/Routine/APAddressBookExternalChangeDelegate.h b/Example/Pods/APAddressBook/Pod/Core/Private/Routine/APAddressBookExternalChangeDelegate.h new file mode 100644 index 0000000..17198f8 --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Private/Routine/APAddressBookExternalChangeDelegate.h @@ -0,0 +1,15 @@ +// +// APAddressBookExternalChangeDelegate +// AddressBook +// +// Created by Alexey Belkevich on 21.09.15. +// Copyright © 2015 alterplay. All rights reserved. +// + +#import + +@protocol APAddressBookExternalChangeDelegate + +- (void)addressBookDidChange; + +@end \ No newline at end of file diff --git a/Example/Pods/APAddressBook/Pod/Core/Private/Routine/APAddressBookExternalChangeRoutine.h b/Example/Pods/APAddressBook/Pod/Core/Private/Routine/APAddressBookExternalChangeRoutine.h new file mode 100644 index 0000000..4656e10 --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Private/Routine/APAddressBookExternalChangeRoutine.h @@ -0,0 +1,17 @@ +// +// APAddressBookExternalChangeRoutine +// AddressBook +// +// Created by Alexey Belkevich on 21.09.15. +// Copyright © 2015 alterplay. All rights reserved. +// + +#import +#import "APAddressBookBaseRoutine.h" +#import "APAddressBookExternalChangeDelegate.h" + +@interface APAddressBookExternalChangeRoutine : APAddressBookBaseRoutine + +@property (nonatomic, weak) NSObject *delegate; + +@end \ No newline at end of file diff --git a/Example/Pods/APAddressBook/Pod/Core/Private/Routine/APAddressBookExternalChangeRoutine.m b/Example/Pods/APAddressBook/Pod/Core/Private/Routine/APAddressBookExternalChangeRoutine.m new file mode 100644 index 0000000..b47bbcf --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Private/Routine/APAddressBookExternalChangeRoutine.m @@ -0,0 +1,60 @@ +// +// APAddressBookExternalChangeRoutine +// AddressBook +// +// Created by Alexey Belkevich on 21.09.15. +// Copyright © 2015 alterplay. All rights reserved. +// + +#import +#import "APAddressBookExternalChangeRoutine.h" +#import "APAddressBookRefWrapper.h" + +void APAddressBookExternalChangeCallback(ABAddressBookRef addressBookRef, CFDictionaryRef __unused info, void *context); + +@implementation APAddressBookExternalChangeRoutine + +#pragma mark - life cycle + +- (instancetype)initWithAddressBookRefWrapper:(APAddressBookRefWrapper *)wrapper +{ + self = [super initWithAddressBookRefWrapper:wrapper]; + if (!wrapper.error) + { + [self registerExternalChangeCallback]; + } + return self; +} + +- (void)dealloc +{ + if (!self.wrapper.error) + { + [self unregisterExternalChangeCallback]; + } +} + +#pragma mark - private + +- (void)registerExternalChangeCallback +{ + ABAddressBookRegisterExternalChangeCallback(self.wrapper.ref, APAddressBookExternalChangeCallback, + (__bridge void *)(self)); +} + +- (void)unregisterExternalChangeCallback +{ + ABAddressBookUnregisterExternalChangeCallback(self.wrapper.ref, APAddressBookExternalChangeCallback, + (__bridge void *)(self)); +} + +#pragma mark - external change callback + +void APAddressBookExternalChangeCallback(ABAddressBookRef addressBookRef, CFDictionaryRef __unused info, void *context) +{ + ABAddressBookRevert(addressBookRef); + APAddressBookExternalChangeRoutine *routine = (__bridge APAddressBookExternalChangeRoutine *)(context); + [routine.delegate addressBookDidChange]; +} + +@end \ No newline at end of file diff --git a/Example/Pods/APAddressBook/Pod/Core/Private/Routine/Base/APAddressBookBaseRoutine.h b/Example/Pods/APAddressBook/Pod/Core/Private/Routine/Base/APAddressBookBaseRoutine.h new file mode 100644 index 0000000..463eb0c --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Private/Routine/Base/APAddressBookBaseRoutine.h @@ -0,0 +1,19 @@ +// +// APAddressBookBaseRoutine +// AddressBook +// +// Created by Alexey Belkevich on 21.09.15. +// Copyright © 2015 alterplay. All rights reserved. +// + +#import + +@class APAddressBookRefWrapper; + +@interface APAddressBookBaseRoutine : NSObject + +@property (nonatomic, readonly) APAddressBookRefWrapper *wrapper; + +- (instancetype)initWithAddressBookRefWrapper:(APAddressBookRefWrapper *)wrapper; + +@end \ No newline at end of file diff --git a/Example/Pods/APAddressBook/Pod/Core/Private/Routine/Base/APAddressBookBaseRoutine.m b/Example/Pods/APAddressBook/Pod/Core/Private/Routine/Base/APAddressBookBaseRoutine.m new file mode 100644 index 0000000..17cc897 --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Private/Routine/Base/APAddressBookBaseRoutine.m @@ -0,0 +1,27 @@ +// +// APAddressBookBaseRoutine +// AddressBook +// +// Created by Alexey Belkevich on 21.09.15. +// Copyright © 2015 alterplay. All rights reserved. +// + +#import "APAddressBookBaseRoutine.h" +#import "APAddressBookRefWrapper.h" + +@interface APAddressBookBaseRoutine () +@property (nonatomic, strong) APAddressBookRefWrapper *wrapper; +@end + +@implementation APAddressBookBaseRoutine + +#pragma mark - life cycle + +- (instancetype)initWithAddressBookRefWrapper:(APAddressBookRefWrapper *)wrapper +{ + self = [super init]; + self.wrapper = wrapper; + return self; +} + +@end \ No newline at end of file diff --git a/Example/Pods/APAddressBook/Pod/Core/Private/Thread/APThread.h b/Example/Pods/APAddressBook/Pod/Core/Private/Thread/APThread.h new file mode 100644 index 0000000..8fcc860 --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Private/Thread/APThread.h @@ -0,0 +1,16 @@ +// +// APThread +// APAddressBook +// +// Created by Alexey Belkevich on 20.08.15. +// Copyright © 2015 alterplay. All rights reserved. +// + +#import + +@interface APThread : NSThread + +- (void)dispatchAsync:(void (^)())block; +- (void)dispatchSync:(void (^)())block; + +@end \ No newline at end of file diff --git a/Example/Pods/APAddressBook/Pod/Core/Private/Thread/APThread.m b/Example/Pods/APAddressBook/Pod/Core/Private/Thread/APThread.m new file mode 100644 index 0000000..88c203b --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Private/Thread/APThread.m @@ -0,0 +1,46 @@ +// +// APThread +// APAddressBook +// +// Created by Alexey Belkevich on 20.08.15. +// Copyright © 2015 alterplay. All rights reserved. +// + +#import "APThread.h" + +@implementation APThread + +#pragma mark - public + +- (void)dispatchAsync:(void (^)())block +{ + [self performSelector:@selector(performBlock:) onThread:self withObject:block waitUntilDone:NO]; +} + +- (void)dispatchSync:(void (^)())block +{ + [self performSelector:@selector(performBlock:) onThread:self withObject:block waitUntilDone:YES]; +} + +#pragma mark - override + +- (void)main +{ + while (!self.cancelled) + { + @autoreleasepool + { + [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:NSDate.distantFuture]; + } + + } +} + +#pragma mark - private + +- (void)performBlock:(void (^)())block +{ + block(); +} + +@end \ No newline at end of file diff --git a/Example/Pods/APAddressBook/Pod/Core/Private/Wrapper/APAddressBookRefWrapper.h b/Example/Pods/APAddressBook/Pod/Core/Private/Wrapper/APAddressBookRefWrapper.h new file mode 100644 index 0000000..d5e845d --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Private/Wrapper/APAddressBookRefWrapper.h @@ -0,0 +1,17 @@ +// +// APAddressBookRefWrapper +// AddressBook +// +// Created by Alexey Belkevich on 21.09.15. +// Copyright © 2015 alterplay. All rights reserved. +// + +#import +#import + +@interface APAddressBookRefWrapper : NSObject + +@property (nonatomic, readonly) ABAddressBookRef ref; +@property (nonatomic, readonly) NSError *error; + +@end \ No newline at end of file diff --git a/Example/Pods/APAddressBook/Pod/Core/Private/Wrapper/APAddressBookRefWrapper.m b/Example/Pods/APAddressBook/Pod/Core/Private/Wrapper/APAddressBookRefWrapper.m new file mode 100644 index 0000000..7024a57 --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Private/Wrapper/APAddressBookRefWrapper.m @@ -0,0 +1,49 @@ +// +// APAddressBookRefWrapper +// AddressBook +// +// Created by Alexey Belkevich on 21.09.15. +// Copyright © 2015 alterplay. All rights reserved. +// + +#import "APAddressBookRefWrapper.h" + +@interface APAddressBookRefWrapper () +{ + ABAddressBookRef ref; +} +@property (nonatomic, strong) NSError *error; +@end + +@implementation APAddressBookRefWrapper + +#pragma mark - life cycle + +- (id)init +{ + self = [super init]; + CFErrorRef error = NULL; + ref = ABAddressBookCreateWithOptions(NULL, &error); + if (error) + { + self.error = (__bridge NSError *)(error); + } + return self; +} + +- (void)dealloc +{ + if (ref) + { + CFRelease(ref); + } +} + +#pragma mark - properties + +- (ABAddressBookRef)ref +{ + return ref; +} + +@end \ No newline at end of file diff --git a/Example/Pods/APAddressBook/Pod/Core/Public/APAddressBook.h b/Example/Pods/APAddressBook/Pod/Core/Public/APAddressBook.h new file mode 100755 index 0000000..aa4c31f --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Public/APAddressBook.h @@ -0,0 +1,63 @@ +// +// APAddressBook.h +// APAddressBook +// +// Created by Alexey Belkevich on 1/10/14. +// Copyright (c) 2014 alterplay. All rights reserved. +// + +#import +#import +#import "APTypes.h" + +@class APContact; +typedef BOOL(^APFilterContactsBlock)(APContact * _Nonnull contact); +typedef void(^APLoadContactsBlock)(NSArray * _Nullable contacts, NSError * _Nullable error); +typedef void(^APLoadContactBlock)(APContact * _Nullable contact); +typedef void(^APLoadPhotoBlock)(UIImage * _Nullable photo); +typedef void(^APRequestAccessBlock)(BOOL granted, NSError * _Nullable error); + +@interface APAddressBook : NSObject + +@property (nonatomic, assign) APContactField fieldsMask; +@property (nullable, nonatomic, copy) APFilterContactsBlock filterBlock; +@property (nullable, nonatomic, strong) NSArray *sortDescriptors; + ++ (APAddressBookAccess)access; +- (void)loadContacts:(nonnull APLoadContactsBlock)completionBlock; +- (void)loadContactsOnQueue:(nonnull dispatch_queue_t)queue + completion:(nonnull APLoadContactsBlock)completionBlock; +- (void)loadContactByRecordID:(nonnull NSNumber *)recordID + completion:(nonnull APLoadContactBlock)completion; +- (void)loadContactByRecordID:(nonnull NSNumber *)recordID + onQueue:(nonnull dispatch_queue_t)queue + completion:(nonnull APLoadContactBlock)completion; +- (void)loadPhotoByRecordID:(nonnull NSNumber *)recordID + completion:(nonnull APLoadPhotoBlock)completion; +- (void)loadPhotoByRecordID:(nonnull NSNumber *)recordID + onQueue:(nonnull dispatch_queue_t)queue + completion:(nonnull APLoadPhotoBlock)completion; +- (void)startObserveChangesWithCallback:(nonnull void (^)())callback; +- (void)startObserveChangesOnQueue:(nonnull dispatch_queue_t)queue + callback:(nonnull void (^)())callback; +- (void)stopObserveChanges; +- (void)requestAccess:(nonnull APRequestAccessBlock)completionBlock; +- (void)requestAccessOnQueue:(nonnull dispatch_queue_t)queue + completion:(nonnull APRequestAccessBlock)completionBlock; + +@end + + +#define AP_DEPRECATED(_useInstead) __attribute__((deprecated("Use " #_useInstead " instead"))) + +@interface APAddressBook (Deprecated) + ++ (void)requestAccess:(nonnull APRequestAccessBlock)completionBlock +AP_DEPRECATED("instance method requestAccess:"); ++ (void)requestAccessOnQueue:(nonnull dispatch_queue_t)queue + completion:(nonnull APRequestAccessBlock)completionBlock +AP_DEPRECATED("instance method requestAccessOnQueue:completion:"); +- (nullable APContact *)getContactByRecordID:(nonnull NSNumber *)recordID +AP_DEPRECATED("loadContactByRecordID:completion:"); + +@end \ No newline at end of file diff --git a/Example/Pods/APAddressBook/Pod/Core/Public/APAddressBook.m b/Example/Pods/APAddressBook/Pod/Core/Public/APAddressBook.m new file mode 100755 index 0000000..92c1a42 --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Public/APAddressBook.m @@ -0,0 +1,209 @@ +// +// APAddressBook.m +// APAddressBook +// +// Created by Alexey Belkevich on 1/10/14. +// Copyright (c) 2014 alterplay. All rights reserved. +// + +#import "APAddressBook.h" +#import "APAddressBookAccessRoutine.h" +#import "APAddressBookContactsRoutine.h" +#import "APAddressBookExternalChangeRoutine.h" +#import "APContactListBuilder.h" +#import "APAddressBookRefWrapper.h" +#import "APThread.h" + +@interface APAddressBook () +@property (nonatomic, strong) APAddressBookAccessRoutine *access; +@property (nonatomic, strong) APAddressBookContactsRoutine *contacts; +@property (nonatomic, strong) APAddressBookExternalChangeRoutine *externalChange; +@property (nonatomic, strong) APThread *thread; +@property (atomic, copy) void (^externalChangeCallback)(); +@property (atomic, strong) dispatch_queue_t externalChangeQueue; +@end + +@implementation APAddressBook + +#pragma mark - life cycle + +- (id)init +{ + self = [super init]; + self.fieldsMask = APContactFieldDefault; + self.thread = [[APThread alloc] init]; + [self.thread start]; + [self.thread dispatchAsync:^ + { + APAddressBookRefWrapper *refWrapper = [[APAddressBookRefWrapper alloc] init]; + self.access = [[APAddressBookAccessRoutine alloc] initWithAddressBookRefWrapper:refWrapper]; + if (!refWrapper.error) + { + self.contacts = [[APAddressBookContactsRoutine alloc] initWithAddressBookRefWrapper:refWrapper]; + self.externalChange = [[APAddressBookExternalChangeRoutine alloc] initWithAddressBookRefWrapper:refWrapper]; + self.externalChange.delegate = self; + } + else + { + NSLog(@"APAddressBook initialization error:\n%@", refWrapper.error); + } + }]; + return self; +} + +- (void)dealloc +{ + [self.thread cancel]; +} + +#pragma mark - public + ++ (APAddressBookAccess)access +{ + return [APAddressBookAccessRoutine accessStatus]; +} + +- (void)loadContacts:(APLoadContactsBlock)completionBlock +{ + [self loadContactsOnQueue:dispatch_get_main_queue() completion:completionBlock]; +} + +- (void)loadContactsOnQueue:(dispatch_queue_t)queue completion:(APLoadContactsBlock)completionBlock +{ + APContactField fieldMask = self.fieldsMask; + APContactListBuilder *listBuilder = [[APContactListBuilder alloc] init]; + listBuilder.filterBlock = self.filterBlock; + listBuilder.sortDescriptors = self.sortDescriptors; + [self.thread dispatchAsync:^ + { + [self.access requestAccessWithCompletion:^(BOOL granted, NSError *error) + { + [self.thread dispatchAsync:^ + { + NSArray *contacts = granted ? [self.contacts allContactsWithContactFieldMask:fieldMask] : nil; + contacts = [listBuilder contactListWithAllContacts:contacts]; + dispatch_async(queue, ^ + { + completionBlock ? completionBlock(contacts, error) : nil; + }); + }]; + }]; + }]; +} + +- (void)loadContactByRecordID:(NSNumber *)recordID completion:(APLoadContactBlock)completion +{ + [self loadContactByRecordID:recordID onQueue:dispatch_get_main_queue() completion:completion]; +} + +- (void)loadContactByRecordID:(NSNumber *)recordID onQueue:(dispatch_queue_t)queue + completion:(APLoadContactBlock)completion +{ + [self.thread dispatchAsync:^ + { + APContact *contact = [self.contacts contactByRecordID:recordID withFieldMask:self.fieldsMask]; + dispatch_async(queue, ^ + { + completion ? completion(contact) : nil; + }); + }]; +} + +- (void)loadPhotoByRecordID:(nonnull NSNumber *)recordID completion:(APLoadPhotoBlock)completion +{ + [self loadPhotoByRecordID:recordID onQueue:dispatch_get_main_queue() completion:completion]; +} + +- (void)loadPhotoByRecordID:(NSNumber *)recordID onQueue:(dispatch_queue_t)queue + completion:(APLoadPhotoBlock)completion +{ + [self.thread dispatchAsync:^ + { + UIImage *image = [self.contacts imageWithRecordID:recordID]; + dispatch_async(queue, ^ + { + completion ? completion(image) : nil; + }); + }]; +} + +- (void)startObserveChangesWithCallback:(void (^)())callback +{ + [self startObserveChangesOnQueue:dispatch_get_main_queue() callback:callback]; +} + +- (void)startObserveChangesOnQueue:(dispatch_queue_t)queue callback:(void (^)())callback +{ + self.externalChangeCallback = callback; + self.externalChangeQueue = queue; +} + +- (void)stopObserveChanges +{ + self.externalChangeCallback = nil; + self.externalChangeQueue = nil; +} + +- (void)requestAccess:(nonnull APRequestAccessBlock)completionBlock +{ + [self requestAccessOnQueue:dispatch_get_main_queue() completion:completionBlock]; +} + +- (void)requestAccessOnQueue:(nonnull dispatch_queue_t)queue + completion:(nonnull APRequestAccessBlock)completionBlock +{ + [self.thread dispatchAsync:^ + { + [self.access requestAccessWithCompletion:^(BOOL granted, NSError *error) + { + dispatch_async(queue, ^ + { + completionBlock ? completionBlock(granted, error) : nil; + }); + }]; + }]; +} + +#pragma mark - APAddressBookExternalChangeDelegate + +- (void)addressBookDidChange +{ + dispatch_queue_t queue = self.externalChangeQueue ?: dispatch_get_main_queue(); + dispatch_async(queue, ^ + { + self.externalChangeCallback ? self.externalChangeCallback() : nil; + }); +} + +#pragma mark - deprecated + ++ (void)requestAccess:(APRequestAccessBlock)completionBlock +{ + [self requestAccessOnQueue:dispatch_get_main_queue() completion:completionBlock]; +} + ++ (void)requestAccessOnQueue:(dispatch_queue_t)queue completion:(APRequestAccessBlock)completionBlock +{ + APAddressBookRefWrapper *refWrapper = [[APAddressBookRefWrapper alloc] init]; + APAddressBookAccessRoutine *access = [[APAddressBookAccessRoutine alloc] initWithAddressBookRefWrapper:refWrapper]; + [access requestAccessWithCompletion:^(BOOL granted, NSError *error) + { + dispatch_async(queue, ^ + { + completionBlock ? completionBlock(granted, error) : nil; + }); + }]; +} + +- (APContact *)getContactByRecordID:(NSNumber *)recordID +{ + APContactField fieldMask = self.fieldsMask; + __block APContact *contact = nil; + [self.thread dispatchSync:^ + { + contact = [self.contacts contactByRecordID:recordID withFieldMask:fieldMask]; + }]; + return contact; +} + +@end diff --git a/Example/Pods/APAddressBook/Pod/Core/Public/Models/APAddress.h b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APAddress.h new file mode 100755 index 0000000..c9948b0 --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APAddress.h @@ -0,0 +1,20 @@ +// +// APAddress.h +// APAddressBook +// +// Created by Alexey Belkevich on 4/19/14. +// Copyright (c) 2014 alterplay. All rights reserved. +// + +#import + +@interface APAddress : NSObject + +@property (nullable, nonatomic, strong) NSString *street; +@property (nullable, nonatomic, strong) NSString *city; +@property (nullable, nonatomic, strong) NSString *state; +@property (nullable, nonatomic, strong) NSString *zip; +@property (nullable, nonatomic, strong) NSString *country; +@property (nullable, nonatomic, strong) NSString *countryCode; + +@end diff --git a/Example/Pods/APAddressBook/Pod/Core/Public/Models/APAddress.m b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APAddress.m new file mode 100755 index 0000000..2fb741b --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APAddress.m @@ -0,0 +1,13 @@ +// +// APAddress.m +// APAddressBook +// +// Created by Alexey Belkevich on 4/19/14. +// Copyright (c) 2014 alterplay. All rights reserved. +// + +#import "APAddress.h" + +@implementation APAddress + +@end diff --git a/Example/Pods/APAddressBook/Pod/Core/Public/Models/APContact.h b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APContact.h new file mode 100755 index 0000000..607d85e --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APContact.h @@ -0,0 +1,39 @@ +// +// APContact.h +// APAddressBook +// +// Created by Alexey Belkevich on 1/10/14. +// Copyright (c) 2014 alterplay. All rights reserved. +// + +#import +#import +#import "APName.h" +#import "APJob.h" +#import "APPhone.h" +#import "APEmail.h" +#import "APAddress.h" +#import "APSocialProfile.h" +#import "APRelatedPerson.h" +#import "APSource.h" +#import "APRecordDate.h" + +@interface APContact : NSObject + +@property (nonnull, nonatomic, strong) NSNumber *recordID; +@property (nullable, nonatomic, strong) APName *name; +@property (nullable, nonatomic, strong) APJob *job; +@property (nullable, nonatomic, strong) UIImage *thumbnail; +@property (nullable, nonatomic, strong) NSArray *phones; +@property (nullable, nonatomic, strong) NSArray *emails; +@property (nullable, nonatomic, strong) NSArray *addresses; +@property (nullable, nonatomic, strong) NSArray *socialProfiles; +@property (nullable, nonatomic, strong) NSDate *birthday; +@property (nullable, nonatomic, strong) NSString *note; +@property (nullable, nonatomic, strong) NSArray *websites; +@property (nullable, nonatomic, strong) NSArray *relatedPersons; +@property (nullable, nonatomic, strong) NSArray *linkedRecordIDs; +@property (nullable, nonatomic, strong) APSource *source; +@property (nullable, nonatomic, strong) APRecordDate *recordDate; + +@end diff --git a/Example/Pods/APAddressBook/Pod/Core/Public/Models/APContact.m b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APContact.m new file mode 100755 index 0000000..6f6132a --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APContact.m @@ -0,0 +1,12 @@ +// +// APContact.m +// APAddressBook +// +// Created by Alexey Belkevich on 1/10/14. +// Copyright (c) 2014 alterplay. All rights reserved. +// + +#import "APContact.h" + +@implementation APContact +@end diff --git a/Example/Pods/APAddressBook/Pod/Core/Public/Models/APEmail.h b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APEmail.h new file mode 100644 index 0000000..b862964 --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APEmail.h @@ -0,0 +1,17 @@ +// +// APEmail.h +// AddressBook +// +// Created by Sean Langley on 2015-03-18. +// Copyright (c) 2015 Sean Langley. All rights reserved. +// + +#import + +@interface APEmail : NSObject + +@property (nullable, nonatomic, strong) NSString *address; +@property (nullable, nonatomic, strong) NSString *originalLabel; +@property (nullable, nonatomic, strong) NSString *localizedLabel; + +@end diff --git a/Example/Pods/APAddressBook/Pod/Core/Public/Models/APEmail.m b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APEmail.m new file mode 100644 index 0000000..fa02f3c --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APEmail.m @@ -0,0 +1,13 @@ +// +// APEmail.m +// AddressBook +// +// Created by Sean Langley on 2015-03-18. +// Copyright (c) 2015 Sean Langley. All rights reserved. +// + +#import "APEmail.h" + +@implementation APEmail + +@end diff --git a/Example/Pods/APAddressBook/Pod/Core/Public/Models/APJob.h b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APJob.h new file mode 100644 index 0000000..e30fcef --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APJob.h @@ -0,0 +1,16 @@ +// +// APJob +// AddressBook +// +// Created by Alexey Belkevich on 05.10.15. +// Copyright © 2015 alterplay. All rights reserved. +// + +#import + +@interface APJob : NSObject + +@property (nullable, nonatomic, strong) NSString *company; +@property (nullable, nonatomic, strong) NSString *jobTitle; + +@end \ No newline at end of file diff --git a/Example/Pods/APAddressBook/Pod/Core/Public/Models/APJob.m b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APJob.m new file mode 100644 index 0000000..9b6622d --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APJob.m @@ -0,0 +1,12 @@ +// +// APJob +// AddressBook +// +// Created by Alexey Belkevich on 05.10.15. +// Copyright © 2015 alterplay. All rights reserved. +// + +#import "APJob.h" + +@implementation APJob +@end \ No newline at end of file diff --git a/Example/Pods/APAddressBook/Pod/Core/Public/Models/APName.h b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APName.h new file mode 100644 index 0000000..04f0dcc --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APName.h @@ -0,0 +1,18 @@ +// +// APName +// AddressBook +// +// Created by Alexey Belkevich on 05.10.15. +// Copyright © 2015 alterplay. All rights reserved. +// + +#import + +@interface APName : NSObject + +@property (nullable, nonatomic, strong) NSString *firstName; +@property (nullable, nonatomic, strong) NSString *lastName; +@property (nullable, nonatomic, strong) NSString *middleName; +@property (nullable, nonatomic, strong) NSString *compositeName; + +@end \ No newline at end of file diff --git a/Example/Pods/APAddressBook/Pod/Core/Public/Models/APName.m b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APName.m new file mode 100644 index 0000000..bd49354 --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APName.m @@ -0,0 +1,12 @@ +// +// APName +// AddressBook +// +// Created by Alexey Belkevich on 05.10.15. +// Copyright © 2015 alterplay. All rights reserved. +// + +#import "APName.h" + +@implementation APName +@end \ No newline at end of file diff --git a/Example/Pods/APAddressBook/Pod/Core/Public/Models/APPhone.h b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APPhone.h new file mode 100755 index 0000000..82bfc49 --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APPhone.h @@ -0,0 +1,17 @@ +// +// APPhone.h +// APAddressBook +// +// Created by John Hobbs on 2/7/14. +// Copyright (c) 2014 alterplay. All rights reserved. +// + +#import + +@interface APPhone : NSObject + +@property (nullable, nonatomic, strong) NSString *number; +@property (nullable, nonatomic, strong) NSString *originalLabel; +@property (nullable, nonatomic, strong) NSString *localizedLabel; + +@end diff --git a/Example/Pods/APAddressBook/Pod/Core/Public/Models/APPhone.m b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APPhone.m new file mode 100755 index 0000000..2d3790f --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APPhone.m @@ -0,0 +1,21 @@ +// +// APPhone.m +// APAddressBook +// +// Created by John Hobbs on 2/7/14. +// Copyright (c) 2014 alterplay. All rights reserved. +// + +#import "APPhone.h" + +@implementation APPhone + +#pragma mark - overrides + +- (NSString *)description +{ + return [NSString stringWithFormat:@"%@ (%@) - %@", self.localizedLabel, self.originalLabel, + self.number]; +} + +@end diff --git a/Example/Pods/APAddressBook/Pod/Core/Public/Models/APRecordDate.h b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APRecordDate.h new file mode 100644 index 0000000..b303a97 --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APRecordDate.h @@ -0,0 +1,16 @@ +// +// APRecordDate +// AddressBook +// +// Created by Alexey Belkevich on 05.10.15. +// Copyright © 2015 alterplay. All rights reserved. +// + +#import + +@interface APRecordDate : NSObject + +@property (nonnull, nonatomic, strong) NSDate *creationDate; +@property (nonnull, nonatomic, strong) NSDate *modificationDate; + +@end \ No newline at end of file diff --git a/Example/Pods/APAddressBook/Pod/Core/Public/Models/APRecordDate.m b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APRecordDate.m new file mode 100644 index 0000000..aea4c9d --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APRecordDate.m @@ -0,0 +1,12 @@ +// +// APRecordDate +// AddressBook +// +// Created by Alexey Belkevich on 05.10.15. +// Copyright © 2015 alterplay. All rights reserved. +// + +#import "APRecordDate.h" + +@implementation APRecordDate +@end \ No newline at end of file diff --git a/Example/Pods/APAddressBook/Pod/Core/Public/Models/APRelatedPerson.h b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APRelatedPerson.h new file mode 100644 index 0000000..b172d0f --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APRelatedPerson.h @@ -0,0 +1,17 @@ +// +// APPhone.h +// APAddressBook +// +// Created by John Hobbs on 2/7/14. +// Copyright (c) 2014 alterplay. All rights reserved. +// + +#import + +@interface APRelatedPerson : NSObject + +@property (nullable, nonatomic, strong) NSString *name; +@property (nullable, nonatomic, strong) NSString *originalLabel; +@property (nullable, nonatomic, strong) NSString *localizedLabel; + +@end diff --git a/Example/Pods/APAddressBook/Pod/Core/Public/Models/APRelatedPerson.m b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APRelatedPerson.m new file mode 100644 index 0000000..be96403 --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APRelatedPerson.m @@ -0,0 +1,20 @@ +// +// APPhone.m +// APAddressBook +// +// Created by John Hobbs on 2/7/14. +// Copyright (c) 2014 alterplay. All rights reserved. +// + +#import "APRelatedPerson.h" + +@implementation APRelatedPerson + +#pragma mark - overrides + +- (NSString *)description +{ + return [NSString stringWithFormat:@"%@ (%@) - %@", self.localizedLabel, self.originalLabel, self.name]; +} + +@end diff --git a/Example/Pods/APAddressBook/Pod/Core/Public/Models/APSocialProfile.h b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APSocialProfile.h new file mode 100644 index 0000000..116b15b --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APSocialProfile.h @@ -0,0 +1,19 @@ +// +// APSocialContact.h +// APAddressBook +// +// Created by David on 2014-08-01. +// Copyright (c) 2014 David Muzi. All rights reserved. +// + +#import +#import "APTypes.h" + +@interface APSocialProfile : NSObject + +@property (nonatomic, assign) APSocialNetworkType socialNetwork; +@property (nullable, nonatomic, strong) NSString *username; +@property (nullable, nonatomic, strong) NSString *userIdentifier; +@property (nullable, nonatomic, strong) NSURL *url; + +@end diff --git a/Example/Pods/APAddressBook/Pod/Core/Public/Models/APSocialProfile.m b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APSocialProfile.m new file mode 100644 index 0000000..d75f5a7 --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APSocialProfile.m @@ -0,0 +1,13 @@ +// +// APSocialContact.m +// APAddressBook +// +// Created by David on 2014-08-01. +// Copyright (c) 2014 David Muzi. All rights reserved. +// + +#import "APSocialProfile.h" + +@implementation APSocialProfile + +@end diff --git a/Example/Pods/APAddressBook/Pod/Core/Public/Models/APSource.h b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APSource.h new file mode 100644 index 0000000..8b96e99 --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APSource.h @@ -0,0 +1,16 @@ +// +// APSource +// AddressBook +// +// Created by Alexey Belkevich on 23.09.15. +// Copyright © 2015 alterplay. All rights reserved. +// + +#import + +@interface APSource : NSObject + +@property (nonnull, nonatomic, strong) NSString *sourceType; +@property (nonnull, nonatomic, strong) NSNumber *sourceID; + +@end \ No newline at end of file diff --git a/Example/Pods/APAddressBook/Pod/Core/Public/Models/APSource.m b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APSource.m new file mode 100644 index 0000000..100bcf2 --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APSource.m @@ -0,0 +1,12 @@ +// +// APSource +// AddressBook +// +// Created by Alexey Belkevich on 23.09.15. +// Copyright © 2015 alterplay. All rights reserved. +// + +#import "APSource.h" + +@implementation APSource +@end \ No newline at end of file diff --git a/Example/Pods/APAddressBook/Pod/Core/Public/Models/APTypes.h b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APTypes.h new file mode 100644 index 0000000..be8f38e --- /dev/null +++ b/Example/Pods/APAddressBook/Pod/Core/Public/Models/APTypes.h @@ -0,0 +1,46 @@ +// +// APTypes.h +// APAddressBook +// +// Created by Alexey Belkevich on 1/11/14. +// Copyright (c) 2014 alterplay. All rights reserved. +// + +typedef NS_ENUM(NSUInteger, APAddressBookAccess) +{ + APAddressBookAccessUnknown = 0, + APAddressBookAccessGranted = 1, + APAddressBookAccessDenied = 2 +}; + +typedef NS_OPTIONS(NSUInteger, APContactField) +{ + APContactFieldName = 1 << 0, + APContactFieldJob = 1 << 1, + APContactFieldThumbnail = 1 << 2, + APContactFieldPhonesOnly = 1 << 3, + APContactFieldPhonesWithLabels = 1 << 4, + APContactFieldEmailsOnly = 1 << 5, + APContactFieldEmailsWithLabels = 1 << 6, + APContactFieldAddresses = 1 << 7, + APContactFieldSocialProfiles = 1 << 8, + APContactFieldBirthday = 1 << 9, + APContactFieldWebsites = 1 << 10, + APContactFieldNote = 1 << 11, + APContactFieldRelatedPersons = 1 << 12, + APContactFieldLinkedRecordIDs = 1 << 13, + APContactFieldSource = 1 << 14, + APContactFieldRecordDate = 1 << 15, + APContactFieldDefault = APContactFieldName | APContactFieldPhonesOnly, + APContactFieldAll = 0xFFFFFFFF +}; + +typedef NS_ENUM(NSUInteger, APSocialNetworkType) +{ + APSocialNetworkUnknown = 0, + APSocialNetworkFacebook = 1, + APSocialNetworkTwitter = 2, + APSocialNetworkLinkedIn = 3, + APSocialNetworkFlickr = 4, + APSocialNetworkGameCenter = 5 +}; \ No newline at end of file diff --git a/Example/Pods/APAddressBook/README.md b/Example/Pods/APAddressBook/README.md new file mode 100644 index 0000000..478489f --- /dev/null +++ b/Example/Pods/APAddressBook/README.md @@ -0,0 +1,194 @@ + +[![Build Status](https://api.travis-ci.org/Alterplay/APAddressBook.svg)](https://travis-ci.org/Alterplay/APAddressBook) + +APAddressBook is a wrapper on [AddressBook.framework](https://developer.apple.com/library/ios/documentation/AddressBook/Reference/AddressBook_iPhoneOS_Framework/_index.html) that gives easy access to native address book without pain in a head. + +#### Features +* Load contacts from iOS address book asynchronously +* Decide what contact data fields you need to load (for example, only name and phone number) +* Filter contacts to get only necessary records (for example, you need only contacts with email) +* Sort contacts with array of any [NSSortDescriptor](https://developer.apple.com/library/mac/documentation/cocoa/reference/foundation/classes/NSSortDescriptor_Class/Reference/Reference.html) +* Get photo of contact + +#### Objective-c +**Installation** + +Add `APAddressBook` pod to [Podfile](http://guides.cocoapods.org/syntax/podfile.html) +```ruby +pod 'APAddressBook' +``` + +**Load contacts** +```objective-c +APAddressBook *addressBook = [[APAddressBook alloc] init]; +// don't forget to show some activity +[addressBook loadContacts:^(NSArray *contacts, NSError *error) +{ + // hide activity + if (!error) + { + // do something with contacts array + } + else + { + // show error + } +}]; +``` + +> Callback block will be run on main queue! If you need to run callback block on custom queue use `loadContactsOnQueue:completion:` method + +**Select contact fields bit-mask** + +Available fields: +* APContactFieldName - *first name*, *last name*, *middle name*, *composite name* +* APContactFieldJob - *company (organization)*, *job title* +* APContactFieldThumbnail - *thumbnail* image +* APContactFieldPhonesOnly - array of *phone numbers* disregarding *phone labels* +* APContactFieldPhonesWithLabels - array *phones* with *original and localized labels* +* APContactFieldEmailsOnly - array of *email addresses* disregarding *email labels* +* APContactFieldEmailsWithLabels - array of *email addresses* with *original and localized labels* +* APContactFieldAddresses - array of contact *addresses* +* APContactFieldSocialProfiles - array of contact *profiles in social networks* +* APContactFieldBirthday - date of *birthday* +* APContactFieldWebsites - array of strings with *website URLs* +* APContactFieldNote - string with *notes* +* APContactFieldRelatedPersons - array of *related persons* +* APContactFieldLinkedRecordIDs - array of contact *linked records IDs* +* APContactFieldSource - contact *source ID* and *source name* +* APContactFieldRecordDate - contact record *creation date* and *modification date* +* APContactFieldDefault - contact *name and phones* without *labels* +* APContactFieldAll - all contact fields described above + +> Contact `recordID` property is always available + +Example of field mask with name and thumbnail: +```objective-c +APAddressBook *addressBook = [[APAddressBook alloc] init]; +addressBook.fieldsMask = APContactFieldFirstName | APContactFieldThumbnail; +``` + +**Filter contacts** + +The most common use of this option is to filter contacts without phone number. Example: +```objective-c +addressBook.filterBlock = ^BOOL(APContact *contact) +{ + return contact.phones.count > 0; +}; +``` + +**Sort contacts** + +APAddressBook returns unsorted contacts. So, most of users would like to sort contacts by first name and last name. +```objective-c +addressBook.sortDescriptors = @[ + [NSSortDescriptor sortDescriptorWithKey:@"name.firstName" ascending:YES], + [NSSortDescriptor sortDescriptorWithKey:@"name.lastName" ascending:YES] +]; +``` + +**Load contact by address book record ID** +```objective-c +[addressBook loadContactByRecordID:recordID completion:^(APContact *contact) +{ + self.contact = contact; +}]; +``` + +> `APContact` instance will contain fields that set in `addressBook.fieldsMask` + +> Callback block will be run on main queue! If you need to run callback block on custom queue use `loadContactByRecordID:onQueue:completion:` method + + +** Load contact photo by address book record ID ** +```objective-c +[addressBook loadPhotoByRecordID:recordID completion:^(UIImage *image) +{ + self.imageView.image = image; +}]; +``` +> Callback block will be run on main queue! If you need to run callback block on custom queue use `loadPhotoByRecordID:onQueue:completion:` method + + +**Observe address book external changes** +```objective-c +// start observing +[addressBook startObserveChangesWithCallback:^ +{ + // reload contacts +}]; +// stop observing +[addressBook stopObserveChanges]; +``` + +**Request address book access** +```objective-c +[addressBook requestAccess:^(BOOL granted, NSError *error) +{ + // check `granted` +}]; +``` + +**Check address book access** +```objective-c +switch([APAddressBook access]) +{ + case APAddressBookAccessUnknown: + // Application didn't request address book access yet + break; + + case APAddressBookAccessGranted: + // Access granted + break; + + case APAddressBookAccessDenied: + // Access denied or restricted by privacy settings + break; +} +``` + +#### Swift +**Installation** +```ruby +pod 'APAddressBook/Swift' +``` +Import `APAddressBook-Bridging.h` to application's objective-c bridging file. +```objective-c +#import +``` + +**Example** + +See example application in `Example/Swift` directory. +```Swift +self.addressBook.loadContacts( + { (contacts: [APContact]?, error: NSError?) in + if let uwrappedContacts = contacts { + // do something with contacts + } + else if let unwrappedError = error { + // show error + } + }) +``` + +#### 0.1.x to 0.2.x Migration guide +[Migration Guide](https://github.com/Alterplay/APAddressBook/wiki/0.1.x-to-0.2.x-migration-guide) + +#### History + +[Releases](https://github.com/Alterplay/APAddressBook/releases) + +#### Contributor guide + +[Contributor Guide](https://github.com/Alterplay/APAddressBook/wiki/Contributor-Guide) + +[![githalytics.com alpha](https://cruel-carlota.pagodabox.com/b3f8691205854e15dcfebe3fc2ed599e "githalytics.com")](http://githalytics.com/Alterplay/APAddressBook) + +#### Contacts + +If you have improvements or concerns, feel free to post [an issue](https://github.com/Alterplay/APAddressBook/issues) and write details. + +[Check out](https://github.com/Alterplay) all Alterplay's GitHub projects. +[Email us](mailto:hello@alterplay.com?subject=From%20GitHub%20APAddressBook) with other ideas and projects. diff --git a/Example/Pods/EasyMapping/EasyMapping/EKCoreDataImporter.h b/Example/Pods/EasyMapping/EasyMapping/EKCoreDataImporter.h new file mode 100644 index 0000000..8194bae --- /dev/null +++ b/Example/Pods/EasyMapping/EasyMapping/EKCoreDataImporter.h @@ -0,0 +1,82 @@ +// +// EasyMapping +// +// Copyright (c) 2012-2014 Lucas Medeiros. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +@import CoreData; +#import "EKManagedObjectMapping.h" + +/** + `EKCoreDataImporter` is internal EasyMapping class and is used by `EKManagedObjectMapper` to manage CoreData imports and make them fast and efficient. It basically does 3 things: + + - Collect all entity names from mapping + - Introspect passed JSON to collect all primary keys for collected entities + - Prefetch all existing entities instead of fetching them one by one. + + The more high level JSON is passed to `EKCoreDataImporer`, the bigger perfomance win will be. If you can use methods like arrayOfObjectsFromExternalRepresentation: instead of objectFromExternalRepresentation, use them. + */ + +@interface EKCoreDataImporter : NSObject + +/** + Context, on which import will be happening. + */ +@property (nonatomic, strong) NSManagedObjectContext * context; + +/** + Mapping for the JSON, that was passed to importer. + */ +@property (nonatomic, strong) EKManagedObjectMapping * mapping; + +/** + JSON representation of data to import. + */ +@property (nonatomic, strong) id externalRepresentation; + +/** + Create instance of `EKCoreDataImporter` and start collecting data from JSON and mapping. This is designated initializer. + + @param mapping object mapping + + @param externalRepresentation JSON, that will be mapped to objects + + @param context Context, on which all changes will happen + + @result CoreData importer + */ ++ (instancetype)importerWithMapping:(EKManagedObjectMapping *)mapping + externalRepresentation:(id)externalRepresentation + context:(NSManagedObjectContext *)context; + +/** + Get's existing object by it's primary key value. Returns nil, if object does not exist in CoreData database. + + @param representation JSON representation of object + + @param mapping object mapping + + @result managed object + */ +- (id)existingObjectForRepresentation:(id)representation mapping:(EKManagedObjectMapping *)mapping context:(NSManagedObjectContext *)context; + +- (void)cacheObject:(NSManagedObject *)object withMapping:(EKManagedObjectMapping *)mapping; + +@end diff --git a/Example/Pods/EasyMapping/EasyMapping/EKCoreDataImporter.m b/Example/Pods/EasyMapping/EasyMapping/EKCoreDataImporter.m new file mode 100644 index 0000000..08ed5dd --- /dev/null +++ b/Example/Pods/EasyMapping/EasyMapping/EKCoreDataImporter.m @@ -0,0 +1,265 @@ +// +// EasyMapping +// +// Copyright (c) 2012-2014 Lucas Medeiros. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "EKCoreDataImporter.h" +#import "EKPropertyHelper.h" +#import "NSArray+FlattenArray.h" +#import "EKRelationshipMapping.h" + +@interface EKCoreDataImporter () + +@property (nonatomic, strong) NSMutableSet * collectedEntityNames; + +@property (nonatomic, strong) NSSet * entityNames; + +// Keys are entity names, values - NSSet with primary keys +@property (nonatomic, strong) NSDictionary * existingEntitiesPrimaryKeys; + +// Keys are entity names, values - NSDictionary, where keys = primary keys, values = fetched objects +@property (nonatomic, strong) NSMutableDictionary * fetchedExistingEntities; + +@end + +@implementation EKCoreDataImporter + ++ (instancetype)importerWithMapping:(EKManagedObjectMapping *)mapping + externalRepresentation:(id)externalRepresentation + context:(NSManagedObjectContext *)context +{ + EKCoreDataImporter * importer = [self new]; + + importer.mapping = mapping; + importer.externalRepresentation = externalRepresentation; + importer.context = context; + + importer.fetchedExistingEntities = [NSMutableDictionary dictionary]; + [importer collectEntityNames]; + [importer inspectRepresentationInContext:context]; + + return importer; +} + +#pragma mark - collect entity names + +- (void)collectEntityNames +{ + NSMutableSet * entityNames = [NSMutableSet set]; + self.collectedEntityNames = [NSMutableSet set]; + + [self collectEntityNamesRecursively:entityNames mapping:self.mapping]; + + self.entityNames = [entityNames copy]; +} + +- (void)collectEntityNamesRecursively:(NSMutableSet *)entityNames mapping:(EKManagedObjectMapping *)mapping +{ + [entityNames addObject:mapping.entityName]; + + for (EKRelationshipMapping * oneMapping in [mapping.hasOneMappings allValues]) + { + EKManagedObjectMapping * mapping = (EKManagedObjectMapping *)[oneMapping objectMapping]; + if ([self.collectedEntityNames containsObject:mapping.entityName]) + { + continue; + } + else { + [self.collectedEntityNames addObject:mapping.entityName]; + [self collectEntityNamesRecursively:entityNames mapping:mapping]; + } + } + + for (EKRelationshipMapping * manyMapping in [mapping.hasManyMappings allValues]) + { + EKManagedObjectMapping * mapping = (EKManagedObjectMapping *)[manyMapping objectMapping]; + if ([self.collectedEntityNames containsObject:mapping.entityName]) + { + continue; + } + else { + [self.collectedEntityNames addObject:mapping.entityName]; + [self collectEntityNamesRecursively:entityNames mapping:mapping]; + } + } +} + +#pragma mark - Inspecting representation + +- (void)inspectRepresentationInContext:(NSManagedObjectContext *)context +{ + NSMutableDictionary * existingPrimaryKeys = [NSMutableDictionary dictionary]; + for (NSString * entityName in self.entityNames) + { + existingPrimaryKeys[entityName] = [NSSet set]; + } + [self inspectRepresentation:self.externalRepresentation + usingMapping:self.mapping + accumulateInside:existingPrimaryKeys + context:context]; + + self.existingEntitiesPrimaryKeys = [existingPrimaryKeys copy]; +} + +- (void)inspectRepresentation:(id)representation + usingMapping:(EKManagedObjectMapping *)mapping + accumulateInside:(NSMutableDictionary *)dictionary + context:(NSManagedObjectContext *)context +{ + id rootRepresentation = [EKPropertyHelper extractRootPathFromExternalRepresentation:representation + withMapping:mapping]; + if ([rootRepresentation isKindOfClass:[NSArray class]]) + { + for (NSDictionary * objectInfo in rootRepresentation) + { + id value = [self primaryKeyValueFromRepresentation:objectInfo usingMapping:mapping context:context]; + if (value && value != (id)[NSNull null]) + { + dictionary[mapping.entityName] = [dictionary[mapping.entityName] setByAddingObject:value]; + } + } + } + else if ([rootRepresentation isKindOfClass:[NSDictionary class]]) + { + id value = [self primaryKeyValueFromRepresentation:rootRepresentation usingMapping:mapping context:context]; + if (value && value != (id)[NSNull null]) + { + dictionary[mapping.entityName] = [dictionary[mapping.entityName] setByAddingObject:value]; + } + } + + [mapping.hasOneMappings enumerateKeysAndObjectsUsingBlock:^(id key, EKRelationshipMapping * mapping, BOOL * stop) + { + id oneMappingRepresentation = [rootRepresentation valueForKeyPath:key]; + if (oneMappingRepresentation && ![oneMappingRepresentation isEqual:[NSNull null]]) + { + // This is needed, because if one of the objects in array does not contain object for key, returned structure would be something like this: + // + // @[,@[value2,value3]] + // + // And we are interested in flat structure like this: @[value2,value3] + if ([oneMappingRepresentation isKindOfClass:[NSArray class]]) { + oneMappingRepresentation = [oneMappingRepresentation ek_flattenedCompactedArray]; + + // if after compact, the array is empty, we should skip this + if ([oneMappingRepresentation count] == 0) { + return; + } + } + + [self inspectRepresentation:oneMappingRepresentation + usingMapping:(EKManagedObjectMapping *)[mapping objectMapping] + accumulateInside:dictionary + context:context]; + } + }]; + + [mapping.hasManyMappings enumerateKeysAndObjectsUsingBlock:^(id key, EKRelationshipMapping * mapping, BOOL * stop) + { + NSArray * manyMappingRepresentation = [rootRepresentation valueForKeyPath:key]; + + if (manyMappingRepresentation && ![manyMappingRepresentation isEqual:[NSNull null]]) + { + // This is needed, because if one of the objects in array does not contain object for key, returned structure would be something like this: + // + // @[,@[value2,value3]] + // + // And we are interested in flat structure like this: @[value2,value3] + manyMappingRepresentation = [manyMappingRepresentation ek_flattenedCompactedArray]; + + // if after compact, the array is empty, we should skip this + if ([manyMappingRepresentation count] == 0) { + return; + } + + [self inspectRepresentation:manyMappingRepresentation + usingMapping:(EKManagedObjectMapping *)[mapping objectMapping] + accumulateInside:dictionary + context:context]; + } + }]; +} + +- (id)primaryKeyValueFromRepresentation:(id)representation usingMapping:(EKManagedObjectMapping *)mapping context:(NSManagedObjectContext *)context +{ + EKPropertyMapping * primaryKeyMapping = [mapping primaryKeyPropertyMapping]; + id primaryValue = [EKPropertyHelper getValueOfManagedProperty:primaryKeyMapping + fromRepresentation:representation + inContext:context]; + return primaryValue; +} + +#pragma mark - Fetching existing objects + +- (NSMutableDictionary *)fetchExistingObjectsForMapping:(EKManagedObjectMapping *)mapping +{ + NSSet * lookupValues = self.existingEntitiesPrimaryKeys[mapping.entityName]; + if (lookupValues.count == 0) return [NSMutableDictionary dictionary]; + + NSFetchRequest * fetchRequest = [NSFetchRequest fetchRequestWithEntityName:mapping.entityName]; + NSPredicate * predicate = [NSPredicate predicateWithFormat:@"%K IN %@", mapping.primaryKey, lookupValues]; + [fetchRequest setPredicate:predicate]; + [fetchRequest setFetchLimit:lookupValues.count]; + + NSMutableDictionary * output = [NSMutableDictionary new]; + NSArray * existingObjects = [self.context executeFetchRequest:fetchRequest error:NULL]; + for (NSManagedObject * object in existingObjects) + { + output[[object valueForKey:mapping.primaryKey]] = object; + } + + return output; +} + +- (NSMutableDictionary *)cachedObjectsForMapping:(EKManagedObjectMapping *)mapping +{ + NSMutableDictionary * entityObjectsMap = self.fetchedExistingEntities[mapping.entityName]; + if (!entityObjectsMap) + { + entityObjectsMap = [self fetchExistingObjectsForMapping:mapping]; + self.fetchedExistingEntities[mapping.entityName] = entityObjectsMap; + } + + return entityObjectsMap; +} + +- (id)existingObjectForRepresentation:(id)representation mapping:(EKManagedObjectMapping *)mapping context:(NSManagedObjectContext *)context +{ + NSDictionary * entityObjectsMap = [self cachedObjectsForMapping:mapping]; + + id primaryKeyValue = [EKPropertyHelper getValueOfManagedProperty:[mapping primaryKeyPropertyMapping] + fromRepresentation:representation + inContext:context]; + if (primaryKeyValue == nil || primaryKeyValue == NSNull.null) return nil; + + return entityObjectsMap[primaryKeyValue]; +} + +-(void)cacheObject:(NSManagedObject *)object withMapping:(EKManagedObjectMapping *)mapping +{ + if(!mapping.primaryKey) return; + + NSMutableDictionary *entityObjectsMap = self.fetchedExistingEntities[mapping.entityName]; + entityObjectsMap[[object valueForKey:mapping.primaryKey]] = object; + self.fetchedExistingEntities[mapping.entityName] = entityObjectsMap; +} + +@end diff --git a/Example/Pods/EasyMapping/EasyMapping/EKManagedObjectMapper.h b/Example/Pods/EasyMapping/EasyMapping/EKManagedObjectMapper.h new file mode 100644 index 0000000..5bbda62 --- /dev/null +++ b/Example/Pods/EasyMapping/EasyMapping/EKManagedObjectMapper.h @@ -0,0 +1,101 @@ +// +// EasyMapping +// +// Copyright (c) 2012-2014 Lucas Medeiros. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#import "EKManagedObjectMapping.h" + +/** + `EKManagedObjectMapper` is used to create and fill CoreData objects. Internally, it uses `EKCoreDataImporter` class to speed up data imports. You can find more info on this in project's readme. + */ +@interface EKManagedObjectMapper : NSObject + +/** + Creates object from JSON representation, using `mapping` in `context`. + + @param externalRepresentation JSON representation of object data + + @param mapping object mapping + + @param context managed object context to perform object creation + + @result mapped managed object + */ ++ (id)objectFromExternalRepresentation:(NSDictionary *)externalRepresentation + withMapping:(EKManagedObjectMapping *)mapping + inManagedObjectContext:(NSManagedObjectContext*)context; + +/** + Fills previously existed object with values, provided in JSON representation. All values, that are included in mapping and were filled prior to calling this method, will be overwritten. + + @param object Object to fill + + @param externalRepresentation JSON representation of object data + + @param mapping object mapping + + @param context managed object context to perform object creation + + @result filled managed object + */ ++ (id) fillObject:(id)object + fromExternalRepresentation:(NSDictionary *)externalRepresentation + withMapping:(EKManagedObjectMapping *)mapping + inManagedObjectContext:(NSManagedObjectContext*)context; + +/** + Create array of CoreData objects. If passed JSON contains primary keys, previously existing object with these keys will be updated. Simply put, this method uses Find-Or-Create pattern. + + @param externalRepresentation JSON array with objects + + @param mapping object mapping + + @param context managed object context to perform objects creation + + @result array of managed objects + */ ++ (NSArray *)arrayOfObjectsFromExternalRepresentation:(NSArray *)externalRepresentation + withMapping:(EKManagedObjectMapping *)mapping + inManagedObjectContext:(NSManagedObjectContext*)context; + +/** + Synchronize the objects in the managed object context with the objects from an external + representation. Any new objects will be created, any existing objects will be updated + and any object not present in the external representation will be deleted from the + managed object context. The fetch request is used to pre-fetch all existing objects. + + @param externalRepresentation JSON array with objects + + @param mapping object mapping + + @param fetchRequest Fetch request to get existing objects + + @param context managed object context to perform objects creation + + @result array of managed objects + */ ++ (NSArray *)syncArrayOfObjectsFromExternalRepresentation:(NSArray *)externalRepresentation + withMapping:(EKManagedObjectMapping *)mapping + fetchRequest:(NSFetchRequest*)fetchRequest + inManagedObjectContext:(NSManagedObjectContext *)context; + +@end diff --git a/Example/Pods/EasyMapping/EasyMapping/EKManagedObjectMapper.m b/Example/Pods/EasyMapping/EasyMapping/EKManagedObjectMapper.m new file mode 100644 index 0000000..8f8bc16 --- /dev/null +++ b/Example/Pods/EasyMapping/EasyMapping/EKManagedObjectMapper.m @@ -0,0 +1,226 @@ +// +// EasyMapping +// +// Copyright (c) 2012-2014 Lucas Medeiros. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "EKManagedObjectMapper.h" +#import "EKPropertyHelper.h" +#import "EKCoreDataImporter.h" +#import "EKRelationshipMapping.h" + +@interface EKManagedObjectMapper () +@property (nonatomic, strong) EKCoreDataImporter * importer; + ++ (instancetype)mapperWithImporter:(EKCoreDataImporter *)importer; + +@end + +@implementation EKManagedObjectMapper + ++ (instancetype)mapperWithImporter:(EKCoreDataImporter *)importer +{ + EKManagedObjectMapper * mapper = [self new]; + mapper.importer = importer; + return mapper; +} + +- (id)objectFromExternalRepresentation:(NSDictionary *)externalRepresentation + withMapping:(EKManagedObjectMapping *)mapping +{ + NSManagedObject * object = [self.importer existingObjectForRepresentation:externalRepresentation + mapping:mapping + context:self.importer.context]; + if (!object) + { + object = [NSEntityDescription insertNewObjectForEntityForName:mapping.entityName + inManagedObjectContext:self.importer.context]; + } + NSManagedObject * filledObject = [self fillObject:object + fromExternalRepresentation:externalRepresentation + withMapping:mapping]; + [self.importer cacheObject:filledObject withMapping:mapping]; + + return filledObject; +} + +- (id)fillObject:(id)object fromExternalRepresentation:(NSDictionary *)externalRepresentation + withMapping:(EKManagedObjectMapping *)mapping +{ + NSDictionary * representation = [EKPropertyHelper extractRootPathFromExternalRepresentation:externalRepresentation + withMapping:mapping]; + [mapping.propertyMappings enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL * stop) + { + [EKPropertyHelper setProperty:obj + onObject:object + fromRepresentation:representation + inContext:self.importer.context + respectPropertyType:mapping.respectPropertyFoundationTypes]; + }]; + [mapping.hasOneMappings enumerateKeysAndObjectsUsingBlock:^(id key, EKRelationshipMapping * relationship, BOOL * stop) + { + NSDictionary * value = [relationship extractObjectFromRepresentation:representation]; + if (value && value != (id)[NSNull null]) + { + id result = [self objectFromExternalRepresentation:value withMapping:(EKManagedObjectMapping *)[relationship objectMapping]]; + [EKPropertyHelper setValue:result onObject:object forKeyPath:relationship.property]; + } + }]; + [mapping.hasManyMappings enumerateKeysAndObjectsUsingBlock:^(id key, EKRelationshipMapping * relationship, BOOL * stop) + { + NSArray * arrayToBeParsed = [representation valueForKeyPath:key]; + if (arrayToBeParsed && arrayToBeParsed != (id)[NSNull null]) + { + NSArray * parsedArray = [self arrayOfObjectsFromExternalRepresentation:arrayToBeParsed + withMapping:(EKManagedObjectMapping *)[relationship objectMapping]]; + id parsedObjects = [EKPropertyHelper propertyRepresentation:parsedArray + forObject:object + withPropertyName:[relationship property]]; + if(mapping.incrementalData) { + [EKPropertyHelper addValue:parsedObjects onObject:object forKeyPath:relationship.property]; + } + else { + [EKPropertyHelper setValue:parsedObjects onObject:object forKeyPath:relationship.property]; + } + } + }]; + return object; +} + +- (NSArray *)arrayOfObjectsFromExternalRepresentation:(NSArray *)externalRepresentation + withMapping:(EKManagedObjectMapping *)mapping +{ + + NSMutableArray * array = [NSMutableArray array]; + for (NSDictionary * representation in externalRepresentation) + { + id parsedObject = [self objectFromExternalRepresentation:representation withMapping:mapping]; + [array addObject:parsedObject]; + } + return [NSArray arrayWithArray:array]; +} + +- (NSArray *)syncArrayOfObjectsFromExternalRepresentation:(NSArray *)externalRepresentation + withMapping:(EKManagedObjectMapping *)mapping + fetchRequest:(NSFetchRequest *)fetchRequest +{ + NSAssert(mapping.primaryKey, @"A mapping with a primary key is required"); + EKPropertyMapping * primaryKeyPropertyMapping = [mapping primaryKeyPropertyMapping]; + + // Create a dictionary that maps primary keys to existing objects + NSArray * existing = [self.importer.context executeFetchRequest:fetchRequest error:NULL]; + NSDictionary * existingByPK = [NSDictionary dictionaryWithObjects:existing + forKeys:[existing valueForKey:primaryKeyPropertyMapping.property]]; + + NSMutableArray * array = [NSMutableArray array]; + for (NSDictionary * representation in externalRepresentation) + { + // Look up the object by its primary key + id primaryKeyValue = [EKPropertyHelper getValueOfManagedProperty:primaryKeyPropertyMapping + fromRepresentation:representation + inContext:self.importer.context]; + id object = [existingByPK objectForKey:primaryKeyValue]; + + // Create a new object if necessary + if (!object) + object = [NSEntityDescription insertNewObjectForEntityForName:mapping.entityName + inManagedObjectContext:self.importer.context]; + + [self fillObject:object fromExternalRepresentation:representation withMapping:mapping]; + [array addObject:object]; + } + + // Any object returned by the fetch request not in the external represntation has to be deleted + NSMutableSet * toDelete = [NSMutableSet setWithArray:existing]; + [toDelete minusSet:[NSSet setWithArray:array]]; + for (NSManagedObject * o in toDelete) + [self.importer.context deleteObject:o]; + + return [NSArray arrayWithArray:array]; +} + + +#pragma mark - CoreData Importer +/* + All methods below perform a redirection to instance methods, that use CoreData importer class + */ + ++ (id)objectFromExternalRepresentation:(NSDictionary *)externalRepresentation + withMapping:(EKManagedObjectMapping *)mapping + inManagedObjectContext:(NSManagedObjectContext *)context +{ + NSParameterAssert([mapping isKindOfClass:[EKManagedObjectMapping class]]); + NSParameterAssert(context); + + EKCoreDataImporter * importer = [EKCoreDataImporter importerWithMapping:mapping + externalRepresentation:externalRepresentation + context:context]; + return [[self mapperWithImporter:importer] objectFromExternalRepresentation:externalRepresentation + withMapping:mapping]; +} + ++ (id) fillObject:(id)object + fromExternalRepresentation:(NSDictionary *)externalRepresentation + withMapping:(EKManagedObjectMapping *)mapping + inManagedObjectContext:(NSManagedObjectContext*)context +{ + NSParameterAssert([mapping isKindOfClass:[EKManagedObjectMapping class]]); + NSParameterAssert(context); + + EKCoreDataImporter * importer = [EKCoreDataImporter importerWithMapping:mapping + externalRepresentation:externalRepresentation + context:context]; + return [[self mapperWithImporter:importer] fillObject:object + fromExternalRepresentation:externalRepresentation + withMapping:mapping]; +} + ++ (NSArray *)arrayOfObjectsFromExternalRepresentation:(NSArray *)externalRepresentation + withMapping:(EKManagedObjectMapping *)mapping + inManagedObjectContext:(NSManagedObjectContext*)context +{ + NSParameterAssert([mapping isKindOfClass:[EKManagedObjectMapping class]]); + NSParameterAssert(context); + + EKCoreDataImporter * importer = [EKCoreDataImporter importerWithMapping:mapping + externalRepresentation:externalRepresentation + context:context]; + + return [[self mapperWithImporter:importer] arrayOfObjectsFromExternalRepresentation:externalRepresentation + withMapping:mapping]; +} + ++ (NSArray *)syncArrayOfObjectsFromExternalRepresentation:(NSArray *)externalRepresentation + withMapping:(EKManagedObjectMapping *)mapping + fetchRequest:(NSFetchRequest *)fetchRequest + inManagedObjectContext:(NSManagedObjectContext *)context +{ + NSParameterAssert([mapping isKindOfClass:[EKManagedObjectMapping class]]); + NSParameterAssert(context); + + EKCoreDataImporter * importer = [EKCoreDataImporter importerWithMapping:mapping + externalRepresentation:externalRepresentation + context:context]; + return [[self mapperWithImporter:importer] syncArrayOfObjectsFromExternalRepresentation:externalRepresentation + withMapping:mapping + fetchRequest:fetchRequest]; +} + +@end diff --git a/Example/Pods/EasyMapping/EasyMapping/EKManagedObjectMapping.h b/Example/Pods/EasyMapping/EasyMapping/EKManagedObjectMapping.h new file mode 100644 index 0000000..dba4089 --- /dev/null +++ b/Example/Pods/EasyMapping/EasyMapping/EKManagedObjectMapping.h @@ -0,0 +1,127 @@ +// +// EasyMapping +// +// Copyright (c) 2012-2014 Lucas Medeiros. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "EKObjectMapping.h" +#import "EKPropertyMapping.h" + +#define EKDesignatedInitializer(__SEL__) __attribute__((unavailable("Invoke the designated initializer `" # __SEL__ "` instead."))) + +/** + `EKManagedObjectMapping` is a subclass of `EKObjectMapping`, intended to be used with CoreData objects. + */ + +@interface EKManagedObjectMapping : EKObjectMapping + +/** + Entity name of CoreData object. + */ +@property (nonatomic, strong, readonly) NSString* entityName; + +/** + Primary key of CoreData objects + */ +@property (nonatomic, strong) NSString *primaryKey; + +-(void)mapKeyPath:(NSString *)keyPath toProperty:(NSString *)property withValueBlock:(EKManagedMappingValueBlock)valueBlock; + +-(void)mapKeyPath:(NSString *)keyPath toProperty:(NSString *)property + withValueBlock:(EKManagedMappingValueBlock)valueBlock + reverseBlock:(EKManagedMappingReverseValueBlock)reverseBlock; + +/** + Convenience constructor for `EKManagedObjectMapping`. + + @param entityName Name of CoreData entity. + + @param mappingBlock Block, that contains managed object mapping. + + @result managed object mapping. + */ ++ (EKManagedObjectMapping *)mappingForEntityName:(NSString *)entityName + withBlock:(void(^)(EKManagedObjectMapping *mapping))mappingBlock; + +/** + Convenience constructor for `EKManagedObjectMapping`. + + @param entityName Name of CoreData entity. + + @param rootPath rootPath for mapping. + + @param mappingBlock Block, that contains managed object mapping + + @result managed object mapping. + */ ++ (EKManagedObjectMapping *)mappingForEntityName:(NSString *)entityName + withRootPath:(NSString *)rootPath + withBlock:(void (^)(EKManagedObjectMapping *mapping))mappingBlock; + +/** + Designated initializer for `EKManagedObjectMapping`. + + @param entityName CoreData entity name. + + @result managed object mapping. + */ +- (instancetype)initWithEntityName:(NSString *)entityName; + +/** + Designated initializer for `EKManagedObjectMapping`. + + @param entityName CoreData entity name. + + @param rootPath rootPath for mapping. + + @result managed object mapping. + */ +- (instancetype)initWithEntityName:(NSString *)entityName withRootPath:(NSString *)rootPath; + +/** + Property mapping for primary key of managed object. + + @result property mapping + */ +- (EKPropertyMapping *)primaryKeyPropertyMapping; + +#pragma mark - unavalable methods + +/** + This method is unavailable for `EKManagedObjectMapping`. Use `initWithEntityName:` method instead. + */ +- (instancetype)initWithObjectClass:(Class)objectClass EKDesignatedInitializer(initWithEntityName:); + +/** + This method is unavailable for `EKManagedObjectMapping`. Use `initWithEntityName:rootPath:` method instead. + */ +- (instancetype)initWithObjectClass:(Class)objectClass withRootPath:(NSString *)rootPath EKDesignatedInitializer(initWithEntityName:withRootPath:); + +/** + This method is unavailable for `EKManagedObjectMapping`. Use `mappingForEntityName:withBlock:` method instead. + */ ++ (instancetype)mappingForClass:(Class)objectClass withBlock:(void(^)(EKObjectMapping *mapping))mappingBlock EKDesignatedInitializer(mappingForEntityName:withBlock:); + +/** + This method is unavailable for `EKManagedObjectMapping`. Use `mappingForEntityName:rootPath:withBlock:` method instead. + */ ++ (instancetype)mappingForClass:(Class)objectClass withRootPath:(NSString *)rootPath + withBlock:(void (^)(EKObjectMapping *mapping))mappingBlock EKDesignatedInitializer(mappingForEntityName:withRootPath:withBlock); +@end diff --git a/Example/Pods/EasyMapping/EasyMapping/EKManagedObjectMapping.m b/Example/Pods/EasyMapping/EasyMapping/EKManagedObjectMapping.m new file mode 100644 index 0000000..497afe0 --- /dev/null +++ b/Example/Pods/EasyMapping/EasyMapping/EKManagedObjectMapping.m @@ -0,0 +1,124 @@ +// +// EasyMapping +// +// Copyright (c) 2012-2014 Lucas Medeiros. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "EKManagedObjectMapping.h" + +@implementation EKManagedObjectMapping + +@synthesize propertyMappings = _propertyMappings; +@synthesize hasManyMappings = _hasManyMappings; +@synthesize hasOneMappings = _hasOneMappings; +@synthesize rootPath = _rootPath; + ++ (EKManagedObjectMapping *)mappingForEntityName:(NSString *)entityName withBlock:(void (^)(EKManagedObjectMapping * mapping))mappingBlock +{ + EKManagedObjectMapping * mapping = [[EKManagedObjectMapping alloc] initWithEntityName:entityName]; + if (mappingBlock) + { + mappingBlock(mapping); + } + return mapping; +} + ++ (EKManagedObjectMapping *)mappingForEntityName:(NSString *)entityName withRootPath:(NSString *)rootPath withBlock:(void (^)(EKManagedObjectMapping * mapping))mappingBlock +{ + EKManagedObjectMapping * mapping = [[EKManagedObjectMapping alloc] initWithEntityName:entityName withRootPath:rootPath]; + if (mappingBlock) + { + mappingBlock(mapping); + } + return mapping; +} + +- (id)initWithEntityName:(NSString *)entityName +{ + self = [super init]; + if (self) + { + _entityName = entityName; + _propertyMappings = [NSMutableDictionary dictionary]; + _hasOneMappings = [NSMutableDictionary dictionary]; + _hasManyMappings = [NSMutableDictionary dictionary]; + } + return self; +} + +- (id)initWithEntityName:(NSString *)entityName withRootPath:(NSString *)rootPath +{ + self = [self initWithEntityName:entityName]; + if (self) + { + _rootPath = rootPath; + } + return self; +} + +- (EKPropertyMapping *)primaryKeyPropertyMapping +{ + __block EKPropertyMapping * primaryKeyMapping = nil; + [self.propertyMappings enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL * stop) + { + EKPropertyMapping * mapping = obj; + if ([mapping.property isEqualToString:self.primaryKey]) + { + primaryKeyMapping = mapping; + *stop = YES; + } + }]; + return primaryKeyMapping; +} + +-(void)mapKeyPath:(NSString *)keyPath toProperty:(NSString *)property withValueBlock:(EKManagedMappingValueBlock)valueBlock +{ + NSParameterAssert(keyPath); + NSParameterAssert(property); + NSParameterAssert(valueBlock); + + EKPropertyMapping *mapping = [[EKPropertyMapping alloc] init]; + mapping.property = property; + mapping.keyPath = keyPath; + mapping.managedValueBlock = valueBlock; + [self addPropertyMappingToDictionary:mapping]; +} + +-(void)mapKeyPath:(NSString *)keyPath toProperty:(NSString *)property withValueBlock:(EKManagedMappingValueBlock)valueBlock reverseBlock:(EKManagedMappingReverseValueBlock)reverseBlock +{ + NSParameterAssert(keyPath); + NSParameterAssert(property); + NSParameterAssert(valueBlock); + NSParameterAssert(reverseBlock); + + EKPropertyMapping *mapping = [[EKPropertyMapping alloc] init]; + mapping.property = property; + mapping.keyPath = keyPath; + mapping.managedValueBlock = valueBlock; + mapping.managedReverseBlock = reverseBlock; + [self addPropertyMappingToDictionary:mapping]; +} + +- (void)addPropertyMappingToDictionary:(EKPropertyMapping *)mapping +{ + [self.propertyMappings setObject:mapping forKey:mapping.keyPath]; +} + +@end diff --git a/Example/Pods/EasyMapping/EasyMapping/EKManagedObjectModel.h b/Example/Pods/EasyMapping/EasyMapping/EKManagedObjectModel.h new file mode 100644 index 0000000..e929d6e --- /dev/null +++ b/Example/Pods/EasyMapping/EasyMapping/EKManagedObjectModel.h @@ -0,0 +1,46 @@ +// +// EKManagedObjectModel.h +// EasyMappingExample +// +// Created by Denys Telezhkin on 22.06.14. +// Copyright (c) 2014 EasyKit. All rights reserved. +// + +#import +#import "EKMappingProtocol.h" + +/** + EKManagedObjectModel is a convenience base class for NSManagedObject subclasses. It allows creating CoreData objects from JSON representation and vice versa. + */ +@interface EKManagedObjectModel : NSManagedObject + +/** + Create CoreData object using provided JSON dictionary within provided NSManagedObjectContext. + + This method uses EKManagedObjectMapping object, provided by objectMapping method of EKManagedMappingProtocol. + + @param properties parsed JSON NSDictionary. + + @param context in which object will be created + + @return mapped object + */ ++(instancetype)objectWithProperties:(NSDictionary *)properties + inContext:(NSManagedObjectContext *)context; + +/** + Serialize mapped object back to JSON representation. + + @param context from which object will be serialized + + @return NSDictionary representation of current object. + */ +- (NSDictionary *)serializedObjectInContext:(NSManagedObjectContext *)context; + +@end + +@interface EKManagedObjectModel(Deprecated) + +- (NSDictionary *)serializedObject __deprecated_msg("Use serializedObjectInContext instead"); + +@end diff --git a/Example/Pods/EasyMapping/EasyMapping/EKManagedObjectModel.m b/Example/Pods/EasyMapping/EasyMapping/EKManagedObjectModel.m new file mode 100644 index 0000000..07b4fdc --- /dev/null +++ b/Example/Pods/EasyMapping/EasyMapping/EKManagedObjectModel.m @@ -0,0 +1,46 @@ +// +// EKManagedObjectModel.m +// EasyMappingExample +// +// Created by Denys Telezhkin on 22.06.14. +// Copyright (c) 2014 EasyKit. All rights reserved. +// + +#import "EKManagedObjectModel.h" +#import "EKManagedObjectMapper.h" +#import "EKManagedObjectMapping.h" +#import "EKSerializer.h" + +@implementation EKManagedObjectModel + +#pragma mark - constructors + ++(instancetype)objectWithProperties:(NSDictionary *)properties inContext:(NSManagedObjectContext *)context +{ + return [EKManagedObjectMapper objectFromExternalRepresentation:properties + withMapping:[self objectMapping] + inManagedObjectContext:context]; +} + +#pragma mark - serialization + +- (NSDictionary *)serializedObjectInContext:(NSManagedObjectContext *)context +{ + return [EKSerializer serializeObject:self + withMapping:[self.class objectMapping] + fromContext:context]; +} + +-(NSDictionary *)serializedObject +{ + return [self serializedObjectInContext:nil]; +} + +#pragma mark - EKManagedMappingProtocol + ++(EKManagedObjectMapping *)objectMapping +{ + return [[EKManagedObjectMapping alloc] initWithEntityName:NSStringFromClass(self)]; +} + +@end diff --git a/Example/Pods/EasyMapping/EasyMapping/EKMapper.h b/Example/Pods/EasyMapping/EasyMapping/EKMapper.h new file mode 100644 index 0000000..5d5257c --- /dev/null +++ b/Example/Pods/EasyMapping/EasyMapping/EKMapper.h @@ -0,0 +1,71 @@ +// +// EasyMapping +// +// Copyright (c) 2012-2014 Lucas Medeiros. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "EKObjectMapping.h" + +/** + `EKMapper` provides an interface to create objective-c object from JSON representation, using `EKObjectMapping` class. For creating CoreData objects, use `EKManagedObjectMapper` class. + */ + +@interface EKMapper : NSObject + +/** + Creates object from JSON representation, using mapping. + + @param externalRepresentation JSON representation of object data + + @param mapping object mapping + + @result mapped object + */ ++ (id)objectFromExternalRepresentation:(NSDictionary *)externalRepresentation + withMapping:(EKObjectMapping *)mapping; + +/** + Fills previously existed object with values, provided in JSON representation. All values, that are included in mapping and were filled prior to calling this method, will be overwritten. + + @param object Object to fill + + @param externalRepresentation JSON representation of object data + + @param mapping object mapping + + @result filled object + */ ++ (id) fillObject:(id)object + fromExternalRepresentation:(NSDictionary *)externalRepresentation + withMapping:(EKObjectMapping *)mapping; + +/** + Convenience method to create array of objects from JSON. + + @param externalRepresentation JSON array with objects + + @param mapping object mapping + + @result array of mapped objects + */ ++ (NSArray *)arrayOfObjectsFromExternalRepresentation:(NSArray *)externalRepresentation + withMapping:(EKObjectMapping *)mapping; + +@end diff --git a/Example/Pods/EasyMapping/EasyMapping/EKMapper.m b/Example/Pods/EasyMapping/EasyMapping/EKMapper.m new file mode 100644 index 0000000..ea4c6f9 --- /dev/null +++ b/Example/Pods/EasyMapping/EasyMapping/EKMapper.m @@ -0,0 +1,107 @@ +// +// EasyMapping +// +// Copyright (c) 2012-2014 Lucas Medeiros. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "EKMapper.h" +#import "EKPropertyHelper.h" +#import "EKPropertyMapping.h" +#import "EKRelationshipMapping.h" + +@implementation EKMapper + ++ (id)objectFromExternalRepresentation:(NSDictionary *)externalRepresentation withMapping:(EKObjectMapping *)mapping +{ + NSParameterAssert([mapping isKindOfClass:[EKObjectMapping class]]); + + if (![externalRepresentation isKindOfClass:[NSDictionary class]] || + ![mapping isKindOfClass:[EKObjectMapping class]]) + { + return nil; + } + + id object = [[mapping.objectClass alloc] init]; + return [self fillObject:object fromExternalRepresentation:externalRepresentation withMapping:mapping]; +} + ++ (id)fillObject:(id)object fromExternalRepresentation:(NSDictionary *)externalRepresentation + withMapping:(EKObjectMapping *)mapping +{ + NSDictionary *representation = [EKPropertyHelper extractRootPathFromExternalRepresentation:externalRepresentation withMapping:mapping]; + [mapping.propertyMappings enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) { + [EKPropertyHelper setProperty:obj + onObject:object + fromRepresentation:representation + respectPropertyType:mapping.respectPropertyFoundationTypes]; + }]; + [mapping.hasOneMappings enumerateKeysAndObjectsUsingBlock:^(id key, EKRelationshipMapping * valueMapping, BOOL *stop) { + NSDictionary * value = [valueMapping extractObjectFromRepresentation:representation]; + if (value && value != (id)[NSNull null]) { + id result = [self objectFromExternalRepresentation:value withMapping:[valueMapping objectMapping]]; + [object setValue:result forKeyPath:valueMapping.property]; + } else { + [object setValue:nil forKey:valueMapping.property]; + } + }]; + [mapping.hasManyMappings enumerateKeysAndObjectsUsingBlock:^(id key, EKRelationshipMapping * valueMapping, BOOL *stop) { + NSArray *arrayToBeParsed = [representation valueForKeyPath:key]; + if (arrayToBeParsed && arrayToBeParsed != (id)[NSNull null]) { + NSArray *parsedArray = [self arrayOfObjectsFromExternalRepresentation:arrayToBeParsed + withMapping:[valueMapping objectMapping]]; + id parsedObjects = [EKPropertyHelper propertyRepresentation:parsedArray + forObject:object + withPropertyName:[valueMapping property]]; + + id _value = [object valueForKeyPath:valueMapping.property]; + + if(mapping.incrementalData && _value!=nil) { + _value = [_value arrayByAddingObjectsFromArray:parsedObjects]; + [object setValue:_value forKey:valueMapping.property]; + } + else { + [object setValue:parsedObjects forKeyPath:valueMapping.property]; + } + } else if(!mapping.incrementalData) { + [object setValue:nil forKey:valueMapping.property]; + } + }]; + return object; +} + ++ (NSArray *)arrayOfObjectsFromExternalRepresentation:(NSArray *)externalRepresentation + withMapping:(EKObjectMapping *)mapping +{ + if (![externalRepresentation isKindOfClass:[NSArray class]] || + ![mapping isKindOfClass:[EKObjectMapping class]]) { + return nil; + } + + NSMutableArray *array = [NSMutableArray array]; + for (NSDictionary *representation in externalRepresentation) { + id parsedObject = [self objectFromExternalRepresentation:representation withMapping:mapping]; + if (parsedObject) { + [array addObject:parsedObject]; + } + } + return [NSArray arrayWithArray:array]; +} + +@end diff --git a/Example/Pods/EasyMapping/EasyMapping/EKMappingBlocks.h b/Example/Pods/EasyMapping/EasyMapping/EKMappingBlocks.h new file mode 100644 index 0000000..30c002d --- /dev/null +++ b/Example/Pods/EasyMapping/EasyMapping/EKMappingBlocks.h @@ -0,0 +1,39 @@ +// +// EasyMapping +// +// Copyright (c) 2012-2015 Lucas Medeiros. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#import + +typedef id(^EKMappingValueBlock)(NSString *key, id value); +typedef id(^EKMappingReverseBlock)( id value); + +typedef id(^EKManagedMappingValueBlock)(NSString * key, id value, NSManagedObjectContext * context); +typedef id(^EKManagedMappingReverseValueBlock)(id value, NSManagedObjectContext * context); + +@interface EKMappingBlocks: NSObject + ++ (EKMappingValueBlock)urlMappingBlock; ++ (EKMappingReverseBlock)urlReverseMappingBlock; + +@end + diff --git a/Example/Pods/EasyMapping/EasyMapping/EKMappingBlocks.m b/Example/Pods/EasyMapping/EasyMapping/EKMappingBlocks.m new file mode 100644 index 0000000..825d26e --- /dev/null +++ b/Example/Pods/EasyMapping/EasyMapping/EKMappingBlocks.m @@ -0,0 +1,50 @@ +// +// EasyMapping +// +// Copyright (c) 2012-2015 Lucas Medeiros. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "EKMappingBlocks.h" + +@implementation EKMappingBlocks + ++(EKMappingValueBlock)urlMappingBlock +{ + return ^id(NSString * key, id value) { + if ([value isKindOfClass:[NSString class]]) + { + return [NSURL URLWithString:value]; + } + return nil; + }; +} + ++(EKMappingReverseBlock)urlReverseMappingBlock +{ + return ^id(id value){ + if ([value isKindOfClass:[NSURL class]]) + { + return [value absoluteString]; + } + return nil; + }; +} + +@end \ No newline at end of file diff --git a/Example/Pods/EasyMapping/EasyMapping/EKMappingProtocol.h b/Example/Pods/EasyMapping/EasyMapping/EKMappingProtocol.h new file mode 100644 index 0000000..97423d0 --- /dev/null +++ b/Example/Pods/EasyMapping/EasyMapping/EKMappingProtocol.h @@ -0,0 +1,43 @@ +// +// EKMappingProtocol.h +// EasyMappingExample +// +// Created by Denys Telezhkin on 22.06.14. +// Copyright (c) 2014 EasyKit. All rights reserved. +// + +#import +#import "EKObjectMapping.h" +#import "EKManagedObjectMapping.h" + +/** + EKMappingProtocol must be implemented by NSObject subclasses, that will be mapped from JSON representation. + + EasyMapping provides convenience EKObjectModel class, that already implements this protocol. + */ +@protocol EKMappingProtocol + +/** + EKObjectMapping instance, that will be used in mapping process. + + @return object mapping + */ ++(EKObjectMapping *)objectMapping; + +@end + +/** + EKManagedMappingProtocol must be implemented by NSManagedObject subclasses, that will be mapped from JSON representation. + + EasyMapping provides convenience EKManagedObjectModel class, that already implements this protocol. + */ +@protocol EKManagedMappingProtocol + +/** + EKManagedObjectMapping instance, that will be used in mapping process. + + @return object mapping + */ ++(EKManagedObjectMapping *)objectMapping; + +@end diff --git a/Example/Pods/EasyMapping/EasyMapping/EKObjectMapping.h b/Example/Pods/EasyMapping/EasyMapping/EKObjectMapping.h new file mode 100644 index 0000000..be0455a --- /dev/null +++ b/Example/Pods/EasyMapping/EasyMapping/EKObjectMapping.h @@ -0,0 +1,293 @@ +// +// EasyMapping +// +// Copyright (c) 2012-2014 Lucas Medeiros. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "EKMappingBlocks.h" + +@protocol EKMappingProtocol; + +/** + `EKObjectMapping` class is used to define mappings between JSON representation and objective-c object. + */ + +@interface EKObjectMapping : NSObject + +/** + Defines if to-many relationship data is pushed or replaced. + */ +@property (nonatomic, assign) BOOL incrementalData; + +/** + If set to YES, mapper will introspect your class properties and try to create appropriate objects. Supported classes: NSMutableArray, NSMutableDictionary, NSSet, NSMutableSet, NSOrderedSet, NSMutableOrderedSet. + + Due to perfomance reasons, this property defaults to NO. + */ +@property (nonatomic, assign) BOOL respectPropertyFoundationTypes; + +/** + Class, for which this mapping is meant to be used. + */ +@property (nonatomic, assign, readwrite) Class objectClass; + +/** + Root JSON path. This is helpful, when all object data is inside another JSON dictionary. + */ +@property (nonatomic, strong, readonly) NSString *rootPath; + +/** + Dictionary, containing property mappings for current object. + */ +@property (nonatomic, strong, readonly) NSMutableDictionary *propertyMappings; + +/** + Dictionary, containing to-one relationships of current object. + */ +@property (nonatomic, strong, readonly) NSMutableDictionary *hasOneMappings; + +/** + Dictionary, containing to-many relationships of current object. + */ +@property (nonatomic, strong, readonly) NSMutableDictionary *hasManyMappings; + +/** + Convenience initializer. + + @param objectClass Class of object, that will consume results of mapping + + @param mappingBlock Block, that contains created EKObjectMapping to be filled with mappings. + + @result object mapping + */ ++ (EKObjectMapping *)mappingForClass:(Class)objectClass + withBlock:(void(^)(EKObjectMapping *mapping))mappingBlock; + +/** + Convenience initializer. + + @param objectClass Class of object, that will consume results of mapping + + @param rootPath rootPath for mapping + + @param mappingBlock Block, that contains created EKObjectMapping to be filled with mappings. + + @result object mapping + */ ++ (EKObjectMapping *)mappingForClass:(Class)objectClass withRootPath:(NSString *)rootPath + withBlock:(void (^)(EKObjectMapping *mapping))mappingBlock; + +/** + Designated initializer + + @param objectClass Class of object, that will consume results of mapping + + @result object mapping + */ +- (instancetype)initWithObjectClass:(Class)objectClass; + +/** + Designated initializer + + @param objectClass Class of object, that will consume results of mapping + + @param rootPath rootPath for mapping + + @result object mapping + */ +- (instancetype)initWithObjectClass:(Class)objectClass withRootPath:(NSString *)rootPath; + +/** + Map JSON keyPath to object property. + + @param keyPath JSON keypath, that will be used by valueForKeyPath: method + + @param property Property name. + */ +- (void)mapKeyPath:(NSString *)keyPath toProperty:(NSString *)property; + +/** + Map JSON keyPath to object property. This method assumes, that value contains NSString, that can be transformed into NSDate by NSDateFormatter. You can get current thread date formatter by using NSDateFormatter+EasyMappingAdditions category. Default timezone is GMT. Default date format ISO 8601. + + @param keyPath JSON keypath, that will be used by valueForKeyPath: method + + @param property Property name. + + @param formatter Date formatter to use when transforming string to dates and reverse. + */ +- (void)mapKeyPath:(NSString *)keyPath toProperty:(NSString *)property withDateFormatter:(NSDateFormatter *)formatter; + +/** + Maps properties from array. We assume, that names of keypaths and properties are the same. + + @param propertyNamesArray Array of property names + */ +- (void)mapPropertiesFromArray:(NSArray *)propertyNamesArray; + +/** + Maps properties from array. We assume, that names of keypaths and properties are the same, except for the first letter, that is uppercased. For example, property @"name" will be filled, using "Name" value of JSON. + + @param propertyNamesArray Array of property names + */ +- (void)mapPropertiesFromArrayToPascalCase:(NSArray *)propertyNamesArray; + +/** + Maps properties from dictionary. Keys are keypaths in JSON, values are names of properties. + + @param propertyDictionary Dictionary with keypaths and property names + */ +- (void)mapPropertiesFromDictionary:(NSDictionary *)propertyDictionary; + +/** + Map mappings from another `EKObjectMapping` object. This can be useful with inheritance. + */ +- (void)mapPropertiesFromMappingObject:(EKObjectMapping *)mappingObj; + +/** + Map JSON keyPath to object property, using valueBlock. + + @param keyPath JSON keypath, that will be used by valueForKeyPath: method + + @param property Property name. + + @param valueBlock block to transform JSON value into property value. + */ +- (void)mapKeyPath:(NSString *)keyPath toProperty:(NSString *)property + withValueBlock:(EKMappingValueBlock)valueBlock; + +/** + Map JSON keyPath to object property, using valueBlock. Include serialization block, that does reverse this operation. + + @param keyPath JSON keypath, that will be used by valueForKeyPath: method + + @param property Property name. + + @param valueBlock block to transform JSON value into property value. + + @param reverseBlock block to transform property value into JSON value + */ +- (void)mapKeyPath:(NSString *)keyPath + toProperty:(NSString *)property + withValueBlock:(EKMappingValueBlock)valueBlock + reverseBlock:(EKMappingReverseBlock)reverseBlock; + +/** + Map to-one relationship for keyPath. Assuming keyPath and property name are equal. ObjectClass should conform to `EKMappingProtocol`. + + @param objectClass class for child object + + @param keyPath keyPath to child object representation in JSON + */ +- (void)hasOne:(Class)objectClass forKeyPath:(NSString *)keyPath; + +/** + Map to-one relationship for keyPath. ObjectClass should conform to `EKMappingProtocol`. + + @param objectClass class for child object + + @param keyPath keyPath to child object representation in JSON + + @param property Name of the property, that will receive mapped object. + */ +- (void)hasOne:(Class)objectClass forKeyPath:(NSString *)keyPath forProperty:(NSString *)property; + +/** + Map to-one relationship, using keys that are on the same level as current object. They are collected into dictionary and passed along, as like they were in separate JSON dictionary. + + @param objectClass class, instance of which will be created as a result of mapping + + @param keyPaths Array of properties to collect from representation + + @param property name of the property, that will receive mapped object + + @param objectMapping optional mapping override for child object + + @warning If you have recursive mappings, do not use this method, cause it can cause infinite recursion to happen. Or you need to handle recursive mappings situation by yourself, subclassing EKObjectMapping and providing different mappings for different mapping levels. + */ +- (void) hasOne:(Class)objectClass +forDictionaryFromKeyPaths:(NSArray *)keyPaths + forProperty:(NSString *)property + withObjectMapping:(EKObjectMapping *)objectMapping; + +/** + Map to-one relationship for keyPath. + + @param keyPath keyPath to child object representation in JSON + + @param property Name of the property, that will receive mapped object. + + @param objectMapping optional mapping override for child object + + @warning If you have recursive mappings, do not use this method, cause it can cause infinite recursion to happen. Or you need to handle recursive mappings situation by yourself, subclassing EKObjectMapping and providing different mappings for different mapping levels. +*/ +- (void)hasOne:(Class)objectClass forKeyPath:(NSString *)keyPath forProperty:(NSString *)property withObjectMapping:(EKObjectMapping*)objectMapping; + + +/** + Map to-many relationship for keyPath. Assuming keyPath and property name are equal. ObjectClass should conform to `EKMappingProtocol`. + + @param objectClass objectClass for child objects + + @param keyPath keyPath to child object representations in JSON + */ +- (void)hasMany:(Class)objectClass forKeyPath:(NSString *)keyPath; + +/** + Map to-many relationship for keyPath. ObjectClass should conform to `EKMappingProtocol`. + + @param objectClass objectClass for child objects + + @param keyPath keyPath to child objects representation in JSON + + @param property Name of the property, that will receive mapped objects. + */ +- (void)hasMany:(Class)objectClass forKeyPath:(NSString *)keyPath forProperty:(NSString *)property; + +/** + Map to-many relationship for keyPath. + + @param keyPath keyPath to child objects representation in JSON + + @param property Name of the property, that will receive mapped objects. + + @param objectMapping optional mapping override for child objects + + @warning If you have recursive mappings, do not use this method, cause it can cause infinite recursion to happen. Or you need to handle recursive mappings situation by yourself, subclassing EKObjectMapping and providing different mappings for different mapping levels. + */ +-(void)hasMany:(Class)objectClass forKeyPath:(NSString *)keyPath forProperty:(NSString *)property withObjectMapping:(EKObjectMapping*)objectMapping; + +@end + +@interface EKObjectMapping(Deprecated) + +/** + This method is deprecated and may be removed in the future releases. Please use `mapKeyPath:toProperty:withDateFormatter: method`. + + Map JSON keyPath to object property. This method assumes, that value contains NSString, that can be transformed into NSDate by NSDateFormatter. Default timezone is GMT. Transformation is done by `EKTransformer` class. + + @param keyPath JSON keypath, that will be used by valueForKeyPath: method + + @param property Property name. + + @param dateFormat Date format + */ +- (void)mapKeyPath:(NSString *)keyPath toProperty:(NSString *)property withDateFormat:(NSString *)dateFormat __deprecated; + +@end diff --git a/Example/Pods/EasyMapping/EasyMapping/EKObjectMapping.m b/Example/Pods/EasyMapping/EasyMapping/EKObjectMapping.m new file mode 100644 index 0000000..c3d67ba --- /dev/null +++ b/Example/Pods/EasyMapping/EasyMapping/EKObjectMapping.m @@ -0,0 +1,264 @@ +// +// EasyMapping +// +// Copyright (c) 2012-2014 Lucas Medeiros. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "EKObjectMapping.h" +#import "EKPropertyMapping.h" +#import "EKRelationshipMapping.h" +#import "EKMappingProtocol.h" +#import "NSDateFormatter+EasyMappingAdditions.h" + +@implementation EKObjectMapping + ++ (EKObjectMapping *)mappingForClass:(Class)objectClass withBlock:(void (^)(EKObjectMapping *))mappingBlock +{ + EKObjectMapping *mapping = [[EKObjectMapping alloc] initWithObjectClass:objectClass]; + if (mappingBlock) + { + mappingBlock(mapping); + } + return mapping; +} + ++ (EKObjectMapping *)mappingForClass:(Class)objectClass withRootPath:(NSString *)rootPath withBlock:(void (^)(EKObjectMapping *))mappingBlock +{ + EKObjectMapping *mapping = [[EKObjectMapping alloc] initWithObjectClass:objectClass withRootPath:rootPath]; + if (mappingBlock) + { + mappingBlock(mapping); + } + return mapping; +} + +- (id)initWithObjectClass:(Class)objectClass +{ + self = [super init]; + if (self) { + _objectClass = objectClass; + _propertyMappings = [NSMutableDictionary dictionary]; + _hasOneMappings = [NSMutableDictionary dictionary]; + _hasManyMappings = [NSMutableDictionary dictionary]; + } + return self; +} + +- (id)initWithObjectClass:(Class)objectClass withRootPath:(NSString *)rootPath +{ + self = [self initWithObjectClass:objectClass]; + if (self) { + _rootPath = rootPath; + } + return self; +} + +- (void)mapKeyPath:(NSString *)keyPath toProperty:(NSString *)property +{ + NSParameterAssert(keyPath); + NSParameterAssert(property); + + EKPropertyMapping *mapping = [[EKPropertyMapping alloc] init]; + mapping.property = property; + mapping.keyPath = keyPath; + [self addPropertyMappingToDictionary:mapping]; +} + +- (void)mapKeyPath:(NSString *)keyPath toProperty:(NSString *)property withDateFormat:(NSString *)dateFormat +{ + [self mapKeyPath:keyPath toProperty:property withDateFormatter:[NSDateFormatter ek_formatterForCurrentThread]]; +} + +-(void)mapKeyPath:(NSString *)keyPath toProperty:(NSString *)property withDateFormatter:(NSDateFormatter *)formatter +{ + NSParameterAssert(keyPath); + NSParameterAssert(property); + NSParameterAssert(formatter); + + [self mapKeyPath:keyPath + toProperty:property + withValueBlock:^id(NSString * key, id value) { + if (value == nil) + return nil; + return [value isKindOfClass:[NSString class]] ? [formatter dateFromString:value] : [NSNull null]; + } reverseBlock:^id(id value) { + if (value == nil) + return nil; + return [value isKindOfClass:[NSDate class]] ? [formatter stringFromDate:value] : [NSNull null]; + }]; +} + +- (void)mapPropertiesFromArray:(NSArray *)propertyNamesArray +{ + NSParameterAssert([propertyNamesArray isKindOfClass:[NSArray class]]); + + for (NSString *key in propertyNamesArray) { + [self mapKeyPath:key toProperty:key]; + } +} + +-(void)mapPropertiesFromArrayToPascalCase:(NSArray *)propertyNamesArray +{ + NSParameterAssert([propertyNamesArray isKindOfClass:[NSArray class]]); + for (NSString *key in propertyNamesArray) { + NSString *pascalKey = [key stringByReplacingCharactersInRange:NSMakeRange(0,1) withString:[[key substringToIndex:1] uppercaseString]]; + + [self mapKeyPath:pascalKey toProperty:key]; + } +} + +- (void)mapPropertiesFromDictionary:(NSDictionary *)propertyDictionary +{ + NSParameterAssert([propertyDictionary isKindOfClass:[NSDictionary class]]); + + [propertyDictionary enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) { + [self mapKeyPath:key toProperty:obj]; + }]; +} + +-(void)mapPropertiesFromMappingObject:(EKObjectMapping *)mappingObj +{ + NSParameterAssert([mappingObj isKindOfClass:EKObjectMapping.class]); + + for (NSString *key in mappingObj.propertyMappings) { + [self addPropertyMappingToDictionary:mappingObj.propertyMappings[key]]; + } + + for (NSString *key in mappingObj.hasOneMappings) { + EKRelationshipMapping *mapping = mappingObj.hasOneMappings[key]; + [self.hasOneMappings setObject:mapping forKey:mapping.keyPath]; + } + + for (NSString *key in mappingObj.hasManyMappings) { + EKRelationshipMapping *mapping = mappingObj.hasManyMappings[key]; + [self.hasManyMappings setObject:mapping forKey:mapping.keyPath]; + } +} + +- (void)mapKeyPath:(NSString *)keyPath toProperty:(NSString *)property +withValueBlock:(id (^)(NSString *, id))valueBlock +{ + NSParameterAssert(keyPath); + NSParameterAssert(property); + NSParameterAssert(valueBlock); + + EKPropertyMapping *mapping = [[EKPropertyMapping alloc] init]; + mapping.property = property; + mapping.keyPath = keyPath; + mapping.valueBlock = valueBlock; + [self addPropertyMappingToDictionary:mapping]; +} + +- (void)mapKeyPath:(NSString *)keyPath toProperty:(NSString *)property +withValueBlock:(id (^)(NSString *, id))valueBlock reverseBlock:(id (^)(id))reverseBlock +{ + NSParameterAssert(keyPath); + NSParameterAssert(property); + NSParameterAssert(valueBlock); + NSParameterAssert(reverseBlock); + + EKPropertyMapping *mapping = [[EKPropertyMapping alloc] init]; + mapping.property = property; + mapping.keyPath = keyPath; + mapping.valueBlock = valueBlock; + mapping.reverseBlock = reverseBlock; + [self addPropertyMappingToDictionary:mapping]; +} + +-(void)hasOne:(Class)objectClass forKeyPath:(NSString *)keyPath +{ + [self hasOne:objectClass forKeyPath:keyPath forProperty:keyPath withObjectMapping:nil]; +} + +-(void)hasOne:(Class)objectClass forKeyPath:(NSString *)keyPath forProperty:(NSString *)property +{ + [self hasOne:objectClass forKeyPath:keyPath forProperty:property withObjectMapping:nil]; +} + +-(void)hasOne:(Class)objectClass forKeyPath:(NSString *)keyPath forProperty:(NSString *)property withObjectMapping:(EKObjectMapping*)objectMapping +{ + if (!objectMapping) { + NSParameterAssert([objectClass conformsToProtocol:@protocol(EKMappingProtocol)] || + [objectClass conformsToProtocol:@protocol(EKManagedMappingProtocol)]); + } + NSParameterAssert(keyPath); + NSParameterAssert(property); + + EKRelationshipMapping * relationship = [EKRelationshipMapping new]; + relationship.objectClass = objectClass; + relationship.keyPath = keyPath; + relationship.property = property; + relationship.objectMapping = objectMapping; + + [self.hasOneMappings setObject:relationship forKey:keyPath]; +} + +-(void)hasOne:(Class)objectClass forDictionaryFromKeyPaths:(NSArray *)keyPaths forProperty:(NSString *)property withObjectMapping:(EKObjectMapping *)mapping +{ + if (!mapping) { + NSParameterAssert([objectClass conformsToProtocol:@protocol(EKMappingProtocol)] || + [objectClass conformsToProtocol:@protocol(EKManagedMappingProtocol)]); + } + NSParameterAssert(keyPaths); + NSParameterAssert(property); + + EKRelationshipMapping * relationship = [EKRelationshipMapping new]; + relationship.objectClass = objectClass; + relationship.nonNestedKeyPaths = keyPaths; + relationship.property = property; + relationship.objectMapping = mapping; + + self.hasOneMappings[keyPaths.firstObject] = relationship; +} + +-(void)hasMany:(Class)objectClass forKeyPath:(NSString *)keyPath +{ + [self hasMany:objectClass forKeyPath:keyPath forProperty:keyPath withObjectMapping:nil]; +} + +-(void)hasMany:(Class)objectClass forKeyPath:(NSString *)keyPath forProperty:(NSString *)property +{ + [self hasMany:objectClass forKeyPath:keyPath forProperty:property withObjectMapping:nil]; +} + +-(void)hasMany:(Class)objectClass forKeyPath:(NSString *)keyPath forProperty:(NSString *)property withObjectMapping:(EKObjectMapping*)objectMapping +{ + if (!objectMapping) { + NSParameterAssert([objectClass conformsToProtocol:@protocol(EKMappingProtocol)] || + [objectClass conformsToProtocol:@protocol(EKManagedMappingProtocol)]); + } + NSParameterAssert(keyPath); + NSParameterAssert(property); + + EKRelationshipMapping * relationship = [EKRelationshipMapping new]; + relationship.objectClass = objectClass; + relationship.keyPath = keyPath; + relationship.property = property; + relationship.objectMapping = objectMapping; + + [self.hasManyMappings setObject:relationship forKey:keyPath]; +} + +- (void)addPropertyMappingToDictionary:(EKPropertyMapping *)propertyMapping +{ + [self.propertyMappings setObject:propertyMapping forKey:propertyMapping.keyPath]; +} + +@end diff --git a/Example/Pods/EasyMapping/EasyMapping/EKObjectModel.h b/Example/Pods/EasyMapping/EasyMapping/EKObjectModel.h new file mode 100644 index 0000000..bb1e042 --- /dev/null +++ b/Example/Pods/EasyMapping/EasyMapping/EKObjectModel.h @@ -0,0 +1,43 @@ +// +// EKObjectModel.h +// EasyMappingExample +// +// Created by Denys Telezhkin on 22.06.14. +// Copyright (c) 2014 EasyKit. All rights reserved. +// + +#import +#import "EKMappingProtocol.h" + +/** + EKModel is convenience base class, that allows transforming JSON objects to NSObjects and vice versa. +*/ +@interface EKObjectModel : NSObject + +/** + Create object using provided JSON dictionary. This method uses EKObjectMapping object, provided by objectMapping method of EKMappingProtocol. + + @param properties parsed JSON NSDictionary. + + @return mapped object + */ ++ (instancetype)objectWithProperties:(NSDictionary *)properties; + + +/** + Create object using provided JSON dictionary. This method uses EKObjectMapping object, provided by objectMapping method of EKMappingProtocol. + + @param properties parsed JSON NSDictionary. + + @return mapped object + */ +- (instancetype)initWithProperties:(NSDictionary *)properties; + +/** + Serialize mapped object back to JSON representation. + + @return NSDictionary representation of current object. + */ +- (NSDictionary *)serializedObject; + +@end diff --git a/Example/Pods/EasyMapping/EasyMapping/EKObjectModel.m b/Example/Pods/EasyMapping/EasyMapping/EKObjectModel.m new file mode 100644 index 0000000..07d168d --- /dev/null +++ b/Example/Pods/EasyMapping/EasyMapping/EKObjectModel.m @@ -0,0 +1,49 @@ +// +// EKObjectModel.m +// EasyMappingExample +// +// Created by Denys Telezhkin on 22.06.14. +// Copyright (c) 2014 EasyKit. All rights reserved. +// + +#import "EKObjectModel.h" +#import "EKMapper.h" +#import "EKSerializer.h" + +@implementation EKObjectModel + +#pragma mark - constructors + ++(instancetype)objectWithProperties:(NSDictionary *)properties +{ + return [EKMapper objectFromExternalRepresentation:properties + withMapping:[self objectMapping]]; +} + +-(instancetype)initWithProperties:(NSDictionary *)properties +{ + if (self = [super init]) + { + [EKMapper fillObject:self + fromExternalRepresentation:properties + withMapping:[self.class objectMapping]]; + } + return self; +} + +#pragma mark - serialization + +- (NSDictionary *)serializedObject +{ + return [EKSerializer serializeObject:self + withMapping:[self.class objectMapping]]; +} + +#pragma mark - EKMappingProtocol + ++(EKObjectMapping *)objectMapping +{ + return [[EKObjectMapping alloc] initWithObjectClass:self]; +} + +@end diff --git a/Example/Pods/EasyMapping/EasyMapping/EKPropertyHelper.h b/Example/Pods/EasyMapping/EasyMapping/EKPropertyHelper.h new file mode 100644 index 0000000..c80f8b4 --- /dev/null +++ b/Example/Pods/EasyMapping/EasyMapping/EKPropertyHelper.h @@ -0,0 +1,63 @@ +// +// EasyMapping +// +// Copyright (c) 2012-2014 Lucas Medeiros. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +@import CoreData; +@import Foundation; +#import "EKPropertyMapping.h" +#import "EKObjectMapping.h" + +/** + `EKPropertyHelper` is internal EasyMapping class, that works with objective-c runtime to get and set values of properties. + */ +@interface EKPropertyHelper : NSObject + ++ (BOOL)propertyNameIsScalar:(NSString *)propertyName fromObject:(id)object; + ++ (id)propertyRepresentation:(NSArray *)array forObject:(id)object withPropertyName:(NSString *)propertyName; + ++ (void) setProperty:(EKPropertyMapping *)propertyMapping + onObject:(id)object + fromRepresentation:(NSDictionary *)representation + respectPropertyType:(BOOL)respectPropertyType; + ++ (void) setProperty:(EKPropertyMapping *)propertyMapping + onObject:(id)object + fromRepresentation:(NSDictionary *)representation + inContext:(NSManagedObjectContext *)context + respectPropertyType:(BOOL)respectPropertyType; + ++ (id)getValueOfProperty:(EKPropertyMapping *)propertyMapping + fromRepresentation:(NSDictionary *)representation; + ++ (id)getValueOfManagedProperty:(EKPropertyMapping *)mapping + fromRepresentation:(NSDictionary *)representation + inContext:(NSManagedObjectContext *)context; + ++ (void)setValue:(id)value onObject:(id)object forKeyPath:(NSString *)keyPath; + ++ (void)addValue:(id)value onObject:(id)object forKeyPath:(NSString *)keyPath; + ++ (NSDictionary *)extractRootPathFromExternalRepresentation:(NSDictionary *)externalRepresentation + withMapping:(EKObjectMapping *)mapping; + +@end diff --git a/Example/Pods/EasyMapping/EasyMapping/EKPropertyHelper.m b/Example/Pods/EasyMapping/EasyMapping/EKPropertyHelper.m new file mode 100644 index 0000000..889a338 --- /dev/null +++ b/Example/Pods/EasyMapping/EasyMapping/EKPropertyHelper.m @@ -0,0 +1,216 @@ +// +// EasyMapping +// +// Copyright (c) 2012-2014 Lucas Medeiros. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "EKPropertyHelper.h" +@import ObjectiveC.runtime; + +static const char scalarTypes[] = { + _C_BOOL, _C_BFLD, // BOOL + _C_CHR, _C_UCHR, // char, unsigned char + _C_SHT, _C_USHT, // short, unsigned short + _C_INT, _C_UINT, // int, unsigned int, NSInteger, NSUInteger + _C_LNG, _C_ULNG, // long, unsigned long + _C_LNG_LNG, _C_ULNG_LNG, // long long, unsigned long long + _C_FLT, _C_DBL // float, CGFloat, double +}; + +@implementation EKPropertyHelper + +#pragma mark - Property introspection + ++ (BOOL)propertyNameIsScalar:(NSString *)propertyName fromObject:(id)object +{ + objc_property_t property = class_getProperty(object_getClass(object), [propertyName UTF8String]); + NSString *type = property ? [self propertyTypeStringRepresentationFromProperty:property] : nil; + + return (type.length == 1) && (NSNotFound != [@(scalarTypes) rangeOfString:type].location); +} + ++ (NSString *) propertyTypeStringRepresentationFromProperty:(objc_property_t)property +{ + const char *TypeAttribute = "T"; + char *type = property_copyAttributeValue(property, TypeAttribute); + NSString *propertyType = (type[0] != _C_ID) ? @(type) : ({ + (type[1] == 0) ? @"id" : ({ + // Modern format of a type attribute (e.g. @"NSSet") + type[strlen(type) - 1] = 0; + @(type + 2); + }); + }); + free(type); + return propertyType; +} + ++ (id)propertyRepresentation:(id)value forObject:(id)object withPropertyName:(NSString *)propertyName +{ + if (!value) + { + return nil; + } + + objc_property_t property = class_getProperty([object class], [propertyName UTF8String]); + if (property) + { + NSString *type = [self propertyTypeStringRepresentationFromProperty:property]; + if ([type isEqualToString:@"NSSet"]) { + return [NSSet setWithArray:value]; + } + else if ([type isEqualToString:@"NSMutableSet"]) { + return [NSMutableSet setWithArray:value]; + } + else if ([type isEqualToString:@"NSOrderedSet"]) { + return [NSOrderedSet orderedSetWithArray:value]; + } + else if ([type isEqualToString:@"NSMutableOrderedSet"]) { + return [NSMutableOrderedSet orderedSetWithArray:value]; + } + else if ([type isEqualToString:@"NSMutableArray"]) { + return [NSMutableArray arrayWithArray:value]; + } else if ([type isEqualToString:@"NSMutableDictionary"]) { + return [NSMutableDictionary dictionaryWithDictionary:value]; + } + } + return value; +} + +#pragma mark Property accessor methods + ++ (void)setProperty:(EKPropertyMapping *)propertyMapping onObject:(id)object + fromRepresentation:(NSDictionary *)representation respectPropertyType:(BOOL)respectPropertyType +{ + id value = [self getValueOfProperty:propertyMapping fromRepresentation:representation]; + if (value == (id)[NSNull null]) { + if (![self propertyNameIsScalar:propertyMapping.property fromObject:object]) { + [self setValue:nil onObject:object forKeyPath:propertyMapping.property]; + } + } else if (value) { + if (respectPropertyType) { + value = [self propertyRepresentation:value + forObject:object + withPropertyName:propertyMapping.property]; + } + [self setValue:value onObject:object forKeyPath:propertyMapping.property]; + } +} + ++ (void) setProperty:(EKPropertyMapping *)propertyMapping + onObject:(id)object + fromRepresentation:(NSDictionary *)representation + inContext:(NSManagedObjectContext *)context + respectPropertyType:(BOOL)respectPropertyType +{ + id value = [self getValueOfManagedProperty:propertyMapping + fromRepresentation:representation + inContext:context]; + if (value == (id)[NSNull null]) { + if (![self propertyNameIsScalar:propertyMapping.property fromObject:object]) { + [self setValue:nil onObject:object forKeyPath:propertyMapping.property]; + } + } else if (value) { + if (respectPropertyType) { + value = [self propertyRepresentation:value + forObject:object + withPropertyName:propertyMapping.property]; + } + [self setValue:value onObject:object forKeyPath:propertyMapping.property]; + } +} + ++(void)setValue:(id)value onObject:(id)object forKeyPath:(NSString *)keyPath +{ + if ([(id )object isKindOfClass:[NSManagedObject class]]) + { + // Reducing update times in CoreData + id _value = [object valueForKeyPath:keyPath]; + + if (_value != value && ![_value isEqual:value]) { + [object setValue:value forKeyPath:keyPath]; + } + } + else { + [object setValue:value forKeyPath:keyPath]; + } +} + ++(void)addValue:(id)value onObject:(id)object forKeyPath:(NSString *)keyPath +{ + id _value = [object valueForKeyPath:keyPath]; + if(![_value isKindOfClass:[NSSet class]]) { + [self setValue:value onObject:object forKeyPath:keyPath]; + } + else { + if ([object isKindOfClass:[NSManagedObject class]]) + { + // Reducing update times in CoreData + if(_value != value && ![value isSubsetOfSet:_value]) { + _value = [_value setByAddingObjectsFromSet:value]; + [object setValue:_value forKey:keyPath]; + } + } + else { + _value = [_value setByAddingObjectsFromSet:value]; + [object setValue:_value forKey:keyPath]; + } + } +} + ++ (id)getValueOfProperty:(EKPropertyMapping *)propertyMapping fromRepresentation:(NSDictionary *)representation +{ + id value = nil; + + if (propertyMapping.valueBlock) { + value = propertyMapping.valueBlock(propertyMapping.keyPath, [representation valueForKeyPath:propertyMapping.keyPath]); + } + else { + value = [representation valueForKeyPath:propertyMapping.keyPath]; + } + + return value; +} + ++(id)getValueOfManagedProperty:(EKPropertyMapping *)mapping + fromRepresentation:(NSDictionary *)representation + inContext:(NSManagedObjectContext *)context +{ + id value = nil; + + if (mapping.managedValueBlock) { + id representationValue = [representation valueForKeyPath:mapping.keyPath]; + value = mapping.managedValueBlock(mapping.keyPath,representationValue,context); + } + else { + value = [representation valueForKeyPath:mapping.keyPath]; + } + + return value; +} + ++ (NSDictionary *)extractRootPathFromExternalRepresentation:(NSDictionary *)externalRepresentation + withMapping:(EKObjectMapping *)mapping +{ + if (mapping.rootPath) { + return [externalRepresentation objectForKey:mapping.rootPath]; + } + return externalRepresentation; +} +@end diff --git a/Example/Pods/EasyMapping/EasyMapping/EKPropertyMapping.h b/Example/Pods/EasyMapping/EasyMapping/EKPropertyMapping.h new file mode 100644 index 0000000..79e0a30 --- /dev/null +++ b/Example/Pods/EasyMapping/EasyMapping/EKPropertyMapping.h @@ -0,0 +1,62 @@ +// +// EasyMapping +// +// Copyright (c) 2012-2014 Lucas Medeiros. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "EKMappingBlocks.h" + +/** + `EKPropertyMapping` is a class, that represents relation between representation of a single field in JSON and objective-c model property. + */ + +@interface EKPropertyMapping : NSObject + +/** + Path to field in JSON, that will be later used with `valueForKeyPath:` method. + */ +@property (nonatomic, strong) NSString *keyPath; + +/** + Name of the property, which will be receiving value. + */ +@property (nonatomic, strong) NSString *property; + +/** + Optional block to transform JSON value into objective-C object. + */ +@property (nonatomic, strong) EKMappingValueBlock valueBlock; + +/** + Optional block to serialize objective-c object into JSON representation. + */ +@property (nonatomic, strong) EKMappingReverseBlock reverseBlock; + +/** + Optional block to transform JSON value into CoreData object. + */ +@property (nonatomic, strong) EKManagedMappingValueBlock managedValueBlock; + +/** + Optional block to serialize CoreData object into JSON representation. + */ +@property (nonatomic, strong) EKManagedMappingReverseValueBlock managedReverseBlock; + +@end diff --git a/Example/Pods/EasyMapping/EasyMapping/EKPropertyMapping.m b/Example/Pods/EasyMapping/EasyMapping/EKPropertyMapping.m new file mode 100644 index 0000000..2b41cc0 --- /dev/null +++ b/Example/Pods/EasyMapping/EasyMapping/EKPropertyMapping.m @@ -0,0 +1,28 @@ +// +// EasyMapping +// +// Copyright (c) 2012-2014 Lucas Medeiros. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "EKPropertyMapping.h" + +@implementation EKPropertyMapping + +@end diff --git a/Example/Pods/EasyMapping/EasyMapping/EKRelationshipMapping.h b/Example/Pods/EasyMapping/EasyMapping/EKRelationshipMapping.h new file mode 100644 index 0000000..77ec346 --- /dev/null +++ b/Example/Pods/EasyMapping/EasyMapping/EKRelationshipMapping.h @@ -0,0 +1,27 @@ +// +// EKRelationshipMapping.h +// EasyMappingExample +// +// Created by Denys Telezhkin on 14.06.14. +// Copyright (c) 2014 EasyKit. All rights reserved. +// + +#import "EKObjectMapping.h" +#import "EKMappingProtocol.h" + +@interface EKRelationshipMapping : NSObject + +@property (nonatomic, strong) Class objectClass; + +@property (nonatomic, strong) NSString * keyPath; + +@property (nonatomic, strong) NSString * property; + +@property (nonatomic, strong) EKObjectMapping *objectMapping; + +@property (nonatomic, strong) NSArray * nonNestedKeyPaths; + +- (NSDictionary *)extractObjectFromRepresentation:(NSDictionary *)representation; + +@end + diff --git a/Example/Pods/EasyMapping/EasyMapping/EKRelationshipMapping.m b/Example/Pods/EasyMapping/EasyMapping/EKRelationshipMapping.m new file mode 100644 index 0000000..954cab6 --- /dev/null +++ b/Example/Pods/EasyMapping/EasyMapping/EKRelationshipMapping.m @@ -0,0 +1,39 @@ +// +// EKRelationshipMapping.m +// EasyMappingExample +// +// Created by Denys Telezhkin on 14.06.14. +// Copyright (c) 2014 EasyKit. All rights reserved. +// + +#import "EKRelationshipMapping.h" + +@implementation EKRelationshipMapping + +-(EKObjectMapping*)objectMapping +{ + return (_objectMapping == nil) ? [_objectClass objectMapping] : _objectMapping; +} + +-(NSDictionary *)extractObjectFromRepresentation:(NSDictionary *)representation +{ + if (self.nonNestedKeyPaths == nil) + { + return [representation valueForKeyPath:self.keyPath]; + } + else { + NSMutableDictionary * values = [NSMutableDictionary dictionaryWithCapacity:self.nonNestedKeyPaths.count]; + + for (NSString * keyPath in self.nonNestedKeyPaths) + { + id value = [representation valueForKeyPath:keyPath]; + if (value && value!=(id)[NSNull null]) + { + values[keyPath] = value; + } + } + return [values copy]; + } +} + +@end diff --git a/Example/Pods/EasyMapping/EasyMapping/EKSerializer.h b/Example/Pods/EasyMapping/EasyMapping/EKSerializer.h new file mode 100644 index 0000000..e2b4b4a --- /dev/null +++ b/Example/Pods/EasyMapping/EasyMapping/EKSerializer.h @@ -0,0 +1,83 @@ +// +// EasyMapping +// +// Copyright (c) 2012-2014 Lucas Medeiros. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "EKObjectMapping.h" +#import "EKManagedObjectMapping.h" + +/** + `EKSerializer` is a class, that allows converting objects to their JSON representation, using `EKObjectMapping`. CoreData objects are supported too. + */ +@interface EKSerializer : NSObject + +/** + Convert object to JSON representation. + + @param object object to convert. + + @param mapping object mapping. + + @result parsed JSON in a form of NSDictionary. + */ ++ (NSDictionary *)serializeObject:(id)object withMapping:(EKObjectMapping *)mapping; + +/** + Convert objects to JSON representation. + + @param collection objects to convert. + + @param mapping object mapping. + + @result parsed JSON in a form of NSArray. + */ ++ (NSArray *)serializeCollection:(NSArray *)collection withMapping:(EKObjectMapping *)mapping; + +/** + Convert CoreData managed object to JSON representation. + + @param object object to convert. + + @param mapping object mapping. + + @param context NSManagedObjectContext objects are in. If you don't use context lookups in reverse blocks, you can simply pass nil. + + @result parsed JSON in a form of NSDictionary. + */ ++ (NSDictionary *)serializeObject:(id)object + withMapping:(EKManagedObjectMapping *)mapping + fromContext:(NSManagedObjectContext *)context; + +/** + Convert CoreData managed objects to JSON representation. + + @param collection objects to convert. + + @param mapping object mapping. + + @param context NSManagedObjectContext objects are in. If you don't use context lookups in reverse blocks, you can simply pass nil. + + @result parsed JSON in a form of NSArray. + */ ++ (NSArray *)serializeCollection:(NSArray *)collection + withMapping:(EKManagedObjectMapping*)mapping + fromContext:(NSManagedObjectContext *)context; +@end diff --git a/Example/Pods/EasyMapping/EasyMapping/EKSerializer.m b/Example/Pods/EasyMapping/EasyMapping/EKSerializer.m new file mode 100644 index 0000000..3792e17 --- /dev/null +++ b/Example/Pods/EasyMapping/EasyMapping/EKSerializer.m @@ -0,0 +1,194 @@ +// +// EasyMapping +// +// Copyright (c) 2012-2014 Lucas Medeiros. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "EKSerializer.h" +#import "EKPropertyMapping.h" +#import "EKPropertyHelper.h" +#import "EKRelationshipMapping.h" + +@implementation EKSerializer + ++ (NSDictionary *)serializeObject:(id)object withMapping:(EKObjectMapping *)mapping +{ + NSMutableDictionary *representation = [NSMutableDictionary dictionary]; + + [mapping.propertyMappings enumerateKeysAndObjectsUsingBlock:^(id key, EKPropertyMapping *propertyMapping, BOOL *stop) { + [self setValueOnRepresentation:representation fromObject:object withPropertyMapping:propertyMapping]; + }]; + [mapping.hasOneMappings enumerateKeysAndObjectsUsingBlock:^(id key, EKRelationshipMapping *mapping, BOOL *stop) { + id hasOneObject = [object valueForKey:mapping.property]; + + if (hasOneObject) { + NSDictionary *hasOneRepresentation = [self serializeObject:hasOneObject + withMapping:[mapping objectMapping]]; + + if (mapping.nonNestedKeyPaths) + { + for (NSString * key in hasOneRepresentation.allKeys) + { + representation[key]=hasOneRepresentation[key]; + } + } + else { + [representation setObject:hasOneRepresentation forKey:mapping.keyPath]; + } + } + }]; + [mapping.hasManyMappings enumerateKeysAndObjectsUsingBlock:^(id key, EKRelationshipMapping *mapping, BOOL *stop) { + + id hasManyObject = [object valueForKey:mapping.property]; + if (hasManyObject) { + NSArray *hasManyRepresentation = [self serializeCollection:hasManyObject + withMapping:[mapping objectMapping]]; + [representation setObject:hasManyRepresentation forKey:mapping.keyPath]; + } + }]; + + if (mapping.rootPath.length > 0) { + representation = [@{mapping.rootPath : representation} mutableCopy]; + } + return representation; +} + ++ (NSArray *)serializeCollection:(NSArray *)collection withMapping:(EKObjectMapping *)mapping +{ + NSMutableArray *array = [NSMutableArray array]; + + for (id object in collection) { + NSDictionary *objectRepresentation = [self serializeObject:object withMapping:mapping]; + [array addObject:objectRepresentation]; + } + + return [NSArray arrayWithArray:array]; +} + ++(NSDictionary *)serializeObject:(id)object withMapping:(EKManagedObjectMapping *)mapping fromContext:(NSManagedObjectContext *)context +{ + NSMutableDictionary *representation = [NSMutableDictionary dictionary]; + + [mapping.propertyMappings enumerateKeysAndObjectsUsingBlock:^(id key, EKPropertyMapping *propertyMapping, BOOL *stop) { + [self setValueOnRepresentation:representation + fromManagedObject:object + withPropertyMapping:propertyMapping + inContext:context]; + }]; + [mapping.hasOneMappings enumerateKeysAndObjectsUsingBlock:^(id key, EKRelationshipMapping *mapping, BOOL *stop) { + id hasOneObject = [object valueForKey:mapping.property]; + + if (hasOneObject) { + NSDictionary *hasOneRepresentation = [self serializeObject:hasOneObject + withMapping:(EKManagedObjectMapping *)[mapping objectMapping] + fromContext:context]; + + if (mapping.nonNestedKeyPaths) + { + for (NSString * key in hasOneRepresentation.allKeys) + { + representation[key]=hasOneRepresentation[key]; + } + } + else { + [representation setObject:hasOneRepresentation forKey:mapping.keyPath]; + } + } + }]; + [mapping.hasManyMappings enumerateKeysAndObjectsUsingBlock:^(id key, EKRelationshipMapping *mapping, BOOL *stop) { + + id hasManyObject = [object valueForKey:mapping.property]; + if (hasManyObject) { + NSArray *hasManyRepresentation = [self serializeCollection:hasManyObject + withMapping:(EKManagedObjectMapping *)[mapping objectMapping] + fromContext:context]; + [representation setObject:hasManyRepresentation forKey:mapping.keyPath]; + } + }]; + + if (mapping.rootPath.length > 0) { + representation = [@{mapping.rootPath : representation} mutableCopy]; + } + return representation; +} + ++(NSArray *)serializeCollection:(NSArray *)collection withMapping:(EKManagedObjectMapping *)mapping fromContext:(NSManagedObjectContext *)context +{ + NSMutableArray *array = [NSMutableArray array]; + + for (id object in collection) { + NSDictionary *objectRepresentation = [self serializeObject:object withMapping:mapping fromContext:context]; + [array addObject:objectRepresentation]; + } + + return [NSArray arrayWithArray:array]; +} + ++(void)setValueOnRepresentation:(NSMutableDictionary *)representation fromManagedObject:(id)object + withPropertyMapping:(EKPropertyMapping *)propertyMapping inContext:(NSManagedObjectContext *)context +{ + id returnedValue = [object valueForKey:propertyMapping.property]; + + if (returnedValue) { + + if (propertyMapping.managedReverseBlock) { + returnedValue = propertyMapping.managedReverseBlock(returnedValue,context); + } + [self setValue:returnedValue forKeyPath:propertyMapping.keyPath inRepresentation:representation]; + } +} + ++ (void)setValueOnRepresentation:(NSMutableDictionary *)representation fromObject:(id)object withPropertyMapping:(EKPropertyMapping *)propertyMapping +{ + id returnedValue = [object valueForKey:propertyMapping.property]; + + if (returnedValue) { + + if (propertyMapping.reverseBlock) { + returnedValue = propertyMapping.reverseBlock(returnedValue); + } + [self setValue:returnedValue forKeyPath:propertyMapping.keyPath inRepresentation:representation]; + } +} + ++ (void)setValue:(id)value forKeyPath:(NSString *)keyPath inRepresentation:(NSMutableDictionary *)representation { + NSArray *keyPathComponents = [keyPath componentsSeparatedByString:@"."]; + if ([keyPathComponents count] == 1) { + [representation setObject:value forKey:keyPath]; + } else if ([keyPathComponents count] > 1) { + NSString *attributeKey = [keyPathComponents lastObject]; + NSMutableArray *subPaths = [NSMutableArray arrayWithArray:keyPathComponents]; + [subPaths removeLastObject]; + + id currentPath = representation; + for (NSString *key in subPaths) { + id subPath = [currentPath valueForKey:key]; + if (subPath == nil) { + subPath = [NSMutableDictionary new]; + [currentPath setValue:subPath forKey:key]; + } + currentPath = subPath; + } + [currentPath setValue:value forKey:attributeKey]; + } +} + + +@end diff --git a/Example/Pods/EasyMapping/EasyMapping/EasyMapping.h b/Example/Pods/EasyMapping/EasyMapping/EasyMapping.h new file mode 100644 index 0000000..af0655b --- /dev/null +++ b/Example/Pods/EasyMapping/EasyMapping/EasyMapping.h @@ -0,0 +1,34 @@ +// +// EasyMapping +// +// Copyright (c) 2012-2014 Lucas Medeiros. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import diff --git a/Example/Pods/EasyMapping/EasyMapping/NSArray+FlattenArray.h b/Example/Pods/EasyMapping/EasyMapping/NSArray+FlattenArray.h new file mode 100644 index 0000000..f3cf31e --- /dev/null +++ b/Example/Pods/EasyMapping/EasyMapping/NSArray+FlattenArray.h @@ -0,0 +1,30 @@ +// +// EasyMapping +// +// Copyright (c) 2012-2014 Lucas Medeiros. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +@import Foundation; + +@interface NSArray (FlattenArray) + +-(NSArray*)ek_flattenedCompactedArray; + +@end diff --git a/Example/Pods/EasyMapping/EasyMapping/NSArray+FlattenArray.m b/Example/Pods/EasyMapping/EasyMapping/NSArray+FlattenArray.m new file mode 100644 index 0000000..1b01f5d --- /dev/null +++ b/Example/Pods/EasyMapping/EasyMapping/NSArray+FlattenArray.m @@ -0,0 +1,40 @@ +// +// EasyMapping +// +// Copyright (c) 2012-2014 Lucas Medeiros. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "NSArray+FlattenArray.h" + +@implementation NSArray (FlattenArray) + +-(NSArray*)ek_flattenedCompactedArray { + NSMutableArray *result = [NSMutableArray arrayWithCapacity:self.count]; + for (id thing in self) { + if ([thing isKindOfClass:[NSArray class]]) { + [result addObjectsFromArray:[(NSArray*)thing ek_flattenedCompactedArray]]; + } else if (![thing isEqual:[NSNull null]]) { + [result addObject:thing]; + } + } + return [NSArray arrayWithArray:result]; +} + +@end diff --git a/Example/Pods/EasyMapping/EasyMapping/NSDateFormatter+EasyMappingAdditions.h b/Example/Pods/EasyMapping/EasyMapping/NSDateFormatter+EasyMappingAdditions.h new file mode 100644 index 0000000..a87085e --- /dev/null +++ b/Example/Pods/EasyMapping/EasyMapping/NSDateFormatter+EasyMappingAdditions.h @@ -0,0 +1,45 @@ +// +// NSDateFormatter+EasyMappingAdditions.h +// EasyMapping +// +// Created by Denys Telezhkin on 01.02.15. +// Copyright (c) 2015 EasyKit. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +static NSString * const EKRFC_3339DatetimeFormat = @"yyyy-MM-dd'T'HH:mm:ss'Z'"; +static NSString * const EKRFC_822DatetimeFormat = @"EEE, dd MMM yyyy HH:mm:ss z"; +static NSString * const EKISO_8601DateTimeFormat = @"yyyy-MM-dd"; + +/** + Category on NSDateFormatter, that allows getting NSDateFormatter for current thread. + + Note. On iOS 7 and higher and Mac OS X 10.7 and higher NSDateFormatter is thread-safe, so it's safe to use date formatter across multiple threads. + */ + +@interface NSDateFormatter (EasyMappingAdditions) + +/** + NSDateFormatter instance for current NSThread. It is lazily constructed, default date format - ISO 8601. + */ ++ (NSDateFormatter *)ek_formatterForCurrentThread; + +@end diff --git a/Example/Pods/EasyMapping/EasyMapping/NSDateFormatter+EasyMappingAdditions.m b/Example/Pods/EasyMapping/EasyMapping/NSDateFormatter+EasyMappingAdditions.m new file mode 100644 index 0000000..8981f45 --- /dev/null +++ b/Example/Pods/EasyMapping/EasyMapping/NSDateFormatter+EasyMappingAdditions.m @@ -0,0 +1,47 @@ +// +// NSDateFormatter+EasyMappingAdditions.m +// EasyMapping +// +// Created by Denys Telezhkin on 01.02.15. +// Copyright (c) 2015 EasyKit. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "NSDateFormatter+EasyMappingAdditions.h" + +NSString * const EKThreadDateFormatterKey = @"EKThreadDateFormatter"; + +@implementation NSDateFormatter (EasyMappingAdditions) + ++(NSDateFormatter *)ek_formatterForCurrentThread +{ + NSMutableDictionary *dictionary = [[NSThread currentThread] threadDictionary]; + NSDateFormatter *dateFormatter = [dictionary objectForKey:EKThreadDateFormatterKey]; + if (!dateFormatter) + { + dateFormatter = [[NSDateFormatter alloc] init]; + dateFormatter.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"]; + dateFormatter.dateFormat = EKISO_8601DateTimeFormat; + dateFormatter.timeZone = [NSTimeZone timeZoneForSecondsFromGMT:0]; + [dictionary setObject:dateFormatter forKey:EKThreadDateFormatterKey]; + } + return dateFormatter; +} + +@end diff --git a/Example/Pods/EasyMapping/LICENSE b/Example/Pods/EasyMapping/LICENSE new file mode 100644 index 0000000..7b34ff3 --- /dev/null +++ b/Example/Pods/EasyMapping/LICENSE @@ -0,0 +1,8 @@ +Copyright (c) 2012 Lucas Medeiros. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/Example/Pods/EasyMapping/README.md b/Example/Pods/EasyMapping/README.md new file mode 100644 index 0000000..4bf0700 --- /dev/null +++ b/Example/Pods/EasyMapping/README.md @@ -0,0 +1,233 @@ +![Build Status](https://travis-ci.org/EasyMapping/EasyMapping.png?branch=master)   +![CocoaPod platform](https://cocoapod-badges.herokuapp.com/p/EasyMapping/badge.png)   +![CocoaPod version](https://cocoapod-badges.herokuapp.com/v/EasyMapping/badge.png)   +[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) +![License MIT](https://go-shields.herokuapp.com/license-MIT-blue.png) + +# EasyMapping + +An easy way to unmarshall a Dictionary of attributes (which came from JSON, XML or just a NSDictionary) into a Class and vice versa. + +##Contact: + +Developed by [Lucas Medeiros](https://www.twitter.com/aspmedeiros) and [Denys Telezhkin](https://www.twitter.com/DTCoder) + +E-mail: lucastoc@gmail.com + +## Usage + +* Suppose you have these classes: + +```objective-c + +typedef enum { + GenderMale, + GenderFemale +} Gender; + +@interface Person : NSObject + +@property (nonatomic, copy) NSString *name; +@property (nonatomic, copy) NSString *email; +@property (nonatomic, assign) Gender gender; +@property (nonatomic, strong) Car *car; +@property (nonatomic, strong) NSArray *phones; +@property (nonatomic, strong) NSURL * socialURL; +@end + +@interface Car : NSObject + +@property (nonatomic, copy) NSString *model; +@property (nonatomic, copy) NSString *year; +@property (nonatomic, strong) NSDate *createdAt; + +@end + +@interface Phone : NSObject + +@property (nonatomic, copy) NSString *DDI; +@property (nonatomic, copy) NSString *DDD; +@property (nonatomic, copy) NSString *number; + +@end + +@interface Native : NSObject + +@property (nonatomic, readwrite) NSInteger integerProperty; +@property (nonatomic, readwrite) NSUInteger unsignedIntegerProperty; +@property (nonatomic, readwrite) CGFloat cgFloatProperty; +@property (nonatomic, readwrite) double doubleProperty; +@property (nonatomic, readwrite) BOOL boolProperty; + +@end +``` + +* Mapping becomes as simple as implementing single method + +```objective-c + +@implementation Person + ++(EKObjectMapping *)objectMapping +{ + return [EKObjectMapping mappingForClass:self withBlock:^(EKObjectMapping *mapping) { + NSDictionary *genders = @{ @"male": @(GenderMale), @"female": @(GenderFemale) }; + [mapping mapPropertiesFromArray:@[@"name", @"email"]]; + [mapping mapKeyPath:@"gender" toProperty:@"gender" withValueBlock:^(NSString *key, id value) { + return genders[value]; + } reverseBlock:^id(id value) { + return [genders allKeysForObject:value].lastObject; + }]; + [mapping mapKeyPath:@"socialURL" toProperty:@"socialURL" + withValueBlock:[EKMappingBlocks urlMappingBlock] + reverseBlock:[EKMappingBlocks urlReverseMappingBlock]]; + [mapping hasOne:[Car class] forKeyPath:@"car"]; + [mapping hasMany:[Phone class] forKeyPath:@"phones"]; + }]; +} + +@end + +@implementation Car + ++(EKObjectMapping *)objectMapping +{ + return [EKObjectMapping mappingForClass:self withBlock:^(EKObjectMapping *mapping) { + [mapping mapPropertiesFromArray:@[@"model", @"year"]]; + [mapping mapKeyPath:@"created_at" toProperty:@"createdAt" withDateFormatter:[NSDateFormatter formatterForCurrentThread]]; + }]; +} + +@end + +@implementation Phone + ++(EKObjectMapping *)objectMapping +{ + return [EKObjectMapping mappingForClass:self withBlock:^(EKObjectMapping *mapping) { + [mapping mapPropertiesFromArray:@[@"number"]]; + [mapping mapPropertiesFromDictionary:@{ + @"ddi" : @"DDI", + @"ddd" : @"DDD" + }]; + }]; +} + +@end + +@implementation Native + ++(EKObjectMapping *)objectMapping +{ + return [EKObjectMapping mappingForClass:self withBlock:^(EKObjectMapping *mapping) { + [mapping mapPropertiesFromArray:@[ + @"integerProperty", @"unsignedIntegerProperty", + @"cgFloatProperty", @"doubleProperty", + @"boolProperty" + ]]; + }]; +} + +@end +``` + +* Converting a NSDictionary or NSArray to a object class or collection now becomes easy: + +```objective-c +Person *person = [EKMapper objectFromExternalRepresentation:personRepresentation + withMapping:[Person objectMapping]]; + +NSArray *carsArray = [EKMapper arrayOfObjectsFromExternalRepresentation:carsRepresentation + withMapping:[Car objectMapping]]; +``` + +* Converting an object/collection to NSDictionary/NSArray: + +```objective-c +NSDictionary *representation = [EKSerializer serializeObject:car withMapping:[Car objectMapping]]; +NSArray *collectionRepresentation = [EKSerializer serializeCollection:cars withMapping:[Car objectMapping]]; +``` + +* Filling an existent object: + +Suppose you have something like this: + +```objective-c +Person *person = [Person alloc] init] +``` + +To fill an already instantiated object you can do this: + +```objective-c +[EKMapper fillObject:person fromExternalRepresentation:personRepresentation withMapping:[Person objectMapping]]; +``` + +### Swift + +EasyMapping is partially compatible with Swift. [Here's detailed look](https://github.com/EasyMapping/EasyMapping/wiki/Swift-and-EasyMapping) at EasyMapping usage in Swift and current limitations. + +### Convenience classes + +EasyMapping provides two convenience base classes: EKObjectModel and EKManagedObjectModel, that implement EKMappingProtocol by default. If, for example, class Person would inherit from EKObjectModel, and implemented objectMapping method, all it would take to create Person instance from JSON representation would be: + +```objective-c +NSDictionary * parsedPersonInfo = ...; +Person * person = [Person objectWithProperties:parsedPersonInfo]; +``` + +And CoreData variant in case Person is EKManagedObjectModel subclass: + +```objective-c +NSDictionary * parsedPersonInfo = ...; +Person * person = [Person objectWithProperties:parsedPersonInfo inContext:context]; +``` + +Serializing to NSDictionary is even easier: +```objective-c +NSDictionary * info = [person serializedObject]; +``` + +### CoreData + +If you are using CoreData objects use `EKManagedObjectMapping` instead of `EKObjectMapping`. EasyMapping tries to speed up importing to database by scanning provided JSON and fetching all existing objects in batch. The more high level JSON will be provided, the more speed boost can be achieved. + +### Recursive mappings + +Sometimes you can encounter situation, where your JSON will contain objects with links to objects of the same type. Good example would be comments, and replies to comments, that have tree-like structure. Starting with 0.7.0 recursive mappings are fully supported by EasyMapping. + +## Thanks + +Thanks to: + +* [basitali](https://github.com/basitali) who added the fillObject functionality on EKMapper! +* [Alejandro](https://github.com/aleph7) who added CoreData support! +* [Philip Vasilchenko](https://github.com/ArtFeel) who added the ability to serialization/deserialization of scalar types! +* [Dany L'Hébreux](https://github.com/danylhebreux) who added the NSSet support! +* [Jack](https://github.com/Jack-s) who added mapFieldsFromMappingObject and mapFieldsFromArrayToPascalCase functionality +* [Yuri Kotov](https://github.com/advantis) and [Dmitriy](https://github.com/poteryaysya) which added a lot of performance improvements + +## Requirements + +* XCode 6.3 and higher +* iOS 5 and higher +* Mac OS X 10.7 and higher +* ARC + +## Installation + +Using [CocoaPods](https://cocoapods.org): + + pod 'EasyMapping', '~> 0.15.0' + +Using [Carthage](https://github.com/Carthage/Carthage): + + github "EasyMapping/EasyMapping" + +Carthage uses dynamic frameworks, which require iOS 8. + +## The idea + +The idea came from: +* [RestKit's](https://github.com/RestKit/Restkit) mapping, its problem is that it doesn't transform +custom values (such as a string value to an enum) +* [Mantle's](https://github.com/github/Mantle) mapping, but you don't need to inherit from any class diff --git a/Example/Pods/Headers/Private/APAddressBook/APAddress.h b/Example/Pods/Headers/Private/APAddressBook/APAddress.h new file mode 120000 index 0000000..bfd3291 --- /dev/null +++ b/Example/Pods/Headers/Private/APAddressBook/APAddress.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Public/Models/APAddress.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/APAddressBook/APAddressBook.h b/Example/Pods/Headers/Private/APAddressBook/APAddressBook.h new file mode 120000 index 0000000..833ef31 --- /dev/null +++ b/Example/Pods/Headers/Private/APAddressBook/APAddressBook.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Public/APAddressBook.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/APAddressBook/APAddressBookAccessRoutine.h b/Example/Pods/Headers/Private/APAddressBook/APAddressBookAccessRoutine.h new file mode 120000 index 0000000..3ee24b6 --- /dev/null +++ b/Example/Pods/Headers/Private/APAddressBook/APAddressBookAccessRoutine.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Private/Routine/APAddressBookAccessRoutine.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/APAddressBook/APAddressBookBaseRoutine.h b/Example/Pods/Headers/Private/APAddressBook/APAddressBookBaseRoutine.h new file mode 120000 index 0000000..21d0b88 --- /dev/null +++ b/Example/Pods/Headers/Private/APAddressBook/APAddressBookBaseRoutine.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Private/Routine/Base/APAddressBookBaseRoutine.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/APAddressBook/APAddressBookContactsRoutine.h b/Example/Pods/Headers/Private/APAddressBook/APAddressBookContactsRoutine.h new file mode 120000 index 0000000..4809a9c --- /dev/null +++ b/Example/Pods/Headers/Private/APAddressBook/APAddressBookContactsRoutine.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Private/Routine/APAddressBookContactsRoutine.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/APAddressBook/APAddressBookExternalChangeDelegate.h b/Example/Pods/Headers/Private/APAddressBook/APAddressBookExternalChangeDelegate.h new file mode 120000 index 0000000..59b1fc7 --- /dev/null +++ b/Example/Pods/Headers/Private/APAddressBook/APAddressBookExternalChangeDelegate.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Private/Routine/APAddressBookExternalChangeDelegate.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/APAddressBook/APAddressBookExternalChangeRoutine.h b/Example/Pods/Headers/Private/APAddressBook/APAddressBookExternalChangeRoutine.h new file mode 120000 index 0000000..b37b645 --- /dev/null +++ b/Example/Pods/Headers/Private/APAddressBook/APAddressBookExternalChangeRoutine.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Private/Routine/APAddressBookExternalChangeRoutine.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/APAddressBook/APAddressBookRefWrapper.h b/Example/Pods/Headers/Private/APAddressBook/APAddressBookRefWrapper.h new file mode 120000 index 0000000..9c0ebd3 --- /dev/null +++ b/Example/Pods/Headers/Private/APAddressBook/APAddressBookRefWrapper.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Private/Wrapper/APAddressBookRefWrapper.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/APAddressBook/APContact.h b/Example/Pods/Headers/Private/APAddressBook/APContact.h new file mode 120000 index 0000000..1b74d8e --- /dev/null +++ b/Example/Pods/Headers/Private/APAddressBook/APContact.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Public/Models/APContact.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/APAddressBook/APContactBuilder.h b/Example/Pods/Headers/Private/APAddressBook/APContactBuilder.h new file mode 120000 index 0000000..c1f9231 --- /dev/null +++ b/Example/Pods/Headers/Private/APAddressBook/APContactBuilder.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Private/Builders/APContactBuilder.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/APAddressBook/APContactDataExtractor.h b/Example/Pods/Headers/Private/APAddressBook/APContactDataExtractor.h new file mode 120000 index 0000000..b959433 --- /dev/null +++ b/Example/Pods/Headers/Private/APAddressBook/APContactDataExtractor.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Private/Extractors/APContactDataExtractor.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/APAddressBook/APContactListBuilder.h b/Example/Pods/Headers/Private/APAddressBook/APContactListBuilder.h new file mode 120000 index 0000000..00baffe --- /dev/null +++ b/Example/Pods/Headers/Private/APAddressBook/APContactListBuilder.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Private/Builders/APContactListBuilder.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/APAddressBook/APEmail.h b/Example/Pods/Headers/Private/APAddressBook/APEmail.h new file mode 120000 index 0000000..d96dc2a --- /dev/null +++ b/Example/Pods/Headers/Private/APAddressBook/APEmail.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Public/Models/APEmail.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/APAddressBook/APImageExtractor.h b/Example/Pods/Headers/Private/APAddressBook/APImageExtractor.h new file mode 120000 index 0000000..3ae9c6b --- /dev/null +++ b/Example/Pods/Headers/Private/APAddressBook/APImageExtractor.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Private/Extractors/APImageExtractor.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/APAddressBook/APJob.h b/Example/Pods/Headers/Private/APAddressBook/APJob.h new file mode 120000 index 0000000..9b9059d --- /dev/null +++ b/Example/Pods/Headers/Private/APAddressBook/APJob.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Public/Models/APJob.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/APAddressBook/APName.h b/Example/Pods/Headers/Private/APAddressBook/APName.h new file mode 120000 index 0000000..ffde7ae --- /dev/null +++ b/Example/Pods/Headers/Private/APAddressBook/APName.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Public/Models/APName.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/APAddressBook/APPhone.h b/Example/Pods/Headers/Private/APAddressBook/APPhone.h new file mode 120000 index 0000000..486f02a --- /dev/null +++ b/Example/Pods/Headers/Private/APAddressBook/APPhone.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Public/Models/APPhone.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/APAddressBook/APRecordDate.h b/Example/Pods/Headers/Private/APAddressBook/APRecordDate.h new file mode 120000 index 0000000..07431c7 --- /dev/null +++ b/Example/Pods/Headers/Private/APAddressBook/APRecordDate.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Public/Models/APRecordDate.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/APAddressBook/APRelatedPerson.h b/Example/Pods/Headers/Private/APAddressBook/APRelatedPerson.h new file mode 120000 index 0000000..1f0341c --- /dev/null +++ b/Example/Pods/Headers/Private/APAddressBook/APRelatedPerson.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Public/Models/APRelatedPerson.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/APAddressBook/APSocialProfile.h b/Example/Pods/Headers/Private/APAddressBook/APSocialProfile.h new file mode 120000 index 0000000..1528c3c --- /dev/null +++ b/Example/Pods/Headers/Private/APAddressBook/APSocialProfile.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Public/Models/APSocialProfile.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/APAddressBook/APSocialServiceHelper.h b/Example/Pods/Headers/Private/APAddressBook/APSocialServiceHelper.h new file mode 120000 index 0000000..e5b1dee --- /dev/null +++ b/Example/Pods/Headers/Private/APAddressBook/APSocialServiceHelper.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Private/Helpers/APSocialServiceHelper.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/APAddressBook/APSource.h b/Example/Pods/Headers/Private/APAddressBook/APSource.h new file mode 120000 index 0000000..bb8a8a0 --- /dev/null +++ b/Example/Pods/Headers/Private/APAddressBook/APSource.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Public/Models/APSource.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/APAddressBook/APThread.h b/Example/Pods/Headers/Private/APAddressBook/APThread.h new file mode 120000 index 0000000..f6cdb5e --- /dev/null +++ b/Example/Pods/Headers/Private/APAddressBook/APThread.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Private/Thread/APThread.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/APAddressBook/APTypes.h b/Example/Pods/Headers/Private/APAddressBook/APTypes.h new file mode 120000 index 0000000..b9fca03 --- /dev/null +++ b/Example/Pods/Headers/Private/APAddressBook/APTypes.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Public/Models/APTypes.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/EasyMapping/EKCoreDataImporter.h b/Example/Pods/Headers/Private/EasyMapping/EKCoreDataImporter.h new file mode 120000 index 0000000..ff53aca --- /dev/null +++ b/Example/Pods/Headers/Private/EasyMapping/EKCoreDataImporter.h @@ -0,0 +1 @@ +../../../EasyMapping/EasyMapping/EKCoreDataImporter.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/EasyMapping/EKManagedObjectMapper.h b/Example/Pods/Headers/Private/EasyMapping/EKManagedObjectMapper.h new file mode 120000 index 0000000..112f158 --- /dev/null +++ b/Example/Pods/Headers/Private/EasyMapping/EKManagedObjectMapper.h @@ -0,0 +1 @@ +../../../EasyMapping/EasyMapping/EKManagedObjectMapper.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/EasyMapping/EKManagedObjectMapping.h b/Example/Pods/Headers/Private/EasyMapping/EKManagedObjectMapping.h new file mode 120000 index 0000000..2c8caf6 --- /dev/null +++ b/Example/Pods/Headers/Private/EasyMapping/EKManagedObjectMapping.h @@ -0,0 +1 @@ +../../../EasyMapping/EasyMapping/EKManagedObjectMapping.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/EasyMapping/EKManagedObjectModel.h b/Example/Pods/Headers/Private/EasyMapping/EKManagedObjectModel.h new file mode 120000 index 0000000..fd74c30 --- /dev/null +++ b/Example/Pods/Headers/Private/EasyMapping/EKManagedObjectModel.h @@ -0,0 +1 @@ +../../../EasyMapping/EasyMapping/EKManagedObjectModel.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/EasyMapping/EKMapper.h b/Example/Pods/Headers/Private/EasyMapping/EKMapper.h new file mode 120000 index 0000000..023e7e0 --- /dev/null +++ b/Example/Pods/Headers/Private/EasyMapping/EKMapper.h @@ -0,0 +1 @@ +../../../EasyMapping/EasyMapping/EKMapper.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/EasyMapping/EKMappingBlocks.h b/Example/Pods/Headers/Private/EasyMapping/EKMappingBlocks.h new file mode 120000 index 0000000..702dfc8 --- /dev/null +++ b/Example/Pods/Headers/Private/EasyMapping/EKMappingBlocks.h @@ -0,0 +1 @@ +../../../EasyMapping/EasyMapping/EKMappingBlocks.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/EasyMapping/EKMappingProtocol.h b/Example/Pods/Headers/Private/EasyMapping/EKMappingProtocol.h new file mode 120000 index 0000000..d105384 --- /dev/null +++ b/Example/Pods/Headers/Private/EasyMapping/EKMappingProtocol.h @@ -0,0 +1 @@ +../../../EasyMapping/EasyMapping/EKMappingProtocol.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/EasyMapping/EKObjectMapping.h b/Example/Pods/Headers/Private/EasyMapping/EKObjectMapping.h new file mode 120000 index 0000000..eb1d4ee --- /dev/null +++ b/Example/Pods/Headers/Private/EasyMapping/EKObjectMapping.h @@ -0,0 +1 @@ +../../../EasyMapping/EasyMapping/EKObjectMapping.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/EasyMapping/EKObjectModel.h b/Example/Pods/Headers/Private/EasyMapping/EKObjectModel.h new file mode 120000 index 0000000..4cd177d --- /dev/null +++ b/Example/Pods/Headers/Private/EasyMapping/EKObjectModel.h @@ -0,0 +1 @@ +../../../EasyMapping/EasyMapping/EKObjectModel.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/EasyMapping/EKPropertyHelper.h b/Example/Pods/Headers/Private/EasyMapping/EKPropertyHelper.h new file mode 120000 index 0000000..e79abd5 --- /dev/null +++ b/Example/Pods/Headers/Private/EasyMapping/EKPropertyHelper.h @@ -0,0 +1 @@ +../../../EasyMapping/EasyMapping/EKPropertyHelper.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/EasyMapping/EKPropertyMapping.h b/Example/Pods/Headers/Private/EasyMapping/EKPropertyMapping.h new file mode 120000 index 0000000..22f7eab --- /dev/null +++ b/Example/Pods/Headers/Private/EasyMapping/EKPropertyMapping.h @@ -0,0 +1 @@ +../../../EasyMapping/EasyMapping/EKPropertyMapping.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/EasyMapping/EKRelationshipMapping.h b/Example/Pods/Headers/Private/EasyMapping/EKRelationshipMapping.h new file mode 120000 index 0000000..143adf8 --- /dev/null +++ b/Example/Pods/Headers/Private/EasyMapping/EKRelationshipMapping.h @@ -0,0 +1 @@ +../../../EasyMapping/EasyMapping/EKRelationshipMapping.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/EasyMapping/EKSerializer.h b/Example/Pods/Headers/Private/EasyMapping/EKSerializer.h new file mode 120000 index 0000000..d615ac9 --- /dev/null +++ b/Example/Pods/Headers/Private/EasyMapping/EKSerializer.h @@ -0,0 +1 @@ +../../../EasyMapping/EasyMapping/EKSerializer.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/EasyMapping/EasyMapping.h b/Example/Pods/Headers/Private/EasyMapping/EasyMapping.h new file mode 120000 index 0000000..4625ca3 --- /dev/null +++ b/Example/Pods/Headers/Private/EasyMapping/EasyMapping.h @@ -0,0 +1 @@ +../../../EasyMapping/EasyMapping/EasyMapping.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/EasyMapping/NSArray+FlattenArray.h b/Example/Pods/Headers/Private/EasyMapping/NSArray+FlattenArray.h new file mode 120000 index 0000000..91c0796 --- /dev/null +++ b/Example/Pods/Headers/Private/EasyMapping/NSArray+FlattenArray.h @@ -0,0 +1 @@ +../../../EasyMapping/EasyMapping/NSArray+FlattenArray.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/EasyMapping/NSDateFormatter+EasyMappingAdditions.h b/Example/Pods/Headers/Private/EasyMapping/NSDateFormatter+EasyMappingAdditions.h new file mode 120000 index 0000000..8e1d33a --- /dev/null +++ b/Example/Pods/Headers/Private/EasyMapping/NSDateFormatter+EasyMappingAdditions.h @@ -0,0 +1 @@ +../../../EasyMapping/EasyMapping/NSDateFormatter+EasyMappingAdditions.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/APAddressBook/APAddress.h b/Example/Pods/Headers/Public/APAddressBook/APAddress.h new file mode 120000 index 0000000..bfd3291 --- /dev/null +++ b/Example/Pods/Headers/Public/APAddressBook/APAddress.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Public/Models/APAddress.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/APAddressBook/APAddressBook.h b/Example/Pods/Headers/Public/APAddressBook/APAddressBook.h new file mode 120000 index 0000000..833ef31 --- /dev/null +++ b/Example/Pods/Headers/Public/APAddressBook/APAddressBook.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Public/APAddressBook.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/APAddressBook/APAddressBookAccessRoutine.h b/Example/Pods/Headers/Public/APAddressBook/APAddressBookAccessRoutine.h new file mode 120000 index 0000000..3ee24b6 --- /dev/null +++ b/Example/Pods/Headers/Public/APAddressBook/APAddressBookAccessRoutine.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Private/Routine/APAddressBookAccessRoutine.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/APAddressBook/APAddressBookBaseRoutine.h b/Example/Pods/Headers/Public/APAddressBook/APAddressBookBaseRoutine.h new file mode 120000 index 0000000..21d0b88 --- /dev/null +++ b/Example/Pods/Headers/Public/APAddressBook/APAddressBookBaseRoutine.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Private/Routine/Base/APAddressBookBaseRoutine.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/APAddressBook/APAddressBookContactsRoutine.h b/Example/Pods/Headers/Public/APAddressBook/APAddressBookContactsRoutine.h new file mode 120000 index 0000000..4809a9c --- /dev/null +++ b/Example/Pods/Headers/Public/APAddressBook/APAddressBookContactsRoutine.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Private/Routine/APAddressBookContactsRoutine.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/APAddressBook/APAddressBookExternalChangeDelegate.h b/Example/Pods/Headers/Public/APAddressBook/APAddressBookExternalChangeDelegate.h new file mode 120000 index 0000000..59b1fc7 --- /dev/null +++ b/Example/Pods/Headers/Public/APAddressBook/APAddressBookExternalChangeDelegate.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Private/Routine/APAddressBookExternalChangeDelegate.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/APAddressBook/APAddressBookExternalChangeRoutine.h b/Example/Pods/Headers/Public/APAddressBook/APAddressBookExternalChangeRoutine.h new file mode 120000 index 0000000..b37b645 --- /dev/null +++ b/Example/Pods/Headers/Public/APAddressBook/APAddressBookExternalChangeRoutine.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Private/Routine/APAddressBookExternalChangeRoutine.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/APAddressBook/APAddressBookRefWrapper.h b/Example/Pods/Headers/Public/APAddressBook/APAddressBookRefWrapper.h new file mode 120000 index 0000000..9c0ebd3 --- /dev/null +++ b/Example/Pods/Headers/Public/APAddressBook/APAddressBookRefWrapper.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Private/Wrapper/APAddressBookRefWrapper.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/APAddressBook/APContact.h b/Example/Pods/Headers/Public/APAddressBook/APContact.h new file mode 120000 index 0000000..1b74d8e --- /dev/null +++ b/Example/Pods/Headers/Public/APAddressBook/APContact.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Public/Models/APContact.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/APAddressBook/APContactBuilder.h b/Example/Pods/Headers/Public/APAddressBook/APContactBuilder.h new file mode 120000 index 0000000..c1f9231 --- /dev/null +++ b/Example/Pods/Headers/Public/APAddressBook/APContactBuilder.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Private/Builders/APContactBuilder.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/APAddressBook/APContactDataExtractor.h b/Example/Pods/Headers/Public/APAddressBook/APContactDataExtractor.h new file mode 120000 index 0000000..b959433 --- /dev/null +++ b/Example/Pods/Headers/Public/APAddressBook/APContactDataExtractor.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Private/Extractors/APContactDataExtractor.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/APAddressBook/APContactListBuilder.h b/Example/Pods/Headers/Public/APAddressBook/APContactListBuilder.h new file mode 120000 index 0000000..00baffe --- /dev/null +++ b/Example/Pods/Headers/Public/APAddressBook/APContactListBuilder.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Private/Builders/APContactListBuilder.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/APAddressBook/APEmail.h b/Example/Pods/Headers/Public/APAddressBook/APEmail.h new file mode 120000 index 0000000..d96dc2a --- /dev/null +++ b/Example/Pods/Headers/Public/APAddressBook/APEmail.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Public/Models/APEmail.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/APAddressBook/APImageExtractor.h b/Example/Pods/Headers/Public/APAddressBook/APImageExtractor.h new file mode 120000 index 0000000..3ae9c6b --- /dev/null +++ b/Example/Pods/Headers/Public/APAddressBook/APImageExtractor.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Private/Extractors/APImageExtractor.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/APAddressBook/APJob.h b/Example/Pods/Headers/Public/APAddressBook/APJob.h new file mode 120000 index 0000000..9b9059d --- /dev/null +++ b/Example/Pods/Headers/Public/APAddressBook/APJob.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Public/Models/APJob.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/APAddressBook/APName.h b/Example/Pods/Headers/Public/APAddressBook/APName.h new file mode 120000 index 0000000..ffde7ae --- /dev/null +++ b/Example/Pods/Headers/Public/APAddressBook/APName.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Public/Models/APName.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/APAddressBook/APPhone.h b/Example/Pods/Headers/Public/APAddressBook/APPhone.h new file mode 120000 index 0000000..486f02a --- /dev/null +++ b/Example/Pods/Headers/Public/APAddressBook/APPhone.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Public/Models/APPhone.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/APAddressBook/APRecordDate.h b/Example/Pods/Headers/Public/APAddressBook/APRecordDate.h new file mode 120000 index 0000000..07431c7 --- /dev/null +++ b/Example/Pods/Headers/Public/APAddressBook/APRecordDate.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Public/Models/APRecordDate.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/APAddressBook/APRelatedPerson.h b/Example/Pods/Headers/Public/APAddressBook/APRelatedPerson.h new file mode 120000 index 0000000..1f0341c --- /dev/null +++ b/Example/Pods/Headers/Public/APAddressBook/APRelatedPerson.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Public/Models/APRelatedPerson.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/APAddressBook/APSocialProfile.h b/Example/Pods/Headers/Public/APAddressBook/APSocialProfile.h new file mode 120000 index 0000000..1528c3c --- /dev/null +++ b/Example/Pods/Headers/Public/APAddressBook/APSocialProfile.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Public/Models/APSocialProfile.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/APAddressBook/APSocialServiceHelper.h b/Example/Pods/Headers/Public/APAddressBook/APSocialServiceHelper.h new file mode 120000 index 0000000..e5b1dee --- /dev/null +++ b/Example/Pods/Headers/Public/APAddressBook/APSocialServiceHelper.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Private/Helpers/APSocialServiceHelper.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/APAddressBook/APSource.h b/Example/Pods/Headers/Public/APAddressBook/APSource.h new file mode 120000 index 0000000..bb8a8a0 --- /dev/null +++ b/Example/Pods/Headers/Public/APAddressBook/APSource.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Public/Models/APSource.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/APAddressBook/APThread.h b/Example/Pods/Headers/Public/APAddressBook/APThread.h new file mode 120000 index 0000000..f6cdb5e --- /dev/null +++ b/Example/Pods/Headers/Public/APAddressBook/APThread.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Private/Thread/APThread.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/APAddressBook/APTypes.h b/Example/Pods/Headers/Public/APAddressBook/APTypes.h new file mode 120000 index 0000000..b9fca03 --- /dev/null +++ b/Example/Pods/Headers/Public/APAddressBook/APTypes.h @@ -0,0 +1 @@ +../../../APAddressBook/Pod/Core/Public/Models/APTypes.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/EasyMapping/EKCoreDataImporter.h b/Example/Pods/Headers/Public/EasyMapping/EKCoreDataImporter.h new file mode 120000 index 0000000..ff53aca --- /dev/null +++ b/Example/Pods/Headers/Public/EasyMapping/EKCoreDataImporter.h @@ -0,0 +1 @@ +../../../EasyMapping/EasyMapping/EKCoreDataImporter.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/EasyMapping/EKManagedObjectMapper.h b/Example/Pods/Headers/Public/EasyMapping/EKManagedObjectMapper.h new file mode 120000 index 0000000..112f158 --- /dev/null +++ b/Example/Pods/Headers/Public/EasyMapping/EKManagedObjectMapper.h @@ -0,0 +1 @@ +../../../EasyMapping/EasyMapping/EKManagedObjectMapper.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/EasyMapping/EKManagedObjectMapping.h b/Example/Pods/Headers/Public/EasyMapping/EKManagedObjectMapping.h new file mode 120000 index 0000000..2c8caf6 --- /dev/null +++ b/Example/Pods/Headers/Public/EasyMapping/EKManagedObjectMapping.h @@ -0,0 +1 @@ +../../../EasyMapping/EasyMapping/EKManagedObjectMapping.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/EasyMapping/EKManagedObjectModel.h b/Example/Pods/Headers/Public/EasyMapping/EKManagedObjectModel.h new file mode 120000 index 0000000..fd74c30 --- /dev/null +++ b/Example/Pods/Headers/Public/EasyMapping/EKManagedObjectModel.h @@ -0,0 +1 @@ +../../../EasyMapping/EasyMapping/EKManagedObjectModel.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/EasyMapping/EKMapper.h b/Example/Pods/Headers/Public/EasyMapping/EKMapper.h new file mode 120000 index 0000000..023e7e0 --- /dev/null +++ b/Example/Pods/Headers/Public/EasyMapping/EKMapper.h @@ -0,0 +1 @@ +../../../EasyMapping/EasyMapping/EKMapper.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/EasyMapping/EKMappingBlocks.h b/Example/Pods/Headers/Public/EasyMapping/EKMappingBlocks.h new file mode 120000 index 0000000..702dfc8 --- /dev/null +++ b/Example/Pods/Headers/Public/EasyMapping/EKMappingBlocks.h @@ -0,0 +1 @@ +../../../EasyMapping/EasyMapping/EKMappingBlocks.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/EasyMapping/EKMappingProtocol.h b/Example/Pods/Headers/Public/EasyMapping/EKMappingProtocol.h new file mode 120000 index 0000000..d105384 --- /dev/null +++ b/Example/Pods/Headers/Public/EasyMapping/EKMappingProtocol.h @@ -0,0 +1 @@ +../../../EasyMapping/EasyMapping/EKMappingProtocol.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/EasyMapping/EKObjectMapping.h b/Example/Pods/Headers/Public/EasyMapping/EKObjectMapping.h new file mode 120000 index 0000000..eb1d4ee --- /dev/null +++ b/Example/Pods/Headers/Public/EasyMapping/EKObjectMapping.h @@ -0,0 +1 @@ +../../../EasyMapping/EasyMapping/EKObjectMapping.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/EasyMapping/EKObjectModel.h b/Example/Pods/Headers/Public/EasyMapping/EKObjectModel.h new file mode 120000 index 0000000..4cd177d --- /dev/null +++ b/Example/Pods/Headers/Public/EasyMapping/EKObjectModel.h @@ -0,0 +1 @@ +../../../EasyMapping/EasyMapping/EKObjectModel.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/EasyMapping/EKPropertyHelper.h b/Example/Pods/Headers/Public/EasyMapping/EKPropertyHelper.h new file mode 120000 index 0000000..e79abd5 --- /dev/null +++ b/Example/Pods/Headers/Public/EasyMapping/EKPropertyHelper.h @@ -0,0 +1 @@ +../../../EasyMapping/EasyMapping/EKPropertyHelper.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/EasyMapping/EKPropertyMapping.h b/Example/Pods/Headers/Public/EasyMapping/EKPropertyMapping.h new file mode 120000 index 0000000..22f7eab --- /dev/null +++ b/Example/Pods/Headers/Public/EasyMapping/EKPropertyMapping.h @@ -0,0 +1 @@ +../../../EasyMapping/EasyMapping/EKPropertyMapping.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/EasyMapping/EKRelationshipMapping.h b/Example/Pods/Headers/Public/EasyMapping/EKRelationshipMapping.h new file mode 120000 index 0000000..143adf8 --- /dev/null +++ b/Example/Pods/Headers/Public/EasyMapping/EKRelationshipMapping.h @@ -0,0 +1 @@ +../../../EasyMapping/EasyMapping/EKRelationshipMapping.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/EasyMapping/EKSerializer.h b/Example/Pods/Headers/Public/EasyMapping/EKSerializer.h new file mode 120000 index 0000000..d615ac9 --- /dev/null +++ b/Example/Pods/Headers/Public/EasyMapping/EKSerializer.h @@ -0,0 +1 @@ +../../../EasyMapping/EasyMapping/EKSerializer.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/EasyMapping/EasyMapping.h b/Example/Pods/Headers/Public/EasyMapping/EasyMapping.h new file mode 120000 index 0000000..4625ca3 --- /dev/null +++ b/Example/Pods/Headers/Public/EasyMapping/EasyMapping.h @@ -0,0 +1 @@ +../../../EasyMapping/EasyMapping/EasyMapping.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/EasyMapping/NSArray+FlattenArray.h b/Example/Pods/Headers/Public/EasyMapping/NSArray+FlattenArray.h new file mode 120000 index 0000000..91c0796 --- /dev/null +++ b/Example/Pods/Headers/Public/EasyMapping/NSArray+FlattenArray.h @@ -0,0 +1 @@ +../../../EasyMapping/EasyMapping/NSArray+FlattenArray.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/EasyMapping/NSDateFormatter+EasyMappingAdditions.h b/Example/Pods/Headers/Public/EasyMapping/NSDateFormatter+EasyMappingAdditions.h new file mode 120000 index 0000000..8e1d33a --- /dev/null +++ b/Example/Pods/Headers/Public/EasyMapping/NSDateFormatter+EasyMappingAdditions.h @@ -0,0 +1 @@ +../../../EasyMapping/EasyMapping/NSDateFormatter+EasyMappingAdditions.h \ No newline at end of file diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock new file mode 100644 index 0000000..9b4ece9 --- /dev/null +++ b/Example/Pods/Manifest.lock @@ -0,0 +1,17 @@ +PODS: + - APAddressBook (0.2.1): + - APAddressBook/Core (= 0.2.1) + - APAddressBook/Core (0.2.1) + - EasyMapping (0.15.3): + - EasyMapping/Core (= 0.15.3) + - EasyMapping/Core (0.15.3) + +DEPENDENCIES: + - APAddressBook + - EasyMapping + +SPEC CHECKSUMS: + APAddressBook: 90c0fb07579a47e10ef1a2344e23cfd35f388bec + EasyMapping: 5baf5a9a814538fdac4859cf56270ae761dd904a + +COCOAPODS: 0.39.0 diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj new file mode 100644 index 0000000..c7a6d17 --- /dev/null +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -0,0 +1,883 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 05F7E40D20C990D1C2C01F9638E59364 /* APRelatedPerson.h in Headers */ = {isa = PBXBuildFile; fileRef = BB4B737BA86209F7681E9EDE2A697BAF /* APRelatedPerson.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 07947CA3DAA2AF8F718D2A20596C3D6E /* NSDateFormatter+EasyMappingAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 93302D60D0D800DE9D792BA32720E6B2 /* NSDateFormatter+EasyMappingAdditions.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 0AC2DD94FB10D1F34BEAD250C36C623C /* EKRelationshipMapping.m in Sources */ = {isa = PBXBuildFile; fileRef = DA8A506E79064676C59447F1F345C641 /* EKRelationshipMapping.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 0C33A5D14FAC7678F1470EE8DCF5435E /* APEmail.m in Sources */ = {isa = PBXBuildFile; fileRef = 5B783CEBBC1D80C85D676F32660A9008 /* APEmail.m */; }; + 0C95B26F896F463960236CD49AB23470 /* APSocialProfile.h in Headers */ = {isa = PBXBuildFile; fileRef = E724C78981C976491C0E617070BFF494 /* APSocialProfile.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 0ED3A0E8B4D044F85B6EAAA8781F24D3 /* EKObjectMapping.m in Sources */ = {isa = PBXBuildFile; fileRef = EDF89F83714323D8EF224C392C2F4AAF /* EKObjectMapping.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 13D1C4C1D5E3A5406B10A6C127C904FE /* NSArray+FlattenArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 98CF84037059B9DDBFA73FAC831B5CCF /* NSArray+FlattenArray.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 19E6269A73F4031A7B578CE49D06D485 /* EKRelationshipMapping.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C326D16B621BE921FDC67B470119836 /* EKRelationshipMapping.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1C5C1142B23CD9FE89A2A6714B6D9CAB /* APAddressBookRefWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 120F711095AB7BD43290B5E92C315841 /* APAddressBookRefWrapper.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1D5B1427310E9B2CE643309DD319E5EC /* EKManagedObjectMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = BFA409F4565AD367555EE6BF4ABFBD45 /* EKManagedObjectMapper.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 1D69B2E14D739BB717AE99DAC7566237 /* APSocialServiceHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 8E4A523AEA5A4F416934075B010B6353 /* APSocialServiceHelper.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 23750C979CFAAC1E51413C449213B8C3 /* EKPropertyMapping.m in Sources */ = {isa = PBXBuildFile; fileRef = 71E543FAF31E4E696C84905A2EF8E031 /* EKPropertyMapping.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 23EB87DEB0DAE58614D50AEDEB067993 /* APTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 8704183971701111FA229D456F878029 /* APTypes.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 29568BBC97C8E0758D489D3472DF96F8 /* APAddressBookContactsRoutine.m in Sources */ = {isa = PBXBuildFile; fileRef = 5B3979152456C248795DD3703E2BDFC7 /* APAddressBookContactsRoutine.m */; }; + 2999BDD4CFBC3657B579823FF88B3151 /* APContactDataExtractor.m in Sources */ = {isa = PBXBuildFile; fileRef = 139125A8D0B589C444EC503E3A31D97C /* APContactDataExtractor.m */; }; + 2B7A6B69B42BD8ECF847953771874867 /* EasyMapping.h in Headers */ = {isa = PBXBuildFile; fileRef = 0585253F2A4626D71BC8454C5CF55909 /* EasyMapping.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2C084B6D55C046E798AB241DC1BC2BAE /* EKManagedObjectModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 844A90D2B52D5880B226004DC320EE0C /* EKManagedObjectModel.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 30D63BB9898975BC1ADFB3AC3C0D7C0B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C8586D5B5C73D3B006446B7BEE10029E /* Foundation.framework */; }; + 3732BD924AE19CB68A24BBEB231DB14C /* EKMappingBlocks.m in Sources */ = {isa = PBXBuildFile; fileRef = 761A67B2F854A75C675083F182285A12 /* EKMappingBlocks.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 398EC78FBB8D8D805A22EAB570114780 /* EKMappingBlocks.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E7B3FCE3E4EAB1EAB41834E9D895D80 /* EKMappingBlocks.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 40C0AC053FDDC65FCBFF1AFC49B0542C /* APSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FD26917C9C74F1A42DA86F701D3276 /* APSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 41B5D468E690C79CF20FD696E886C1A5 /* APName.m in Sources */ = {isa = PBXBuildFile; fileRef = E33179FF1AFED68236F7C231555A39DF /* APName.m */; }; + 426665C9452DE096677FFDD1274A6C13 /* APAddressBookExternalChangeRoutine.h in Headers */ = {isa = PBXBuildFile; fileRef = 585E20102797037D994BEF010451CB02 /* APAddressBookExternalChangeRoutine.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 481055A6C9BDAA32E3DA70C9AB4FB3C0 /* APContactListBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 95948BA6AC9607F864F2ED7CFA13307D /* APContactListBuilder.m */; }; + 4A2B837ACF80D424E5BC777D6924B5BD /* APName.h in Headers */ = {isa = PBXBuildFile; fileRef = C6DEE8A7FBF0FE8801CDC9CC66C4B0F5 /* APName.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4BBBA4309D95F3CE318D1742AC98FD55 /* APContact.m in Sources */ = {isa = PBXBuildFile; fileRef = 330A47FAB948BD3DBF8B0C4845FAC702 /* APContact.m */; }; + 4EA98BF21D6808B224A594CF80242C93 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C8586D5B5C73D3B006446B7BEE10029E /* Foundation.framework */; }; + 4FD8CC75CC08FE908921E920418E4126 /* EKObjectModel.h in Headers */ = {isa = PBXBuildFile; fileRef = DD3B36384EFA6510D50DC142459A649C /* EKObjectModel.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 51E2B7127E0BD6404F4B4FFC3A640231 /* APContactDataExtractor.h in Headers */ = {isa = PBXBuildFile; fileRef = 6874FC26FE96C824DF947848814D70D1 /* APContactDataExtractor.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 53F1123B7E59624CEA96073538625229 /* APAddress.m in Sources */ = {isa = PBXBuildFile; fileRef = A62B7ECABB358C727A50BBAE2C563F91 /* APAddress.m */; }; + 55B1E6A6AA6C4E5DED0DBD1BB8953DE5 /* EKSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = 78D120E74835D189CD630A2476F228FB /* EKSerializer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 591B43D79A33D2D2DCF8FBDDB1AD57BD /* APImageExtractor.m in Sources */ = {isa = PBXBuildFile; fileRef = A4A8D4784089E05D8BD9224200B7C43F /* APImageExtractor.m */; }; + 5A7926399E0E308B2835A5A4B8024171 /* EKManagedObjectMapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B02CC90F93B486B0A687700D809D64B /* EKManagedObjectMapper.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5D50C26E3287F350E6C9641AB4FE0C09 /* APJob.m in Sources */ = {isa = PBXBuildFile; fileRef = 220437AC42F3092DE2981768A0C4E600 /* APJob.m */; }; + 5E3DF137850B61A7AB632A40F72C3AE6 /* Pods-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 272643F56613CA0D336AE3DBF19DC404 /* Pods-dummy.m */; }; + 5F7E9B88895269D5CE275B496D6B795E /* APSocialServiceHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = CB0A16AD5AF9ABB276753CDDC9B6617E /* APSocialServiceHelper.m */; }; + 6521154479E63E7EF99BC9D05E8B3E5A /* EKPropertyHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = DD4481FA09694DCC5DAC21AB4F1E635D /* EKPropertyHelper.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6864221DEBF736A25E912E06C4CA48CF /* APPhone.h in Headers */ = {isa = PBXBuildFile; fileRef = 00409085E8A65E1944BEE66D67794AA5 /* APPhone.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6C644FC4E1EA53C872A6351FB633766A /* APRelatedPerson.m in Sources */ = {isa = PBXBuildFile; fileRef = 98250EE8C18CE0095BE72076EF101E95 /* APRelatedPerson.m */; }; + 6E8CD994663694A4CE2ABB0A78103D6A /* NSDateFormatter+EasyMappingAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = DC6271F1BC01205C1F2DFBD26545277B /* NSDateFormatter+EasyMappingAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 75642DDA34759A8ECBD64D2C3F1A7230 /* APRecordDate.m in Sources */ = {isa = PBXBuildFile; fileRef = DCB73A8EB280C1F364BCFC4882A9B2AD /* APRecordDate.m */; }; + 77AB6790DCE4A901BC7DCA2061BB175D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C8586D5B5C73D3B006446B7BEE10029E /* Foundation.framework */; }; + 7B09D2377FBDE51DA8FEDDB56B1FF0C7 /* APAddressBookAccessRoutine.m in Sources */ = {isa = PBXBuildFile; fileRef = E385F2CC532BFA8CC7E8FA3F58226BA0 /* APAddressBookAccessRoutine.m */; }; + 7DD570B768677167A7059B664713D4EE /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8DA10DB08D56CFA4401F3423879CC868 /* AddressBook.framework */; }; + 7E4A6385D504F753EB8814593A8706B6 /* APContactBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = F51B6A62564444331CB382E043FF0C85 /* APContactBuilder.m */; }; + 7E6AB984CBB7AC131AF92452C44FC24D /* EKPropertyMapping.h in Headers */ = {isa = PBXBuildFile; fileRef = 394BF5D01340236F33DD3040022ABDA0 /* EKPropertyMapping.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7FD47E2B497C779962E6EFD62E93ABBF /* EKPropertyHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D39BA5992A220E62A0C7E42C19F3DE /* EKPropertyHelper.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 819D0FC2BFD8F6CC304C4BB5F61A88EC /* APThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 385861F5736268F971E152EDE81FA925 /* APThread.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 835D10F8053E11933BCCA1B1E13771AE /* EKSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 3DF302BB420E5454B6FCF4D82680CA6D /* EKSerializer.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 84D1B7587986132BB1A8A395E8DA8F91 /* EKMappingProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A6143E0C57B70ED3341D28F185E1BBB /* EKMappingProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 89663F0066FC475E881AD7AF3A0B6F4B /* APThread.m in Sources */ = {isa = PBXBuildFile; fileRef = 40E5EE4C4440CDA2B903CABD3F5FC90D /* APThread.m */; }; + 89A5DDA3B550AF35AACD7F9381B24ABD /* APContact.h in Headers */ = {isa = PBXBuildFile; fileRef = 5BF87C9261F3E743E7F5A12EDA3CA8E7 /* APContact.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 8A06823BB6BC18547807820D6D2D9058 /* EKMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 8EE4CDEF7CEC4F04A1B63915A0768BD6 /* EKMapper.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 8B2792F98ADD3057727518A9D15ACF4C /* APRecordDate.h in Headers */ = {isa = PBXBuildFile; fileRef = 0ED42667C2F534C5859E199C2338E79F /* APRecordDate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 8FC3330B5C851F2F9AE190B13B54FECD /* APImageExtractor.h in Headers */ = {isa = PBXBuildFile; fileRef = FAA660415BC49571060A248BF82083E0 /* APImageExtractor.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 90BC371688938874F0C90FE07CC28318 /* APEmail.h in Headers */ = {isa = PBXBuildFile; fileRef = 923F60B004B35EE835F4DD9CE77CBCC3 /* APEmail.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 91D23DFE1E3CF67C7922E82DB58A43F0 /* EasyMapping-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C7F748838A5754C994D4EC3651E57C25 /* EasyMapping-dummy.m */; }; + 91E62BA3EF4F7790175A938001299C79 /* APAddressBook.m in Sources */ = {isa = PBXBuildFile; fileRef = 8283660F43017EF3D6739B662A792DE1 /* APAddressBook.m */; }; + 99285B90E8E2E708D8376FB6AF45B2EC /* EKCoreDataImporter.h in Headers */ = {isa = PBXBuildFile; fileRef = DD75ED9C8D02F886971C727110F08D6C /* EKCoreDataImporter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 99504CFFD8FA7BF261323525C354A647 /* APAddressBookAccessRoutine.h in Headers */ = {isa = PBXBuildFile; fileRef = E58170FE81E2035050B7077237F97988 /* APAddressBookAccessRoutine.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9CAF0A1BD71CBBFA677D373F7A4DE910 /* APAddressBookExternalChangeRoutine.m in Sources */ = {isa = PBXBuildFile; fileRef = FB6AE866B6F77A428F3284F5C108C488 /* APAddressBookExternalChangeRoutine.m */; }; + AA9CF2D6B14B8F1CCC0A1825C9100B29 /* APAddressBookContactsRoutine.h in Headers */ = {isa = PBXBuildFile; fileRef = E2688031E689D31418F6FA2142460E02 /* APAddressBookContactsRoutine.h */; settings = {ATTRIBUTES = (Public, ); }; }; + AB5298F088EA363A93562E66521D8C78 /* EKCoreDataImporter.m in Sources */ = {isa = PBXBuildFile; fileRef = 69D64088047A8111603E2BA07F85CF37 /* EKCoreDataImporter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + AE13EC81DAD45D89C56E7B8121F28603 /* EKManagedObjectModel.h in Headers */ = {isa = PBXBuildFile; fileRef = A492EB174D00ECA8CF2E54E4399244E3 /* EKManagedObjectModel.h */; settings = {ATTRIBUTES = (Public, ); }; }; + AFCC68581A0ECFA815BCD46EA4A61F79 /* APAddressBookRefWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 13BD967F918A69A53205423490A225E1 /* APAddressBookRefWrapper.m */; }; + B1854E3FF358C2D551E25F805BED84E1 /* APAddressBookBaseRoutine.m in Sources */ = {isa = PBXBuildFile; fileRef = C2992E7A7CE96DF803A28C3C85DE5777 /* APAddressBookBaseRoutine.m */; }; + B2C8E685171496795ACA3BC813460ED7 /* APPhone.m in Sources */ = {isa = PBXBuildFile; fileRef = C8E72D673CDCC0DF91311204C17D4A3F /* APPhone.m */; }; + B8F70854DB6D325DC9F4F7830EF1B675 /* APContactBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 066EAADC59B19D67E65C5C20354B8896 /* APContactBuilder.h */; settings = {ATTRIBUTES = (Public, ); }; }; + BEB32B54F9195196273F8925010CAE88 /* APAddressBookExternalChangeDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = B6569A32C43916E43C0C11623687634F /* APAddressBookExternalChangeDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C4BAC45CB683CAF90AC4840ED9421105 /* APSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 42DA8403D1A819BF4233DB3EFEE93BE0 /* APSource.m */; }; + C6C1A1B1AEC55202A129272D99131E35 /* APSocialProfile.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D6E0D4D69EE58D8DCB2A30E1A244873 /* APSocialProfile.m */; }; + C70B1EC19ADB397F19AEA6D9CEE122DD /* APAddressBook-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 05451754D81C7D787C6C4A21F2116FD6 /* APAddressBook-dummy.m */; }; + C8469E9116AD459E62ADC4BC3405022C /* EKManagedObjectMapping.h in Headers */ = {isa = PBXBuildFile; fileRef = 960233B011E000FD8F916E8EF1A6610D /* EKManagedObjectMapping.h */; settings = {ATTRIBUTES = (Public, ); }; }; + CA6D9BA11A93FFC713EDD6987AF9162B /* EKManagedObjectMapping.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DAE7C8E818E0DAD21B1EFDE7BAF2682 /* EKManagedObjectMapping.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + CE03E8E0C2E1421FAB84E468D43FF14D /* APJob.h in Headers */ = {isa = PBXBuildFile; fileRef = E03D36FDABD29CD24EAC1AAC3AD8ACED /* APJob.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DBCF09E12386CB863CD981B6C35AD80A /* APContactListBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CB24EDE20EC279C5583B4BE957357B2 /* APContactListBuilder.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E66F3D0547860F102230B6DA8DAFC676 /* APAddressBook.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DFFDD18F66FE72BC0B229A042ABF7D0 /* APAddressBook.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E6C94BA2F64FEDCFF3E899F71D345B47 /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6DAEDC7333D1F09A7030D1433DC858F /* CoreData.framework */; }; + E763BE5E29891867F04D5E46DDB4457A /* APAddress.h in Headers */ = {isa = PBXBuildFile; fileRef = 94B9E1BB99A61915B021A85216145534 /* APAddress.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F00EA86C50B2FD68DA9E253777E6A4AA /* EKMapper.h in Headers */ = {isa = PBXBuildFile; fileRef = E493B0A7F725FD8A3E9470C2100E069D /* EKMapper.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F7925AC78D37B79AD4999362E01F3F43 /* NSArray+FlattenArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 0BA213A096B2A743A5E450F81CB51488 /* NSArray+FlattenArray.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F931B6634F196BAF1B8FEE45F5D03BC5 /* EKObjectModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 95941D20B9CC242FE43E09BBEA13FC4D /* EKObjectModel.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + FBDCBE90303F2F06337BCC99FD131C95 /* EKObjectMapping.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F496268A5693BCC76751509B73ED2C0 /* EKObjectMapping.h */; settings = {ATTRIBUTES = (Public, ); }; }; + FDD1AE9AB7FC33315CD87FA26DD32506 /* APAddressBookBaseRoutine.h in Headers */ = {isa = PBXBuildFile; fileRef = 07694D3007EE9B43D15E3732745E8F41 /* APAddressBookBaseRoutine.h */; settings = {ATTRIBUTES = (Public, ); }; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 325D3CA73948B2F30F9BF086267B45B6 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = D6775B27F6655DDE6DFBA1564939A3FF; + remoteInfo = EasyMapping; + }; + B2D3DF4E882716DC071E67BD2AFFF6D0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 871737A65C664995FB48CDA571DFF8FD; + remoteInfo = APAddressBook; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 00409085E8A65E1944BEE66D67794AA5 /* APPhone.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = APPhone.h; path = Pod/Core/Public/Models/APPhone.h; sourceTree = ""; }; + 05451754D81C7D787C6C4A21F2116FD6 /* APAddressBook-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "APAddressBook-dummy.m"; sourceTree = ""; }; + 0585253F2A4626D71BC8454C5CF55909 /* EasyMapping.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = EasyMapping.h; path = EasyMapping/EasyMapping.h; sourceTree = ""; }; + 066EAADC59B19D67E65C5C20354B8896 /* APContactBuilder.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = APContactBuilder.h; path = Pod/Core/Private/Builders/APContactBuilder.h; sourceTree = ""; }; + 07694D3007EE9B43D15E3732745E8F41 /* APAddressBookBaseRoutine.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = APAddressBookBaseRoutine.h; path = Pod/Core/Private/Routine/Base/APAddressBookBaseRoutine.h; sourceTree = ""; }; + 0BA213A096B2A743A5E450F81CB51488 /* NSArray+FlattenArray.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSArray+FlattenArray.h"; path = "EasyMapping/NSArray+FlattenArray.h"; sourceTree = ""; }; + 0D8AB315473D2E3AA6F90E7144467C8F /* APAddressBook.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = APAddressBook.xcconfig; sourceTree = ""; }; + 0ED42667C2F534C5859E199C2338E79F /* APRecordDate.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = APRecordDate.h; path = Pod/Core/Public/Models/APRecordDate.h; sourceTree = ""; }; + 10834806BD7B412BC24F347361FA2C8E /* Pods-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-acknowledgements.plist"; sourceTree = ""; }; + 120F711095AB7BD43290B5E92C315841 /* APAddressBookRefWrapper.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = APAddressBookRefWrapper.h; path = Pod/Core/Private/Wrapper/APAddressBookRefWrapper.h; sourceTree = ""; }; + 139125A8D0B589C444EC503E3A31D97C /* APContactDataExtractor.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = APContactDataExtractor.m; path = Pod/Core/Private/Extractors/APContactDataExtractor.m; sourceTree = ""; }; + 13BD967F918A69A53205423490A225E1 /* APAddressBookRefWrapper.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = APAddressBookRefWrapper.m; path = Pod/Core/Private/Wrapper/APAddressBookRefWrapper.m; sourceTree = ""; }; + 1A6143E0C57B70ED3341D28F185E1BBB /* EKMappingProtocol.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = EKMappingProtocol.h; path = EasyMapping/EKMappingProtocol.h; sourceTree = ""; }; + 1DAE7C8E818E0DAD21B1EFDE7BAF2682 /* EKManagedObjectMapping.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = EKManagedObjectMapping.m; path = EasyMapping/EKManagedObjectMapping.m; sourceTree = ""; }; + 1F496268A5693BCC76751509B73ED2C0 /* EKObjectMapping.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = EKObjectMapping.h; path = EasyMapping/EKObjectMapping.h; sourceTree = ""; }; + 220437AC42F3092DE2981768A0C4E600 /* APJob.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = APJob.m; path = Pod/Core/Public/Models/APJob.m; sourceTree = ""; }; + 272643F56613CA0D336AE3DBF19DC404 /* Pods-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-dummy.m"; sourceTree = ""; }; + 2DFFDD18F66FE72BC0B229A042ABF7D0 /* APAddressBook.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = APAddressBook.h; path = Pod/Core/Public/APAddressBook.h; sourceTree = ""; }; + 330A47FAB948BD3DBF8B0C4845FAC702 /* APContact.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = APContact.m; path = Pod/Core/Public/Models/APContact.m; sourceTree = ""; }; + 37DB56D75062CC75FCB0966E1C6E8A8E /* Pods-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-acknowledgements.markdown"; sourceTree = ""; }; + 385861F5736268F971E152EDE81FA925 /* APThread.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = APThread.h; path = Pod/Core/Private/Thread/APThread.h; sourceTree = ""; }; + 394BF5D01340236F33DD3040022ABDA0 /* EKPropertyMapping.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = EKPropertyMapping.h; path = EasyMapping/EKPropertyMapping.h; sourceTree = ""; }; + 3DF302BB420E5454B6FCF4D82680CA6D /* EKSerializer.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = EKSerializer.m; path = EasyMapping/EKSerializer.m; sourceTree = ""; }; + 3FB6139F854428A92098298738DEA014 /* EasyMapping.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = EasyMapping.xcconfig; sourceTree = ""; }; + 4066B4DAAC4BC70D8867A372B5866F50 /* APAddressBook-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "APAddressBook-prefix.pch"; sourceTree = ""; }; + 40E5EE4C4440CDA2B903CABD3F5FC90D /* APThread.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = APThread.m; path = Pod/Core/Private/Thread/APThread.m; sourceTree = ""; }; + 42DA8403D1A819BF4233DB3EFEE93BE0 /* APSource.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = APSource.m; path = Pod/Core/Public/Models/APSource.m; sourceTree = ""; }; + 4E762F23EC34ED4A6FF3312D84E33A40 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Pods.debug.xcconfig; sourceTree = ""; }; + 50FD26917C9C74F1A42DA86F701D3276 /* APSource.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = APSource.h; path = Pod/Core/Public/Models/APSource.h; sourceTree = ""; }; + 585E20102797037D994BEF010451CB02 /* APAddressBookExternalChangeRoutine.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = APAddressBookExternalChangeRoutine.h; path = Pod/Core/Private/Routine/APAddressBookExternalChangeRoutine.h; sourceTree = ""; }; + 5B3979152456C248795DD3703E2BDFC7 /* APAddressBookContactsRoutine.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = APAddressBookContactsRoutine.m; path = Pod/Core/Private/Routine/APAddressBookContactsRoutine.m; sourceTree = ""; }; + 5B783CEBBC1D80C85D676F32660A9008 /* APEmail.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = APEmail.m; path = Pod/Core/Public/Models/APEmail.m; sourceTree = ""; }; + 5BF87C9261F3E743E7F5A12EDA3CA8E7 /* APContact.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = APContact.h; path = Pod/Core/Public/Models/APContact.h; sourceTree = ""; }; + 5C326D16B621BE921FDC67B470119836 /* EKRelationshipMapping.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = EKRelationshipMapping.h; path = EasyMapping/EKRelationshipMapping.h; sourceTree = ""; }; + 5D6E0D4D69EE58D8DCB2A30E1A244873 /* APSocialProfile.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = APSocialProfile.m; path = Pod/Core/Public/Models/APSocialProfile.m; sourceTree = ""; }; + 6874FC26FE96C824DF947848814D70D1 /* APContactDataExtractor.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = APContactDataExtractor.h; path = Pod/Core/Private/Extractors/APContactDataExtractor.h; sourceTree = ""; }; + 6911BECA35E7518D864239B7E898EEF3 /* Pods-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-frameworks.sh"; sourceTree = ""; }; + 69D64088047A8111603E2BA07F85CF37 /* EKCoreDataImporter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = EKCoreDataImporter.m; path = EasyMapping/EKCoreDataImporter.m; sourceTree = ""; }; + 71E543FAF31E4E696C84905A2EF8E031 /* EKPropertyMapping.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = EKPropertyMapping.m; path = EasyMapping/EKPropertyMapping.m; sourceTree = ""; }; + 761A67B2F854A75C675083F182285A12 /* EKMappingBlocks.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = EKMappingBlocks.m; path = EasyMapping/EKMappingBlocks.m; sourceTree = ""; }; + 78D120E74835D189CD630A2476F228FB /* EKSerializer.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = EKSerializer.h; path = EasyMapping/EKSerializer.h; sourceTree = ""; }; + 7A04D2D0132AAE5842E94B810E02C1B2 /* libEasyMapping.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libEasyMapping.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 7E7B3FCE3E4EAB1EAB41834E9D895D80 /* EKMappingBlocks.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = EKMappingBlocks.h; path = EasyMapping/EKMappingBlocks.h; sourceTree = ""; }; + 8283660F43017EF3D6739B662A792DE1 /* APAddressBook.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = APAddressBook.m; path = Pod/Core/Public/APAddressBook.m; sourceTree = ""; }; + 844A90D2B52D5880B226004DC320EE0C /* EKManagedObjectModel.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = EKManagedObjectModel.m; path = EasyMapping/EKManagedObjectModel.m; sourceTree = ""; }; + 8704183971701111FA229D456F878029 /* APTypes.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = APTypes.h; path = Pod/Core/Public/Models/APTypes.h; sourceTree = ""; }; + 8CB24EDE20EC279C5583B4BE957357B2 /* APContactListBuilder.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = APContactListBuilder.h; path = Pod/Core/Private/Builders/APContactListBuilder.h; sourceTree = ""; }; + 8DA10DB08D56CFA4401F3423879CC868 /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/AddressBook.framework; sourceTree = DEVELOPER_DIR; }; + 8E4A523AEA5A4F416934075B010B6353 /* APSocialServiceHelper.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = APSocialServiceHelper.h; path = Pod/Core/Private/Helpers/APSocialServiceHelper.h; sourceTree = ""; }; + 8EE4CDEF7CEC4F04A1B63915A0768BD6 /* EKMapper.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = EKMapper.m; path = EasyMapping/EKMapper.m; sourceTree = ""; }; + 912A62D2A171F16B3C4FB5474FC4699A /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 923F60B004B35EE835F4DD9CE77CBCC3 /* APEmail.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = APEmail.h; path = Pod/Core/Public/Models/APEmail.h; sourceTree = ""; }; + 93302D60D0D800DE9D792BA32720E6B2 /* NSDateFormatter+EasyMappingAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSDateFormatter+EasyMappingAdditions.m"; path = "EasyMapping/NSDateFormatter+EasyMappingAdditions.m"; sourceTree = ""; }; + 94B9E1BB99A61915B021A85216145534 /* APAddress.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = APAddress.h; path = Pod/Core/Public/Models/APAddress.h; sourceTree = ""; }; + 95941D20B9CC242FE43E09BBEA13FC4D /* EKObjectModel.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = EKObjectModel.m; path = EasyMapping/EKObjectModel.m; sourceTree = ""; }; + 95948BA6AC9607F864F2ED7CFA13307D /* APContactListBuilder.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = APContactListBuilder.m; path = Pod/Core/Private/Builders/APContactListBuilder.m; sourceTree = ""; }; + 960233B011E000FD8F916E8EF1A6610D /* EKManagedObjectMapping.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = EKManagedObjectMapping.h; path = EasyMapping/EKManagedObjectMapping.h; sourceTree = ""; }; + 98250EE8C18CE0095BE72076EF101E95 /* APRelatedPerson.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = APRelatedPerson.m; path = Pod/Core/Public/Models/APRelatedPerson.m; sourceTree = ""; }; + 98C98CDFB3F20F2925F6CD1F141BB14F /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Pods.release.xcconfig; sourceTree = ""; }; + 98CF84037059B9DDBFA73FAC831B5CCF /* NSArray+FlattenArray.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSArray+FlattenArray.m"; path = "EasyMapping/NSArray+FlattenArray.m"; sourceTree = ""; }; + 9B02CC90F93B486B0A687700D809D64B /* EKManagedObjectMapper.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = EKManagedObjectMapper.h; path = EasyMapping/EKManagedObjectMapper.h; sourceTree = ""; }; + A1A36D34413696BE466E2CA0AFF194DA /* Pods-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-resources.sh"; sourceTree = ""; }; + A492EB174D00ECA8CF2E54E4399244E3 /* EKManagedObjectModel.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = EKManagedObjectModel.h; path = EasyMapping/EKManagedObjectModel.h; sourceTree = ""; }; + A4A8D4784089E05D8BD9224200B7C43F /* APImageExtractor.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = APImageExtractor.m; path = Pod/Core/Private/Extractors/APImageExtractor.m; sourceTree = ""; }; + A62B7ECABB358C727A50BBAE2C563F91 /* APAddress.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = APAddress.m; path = Pod/Core/Public/Models/APAddress.m; sourceTree = ""; }; + A7D39BA5992A220E62A0C7E42C19F3DE /* EKPropertyHelper.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = EKPropertyHelper.m; path = EasyMapping/EKPropertyHelper.m; sourceTree = ""; }; + B6569A32C43916E43C0C11623687634F /* APAddressBookExternalChangeDelegate.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = APAddressBookExternalChangeDelegate.h; path = Pod/Core/Private/Routine/APAddressBookExternalChangeDelegate.h; sourceTree = ""; }; + B6DAEDC7333D1F09A7030D1433DC858F /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/CoreData.framework; sourceTree = DEVELOPER_DIR; }; + BA6428E9F66FD5A23C0A2E06ED26CD2F /* Podfile */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + BA83C21978A956941FFCE3B7D14EC5B4 /* libAPAddressBook.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libAPAddressBook.a; sourceTree = BUILT_PRODUCTS_DIR; }; + BB4B737BA86209F7681E9EDE2A697BAF /* APRelatedPerson.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = APRelatedPerson.h; path = Pod/Core/Public/Models/APRelatedPerson.h; sourceTree = ""; }; + BFA409F4565AD367555EE6BF4ABFBD45 /* EKManagedObjectMapper.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = EKManagedObjectMapper.m; path = EasyMapping/EKManagedObjectMapper.m; sourceTree = ""; }; + C2992E7A7CE96DF803A28C3C85DE5777 /* APAddressBookBaseRoutine.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = APAddressBookBaseRoutine.m; path = Pod/Core/Private/Routine/Base/APAddressBookBaseRoutine.m; sourceTree = ""; }; + C6DEE8A7FBF0FE8801CDC9CC66C4B0F5 /* APName.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = APName.h; path = Pod/Core/Public/Models/APName.h; sourceTree = ""; }; + C7F748838A5754C994D4EC3651E57C25 /* EasyMapping-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "EasyMapping-dummy.m"; sourceTree = ""; }; + C8586D5B5C73D3B006446B7BEE10029E /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + C8E72D673CDCC0DF91311204C17D4A3F /* APPhone.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = APPhone.m; path = Pod/Core/Public/Models/APPhone.m; sourceTree = ""; }; + CB0A16AD5AF9ABB276753CDDC9B6617E /* APSocialServiceHelper.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = APSocialServiceHelper.m; path = Pod/Core/Private/Helpers/APSocialServiceHelper.m; sourceTree = ""; }; + DA8A506E79064676C59447F1F345C641 /* EKRelationshipMapping.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = EKRelationshipMapping.m; path = EasyMapping/EKRelationshipMapping.m; sourceTree = ""; }; + DC6271F1BC01205C1F2DFBD26545277B /* NSDateFormatter+EasyMappingAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSDateFormatter+EasyMappingAdditions.h"; path = "EasyMapping/NSDateFormatter+EasyMappingAdditions.h"; sourceTree = ""; }; + DCB73A8EB280C1F364BCFC4882A9B2AD /* APRecordDate.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = APRecordDate.m; path = Pod/Core/Public/Models/APRecordDate.m; sourceTree = ""; }; + DD3B36384EFA6510D50DC142459A649C /* EKObjectModel.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = EKObjectModel.h; path = EasyMapping/EKObjectModel.h; sourceTree = ""; }; + DD4481FA09694DCC5DAC21AB4F1E635D /* EKPropertyHelper.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = EKPropertyHelper.h; path = EasyMapping/EKPropertyHelper.h; sourceTree = ""; }; + DD75ED9C8D02F886971C727110F08D6C /* EKCoreDataImporter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = EKCoreDataImporter.h; path = EasyMapping/EKCoreDataImporter.h; sourceTree = ""; }; + E03D36FDABD29CD24EAC1AAC3AD8ACED /* APJob.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = APJob.h; path = Pod/Core/Public/Models/APJob.h; sourceTree = ""; }; + E2688031E689D31418F6FA2142460E02 /* APAddressBookContactsRoutine.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = APAddressBookContactsRoutine.h; path = Pod/Core/Private/Routine/APAddressBookContactsRoutine.h; sourceTree = ""; }; + E33179FF1AFED68236F7C231555A39DF /* APName.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = APName.m; path = Pod/Core/Public/Models/APName.m; sourceTree = ""; }; + E385F2CC532BFA8CC7E8FA3F58226BA0 /* APAddressBookAccessRoutine.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = APAddressBookAccessRoutine.m; path = Pod/Core/Private/Routine/APAddressBookAccessRoutine.m; sourceTree = ""; }; + E493B0A7F725FD8A3E9470C2100E069D /* EKMapper.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = EKMapper.h; path = EasyMapping/EKMapper.h; sourceTree = ""; }; + E58170FE81E2035050B7077237F97988 /* APAddressBookAccessRoutine.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = APAddressBookAccessRoutine.h; path = Pod/Core/Private/Routine/APAddressBookAccessRoutine.h; sourceTree = ""; }; + E724C78981C976491C0E617070BFF494 /* APSocialProfile.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = APSocialProfile.h; path = Pod/Core/Public/Models/APSocialProfile.h; sourceTree = ""; }; + EDF89F83714323D8EF224C392C2F4AAF /* EKObjectMapping.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = EKObjectMapping.m; path = EasyMapping/EKObjectMapping.m; sourceTree = ""; }; + F51B6A62564444331CB382E043FF0C85 /* APContactBuilder.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = APContactBuilder.m; path = Pod/Core/Private/Builders/APContactBuilder.m; sourceTree = ""; }; + FAA660415BC49571060A248BF82083E0 /* APImageExtractor.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = APImageExtractor.h; path = Pod/Core/Private/Extractors/APImageExtractor.h; sourceTree = ""; }; + FB6AE866B6F77A428F3284F5C108C488 /* APAddressBookExternalChangeRoutine.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = APAddressBookExternalChangeRoutine.m; path = Pod/Core/Private/Routine/APAddressBookExternalChangeRoutine.m; sourceTree = ""; }; + FEE86956BE75BD1CF656602666E1DBE7 /* EasyMapping-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "EasyMapping-prefix.pch"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + BADDDB5E06F3FC6634964160B830743C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E6C94BA2F64FEDCFF3E899F71D345B47 /* CoreData.framework in Frameworks */, + 4EA98BF21D6808B224A594CF80242C93 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + C9F8343A26B2907506651087B7FD922B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 30D63BB9898975BC1ADFB3AC3C0D7C0B /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DA3D627C889DC8079C1A464B5D4E188A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 7DD570B768677167A7059B664713D4EE /* AddressBook.framework in Frameworks */, + 77AB6790DCE4A901BC7DCA2061BB175D /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 037C0CA694176A3C0915F62C9D20B3E6 /* Targets Support Files */ = { + isa = PBXGroup; + children = ( + B3D1D13E0C6553800746CB8FD61CF946 /* Pods */, + ); + name = "Targets Support Files"; + sourceTree = ""; + }; + 122DA2E5084A4393C29BE363C764795C /* Frameworks */ = { + isa = PBXGroup; + children = ( + E9085C987EE63F8DC2830BAAB23EA07E /* iOS */, + ); + name = Frameworks; + sourceTree = ""; + }; + 4813CA35AABBA8C8B2A69CF6C68D3FEE /* Support Files */ = { + isa = PBXGroup; + children = ( + 3FB6139F854428A92098298738DEA014 /* EasyMapping.xcconfig */, + C7F748838A5754C994D4EC3651E57C25 /* EasyMapping-dummy.m */, + FEE86956BE75BD1CF656602666E1DBE7 /* EasyMapping-prefix.pch */, + ); + name = "Support Files"; + path = "../Target Support Files/EasyMapping"; + sourceTree = ""; + }; + 5EE2F0B2DFCF42A8BDD2114C77B44930 /* APAddressBook */ = { + isa = PBXGroup; + children = ( + EFE9E4F9D8E522F2876D32437242DCD0 /* Core */, + 8047A52D2B9DA6B394E372A8FE4AA301 /* Support Files */, + ); + path = APAddressBook; + sourceTree = ""; + }; + 7AB21C568759597CE7C7ED18DDC3D2CE /* EasyMapping */ = { + isa = PBXGroup; + children = ( + DF789AD41142ABA4A92B732AB9A5F47C /* Core */, + 4813CA35AABBA8C8B2A69CF6C68D3FEE /* Support Files */, + ); + path = EasyMapping; + sourceTree = ""; + }; + 7DB346D0F39D3F0E887471402A8071AB = { + isa = PBXGroup; + children = ( + BA6428E9F66FD5A23C0A2E06ED26CD2F /* Podfile */, + 122DA2E5084A4393C29BE363C764795C /* Frameworks */, + 8EAA7058B04F552454961BE901B400D5 /* Pods */, + F408DC229E451C1BF153DA514CE4D34B /* Products */, + 037C0CA694176A3C0915F62C9D20B3E6 /* Targets Support Files */, + ); + sourceTree = ""; + }; + 8047A52D2B9DA6B394E372A8FE4AA301 /* Support Files */ = { + isa = PBXGroup; + children = ( + 0D8AB315473D2E3AA6F90E7144467C8F /* APAddressBook.xcconfig */, + 05451754D81C7D787C6C4A21F2116FD6 /* APAddressBook-dummy.m */, + 4066B4DAAC4BC70D8867A372B5866F50 /* APAddressBook-prefix.pch */, + ); + name = "Support Files"; + path = "../Target Support Files/APAddressBook"; + sourceTree = ""; + }; + 8EAA7058B04F552454961BE901B400D5 /* Pods */ = { + isa = PBXGroup; + children = ( + 5EE2F0B2DFCF42A8BDD2114C77B44930 /* APAddressBook */, + 7AB21C568759597CE7C7ED18DDC3D2CE /* EasyMapping */, + ); + name = Pods; + sourceTree = ""; + }; + B3D1D13E0C6553800746CB8FD61CF946 /* Pods */ = { + isa = PBXGroup; + children = ( + 37DB56D75062CC75FCB0966E1C6E8A8E /* Pods-acknowledgements.markdown */, + 10834806BD7B412BC24F347361FA2C8E /* Pods-acknowledgements.plist */, + 272643F56613CA0D336AE3DBF19DC404 /* Pods-dummy.m */, + 6911BECA35E7518D864239B7E898EEF3 /* Pods-frameworks.sh */, + A1A36D34413696BE466E2CA0AFF194DA /* Pods-resources.sh */, + 4E762F23EC34ED4A6FF3312D84E33A40 /* Pods.debug.xcconfig */, + 98C98CDFB3F20F2925F6CD1F141BB14F /* Pods.release.xcconfig */, + ); + name = Pods; + path = "Target Support Files/Pods"; + sourceTree = ""; + }; + DF789AD41142ABA4A92B732AB9A5F47C /* Core */ = { + isa = PBXGroup; + children = ( + 0585253F2A4626D71BC8454C5CF55909 /* EasyMapping.h */, + DD75ED9C8D02F886971C727110F08D6C /* EKCoreDataImporter.h */, + 69D64088047A8111603E2BA07F85CF37 /* EKCoreDataImporter.m */, + 9B02CC90F93B486B0A687700D809D64B /* EKManagedObjectMapper.h */, + BFA409F4565AD367555EE6BF4ABFBD45 /* EKManagedObjectMapper.m */, + 960233B011E000FD8F916E8EF1A6610D /* EKManagedObjectMapping.h */, + 1DAE7C8E818E0DAD21B1EFDE7BAF2682 /* EKManagedObjectMapping.m */, + A492EB174D00ECA8CF2E54E4399244E3 /* EKManagedObjectModel.h */, + 844A90D2B52D5880B226004DC320EE0C /* EKManagedObjectModel.m */, + E493B0A7F725FD8A3E9470C2100E069D /* EKMapper.h */, + 8EE4CDEF7CEC4F04A1B63915A0768BD6 /* EKMapper.m */, + 7E7B3FCE3E4EAB1EAB41834E9D895D80 /* EKMappingBlocks.h */, + 761A67B2F854A75C675083F182285A12 /* EKMappingBlocks.m */, + 1A6143E0C57B70ED3341D28F185E1BBB /* EKMappingProtocol.h */, + 1F496268A5693BCC76751509B73ED2C0 /* EKObjectMapping.h */, + EDF89F83714323D8EF224C392C2F4AAF /* EKObjectMapping.m */, + DD3B36384EFA6510D50DC142459A649C /* EKObjectModel.h */, + 95941D20B9CC242FE43E09BBEA13FC4D /* EKObjectModel.m */, + DD4481FA09694DCC5DAC21AB4F1E635D /* EKPropertyHelper.h */, + A7D39BA5992A220E62A0C7E42C19F3DE /* EKPropertyHelper.m */, + 394BF5D01340236F33DD3040022ABDA0 /* EKPropertyMapping.h */, + 71E543FAF31E4E696C84905A2EF8E031 /* EKPropertyMapping.m */, + 5C326D16B621BE921FDC67B470119836 /* EKRelationshipMapping.h */, + DA8A506E79064676C59447F1F345C641 /* EKRelationshipMapping.m */, + 78D120E74835D189CD630A2476F228FB /* EKSerializer.h */, + 3DF302BB420E5454B6FCF4D82680CA6D /* EKSerializer.m */, + 0BA213A096B2A743A5E450F81CB51488 /* NSArray+FlattenArray.h */, + 98CF84037059B9DDBFA73FAC831B5CCF /* NSArray+FlattenArray.m */, + DC6271F1BC01205C1F2DFBD26545277B /* NSDateFormatter+EasyMappingAdditions.h */, + 93302D60D0D800DE9D792BA32720E6B2 /* NSDateFormatter+EasyMappingAdditions.m */, + ); + name = Core; + sourceTree = ""; + }; + E9085C987EE63F8DC2830BAAB23EA07E /* iOS */ = { + isa = PBXGroup; + children = ( + 8DA10DB08D56CFA4401F3423879CC868 /* AddressBook.framework */, + B6DAEDC7333D1F09A7030D1433DC858F /* CoreData.framework */, + C8586D5B5C73D3B006446B7BEE10029E /* Foundation.framework */, + ); + name = iOS; + sourceTree = ""; + }; + EFE9E4F9D8E522F2876D32437242DCD0 /* Core */ = { + isa = PBXGroup; + children = ( + 94B9E1BB99A61915B021A85216145534 /* APAddress.h */, + A62B7ECABB358C727A50BBAE2C563F91 /* APAddress.m */, + 2DFFDD18F66FE72BC0B229A042ABF7D0 /* APAddressBook.h */, + 8283660F43017EF3D6739B662A792DE1 /* APAddressBook.m */, + E58170FE81E2035050B7077237F97988 /* APAddressBookAccessRoutine.h */, + E385F2CC532BFA8CC7E8FA3F58226BA0 /* APAddressBookAccessRoutine.m */, + 07694D3007EE9B43D15E3732745E8F41 /* APAddressBookBaseRoutine.h */, + C2992E7A7CE96DF803A28C3C85DE5777 /* APAddressBookBaseRoutine.m */, + E2688031E689D31418F6FA2142460E02 /* APAddressBookContactsRoutine.h */, + 5B3979152456C248795DD3703E2BDFC7 /* APAddressBookContactsRoutine.m */, + B6569A32C43916E43C0C11623687634F /* APAddressBookExternalChangeDelegate.h */, + 585E20102797037D994BEF010451CB02 /* APAddressBookExternalChangeRoutine.h */, + FB6AE866B6F77A428F3284F5C108C488 /* APAddressBookExternalChangeRoutine.m */, + 120F711095AB7BD43290B5E92C315841 /* APAddressBookRefWrapper.h */, + 13BD967F918A69A53205423490A225E1 /* APAddressBookRefWrapper.m */, + 5BF87C9261F3E743E7F5A12EDA3CA8E7 /* APContact.h */, + 330A47FAB948BD3DBF8B0C4845FAC702 /* APContact.m */, + 066EAADC59B19D67E65C5C20354B8896 /* APContactBuilder.h */, + F51B6A62564444331CB382E043FF0C85 /* APContactBuilder.m */, + 6874FC26FE96C824DF947848814D70D1 /* APContactDataExtractor.h */, + 139125A8D0B589C444EC503E3A31D97C /* APContactDataExtractor.m */, + 8CB24EDE20EC279C5583B4BE957357B2 /* APContactListBuilder.h */, + 95948BA6AC9607F864F2ED7CFA13307D /* APContactListBuilder.m */, + 923F60B004B35EE835F4DD9CE77CBCC3 /* APEmail.h */, + 5B783CEBBC1D80C85D676F32660A9008 /* APEmail.m */, + FAA660415BC49571060A248BF82083E0 /* APImageExtractor.h */, + A4A8D4784089E05D8BD9224200B7C43F /* APImageExtractor.m */, + E03D36FDABD29CD24EAC1AAC3AD8ACED /* APJob.h */, + 220437AC42F3092DE2981768A0C4E600 /* APJob.m */, + C6DEE8A7FBF0FE8801CDC9CC66C4B0F5 /* APName.h */, + E33179FF1AFED68236F7C231555A39DF /* APName.m */, + 00409085E8A65E1944BEE66D67794AA5 /* APPhone.h */, + C8E72D673CDCC0DF91311204C17D4A3F /* APPhone.m */, + 0ED42667C2F534C5859E199C2338E79F /* APRecordDate.h */, + DCB73A8EB280C1F364BCFC4882A9B2AD /* APRecordDate.m */, + BB4B737BA86209F7681E9EDE2A697BAF /* APRelatedPerson.h */, + 98250EE8C18CE0095BE72076EF101E95 /* APRelatedPerson.m */, + E724C78981C976491C0E617070BFF494 /* APSocialProfile.h */, + 5D6E0D4D69EE58D8DCB2A30E1A244873 /* APSocialProfile.m */, + 8E4A523AEA5A4F416934075B010B6353 /* APSocialServiceHelper.h */, + CB0A16AD5AF9ABB276753CDDC9B6617E /* APSocialServiceHelper.m */, + 50FD26917C9C74F1A42DA86F701D3276 /* APSource.h */, + 42DA8403D1A819BF4233DB3EFEE93BE0 /* APSource.m */, + 385861F5736268F971E152EDE81FA925 /* APThread.h */, + 40E5EE4C4440CDA2B903CABD3F5FC90D /* APThread.m */, + 8704183971701111FA229D456F878029 /* APTypes.h */, + ); + name = Core; + sourceTree = ""; + }; + F408DC229E451C1BF153DA514CE4D34B /* Products */ = { + isa = PBXGroup; + children = ( + BA83C21978A956941FFCE3B7D14EC5B4 /* libAPAddressBook.a */, + 7A04D2D0132AAE5842E94B810E02C1B2 /* libEasyMapping.a */, + 912A62D2A171F16B3C4FB5474FC4699A /* libPods.a */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + AE957951D823A3AD5B6ECBA4322832F4 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 2B7A6B69B42BD8ECF847953771874867 /* EasyMapping.h in Headers */, + 99285B90E8E2E708D8376FB6AF45B2EC /* EKCoreDataImporter.h in Headers */, + 5A7926399E0E308B2835A5A4B8024171 /* EKManagedObjectMapper.h in Headers */, + C8469E9116AD459E62ADC4BC3405022C /* EKManagedObjectMapping.h in Headers */, + AE13EC81DAD45D89C56E7B8121F28603 /* EKManagedObjectModel.h in Headers */, + F00EA86C50B2FD68DA9E253777E6A4AA /* EKMapper.h in Headers */, + 398EC78FBB8D8D805A22EAB570114780 /* EKMappingBlocks.h in Headers */, + 84D1B7587986132BB1A8A395E8DA8F91 /* EKMappingProtocol.h in Headers */, + FBDCBE90303F2F06337BCC99FD131C95 /* EKObjectMapping.h in Headers */, + 4FD8CC75CC08FE908921E920418E4126 /* EKObjectModel.h in Headers */, + 6521154479E63E7EF99BC9D05E8B3E5A /* EKPropertyHelper.h in Headers */, + 7E6AB984CBB7AC131AF92452C44FC24D /* EKPropertyMapping.h in Headers */, + 19E6269A73F4031A7B578CE49D06D485 /* EKRelationshipMapping.h in Headers */, + 55B1E6A6AA6C4E5DED0DBD1BB8953DE5 /* EKSerializer.h in Headers */, + F7925AC78D37B79AD4999362E01F3F43 /* NSArray+FlattenArray.h in Headers */, + 6E8CD994663694A4CE2ABB0A78103D6A /* NSDateFormatter+EasyMappingAdditions.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + FF9C26EFF69A134612AFF9A24E2D24BA /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + E763BE5E29891867F04D5E46DDB4457A /* APAddress.h in Headers */, + E66F3D0547860F102230B6DA8DAFC676 /* APAddressBook.h in Headers */, + 99504CFFD8FA7BF261323525C354A647 /* APAddressBookAccessRoutine.h in Headers */, + FDD1AE9AB7FC33315CD87FA26DD32506 /* APAddressBookBaseRoutine.h in Headers */, + AA9CF2D6B14B8F1CCC0A1825C9100B29 /* APAddressBookContactsRoutine.h in Headers */, + BEB32B54F9195196273F8925010CAE88 /* APAddressBookExternalChangeDelegate.h in Headers */, + 426665C9452DE096677FFDD1274A6C13 /* APAddressBookExternalChangeRoutine.h in Headers */, + 1C5C1142B23CD9FE89A2A6714B6D9CAB /* APAddressBookRefWrapper.h in Headers */, + 89A5DDA3B550AF35AACD7F9381B24ABD /* APContact.h in Headers */, + B8F70854DB6D325DC9F4F7830EF1B675 /* APContactBuilder.h in Headers */, + 51E2B7127E0BD6404F4B4FFC3A640231 /* APContactDataExtractor.h in Headers */, + DBCF09E12386CB863CD981B6C35AD80A /* APContactListBuilder.h in Headers */, + 90BC371688938874F0C90FE07CC28318 /* APEmail.h in Headers */, + 8FC3330B5C851F2F9AE190B13B54FECD /* APImageExtractor.h in Headers */, + CE03E8E0C2E1421FAB84E468D43FF14D /* APJob.h in Headers */, + 4A2B837ACF80D424E5BC777D6924B5BD /* APName.h in Headers */, + 6864221DEBF736A25E912E06C4CA48CF /* APPhone.h in Headers */, + 8B2792F98ADD3057727518A9D15ACF4C /* APRecordDate.h in Headers */, + 05F7E40D20C990D1C2C01F9638E59364 /* APRelatedPerson.h in Headers */, + 0C95B26F896F463960236CD49AB23470 /* APSocialProfile.h in Headers */, + 1D69B2E14D739BB717AE99DAC7566237 /* APSocialServiceHelper.h in Headers */, + 40C0AC053FDDC65FCBFF1AFC49B0542C /* APSource.h in Headers */, + 819D0FC2BFD8F6CC304C4BB5F61A88EC /* APThread.h in Headers */, + 23EB87DEB0DAE58614D50AEDEB067993 /* APTypes.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 4FD06676C7C95033228C74A4DF679EC2 /* Pods */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4F12193E74D1DA3CB07384836B53E9B9 /* Build configuration list for PBXNativeTarget "Pods" */; + buildPhases = ( + AAEA85217DB4558A672CC4FE1006E0B7 /* Sources */, + C9F8343A26B2907506651087B7FD922B /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 0DC6A09659A67F45C5391EA54CDD6557 /* PBXTargetDependency */, + 56D405F061192136082E39ADA1CC1295 /* PBXTargetDependency */, + ); + name = Pods; + productName = Pods; + productReference = 912A62D2A171F16B3C4FB5474FC4699A /* libPods.a */; + productType = "com.apple.product-type.library.static"; + }; + 871737A65C664995FB48CDA571DFF8FD /* APAddressBook */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7ADCF61DFD097BDFF2245DAE6F6FD970 /* Build configuration list for PBXNativeTarget "APAddressBook" */; + buildPhases = ( + C861956DBFF90F094B9D314CD26AC387 /* Sources */, + DA3D627C889DC8079C1A464B5D4E188A /* Frameworks */, + FF9C26EFF69A134612AFF9A24E2D24BA /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = APAddressBook; + productName = APAddressBook; + productReference = BA83C21978A956941FFCE3B7D14EC5B4 /* libAPAddressBook.a */; + productType = "com.apple.product-type.library.static"; + }; + D6775B27F6655DDE6DFBA1564939A3FF /* EasyMapping */ = { + isa = PBXNativeTarget; + buildConfigurationList = B7E7CB46246537509D6742C3F93C9843 /* Build configuration list for PBXNativeTarget "EasyMapping" */; + buildPhases = ( + F4D24A6A99E90A2AAA35E7895DCAA5C8 /* Sources */, + BADDDB5E06F3FC6634964160B830743C /* Frameworks */, + AE957951D823A3AD5B6ECBA4322832F4 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = EasyMapping; + productName = EasyMapping; + productReference = 7A04D2D0132AAE5842E94B810E02C1B2 /* libEasyMapping.a */; + productType = "com.apple.product-type.library.static"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0700; + LastUpgradeCheck = 0700; + }; + buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 7DB346D0F39D3F0E887471402A8071AB; + productRefGroup = F408DC229E451C1BF153DA514CE4D34B /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 871737A65C664995FB48CDA571DFF8FD /* APAddressBook */, + D6775B27F6655DDE6DFBA1564939A3FF /* EasyMapping */, + 4FD06676C7C95033228C74A4DF679EC2 /* Pods */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + AAEA85217DB4558A672CC4FE1006E0B7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5E3DF137850B61A7AB632A40F72C3AE6 /* Pods-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + C861956DBFF90F094B9D314CD26AC387 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 53F1123B7E59624CEA96073538625229 /* APAddress.m in Sources */, + C70B1EC19ADB397F19AEA6D9CEE122DD /* APAddressBook-dummy.m in Sources */, + 91E62BA3EF4F7790175A938001299C79 /* APAddressBook.m in Sources */, + 7B09D2377FBDE51DA8FEDDB56B1FF0C7 /* APAddressBookAccessRoutine.m in Sources */, + B1854E3FF358C2D551E25F805BED84E1 /* APAddressBookBaseRoutine.m in Sources */, + 29568BBC97C8E0758D489D3472DF96F8 /* APAddressBookContactsRoutine.m in Sources */, + 9CAF0A1BD71CBBFA677D373F7A4DE910 /* APAddressBookExternalChangeRoutine.m in Sources */, + AFCC68581A0ECFA815BCD46EA4A61F79 /* APAddressBookRefWrapper.m in Sources */, + 4BBBA4309D95F3CE318D1742AC98FD55 /* APContact.m in Sources */, + 7E4A6385D504F753EB8814593A8706B6 /* APContactBuilder.m in Sources */, + 2999BDD4CFBC3657B579823FF88B3151 /* APContactDataExtractor.m in Sources */, + 481055A6C9BDAA32E3DA70C9AB4FB3C0 /* APContactListBuilder.m in Sources */, + 0C33A5D14FAC7678F1470EE8DCF5435E /* APEmail.m in Sources */, + 591B43D79A33D2D2DCF8FBDDB1AD57BD /* APImageExtractor.m in Sources */, + 5D50C26E3287F350E6C9641AB4FE0C09 /* APJob.m in Sources */, + 41B5D468E690C79CF20FD696E886C1A5 /* APName.m in Sources */, + B2C8E685171496795ACA3BC813460ED7 /* APPhone.m in Sources */, + 75642DDA34759A8ECBD64D2C3F1A7230 /* APRecordDate.m in Sources */, + 6C644FC4E1EA53C872A6351FB633766A /* APRelatedPerson.m in Sources */, + C6C1A1B1AEC55202A129272D99131E35 /* APSocialProfile.m in Sources */, + 5F7E9B88895269D5CE275B496D6B795E /* APSocialServiceHelper.m in Sources */, + C4BAC45CB683CAF90AC4840ED9421105 /* APSource.m in Sources */, + 89663F0066FC475E881AD7AF3A0B6F4B /* APThread.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F4D24A6A99E90A2AAA35E7895DCAA5C8 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 91D23DFE1E3CF67C7922E82DB58A43F0 /* EasyMapping-dummy.m in Sources */, + AB5298F088EA363A93562E66521D8C78 /* EKCoreDataImporter.m in Sources */, + 1D5B1427310E9B2CE643309DD319E5EC /* EKManagedObjectMapper.m in Sources */, + CA6D9BA11A93FFC713EDD6987AF9162B /* EKManagedObjectMapping.m in Sources */, + 2C084B6D55C046E798AB241DC1BC2BAE /* EKManagedObjectModel.m in Sources */, + 8A06823BB6BC18547807820D6D2D9058 /* EKMapper.m in Sources */, + 3732BD924AE19CB68A24BBEB231DB14C /* EKMappingBlocks.m in Sources */, + 0ED3A0E8B4D044F85B6EAAA8781F24D3 /* EKObjectMapping.m in Sources */, + F931B6634F196BAF1B8FEE45F5D03BC5 /* EKObjectModel.m in Sources */, + 7FD47E2B497C779962E6EFD62E93ABBF /* EKPropertyHelper.m in Sources */, + 23750C979CFAAC1E51413C449213B8C3 /* EKPropertyMapping.m in Sources */, + 0AC2DD94FB10D1F34BEAD250C36C623C /* EKRelationshipMapping.m in Sources */, + 835D10F8053E11933BCCA1B1E13771AE /* EKSerializer.m in Sources */, + 13D1C4C1D5E3A5406B10A6C127C904FE /* NSArray+FlattenArray.m in Sources */, + 07947CA3DAA2AF8F718D2A20596C3D6E /* NSDateFormatter+EasyMappingAdditions.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 0DC6A09659A67F45C5391EA54CDD6557 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = APAddressBook; + target = 871737A65C664995FB48CDA571DFF8FD /* APAddressBook */; + targetProxy = B2D3DF4E882716DC071E67BD2AFFF6D0 /* PBXContainerItemProxy */; + }; + 56D405F061192136082E39ADA1CC1295 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = EasyMapping; + target = D6775B27F6655DDE6DFBA1564939A3FF /* EasyMapping */; + targetProxy = 325D3CA73948B2F30F9BF086267B45B6 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 29848E759D0E6F974C174B6AFD77B4F8 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 98C98CDFB3F20F2925F6CD1F141BB14F /* Pods.release.xcconfig */; + buildSettings = { + ENABLE_STRICT_OBJC_MSGSEND = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.1; + MACH_O_TYPE = staticlib; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + }; + name = Release; + }; + 2FC9E6A0670191952137752F41E2E193 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 0D8AB315473D2E3AA6F90E7144467C8F /* APAddressBook.xcconfig */; + buildSettings = { + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/APAddressBook/APAddressBook-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 9.1; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + }; + name = Release; + }; + 404C9C3ADC2EC37F8037F6CF9FD961D2 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 3FB6139F854428A92098298738DEA014 /* EasyMapping.xcconfig */; + buildSettings = { + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/EasyMapping/EasyMapping-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 9.1; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + 4F842813AE538B5E4A7AF880D9313463 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 4E762F23EC34ED4A6FF3312D84E33A40 /* Pods.debug.xcconfig */; + buildSettings = { + ENABLE_STRICT_OBJC_MSGSEND = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.1; + MACH_O_TYPE = staticlib; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + 75C91C52B335B765BF9C2FEB66A98509 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 0D8AB315473D2E3AA6F90E7144467C8F /* APAddressBook.xcconfig */; + buildSettings = { + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/APAddressBook/APAddressBook-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 9.1; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + C074F63C9EE7CB4D8C618390A32CEC35 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.1; + ONLY_ACTIVE_ARCH = YES; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Debug; + }; + CF1CB5AABB40347CCEE462C81B0798F7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 3FB6139F854428A92098298738DEA014 /* EasyMapping.xcconfig */; + buildSettings = { + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/EasyMapping/EasyMapping-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 9.1; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + }; + name = Release; + }; + E43846B588E1892F3093F3B7082B6DFB /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_PREPROCESSOR_DEFINITIONS = "RELEASE=1"; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.1; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C074F63C9EE7CB4D8C618390A32CEC35 /* Debug */, + E43846B588E1892F3093F3B7082B6DFB /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 4F12193E74D1DA3CB07384836B53E9B9 /* Build configuration list for PBXNativeTarget "Pods" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4F842813AE538B5E4A7AF880D9313463 /* Debug */, + 29848E759D0E6F974C174B6AFD77B4F8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7ADCF61DFD097BDFF2245DAE6F6FD970 /* Build configuration list for PBXNativeTarget "APAddressBook" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 75C91C52B335B765BF9C2FEB66A98509 /* Debug */, + 2FC9E6A0670191952137752F41E2E193 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B7E7CB46246537509D6742C3F93C9843 /* Build configuration list for PBXNativeTarget "EasyMapping" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 404C9C3ADC2EC37F8037F6CF9FD961D2 /* Debug */, + CF1CB5AABB40347CCEE462C81B0798F7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; +} diff --git a/Example/Pods/Target Support Files/APAddressBook/APAddressBook-dummy.m b/Example/Pods/Target Support Files/APAddressBook/APAddressBook-dummy.m new file mode 100644 index 0000000..2dd03d8 --- /dev/null +++ b/Example/Pods/Target Support Files/APAddressBook/APAddressBook-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_APAddressBook : NSObject +@end +@implementation PodsDummy_APAddressBook +@end diff --git a/Example/Pods/Target Support Files/APAddressBook/APAddressBook-prefix.pch b/Example/Pods/Target Support Files/APAddressBook/APAddressBook-prefix.pch new file mode 100644 index 0000000..aa992a4 --- /dev/null +++ b/Example/Pods/Target Support Files/APAddressBook/APAddressBook-prefix.pch @@ -0,0 +1,4 @@ +#ifdef __OBJC__ +#import +#endif + diff --git a/Example/Pods/Target Support Files/APAddressBook/APAddressBook.xcconfig b/Example/Pods/Target Support Files/APAddressBook/APAddressBook.xcconfig new file mode 100644 index 0000000..754ae35 --- /dev/null +++ b/Example/Pods/Target Support Files/APAddressBook/APAddressBook.xcconfig @@ -0,0 +1,5 @@ +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/APAddressBook" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/APAddressBook" "${PODS_ROOT}/Headers/Public/EasyMapping" +OTHER_LDFLAGS = -framework "AddressBook" +PODS_ROOT = ${SRCROOT} +SKIP_INSTALL = YES \ No newline at end of file diff --git a/Example/Pods/Target Support Files/EasyMapping/EasyMapping-dummy.m b/Example/Pods/Target Support Files/EasyMapping/EasyMapping-dummy.m new file mode 100644 index 0000000..ef2c539 --- /dev/null +++ b/Example/Pods/Target Support Files/EasyMapping/EasyMapping-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_EasyMapping : NSObject +@end +@implementation PodsDummy_EasyMapping +@end diff --git a/Example/Pods/Target Support Files/EasyMapping/EasyMapping-prefix.pch b/Example/Pods/Target Support Files/EasyMapping/EasyMapping-prefix.pch new file mode 100644 index 0000000..aa992a4 --- /dev/null +++ b/Example/Pods/Target Support Files/EasyMapping/EasyMapping-prefix.pch @@ -0,0 +1,4 @@ +#ifdef __OBJC__ +#import +#endif + diff --git a/Example/Pods/Target Support Files/EasyMapping/EasyMapping.xcconfig b/Example/Pods/Target Support Files/EasyMapping/EasyMapping.xcconfig new file mode 100644 index 0000000..f398997 --- /dev/null +++ b/Example/Pods/Target Support Files/EasyMapping/EasyMapping.xcconfig @@ -0,0 +1,5 @@ +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/EasyMapping" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/APAddressBook" "${PODS_ROOT}/Headers/Public/EasyMapping" +OTHER_LDFLAGS = -framework "CoreData" +PODS_ROOT = ${SRCROOT} +SKIP_INSTALL = YES \ No newline at end of file diff --git a/Example/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown b/Example/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown new file mode 100644 index 0000000..bf16acb --- /dev/null +++ b/Example/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown @@ -0,0 +1,26 @@ +# Acknowledgements +This application makes use of the following third party libraries: + +## APAddressBook + +Copyright (c) 2013 Alterplay + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +## EasyMapping + +Copyright (c) 2012 Lucas Medeiros. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +Generated by CocoaPods - http://cocoapods.org diff --git a/Example/Pods/Target Support Files/Pods/Pods-acknowledgements.plist b/Example/Pods/Target Support Files/Pods/Pods-acknowledgements.plist new file mode 100644 index 0000000..c0049dd --- /dev/null +++ b/Example/Pods/Target Support Files/Pods/Pods-acknowledgements.plist @@ -0,0 +1,60 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + Copyright (c) 2013 Alterplay + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + Title + APAddressBook + Type + PSGroupSpecifier + + + FooterText + Copyright (c) 2012 Lucas Medeiros. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + Title + EasyMapping + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - http://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/Example/Pods/Target Support Files/Pods/Pods-dummy.m b/Example/Pods/Target Support Files/Pods/Pods-dummy.m new file mode 100644 index 0000000..ade64bd --- /dev/null +++ b/Example/Pods/Target Support Files/Pods/Pods-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods : NSObject +@end +@implementation PodsDummy_Pods +@end diff --git a/Example/Pods/Target Support Files/Pods/Pods-frameworks.sh b/Example/Pods/Target Support Files/Pods/Pods-frameworks.sh new file mode 100755 index 0000000..6f76344 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods/Pods-frameworks.sh @@ -0,0 +1,84 @@ +#!/bin/sh +set -e + +echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + +SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" + +install_framework() +{ + if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then + local source="${BUILT_PRODUCTS_DIR}/$1" + elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then + local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" + elif [ -r "$1" ]; then + local source="$1" + fi + + local destination="${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + + if [ -L "${source}" ]; then + echo "Symlinked..." + source="$(readlink "${source}")" + fi + + # use filter instead of exclude so missing patterns dont' throw errors + echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + + local basename + basename="$(basename -s .framework "$1")" + binary="${destination}/${basename}.framework/${basename}" + if ! [ -r "$binary" ]; then + binary="${destination}/${basename}" + fi + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then + strip_invalid_archs "$binary" + fi + + # Resign the code if required by the build settings to avoid unstable apps + code_sign_if_enabled "${destination}/$(basename "$1")" + + # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. + if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then + local swift_runtime_libs + swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) + for lib in $swift_runtime_libs; do + echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" + rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" + code_sign_if_enabled "${destination}/${lib}" + done + fi +} + +# Signs a framework with the provided identity +code_sign_if_enabled() { + if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then + # Use the current code_sign_identitiy + echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" + echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements \"$1\"" + /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1" + fi +} + +# Strip invalid architectures +strip_invalid_archs() { + binary="$1" + # Get architectures for current file + archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" + stripped="" + for arch in $archs; do + if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then + # Strip non-valid architectures in-place + lipo -remove "$arch" -output "$binary" "$binary" || exit 1 + stripped="$stripped $arch" + fi + done + if [[ "$stripped" ]]; then + echo "Stripped $binary of architectures:$stripped" + fi +} + diff --git a/Example/Pods/Target Support Files/Pods/Pods-resources.sh b/Example/Pods/Target Support Files/Pods/Pods-resources.sh new file mode 100755 index 0000000..16774fb --- /dev/null +++ b/Example/Pods/Target Support Files/Pods/Pods-resources.sh @@ -0,0 +1,95 @@ +#!/bin/sh +set -e + +mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +XCASSET_FILES=() + +realpath() { + DIRECTORY="$(cd "${1%/*}" && pwd)" + FILENAME="${1##*/}" + echo "$DIRECTORY/$FILENAME" +} + +install_resource() +{ + case $1 in + *.storyboard) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" + ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" + ;; + *.xib) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" + ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" + ;; + *.framework) + echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" + xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" + xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\"" + xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm" + ;; + *.xcassets) + ABSOLUTE_XCASSET_FILE=$(realpath "${PODS_ROOT}/$1") + XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") + ;; + /*) + echo "$1" + echo "$1" >> "$RESOURCES_TO_COPY" + ;; + *) + echo "${PODS_ROOT}/$1" + echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" + ;; + esac +} + +mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then + mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] +then + case "${TARGETED_DEVICE_FAMILY}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; + esac + + # Find all other xcassets (this unfortunately includes those of path pods and other targets). + OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) + while read line; do + if [[ $line != "`realpath $PODS_ROOT`*" ]]; then + XCASSET_FILES+=("$line") + fi + done <<<"$OTHER_XCASSETS" + + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi diff --git a/Example/Pods/Target Support Files/Pods/Pods.debug.xcconfig b/Example/Pods/Target Support Files/Pods/Pods.debug.xcconfig new file mode 100644 index 0000000..bf881d9 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods/Pods.debug.xcconfig @@ -0,0 +1,5 @@ +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/APAddressBook" "${PODS_ROOT}/Headers/Public/EasyMapping" +OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/APAddressBook" -isystem "${PODS_ROOT}/Headers/Public/EasyMapping" +OTHER_LDFLAGS = $(inherited) -ObjC -l"APAddressBook" -l"EasyMapping" -framework "AddressBook" -framework "CoreData" +PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file diff --git a/Example/Pods/Target Support Files/Pods/Pods.release.xcconfig b/Example/Pods/Target Support Files/Pods/Pods.release.xcconfig new file mode 100644 index 0000000..bf881d9 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods/Pods.release.xcconfig @@ -0,0 +1,5 @@ +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/APAddressBook" "${PODS_ROOT}/Headers/Public/EasyMapping" +OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/APAddressBook" -isystem "${PODS_ROOT}/Headers/Public/EasyMapping" +OTHER_LDFLAGS = $(inherited) -ObjC -l"APAddressBook" -l"EasyMapping" -framework "AddressBook" -framework "CoreData" +PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file diff --git a/APContact+EasyMapping.h b/Sources/APContact+EasyMapping.h similarity index 100% rename from APContact+EasyMapping.h rename to Sources/APContact+EasyMapping.h diff --git a/APContact+EasyMapping.m b/Sources/APContact+EasyMapping.m similarity index 100% rename from APContact+EasyMapping.m rename to Sources/APContact+EasyMapping.m diff --git a/example/APContact+EasyMappingDemo.xcodeproj/project.pbxproj b/example/APContact+EasyMappingDemo.xcodeproj/project.pbxproj index d4d6a72..1d203d1 100644 --- a/example/APContact+EasyMappingDemo.xcodeproj/project.pbxproj +++ b/example/APContact+EasyMappingDemo.xcodeproj/project.pbxproj @@ -10,11 +10,11 @@ 3B38471EEBA36BFA42FBCAC6 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4E43415D029863A716F53030 /* libPods.a */; }; 4D22F0051BEFF020006A9ABC /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D22F0041BEFF020006A9ABC /* AppDelegate.m */; }; 4D22F0071BEFF2E1006A9ABC /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D22F0061BEFF2E1006A9ABC /* main.m */; }; + 4DB4AD951BF4D2A500582736 /* APContact+EasyMapping.m in Sources */ = {isa = PBXBuildFile; fileRef = 4DB4AD941BF4D2A500582736 /* APContact+EasyMapping.m */; }; 4DD9090A1BEE2D9C000F4603 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4DD909081BEE2D9C000F4603 /* Main.storyboard */; }; 4DD9090C1BEE2D9C000F4603 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4DD9090B1BEE2D9C000F4603 /* Assets.xcassets */; }; 4DD9090F1BEE2D9C000F4603 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4DD9090D1BEE2D9C000F4603 /* LaunchScreen.storyboard */; }; 4DD9091A1BEE2D9C000F4603 /* APContact_EasyMappingDemoTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DD909191BEE2D9C000F4603 /* APContact_EasyMappingDemoTests.swift */; }; - 4DD909A61BEE2E93000F4603 /* APContact+EasyMapping.m in Sources */ = {isa = PBXBuildFile; fileRef = 4DD909A51BEE2E93000F4603 /* APContact+EasyMapping.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -31,6 +31,8 @@ 4D22F0031BEFF020006A9ABC /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 4D22F0041BEFF020006A9ABC /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 4D22F0061BEFF2E1006A9ABC /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 4DB4AD931BF4D2A500582736 /* APContact+EasyMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "APContact+EasyMapping.h"; path = "../../Sources/APContact+EasyMapping.h"; sourceTree = ""; }; + 4DB4AD941BF4D2A500582736 /* APContact+EasyMapping.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "APContact+EasyMapping.m"; path = "../../Sources/APContact+EasyMapping.m"; sourceTree = ""; }; 4DD909011BEE2D9C000F4603 /* APContact+EasyMappingDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "APContact+EasyMappingDemo.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 4DD909091BEE2D9C000F4603 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 4DD9090B1BEE2D9C000F4603 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; @@ -39,8 +41,6 @@ 4DD909151BEE2D9C000F4603 /* APContact+EasyMappingDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "APContact+EasyMappingDemoTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 4DD909191BEE2D9C000F4603 /* APContact_EasyMappingDemoTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APContact_EasyMappingDemoTests.swift; sourceTree = ""; }; 4DD9091B1BEE2D9C000F4603 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 4DD909A41BEE2E93000F4603 /* APContact+EasyMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "APContact+EasyMapping.h"; sourceTree = ""; }; - 4DD909A51BEE2E93000F4603 /* APContact+EasyMapping.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "APContact+EasyMapping.m"; sourceTree = ""; }; 4E43415D029863A716F53030 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; 7A38817C8D140BED61463115 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; }; CFF92AD2D3777D10D1FBC6AB /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; @@ -96,12 +96,12 @@ 4DD909031BEE2D9C000F4603 /* APContact+EasyMappingDemo */ = { isa = PBXGroup; children = ( + 4DB4AD931BF4D2A500582736 /* APContact+EasyMapping.h */, + 4DB4AD941BF4D2A500582736 /* APContact+EasyMapping.m */, 4DD909081BEE2D9C000F4603 /* Main.storyboard */, 4DD9090B1BEE2D9C000F4603 /* Assets.xcassets */, 4DD9090D1BEE2D9C000F4603 /* LaunchScreen.storyboard */, 4DD909101BEE2D9C000F4603 /* Info.plist */, - 4DD909A41BEE2E93000F4603 /* APContact+EasyMapping.h */, - 4DD909A51BEE2E93000F4603 /* APContact+EasyMapping.m */, 4D22F0031BEFF020006A9ABC /* AppDelegate.h */, 4D22F0041BEFF020006A9ABC /* AppDelegate.m */, 4D22F0061BEFF2E1006A9ABC /* main.m */, @@ -281,7 +281,7 @@ files = ( 4D22F0051BEFF020006A9ABC /* AppDelegate.m in Sources */, 4D22F0071BEFF2E1006A9ABC /* main.m in Sources */, - 4DD909A61BEE2E93000F4603 /* APContact+EasyMapping.m in Sources */, + 4DB4AD951BF4D2A500582736 /* APContact+EasyMapping.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/example/APContact+EasyMappingDemo/Base.lproj/Main.storyboard b/example/APContact+EasyMappingDemo/Base.lproj/Main.storyboard index 3a2a49b..4a48a98 100644 --- a/example/APContact+EasyMappingDemo/Base.lproj/Main.storyboard +++ b/example/APContact+EasyMappingDemo/Base.lproj/Main.storyboard @@ -1,13 +1,14 @@ - + - + + - + @@ -15,6 +16,7 @@ +