From 0f4429c71a7ec8b7140934d02d4e70ed592da1df Mon Sep 17 00:00:00 2001 From: Olivier Halligon Date: Thu, 22 Oct 2015 21:56:00 +0200 Subject: [PATCH] Attempt to fix #127 --- .../OHHTTPStubs.xcodeproj/project.pbxproj | 28 +++++++++++++--- OHHTTPStubs/Sources/OHHTTPStubs.h | 26 ++------------- .../Supporting Files/OHHTTPStubsUmbrella.h | 32 +++++++++++++++++++ OHHTTPStubs/Supporting Files/module.modulemap | 6 ++++ 4 files changed, 63 insertions(+), 29 deletions(-) create mode 100644 OHHTTPStubs/Supporting Files/OHHTTPStubsUmbrella.h create mode 100644 OHHTTPStubs/Supporting Files/module.modulemap diff --git a/OHHTTPStubs/OHHTTPStubs.xcodeproj/project.pbxproj b/OHHTTPStubs/OHHTTPStubs.xcodeproj/project.pbxproj index 7b1a4fa4..d44da33d 100644 --- a/OHHTTPStubs/OHHTTPStubs.xcodeproj/project.pbxproj +++ b/OHHTTPStubs/OHHTTPStubs.xcodeproj/project.pbxproj @@ -16,6 +16,8 @@ 09110A751980606A00D175E4 /* OHHTTPStubsResponse+HTTPMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 09110A711980606A00D175E4 /* OHHTTPStubsResponse+HTTPMessage.m */; }; 09110A761980606A00D175E4 /* OHHTTPStubsResponse+JSON.m in Sources */ = {isa = PBXBuildFile; fileRef = 09110A731980606A00D175E4 /* OHHTTPStubsResponse+JSON.m */; }; 09110A791980608600D175E4 /* OHHTTPStubs+NSURLSessionConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 09110A781980608600D175E4 /* OHHTTPStubs+NSURLSessionConfiguration.m */; }; + 09199FCF1BD974F10014376D /* OHHTTPStubsUmbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 09199FCC1BD973800014376D /* OHHTTPStubsUmbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 09199FD01BD974F20014376D /* OHHTTPStubsUmbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 09199FCC1BD973800014376D /* OHHTTPStubsUmbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 093442E21B80EC4A00A91535 /* TimingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0959814D1980668E00807DBE /* TimingTests.m */; }; 093442E31B80EC4A00A91535 /* OHPathHelpersTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 221C34A41B0CCF0600FCA8FF /* OHPathHelpersTests.m */; }; 093442E41B80EC4A00A91535 /* NSURLConnectionDelegateTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0959814A1980668E00807DBE /* NSURLConnectionDelegateTests.m */; }; @@ -42,8 +44,8 @@ 094906DD1B7F60D100B047DA /* OHPathHelpers.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 095B1AD31AE30BA7009D1B56 /* OHPathHelpers.h */; }; 094906DE1B7F60E200B047DA /* OHHTTPStubs+Mocktail.h in Headers */ = {isa = PBXBuildFile; fileRef = 1D6DB84E1B763B7A00FCF855 /* OHHTTPStubs+Mocktail.h */; settings = {ATTRIBUTES = (Public, ); }; }; 094906DF1B7F60EE00B047DA /* OHHTTPStubs+Mocktail.h in Headers */ = {isa = PBXBuildFile; fileRef = 1D6DB84E1B763B7A00FCF855 /* OHHTTPStubs+Mocktail.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 095925D41BAEBEAA00DD7F0B /* OHHTTPStubsSwift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0955699A1B90E4EA00503ADC /* OHHTTPStubsSwift.swift */; settings = {ASSET_TAGS = (); }; }; - 095925D61BAEC00200DD7F0B /* SwiftHelpersTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 095925D51BAEC00200DD7F0B /* SwiftHelpersTests.swift */; settings = {ASSET_TAGS = (); }; }; + 095925D41BAEBEAA00DD7F0B /* OHHTTPStubsSwift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0955699A1B90E4EA00503ADC /* OHHTTPStubsSwift.swift */; }; + 095925D61BAEC00200DD7F0B /* SwiftHelpersTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 095925D51BAEC00200DD7F0B /* SwiftHelpersTests.swift */; }; 095981881980682800807DBE /* AFNetworkingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 095981481980668E00807DBE /* AFNetworkingTests.m */; }; 095981891980682E00807DBE /* NilValuesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 095981491980668E00807DBE /* NilValuesTests.m */; }; 0959818A1980682E00807DBE /* NSURLConnectionDelegateTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0959814A1980668E00807DBE /* NSURLConnectionDelegateTests.m */; }; @@ -161,6 +163,8 @@ 09110A721980606A00D175E4 /* OHHTTPStubsResponse+JSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "OHHTTPStubsResponse+JSON.h"; sourceTree = ""; }; 09110A731980606A00D175E4 /* OHHTTPStubsResponse+JSON.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "OHHTTPStubsResponse+JSON.m"; sourceTree = ""; }; 09110A781980608600D175E4 /* OHHTTPStubs+NSURLSessionConfiguration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "OHHTTPStubs+NSURLSessionConfiguration.m"; sourceTree = ""; }; + 09199FCC1BD973800014376D /* OHHTTPStubsUmbrella.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OHHTTPStubsUmbrella.h; sourceTree = ""; }; + 09199FCE1BD974E80014376D /* module.modulemap */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.module-map"; path = module.modulemap; sourceTree = ""; }; 093442DC1B80EC3B00A91535 /* OHHTTPStubs iOS-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "OHHTTPStubs iOS-Info.plist"; sourceTree = ""; }; 093442F91B80EC4A00A91535 /* OHHTTPStubs iOS Fmk Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "OHHTTPStubs iOS Fmk Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 0955699A1B90E4EA00503ADC /* OHHTTPStubsSwift.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OHHTTPStubsSwift.swift; sourceTree = ""; }; @@ -305,11 +309,10 @@ isa = PBXGroup; children = ( 09D0D2981B67FED3004E7213 /* Compatibility.h */, - 09110A6A1980605A00D175E4 /* OHHTTPStubs.h */, - 09110A6B1980605A00D175E4 /* OHHTTPStubs.m */, - 1D6DB84D1B763B7A00FCF855 /* Mocktail */, + 09199FCD1BD9744C0014376D /* OHHTTPStubs */, 09110A6D1980605D00D175E4 /* OHHTTPStubsResponse */, 09110A771980607200D175E4 /* NSURLSession Support */, + 1D6DB84D1B763B7A00FCF855 /* Mocktail */, 093443011B80F88700A91535 /* OHPathHelpers */, 095569991B90E4EA00503ADC /* Swift */, ); @@ -356,6 +359,15 @@ path = NSURLSession; sourceTree = ""; }; + 09199FCD1BD9744C0014376D /* OHHTTPStubs */ = { + isa = PBXGroup; + children = ( + 09110A6A1980605A00D175E4 /* OHHTTPStubs.h */, + 09110A6B1980605A00D175E4 /* OHHTTPStubs.m */, + ); + name = OHHTTPStubs; + sourceTree = ""; + }; 093442FE1B80F84800A91535 /* HTTPMessage */ = { isa = PBXGroup; children = ( @@ -421,6 +433,8 @@ 095981C519806A7900807DBE /* Supporting Files */ = { isa = PBXGroup; children = ( + 09199FCC1BD973800014376D /* OHHTTPStubsUmbrella.h */, + 09199FCE1BD974E80014376D /* module.modulemap */, 093442DC1B80EC3B00A91535 /* OHHTTPStubs iOS-Info.plist */, 095981C619806A7900807DBE /* OHHTTPStubs Mac-Info.plist */, ); @@ -474,6 +488,7 @@ 0959820119806B1E00807DBE /* OHHTTPStubsResponse+HTTPMessage.h in Headers */, 094906DF1B7F60EE00B047DA /* OHHTTPStubs+Mocktail.h in Headers */, 095B1AD71AE3138C009D1B56 /* OHPathHelpers.h in Headers */, + 09199FD01BD974F20014376D /* OHHTTPStubsUmbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -488,6 +503,7 @@ 725CD9BC1A9EB71D00F84C8B /* OHHTTPStubsResponse+HTTPMessage.h in Headers */, 094906DE1B7F60E200B047DA /* OHHTTPStubs+Mocktail.h in Headers */, 095B1AD61AE3138C009D1B56 /* OHPathHelpers.h in Headers */, + 09199FCF1BD974F10014376D /* OHHTTPStubsUmbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -941,6 +957,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 5.0; + MODULEMAP_FILE = "$(SRCROOT)/Supporting Files/module.modulemap"; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; }; @@ -976,6 +993,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 5.0; + MODULEMAP_FILE = "$(SRCROOT)/Supporting Files/module.modulemap"; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; }; diff --git a/OHHTTPStubs/Sources/OHHTTPStubs.h b/OHHTTPStubs/Sources/OHHTTPStubs.h index 6c684caa..8c027b04 100644 --- a/OHHTTPStubs/Sources/OHHTTPStubs.h +++ b/OHHTTPStubs/Sources/OHHTTPStubs.h @@ -28,9 +28,8 @@ #import -#import -#import - +#import "Compatibility.h" +#import "OHHTTPStubsResponse.h" NS_ASSUME_NONNULL_BEGIN @@ -176,24 +175,3 @@ typedef OHHTTPStubsResponse* __nonnull (^OHHTTPStubsResponseBlock)( NSURLRequest NS_ASSUME_NONNULL_END - -//////////////////////////////////////////////////////////////////////////////// -#pragma mark - Umbrella Header Imports - - -#if ! __has_include() - // 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() - #import - #endif - #if __has_include() - #import - #endif - #if __has_include() - #import - #endif - #if __has_include("OHHTTPStubs/OHPathHelpers.h") - #import "OHHTTPStubs/OHPathHelpers.h" - #endif -#endif diff --git a/OHHTTPStubs/Supporting Files/OHHTTPStubsUmbrella.h b/OHHTTPStubs/Supporting Files/OHHTTPStubsUmbrella.h new file mode 100644 index 00000000..d32a08fe --- /dev/null +++ b/OHHTTPStubs/Supporting Files/OHHTTPStubsUmbrella.h @@ -0,0 +1,32 @@ +/*********************************************************************************** + * + * Copyright (c) 2012 Olivier Halligon + * + * 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 "OHHTTPStubs.h" +#import "OHHTTPStubsResponse.h" + +#import "OHHTTPStubsResponse+JSON.h" +#import +#import +#import + diff --git a/OHHTTPStubs/Supporting Files/module.modulemap b/OHHTTPStubs/Supporting Files/module.modulemap new file mode 100644 index 00000000..50d9508b --- /dev/null +++ b/OHHTTPStubs/Supporting Files/module.modulemap @@ -0,0 +1,6 @@ +framework module OHHTTPStubs { + umbrella header "OHHTTPStubsUmbrella.h" + + export * + module * { export * } +}