diff --git a/modules/swagger-codegen/src/main/resources/objc/Object-header.mustache b/modules/swagger-codegen/src/main/resources/objc/Object-header.mustache index f73d1bab9b0..d96e379908f 100644 --- a/modules/swagger-codegen/src/main/resources/objc/Object-header.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/Object-header.mustache @@ -1,5 +1,5 @@ #import -#import "JSONModel.h" +#import @interface {{classPrefix}}Object : JSONModel @end diff --git a/modules/swagger-codegen/src/main/resources/objc/podspec.mustache b/modules/swagger-codegen/src/main/resources/objc/podspec.mustache index 961e4f36caa..9ce03695bcf 100644 --- a/modules/swagger-codegen/src/main/resources/objc/podspec.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/podspec.mustache @@ -16,13 +16,13 @@ Pod::Spec.new do |s| {{appDescription}} DESC {{/hasMore}}{{/apis}}{{/apiInfo}} - s.license = 'MIT' - s.platform = :ios, '7.0' s.requires_arc = true + s.framework = 'SystemConfiguration' + s.source_files = '{{podName}}/**/*' - s.public_header_files = '{{podVersion}}/**/*.h' + s.public_header_files = '{{podName}}/**/*.h' s.dependency 'AFNetworking', '~> 2.3' s.dependency 'JSONModel', '~> 1.1' diff --git a/samples/client/petstore/objc/SwaggerClient.podspec b/samples/client/petstore/objc/SwaggerClient.podspec index aeeda8fbdfe..d9b02841cf9 100644 --- a/samples/client/petstore/objc/SwaggerClient.podspec +++ b/samples/client/petstore/objc/SwaggerClient.podspec @@ -16,13 +16,13 @@ Pod::Spec.new do |s| This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters DESC - s.license = 'MIT' - s.platform = :ios, '7.0' s.requires_arc = true + s.framework = 'SystemConfiguration' + s.source_files = 'SwaggerClient/**/*' - s.public_header_files = '1.0.0/**/*.h' + s.public_header_files = 'SwaggerClient/**/*.h' s.dependency 'AFNetworking', '~> 2.3' s.dependency 'JSONModel', '~> 1.1' diff --git a/samples/client/petstore/objc/SwaggerClient/SWGApiClient.h b/samples/client/petstore/objc/SwaggerClient/SWGApiClient.h index 5af4f2181e3..56c6adf30f2 100644 --- a/samples/client/petstore/objc/SwaggerClient/SWGApiClient.h +++ b/samples/client/petstore/objc/SwaggerClient/SWGApiClient.h @@ -26,11 +26,6 @@ extern NSString *const SWGResponseObjectErrorKey; @property(nonatomic, assign) NSURLRequestCachePolicy cachePolicy; @property(nonatomic, assign) NSTimeInterval timeoutInterval; -@property(nonatomic, assign) BOOL logRequests; -@property(nonatomic, assign) BOOL logCacheHits; -@property(nonatomic, assign) BOOL logServerResponses; -@property(nonatomic, assign) BOOL logJSON; -@property(nonatomic, assign) BOOL logHTTP; @property(nonatomic, readonly) NSOperationQueue* queue; /** @@ -49,13 +44,6 @@ extern NSString *const SWGResponseObjectErrorKey; */ +(NSOperationQueue*) sharedQueue; -/** - * Turn on logging - * - * @param state logging state, must be `YES` or `NO` - */ -+(void)setLoggingEnabled:(bool) state; - /** * Clear Cache */ @@ -179,6 +167,17 @@ extern NSString *const SWGResponseObjectErrorKey; */ - (id) deserialize:(id) data class:(NSString *) class; +/** + * Logging request and response + * + * @param operation AFHTTPRequestOperation for the HTTP request. + * @param request The HTTP request. + * @param error The error of the HTTP request. + */ +- (void)logResponse:(AFHTTPRequestOperation *)operation + forRequest:(NSURLRequest *)request + error:(NSError *)error; + /** * Perform request * diff --git a/samples/client/petstore/objc/SwaggerClient/SWGApiClient.m b/samples/client/petstore/objc/SwaggerClient/SWGApiClient.m index 3f35c52d849..f51a012a811 100644 --- a/samples/client/petstore/objc/SwaggerClient/SWGApiClient.m +++ b/samples/client/petstore/objc/SwaggerClient/SWGApiClient.m @@ -11,31 +11,38 @@ static bool cacheEnabled = false; static AFNetworkReachabilityStatus reachabilityStatus = AFNetworkReachabilityStatusNotReachable; static NSOperationQueue* sharedQueue; static void (^reachabilityChangeBlock)(int); -static bool loggingEnabled = true; #pragma mark - Log Methods -+(void)setLoggingEnabled:(bool) state { - loggingEnabled = state; +- (void)logResponse:(AFHTTPRequestOperation *)operation + forRequest:(NSURLRequest *)request + error:(NSError*)error { + SWGConfiguration *config = [SWGConfiguration sharedConfig]; + + NSString *message = [NSString stringWithFormat:@"\n[DEBUG] Request body \n~BEGIN~\n %@\n~END~\n"\ + "[DEBUG] HTTP Response body \n~BEGIN~\n %@\n~END~\n", + [[NSString alloc] initWithData:request.HTTPBody encoding:NSUTF8StringEncoding], + operation.responseString]; + + if (config.loggingFileHanlder) { + [config.loggingFileHanlder seekToEndOfFile]; + [config.loggingFileHanlder writeData:[message dataUsingEncoding:NSUTF8StringEncoding]]; + } + + NSLog(@"%@", message); } -- (void)logRequest:(NSURLRequest*)request { - NSLog(@"request: %@", [self descriptionForRequest:request]); -} +#pragma mark - Cache Methods -- (void)logResponse:(id)data forRequest:(NSURLRequest*)request error:(NSError*)error { - NSLog(@"request: %@ response: %@ ", [self descriptionForRequest:request], data ); ++ (void) setCacheEnabled:(BOOL)enabled { + cacheEnabled = enabled; } -#pragma mark - - +(void)clearCache { [[NSURLCache sharedURLCache] removeAllCachedResponses]; } -+(void)setCacheEnabled:(BOOL)enabled { - cacheEnabled = enabled; -} +#pragma mark - +(void)configureCacheWithMemoryAndDiskCapacity: (unsigned long) memorySize diskSize: (unsigned long) diskSize { @@ -80,10 +87,10 @@ static bool loggingEnabled = true; if (client == nil) { client = [[SWGApiClient alloc] initWithBaseURL:[NSURL URLWithString:baseUrl]]; [_pool setValue:client forKey:baseUrl ]; - if(loggingEnabled) + if([[SWGConfiguration sharedConfig] debug]) NSLog(@"new client for path %@", baseUrl); } - if(loggingEnabled) + if([[SWGConfiguration sharedConfig] debug]) NSLog(@"returning client for path %@", baseUrl); return client; } @@ -146,7 +153,7 @@ static bool loggingEnabled = true; +(NSNumber*) nextRequestId { @synchronized(self) { long nextId = ++requestId; - if(loggingEnabled) + if([[SWGConfiguration sharedConfig] debug]) NSLog(@"got id %ld", nextId); return [NSNumber numberWithLong:nextId]; } @@ -154,7 +161,7 @@ static bool loggingEnabled = true; +(NSNumber*) queueRequest { NSNumber* requestId = [SWGApiClient nextRequestId]; - if(loggingEnabled) + if([[SWGConfiguration sharedConfig] debug]) NSLog(@"added %@ to request queue", requestId); [queuedRequests addObject:requestId]; return requestId; @@ -187,7 +194,7 @@ static bool loggingEnabled = true; }]; if(matchingItems.count == 1) { - if(loggingEnabled) + if([[SWGConfiguration sharedConfig] debug]) NSLog(@"removing request id %@", requestId); [queuedRequests removeObject:requestId]; return true; @@ -222,25 +229,25 @@ static bool loggingEnabled = true; reachabilityStatus = status; switch (status) { case AFNetworkReachabilityStatusUnknown: - if(loggingEnabled) + if([[SWGConfiguration sharedConfig] debug]) NSLog(@"reachability changed to AFNetworkReachabilityStatusUnknown"); [SWGApiClient setOfflineState:true]; break; case AFNetworkReachabilityStatusNotReachable: - if(loggingEnabled) + if([[SWGConfiguration sharedConfig] debug]) NSLog(@"reachability changed to AFNetworkReachabilityStatusNotReachable"); [SWGApiClient setOfflineState:true]; break; case AFNetworkReachabilityStatusReachableViaWWAN: - if(loggingEnabled) + if([[SWGConfiguration sharedConfig] debug]) NSLog(@"reachability changed to AFNetworkReachabilityStatusReachableViaWWAN"); [SWGApiClient setOfflineState:false]; break; case AFNetworkReachabilityStatusReachableViaWiFi: - if(loggingEnabled) + if([[SWGConfiguration sharedConfig] debug]) NSLog(@"reachability changed to AFNetworkReachabilityStatusReachableViaWiFi"); [SWGApiClient setOfflineState:false]; break; @@ -265,7 +272,6 @@ static bool loggingEnabled = true; for(NSString * key in [queryParams keyEnumerator]){ if(counter == 0) separator = @"?"; else separator = @"&"; - NSString * value; id queryParam = [queryParams valueForKey:key]; if([queryParam isKindOfClass:[NSString class]]){ [requestUrl appendString:[NSString stringWithFormat:@"%@%@=%@", separator, @@ -311,11 +317,6 @@ static bool loggingEnabled = true; return requestUrl; } -- (NSString*)descriptionForRequest:(NSURLRequest*)request { - return [[request URL] absoluteString]; -} - - /** * Update header and query params based on authentication settings */ @@ -478,8 +479,8 @@ static bool loggingEnabled = true; AFHTTPRequestOperation *op = [self HTTPRequestOperationWithRequest:request success:^(AFHTTPRequestOperation *operation, id response) { if([self executeRequestWithId:requestId]) { - if(self.logServerResponses) { - [self logResponse:response forRequest:request error:nil]; + if([[SWGConfiguration sharedConfig] debug]) { + [self logResponse:operation forRequest:request error:nil]; } completionBlock(response, nil); } @@ -492,7 +493,7 @@ static bool loggingEnabled = true; } NSError *augmentedError = [error initWithDomain:error.domain code:error.code userInfo:userInfo]; - if(self.logServerResponses) + if([[SWGConfiguration sharedConfig] debug]) [self logResponse:nil forRequest:request error:augmentedError]; completionBlock(nil, augmentedError); } @@ -548,7 +549,7 @@ static bool loggingEnabled = true; NSError *augmentedError = [error initWithDomain:error.domain code:error.code userInfo:userInfo]; - if (self.logServerResponses) { + if ([[SWGConfiguration sharedConfig] debug]) { [self logResponse:nil forRequest:request error:augmentedError]; } diff --git a/samples/client/petstore/objc/SwaggerClient/SWGConfiguration.h b/samples/client/petstore/objc/SwaggerClient/SWGConfiguration.h index cb334828549..d3619c72ab5 100644 --- a/samples/client/petstore/objc/SwaggerClient/SWGConfiguration.h +++ b/samples/client/petstore/objc/SwaggerClient/SWGConfiguration.h @@ -28,6 +28,13 @@ */ @property (nonatomic) NSString *tempFolderPath; +/** + * Logging Settings + */ +@property (nonatomic) BOOL debug; +@property (nonatomic) NSString *loggingFile; +@property (nonatomic) NSFileHandle *loggingFileHanlder; + /** * Get configuration singleton instance */ diff --git a/samples/client/petstore/objc/SwaggerClient/SWGConfiguration.m b/samples/client/petstore/objc/SwaggerClient/SWGConfiguration.m index 69fb424d8d8..81e308a53fc 100644 --- a/samples/client/petstore/objc/SwaggerClient/SWGConfiguration.m +++ b/samples/client/petstore/objc/SwaggerClient/SWGConfiguration.m @@ -28,6 +28,8 @@ self.username = @""; self.password = @""; self.tempFolderPath = nil; + self.debug = NO; + self.loggingFile = nil; self.mutableApiKey = [NSMutableDictionary dictionary]; self.mutableApiKeyPrefix = [NSMutableDictionary dictionary]; } @@ -66,6 +68,20 @@ [self.mutableApiKeyPrefix setValue:value forKey:field]; } +- (void) setLoggingFile:(NSString *)loggingFile { + // close old file handler + if ([self.loggingFileHanlder isKindOfClass:[NSFileHandle class]]) { + [self.loggingFileHanlder closeFile]; + } + + _loggingFile = loggingFile; + self.loggingFileHanlder = [NSFileHandle fileHandleForWritingAtPath:_loggingFile]; + if (self.loggingFileHanlder == nil) { + [[NSFileManager defaultManager] createFileAtPath:_loggingFile contents:nil attributes:nil]; + self.loggingFileHanlder = [NSFileHandle fileHandleForWritingAtPath:_loggingFile]; + } +} + #pragma mark - Getter Methods - (NSDictionary *) apiKey { diff --git a/samples/client/petstore/objc/SwaggerClient/SWGObject.h b/samples/client/petstore/objc/SwaggerClient/SWGObject.h index ccec208abc0..fb27b4a4ebb 100644 --- a/samples/client/petstore/objc/SwaggerClient/SWGObject.h +++ b/samples/client/petstore/objc/SwaggerClient/SWGObject.h @@ -1,5 +1,5 @@ #import -#import "JSONModel.h" +#import @interface SWGObject : JSONModel @end diff --git a/samples/client/petstore/objc/SwaggerClient/SWGPetApi.m b/samples/client/petstore/objc/SwaggerClient/SWGPetApi.m index 0933016d638..4e67e2c1435 100644 --- a/samples/client/petstore/objc/SwaggerClient/SWGPetApi.m +++ b/samples/client/petstore/objc/SwaggerClient/SWGPetApi.m @@ -1,5 +1,4 @@ #import "SWGPetApi.h" -#import "SWGFile.h" #import "SWGQueryParamCollection.h" #import "SWGPet.h" diff --git a/samples/client/petstore/objc/SwaggerClient/SWGStoreApi.m b/samples/client/petstore/objc/SwaggerClient/SWGStoreApi.m index 040f7236a3d..5304b67dd07 100644 --- a/samples/client/petstore/objc/SwaggerClient/SWGStoreApi.m +++ b/samples/client/petstore/objc/SwaggerClient/SWGStoreApi.m @@ -1,5 +1,4 @@ #import "SWGStoreApi.h" -#import "SWGFile.h" #import "SWGQueryParamCollection.h" #import "SWGOrder.h" diff --git a/samples/client/petstore/objc/SwaggerClient/SWGUserApi.m b/samples/client/petstore/objc/SwaggerClient/SWGUserApi.m index 3a0e7b8bb40..845e8d93ae3 100644 --- a/samples/client/petstore/objc/SwaggerClient/SWGUserApi.m +++ b/samples/client/petstore/objc/SwaggerClient/SWGUserApi.m @@ -1,5 +1,4 @@ #import "SWGUserApi.h" -#import "SWGFile.h" #import "SWGQueryParamCollection.h" #import "SWGUser.h" diff --git a/samples/client/petstore/objc/SwaggerClientTests/Podfile b/samples/client/petstore/objc/SwaggerClientTests/Podfile index 8bc79199e50..ea5cdb0e6e8 100644 --- a/samples/client/petstore/objc/SwaggerClientTests/Podfile +++ b/samples/client/petstore/objc/SwaggerClientTests/Podfile @@ -1,5 +1,4 @@ source 'https://github.com/CocoaPods/Specs.git' -use_frameworks! target 'SwaggerClient_Example', :exclusive => true do pod "SwaggerClient", :path => "../" diff --git a/samples/client/petstore/objc/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj b/samples/client/petstore/objc/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj index 160ab6c70a8..0ba21c560ef 100644 --- a/samples/client/petstore/objc/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj +++ b/samples/client/petstore/objc/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj @@ -7,7 +7,7 @@ objects = { /* Begin PBXBuildFile section */ - 32FA3CA96E7FC5D792D203F8 /* Pods_SwaggerClient_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 56767C6E86DE2B2855ABF7B2 /* Pods_SwaggerClient_Example.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; + 158CE3AA214CB1B31C7ADC48 /* libPods-SwaggerClient_Tests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FDEF5BA3CF9CFFDEB5A47DB4 /* libPods-SwaggerClient_Tests.a */; }; 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; }; 6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; @@ -22,7 +22,7 @@ 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; }; 6003F5BC195388D20070C39A /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* Tests.m */; }; 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; }; - 9A44FA36F7AE066E0FA82C4E /* Pods_SwaggerClient_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B1D1ECCC8D1A8BE115A67138 /* Pods_SwaggerClient_Tests.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; + 94BE6BE84795B5034A811E61 /* libPods-SwaggerClient_Example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D46325ECAD48245C07F6733 /* libPods-SwaggerClient_Example.a */; }; CFDFB4121B3CFFA8009739C5 /* UserApiTest.m in Sources */ = {isa = PBXBuildFile; fileRef = CFDFB40D1B3CFEC3009739C5 /* UserApiTest.m */; }; CFDFB4131B3CFFDD009739C5 /* PetApiTest.m in Sources */ = {isa = PBXBuildFile; fileRef = CFDFB40A1B3CFEC3009739C5 /* PetApiTest.m */; }; CFDFB4141B3CFFF6009739C5 /* StoreApiTest.m in Sources */ = {isa = PBXBuildFile; fileRef = CFDFB40B1B3CFEC3009739C5 /* StoreApiTest.m */; }; @@ -42,7 +42,6 @@ /* Begin PBXFileReference section */ 1A81C3BE3E54961CD827EAE3 /* Pods-SwaggerClient_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests.release.xcconfig"; sourceTree = ""; }; 4CCE21315897B7D544C83242 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; - 56767C6E86DE2B2855ABF7B2 /* Pods_SwaggerClient_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClient_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 6003F58A195388D20070C39A /* SwaggerClient_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwaggerClient_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 6003F58F195388D20070C39A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; @@ -64,7 +63,7 @@ 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = ""; }; 73CCD82196AABD64F2807C7B /* Pods-SwaggerClient_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests.debug.xcconfig"; sourceTree = ""; }; 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = ""; }; - B1D1ECCC8D1A8BE115A67138 /* Pods_SwaggerClient_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClient_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 8D46325ECAD48245C07F6733 /* libPods-SwaggerClient_Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-SwaggerClient_Example.a"; sourceTree = BUILT_PRODUCTS_DIR; }; BFB4BE760737508B3CFC23B2 /* Pods-SwaggerClient_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example.release.xcconfig"; sourceTree = ""; }; CFDFB40A1B3CFEC3009739C5 /* PetApiTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PetApiTest.m; sourceTree = ""; }; CFDFB40B1B3CFEC3009739C5 /* StoreApiTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StoreApiTest.m; sourceTree = ""; }; @@ -72,6 +71,7 @@ CFDFB40D1B3CFEC3009739C5 /* UserApiTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UserApiTest.m; sourceTree = ""; }; E445A633FA767F207D7EE6CE /* Pods-SwaggerClient_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example.debug.xcconfig"; sourceTree = ""; }; E9675D953C6DCDE71A1BDFD4 /* SwaggerClient.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = SwaggerClient.podspec; path = ../SwaggerClient.podspec; sourceTree = ""; }; + FDEF5BA3CF9CFFDEB5A47DB4 /* libPods-SwaggerClient_Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-SwaggerClient_Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -82,7 +82,7 @@ 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */, 6003F592195388D20070C39A /* UIKit.framework in Frameworks */, 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */, - 32FA3CA96E7FC5D792D203F8 /* Pods_SwaggerClient_Example.framework in Frameworks */, + 94BE6BE84795B5034A811E61 /* libPods-SwaggerClient_Example.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -93,7 +93,7 @@ 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */, 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */, 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */, - 9A44FA36F7AE066E0FA82C4E /* Pods_SwaggerClient_Tests.framework in Frameworks */, + 158CE3AA214CB1B31C7ADC48 /* libPods-SwaggerClient_Tests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -128,8 +128,8 @@ 6003F58F195388D20070C39A /* CoreGraphics.framework */, 6003F591195388D20070C39A /* UIKit.framework */, 6003F5AF195388D20070C39A /* XCTest.framework */, - 56767C6E86DE2B2855ABF7B2 /* Pods_SwaggerClient_Example.framework */, - B1D1ECCC8D1A8BE115A67138 /* Pods_SwaggerClient_Tests.framework */, + 8D46325ECAD48245C07F6733 /* libPods-SwaggerClient_Example.a */, + FDEF5BA3CF9CFFDEB5A47DB4 /* libPods-SwaggerClient_Tests.a */, ); name = Frameworks; sourceTree = ""; @@ -214,7 +214,6 @@ 6003F586195388D20070C39A /* Sources */, 6003F587195388D20070C39A /* Frameworks */, 6003F588195388D20070C39A /* Resources */, - CFCA721F9D6FBA792A2E917F /* Embed Pods Frameworks */, 429AF5C69E165ED75311B4B0 /* Copy Pods Resources */, ); buildRules = ( @@ -234,7 +233,6 @@ 6003F5AA195388D20070C39A /* Sources */, 6003F5AB195388D20070C39A /* Frameworks */, 6003F5AC195388D20070C39A /* Resources */, - 373B17801C82424AA96FEEFA /* Embed Pods Frameworks */, E337D7E459CCFFDF27046FFC /* Copy Pods Resources */, ); buildRules = ( @@ -256,11 +254,6 @@ CLASSPREFIX = SWG; LastUpgradeCheck = 0510; ORGANIZATIONNAME = geekerzp; - TargetAttributes = { - 6003F5AD195388D20070C39A = { - TestTargetID = 6003F589195388D20070C39A; - }; - }; }; buildConfigurationList = 6003F585195388D10070C39A /* Build configuration list for PBXProject "SwaggerClient" */; compatibilityVersion = "Xcode 3.2"; @@ -303,21 +296,6 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 373B17801C82424AA96FEEFA /* Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; 429AF5C69E165ED75311B4B0 /* Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -363,21 +341,6 @@ shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; - CFCA721F9D6FBA792A2E917F /* Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; E337D7E459CCFFDF27046FFC /* Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -554,7 +517,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = 73CCD82196AABD64F2807C7B /* Pods-SwaggerClient_Tests.debug.xcconfig */; buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; FRAMEWORK_SEARCH_PATHS = ( "$(SDKROOT)/Developer/Library/Frameworks", "$(inherited)", @@ -568,7 +530,6 @@ ); INFOPLIST_FILE = "Tests/Tests-Info.plist"; PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwaggerClient_Example.app/SwaggerClient_Example"; WRAPPER_EXTENSION = xctest; }; name = Debug; @@ -577,7 +538,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = 1A81C3BE3E54961CD827EAE3 /* Pods-SwaggerClient_Tests.release.xcconfig */; buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; FRAMEWORK_SEARCH_PATHS = ( "$(SDKROOT)/Developer/Library/Frameworks", "$(inherited)", @@ -587,7 +547,6 @@ GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; INFOPLIST_FILE = "Tests/Tests-Info.plist"; PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwaggerClient_Example.app/SwaggerClient_Example"; WRAPPER_EXTENSION = xctest; }; name = Release; diff --git a/samples/client/petstore/objc/SwaggerClientTests/Tests/PetApiTest.m b/samples/client/petstore/objc/SwaggerClientTests/Tests/PetApiTest.m index 8b0a5a10bb2..f14e7e5b0ed 100644 --- a/samples/client/petstore/objc/SwaggerClientTests/Tests/PetApiTest.m +++ b/samples/client/petstore/objc/SwaggerClientTests/Tests/PetApiTest.m @@ -1,7 +1,7 @@ #import #import -#import #import +#import @interface PetApiTest : XCTestCase { @private diff --git a/samples/client/petstore/objc/SwaggerClientTests/Tests/Tests-Prefix.pch b/samples/client/petstore/objc/SwaggerClientTests/Tests/Tests-Prefix.pch index b84cd591234..6d08c288215 100644 --- a/samples/client/petstore/objc/SwaggerClientTests/Tests/Tests-Prefix.pch +++ b/samples/client/petstore/objc/SwaggerClientTests/Tests/Tests-Prefix.pch @@ -2,7 +2,7 @@ #ifdef __OBJC__ - @import Specta; - @import Expecta; + //@import Specta; + //@import Expecta; #endif