diff --git a/EasyMapping/EKCoreDataImporter.h b/EasyMapping/EKCoreDataImporter.h index eb3b922..89ad66b 100644 --- a/EasyMapping/EKCoreDataImporter.h +++ b/EasyMapping/EKCoreDataImporter.h @@ -24,6 +24,13 @@ #import #import "EKManagedObjectMapping.h" +#if __has_feature(nullability) // Xcode 6.3+ +#pragma clang assume_nonnull begin +#else +#define nullable +#define __nullable +#endif + /** `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 +82,13 @@ @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 + +#if __has_feature(nullability) +#pragma clang assume_nonnull end +#endif + diff --git a/EasyMapping/EKManagedObjectMapper.h b/EasyMapping/EKManagedObjectMapper.h index 5bbda62..c1d6445 100644 --- a/EasyMapping/EKManagedObjectMapper.h +++ b/EasyMapping/EKManagedObjectMapper.h @@ -24,6 +24,13 @@ #import #import "EKManagedObjectMapping.h" +#if __has_feature(nullability) // Xcode 6.3+ +#pragma clang assume_nonnull begin +#else +#define nullable +#define __nullable +#endif + /** `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. */ @@ -99,3 +106,8 @@ inManagedObjectContext:(NSManagedObjectContext *)context; @end + +#if __has_feature(nullability) +#pragma clang assume_nonnull end +#endif + diff --git a/EasyMapping/EKManagedObjectMapping.h b/EasyMapping/EKManagedObjectMapping.h index dba4089..a399793 100644 --- a/EasyMapping/EKManagedObjectMapping.h +++ b/EasyMapping/EKManagedObjectMapping.h @@ -24,6 +24,13 @@ #import "EKObjectMapping.h" #import "EKPropertyMapping.h" +#if __has_feature(nullability) // Xcode 6.3+ +#pragma clang assume_nonnull begin +#else +#define nullable +#define __nullable +#endif + #define EKDesignatedInitializer(__SEL__) __attribute__((unavailable("Invoke the designated initializer `" # __SEL__ "` instead."))) /** @@ -125,3 +132,7 @@ + (instancetype)mappingForClass:(Class)objectClass withRootPath:(NSString *)rootPath withBlock:(void (^)(EKObjectMapping *mapping))mappingBlock EKDesignatedInitializer(mappingForEntityName:withRootPath:withBlock); @end + +#if __has_feature(nullability) +#pragma clang assume_nonnull end +#endif diff --git a/EasyMapping/EKManagedObjectModel.h b/EasyMapping/EKManagedObjectModel.h index c94c7e8..a03a4a7 100644 --- a/EasyMapping/EKManagedObjectModel.h +++ b/EasyMapping/EKManagedObjectModel.h @@ -9,6 +9,13 @@ #import #import "EKMappingProtocol.h" +#if __has_feature(nullability) // Xcode 6.3+ +#pragma clang assume_nonnull begin +#else +#define nullable +#define __nullable +#endif + /** EKManagedObjectModel is a convenience base class for NSManagedObject subclasses. It allows creating CoreData objects from JSON representation and vice versa. */ @@ -35,7 +42,7 @@ @return NSDictionary representation of current object. */ -- (NSDictionary *)serializedObjectInContext:(NSManagedObjectContext *)context; +- (NSDictionary *)serializedObjectInContext:(nullable NSManagedObjectContext *)context; @end @@ -44,3 +51,8 @@ - (NSDictionary *)serializedObject __deprecated_msg("Use serializedObjectInContext instead"); @end + + +#if __has_feature(nullability) +#pragma clang assume_nonnull end +#endif diff --git a/EasyMapping/EKMapper.h b/EasyMapping/EKMapper.h index 5d5257c..0b1051c 100644 --- a/EasyMapping/EKMapper.h +++ b/EasyMapping/EKMapper.h @@ -23,6 +23,14 @@ #import "EKObjectMapping.h" + +#if __has_feature(nullability) // Xcode 6.3+ +#pragma clang assume_nonnull begin +#else +#define nullable +#define __nullable +#endif + /** `EKMapper` provides an interface to create objective-c object from JSON representation, using `EKObjectMapping` class. For creating CoreData objects, use `EKManagedObjectMapper` class. */ @@ -38,8 +46,8 @@ @result mapped object */ -+ (id)objectFromExternalRepresentation:(NSDictionary *)externalRepresentation - withMapping:(EKObjectMapping *)mapping; ++ (nullable 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. @@ -65,7 +73,11 @@ @result array of mapped objects */ -+ (NSArray *)arrayOfObjectsFromExternalRepresentation:(NSArray *)externalRepresentation - withMapping:(EKObjectMapping *)mapping; ++ (nullable NSArray *)arrayOfObjectsFromExternalRepresentation:(NSArray *)externalRepresentation + withMapping:(EKObjectMapping *)mapping; @end + +#if __has_feature(nullability) +#pragma clang assume_nonnull end +#endif diff --git a/EasyMapping/EKMappingBlocks.h b/EasyMapping/EKMappingBlocks.h index 00c118d..03c17ed 100644 --- a/EasyMapping/EKMappingBlocks.h +++ b/EasyMapping/EKMappingBlocks.h @@ -24,15 +24,27 @@ #import #import -typedef id(^EKMappingValueBlock)(NSString *key, id value); -typedef id(^EKMappingReverseBlock)(id value); +#if __has_feature(nullability) // Xcode 6.3+ +#pragma clang assume_nonnull begin +#else +#define nullable +#define __nullable +#endif -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 + (EKMappingValueBlock)urlMappingBlock; + (EKMappingReverseBlock)urlReverseMappingBlock; -@end \ No newline at end of file +@end + +#if __has_feature(nullability) +#pragma clang assume_nonnull end +#endif + diff --git a/EasyMapping/EKMappingProtocol.h b/EasyMapping/EKMappingProtocol.h index 97423d0..7e3214a 100644 --- a/EasyMapping/EKMappingProtocol.h +++ b/EasyMapping/EKMappingProtocol.h @@ -10,6 +10,13 @@ #import "EKObjectMapping.h" #import "EKManagedObjectMapping.h" +#if __has_feature(nullability) // Xcode 6.3+ +#pragma clang assume_nonnull begin +#else +#define nullable +#define __nullable +#endif + /** EKMappingProtocol must be implemented by NSObject subclasses, that will be mapped from JSON representation. @@ -41,3 +48,8 @@ +(EKManagedObjectMapping *)objectMapping; @end + +#if __has_feature(nullability) +#pragma clang assume_nonnull end +#endif + diff --git a/EasyMapping/EKObjectMapping.h b/EasyMapping/EKObjectMapping.h index 2d33326..d78304d 100644 --- a/EasyMapping/EKObjectMapping.h +++ b/EasyMapping/EKObjectMapping.h @@ -25,6 +25,14 @@ @protocol EKMappingProtocol; + +#if __has_feature(nullability) // Xcode 6.3+ +#pragma clang assume_nonnull begin +#else +#define nullable +#define __nullable +#endif + /** `EKObjectMapping` class is used to define mappings between JSON representation and objective-c object. */ @@ -217,7 +225,7 @@ - (void) hasOne:(Class)objectClass forDictionaryFromKeyPaths:(NSArray *)keyPaths forProperty:(NSString *)property - withObjectMapping:(EKObjectMapping *)objectMapping; + withObjectMapping:(nullable EKObjectMapping *)objectMapping; /** Map to-one relationship for keyPath. @@ -230,7 +238,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; /** @@ -264,7 +272,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)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 @@ -284,3 +292,8 @@ forDictionaryFromKeyPaths:(NSArray *)keyPaths - (void)mapKeyPath:(NSString *)keyPath toProperty:(NSString *)property withDateFormat:(NSString *)dateFormat __deprecated; @end + +#if __has_feature(nullability) +#pragma clang assume_nonnull end +#endif + diff --git a/EasyMapping/EKObjectModel.h b/EasyMapping/EKObjectModel.h index bb1e042..8cfcc17 100644 --- a/EasyMapping/EKObjectModel.h +++ b/EasyMapping/EKObjectModel.h @@ -9,6 +9,14 @@ #import #import "EKMappingProtocol.h" + +#if __has_feature(nullability) // Xcode 6.3+ +#pragma clang assume_nonnull begin +#else +#define nullable +#define __nullable +#endif + /** EKModel is convenience base class, that allows transforming JSON objects to NSObjects and vice versa. */ @@ -41,3 +49,8 @@ - (NSDictionary *)serializedObject; @end + +#if __has_feature(nullability) +#pragma clang assume_nonnull end +#endif + diff --git a/EasyMapping/EKPropertyHelper.h b/EasyMapping/EKPropertyHelper.h index 8c10974..50b3bbe 100644 --- a/EasyMapping/EKPropertyHelper.h +++ b/EasyMapping/EKPropertyHelper.h @@ -26,6 +26,13 @@ #import "EKPropertyMapping.h" #import "EKObjectMapping.h" +#if __has_feature(nullability) // Xcode 6.3+ +#pragma clang assume_nonnull begin +#else +#define nullable +#define __nullable +#endif + /** `EKPropertyHelper` is internal EasyMapping class, that works with objective-c runtime to get and set values of properties. */ @@ -33,25 +40,25 @@ + (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 -fromRepresentation:(NSDictionary *)representation; + onObject:(id)object + fromRepresentation:(NSDictionary *)representation; + (void) setProperty:(EKPropertyMapping *)propertyMapping onObject:(id)object fromRepresentation:(NSDictionary *)representation inContext:(NSManagedObjectContext *)context; -+ (id)getValueOfProperty:(EKPropertyMapping *)propertyMapping - fromRepresentation:(NSDictionary *)representation; ++ (nullable 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)setValue:(nullable id)value onObject:(id)object forKeyPath:(NSString *)keyPath; + (void)addValue:(id)value onObject:(id)object forKeyPath:(NSString *)keyPath; @@ -59,3 +66,7 @@ fromRepresentation:(NSDictionary *)representation; withMapping:(EKObjectMapping *)mapping; @end + +#if __has_feature(nullability) +#pragma clang assume_nonnull end +#endif diff --git a/EasyMapping/EKPropertyMapping.h b/EasyMapping/EKPropertyMapping.h index 79e0a30..ddf468f 100644 --- a/EasyMapping/EKPropertyMapping.h +++ b/EasyMapping/EKPropertyMapping.h @@ -23,6 +23,13 @@ #import "EKMappingBlocks.h" +#if __has_feature(nullability) // Xcode 6.3+ +#pragma clang assume_nonnull begin +#else +#define nullable +#define __nullable +#endif + /** `EKPropertyMapping` is a class, that represents relation between representation of a single field in JSON and objective-c model property. */ @@ -42,21 +49,25 @@ /** 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 + +#if __has_feature(nullability) +#pragma clang assume_nonnull end +#endif diff --git a/EasyMapping/EKRelationshipMapping.h b/EasyMapping/EKRelationshipMapping.h index 9d47e84..501e25f 100644 --- a/EasyMapping/EKRelationshipMapping.h +++ b/EasyMapping/EKRelationshipMapping.h @@ -9,6 +9,13 @@ #import "EKObjectMapping.h" #import "EKMappingProtocol.h" +#if __has_feature(nullability) // Xcode 6.3+ +#pragma clang assume_nonnull begin +#else +#define nullable +#define __nullable +#endif + @interface EKRelationshipMapping : NSObject @property (nonatomic, strong) Class objectClass; @@ -19,8 +26,13 @@ @property (nonatomic, strong) EKObjectMapping *objectMapping; -@property (nonatomic, strong) NSArray * nonNestedKeyPaths; +@property (nonatomic, strong, nullable) NSArray * nonNestedKeyPaths; - (NSDictionary *)extractObjectFromRepresentation:(NSDictionary *)representation; @end + +#if __has_feature(nullability) +#pragma clang assume_nonnull end +#endif + diff --git a/EasyMapping/EKSerializer.h b/EasyMapping/EKSerializer.h index 3be6147..a56b4a9 100644 --- a/EasyMapping/EKSerializer.h +++ b/EasyMapping/EKSerializer.h @@ -25,6 +25,13 @@ #import "EKSerializer.h" #import "EKManagedObjectMapping.h" +#if __has_feature(nullability) // Xcode 6.3+ +#pragma clang assume_nonnull begin +#else +#define nullable +#define __nullable +#endif + /** `EKSerializer` is a class, that allows converting objects to their JSON representation, using `EKObjectMapping`. CoreData objects are supported too. */ @@ -82,3 +89,8 @@ withMapping:(EKManagedObjectMapping*)mapping fromContext:(NSManagedObjectContext *)context; @end + +#if __has_feature(nullability) +#pragma clang assume_nonnull end +#endif + diff --git a/EasyMapping/NSDateFormatter+EasyMappingAdditions.h b/EasyMapping/NSDateFormatter+EasyMappingAdditions.h index a87085e..e56f0d3 100644 --- a/EasyMapping/NSDateFormatter+EasyMappingAdditions.h +++ b/EasyMapping/NSDateFormatter+EasyMappingAdditions.h @@ -25,6 +25,13 @@ #import +#if __has_feature(nullability) // Xcode 6.3+ +#pragma clang assume_nonnull begin +#else +#define nullable +#define __nullable +#endif + 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"; @@ -43,3 +50,8 @@ static NSString * const EKISO_8601DateTimeFormat = @"yyyy-MM-dd"; + (NSDateFormatter *)ek_formatterForCurrentThread; @end + +#if __has_feature(nullability) +#pragma clang assume_nonnull end +#endif + diff --git a/EasyMappingExample/EasyMappingExample.xcodeproj/xcshareddata/xcschemes/MacOS Benchmark.xcscheme b/EasyMappingExample/EasyMappingExample.xcodeproj/xcshareddata/xcschemes/MacOS Benchmark.xcscheme index ae07452..7771e33 100644 --- a/EasyMappingExample/EasyMappingExample.xcodeproj/xcshareddata/xcschemes/MacOS Benchmark.xcscheme +++ b/EasyMappingExample/EasyMappingExample.xcodeproj/xcshareddata/xcschemes/MacOS Benchmark.xcscheme @@ -1,10 +1,17 @@ - + + buildForTesting = "YES" + buildForRunning = "YES" + buildForProfiling = "YES" + buildForArchiving = "YES" + buildForAnalyzing = "YES"> + + + + - + buildConfiguration = "Debug" + ignoresPersistentStateOnLaunch = "NO" + debugDocumentVersioning = "YES" + allowLocationSimulation = "YES"> + + + + + + + + + diff --git a/EasyMappingExample/EasyMappingExample.xcodeproj/xcshareddata/xcschemes/OS X Tests.xcscheme b/EasyMappingExample/EasyMappingExample.xcodeproj/xcshareddata/xcschemes/OS X Tests.xcscheme index 0496b00..84f2c9d 100644 --- a/EasyMappingExample/EasyMappingExample.xcodeproj/xcshareddata/xcschemes/OS X Tests.xcscheme +++ b/EasyMappingExample/EasyMappingExample.xcodeproj/xcshareddata/xcschemes/OS X Tests.xcscheme @@ -1,11 +1,17 @@ - + + buildForProfiling = "YES" + buildForArchiving = "YES" + buildForAnalyzing = "YES"> - + + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + launchStyle = "0" + useCustomWorkingDirectory = "NO" + buildConfiguration = "Debug" + ignoresPersistentStateOnLaunch = "NO" + debugDocumentVersioning = "YES" + allowLocationSimulation = "YES"> + + + + + + + + + + + + diff --git a/EasyMappingExample/EasyMappingExample.xcodeproj/xcshareddata/xcschemes/iOS Benchmark.xcscheme b/EasyMappingExample/EasyMappingExample.xcodeproj/xcshareddata/xcschemes/iOS Benchmark.xcscheme index c4ff846..0c59361 100644 --- a/EasyMappingExample/EasyMappingExample.xcodeproj/xcshareddata/xcschemes/iOS Benchmark.xcscheme +++ b/EasyMappingExample/EasyMappingExample.xcodeproj/xcshareddata/xcschemes/iOS Benchmark.xcscheme @@ -1,10 +1,17 @@ - + + buildForTesting = "YES" + buildForRunning = "YES" + buildForProfiling = "YES" + buildForArchiving = "YES" + buildForAnalyzing = "YES"> + + + + - + buildConfiguration = "Debug" + ignoresPersistentStateOnLaunch = "NO" + debugDocumentVersioning = "YES" + allowLocationSimulation = "YES"> + + + + + + + + + diff --git a/EasyMappingExample/EasyMappingExample.xcodeproj/xcshareddata/xcschemes/iOS Tests.xcscheme b/EasyMappingExample/EasyMappingExample.xcodeproj/xcshareddata/xcschemes/iOS Tests.xcscheme index 129f528..d65633a 100644 --- a/EasyMappingExample/EasyMappingExample.xcodeproj/xcshareddata/xcschemes/iOS Tests.xcscheme +++ b/EasyMappingExample/EasyMappingExample.xcodeproj/xcshareddata/xcschemes/iOS Tests.xcscheme @@ -1,11 +1,17 @@ - + + buildForProfiling = "YES" + buildForArchiving = "YES" + buildForAnalyzing = "YES"> - + + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + launchStyle = "0" + useCustomWorkingDirectory = "NO" + buildConfiguration = "Debug" + ignoresPersistentStateOnLaunch = "NO" + debugDocumentVersioning = "YES" + allowLocationSimulation = "YES"> + + + + + + + + + + + + diff --git a/EasyMappingExample/Tests/Specs/EKCoreDataImporterSpec.m b/EasyMappingExample/Tests/Specs/EKCoreDataImporterSpec.m index e77a081..1b93399 100644 --- a/EasyMappingExample/Tests/Specs/EKCoreDataImporterSpec.m +++ b/EasyMappingExample/Tests/Specs/EKCoreDataImporterSpec.m @@ -31,6 +31,10 @@ @interface EKCoreDataImporter() SPEC_BEGIN(EKCoreDataImporterSpec) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wnonnull" +// Silencing null warnings for EKCoreDataImporter on purpose - these will be nil only in this test suite + describe(@"Entity names collector", ^{ afterAll(^{ @@ -172,5 +176,6 @@ @interface EKCoreDataImporter() }); }); +#pragma GCC diagnostic pop SPEC_END \ No newline at end of file diff --git a/XCTest+EasyMapping/XCTestCase+EasyMapping.h b/XCTest+EasyMapping/XCTestCase+EasyMapping.h index 69fab9b..dc3679f 100644 --- a/XCTest+EasyMapping/XCTestCase+EasyMapping.h +++ b/XCTest+EasyMapping/XCTestCase+EasyMapping.h @@ -10,16 +10,23 @@ @class EKObjectMapping; +#if __has_feature(nullability) // Xcode 6.3+ +#pragma clang assume_nonnull begin +#else +#define nullable +#define __nullable +#endif + @interface XCTestCase (EasyMapping) -- (id)testObjectFromExternalRepresentation:(NSDictionary *)externalRepresentation - withMapping:(EKObjectMapping *)mapping - expectedObject:(id)expectedObject; +- (nullable id)testObjectFromExternalRepresentation:(NSDictionary *)externalRepresentation + withMapping:(EKObjectMapping *)mapping + expectedObject:(id)expectedObject; -- (id)testObjectFromExternalRepresentation:(NSDictionary *)externalRepresentation - withMapping:(EKObjectMapping *)mapping - expectedObject:(id)expectedObject - skippingKeyPaths:(NSArray *)keyPathsToSkip; +- (nullable id)testObjectFromExternalRepresentation:(NSDictionary *)externalRepresentation + withMapping:(EKObjectMapping *)mapping + expectedObject:(id)expectedObject + skippingKeyPaths:(nullable NSArray *)keyPathsToSkip; - (NSDictionary *)testSerializeObject:(id)object withMapping:(EKObjectMapping *)mapping @@ -28,7 +35,12 @@ - (NSDictionary *)testSerializeObject:(id)object withMapping:(EKObjectMapping *)mapping expectedRepresentation:(NSDictionary *)expectedRepresentation - skippingKeyPaths:(NSArray *)keyPathsToSkip; + skippingKeyPaths:(nullable NSArray *)keyPathsToSkip; @end + +#if __has_feature(nullability) +#pragma clang assume_nonnull end +#endif +