summaryrefslogtreecommitdiff
path: root/test/ios/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubs.h
diff options
context:
space:
mode:
Diffstat (limited to 'test/ios/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubs.h')
-rw-r--r--test/ios/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubs.h56
1 files changed, 30 insertions, 26 deletions
diff --git a/test/ios/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubs.h b/test/ios/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubs.h
index d4b85dc167..6c684caacb 100644
--- a/test/ios/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubs.h
+++ b/test/ios/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubs.h
@@ -22,39 +22,23 @@
*
***********************************************************************************/
-// For SDK 7.1 Compatibility (as this macro was only included starting SDK 8.0)
-#ifndef NS_DESIGNATED_INITIALIZER
- #if __has_attribute(objc_designated_initializer)
- #define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
- #else
- #define NS_DESIGNATED_INITIALIZER
- #endif
-#endif
////////////////////////////////////////////////////////////////////////////////
#pragma mark - Imports
#import <Foundation/Foundation.h>
-#import "OHHTTPStubsResponse.h"
-// Because this is supposed to be an umbrella header, we should import every public headers here
-#import "OHHTTPStubsResponse+HTTPMessage.h"
-#import "OHHTTPStubsResponse+JSON.h"
-#import "OHPathHelpers.h"
-
-#ifdef NS_ASSUME_NONNULL_BEGIN
- NS_ASSUME_NONNULL_BEGIN
- #define _nullable_ __nullable
- #define _nonnull_ __nonnull
-#else
- #define _nullable_
- #define _nonnull_
-#endif
+
+#import <OHHTTPStubs/Compatibility.h>
+#import <OHHTTPStubs/OHHTTPStubsResponse.h>
+
+
+NS_ASSUME_NONNULL_BEGIN
////////////////////////////////////////////////////////////////////////////////
#pragma mark - Types
typedef BOOL(^OHHTTPStubsTestBlock)(NSURLRequest* request);
-typedef OHHTTPStubsResponse* _nonnull_ (^OHHTTPStubsResponseBlock)( NSURLRequest* request);
+typedef OHHTTPStubsResponse* __nonnull (^OHHTTPStubsResponseBlock)( NSURLRequest* request);
/**
* This opaque type represents an installed stub and is used to uniquely
@@ -74,7 +58,7 @@ typedef OHHTTPStubsResponse* _nonnull_ (^OHHTTPStubsResponseBlock)( NSURLRequest
* This is especially useful if you dump all installed stubs using `allStubs`
* or if you want to log which stubs are being triggered using `onStubActivation:`.
*/
-@property(nonatomic, strong) NSString* _nullable_ name;
+@property(nonatomic, strong, nullable) NSString* name;
@end
////////////////////////////////////////////////////////////////////////////////
@@ -190,6 +174,26 @@ typedef OHHTTPStubsResponse* _nonnull_ (^OHHTTPStubsResponseBlock)( NSURLRequest
@end
-#ifdef NS_ASSUME_NONNULL_END
- NS_ASSUME_NONNULL_END
+NS_ASSUME_NONNULL_END
+
+
+////////////////////////////////////////////////////////////////////////////////
+#pragma mark - Umbrella Header Imports
+
+
+#if ! __has_include(<OHHTTPStubs/OHHTTPStubs-umbrella.h>)
+ // Because this is supposed to be an umbrella header, we should also import every public headers here
+ // (Except if we use already have a better umbrella header generated by CocoaPods)
+ #if __has_include(<OHHTTPStubs/OHHTTPStubsResponse+JSON.h>)
+ #import <OHHTTPStubs/OHHTTPStubsResponse+JSON.h>
+ #endif
+ #if __has_include(<OHHTTPStubs/OHHTTPStubsResponse+HTTPMessage.h>)
+ #import <OHHTTPStubs/OHHTTPStubsResponse+HTTPMessage.h>
+ #endif
+ #if __has_include(<OHHTTPStubs/OHHTTPStubs+Mocktail.h>)
+ #import <OHHTTPStubs/OHHTTPStubs+Mocktail.h>
+ #endif
+ #if __has_include("OHHTTPStubs/OHPathHelpers.h")
+ #import "OHHTTPStubs/OHPathHelpers.h"
+ #endif
#endif