31 |
32 | ////////////////////////////////////////////////////////////////////////////////
33 | #pragma mark - Defines & Constants
34 |
35 | // Non-standard download speeds
36 | extern const double
37 | OHHTTPStubsDownloadSpeed1KBPS, // 1.0 KB per second
38 | OHHTTPStubsDownloadSpeedSLOW; // 1.5 KB per second
39 |
40 | // Standard download speeds.
41 | extern const double
42 | OHHTTPStubsDownloadSpeedGPRS,
43 | OHHTTPStubsDownloadSpeedEDGE,
44 | OHHTTPStubsDownloadSpeed3G,
45 | OHHTTPStubsDownloadSpeed3GPlus,
46 | OHHTTPStubsDownloadSpeedWifi;
47 |
48 |
49 | NS_ASSUME_NONNULL_BEGIN
50 |
51 | ////////////////////////////////////////////////////////////////////////////////
52 | #pragma mark - Interface
53 |
54 | /**
55 | * Stubs Response. This describes a stubbed response to be returned by the URL Loading System,
56 | * including its HTTP headers, body, statusCode and response time.
57 | */
58 | @interface OHHTTPStubsResponse : NSObject
59 |
60 | ////////////////////////////////////////////////////////////////////////////////
61 | #pragma mark - Properties
62 |
63 | /**
64 | * The headers to use for the fake response
65 | */
66 | @property(nonatomic, strong, nullable) NSDictionary* httpHeaders;
67 | /**
68 | * The HTTP status code to use for the fake response
69 | */
70 | @property(nonatomic, assign) int statusCode;
71 | /**
72 | * The inputStream used when sending the response.
73 | * @note You generally don't manipulate this directly.
74 | */
75 | @property(nonatomic, strong, nullable) NSInputStream* inputStream;
76 | /**
77 | * The size of the fake response body, in bytes.
78 | */
79 | @property(nonatomic, assign) unsigned long long dataSize;
80 | /**
81 | * The duration to wait before faking receiving the response headers.
82 | *
83 | * Defaults to 0.0.
84 | */
85 | @property(nonatomic, assign) NSTimeInterval requestTime;
86 | /**
87 | * The duration to use to send the fake response body.
88 | *
89 | * @note if responseTime<0, it is interpreted as a download speed in KBps ( -200 => 200KB/s )
90 | */
91 | @property(nonatomic, assign) NSTimeInterval responseTime;
92 | /**
93 | * The fake error to generate to simulate a network error.
94 | *
95 | * If `error` is non-`nil`, the request will result in a failure and no response will be sent.
96 | */
97 | @property(nonatomic, strong, nullable) NSError* error;
98 |
99 |
100 | ////////////////////////////////////////////////////////////////////////////////
101 | #pragma mark - Commodity Constructors
102 | /*! @name Commodity */
103 |
104 | /* -------------------------------------------------------------------------- */
105 | #pragma mark > Building response from NSData
106 |
107 | /**
108 | * Builds a response given raw data.
109 | *
110 | * @note Internally calls `-initWithInputStream:dataSize:statusCode:headers:` with and inputStream built from the NSData.
111 | *
112 | * @param data The raw data to return in the response
113 | * @param statusCode The HTTP Status Code to use in the response
114 | * @param httpHeaders The HTTP Headers to return in the response
115 | * @return An `OHHTTPStubsResponse` describing the corresponding response to return by the stub
116 | */
117 | +(instancetype)responseWithData:(NSData*)data
118 | statusCode:(int)statusCode
119 | headers:(nullable NSDictionary*)httpHeaders;
120 |
121 |
122 | /* -------------------------------------------------------------------------- */
123 | #pragma mark > Building response from a file
124 |
125 | /**
126 | * Builds a response given a file path, the status code and headers.
127 | *
128 | * @param filePath The file path that contains the response body to return.
129 | * @param statusCode The HTTP Status Code to use in the response
130 | * @param httpHeaders The HTTP Headers to return in the response
131 | *
132 | * @return An `OHHTTPStubsResponse` describing the corresponding response to return by the stub
133 | *
134 | * @note It is encouraged to use the OHPathHelpers functions & macros to build
135 | * the filePath parameter easily
136 | */
137 | +(instancetype)responseWithFileAtPath:(NSString *)filePath
138 | statusCode:(int)statusCode
139 | headers:(nullable NSDictionary*)httpHeaders;
140 |
141 | /* -------------------------------------------------------------------------- */
142 | #pragma mark > Building an error response
143 |
144 | /**
145 | * Builds a response that corresponds to the given error
146 | *
147 | * @param error The error to use in the stubbed response.
148 | *
149 | * @return An `OHHTTPStubsResponse` describing the corresponding response to return by the stub
150 | *
151 | * @note For example you could use an error like `[NSError errorWithDomain:NSURLErrorDomain code:kCFURLErrorNotConnectedToInternet userInfo:nil]`
152 | */
153 | +(instancetype)responseWithError:(NSError*)error;
154 |
155 |
156 | ////////////////////////////////////////////////////////////////////////////////
157 | #pragma mark - Commotidy Setters
158 |
159 | /**
160 | * Set the `responseTime` of the `OHHTTPStubsResponse` and return `self`. Useful for chaining method calls.
161 | *
162 | * _Usage example:_
163 | * return [[OHHTTPStubsReponse responseWithData:data statusCode:200 headers:nil] responseTime:5.0];
164 | *
165 | * @param responseTime If positive, the amount of time used to send the entire response.
166 | * If negative, the rate in KB/s at which to send the response data.
167 | * Useful to simulate slow networks for example. You may use the
168 | * _OHHTTPStubsDownloadSpeed…_ constants here.
169 | *
170 | * @return `self` (= the same `OHHTTPStubsResponse` that was the target of this method).
171 | * Returning `self` is useful for chaining method calls.
172 | */
173 | -(instancetype)responseTime:(NSTimeInterval)responseTime;
174 |
175 | /**
176 | * Set both the `requestTime` and the `responseTime` of the `OHHTTPStubsResponse` at once.
177 | * Useful for chaining method calls.
178 | *
179 | * _Usage example:_
180 | * return [[OHHTTPStubsReponse responseWithData:data statusCode:200 headers:nil]
181 | * requestTime:1.0 responseTime:5.0];
182 | *
183 | * @param requestTime The time to wait before the response begins to send. This value must be greater than or equal to zero.
184 | * @param responseTime If positive, the amount of time used to send the entire response.
185 | * If negative, the rate in KB/s at which to send the response data.
186 | * Useful to simulate slow networks for example. You may use the
187 | * _OHHTTPStubsDownloadSpeed…_ constants here.
188 | *
189 | * @return `self` (= the same `OHHTTPStubsResponse` that was the target of this method). Useful for chaining method calls.
190 | */
191 | -(instancetype)requestTime:(NSTimeInterval)requestTime responseTime:(NSTimeInterval)responseTime;
192 |
193 |
194 | ////////////////////////////////////////////////////////////////////////////////
195 | #pragma mark - Initializers
196 | /*! @name Initializers */
197 |
198 | /**
199 | * Designated empty initializer
200 | *
201 | * @return An empty `OHHTTPStubsResponse` on which you need to set either an error or a statusCode, httpHeaders, inputStream and dataSize.
202 | *
203 | * @note This is not recommended to use this method directly. You should use `initWithInputStream:dataSize:statusCode:headers:` instead.
204 | */
205 | -(instancetype)init NS_DESIGNATED_INITIALIZER;
206 |
207 | /**
208 | * Designed initializer. Initialize a response with the given input stream, dataSize,
209 | * statusCode and headers.
210 | *
211 | * @param inputStream The input stream that will provide the data to return in the response
212 | * @param dataSize The size of the data in the stream.
213 | * @param statusCode The HTTP Status Code to use in the response
214 | * @param httpHeaders The HTTP Headers to return in the response
215 | *
216 | * @return An `OHHTTPStubsResponse` describing the corresponding response to return by the stub
217 | *
218 | * @note You will probably never need to call this method yourself. Prefer the other initializers (that will call this method eventually)
219 | */
220 | -(instancetype)initWithInputStream:(NSInputStream*)inputStream
221 | dataSize:(unsigned long long)dataSize
222 | statusCode:(int)statusCode
223 | headers:(nullable NSDictionary*)httpHeaders NS_DESIGNATED_INITIALIZER;
224 |
225 |
226 | /**
227 | * Initialize a response with a given file path, statusCode and headers.
228 | *
229 | * @param filePath The file path of the data to return in the response
230 | * @param statusCode The HTTP Status Code to use in the response
231 | * @param httpHeaders The HTTP Headers to return in the response
232 | *
233 | * @return An `OHHTTPStubsResponse` describing the corresponding response to return by the stub
234 | *
235 | * @note This method simply builds the NSInputStream, compute the file size, and then call `-initWithInputStream:dataSize:statusCode:headers:`
236 | */
237 | -(instancetype)initWithFileAtPath:(NSString*)filePath
238 | statusCode:(int)statusCode
239 | headers:(nullable NSDictionary*)httpHeaders;
240 |
241 |
242 | /**
243 | * Initialize a response with the given data, statusCode and headers.
244 | *
245 | * @param data The raw data to return in the response
246 | * @param statusCode The HTTP Status Code to use in the response
247 | * @param httpHeaders The HTTP Headers to return in the response
248 | *
249 | * @return An `OHHTTPStubsResponse` describing the corresponding response to return by the stub
250 | */
251 | -(instancetype)initWithData:(NSData*)data
252 | statusCode:(int)statusCode
253 | headers:(nullable NSDictionary*)httpHeaders;
254 |
255 |
256 | /**
257 | * Designed initializer. Initialize a response with the given error.
258 | *
259 | * @param error The error to use in the stubbed response.
260 | *
261 | * @return An `OHHTTPStubsResponse` describing the corresponding response to return by the stub
262 | *
263 | * @note For example you could use an error like `[NSError errorWithDomain:NSURLErrorDomain code:kCFURLErrorNotConnectedToInternet userInfo:nil]`
264 | */
265 | -(instancetype)initWithError:(NSError*)error NS_DESIGNATED_INITIALIZER;
266 |
267 | @end
268 |
269 | NS_ASSUME_NONNULL_END
270 |
--------------------------------------------------------------------------------
/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse.m:
--------------------------------------------------------------------------------
1 | /***********************************************************************************
2 | *
3 | * Copyright (c) 2012 Olivier Halligon
4 | *
5 | * Permission is hereby granted, free of charge, to any person obtaining a copy
6 | * of this software and associated documentation files (the "Software"), to deal
7 | * in the Software without restriction, including without limitation the rights
8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | * copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in
13 | * all copies or substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | * THE SOFTWARE.
22 | *
23 | ***********************************************************************************/
24 |
25 | #if ! __has_feature(objc_arc)
26 | #error This file is expected to be compiled with ARC turned ON
27 | #endif
28 |
29 | ////////////////////////////////////////////////////////////////////////////////
30 | #pragma mark - Imports
31 |
32 | #import
33 |
34 | ////////////////////////////////////////////////////////////////////////////////
35 | #pragma mark - Defines & Constants
36 | const double OHHTTPStubsDownloadSpeed1KBPS =- 8 / 8; // kbps -> KB/s
37 | const double OHHTTPStubsDownloadSpeedSLOW =- 12 / 8; // kbps -> KB/s
38 | const double OHHTTPStubsDownloadSpeedGPRS =- 56 / 8; // kbps -> KB/s
39 | const double OHHTTPStubsDownloadSpeedEDGE =- 128 / 8; // kbps -> KB/s
40 | const double OHHTTPStubsDownloadSpeed3G =- 3200 / 8; // kbps -> KB/s
41 | const double OHHTTPStubsDownloadSpeed3GPlus =- 7200 / 8; // kbps -> KB/s
42 | const double OHHTTPStubsDownloadSpeedWifi =- 12000 / 8; // kbps -> KB/s
43 |
44 | ////////////////////////////////////////////////////////////////////////////////
45 | #pragma mark - Implementation
46 |
47 | @implementation OHHTTPStubsResponse
48 |
49 | ////////////////////////////////////////////////////////////////////////////////
50 | #pragma mark - Commodity Constructors
51 |
52 |
53 | #pragma mark > Building response from NSData
54 |
55 | +(instancetype)responseWithData:(NSData*)data
56 | statusCode:(int)statusCode
57 | headers:(nullable NSDictionary*)httpHeaders
58 | {
59 | OHHTTPStubsResponse* response = [[self alloc] initWithData:data
60 | statusCode:statusCode
61 | headers:httpHeaders];
62 | return response;
63 | }
64 |
65 |
66 | #pragma mark > Building response from a file
67 |
68 | +(instancetype)responseWithFileAtPath:(NSString *)filePath
69 | statusCode:(int)statusCode
70 | headers:(nullable NSDictionary *)httpHeaders
71 | {
72 | OHHTTPStubsResponse* response = [[self alloc] initWithFileAtPath:filePath
73 | statusCode:statusCode
74 | headers:httpHeaders];
75 | return response;
76 | }
77 |
78 |
79 | #pragma mark > Building an error response
80 |
81 | +(instancetype)responseWithError:(NSError*)error
82 | {
83 | OHHTTPStubsResponse* response = [[self alloc] initWithError:error];
84 | return response;
85 | }
86 |
87 | ////////////////////////////////////////////////////////////////////////////////
88 | #pragma mark - Commotidy Setters
89 |
90 | -(instancetype)responseTime:(NSTimeInterval)responseTime
91 | {
92 | _responseTime = responseTime;
93 | return self;
94 | }
95 |
96 | -(instancetype)requestTime:(NSTimeInterval)requestTime responseTime:(NSTimeInterval)responseTime
97 | {
98 | _requestTime = requestTime;
99 | _responseTime = responseTime;
100 | return self;
101 | }
102 |
103 | ////////////////////////////////////////////////////////////////////////////////
104 | #pragma mark - Initializers
105 |
106 | -(instancetype)init
107 | {
108 | self = [super init];
109 | return self;
110 | }
111 |
112 | -(instancetype)initWithInputStream:(NSInputStream*)inputStream
113 | dataSize:(unsigned long long)dataSize
114 | statusCode:(int)statusCode
115 | headers:(nullable NSDictionary*)httpHeaders
116 | {
117 | self = [super init];
118 | if (self)
119 | {
120 | _inputStream = inputStream;
121 | _dataSize = dataSize;
122 | _statusCode = statusCode;
123 | NSMutableDictionary * headers = [NSMutableDictionary dictionaryWithDictionary:httpHeaders];
124 | static NSString *const ContentLengthHeader = @"Content-Length";
125 | if (!headers[ContentLengthHeader])
126 | {
127 | headers[ContentLengthHeader] = [NSString stringWithFormat:@"%llu",_dataSize];
128 | }
129 | _httpHeaders = [NSDictionary dictionaryWithDictionary:headers];
130 | }
131 | return self;
132 | }
133 |
134 | -(instancetype)initWithFileAtPath:(NSString*)filePath
135 | statusCode:(int)statusCode
136 | headers:(nullable NSDictionary*)httpHeaders
137 | {
138 | NSInputStream* inputStream;
139 | if (filePath)
140 | {
141 | inputStream = [NSInputStream inputStreamWithFileAtPath:filePath];
142 | }
143 | else
144 | {
145 | NSLog(@"%s: nil file path. Returning empty data", __PRETTY_FUNCTION__);
146 | inputStream = [NSInputStream inputStreamWithData:[NSData data]];
147 | }
148 |
149 | NSDictionary* attributes = [NSFileManager.defaultManager attributesOfItemAtPath:filePath error:nil];
150 | unsigned long long fileSize = [[attributes valueForKey:NSFileSize] unsignedLongLongValue];
151 | self = [self initWithInputStream:inputStream
152 | dataSize:fileSize
153 | statusCode:statusCode
154 | headers:httpHeaders];
155 | return self;
156 | }
157 |
158 | -(instancetype)initWithData:(NSData*)data
159 | statusCode:(int)statusCode
160 | headers:(nullable NSDictionary*)httpHeaders
161 | {
162 | NSInputStream* inputStream = [NSInputStream inputStreamWithData:data?:[NSData data]];
163 | self = [self initWithInputStream:inputStream
164 | dataSize:data.length
165 | statusCode:statusCode
166 | headers:httpHeaders];
167 | return self;
168 | }
169 |
170 | -(instancetype)initWithError:(NSError*)error
171 | {
172 | self = [super init];
173 | if (self) {
174 | _error = error;
175 | }
176 | return self;
177 | }
178 |
179 | -(NSString*)debugDescription
180 | {
181 | return [NSString stringWithFormat:@"<%@ %p requestTime:%f responseTime:%f status:%d dataSize:%llu>",
182 | self.class, self, self.requestTime, self.responseTime, self.statusCode, self.dataSize];
183 | }
184 |
185 | ////////////////////////////////////////////////////////////////////////////////
186 | #pragma mark - Accessors
187 |
188 | -(void)setRequestTime:(NSTimeInterval)requestTime
189 | {
190 | NSAssert(requestTime >= 0, @"Invalid Request Time (%f) for OHHTTPStubResponse. Request time must be greater than or equal to zero",requestTime);
191 | _requestTime = requestTime;
192 | }
193 |
194 | @end
195 |
--------------------------------------------------------------------------------
/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHPathHelpers/OHPathHelpers.h:
--------------------------------------------------------------------------------
1 | /***********************************************************************************
2 | *
3 | * Copyright (c) 2012 Olivier Halligon
4 | *
5 | * Permission is hereby granted, free of charge, to any person obtaining a copy
6 | * of this software and associated documentation files (the "Software"), to deal
7 | * in the Software without restriction, including without limitation the rights
8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | * copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in
13 | * all copies or substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | * THE SOFTWARE.
22 | *
23 | ***********************************************************************************/
24 |
25 |
26 | #import
27 | #import
28 |
29 | NS_ASSUME_NONNULL_BEGIN
30 |
31 | /**
32 | * Useful function to build a path given a file name and a class.
33 | *
34 | * @param fileName The name of the file to get the path to, including file extension
35 | * @param inBundleForClass The class of the caller, used to determine the current bundle
36 | * in which the file is supposed to be located.
37 | * You should typically pass `self.class` (ObjC) or
38 | * `self.dynamicType` (Swift) when calling this function.
39 | *
40 | * @return The path of the given file in the same bundle as the inBundleForClass class
41 | */
42 | NSString* __nullable OHPathForFile(NSString* fileName, Class inBundleForClass);
43 |
44 | /**
45 | * Useful function to build a path given a file name and a bundle.
46 | *
47 | * @param fileName The name of the file to get the path to, including file extension
48 | * @param bundle The bundle in which the file is supposed to be located.
49 | * This parameter can't be null.
50 | *
51 | * @return The path of the given file in given bundle
52 | *
53 | * @note You should avoid using `[NSBundle mainBundle]` for the `bundle` parameter,
54 | * as in the context of Unit Tests, this points to the Simulator's bundle,
55 | * not the bundle of the app under test. That's why `nil` is not an acceptable
56 | * value (so you won't expect it to default to the `mainBundle`).
57 | * You should use `[NSBundle bundleForClass:]` instead.
58 | */
59 | NSString* __nullable OHPathForFileInBundle(NSString* fileName, NSBundle* bundle);
60 |
61 | /**
62 | * Useful function to build a path to a file in the Documents's directory in the
63 | * app sandbox, used by iTunes File Sharing for example.
64 | *
65 | * @param fileName The name of the file to get the path to, including file extension
66 | *
67 | * @return The path of the file in the Documents directory in your App Sandbox
68 | */
69 | NSString* __nullable OHPathForFileInDocumentsDir(NSString* fileName);
70 |
71 |
72 |
73 | /**
74 | * Useful function to build an NSBundle located in the application's resources simply from its name
75 | *
76 | * @param bundleBasename The base name, without extension (extension is assumed to be ".bundle").
77 | * @param inBundleForClass The class of the caller, used to determine the current bundle
78 | * in which the file is supposed to be located.
79 | * You should typically pass `self.class` (ObjC) or
80 | * `self.dynamicType` (Swift) when calling this function.
81 | *
82 | * @return The NSBundle object representing the bundle with the given basename located in your application's resources.
83 | */
84 | NSBundle* __nullable OHResourceBundle(NSString* bundleBasename, Class inBundleForClass);
85 |
86 | NS_ASSUME_NONNULL_END
87 |
--------------------------------------------------------------------------------
/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHPathHelpers/OHPathHelpers.m:
--------------------------------------------------------------------------------
1 | /***********************************************************************************
2 | *
3 | * Copyright (c) 2012 Olivier Halligon
4 | *
5 | * Permission is hereby granted, free of charge, to any person obtaining a copy
6 | * of this software and associated documentation files (the "Software"), to deal
7 | * in the Software without restriction, including without limitation the rights
8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | * copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in
13 | * all copies or substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | * THE SOFTWARE.
22 | *
23 | ***********************************************************************************/
24 |
25 |
26 | #import
27 |
28 | NSString* __nullable OHPathForFile(NSString* fileName, Class inBundleForClass)
29 | {
30 | NSBundle* bundle = [NSBundle bundleForClass:inBundleForClass];
31 | return OHPathForFileInBundle(fileName, bundle);
32 | }
33 |
34 | NSString* __nullable OHPathForFileInBundle(NSString* fileName, NSBundle* bundle)
35 | {
36 | return [bundle pathForResource:[fileName stringByDeletingPathExtension]
37 | ofType:[fileName pathExtension]];
38 | }
39 |
40 | NSString* __nullable OHPathForFileInDocumentsDir(NSString* fileName)
41 | {
42 | NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
43 | NSString *basePath = (paths.count > 0) ? paths[0] : nil;
44 | return [basePath stringByAppendingPathComponent:fileName];
45 | }
46 |
47 | NSBundle* __nullable OHResourceBundle(NSString* bundleBasename, Class inBundleForClass)
48 | {
49 | NSBundle* classBundle = [NSBundle bundleForClass:inBundleForClass];
50 | return [NSBundle bundleWithPath:[classBundle pathForResource:bundleBasename
51 | ofType:@"bundle"]];
52 | }
53 |
--------------------------------------------------------------------------------
/Pods/OHHTTPStubs/README.md:
--------------------------------------------------------------------------------
1 | OHHTTPStubs
2 | ===========
3 |
4 | [](http://cocoadocs.org/docsets/OHHTTPStubs)
5 | [](http://cocoadocs.org/docsets/OHHTTPStubs)
6 | [](https://github.com/Carthage/Carthage)
7 | [](https://travis-ci.org/AliSoftware/OHHTTPStubs)
8 |
9 | `OHHTTPStubs` is a library designed to stub your network requests very easily. It can help you:
10 |
11 | * test your apps with **fake network data** (stubbed from file) and **simulate slow networks**, to check your application behavior in bad network conditions
12 | * write **Unit Tests** that use fake network data from your fixtures.
13 |
14 | It works with `NSURLConnection`, new iOS7/OSX.9's `NSURLSession`, `AFNetworking` (both 1.x and 2.x), or any networking framework that use Cocoa's URL Loading System.
15 |
16 | [](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=TRTU3UEWEHV92 "Donate")
17 |
18 | ----
19 |
20 | # Documentation & Usage Examples
21 |
22 | `OHHTTPStubs` headers are fully documented using Appledoc-like / Headerdoc-like comments in the header files. You can also [read the **online documentation** here](http://cocoadocs.org/docsets/OHHTTPStubs)
23 | [](http://cocoadocs.org/docsets/OHHTTPStubs)
24 |
25 | ## Swift support
26 |
27 | `OHHTTPStubs` is compatible with Swift out of the box: you can use it with the same API as you would use in Objective-C. But you might also want to include the `OHHTTPStubs/Swift` subspec in your `Podfile`, which adds some global function helpers (see `OHHTTPStubsSwift.swift`) to make the use of `OHHTTPStubs` more compact and Swift-like.
28 |
29 | ## Basic example
30 |
31 | ### In Objective-C
32 |
33 | ```objc
34 | [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) {
35 | return [request.URL.host isEqualToString:@"mywebservice.com"];
36 | } withStubResponse:^OHHTTPStubsResponse*(NSURLRequest *request) {
37 | // Stub it with our "wsresponse.json" stub file (which is in same bundle as self)
38 | NSString* fixture = OHPathForFile(@"wsresponse.json", self.class);
39 | return [OHHTTPStubsResponse responseWithFileAtPath:fixture
40 | statusCode:200 headers:@{@"Content-Type":@"application/json"}];
41 | }];
42 | ```
43 |
44 | ### In Swift
45 |
46 | This example is using the Swift helpers found in `OHHTTPStubsSwift.swift` provided by the `OHHTTPStubs/Swift` subspec
47 |
48 | ```swift
49 | stub(isHost("mywebservice.com")) { _ in
50 | // Stub it with our "wsresponse.json" stub file (which is in same bundle as self)
51 | let stubPath = OHPathForFile("wsresponse.json", self.dynamicType)
52 | return fixture(stubPath!, headers: ["Content-Type":"application/json"])
53 | }
54 | ```
55 |
56 | Note: Using `OHHTTPStubsSwift.swift` you could also compose the matcher functions like this: `stub(isScheme("http") && isHost("myhost")) { … }`
57 |
58 | ## More examples & Help Topics
59 |
60 | * For a lot more examples, see the dedicated "[Usage Examples](https://github.com/AliSoftware/OHHTTPStubs/wiki/Usage-Examples)" wiki page.
61 | * The wiki also contain [some articles that can help you get started](https://github.com/AliSoftware/OHHTTPStubs/wiki) with (and troubleshoot if needed) `OHHTTPStubs`.
62 |
63 | # Compatibility
64 |
65 | `OHHTTPStubs` is compatible with **iOS 5.0+** and **OSX 10.7+**.
66 |
67 | `OHHTTPStubs` also works with iOS7's and OSX 10.9's `NSURLSession` mechanism.
68 |
69 | `OHHTTPStubs` is fully **Swift-compatible**. [Nullability annotations](https://developer.apple.com/swift/blog/?id=25) have been added to allow a cleaner API when used from Swift.
70 |
71 | # Installing in your projects
72 |
73 | Using [CocoaPods](https://guides.cocoapods.org) is the recommended way.
74 | Simply add `pod 'OHHTTPStubs'` to your `Podfile`.
75 |
76 | _`OHHTTPStubs` should also be compatible with Carthage — but I won't guarantee help/support for it as I don't use it personally._
77 |
78 | # Special Considerations
79 |
80 | ## Using OHHTTPStubs in your Unit Tests
81 |
82 | `OHHTTPStubs` is ideal to write Unit Tests that normally would perform network requests. But if you use it in your Unit Tests, don't forget to:
83 |
84 | * remove any stubs you installed after each test — to avoid those stubs to still be installed when executing the next Test Case — by calling `[OHHTTPStubs removeAllStubs]` in your `tearDown` method. [see this wiki page for more info](https://github.com/AliSoftware/OHHTTPStubs/wiki/Remove-stubs-after-each-test)
85 | * be sure to wait until the request has received its response before doing your assertions and letting the test case finish (like for any asynchronous test). [see this wiki page for more info](https://github.com/AliSoftware/OHHTTPStubs/wiki/OHHTTPStubs-and-asynchronous-tests)
86 |
87 | ## Automatic loading
88 |
89 | Thanks to method swizzling, `OHHTTPStubs` is automatically loaded and installed both for:
90 |
91 | * requests made using `NSURLConnection` or `[NSURLSession sharedSession]`;
92 | * requests made using a `NSURLSession` created using a `[NSURLSessionConfiguration defaultSessionConfiguration]` or `[NSURLSessionConfiguration ephemeralSessionConfiguration]` configuration (using `[NSURLSession sessionWithConfiguration:…]`-like methods).
93 |
94 | If you need to disable (and re-enable) `OHHTTPStubs` — globally or per `NSURLSession` — you can use `[OHHTTPStubs setEnabled:]` / `[OHHTTPStubs setEnabled:forSessionConfiguration:]`.
95 |
96 | ## Known limitations
97 |
98 | * `OHHTTPStubs` **can't work on background sessions** (sessions created using `[NSURLSessionConfiguration backgroundSessionConfiguration]`) because background sessions don't allow the use of custom `NSURLProtocols` and are handled by the iOS Operating System itself.
99 | * `OHHTTPStubs` don't simulate data upload. The `NSURLProtocolClient` `@protocol` does not provide a way to signal the delegate that data has been **sent** (only that some has been loaded), so any data in the `HTTPBody` or `HTTPBodyStream` of an `NSURLRequest`, or data provided to `-[NSURLSession uploadTaskWithRequest:fromData:];` will be ignored, and more importantly, the `-URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:` delegate method will never be called when you stub the request using `OHHTTPStubs`.
100 |
101 | _As far as I know, there's nothing we can do about those two limitations. Please let me know if you know a solution that would make that possible anyway._
102 |
103 |
104 | ## Submitting to the AppStore
105 |
106 | `OHHTTPStubs` **can be used** on apps submitted **on the AppStore**. It does not use any private API and nothing prevents you from shipping it.
107 |
108 | But you generally only use stubs during the development phase and want to remove your stubs when submitting to the AppStore. So be careful to only include `OHHTTPStubs` when needed (only in your test targets, or only inside `#if DEBUG` portions, or by using [per-Build-Configuration pods](https://guides.cocoapods.org/syntax/podfile.html#pod)) to avoid forgetting to remove it when the time comes that you release for the AppStore and you want your requests to hit the net!
109 |
110 |
111 |
112 | # License and Credits
113 |
114 | This project and library has been created by Olivier Halligon (@aligatr on Twitter) and is under the MIT License.
115 |
116 | It has been inspired by [this article from InfiniteLoop.dk](http://www.infinite-loop.dk/blog/2011/09/using-nsurlprotocol-for-injecting-test-data/).
117 |
118 | I would also like to thank Kevin Harwood ([@kcharwood](https://github.com/kcharwood)) for migrating the code to `NSInputStream`, Jinlian Wang ([@JinlianWang](https://github.com/JinlianWang)) for adding Mocktail support, and everyone else who contributed to this project on GitHub somehow.
119 |
120 | If you want to support the development of this library, feel free to [](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=TRTU3UEWEHV92 "Donate"). Thanks to all contributors so far!
121 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/FBSnapshotTestCase/FBSnapshotTestCase-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_FBSnapshotTestCase : NSObject
3 | @end
4 | @implementation PodsDummy_FBSnapshotTestCase
5 | @end
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/FBSnapshotTestCase/FBSnapshotTestCase-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/FBSnapshotTestCase/FBSnapshotTestCase-umbrella.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | #import "FBSnapshotTestCase.h"
4 | #import "FBSnapshotTestCasePlatform.h"
5 | #import "UIImage+Compare.h"
6 | #import "UIImage+Diff.h"
7 | #import "UIImage+Snapshot.h"
8 | #import "FBSnapshotTestCase.h"
9 | #import "FBSnapshotTestCasePlatform.h"
10 | #import "FBSnapshotTestController.h"
11 |
12 | FOUNDATION_EXPORT double FBSnapshotTestCaseVersionNumber;
13 | FOUNDATION_EXPORT const unsigned char FBSnapshotTestCaseVersionString[];
14 |
15 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/FBSnapshotTestCase/FBSnapshotTestCase.modulemap:
--------------------------------------------------------------------------------
1 | framework module FBSnapshotTestCase {
2 | umbrella header "FBSnapshotTestCase-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 |
7 | private header "FBSnapshotTestController.h"
8 | }
9 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/FBSnapshotTestCase/FBSnapshotTestCase.xcconfig:
--------------------------------------------------------------------------------
1 | ENABLE_BITCODE = NO
2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks"
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/FBSnapshotTestCase" "${PODS_ROOT}/Headers/Public"
5 | OTHER_LDFLAGS = -framework "XCTest"
6 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
7 | PODS_ROOT = ${SRCROOT}
8 | SKIP_INSTALL = YES
--------------------------------------------------------------------------------
/Pods/Target Support Files/FBSnapshotTestCase/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 2.0.4
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/OHHTTPStubs/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 4.3.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_OHHTTPStubs : NSObject
3 | @end
4 | @implementation PodsDummy_OHHTTPStubs
5 | @end
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs-umbrella.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | #import "Compatibility.h"
4 | #import "OHHTTPStubs.h"
5 | #import "OHHTTPStubsResponse.h"
6 | #import "OHHTTPStubsResponse+JSON.h"
7 | #import "OHPathHelpers.h"
8 | #import "Compatibility.h"
9 |
10 | FOUNDATION_EXPORT double OHHTTPStubsVersionNumber;
11 | FOUNDATION_EXPORT const unsigned char OHHTTPStubsVersionString[];
12 |
13 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs.modulemap:
--------------------------------------------------------------------------------
1 | framework module OHHTTPStubs {
2 | umbrella header "OHHTTPStubs-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs.xcconfig:
--------------------------------------------------------------------------------
1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/OHHTTPStubs" "${PODS_ROOT}/Headers/Public"
3 | OTHER_LDFLAGS = -framework "CFNetwork" -framework "Foundation"
4 | PODS_ROOT = ${SRCROOT}
5 | SKIP_INSTALL = YES
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-GooglePlacesAutocompleteExampleTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-GooglePlacesAutocompleteExampleTests/Pods-GooglePlacesAutocompleteExampleTests-acknowledgements.markdown:
--------------------------------------------------------------------------------
1 | # Acknowledgements
2 | This application makes use of the following third party libraries:
3 |
4 | ## FBSnapshotTestCase
5 |
6 | BSD License
7 |
8 | For the FBSnapshotTestCase software
9 |
10 | Copyright (c) 2013, Facebook, Inc.
11 | All rights reserved.
12 |
13 | Redistribution and use in source and binary forms, with or without
14 | modification, are permitted provided that the following conditions are met:
15 |
16 | * Redistributions of source code must retain the above copyright notice,
17 | this list of conditions and the following disclaimer.
18 | * Redistributions in binary form must reproduce the above copyright notice,
19 | this list of conditions and the following disclaimer in the documentation
20 | and/or other materials provided with the distribution.
21 | * Neither the name Facebook nor the names of its contributors may be used to
22 | endorse or promote products derived from this software without specific
23 | prior written permission.
24 |
25 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
28 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
29 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
31 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
32 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
33 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 |
36 |
37 | ## OHHTTPStubs
38 |
39 | - MIT LICENSE -
40 |
41 | Copyright (c) 2012 Olivier Halligon
42 |
43 | 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:
44 |
45 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
46 |
47 | 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.
48 | Generated by CocoaPods - http://cocoapods.org
49 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-GooglePlacesAutocompleteExampleTests/Pods-GooglePlacesAutocompleteExampleTests-acknowledgements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreferenceSpecifiers
6 |
7 |
8 | FooterText
9 | This application makes use of the following third party libraries:
10 | Title
11 | Acknowledgements
12 | Type
13 | PSGroupSpecifier
14 |
15 |
16 | FooterText
17 | BSD License
18 |
19 | For the FBSnapshotTestCase software
20 |
21 | Copyright (c) 2013, Facebook, Inc.
22 | All rights reserved.
23 |
24 | Redistribution and use in source and binary forms, with or without
25 | modification, are permitted provided that the following conditions are met:
26 |
27 | * Redistributions of source code must retain the above copyright notice,
28 | this list of conditions and the following disclaimer.
29 | * Redistributions in binary form must reproduce the above copyright notice,
30 | this list of conditions and the following disclaimer in the documentation
31 | and/or other materials provided with the distribution.
32 | * Neither the name Facebook nor the names of its contributors may be used to
33 | endorse or promote products derived from this software without specific
34 | prior written permission.
35 |
36 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
37 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
38 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
39 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
40 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
41 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
42 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
43 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
44 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
45 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
46 |
47 | Title
48 | FBSnapshotTestCase
49 | Type
50 | PSGroupSpecifier
51 |
52 |
53 | FooterText
54 | - MIT LICENSE -
55 |
56 | Copyright (c) 2012 Olivier Halligon
57 |
58 | 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:
59 |
60 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
61 |
62 | 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.
63 | Title
64 | OHHTTPStubs
65 | Type
66 | PSGroupSpecifier
67 |
68 |
69 | FooterText
70 | Generated by CocoaPods - http://cocoapods.org
71 | Title
72 |
73 | Type
74 | PSGroupSpecifier
75 |
76 |
77 | StringsTable
78 | Acknowledgements
79 | Title
80 | Acknowledgements
81 |
82 |
83 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-GooglePlacesAutocompleteExampleTests/Pods-GooglePlacesAutocompleteExampleTests-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_GooglePlacesAutocompleteExampleTests : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_GooglePlacesAutocompleteExampleTests
5 | @end
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-GooglePlacesAutocompleteExampleTests/Pods-GooglePlacesAutocompleteExampleTests-frameworks.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 |
4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
6 |
7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
8 |
9 | install_framework()
10 | {
11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
12 | local source="${BUILT_PRODUCTS_DIR}/$1"
13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then
14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")"
15 | elif [ -r "$1" ]; then
16 | local source="$1"
17 | fi
18 |
19 | local destination="${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
20 |
21 | if [ -L "${source}" ]; then
22 | echo "Symlinked..."
23 | source="$(readlink "${source}")"
24 | fi
25 |
26 | # use filter instead of exclude so missing patterns dont' throw errors
27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\""
28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
29 |
30 | local basename
31 | basename="$(basename -s .framework "$1")"
32 | binary="${destination}/${basename}.framework/${basename}"
33 | if ! [ -r "$binary" ]; then
34 | binary="${destination}/${basename}"
35 | fi
36 |
37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device
38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then
39 | strip_invalid_archs "$binary"
40 | fi
41 |
42 | # Resign the code if required by the build settings to avoid unstable apps
43 | code_sign_if_enabled "${destination}/$(basename "$1")"
44 |
45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7.
46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then
47 | local swift_runtime_libs
48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]})
49 | for lib in $swift_runtime_libs; do
50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\""
51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}"
52 | code_sign_if_enabled "${destination}/${lib}"
53 | done
54 | fi
55 | }
56 |
57 | # Signs a framework with the provided identity
58 | code_sign_if_enabled() {
59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
60 | # Use the current code_sign_identitiy
61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
62 | echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements \"$1\""
63 | /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1"
64 | fi
65 | }
66 |
67 | # Strip invalid architectures
68 | strip_invalid_archs() {
69 | binary="$1"
70 | # Get architectures for current file
71 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)"
72 | stripped=""
73 | for arch in $archs; do
74 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then
75 | # Strip non-valid architectures in-place
76 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1
77 | stripped="$stripped $arch"
78 | fi
79 | done
80 | if [[ "$stripped" ]]; then
81 | echo "Stripped $binary of architectures:$stripped"
82 | fi
83 | }
84 |
85 |
86 | if [[ "$CONFIGURATION" == "Debug" ]]; then
87 | install_framework "Pods-GooglePlacesAutocompleteExampleTests/FBSnapshotTestCase.framework"
88 | install_framework "Pods-GooglePlacesAutocompleteExampleTests/OHHTTPStubs.framework"
89 | fi
90 | if [[ "$CONFIGURATION" == "Release" ]]; then
91 | install_framework "Pods-GooglePlacesAutocompleteExampleTests/FBSnapshotTestCase.framework"
92 | install_framework "Pods-GooglePlacesAutocompleteExampleTests/OHHTTPStubs.framework"
93 | fi
94 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-GooglePlacesAutocompleteExampleTests/Pods-GooglePlacesAutocompleteExampleTests-resources.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 |
4 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
5 |
6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
7 | > "$RESOURCES_TO_COPY"
8 |
9 | XCASSET_FILES=()
10 |
11 | realpath() {
12 | DIRECTORY="$(cd "${1%/*}" && pwd)"
13 | FILENAME="${1##*/}"
14 | echo "$DIRECTORY/$FILENAME"
15 | }
16 |
17 | install_resource()
18 | {
19 | case $1 in
20 | *.storyboard)
21 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}"
22 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}"
23 | ;;
24 | *.xib)
25 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}"
26 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}"
27 | ;;
28 | *.framework)
29 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
30 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
31 | echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
32 | rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
33 | ;;
34 | *.xcdatamodel)
35 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\""
36 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom"
37 | ;;
38 | *.xcdatamodeld)
39 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\""
40 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd"
41 | ;;
42 | *.xcmappingmodel)
43 | echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\""
44 | xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm"
45 | ;;
46 | *.xcassets)
47 | ABSOLUTE_XCASSET_FILE=$(realpath "${PODS_ROOT}/$1")
48 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE")
49 | ;;
50 | /*)
51 | echo "$1"
52 | echo "$1" >> "$RESOURCES_TO_COPY"
53 | ;;
54 | *)
55 | echo "${PODS_ROOT}/$1"
56 | echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY"
57 | ;;
58 | esac
59 | }
60 |
61 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
62 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
63 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then
64 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
65 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
66 | fi
67 | rm -f "$RESOURCES_TO_COPY"
68 |
69 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ]
70 | then
71 | case "${TARGETED_DEVICE_FAMILY}" in
72 | 1,2)
73 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone"
74 | ;;
75 | 1)
76 | TARGET_DEVICE_ARGS="--target-device iphone"
77 | ;;
78 | 2)
79 | TARGET_DEVICE_ARGS="--target-device ipad"
80 | ;;
81 | *)
82 | TARGET_DEVICE_ARGS="--target-device mac"
83 | ;;
84 | esac
85 |
86 | # Find all other xcassets (this unfortunately includes those of path pods and other targets).
87 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d)
88 | while read line; do
89 | if [[ $line != "`realpath $PODS_ROOT`*" ]]; then
90 | XCASSET_FILES+=("$line")
91 | fi
92 | done <<<"$OTHER_XCASSETS"
93 |
94 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
95 | fi
96 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-GooglePlacesAutocompleteExampleTests/Pods-GooglePlacesAutocompleteExampleTests-umbrella.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 |
4 | FOUNDATION_EXPORT double Pods_GooglePlacesAutocompleteExampleTestsVersionNumber;
5 | FOUNDATION_EXPORT const unsigned char Pods_GooglePlacesAutocompleteExampleTestsVersionString[];
6 |
7 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-GooglePlacesAutocompleteExampleTests/Pods-GooglePlacesAutocompleteExampleTests.debug.xcconfig:
--------------------------------------------------------------------------------
1 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
4 | OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/FBSnapshotTestCase.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/OHHTTPStubs.framework/Headers"
5 | OTHER_LDFLAGS = $(inherited) -framework "FBSnapshotTestCase" -framework "OHHTTPStubs"
6 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
7 | PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-GooglePlacesAutocompleteExampleTests
8 | PODS_ROOT = ${SRCROOT}/../Pods
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-GooglePlacesAutocompleteExampleTests/Pods-GooglePlacesAutocompleteExampleTests.modulemap:
--------------------------------------------------------------------------------
1 | framework module Pods_GooglePlacesAutocompleteExampleTests {
2 | umbrella header "Pods-GooglePlacesAutocompleteExampleTests-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-GooglePlacesAutocompleteExampleTests/Pods-GooglePlacesAutocompleteExampleTests.release.xcconfig:
--------------------------------------------------------------------------------
1 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
4 | OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/FBSnapshotTestCase.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/OHHTTPStubs.framework/Headers"
5 | OTHER_LDFLAGS = $(inherited) -framework "FBSnapshotTestCase" -framework "OHHTTPStubs"
6 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
7 | PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-GooglePlacesAutocompleteExampleTests
8 | PODS_ROOT = ${SRCROOT}/../Pods
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # GooglePlacesAutocomplete
2 |
3 | [](https://travis-ci.org/watsonbox/ios_google_places_autocomplete)
4 | [](http://cocoadocs.org/docsets/GooglePlacesAutocomplete/)
5 |
6 | A simple [Google Places API](https://developers.google.com/places/documentation/autocomplete) autocompleting address entry view for iOS devices.
7 |
8 | There are already a couple of solutions out there for this. GooglePlacesAutocomplete is different because it is 100% Swift, and aims to provide the simplest possible method of entering validated, autocompleted addresses.
9 |
10 | No attempt has been made to integrate MapKit since displaying Google Places on a non-Google map is against their terms of service.
11 |
12 |
13 |
14 |  |
15 |  |
16 |
17 |
18 |
19 | ----------
20 |
21 |
22 | ## Requirements
23 |
24 | - iOS 7.0+
25 | - XCode 7.0+ / Swift 2.0
26 |
27 | ## Installation
28 |
29 | > **Embedded frameworks require a minimum deployment target of iOS 8.**
30 | >
31 | > To use GooglePlacesAutocomplete with a project targeting iOS 7, you must include the source files directly in your project. See the ['manual installation'](#manual) section for instructions.
32 |
33 | ### CocoaPods
34 |
35 | [CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects.
36 |
37 | CocoaPods 0.36 [adds supports](http://blog.cocoapods.org/CocoaPods-0.36/) for Swift and embedded frameworks. You can install it with the following command:
38 |
39 | ```bash
40 | $ gem install cocoapods
41 | ```
42 |
43 | To integrate GooglePlacesAutocomplete into your Xcode project using CocoaPods, specify it in your `Podfile`:
44 |
45 | ```ruby
46 | source 'https://github.com/CocoaPods/Specs.git'
47 | platform :ios, '8.0'
48 |
49 | pod 'GooglePlacesAutocomplete'
50 | ```
51 |
52 | Then, run the following command:
53 |
54 | ```bash
55 | $ pod install
56 | ```
57 |
58 | ### Manual
59 |
60 | Simply copy `GooglePlacesAutocomplete.swift` and `GooglePlacesAutocomplete.xib` to your project.
61 |
62 | Note: Don't forget to add the PoweredByGoogle image to your xcassets.
63 |
64 |
65 | ## Usage
66 |
67 | Use the [Google Developers Console](https://console.developers.google.com/) to enabled the 'Google Places API Web Service' and create a 'Server' API key credential. In both cases do *not* use the iOS options.
68 |
69 | ```swift
70 | import GooglePlacesAutocomplete // Not required when including source files directly in project
71 |
72 | let gpaViewController = GooglePlacesAutocomplete(
73 | apiKey: "[YOUR GOOGLE PLACES API KEY]",
74 | placeType: .Address
75 | )
76 |
77 | gpaViewController.placeDelegate = self // Conforms to GooglePlacesAutocompleteDelegate
78 |
79 | presentViewController(gpaViewController, animated: true, completion: nil)
80 | ```
81 |
82 | `GooglePlacesAutocompleteDelegate` supports three methods:
83 |
84 | - `placesFound(places: [Place])`: Invoked whenever the Google Places API is called
85 | - `placeSelected(place: Place)`: Invoked when a new place is selected
86 | - `placeViewClosed()`: Invoked when the view is closed
87 |
88 | Here's a [complete example](https://github.com/watsonbox/ios_google_places_autocomplete/blob/master/GooglePlacesAutocompleteExample/GooglePlacesAutocompleteExample/ViewController.swift).
89 |
90 | ### Place Details
91 |
92 | From Google's documentation: "you can request more details about a particular establishment or point of interest by initiating a [Place Details](https://developers.google.com/places/webservice/details) request. A Place Details request returns more comprehensive information about the indicated place such as its complete address, phone number, user rating and reviews."
93 |
94 | ```swift
95 | place.getDetails { details in
96 | println(details.name) // Convenience accessor for name
97 | println(details.latitude) // Convenience accessor for latitude
98 | println(details.longitude) // Convenience accessor for longitude
99 | println(details.raw) // Complete JSON data (see below)
100 | }
101 |
102 | /*
103 | [
104 | status: OK,
105 | result: {
106 | "address_components" = (
107 | {
108 | "long_name" = Paris;
109 | "short_name" = Paris;
110 | types = (
111 | locality,
112 | political
113 | );
114 | },
115 | ...
116 | );
117 | geometry = {
118 | location = {
119 | lat = "48.856614";
120 | lng = "2.3522219";
121 | };
122 | ...
123 | */
124 | ```
125 |
126 | See the [documentation](https://developers.google.com/places/webservice/details#PlaceDetailsResponses) for full response details.
127 |
128 | ### Location Biasing
129 |
130 | The Place Autocomplete API supports biasing results to a specified circle by passing a `location` and a `radius` parameter. This instructs the service to *prefer* showing results within that circle. Results outside of the defined area may still be displayed.
131 |
132 | ```swift
133 | gpaViewController.locationBias = LocationBias(latitude: 48.8534275, longitude: 2.3582787999999937, radius: 1000)
134 | ```
135 |
136 |
137 | ### Styling
138 |
139 | The UINavigationController appearance can also easily be changed, for example:
140 |
141 | ```swift
142 | gpaViewController.navigationBar.barStyle = UIBarStyle.Black
143 | gpaViewController.navigationBar.translucent = false
144 | gpaViewController.navigationBar.barTintColor = UIColor(red: 0.11, green: 0.27, blue: 0.53, alpha: 1.0)
145 | gpaViewController.navigationBar.tintColor = UIColor.whiteColor()
146 | gpaViewController.navigationBar.titleTextAttributes = [NSFontAttributeName: UIFont(name: "Zapfino", size: 16.0)!]
147 | ```
148 |
149 |
150 |
151 |  |
152 |
153 |
154 |
155 | Also, to change the contents of the title bar:
156 |
157 | ```swift
158 | gpaViewController.navigationItem.title = "Enter City"
159 | gpaViewController.navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.Cancel, target: gpaViewController, action: "close")
160 | ```
161 |
162 |
163 | ## Contributing
164 |
165 | 1. Fork it ( https://github.com/watsonbox/ios-google-places-autocomplete/fork )
166 | 2. Create your feature branch (`git checkout -b my-new-feature`)
167 | 3. Commit your changes (`git commit -am 'Add some feature'`)
168 | 4. Push to the branch (`git push origin my-new-feature`)
169 | 5. Create a new Pull Request
170 |
--------------------------------------------------------------------------------
/Rakefile:
--------------------------------------------------------------------------------
1 | require 'xcjobs'
2 |
3 | def destinations
4 | [ 'name=iPhone 6s,OS=9.0' ]
5 | end
6 |
7 | XCJobs::Test.new('test') do |t|
8 | t.workspace = 'GooglePlacesAutocomplete'
9 | t.scheme = 'GooglePlacesAutocompleteExample'
10 | t.configuration = 'Release'
11 | t.build_dir = 'build'
12 | t.formatter = 'xcpretty -c'
13 |
14 | destinations.each do |destination|
15 | t.add_destination(destination)
16 | end
17 | end
18 |
--------------------------------------------------------------------------------
/Screenshots/search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/watsonbox/ios_google_places_autocomplete/3b24a37eca923c5d92253122f26a2cd41f10ec5a/Screenshots/search.png
--------------------------------------------------------------------------------
/Screenshots/style.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/watsonbox/ios_google_places_autocomplete/3b24a37eca923c5d92253122f26a2cd41f10ec5a/Screenshots/style.png
--------------------------------------------------------------------------------
/Screenshots/view.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/watsonbox/ios_google_places_autocomplete/3b24a37eca923c5d92253122f26a2cd41f10ec5a/Screenshots/view.png
--------------------------------------------------------------------------------