diff --git a/EasyMapping/EKCoreDataImporter.h b/EasyMapping/EKCoreDataImporter.h index 8194bae..d8c7c52 100644 --- a/EasyMapping/EKCoreDataImporter.h +++ b/EasyMapping/EKCoreDataImporter.h @@ -24,6 +24,8 @@ @import CoreData; #import "EKManagedObjectMapping.h" +NS_ASSUME_NONNULL_BEGIN + /** `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: @@ -75,8 +77,10 @@ @result managed object */ -- (id)existingObjectForRepresentation:(id)representation mapping:(EKManagedObjectMapping *)mapping context:(NSManagedObjectContext *)context; +- (nullable id)existingObjectForRepresentation:(id)representation mapping:(EKManagedObjectMapping *)mapping context:(NSManagedObjectContext *)context; - (void)cacheObject:(NSManagedObject *)object withMapping:(EKManagedObjectMapping *)mapping; @end + +NS_ASSUME_NONNULL_END diff --git a/EasyMapping/EKManagedObjectMapper.h b/EasyMapping/EKManagedObjectMapper.h index 5bbda62..b355b47 100644 --- a/EasyMapping/EKManagedObjectMapper.h +++ b/EasyMapping/EKManagedObjectMapper.h @@ -24,6 +24,8 @@ #import #import "EKManagedObjectMapping.h" +NS_ASSUME_NONNULL_BEGIN + /** `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. */ @@ -97,5 +99,6 @@ withMapping:(EKManagedObjectMapping *)mapping fetchRequest:(NSFetchRequest*)fetchRequest inManagedObjectContext:(NSManagedObjectContext *)context; - @end + +NS_ASSUME_NONNULL_END diff --git a/EasyMapping/EKManagedObjectMapping.h b/EasyMapping/EKManagedObjectMapping.h index dba4089..9781946 100644 --- a/EasyMapping/EKManagedObjectMapping.h +++ b/EasyMapping/EKManagedObjectMapping.h @@ -26,6 +26,8 @@ #define EKDesignatedInitializer(__SEL__) __attribute__((unavailable("Invoke the designated initializer `" # __SEL__ "` instead."))) +NS_ASSUME_NONNULL_BEGIN + /** `EKManagedObjectMapping` is a subclass of `EKObjectMapping`, intended to be used with CoreData objects. */ @@ -40,7 +42,7 @@ /** Primary key of CoreData objects */ -@property (nonatomic, strong) NSString *primaryKey; +@property (nonatomic, strong, nullable) NSString *primaryKey; -(void)mapKeyPath:(NSString *)keyPath toProperty:(NSString *)property withValueBlock:(EKManagedMappingValueBlock)valueBlock; @@ -100,7 +102,7 @@ @result property mapping */ -- (EKPropertyMapping *)primaryKeyPropertyMapping; +- (nullable EKPropertyMapping *)primaryKeyPropertyMapping; #pragma mark - unavalable methods @@ -125,3 +127,5 @@ + (instancetype)mappingForClass:(Class)objectClass withRootPath:(NSString *)rootPath withBlock:(void (^)(EKObjectMapping *mapping))mappingBlock EKDesignatedInitializer(mappingForEntityName:withRootPath:withBlock); @end + +NS_ASSUME_NONNULL_END diff --git a/EasyMapping/EKManagedObjectModel.h b/EasyMapping/EKManagedObjectModel.h index e929d6e..a09de88 100644 --- a/EasyMapping/EKManagedObjectModel.h +++ b/EasyMapping/EKManagedObjectModel.h @@ -9,6 +9,8 @@ #import #import "EKMappingProtocol.h" +NS_ASSUME_NONNULL_BEGIN + /** EKManagedObjectModel is a convenience base class for NSManagedObject subclasses. It allows creating CoreData objects from JSON representation and vice versa. */ @@ -39,8 +41,4 @@ @end -@interface EKManagedObjectModel(Deprecated) - -- (NSDictionary *)serializedObject __deprecated_msg("Use serializedObjectInContext instead"); - -@end +NS_ASSUME_NONNULL_END \ No newline at end of file diff --git a/EasyMapping/EKManagedObjectModel.m b/EasyMapping/EKManagedObjectModel.m index 07b4fdc..5e283eb 100644 --- a/EasyMapping/EKManagedObjectModel.m +++ b/EasyMapping/EKManagedObjectModel.m @@ -31,11 +31,6 @@ - (NSDictionary *)serializedObjectInContext:(NSManagedObjectContext *)context fromContext:context]; } --(NSDictionary *)serializedObject -{ - return [self serializedObjectInContext:nil]; -} - #pragma mark - EKManagedMappingProtocol +(EKManagedObjectMapping *)objectMapping diff --git a/EasyMapping/EKMapper.h b/EasyMapping/EKMapper.h index 5d5257c..789b914 100644 --- a/EasyMapping/EKMapper.h +++ b/EasyMapping/EKMapper.h @@ -23,6 +23,8 @@ #import "EKObjectMapping.h" +NS_ASSUME_NONNULL_BEGIN + /** `EKMapper` provides an interface to create objective-c object from JSON representation, using `EKObjectMapping` class. For creating CoreData objects, use `EKManagedObjectMapper` class. */ @@ -38,7 +40,7 @@ @result mapped object */ -+ (id)objectFromExternalRepresentation:(NSDictionary *)externalRepresentation ++ (nullable id)objectFromExternalRepresentation:(NSDictionary *)externalRepresentation withMapping:(EKObjectMapping *)mapping; /** @@ -65,7 +67,9 @@ @result array of mapped objects */ -+ (NSArray *)arrayOfObjectsFromExternalRepresentation:(NSArray *)externalRepresentation ++ (nullable NSArray *)arrayOfObjectsFromExternalRepresentation:(NSArray *)externalRepresentation withMapping:(EKObjectMapping *)mapping; @end + +NS_ASSUME_NONNULL_END \ No newline at end of file diff --git a/EasyMapping/EKMappingBlocks.h b/EasyMapping/EKMappingBlocks.h index 30c002d..d7fce20 100644 --- a/EasyMapping/EKMappingBlocks.h +++ b/EasyMapping/EKMappingBlocks.h @@ -24,11 +24,13 @@ #import #import -typedef id(^EKMappingValueBlock)(NSString *key, id value); -typedef id(^EKMappingReverseBlock)( id value); +NS_ASSUME_NONNULL_BEGIN -typedef id(^EKManagedMappingValueBlock)(NSString * key, id value, NSManagedObjectContext * context); -typedef id(^EKManagedMappingReverseValueBlock)(id value, NSManagedObjectContext * context); +typedef _Nullable id(^EKMappingValueBlock)(NSString *key, _Nullable id value); +typedef _Nullable id(^EKMappingReverseBlock)(_Nullable id value); + +typedef _Nullable id(^EKManagedMappingValueBlock)(NSString * key, _Nullable id value, NSManagedObjectContext * context); +typedef _Nullable id(^EKManagedMappingReverseValueBlock)(_Nullable id value, NSManagedObjectContext * context); @interface EKMappingBlocks: NSObject @@ -37,3 +39,5 @@ typedef id(^EKManagedMappingReverseValueBlock)(id value, NSManagedObjectContext @end +NS_ASSUME_NONNULL_END + diff --git a/EasyMapping/EKMappingProtocol.h b/EasyMapping/EKMappingProtocol.h index 97423d0..8b17668 100644 --- a/EasyMapping/EKMappingProtocol.h +++ b/EasyMapping/EKMappingProtocol.h @@ -10,6 +10,8 @@ #import "EKObjectMapping.h" #import "EKManagedObjectMapping.h" +NS_ASSUME_NONNULL_BEGIN + /** EKMappingProtocol must be implemented by NSObject subclasses, that will be mapped from JSON representation. @@ -41,3 +43,5 @@ +(EKManagedObjectMapping *)objectMapping; @end + +NS_ASSUME_NONNULL_END \ No newline at end of file diff --git a/EasyMapping/EKObjectMapping.h b/EasyMapping/EKObjectMapping.h index 7237d19..f4f8483 100644 --- a/EasyMapping/EKObjectMapping.h +++ b/EasyMapping/EKObjectMapping.h @@ -25,6 +25,8 @@ @protocol EKMappingProtocol; +NS_ASSUME_NONNULL_BEGIN + /** `EKObjectMapping` class is used to define mappings between JSON representation and objective-c object. */ @@ -229,7 +231,7 @@ - (void) hasOne:(Class)objectClass forDictionaryFromKeyPaths:(NSArray *)keyPaths forProperty:(NSString *)property - withObjectMapping:(EKObjectMapping *)objectMapping; + withObjectMapping:(nullable EKObjectMapping *)objectMapping; /** Map to-one relationship for keyPath. @@ -242,7 +244,7 @@ forDictionaryFromKeyPaths:(NSArray *)keyPaths @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; +- (void)hasOne:(Class)objectClass forKeyPath:(NSString *)keyPath forProperty:(NSString *)property withObjectMapping:(nullable EKObjectMapping*)objectMapping; /** @@ -276,23 +278,8 @@ forDictionaryFromKeyPaths:(NSArray *)keyPaths @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; +-(void)hasMany:(Class)objectClass forKeyPath:(NSString *)keyPath forProperty:(NSString *)property withObjectMapping:(nullable 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 +NS_ASSUME_NONNULL_END diff --git a/EasyMapping/EKObjectMapping.m b/EasyMapping/EKObjectMapping.m index c3d67ba..0cb7d84 100644 --- a/EasyMapping/EKObjectMapping.m +++ b/EasyMapping/EKObjectMapping.m @@ -81,11 +81,6 @@ - (void)mapKeyPath:(NSString *)keyPath toProperty:(NSString *)property [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); diff --git a/EasyMapping/EKObjectModel.h b/EasyMapping/EKObjectModel.h index bb1e042..1482222 100644 --- a/EasyMapping/EKObjectModel.h +++ b/EasyMapping/EKObjectModel.h @@ -9,6 +9,8 @@ #import #import "EKMappingProtocol.h" +NS_ASSUME_NONNULL_BEGIN + /** EKModel is convenience base class, that allows transforming JSON objects to NSObjects and vice versa. */ @@ -41,3 +43,5 @@ - (NSDictionary *)serializedObject; @end + +NS_ASSUME_NONNULL_END \ No newline at end of file diff --git a/EasyMapping/EKPropertyHelper.h b/EasyMapping/EKPropertyHelper.h index 1da6412..a665784 100644 --- a/EasyMapping/EKPropertyHelper.h +++ b/EasyMapping/EKPropertyHelper.h @@ -26,6 +26,8 @@ #import "EKPropertyMapping.h" #import "EKObjectMapping.h" +NS_ASSUME_NONNULL_BEGIN + /** `EKPropertyHelper` is internal EasyMapping class, that works with objective-c runtime to get and set values of properties. */ @@ -33,7 +35,7 @@ + (BOOL)propertyNameIsScalar:(NSString *)propertyName fromObject:(id)object; -+ (id)propertyRepresentation:(NSArray *)array forObject:(id)object withPropertyName:(NSString *)propertyName; ++ (nullable id)propertyRepresentation:(NSArray *)array forObject:(id)object withPropertyName:(NSString *)propertyName; + (void) setProperty:(EKPropertyMapping *)propertyMapping onObject:(id)object @@ -48,19 +50,21 @@ respectPropertyType:(BOOL)respectPropertyType ignoreMissingFields:(BOOL)ignoreMissingFields; -+ (id)getValueOfProperty:(EKPropertyMapping *)propertyMapping - fromRepresentation:(NSDictionary *)representation - ignoreMissingFields:(BOOL)ignoreMissingFields; ++ (nullable id)getValueOfProperty:(EKPropertyMapping *)propertyMapping + fromRepresentation:(NSDictionary *)representation + ignoreMissingFields:(BOOL)ignoreMissingFields; -+ (id)getValueOfManagedProperty:(EKPropertyMapping *)mapping - fromRepresentation:(NSDictionary *)representation - inContext:(NSManagedObjectContext *)context; ++ (nullable id)getValueOfManagedProperty:(EKPropertyMapping *)mapping + fromRepresentation:(NSDictionary *)representation + inContext:(NSManagedObjectContext *)context; -+ (void)setValue:(id)value onObject:(id)object forKeyPath:(NSString *)keyPath; ++ (void)setValue:(nullable 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; ++ (nullable NSDictionary *)extractRootPathFromExternalRepresentation:(NSDictionary *)externalRepresentation + withMapping:(EKObjectMapping *)mapping; @end + +NS_ASSUME_NONNULL_END diff --git a/EasyMapping/EKPropertyMapping.h b/EasyMapping/EKPropertyMapping.h index 79e0a30..cbf65bf 100644 --- a/EasyMapping/EKPropertyMapping.h +++ b/EasyMapping/EKPropertyMapping.h @@ -23,6 +23,8 @@ #import "EKMappingBlocks.h" +NS_ASSUME_NONNULL_BEGIN + /** `EKPropertyMapping` is a class, that represents relation between representation of a single field in JSON and objective-c model property. */ @@ -42,21 +44,23 @@ /** Optional block to transform JSON value into objective-C object. */ -@property (nonatomic, strong) EKMappingValueBlock valueBlock; +@property (nonatomic, strong, nullable) EKMappingValueBlock valueBlock; /** Optional block to serialize objective-c object into JSON representation. */ -@property (nonatomic, strong) EKMappingReverseBlock reverseBlock; +@property (nonatomic, strong, nullable) EKMappingReverseBlock reverseBlock; /** Optional block to transform JSON value into CoreData object. */ -@property (nonatomic, strong) EKManagedMappingValueBlock managedValueBlock; +@property (nonatomic, strong, nullable) EKManagedMappingValueBlock managedValueBlock; /** Optional block to serialize CoreData object into JSON representation. */ -@property (nonatomic, strong) EKManagedMappingReverseValueBlock managedReverseBlock; +@property (nonatomic, strong, nullable) EKManagedMappingReverseValueBlock managedReverseBlock; @end + +NS_ASSUME_NONNULL_END diff --git a/EasyMapping/EKRelationshipMapping.h b/EasyMapping/EKRelationshipMapping.h index 77ec346..f3784a1 100644 --- a/EasyMapping/EKRelationshipMapping.h +++ b/EasyMapping/EKRelationshipMapping.h @@ -9,6 +9,8 @@ #import "EKObjectMapping.h" #import "EKMappingProtocol.h" +NS_ASSUME_NONNULL_BEGIN + @interface EKRelationshipMapping : NSObject @property (nonatomic, strong) Class objectClass; @@ -19,9 +21,10 @@ @property (nonatomic, strong) EKObjectMapping *objectMapping; -@property (nonatomic, strong) NSArray * nonNestedKeyPaths; +@property (nonatomic, strong, nullable) NSArray * nonNestedKeyPaths; -- (NSDictionary *)extractObjectFromRepresentation:(NSDictionary *)representation; +- (nullable NSDictionary *)extractObjectFromRepresentation:(NSDictionary *)representation; @end +NS_ASSUME_NONNULL_END diff --git a/EasyMapping/EKSerializer.h b/EasyMapping/EKSerializer.h index e2b4b4a..d05359c 100644 --- a/EasyMapping/EKSerializer.h +++ b/EasyMapping/EKSerializer.h @@ -24,6 +24,8 @@ #import "EKObjectMapping.h" #import "EKManagedObjectMapping.h" +NS_ASSUME_NONNULL_BEGIN + /** `EKSerializer` is a class, that allows converting objects to their JSON representation, using `EKObjectMapping`. CoreData objects are supported too. */ @@ -81,3 +83,5 @@ withMapping:(EKManagedObjectMapping*)mapping fromContext:(NSManagedObjectContext *)context; @end + +NS_ASSUME_NONNULL_END diff --git a/EasyMapping/NSArray+FlattenArray.h b/EasyMapping/NSArray+FlattenArray.h index f3cf31e..c26af5e 100644 --- a/EasyMapping/NSArray+FlattenArray.h +++ b/EasyMapping/NSArray+FlattenArray.h @@ -23,8 +23,12 @@ @import Foundation; +NS_ASSUME_NONNULL_BEGIN + @interface NSArray (FlattenArray) -(NSArray*)ek_flattenedCompactedArray; @end + +NS_ASSUME_NONNULL_END diff --git a/EasyMapping/NSDateFormatter+EasyMappingAdditions.h b/EasyMapping/NSDateFormatter+EasyMappingAdditions.h index a87085e..c508d9a 100644 --- a/EasyMapping/NSDateFormatter+EasyMappingAdditions.h +++ b/EasyMapping/NSDateFormatter+EasyMappingAdditions.h @@ -25,6 +25,8 @@ #import +NS_ASSUME_NONNULL_BEGIN + 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"; @@ -39,7 +41,11 @@ static NSString * const EKISO_8601DateTimeFormat = @"yyyy-MM-dd"; /** NSDateFormatter instance for current NSThread. It is lazily constructed, default date format - ISO 8601. + + Thos property is deprecated and stated to be removed in release for Xcode 8, which drops support for iOS 7 and lower. */ -+ (NSDateFormatter *)ek_formatterForCurrentThread; ++ (NSDateFormatter *)ek_formatterForCurrentThread DEPRECATED_ATTRIBUTE; @end + +NS_ASSUME_NONNULL_END \ No newline at end of file diff --git a/EasyMappingExample/EasyMappingExample.xcdatamodeld/EasyMappingExample.xcdatamodel/contents b/EasyMappingExample/EasyMappingExample.xcdatamodeld/EasyMappingExample.xcdatamodel/contents index 80f1dc7..1b0bfd6 100644 --- a/EasyMappingExample/EasyMappingExample.xcdatamodeld/EasyMappingExample.xcdatamodel/contents +++ b/EasyMappingExample/EasyMappingExample.xcdatamodeld/EasyMappingExample.xcdatamodel/contents @@ -1,5 +1,5 @@ - + @@ -13,7 +13,8 @@ - + + @@ -26,7 +27,7 @@ - + \ No newline at end of file diff --git a/EasyMappingExample/EasyMappingExample.xcodeproj/project.pbxproj b/EasyMappingExample/EasyMappingExample.xcodeproj/project.pbxproj index be03a52..06f3b80 100644 --- a/EasyMappingExample/EasyMappingExample.xcodeproj/project.pbxproj +++ b/EasyMappingExample/EasyMappingExample.xcodeproj/project.pbxproj @@ -1884,6 +1884,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 1D580CD9DCC1824E038EDBF1 /* Pods-iOS Tests.debug.xcconfig */; buildSettings = { + APPLICATION_EXTENSION_API_ONLY = NO; CLANG_ENABLE_MODULES = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; @@ -1911,6 +1912,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = F1B88B8C69D280B2CEA4F652 /* Pods-iOS Tests.release.xcconfig */; buildSettings = { + APPLICATION_EXTENSION_API_ONLY = NO; CLANG_ENABLE_MODULES = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; @@ -1935,6 +1937,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = D2BEE03665E7784DF8BD23BB /* Pods-OS X Tests.debug.xcconfig */; buildSettings = { + APPLICATION_EXTENSION_API_ONLY = NO; CLANG_ENABLE_MODULES = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; @@ -1963,6 +1966,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = D73E33BB1815569AB283049C /* Pods-OS X Tests.release.xcconfig */; buildSettings = { + APPLICATION_EXTENSION_API_ONLY = NO; CLANG_ENABLE_MODULES = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; @@ -2063,6 +2067,7 @@ 9A2A38191AEA5A170021E97D /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + APPLICATION_EXTENSION_API_ONLY = NO; CLANG_ENABLE_MODULES = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; @@ -2104,6 +2109,7 @@ 9A2A381A1AEA5A170021E97D /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + APPLICATION_EXTENSION_API_ONLY = NO; CLANG_ENABLE_MODULES = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; @@ -2144,6 +2150,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 436C49669F981A3865F82854 /* Pods-iOS Benchmark.debug.xcconfig */; buildSettings = { + APPLICATION_EXTENSION_API_ONLY = NO; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CLANG_ENABLE_MODULES = YES; @@ -2176,6 +2183,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = E74832E10E1D5B2DEAE11469 /* Pods-iOS Benchmark.release.xcconfig */; buildSettings = { + APPLICATION_EXTENSION_API_ONLY = NO; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CLANG_ENABLE_MODULES = YES; @@ -2205,6 +2213,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = CB0DB90EF87B975E080BB5D6 /* Pods-MacOS Benchmark.debug.xcconfig */; buildSettings = { + APPLICATION_EXTENSION_API_ONLY = NO; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -2235,6 +2244,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 00F9F4D2A62A2DF714EA8B83 /* Pods-MacOS Benchmark.release.xcconfig */; buildSettings = { + APPLICATION_EXTENSION_API_ONLY = NO; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -2262,6 +2272,7 @@ C6557E4816D6621E005D2D3E /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_EMPTY_BODY = YES; @@ -2291,6 +2302,7 @@ C6557E4916D6621E005D2D3E /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_EMPTY_BODY = YES; diff --git a/EasyMappingExample/Tests/Specs/EKManagedObjectMappingSpec.m b/EasyMappingExample/Tests/Specs/EKManagedObjectMappingSpec.m index 5d928cf..c5e87dd 100644 --- a/EasyMappingExample/Tests/Specs/EKManagedObjectMappingSpec.m +++ b/EasyMappingExample/Tests/Specs/EKManagedObjectMappingSpec.m @@ -66,10 +66,6 @@ [[mapping should] respondToSelector:@selector(mapKeyPath:toProperty:)]; }); - specify(^{ - [[mapping should] respondToSelector:@selector(mapKeyPath:toProperty:withDateFormat:)]; - }); - specify(^{ [[mapping should] respondToSelector:@selector(mapPropertiesFromArray:)]; }); diff --git a/EasyMappingExample/Tests/Specs/EKObjectMappingSpec.m b/EasyMappingExample/Tests/Specs/EKObjectMappingSpec.m index 247b5b0..0a2b821 100644 --- a/EasyMappingExample/Tests/Specs/EKObjectMappingSpec.m +++ b/EasyMappingExample/Tests/Specs/EKObjectMappingSpec.m @@ -61,10 +61,6 @@ [[mapping should] respondToSelector:@selector(mapKeyPath:toProperty:)]; }); - specify(^{ - [[mapping should] respondToSelector:@selector(mapKeyPath:toProperty:withDateFormat:)]; - }); - specify(^{ [[mapping should] respondToSelector:@selector(mapPropertiesFromArray:)]; }); diff --git a/XCTest+EasyMapping/XCTestCase+EasyMapping.h b/XCTest+EasyMapping/XCTestCase+EasyMapping.h index dcccdd9..4915d16 100644 --- a/XCTest+EasyMapping/XCTestCase+EasyMapping.h +++ b/XCTest+EasyMapping/XCTestCase+EasyMapping.h @@ -10,6 +10,8 @@ @class EKObjectMapping; +NS_ASSUME_NONNULL_BEGIN + @interface XCTestCase (EasyMapping) - (id)testObjectFromExternalRepresentation:(NSDictionary *)externalRepresentation @@ -19,7 +21,7 @@ - (id)testObjectFromExternalRepresentation:(NSDictionary *)externalRepresentation withMapping:(EKObjectMapping *)mapping expectedObject:(id)expectedObject - skippingKeyPaths:(NSArray *)keyPathsToSkip; + skippingKeyPaths:(nullable NSArray *)keyPathsToSkip; - (NSDictionary *)testSerializeObject:(id)object withMapping:(EKObjectMapping *)mapping @@ -28,7 +30,9 @@ - (NSDictionary *)testSerializeObject:(id)object withMapping:(EKObjectMapping *)mapping expectedRepresentation:(NSDictionary *)expectedRepresentation - skippingKeyPaths:(NSArray *)keyPathsToSkip; + skippingKeyPaths:(nullable NSArray *)keyPathsToSkip; @end + +NS_ASSUME_NONNULL_END \ No newline at end of file