diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..d9251fb Binary files /dev/null and b/.DS_Store differ diff --git a/PodFile b/PodFile new file mode 100644 index 0000000..3af8c7d --- /dev/null +++ b/PodFile @@ -0,0 +1,6 @@ +pod 'SDWebImage' +pod "AFNetworking" +source 'https://github.com/CocoaPods/Specs.git' +platform :ios, ‘8.1’ +pod 'GoogleMaps' +xcodeproj '/Users/diana/Desktop/Projects/c4q/unit-2/unit-2-hw-1/TalkinToTheNet/TalkinToTheNet.xcodeproj’ \ No newline at end of file diff --git a/Podfile.lock b/Podfile.lock new file mode 100644 index 0000000..f4e6fde --- /dev/null +++ b/Podfile.lock @@ -0,0 +1,38 @@ +PODS: + - AFNetworking (2.6.0): + - AFNetworking/NSURLConnection (= 2.6.0) + - AFNetworking/NSURLSession (= 2.6.0) + - AFNetworking/Reachability (= 2.6.0) + - AFNetworking/Security (= 2.6.0) + - AFNetworking/Serialization (= 2.6.0) + - AFNetworking/UIKit (= 2.6.0) + - AFNetworking/NSURLConnection (2.6.0): + - AFNetworking/Reachability + - AFNetworking/Security + - AFNetworking/Serialization + - AFNetworking/NSURLSession (2.6.0): + - AFNetworking/Reachability + - AFNetworking/Security + - AFNetworking/Serialization + - AFNetworking/Reachability (2.6.0) + - AFNetworking/Security (2.6.0) + - AFNetworking/Serialization (2.6.0) + - AFNetworking/UIKit (2.6.0): + - AFNetworking/NSURLConnection + - AFNetworking/NSURLSession + - GoogleMaps (1.10.3) + - SDWebImage (3.7.3): + - SDWebImage/Core (= 3.7.3) + - SDWebImage/Core (3.7.3) + +DEPENDENCIES: + - AFNetworking + - GoogleMaps + - SDWebImage + +SPEC CHECKSUMS: + AFNetworking: 79f7eb1a0fcfa7beb409332b2ca49afe9ce53b05 + GoogleMaps: 945e4ac3b74bcca3ddada51df256eb7beddb474d + SDWebImage: 1d2b1a1efda1ade1b00b6f8498865f8ddedc8a84 + +COCOAPODS: 0.38.2 diff --git a/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.h b/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.h new file mode 100644 index 0000000..cf6def4 --- /dev/null +++ b/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.h @@ -0,0 +1,70 @@ +// AFHTTPRequestOperation.h +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#import "AFURLConnectionOperation.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + `AFHTTPRequestOperation` is a subclass of `AFURLConnectionOperation` for requests using the HTTP or HTTPS protocols. It encapsulates the concept of acceptable status codes and content types, which determine the success or failure of a request. + */ +@interface AFHTTPRequestOperation : AFURLConnectionOperation + +///------------------------------------------------ +/// @name Getting HTTP URL Connection Information +///------------------------------------------------ + +/** + The last HTTP response received by the operation's connection. + */ +@property (readonly, nonatomic, strong, nullable) NSHTTPURLResponse *response; + +/** + Responses sent from the server in data tasks created with `dataTaskWithRequest:success:failure:` and run using the `GET` / `POST` / et al. convenience methods are automatically validated and serialized by the response serializer. By default, this property is set to an AFHTTPResponse serializer, which uses the raw data as its response object. The serializer validates the status code to be in the `2XX` range, denoting success. If the response serializer generates an error in `-responseObjectForResponse:data:error:`, the `failure` callback of the session task or request operation will be executed; otherwise, the `success` callback will be executed. + + @warning `responseSerializer` must not be `nil`. Setting a response serializer will clear out any cached value + */ +@property (nonatomic, strong) AFHTTPResponseSerializer * responseSerializer; + +/** + An object constructed by the `responseSerializer` from the response and response data. Returns `nil` unless the operation `isFinished`, has a `response`, and has `responseData` with non-zero content length. If an error occurs during serialization, `nil` will be returned, and the `error` property will be populated with the serialization error. + */ +@property (readonly, nonatomic, strong, nullable) id responseObject; + +///----------------------------------------------------------- +/// @name Setting Completion Block Success / Failure Callbacks +///----------------------------------------------------------- + +/** + Sets the `completionBlock` property with a block that executes either the specified success or failure block, depending on the state of the request on completion. If `error` returns a value, which can be caused by an unacceptable status code or content type, then `failure` is executed. Otherwise, `success` is executed. + + This method should be overridden in subclasses in order to specify the response object passed into the success block. + + @param success The block to be executed on the completion of a successful request. This block has no return value and takes two arguments: the receiver operation and the object constructed from the response data of the request. + @param failure The block to be executed on the completion of an unsuccessful request. This block has no return value and takes two arguments: the receiver operation and the error that occurred during the request. + */ +- (void)setCompletionBlockWithSuccess:(nullable void (^)(AFHTTPRequestOperation *operation, id responseObject))success + failure:(nullable void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.m b/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.m new file mode 100644 index 0000000..b8deda8 --- /dev/null +++ b/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.m @@ -0,0 +1,206 @@ +// AFHTTPRequestOperation.m +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFHTTPRequestOperation.h" + +static dispatch_queue_t http_request_operation_processing_queue() { + static dispatch_queue_t af_http_request_operation_processing_queue; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + af_http_request_operation_processing_queue = dispatch_queue_create("com.alamofire.networking.http-request.processing", DISPATCH_QUEUE_CONCURRENT); + }); + + return af_http_request_operation_processing_queue; +} + +static dispatch_group_t http_request_operation_completion_group() { + static dispatch_group_t af_http_request_operation_completion_group; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + af_http_request_operation_completion_group = dispatch_group_create(); + }); + + return af_http_request_operation_completion_group; +} + +#pragma mark - + +@interface AFURLConnectionOperation () +@property (readwrite, nonatomic, strong) NSURLRequest *request; +@property (readwrite, nonatomic, strong) NSURLResponse *response; +@end + +@interface AFHTTPRequestOperation () +@property (readwrite, nonatomic, strong) NSHTTPURLResponse *response; +@property (readwrite, nonatomic, strong) id responseObject; +@property (readwrite, nonatomic, strong) NSError *responseSerializationError; +@property (readwrite, nonatomic, strong) NSRecursiveLock *lock; +@end + +@implementation AFHTTPRequestOperation +@dynamic response; +@dynamic lock; + +- (instancetype)initWithRequest:(NSURLRequest *)urlRequest { + self = [super initWithRequest:urlRequest]; + if (!self) { + return nil; + } + + self.responseSerializer = [AFHTTPResponseSerializer serializer]; + + return self; +} + +- (void)setResponseSerializer:(AFHTTPResponseSerializer *)responseSerializer { + NSParameterAssert(responseSerializer); + + [self.lock lock]; + _responseSerializer = responseSerializer; + self.responseObject = nil; + self.responseSerializationError = nil; + [self.lock unlock]; +} + +- (id)responseObject { + [self.lock lock]; + if (!_responseObject && [self isFinished] && !self.error) { + NSError *error = nil; + self.responseObject = [self.responseSerializer responseObjectForResponse:self.response data:self.responseData error:&error]; + if (error) { + self.responseSerializationError = error; + } + } + [self.lock unlock]; + + return _responseObject; +} + +- (NSError *)error { + if (_responseSerializationError) { + return _responseSerializationError; + } else { + return [super error]; + } +} + +#pragma mark - AFHTTPRequestOperation + +- (void)setCompletionBlockWithSuccess:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success + failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure +{ + // completionBlock is manually nilled out in AFURLConnectionOperation to break the retain cycle. +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Warc-retain-cycles" +#pragma clang diagnostic ignored "-Wgnu" + self.completionBlock = ^{ + if (self.completionGroup) { + dispatch_group_enter(self.completionGroup); + } + + dispatch_async(http_request_operation_processing_queue(), ^{ + if (self.error) { + if (failure) { + dispatch_group_async(self.completionGroup ?: http_request_operation_completion_group(), self.completionQueue ?: dispatch_get_main_queue(), ^{ + failure(self, self.error); + }); + } + } else { + id responseObject = self.responseObject; + if (self.error) { + if (failure) { + dispatch_group_async(self.completionGroup ?: http_request_operation_completion_group(), self.completionQueue ?: dispatch_get_main_queue(), ^{ + failure(self, self.error); + }); + } + } else { + if (success) { + dispatch_group_async(self.completionGroup ?: http_request_operation_completion_group(), self.completionQueue ?: dispatch_get_main_queue(), ^{ + success(self, responseObject); + }); + } + } + } + + if (self.completionGroup) { + dispatch_group_leave(self.completionGroup); + } + }); + }; +#pragma clang diagnostic pop +} + +#pragma mark - AFURLRequestOperation + +- (void)pause { + [super pause]; + + u_int64_t offset = 0; + if ([self.outputStream propertyForKey:NSStreamFileCurrentOffsetKey]) { + offset = [(NSNumber *)[self.outputStream propertyForKey:NSStreamFileCurrentOffsetKey] unsignedLongLongValue]; + } else { + offset = [(NSData *)[self.outputStream propertyForKey:NSStreamDataWrittenToMemoryStreamKey] length]; + } + + NSMutableURLRequest *mutableURLRequest = [self.request mutableCopy]; + if ([self.response respondsToSelector:@selector(allHeaderFields)] && [[self.response allHeaderFields] valueForKey:@"ETag"]) { + [mutableURLRequest setValue:[[self.response allHeaderFields] valueForKey:@"ETag"] forHTTPHeaderField:@"If-Range"]; + } + [mutableURLRequest setValue:[NSString stringWithFormat:@"bytes=%llu-", offset] forHTTPHeaderField:@"Range"]; + self.request = mutableURLRequest; +} + +#pragma mark - NSSecureCoding + ++ (BOOL)supportsSecureCoding { + return YES; +} + +- (id)initWithCoder:(NSCoder *)decoder { + self = [super initWithCoder:decoder]; + if (!self) { + return nil; + } + + self.responseSerializer = [decoder decodeObjectOfClass:[AFHTTPResponseSerializer class] forKey:NSStringFromSelector(@selector(responseSerializer))]; + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [super encodeWithCoder:coder]; + + [coder encodeObject:self.responseSerializer forKey:NSStringFromSelector(@selector(responseSerializer))]; +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone { + AFHTTPRequestOperation *operation = [super copyWithZone:zone]; + + operation.responseSerializer = [self.responseSerializer copyWithZone:zone]; + operation.completionQueue = self.completionQueue; + operation.completionGroup = self.completionGroup; + + return operation; +} + +@end diff --git a/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.h b/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.h new file mode 100644 index 0000000..d2385ed --- /dev/null +++ b/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.h @@ -0,0 +1,326 @@ +// AFHTTPRequestOperationManager.h +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#import +#import + +#if __IPHONE_OS_VERSION_MIN_REQUIRED +#import +#else +#import +#endif + +#import "AFHTTPRequestOperation.h" +#import "AFURLResponseSerialization.h" +#import "AFURLRequestSerialization.h" +#import "AFSecurityPolicy.h" +#import "AFNetworkReachabilityManager.h" + +#ifndef NS_DESIGNATED_INITIALIZER +#if __has_attribute(objc_designated_initializer) +#define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +#else +#define NS_DESIGNATED_INITIALIZER +#endif +#endif + +NS_ASSUME_NONNULL_BEGIN + +/** + `AFHTTPRequestOperationManager` encapsulates the common patterns of communicating with a web application over HTTP, including request creation, response serialization, network reachability monitoring, and security, as well as request operation management. + + ## Subclassing Notes + + Developers targeting iOS 7 or Mac OS X 10.9 or later that deal extensively with a web service are encouraged to subclass `AFHTTPSessionManager`, providing a class method that returns a shared singleton object on which authentication and other configuration can be shared across the application. + + For developers targeting iOS 6 or Mac OS X 10.8 or earlier, `AFHTTPRequestOperationManager` may be used to similar effect. + + ## Methods to Override + + To change the behavior of all request operation construction for an `AFHTTPRequestOperationManager` subclass, override `HTTPRequestOperationWithRequest:success:failure`. + + ## Serialization + + Requests created by an HTTP client will contain default headers and encode parameters according to the `requestSerializer` property, which is an object conforming to ``. + + Responses received from the server are automatically validated and serialized by the `responseSerializers` property, which is an object conforming to `` + + ## URL Construction Using Relative Paths + + For HTTP convenience methods, the request serializer constructs URLs from the path relative to the `-baseURL`, using `NSURL +URLWithString:relativeToURL:`, when provided. If `baseURL` is `nil`, `path` needs to resolve to a valid `NSURL` object using `NSURL +URLWithString:`. + + Below are a few examples of how `baseURL` and relative paths interact: + + NSURL *baseURL = [NSURL URLWithString:@"http://example.com/v1/"]; + [NSURL URLWithString:@"foo" relativeToURL:baseURL]; // http://example.com/v1/foo + [NSURL URLWithString:@"foo?bar=baz" relativeToURL:baseURL]; // http://example.com/v1/foo?bar=baz + [NSURL URLWithString:@"/foo" relativeToURL:baseURL]; // http://example.com/foo + [NSURL URLWithString:@"foo/" relativeToURL:baseURL]; // http://example.com/v1/foo + [NSURL URLWithString:@"/foo/" relativeToURL:baseURL]; // http://example.com/foo/ + [NSURL URLWithString:@"http://example2.com/" relativeToURL:baseURL]; // http://example2.com/ + + Also important to note is that a trailing slash will be added to any `baseURL` without one. This would otherwise cause unexpected behavior when constructing URLs using paths without a leading slash. + + ## Network Reachability Monitoring + + Network reachability status and change monitoring is available through the `reachabilityManager` property. Applications may choose to monitor network reachability conditions in order to prevent or suspend any outbound requests. See `AFNetworkReachabilityManager` for more details. + + ## NSSecureCoding & NSCopying Caveats + + `AFHTTPRequestOperationManager` conforms to the `NSSecureCoding` and `NSCopying` protocols, allowing operations to be archived to disk, and copied in memory, respectively. There are a few minor caveats to keep in mind, however: + + - Archives and copies of HTTP clients will be initialized with an empty operation queue. + - NSSecureCoding cannot serialize / deserialize block properties, so an archive of an HTTP client will not include any reachability callback block that may be set. + */ +@interface AFHTTPRequestOperationManager : NSObject + +/** + The URL used to monitor reachability, and construct requests from relative paths in methods like `requestWithMethod:URLString:parameters:`, and the `GET` / `POST` / et al. convenience methods. + */ +@property (readonly, nonatomic, strong, nullable) NSURL *baseURL; + +/** + Requests created with `requestWithMethod:URLString:parameters:` & `multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:` are constructed with a set of default headers using a parameter serialization specified by this property. By default, this is set to an instance of `AFHTTPRequestSerializer`, which serializes query string parameters for `GET`, `HEAD`, and `DELETE` requests, or otherwise URL-form-encodes HTTP message bodies. + + @warning `requestSerializer` must not be `nil`. + */ +@property (nonatomic, strong) AFHTTPRequestSerializer * requestSerializer; + +/** + Responses sent from the server in data tasks created with `dataTaskWithRequest:success:failure:` and run using the `GET` / `POST` / et al. convenience methods are automatically validated and serialized by the response serializer. By default, this property is set to a JSON serializer, which serializes data from responses with a `application/json` MIME type, and falls back to the raw data object. The serializer validates the status code to be in the `2XX` range, denoting success. If the response serializer generates an error in `-responseObjectForResponse:data:error:`, the `failure` callback of the session task or request operation will be executed; otherwise, the `success` callback will be executed. + + @warning `responseSerializer` must not be `nil`. + */ +@property (nonatomic, strong) AFHTTPResponseSerializer * responseSerializer; + +/** + The operation queue on which request operations are scheduled and run. + */ +@property (nonatomic, strong) NSOperationQueue *operationQueue; + +///------------------------------- +/// @name Managing URL Credentials +///------------------------------- + +/** + Whether request operations should consult the credential storage for authenticating the connection. `YES` by default. + + @see AFURLConnectionOperation -shouldUseCredentialStorage + */ +@property (nonatomic, assign) BOOL shouldUseCredentialStorage; + +/** + The credential used by request operations for authentication challenges. + + @see AFURLConnectionOperation -credential + */ +@property (nonatomic, strong, nullable) NSURLCredential *credential; + +///------------------------------- +/// @name Managing Security Policy +///------------------------------- + +/** + The security policy used by created request operations to evaluate server trust for secure connections. `AFHTTPRequestOperationManager` uses the `defaultPolicy` unless otherwise specified. + */ +@property (nonatomic, strong) AFSecurityPolicy *securityPolicy; + +///------------------------------------ +/// @name Managing Network Reachability +///------------------------------------ + +/** + The network reachability manager. `AFHTTPRequestOperationManager` uses the `sharedManager` by default. + */ +@property (readwrite, nonatomic, strong) AFNetworkReachabilityManager *reachabilityManager; + +///------------------------------- +/// @name Managing Callback Queues +///------------------------------- + +/** + The dispatch queue for the `completionBlock` of request operations. If `NULL` (default), the main queue is used. + */ +#if OS_OBJECT_HAVE_OBJC_SUPPORT +@property (nonatomic, strong, nullable) dispatch_queue_t completionQueue; +#else +@property (nonatomic, assign, nullable) dispatch_queue_t completionQueue; +#endif + +/** + The dispatch group for the `completionBlock` of request operations. If `NULL` (default), a private dispatch group is used. + */ +#if OS_OBJECT_HAVE_OBJC_SUPPORT +@property (nonatomic, strong, nullable) dispatch_group_t completionGroup; +#else +@property (nonatomic, assign, nullable) dispatch_group_t completionGroup; +#endif + +///--------------------------------------------- +/// @name Creating and Initializing HTTP Clients +///--------------------------------------------- + +/** + Creates and returns an `AFHTTPRequestOperationManager` object. + */ ++ (instancetype)manager; + +/** + Initializes an `AFHTTPRequestOperationManager` object with the specified base URL. + + This is the designated initializer. + + @param url The base URL for the HTTP client. + + @return The newly-initialized HTTP client + */ +- (instancetype)initWithBaseURL:(nullable NSURL *)url NS_DESIGNATED_INITIALIZER; + +///--------------------------------------- +/// @name Managing HTTP Request Operations +///--------------------------------------- + +/** + Creates an `AFHTTPRequestOperation`, and sets the response serializers to that of the HTTP client. + + @param request The request object to be loaded asynchronously during execution of the operation. + @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the created request operation and the object created from the response data of request. + @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes two arguments:, the created request operation and the `NSError` object describing the network or parsing error that occurred. + */ +- (AFHTTPRequestOperation *)HTTPRequestOperationWithRequest:(NSURLRequest *)request + success:(nullable void (^)(AFHTTPRequestOperation *operation, id responseObject))success + failure:(nullable void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; + +///--------------------------- +/// @name Making HTTP Requests +///--------------------------- + +/** + Creates and runs an `AFHTTPRequestOperation` with a `GET` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer. + @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred. + + @see -HTTPRequestOperationWithRequest:success:failure: + */ +- (nullable AFHTTPRequestOperation *)GET:(NSString *)URLString + parameters:(nullable id)parameters + success:(nullable void (^)(AFHTTPRequestOperation *operation, id responseObject))success + failure:(nullable void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; + +/** + Creates and runs an `AFHTTPRequestOperation` with a `HEAD` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes a single arguments: the request operation. + @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred. + + @see -HTTPRequestOperationWithRequest:success:failure: + */ +- (nullable AFHTTPRequestOperation *)HEAD:(NSString *)URLString + parameters:(nullable id)parameters + success:(nullable void (^)(AFHTTPRequestOperation *operation))success + failure:(nullable void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; + +/** + Creates and runs an `AFHTTPRequestOperation` with a `POST` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer. + @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred. + + @see -HTTPRequestOperationWithRequest:success:failure: + */ +- (nullable AFHTTPRequestOperation *)POST:(NSString *)URLString + parameters:(nullable id)parameters + success:(nullable void (^)(AFHTTPRequestOperation *operation, id responseObject))success + failure:(nullable void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; + +/** + Creates and runs an `AFHTTPRequestOperation` with a multipart `POST` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param block A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the `AFMultipartFormData` protocol. + @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer. + @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred. + + @see -HTTPRequestOperationWithRequest:success:failure: + */ +- (nullable AFHTTPRequestOperation *)POST:(NSString *)URLString + parameters:(nullable id)parameters + constructingBodyWithBlock:(nullable void (^)(id formData))block + success:(nullable void (^)(AFHTTPRequestOperation *operation, id responseObject))success + failure:(nullable void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; + +/** + Creates and runs an `AFHTTPRequestOperation` with a `PUT` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer. + @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred. + + @see -HTTPRequestOperationWithRequest:success:failure: + */ +- (nullable AFHTTPRequestOperation *)PUT:(NSString *)URLString + parameters:(nullable id)parameters + success:(nullable void (^)(AFHTTPRequestOperation *operation, id responseObject))success + failure:(nullable void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; + +/** + Creates and runs an `AFHTTPRequestOperation` with a `PATCH` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer. + @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred. + + @see -HTTPRequestOperationWithRequest:success:failure: + */ +- (nullable AFHTTPRequestOperation *)PATCH:(NSString *)URLString + parameters:(nullable id)parameters + success:(nullable void (^)(AFHTTPRequestOperation *operation, id responseObject))success + failure:(nullable void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; + +/** + Creates and runs an `AFHTTPRequestOperation` with a `DELETE` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer. + @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred. + + @see -HTTPRequestOperationWithRequest:success:failure: + */ +- (nullable AFHTTPRequestOperation *)DELETE:(NSString *)URLString + parameters:(nullable id)parameters + success:(nullable void (^)(AFHTTPRequestOperation *operation, id responseObject))success + failure:(nullable void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.m b/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.m new file mode 100644 index 0000000..60739e5 --- /dev/null +++ b/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.m @@ -0,0 +1,284 @@ +// AFHTTPRequestOperationManager.m +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#import "AFHTTPRequestOperationManager.h" +#import "AFHTTPRequestOperation.h" + +#import +#import + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#import +#endif + +@interface AFHTTPRequestOperationManager () +@property (readwrite, nonatomic, strong) NSURL *baseURL; +@end + +@implementation AFHTTPRequestOperationManager + ++ (instancetype)manager { + return [[self alloc] initWithBaseURL:nil]; +} + +- (instancetype)init { + return [self initWithBaseURL:nil]; +} + +- (instancetype)initWithBaseURL:(NSURL *)url { + self = [super init]; + if (!self) { + return nil; + } + + // Ensure terminal slash for baseURL path, so that NSURL +URLWithString:relativeToURL: works as expected + if ([[url path] length] > 0 && ![[url absoluteString] hasSuffix:@"/"]) { + url = [url URLByAppendingPathComponent:@""]; + } + + self.baseURL = url; + + self.requestSerializer = [AFHTTPRequestSerializer serializer]; + self.responseSerializer = [AFJSONResponseSerializer serializer]; + + self.securityPolicy = [AFSecurityPolicy defaultPolicy]; + + self.reachabilityManager = [AFNetworkReachabilityManager sharedManager]; + + self.operationQueue = [[NSOperationQueue alloc] init]; + + self.shouldUseCredentialStorage = YES; + + return self; +} + +#pragma mark - + +#ifdef _SYSTEMCONFIGURATION_H +#endif + +- (void)setRequestSerializer:(AFHTTPRequestSerializer *)requestSerializer { + NSParameterAssert(requestSerializer); + + _requestSerializer = requestSerializer; +} + +- (void)setResponseSerializer:(AFHTTPResponseSerializer *)responseSerializer { + NSParameterAssert(responseSerializer); + + _responseSerializer = responseSerializer; +} + +#pragma mark - + +- (AFHTTPRequestOperation *)HTTPRequestOperationWithHTTPMethod:(NSString *)method + URLString:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success + failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure +{ + NSError *serializationError = nil; + NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:method URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters error:&serializationError]; + if (serializationError) { + if (failure) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu" + dispatch_async(self.completionQueue ?: dispatch_get_main_queue(), ^{ + failure(nil, serializationError); + }); +#pragma clang diagnostic pop + } + + return nil; + } + + return [self HTTPRequestOperationWithRequest:request success:success failure:failure]; +} + +- (AFHTTPRequestOperation *)HTTPRequestOperationWithRequest:(NSURLRequest *)request + success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success + failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure +{ + AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:request]; + operation.responseSerializer = self.responseSerializer; + operation.shouldUseCredentialStorage = self.shouldUseCredentialStorage; + operation.credential = self.credential; + operation.securityPolicy = self.securityPolicy; + + [operation setCompletionBlockWithSuccess:success failure:failure]; + operation.completionQueue = self.completionQueue; + operation.completionGroup = self.completionGroup; + + return operation; +} + +#pragma mark - + +- (AFHTTPRequestOperation *)GET:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success + failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure +{ + AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithHTTPMethod:@"GET" URLString:URLString parameters:parameters success:success failure:failure]; + + [self.operationQueue addOperation:operation]; + + return operation; +} + +- (AFHTTPRequestOperation *)HEAD:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(AFHTTPRequestOperation *operation))success + failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure +{ + AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithHTTPMethod:@"HEAD" URLString:URLString parameters:parameters success:^(AFHTTPRequestOperation *requestOperation, __unused id responseObject) { + if (success) { + success(requestOperation); + } + } failure:failure]; + + [self.operationQueue addOperation:operation]; + + return operation; +} + +- (AFHTTPRequestOperation *)POST:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success + failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure +{ + AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithHTTPMethod:@"POST" URLString:URLString parameters:parameters success:success failure:failure]; + + [self.operationQueue addOperation:operation]; + + return operation; +} + +- (AFHTTPRequestOperation *)POST:(NSString *)URLString + parameters:(id)parameters + constructingBodyWithBlock:(void (^)(id formData))block + success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success + failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure +{ + NSError *serializationError = nil; + NSMutableURLRequest *request = [self.requestSerializer multipartFormRequestWithMethod:@"POST" URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters constructingBodyWithBlock:block error:&serializationError]; + if (serializationError) { + if (failure) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu" + dispatch_async(self.completionQueue ?: dispatch_get_main_queue(), ^{ + failure(nil, serializationError); + }); +#pragma clang diagnostic pop + } + + return nil; + } + + AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithRequest:request success:success failure:failure]; + + [self.operationQueue addOperation:operation]; + + return operation; +} + +- (AFHTTPRequestOperation *)PUT:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success + failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure +{ + AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithHTTPMethod:@"PUT" URLString:URLString parameters:parameters success:success failure:failure]; + + [self.operationQueue addOperation:operation]; + + return operation; +} + +- (AFHTTPRequestOperation *)PATCH:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success + failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure +{ + AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithHTTPMethod:@"PATCH" URLString:URLString parameters:parameters success:success failure:failure]; + + [self.operationQueue addOperation:operation]; + + return operation; +} + +- (AFHTTPRequestOperation *)DELETE:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success + failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure +{ + AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithHTTPMethod:@"DELETE" URLString:URLString parameters:parameters success:success failure:failure]; + + [self.operationQueue addOperation:operation]; + + return operation; +} + +#pragma mark - NSObject + +- (NSString *)description { + return [NSString stringWithFormat:@"<%@: %p, baseURL: %@, operationQueue: %@>", NSStringFromClass([self class]), self, [self.baseURL absoluteString], self.operationQueue]; +} + +#pragma mark - NSSecureCoding + ++ (BOOL)supportsSecureCoding { + return YES; +} + +- (id)initWithCoder:(NSCoder *)decoder { + NSURL *baseURL = [decoder decodeObjectForKey:NSStringFromSelector(@selector(baseURL))]; + + self = [self initWithBaseURL:baseURL]; + if (!self) { + return nil; + } + + self.requestSerializer = [decoder decodeObjectOfClass:[AFHTTPRequestSerializer class] forKey:NSStringFromSelector(@selector(requestSerializer))]; + self.responseSerializer = [decoder decodeObjectOfClass:[AFHTTPResponseSerializer class] forKey:NSStringFromSelector(@selector(responseSerializer))]; + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [coder encodeObject:self.baseURL forKey:NSStringFromSelector(@selector(baseURL))]; + [coder encodeObject:self.requestSerializer forKey:NSStringFromSelector(@selector(requestSerializer))]; + [coder encodeObject:self.responseSerializer forKey:NSStringFromSelector(@selector(responseSerializer))]; +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone { + AFHTTPRequestOperationManager *HTTPClient = [[[self class] allocWithZone:zone] initWithBaseURL:self.baseURL]; + + HTTPClient.requestSerializer = [self.requestSerializer copyWithZone:zone]; + HTTPClient.responseSerializer = [self.responseSerializer copyWithZone:zone]; + + return HTTPClient; +} + +@end diff --git a/Pods/AFNetworking/AFNetworking/AFHTTPSessionManager.h b/Pods/AFNetworking/AFNetworking/AFHTTPSessionManager.h new file mode 100644 index 0000000..e516e6d --- /dev/null +++ b/Pods/AFNetworking/AFNetworking/AFHTTPSessionManager.h @@ -0,0 +1,253 @@ +// AFHTTPSessionManager.h +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#if !TARGET_OS_WATCH +#import +#endif +#import + +#if __IPHONE_OS_VERSION_MIN_REQUIRED +#import +#else +#import +#endif + +#import "AFURLSessionManager.h" + +#ifndef NS_DESIGNATED_INITIALIZER +#if __has_attribute(objc_designated_initializer) +#define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +#else +#define NS_DESIGNATED_INITIALIZER +#endif +#endif + +/** + `AFHTTPSessionManager` is a subclass of `AFURLSessionManager` with convenience methods for making HTTP requests. When a `baseURL` is provided, requests made with the `GET` / `POST` / et al. convenience methods can be made with relative paths. + + ## Subclassing Notes + + Developers targeting iOS 7 or Mac OS X 10.9 or later that deal extensively with a web service are encouraged to subclass `AFHTTPSessionManager`, providing a class method that returns a shared singleton object on which authentication and other configuration can be shared across the application. + + For developers targeting iOS 6 or Mac OS X 10.8 or earlier, `AFHTTPRequestOperationManager` may be used to similar effect. + + ## Methods to Override + + To change the behavior of all data task operation construction, which is also used in the `GET` / `POST` / et al. convenience methods, override `dataTaskWithRequest:completionHandler:`. + + ## Serialization + + Requests created by an HTTP client will contain default headers and encode parameters according to the `requestSerializer` property, which is an object conforming to ``. + + Responses received from the server are automatically validated and serialized by the `responseSerializers` property, which is an object conforming to `` + + ## URL Construction Using Relative Paths + + For HTTP convenience methods, the request serializer constructs URLs from the path relative to the `-baseURL`, using `NSURL +URLWithString:relativeToURL:`, when provided. If `baseURL` is `nil`, `path` needs to resolve to a valid `NSURL` object using `NSURL +URLWithString:`. + + Below are a few examples of how `baseURL` and relative paths interact: + + NSURL *baseURL = [NSURL URLWithString:@"http://example.com/v1/"]; + [NSURL URLWithString:@"foo" relativeToURL:baseURL]; // http://example.com/v1/foo + [NSURL URLWithString:@"foo?bar=baz" relativeToURL:baseURL]; // http://example.com/v1/foo?bar=baz + [NSURL URLWithString:@"/foo" relativeToURL:baseURL]; // http://example.com/foo + [NSURL URLWithString:@"foo/" relativeToURL:baseURL]; // http://example.com/v1/foo + [NSURL URLWithString:@"/foo/" relativeToURL:baseURL]; // http://example.com/foo/ + [NSURL URLWithString:@"http://example2.com/" relativeToURL:baseURL]; // http://example2.com/ + + Also important to note is that a trailing slash will be added to any `baseURL` without one. This would otherwise cause unexpected behavior when constructing URLs using paths without a leading slash. + + @warning Managers for background sessions must be owned for the duration of their use. This can be accomplished by creating an application-wide or shared singleton instance. + */ + +#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) || TARGET_OS_WATCH + +NS_ASSUME_NONNULL_BEGIN + +@interface AFHTTPSessionManager : AFURLSessionManager + +/** + The URL used to construct requests from relative paths in methods like `requestWithMethod:URLString:parameters:`, and the `GET` / `POST` / et al. convenience methods. + */ +@property (readonly, nonatomic, strong, nullable) NSURL *baseURL; + +/** + Requests created with `requestWithMethod:URLString:parameters:` & `multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:` are constructed with a set of default headers using a parameter serialization specified by this property. By default, this is set to an instance of `AFHTTPRequestSerializer`, which serializes query string parameters for `GET`, `HEAD`, and `DELETE` requests, or otherwise URL-form-encodes HTTP message bodies. + + @warning `requestSerializer` must not be `nil`. + */ +@property (nonatomic, strong) AFHTTPRequestSerializer * requestSerializer; + +/** + Responses sent from the server in data tasks created with `dataTaskWithRequest:success:failure:` and run using the `GET` / `POST` / et al. convenience methods are automatically validated and serialized by the response serializer. By default, this property is set to an instance of `AFJSONResponseSerializer`. + + @warning `responseSerializer` must not be `nil`. + */ +@property (nonatomic, strong) AFHTTPResponseSerializer * responseSerializer; + +///--------------------- +/// @name Initialization +///--------------------- + +/** + Creates and returns an `AFHTTPSessionManager` object. + */ ++ (instancetype)manager; + +/** + Initializes an `AFHTTPSessionManager` object with the specified base URL. + + @param url The base URL for the HTTP client. + + @return The newly-initialized HTTP client + */ +- (instancetype)initWithBaseURL:(nullable NSURL *)url; + +/** + Initializes an `AFHTTPSessionManager` object with the specified base URL. + + This is the designated initializer. + + @param url The base URL for the HTTP client. + @param configuration The configuration used to create the managed session. + + @return The newly-initialized HTTP client + */ +- (instancetype)initWithBaseURL:(nullable NSURL *)url + sessionConfiguration:(nullable NSURLSessionConfiguration *)configuration NS_DESIGNATED_INITIALIZER; + +///--------------------------- +/// @name Making HTTP Requests +///--------------------------- + +/** + Creates and runs an `NSURLSessionDataTask` with a `GET` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer. + @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred. + + @see -dataTaskWithRequest:completionHandler: + */ +- (nullable NSURLSessionDataTask *)GET:(NSString *)URLString + parameters:(nullable id)parameters + success:(nullable void (^)(NSURLSessionDataTask *task, id responseObject))success + failure:(nullable void (^)(NSURLSessionDataTask *task, NSError *error))failure; + +/** + Creates and runs an `NSURLSessionDataTask` with a `HEAD` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param success A block object to be executed when the task finishes successfully. This block has no return value and takes a single arguments: the data task. + @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred. + + @see -dataTaskWithRequest:completionHandler: + */ +- (nullable NSURLSessionDataTask *)HEAD:(NSString *)URLString + parameters:(nullable id)parameters + success:(nullable void (^)(NSURLSessionDataTask *task))success + failure:(nullable void (^)(NSURLSessionDataTask *task, NSError *error))failure; + +/** + Creates and runs an `NSURLSessionDataTask` with a `POST` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer. + @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred. + + @see -dataTaskWithRequest:completionHandler: + */ +- (nullable NSURLSessionDataTask *)POST:(NSString *)URLString + parameters:(nullable id)parameters + success:(nullable void (^)(NSURLSessionDataTask *task, id responseObject))success + failure:(nullable void (^)(NSURLSessionDataTask *task, NSError *error))failure; + +/** + Creates and runs an `NSURLSessionDataTask` with a multipart `POST` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param block A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the `AFMultipartFormData` protocol. + @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer. + @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred. + + @see -dataTaskWithRequest:completionHandler: + */ +- (nullable NSURLSessionDataTask *)POST:(NSString *)URLString + parameters:(nullable id)parameters + constructingBodyWithBlock:(nullable void (^)(id formData))block + success:(nullable void (^)(NSURLSessionDataTask *task, id responseObject))success + failure:(nullable void (^)(NSURLSessionDataTask *task, NSError *error))failure; + +/** + Creates and runs an `NSURLSessionDataTask` with a `PUT` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer. + @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred. + + @see -dataTaskWithRequest:completionHandler: + */ +- (nullable NSURLSessionDataTask *)PUT:(NSString *)URLString + parameters:(nullable id)parameters + success:(nullable void (^)(NSURLSessionDataTask *task, id responseObject))success + failure:(nullable void (^)(NSURLSessionDataTask *task, NSError *error))failure; + +/** + Creates and runs an `NSURLSessionDataTask` with a `PATCH` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer. + @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred. + + @see -dataTaskWithRequest:completionHandler: + */ +- (nullable NSURLSessionDataTask *)PATCH:(NSString *)URLString + parameters:(nullable id)parameters + success:(nullable void (^)(NSURLSessionDataTask *task, id responseObject))success + failure:(nullable void (^)(NSURLSessionDataTask *task, NSError *error))failure; + +/** + Creates and runs an `NSURLSessionDataTask` with a `DELETE` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer. + @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred. + + @see -dataTaskWithRequest:completionHandler: + */ +- (nullable NSURLSessionDataTask *)DELETE:(NSString *)URLString + parameters:(nullable id)parameters + success:(nullable void (^)(NSURLSessionDataTask *task, id responseObject))success + failure:(nullable void (^)(NSURLSessionDataTask *task, NSError *error))failure; + +@end + +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/AFNetworking/AFNetworking/AFHTTPSessionManager.m b/Pods/AFNetworking/AFNetworking/AFHTTPSessionManager.m new file mode 100644 index 0000000..bd9163f --- /dev/null +++ b/Pods/AFNetworking/AFNetworking/AFHTTPSessionManager.m @@ -0,0 +1,323 @@ +// AFHTTPSessionManager.m +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFHTTPSessionManager.h" + +#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) || TARGET_WATCH_OS + +#import "AFURLRequestSerialization.h" +#import "AFURLResponseSerialization.h" + +#import +#import + +#ifdef _SYSTEMCONFIGURATION_H +#import +#import +#import +#import +#import +#endif + +#if TARGET_OS_IOS +#import +#elif TARGET_OS_WATCH +#import +#endif + +@interface AFHTTPSessionManager () +@property (readwrite, nonatomic, strong) NSURL *baseURL; +@end + +@implementation AFHTTPSessionManager +@dynamic responseSerializer; + ++ (instancetype)manager { + return [[[self class] alloc] initWithBaseURL:nil]; +} + +- (instancetype)init { + return [self initWithBaseURL:nil]; +} + +- (instancetype)initWithBaseURL:(NSURL *)url { + return [self initWithBaseURL:url sessionConfiguration:nil]; +} + +- (instancetype)initWithSessionConfiguration:(NSURLSessionConfiguration *)configuration { + return [self initWithBaseURL:nil sessionConfiguration:configuration]; +} + +- (instancetype)initWithBaseURL:(NSURL *)url + sessionConfiguration:(NSURLSessionConfiguration *)configuration +{ + self = [super initWithSessionConfiguration:configuration]; + if (!self) { + return nil; + } + + // Ensure terminal slash for baseURL path, so that NSURL +URLWithString:relativeToURL: works as expected + if ([[url path] length] > 0 && ![[url absoluteString] hasSuffix:@"/"]) { + url = [url URLByAppendingPathComponent:@""]; + } + + self.baseURL = url; + + self.requestSerializer = [AFHTTPRequestSerializer serializer]; + self.responseSerializer = [AFJSONResponseSerializer serializer]; + + return self; +} + +#pragma mark - + +#ifdef _SYSTEMCONFIGURATION_H +#endif + +- (void)setRequestSerializer:(AFHTTPRequestSerializer *)requestSerializer { + NSParameterAssert(requestSerializer); + + _requestSerializer = requestSerializer; +} + +- (void)setResponseSerializer:(AFHTTPResponseSerializer *)responseSerializer { + NSParameterAssert(responseSerializer); + + [super setResponseSerializer:responseSerializer]; +} + +#pragma mark - + +- (NSURLSessionDataTask *)GET:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(NSURLSessionDataTask *task, id responseObject))success + failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure +{ + NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"GET" URLString:URLString parameters:parameters success:success failure:failure]; + + [dataTask resume]; + + return dataTask; +} + +- (NSURLSessionDataTask *)HEAD:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(NSURLSessionDataTask *task))success + failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure +{ + NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"HEAD" URLString:URLString parameters:parameters success:^(NSURLSessionDataTask *task, __unused id responseObject) { + if (success) { + success(task); + } + } failure:failure]; + + [dataTask resume]; + + return dataTask; +} + +- (NSURLSessionDataTask *)POST:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(NSURLSessionDataTask *task, id responseObject))success + failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure +{ + NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"POST" URLString:URLString parameters:parameters success:success failure:failure]; + + [dataTask resume]; + + return dataTask; +} + +- (NSURLSessionDataTask *)POST:(NSString *)URLString + parameters:(id)parameters + constructingBodyWithBlock:(void (^)(id formData))block + success:(void (^)(NSURLSessionDataTask *task, id responseObject))success + failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure +{ + NSError *serializationError = nil; + NSMutableURLRequest *request = [self.requestSerializer multipartFormRequestWithMethod:@"POST" URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters constructingBodyWithBlock:block error:&serializationError]; + if (serializationError) { + if (failure) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu" + dispatch_async(self.completionQueue ?: dispatch_get_main_queue(), ^{ + failure(nil, serializationError); + }); +#pragma clang diagnostic pop + } + + return nil; + } + + __block NSURLSessionDataTask *task = [self uploadTaskWithStreamedRequest:request progress:nil completionHandler:^(NSURLResponse * __unused response, id responseObject, NSError *error) { + if (error) { + if (failure) { + failure(task, error); + } + } else { + if (success) { + success(task, responseObject); + } + } + }]; + + [task resume]; + + return task; +} + +- (NSURLSessionDataTask *)PUT:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(NSURLSessionDataTask *task, id responseObject))success + failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure +{ + NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"PUT" URLString:URLString parameters:parameters success:success failure:failure]; + + [dataTask resume]; + + return dataTask; +} + +- (NSURLSessionDataTask *)PATCH:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(NSURLSessionDataTask *task, id responseObject))success + failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure +{ + NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"PATCH" URLString:URLString parameters:parameters success:success failure:failure]; + + [dataTask resume]; + + return dataTask; +} + +- (NSURLSessionDataTask *)DELETE:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(NSURLSessionDataTask *task, id responseObject))success + failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure +{ + NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"DELETE" URLString:URLString parameters:parameters success:success failure:failure]; + + [dataTask resume]; + + return dataTask; +} + +- (NSURLSessionDataTask *)dataTaskWithHTTPMethod:(NSString *)method + URLString:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(NSURLSessionDataTask *, id))success + failure:(void (^)(NSURLSessionDataTask *, NSError *))failure +{ + NSError *serializationError = nil; + NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:method URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters error:&serializationError]; + if (serializationError) { + if (failure) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu" + dispatch_async(self.completionQueue ?: dispatch_get_main_queue(), ^{ + failure(nil, serializationError); + }); +#pragma clang diagnostic pop + } + + return nil; + } + + __block NSURLSessionDataTask *dataTask = nil; + dataTask = [self dataTaskWithRequest:request completionHandler:^(NSURLResponse * __unused response, id responseObject, NSError *error) { + if (error) { + if (failure) { + failure(dataTask, error); + } + } else { + if (success) { + success(dataTask, responseObject); + } + } + }]; + + return dataTask; +} + +#pragma mark - NSObject + +- (NSString *)description { + return [NSString stringWithFormat:@"<%@: %p, baseURL: %@, session: %@, operationQueue: %@>", NSStringFromClass([self class]), self, [self.baseURL absoluteString], self.session, self.operationQueue]; +} + +#pragma mark - NSSecureCoding + ++ (BOOL)supportsSecureCoding { + return YES; +} + +- (id)initWithCoder:(NSCoder *)decoder { + NSURL *baseURL = [decoder decodeObjectOfClass:[NSURL class] forKey:NSStringFromSelector(@selector(baseURL))]; + NSURLSessionConfiguration *configuration = [decoder decodeObjectOfClass:[NSURLSessionConfiguration class] forKey:@"sessionConfiguration"]; + if (!configuration) { + NSString *configurationIdentifier = [decoder decodeObjectOfClass:[NSString class] forKey:@"identifier"]; + if (configurationIdentifier) { +#if (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1100) + configuration = [NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier:configurationIdentifier]; +#else + configuration = [NSURLSessionConfiguration backgroundSessionConfiguration:configurationIdentifier]; +#endif + } + } + + self = [self initWithBaseURL:baseURL sessionConfiguration:configuration]; + if (!self) { + return nil; + } + + self.requestSerializer = [decoder decodeObjectOfClass:[AFHTTPRequestSerializer class] forKey:NSStringFromSelector(@selector(requestSerializer))]; + self.responseSerializer = [decoder decodeObjectOfClass:[AFHTTPResponseSerializer class] forKey:NSStringFromSelector(@selector(responseSerializer))]; + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [super encodeWithCoder:coder]; + + [coder encodeObject:self.baseURL forKey:NSStringFromSelector(@selector(baseURL))]; + if ([self.session.configuration conformsToProtocol:@protocol(NSCoding)]) { + [coder encodeObject:self.session.configuration forKey:@"sessionConfiguration"]; + } else { + [coder encodeObject:self.session.configuration.identifier forKey:@"identifier"]; + } + [coder encodeObject:self.requestSerializer forKey:NSStringFromSelector(@selector(requestSerializer))]; + [coder encodeObject:self.responseSerializer forKey:NSStringFromSelector(@selector(responseSerializer))]; +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone { + AFHTTPSessionManager *HTTPClient = [[[self class] allocWithZone:zone] initWithBaseURL:self.baseURL sessionConfiguration:self.session.configuration]; + + HTTPClient.requestSerializer = [self.requestSerializer copyWithZone:zone]; + HTTPClient.responseSerializer = [self.responseSerializer copyWithZone:zone]; + + return HTTPClient; +} + +@end + +#endif diff --git a/Pods/AFNetworking/AFNetworking/AFNetworkReachabilityManager.h b/Pods/AFNetworking/AFNetworking/AFNetworkReachabilityManager.h new file mode 100644 index 0000000..5a44507 --- /dev/null +++ b/Pods/AFNetworking/AFNetworking/AFNetworkReachabilityManager.h @@ -0,0 +1,207 @@ +// AFNetworkReachabilityManager.h +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#if !TARGET_OS_WATCH +#import + +#ifndef NS_DESIGNATED_INITIALIZER +#if __has_attribute(objc_designated_initializer) +#define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +#else +#define NS_DESIGNATED_INITIALIZER +#endif +#endif + +typedef NS_ENUM(NSInteger, AFNetworkReachabilityStatus) { + AFNetworkReachabilityStatusUnknown = -1, + AFNetworkReachabilityStatusNotReachable = 0, + AFNetworkReachabilityStatusReachableViaWWAN = 1, + AFNetworkReachabilityStatusReachableViaWiFi = 2, +}; + +NS_ASSUME_NONNULL_BEGIN + +/** + `AFNetworkReachabilityManager` monitors the reachability of domains, and addresses for both WWAN and WiFi network interfaces. + + Reachability can be used to determine background information about why a network operation failed, or to trigger a network operation retrying when a connection is established. It should not be used to prevent a user from initiating a network request, as it's possible that an initial request may be required to establish reachability. + + See Apple's Reachability Sample Code (https://developer.apple.com/library/ios/samplecode/reachability/) + + @warning Instances of `AFNetworkReachabilityManager` must be started with `-startMonitoring` before reachability status can be determined. + */ +@interface AFNetworkReachabilityManager : NSObject + +/** + The current network reachability status. + */ +@property (readonly, nonatomic, assign) AFNetworkReachabilityStatus networkReachabilityStatus; + +/** + Whether or not the network is currently reachable. + */ +@property (readonly, nonatomic, assign, getter = isReachable) BOOL reachable; + +/** + Whether or not the network is currently reachable via WWAN. + */ +@property (readonly, nonatomic, assign, getter = isReachableViaWWAN) BOOL reachableViaWWAN; + +/** + Whether or not the network is currently reachable via WiFi. + */ +@property (readonly, nonatomic, assign, getter = isReachableViaWiFi) BOOL reachableViaWiFi; + +///--------------------- +/// @name Initialization +///--------------------- + +/** + Returns the shared network reachability manager. + */ ++ (instancetype)sharedManager; + +/** + Creates and returns a network reachability manager for the specified domain. + + @param domain The domain used to evaluate network reachability. + + @return An initialized network reachability manager, actively monitoring the specified domain. + */ ++ (instancetype)managerForDomain:(NSString *)domain; + +/** + Creates and returns a network reachability manager for the socket address. + + @param address The socket address (`sockaddr_in`) used to evaluate network reachability. + + @return An initialized network reachability manager, actively monitoring the specified socket address. + */ ++ (instancetype)managerForAddress:(const void *)address; + +/** + Initializes an instance of a network reachability manager from the specified reachability object. + + @param reachability The reachability object to monitor. + + @return An initialized network reachability manager, actively monitoring the specified reachability. + */ +- (instancetype)initWithReachability:(SCNetworkReachabilityRef)reachability NS_DESIGNATED_INITIALIZER; + +///-------------------------------------------------- +/// @name Starting & Stopping Reachability Monitoring +///-------------------------------------------------- + +/** + Starts monitoring for changes in network reachability status. + */ +- (void)startMonitoring; + +/** + Stops monitoring for changes in network reachability status. + */ +- (void)stopMonitoring; + +///------------------------------------------------- +/// @name Getting Localized Reachability Description +///------------------------------------------------- + +/** + Returns a localized string representation of the current network reachability status. + */ +- (NSString *)localizedNetworkReachabilityStatusString; + +///--------------------------------------------------- +/// @name Setting Network Reachability Change Callback +///--------------------------------------------------- + +/** + Sets a callback to be executed when the network availability of the `baseURL` host changes. + + @param block A block object to be executed when the network availability of the `baseURL` host changes.. This block has no return value and takes a single argument which represents the various reachability states from the device to the `baseURL`. + */ +- (void)setReachabilityStatusChangeBlock:(nullable void (^)(AFNetworkReachabilityStatus status))block; + +@end + +///---------------- +/// @name Constants +///---------------- + +/** + ## Network Reachability + + The following constants are provided by `AFNetworkReachabilityManager` as possible network reachability statuses. + + enum { + AFNetworkReachabilityStatusUnknown, + AFNetworkReachabilityStatusNotReachable, + AFNetworkReachabilityStatusReachableViaWWAN, + AFNetworkReachabilityStatusReachableViaWiFi, + } + + `AFNetworkReachabilityStatusUnknown` + The `baseURL` host reachability is not known. + + `AFNetworkReachabilityStatusNotReachable` + The `baseURL` host cannot be reached. + + `AFNetworkReachabilityStatusReachableViaWWAN` + The `baseURL` host can be reached via a cellular connection, such as EDGE or GPRS. + + `AFNetworkReachabilityStatusReachableViaWiFi` + The `baseURL` host can be reached via a Wi-Fi connection. + + ### Keys for Notification UserInfo Dictionary + + Strings that are used as keys in a `userInfo` dictionary in a network reachability status change notification. + + `AFNetworkingReachabilityNotificationStatusItem` + A key in the userInfo dictionary in a `AFNetworkingReachabilityDidChangeNotification` notification. + The corresponding value is an `NSNumber` object representing the `AFNetworkReachabilityStatus` value for the current reachability status. + */ + +///-------------------- +/// @name Notifications +///-------------------- + +/** + Posted when network reachability changes. + This notification assigns no notification object. The `userInfo` dictionary contains an `NSNumber` object under the `AFNetworkingReachabilityNotificationStatusItem` key, representing the `AFNetworkReachabilityStatus` value for the current network reachability. + + @warning In order for network reachability to be monitored, include the `SystemConfiguration` framework in the active target's "Link Binary With Library" build phase, and add `#import ` to the header prefix of the project (`Prefix.pch`). + */ +extern NSString * const AFNetworkingReachabilityDidChangeNotification; +extern NSString * const AFNetworkingReachabilityNotificationStatusItem; + +///-------------------- +/// @name Functions +///-------------------- + +/** + Returns a localized string representation of an `AFNetworkReachabilityStatus` value. + */ +extern NSString * AFStringFromNetworkReachabilityStatus(AFNetworkReachabilityStatus status); + +NS_ASSUME_NONNULL_END +#endif diff --git a/Pods/AFNetworking/AFNetworking/AFNetworkReachabilityManager.m b/Pods/AFNetworking/AFNetworking/AFNetworkReachabilityManager.m new file mode 100644 index 0000000..2e5e2ed --- /dev/null +++ b/Pods/AFNetworking/AFNetworking/AFNetworkReachabilityManager.m @@ -0,0 +1,262 @@ +// AFNetworkReachabilityManager.m +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFNetworkReachabilityManager.h" +#if !TARGET_OS_WATCH + +#import +#import +#import +#import +#import + +NSString * const AFNetworkingReachabilityDidChangeNotification = @"com.alamofire.networking.reachability.change"; +NSString * const AFNetworkingReachabilityNotificationStatusItem = @"AFNetworkingReachabilityNotificationStatusItem"; + +typedef void (^AFNetworkReachabilityStatusBlock)(AFNetworkReachabilityStatus status); + +typedef NS_ENUM(NSUInteger, AFNetworkReachabilityAssociation) { + AFNetworkReachabilityForAddress = 1, + AFNetworkReachabilityForAddressPair = 2, + AFNetworkReachabilityForName = 3, +}; + +NSString * AFStringFromNetworkReachabilityStatus(AFNetworkReachabilityStatus status) { + switch (status) { + case AFNetworkReachabilityStatusNotReachable: + return NSLocalizedStringFromTable(@"Not Reachable", @"AFNetworking", nil); + case AFNetworkReachabilityStatusReachableViaWWAN: + return NSLocalizedStringFromTable(@"Reachable via WWAN", @"AFNetworking", nil); + case AFNetworkReachabilityStatusReachableViaWiFi: + return NSLocalizedStringFromTable(@"Reachable via WiFi", @"AFNetworking", nil); + case AFNetworkReachabilityStatusUnknown: + default: + return NSLocalizedStringFromTable(@"Unknown", @"AFNetworking", nil); + } +} + +static AFNetworkReachabilityStatus AFNetworkReachabilityStatusForFlags(SCNetworkReachabilityFlags flags) { + BOOL isReachable = ((flags & kSCNetworkReachabilityFlagsReachable) != 0); + BOOL needsConnection = ((flags & kSCNetworkReachabilityFlagsConnectionRequired) != 0); + BOOL canConnectionAutomatically = (((flags & kSCNetworkReachabilityFlagsConnectionOnDemand ) != 0) || ((flags & kSCNetworkReachabilityFlagsConnectionOnTraffic) != 0)); + BOOL canConnectWithoutUserInteraction = (canConnectionAutomatically && (flags & kSCNetworkReachabilityFlagsInterventionRequired) == 0); + BOOL isNetworkReachable = (isReachable && (!needsConnection || canConnectWithoutUserInteraction)); + + AFNetworkReachabilityStatus status = AFNetworkReachabilityStatusUnknown; + if (isNetworkReachable == NO) { + status = AFNetworkReachabilityStatusNotReachable; + } +#if TARGET_OS_IPHONE + else if ((flags & kSCNetworkReachabilityFlagsIsWWAN) != 0) { + status = AFNetworkReachabilityStatusReachableViaWWAN; + } +#endif + else { + status = AFNetworkReachabilityStatusReachableViaWiFi; + } + + return status; +} + +static void AFNetworkReachabilityCallback(SCNetworkReachabilityRef __unused target, SCNetworkReachabilityFlags flags, void *info) { + AFNetworkReachabilityStatus status = AFNetworkReachabilityStatusForFlags(flags); + AFNetworkReachabilityStatusBlock block = (__bridge AFNetworkReachabilityStatusBlock)info; + if (block) { + block(status); + } + + + dispatch_async(dispatch_get_main_queue(), ^{ + NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; + NSDictionary *userInfo = @{ AFNetworkingReachabilityNotificationStatusItem: @(status) }; + [notificationCenter postNotificationName:AFNetworkingReachabilityDidChangeNotification object:nil userInfo:userInfo]; + }); + +} + +static const void * AFNetworkReachabilityRetainCallback(const void *info) { + return Block_copy(info); +} + +static void AFNetworkReachabilityReleaseCallback(const void *info) { + if (info) { + Block_release(info); + } +} + +@interface AFNetworkReachabilityManager () +@property (readwrite, nonatomic, strong) id networkReachability; +@property (readwrite, nonatomic, assign) AFNetworkReachabilityAssociation networkReachabilityAssociation; +@property (readwrite, nonatomic, assign) AFNetworkReachabilityStatus networkReachabilityStatus; +@property (readwrite, nonatomic, copy) AFNetworkReachabilityStatusBlock networkReachabilityStatusBlock; +@end + +@implementation AFNetworkReachabilityManager + ++ (instancetype)sharedManager { + static AFNetworkReachabilityManager *_sharedManager = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + struct sockaddr_in address; + bzero(&address, sizeof(address)); + address.sin_len = sizeof(address); + address.sin_family = AF_INET; + + _sharedManager = [self managerForAddress:&address]; + }); + + return _sharedManager; +} + ++ (instancetype)managerForDomain:(NSString *)domain { + SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName(kCFAllocatorDefault, [domain UTF8String]); + + AFNetworkReachabilityManager *manager = [[self alloc] initWithReachability:reachability]; + manager.networkReachabilityAssociation = AFNetworkReachabilityForName; + + return manager; +} + ++ (instancetype)managerForAddress:(const void *)address { + SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, (const struct sockaddr *)address); + + AFNetworkReachabilityManager *manager = [[self alloc] initWithReachability:reachability]; + manager.networkReachabilityAssociation = AFNetworkReachabilityForAddress; + + return manager; +} + +- (instancetype)initWithReachability:(SCNetworkReachabilityRef)reachability { + self = [super init]; + if (!self) { + return nil; + } + + self.networkReachability = CFBridgingRelease(reachability); + self.networkReachabilityStatus = AFNetworkReachabilityStatusUnknown; + + return self; +} + +- (instancetype)init NS_UNAVAILABLE +{ + return nil; +} + +- (void)dealloc { + [self stopMonitoring]; +} + +#pragma mark - + +- (BOOL)isReachable { + return [self isReachableViaWWAN] || [self isReachableViaWiFi]; +} + +- (BOOL)isReachableViaWWAN { + return self.networkReachabilityStatus == AFNetworkReachabilityStatusReachableViaWWAN; +} + +- (BOOL)isReachableViaWiFi { + return self.networkReachabilityStatus == AFNetworkReachabilityStatusReachableViaWiFi; +} + +#pragma mark - + +- (void)startMonitoring { + [self stopMonitoring]; + + if (!self.networkReachability) { + return; + } + + __weak __typeof(self)weakSelf = self; + AFNetworkReachabilityStatusBlock callback = ^(AFNetworkReachabilityStatus status) { + __strong __typeof(weakSelf)strongSelf = weakSelf; + + strongSelf.networkReachabilityStatus = status; + if (strongSelf.networkReachabilityStatusBlock) { + strongSelf.networkReachabilityStatusBlock(status); + } + + }; + + id networkReachability = self.networkReachability; + SCNetworkReachabilityContext context = {0, (__bridge void *)callback, AFNetworkReachabilityRetainCallback, AFNetworkReachabilityReleaseCallback, NULL}; + SCNetworkReachabilitySetCallback((__bridge SCNetworkReachabilityRef)networkReachability, AFNetworkReachabilityCallback, &context); + SCNetworkReachabilityScheduleWithRunLoop((__bridge SCNetworkReachabilityRef)networkReachability, CFRunLoopGetMain(), kCFRunLoopCommonModes); + + switch (self.networkReachabilityAssociation) { + case AFNetworkReachabilityForName: + break; + case AFNetworkReachabilityForAddress: + case AFNetworkReachabilityForAddressPair: + default: { + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0),^{ + SCNetworkReachabilityFlags flags; + SCNetworkReachabilityGetFlags((__bridge SCNetworkReachabilityRef)networkReachability, &flags); + AFNetworkReachabilityStatus status = AFNetworkReachabilityStatusForFlags(flags); + dispatch_async(dispatch_get_main_queue(), ^{ + callback(status); + + NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; + [notificationCenter postNotificationName:AFNetworkingReachabilityDidChangeNotification object:nil userInfo:@{ AFNetworkingReachabilityNotificationStatusItem: @(status) }]; + + + }); + }); + } + break; + } +} + +- (void)stopMonitoring { + if (!self.networkReachability) { + return; + } + + SCNetworkReachabilityUnscheduleFromRunLoop((__bridge SCNetworkReachabilityRef)self.networkReachability, CFRunLoopGetMain(), kCFRunLoopCommonModes); +} + +#pragma mark - + +- (NSString *)localizedNetworkReachabilityStatusString { + return AFStringFromNetworkReachabilityStatus(self.networkReachabilityStatus); +} + +#pragma mark - + +- (void)setReachabilityStatusChangeBlock:(void (^)(AFNetworkReachabilityStatus status))block { + self.networkReachabilityStatusBlock = block; +} + +#pragma mark - NSKeyValueObserving + ++ (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key { + if ([key isEqualToString:@"reachable"] || [key isEqualToString:@"reachableViaWWAN"] || [key isEqualToString:@"reachableViaWiFi"]) { + return [NSSet setWithObject:@"networkReachabilityStatus"]; + } + + return [super keyPathsForValuesAffectingValueForKey:key]; +} + +@end +#endif diff --git a/Pods/AFNetworking/AFNetworking/AFNetworking.h b/Pods/AFNetworking/AFNetworking/AFNetworking.h new file mode 100644 index 0000000..6d442bb --- /dev/null +++ b/Pods/AFNetworking/AFNetworking/AFNetworking.h @@ -0,0 +1,46 @@ +// AFNetworking.h +// +// Copyright (c) 2013 AFNetworking (http://afnetworking.com/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#import + +#ifndef _AFNETWORKING_ + #define _AFNETWORKING_ + + #import "AFURLRequestSerialization.h" + #import "AFURLResponseSerialization.h" + #import "AFSecurityPolicy.h" +#if !TARGET_OS_WATCH + #import "AFNetworkReachabilityManager.h" + #import "AFURLConnectionOperation.h" + #import "AFHTTPRequestOperation.h" + #import "AFHTTPRequestOperationManager.h" +#endif + +#if ( ( defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) || \ + ( defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000 ) || \ + TARGET_OS_WATCH ) + #import "AFURLSessionManager.h" + #import "AFHTTPSessionManager.h" +#endif + +#endif /* _AFNETWORKING_ */ diff --git a/Pods/AFNetworking/AFNetworking/AFSecurityPolicy.h b/Pods/AFNetworking/AFNetworking/AFSecurityPolicy.h new file mode 100644 index 0000000..3c38da8 --- /dev/null +++ b/Pods/AFNetworking/AFNetworking/AFSecurityPolicy.h @@ -0,0 +1,142 @@ +// AFSecurityPolicy.h +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#import + +typedef NS_ENUM(NSUInteger, AFSSLPinningMode) { + AFSSLPinningModeNone, + AFSSLPinningModePublicKey, + AFSSLPinningModeCertificate, +}; + +/** + `AFSecurityPolicy` evaluates server trust against pinned X.509 certificates and public keys over secure connections. + + Adding pinned SSL certificates to your app helps prevent man-in-the-middle attacks and other vulnerabilities. Applications dealing with sensitive customer data or financial information are strongly encouraged to route all communication over an HTTPS connection with SSL pinning configured and enabled. + */ + +NS_ASSUME_NONNULL_BEGIN + +@interface AFSecurityPolicy : NSObject + +/** + The criteria by which server trust should be evaluated against the pinned SSL certificates. Defaults to `AFSSLPinningModeNone`. + */ +@property (readonly, nonatomic, assign) AFSSLPinningMode SSLPinningMode; + +/** + The certificates used to evaluate server trust according to the SSL pinning mode. By default, this property is set to any (`.cer`) certificates included in the app bundle. Note that if you create an array with duplicate certificates, the duplicate certificates will be removed. Note that if pinning is enabled, `evaluateServerTrust:forDomain:` will return true if any pinned certificate matches. + */ +@property (nonatomic, strong, nullable) NSArray *pinnedCertificates; + +/** + Whether or not to trust servers with an invalid or expired SSL certificates. Defaults to `NO`. + */ +@property (nonatomic, assign) BOOL allowInvalidCertificates; + +/** + Whether or not to validate the domain name in the certificate's CN field. Defaults to `YES`. + */ +@property (nonatomic, assign) BOOL validatesDomainName; + +///----------------------------------------- +/// @name Getting Specific Security Policies +///----------------------------------------- + +/** + Returns the shared default security policy, which does not allow invalid certificates, validates domain name, and does not validate against pinned certificates or public keys. + + @return The default security policy. + */ ++ (instancetype)defaultPolicy; + +///--------------------- +/// @name Initialization +///--------------------- + +/** + Creates and returns a security policy with the specified pinning mode. + + @param pinningMode The SSL pinning mode. + + @return A new security policy. + */ ++ (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode; + +///------------------------------ +/// @name Evaluating Server Trust +///------------------------------ + +/** + Whether or not the specified server trust should be accepted, based on the security policy. + + This method should be used when responding to an authentication challenge from a server. + + @param serverTrust The X.509 certificate trust of the server. + + @return Whether or not to trust the server. + + @warning This method has been deprecated in favor of `-evaluateServerTrust:forDomain:`. + */ +- (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust DEPRECATED_ATTRIBUTE; + +/** + Whether or not the specified server trust should be accepted, based on the security policy. + + This method should be used when responding to an authentication challenge from a server. + + @param serverTrust The X.509 certificate trust of the server. + @param domain The domain of serverTrust. If `nil`, the domain will not be validated. + + @return Whether or not to trust the server. + */ +- (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust + forDomain:(nullable NSString *)domain; + +@end + +NS_ASSUME_NONNULL_END + +///---------------- +/// @name Constants +///---------------- + +/** + ## SSL Pinning Modes + + The following constants are provided by `AFSSLPinningMode` as possible SSL pinning modes. + + enum { + AFSSLPinningModeNone, + AFSSLPinningModePublicKey, + AFSSLPinningModeCertificate, + } + + `AFSSLPinningModeNone` + Do not used pinned certificates to validate servers. + + `AFSSLPinningModePublicKey` + Validate host certificates against public keys of pinned certificates. + + `AFSSLPinningModeCertificate` + Validate host certificates against pinned certificates. +*/ diff --git a/Pods/AFNetworking/AFNetworking/AFSecurityPolicy.m b/Pods/AFNetworking/AFNetworking/AFSecurityPolicy.m new file mode 100644 index 0000000..e8eaa65 --- /dev/null +++ b/Pods/AFNetworking/AFNetworking/AFSecurityPolicy.m @@ -0,0 +1,311 @@ +// AFSecurityPolicy.m +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFSecurityPolicy.h" + +#import + +#if !TARGET_OS_IOS && !TARGET_OS_WATCH +static NSData * AFSecKeyGetData(SecKeyRef key) { + CFDataRef data = NULL; + + __Require_noErr_Quiet(SecItemExport(key, kSecFormatUnknown, kSecItemPemArmour, NULL, &data), _out); + + return (__bridge_transfer NSData *)data; + +_out: + if (data) { + CFRelease(data); + } + + return nil; +} +#endif + +static BOOL AFSecKeyIsEqualToKey(SecKeyRef key1, SecKeyRef key2) { +#if TARGET_OS_IOS || TARGET_OS_WATCH + return [(__bridge id)key1 isEqual:(__bridge id)key2]; +#else + return [AFSecKeyGetData(key1) isEqual:AFSecKeyGetData(key2)]; +#endif +} + +static id AFPublicKeyForCertificate(NSData *certificate) { + id allowedPublicKey = nil; + SecCertificateRef allowedCertificate; + SecCertificateRef allowedCertificates[1]; + CFArrayRef tempCertificates = nil; + SecPolicyRef policy = nil; + SecTrustRef allowedTrust = nil; + SecTrustResultType result; + + allowedCertificate = SecCertificateCreateWithData(NULL, (__bridge CFDataRef)certificate); + __Require_Quiet(allowedCertificate != NULL, _out); + + allowedCertificates[0] = allowedCertificate; + tempCertificates = CFArrayCreate(NULL, (const void **)allowedCertificates, 1, NULL); + + policy = SecPolicyCreateBasicX509(); + __Require_noErr_Quiet(SecTrustCreateWithCertificates(tempCertificates, policy, &allowedTrust), _out); + __Require_noErr_Quiet(SecTrustEvaluate(allowedTrust, &result), _out); + + allowedPublicKey = (__bridge_transfer id)SecTrustCopyPublicKey(allowedTrust); + +_out: + if (allowedTrust) { + CFRelease(allowedTrust); + } + + if (policy) { + CFRelease(policy); + } + + if (tempCertificates) { + CFRelease(tempCertificates); + } + + if (allowedCertificate) { + CFRelease(allowedCertificate); + } + + return allowedPublicKey; +} + +static BOOL AFServerTrustIsValid(SecTrustRef serverTrust) { + BOOL isValid = NO; + SecTrustResultType result; + __Require_noErr_Quiet(SecTrustEvaluate(serverTrust, &result), _out); + + isValid = (result == kSecTrustResultUnspecified || result == kSecTrustResultProceed); + +_out: + return isValid; +} + +static NSArray * AFCertificateTrustChainForServerTrust(SecTrustRef serverTrust) { + CFIndex certificateCount = SecTrustGetCertificateCount(serverTrust); + NSMutableArray *trustChain = [NSMutableArray arrayWithCapacity:(NSUInteger)certificateCount]; + + for (CFIndex i = 0; i < certificateCount; i++) { + SecCertificateRef certificate = SecTrustGetCertificateAtIndex(serverTrust, i); + [trustChain addObject:(__bridge_transfer NSData *)SecCertificateCopyData(certificate)]; + } + + return [NSArray arrayWithArray:trustChain]; +} + +static NSArray * AFPublicKeyTrustChainForServerTrust(SecTrustRef serverTrust) { + SecPolicyRef policy = SecPolicyCreateBasicX509(); + CFIndex certificateCount = SecTrustGetCertificateCount(serverTrust); + NSMutableArray *trustChain = [NSMutableArray arrayWithCapacity:(NSUInteger)certificateCount]; + for (CFIndex i = 0; i < certificateCount; i++) { + SecCertificateRef certificate = SecTrustGetCertificateAtIndex(serverTrust, i); + + SecCertificateRef someCertificates[] = {certificate}; + CFArrayRef certificates = CFArrayCreate(NULL, (const void **)someCertificates, 1, NULL); + + SecTrustRef trust; + __Require_noErr_Quiet(SecTrustCreateWithCertificates(certificates, policy, &trust), _out); + + SecTrustResultType result; + __Require_noErr_Quiet(SecTrustEvaluate(trust, &result), _out); + + [trustChain addObject:(__bridge_transfer id)SecTrustCopyPublicKey(trust)]; + + _out: + if (trust) { + CFRelease(trust); + } + + if (certificates) { + CFRelease(certificates); + } + + continue; + } + CFRelease(policy); + + return [NSArray arrayWithArray:trustChain]; +} + +#pragma mark - + +@interface AFSecurityPolicy() +@property (readwrite, nonatomic, assign) AFSSLPinningMode SSLPinningMode; +@property (readwrite, nonatomic, strong) NSArray *pinnedPublicKeys; +@end + +@implementation AFSecurityPolicy + ++ (NSArray *)defaultPinnedCertificates { + static NSArray *_defaultPinnedCertificates = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + NSBundle *bundle = [NSBundle bundleForClass:[self class]]; + NSArray *paths = [bundle pathsForResourcesOfType:@"cer" inDirectory:@"."]; + + NSMutableArray *certificates = [NSMutableArray arrayWithCapacity:[paths count]]; + for (NSString *path in paths) { + NSData *certificateData = [NSData dataWithContentsOfFile:path]; + [certificates addObject:certificateData]; + } + + _defaultPinnedCertificates = [[NSArray alloc] initWithArray:certificates]; + }); + + return _defaultPinnedCertificates; +} + ++ (instancetype)defaultPolicy { + AFSecurityPolicy *securityPolicy = [[self alloc] init]; + securityPolicy.SSLPinningMode = AFSSLPinningModeNone; + + return securityPolicy; +} + ++ (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode { + AFSecurityPolicy *securityPolicy = [[self alloc] init]; + securityPolicy.SSLPinningMode = pinningMode; + + [securityPolicy setPinnedCertificates:[self defaultPinnedCertificates]]; + + return securityPolicy; +} + +- (id)init { + self = [super init]; + if (!self) { + return nil; + } + + self.validatesDomainName = YES; + + return self; +} + +- (void)setPinnedCertificates:(NSArray *)pinnedCertificates { + _pinnedCertificates = [[NSOrderedSet orderedSetWithArray:pinnedCertificates] array]; + + if (self.pinnedCertificates) { + NSMutableArray *mutablePinnedPublicKeys = [NSMutableArray arrayWithCapacity:[self.pinnedCertificates count]]; + for (NSData *certificate in self.pinnedCertificates) { + id publicKey = AFPublicKeyForCertificate(certificate); + if (!publicKey) { + continue; + } + [mutablePinnedPublicKeys addObject:publicKey]; + } + self.pinnedPublicKeys = [NSArray arrayWithArray:mutablePinnedPublicKeys]; + } else { + self.pinnedPublicKeys = nil; + } +} + +#pragma mark - + +- (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust { + return [self evaluateServerTrust:serverTrust forDomain:nil]; +} + +- (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust + forDomain:(NSString *)domain +{ + if (domain && self.allowInvalidCertificates && self.validatesDomainName && (self.SSLPinningMode == AFSSLPinningModeNone || [self.pinnedCertificates count] == 0)) { + // https://developer.apple.com/library/mac/documentation/NetworkingInternet/Conceptual/NetworkingTopics/Articles/OverridingSSLChainValidationCorrectly.html + // According to the docs, you should only trust your provided certs for evaluation. + // Pinned certificates are added to the trust. Without pinned certificates, + // there is nothing to evaluate against. + // + // From Apple Docs: + // "Do not implicitly trust self-signed certificates as anchors (kSecTrustOptionImplicitAnchors). + // Instead, add your own (self-signed) CA certificate to the list of trusted anchors." + NSLog(@"In order to validate a domain name for self signed certificates, you MUST use pinning."); + return NO; + } + + NSMutableArray *policies = [NSMutableArray array]; + if (self.validatesDomainName) { + [policies addObject:(__bridge_transfer id)SecPolicyCreateSSL(true, (__bridge CFStringRef)domain)]; + } else { + [policies addObject:(__bridge_transfer id)SecPolicyCreateBasicX509()]; + } + + SecTrustSetPolicies(serverTrust, (__bridge CFArrayRef)policies); + + if (self.SSLPinningMode == AFSSLPinningModeNone) { + if (self.allowInvalidCertificates || AFServerTrustIsValid(serverTrust)){ + return YES; + } else { + return NO; + } + } else if (!AFServerTrustIsValid(serverTrust) && !self.allowInvalidCertificates) { + return NO; + } + + NSArray *serverCertificates = AFCertificateTrustChainForServerTrust(serverTrust); + switch (self.SSLPinningMode) { + case AFSSLPinningModeNone: + default: + return NO; + case AFSSLPinningModeCertificate: { + NSMutableArray *pinnedCertificates = [NSMutableArray array]; + for (NSData *certificateData in self.pinnedCertificates) { + [pinnedCertificates addObject:(__bridge_transfer id)SecCertificateCreateWithData(NULL, (__bridge CFDataRef)certificateData)]; + } + SecTrustSetAnchorCertificates(serverTrust, (__bridge CFArrayRef)pinnedCertificates); + + if (!AFServerTrustIsValid(serverTrust)) { + return NO; + } + + NSUInteger trustedCertificateCount = 0; + for (NSData *trustChainCertificate in serverCertificates) { + if ([self.pinnedCertificates containsObject:trustChainCertificate]) { + trustedCertificateCount++; + } + } + return trustedCertificateCount > 0; + } + case AFSSLPinningModePublicKey: { + NSUInteger trustedPublicKeyCount = 0; + NSArray *publicKeys = AFPublicKeyTrustChainForServerTrust(serverTrust); + + for (id trustChainPublicKey in publicKeys) { + for (id pinnedPublicKey in self.pinnedPublicKeys) { + if (AFSecKeyIsEqualToKey((__bridge SecKeyRef)trustChainPublicKey, (__bridge SecKeyRef)pinnedPublicKey)) { + trustedPublicKeyCount += 1; + } + } + } + return trustedPublicKeyCount > 0; + } + } + + return NO; +} + +#pragma mark - NSKeyValueObserving + ++ (NSSet *)keyPathsForValuesAffectingPinnedPublicKeys { + return [NSSet setWithObject:@"pinnedCertificates"]; +} + +@end diff --git a/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.h b/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.h new file mode 100644 index 0000000..3ea87fe --- /dev/null +++ b/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.h @@ -0,0 +1,344 @@ +// AFURLConnectionOperation.h +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#import +#import "AFURLRequestSerialization.h" +#import "AFURLResponseSerialization.h" +#import "AFSecurityPolicy.h" + +#ifndef NS_DESIGNATED_INITIALIZER +#if __has_attribute(objc_designated_initializer) +#define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +#else +#define NS_DESIGNATED_INITIALIZER +#endif +#endif + +/** + `AFURLConnectionOperation` is a subclass of `NSOperation` that implements `NSURLConnection` delegate methods. + + ## Subclassing Notes + + This is the base class of all network request operations. You may wish to create your own subclass in order to implement additional `NSURLConnection` delegate methods (see "`NSURLConnection` Delegate Methods" below), or to provide additional properties and/or class constructors. + + If you are creating a subclass that communicates over the HTTP or HTTPS protocols, you may want to consider subclassing `AFHTTPRequestOperation` instead, as it supports specifying acceptable content types or status codes. + + ## NSURLConnection Delegate Methods + + `AFURLConnectionOperation` implements the following `NSURLConnection` delegate methods: + + - `connection:didReceiveResponse:` + - `connection:didReceiveData:` + - `connectionDidFinishLoading:` + - `connection:didFailWithError:` + - `connection:didSendBodyData:totalBytesWritten:totalBytesExpectedToWrite:` + - `connection:willCacheResponse:` + - `connectionShouldUseCredentialStorage:` + - `connection:needNewBodyStream:` + - `connection:willSendRequestForAuthenticationChallenge:` + + If any of these methods are overridden in a subclass, they _must_ call the `super` implementation first. + + ## Callbacks and Completion Blocks + + The built-in `completionBlock` provided by `NSOperation` allows for custom behavior to be executed after the request finishes. It is a common pattern for class constructors in subclasses to take callback block parameters, and execute them conditionally in the body of its `completionBlock`. Make sure to handle cancelled operations appropriately when setting a `completionBlock` (i.e. returning early before parsing response data). See the implementation of any of the `AFHTTPRequestOperation` subclasses for an example of this. + + Subclasses are strongly discouraged from overriding `setCompletionBlock:`, as `AFURLConnectionOperation`'s implementation includes a workaround to mitigate retain cycles, and what Apple rather ominously refers to as ["The Deallocation Problem"](http://developer.apple.com/library/ios/#technotes/tn2109/). + + ## SSL Pinning + + Relying on the CA trust model to validate SSL certificates exposes your app to security vulnerabilities, such as man-in-the-middle attacks. For applications that connect to known servers, SSL certificate pinning provides an increased level of security, by checking server certificate validity against those specified in the app bundle. + + SSL with certificate pinning is strongly recommended for any application that transmits sensitive information to an external webservice. + + Connections will be validated on all matching certificates with a `.cer` extension in the bundle root. + + ## NSCoding & NSCopying Conformance + + `AFURLConnectionOperation` conforms to the `NSCoding` and `NSCopying` protocols, allowing operations to be archived to disk, and copied in memory, respectively. However, because of the intrinsic limitations of capturing the exact state of an operation at a particular moment, there are some important caveats to keep in mind: + + ### NSCoding Caveats + + - Encoded operations do not include any block or stream properties. Be sure to set `completionBlock`, `outputStream`, and any callback blocks as necessary when using `-initWithCoder:` or `NSKeyedUnarchiver`. + - Operations are paused on `encodeWithCoder:`. If the operation was encoded while paused or still executing, its archived state will return `YES` for `isReady`. Otherwise, the state of an operation when encoding will remain unchanged. + + ### NSCopying Caveats + + - `-copy` and `-copyWithZone:` return a new operation with the `NSURLRequest` of the original. So rather than an exact copy of the operation at that particular instant, the copying mechanism returns a completely new instance, which can be useful for retrying operations. + - A copy of an operation will not include the `outputStream` of the original. + - Operation copies do not include `completionBlock`, as it often strongly captures a reference to `self`, which would otherwise have the unintuitive side-effect of pointing to the _original_ operation when copied. + */ + +NS_ASSUME_NONNULL_BEGIN + +@interface AFURLConnectionOperation : NSOperation + +///------------------------------- +/// @name Accessing Run Loop Modes +///------------------------------- + +/** + The run loop modes in which the operation will run on the network thread. By default, this is a single-member set containing `NSRunLoopCommonModes`. + */ +@property (nonatomic, strong) NSSet *runLoopModes; + +///----------------------------------------- +/// @name Getting URL Connection Information +///----------------------------------------- + +/** + The request used by the operation's connection. + */ +@property (readonly, nonatomic, strong) NSURLRequest *request; + +/** + The last response received by the operation's connection. + */ +@property (readonly, nonatomic, strong, nullable) NSURLResponse *response; + +/** + The error, if any, that occurred in the lifecycle of the request. + */ +@property (readonly, nonatomic, strong, nullable) NSError *error; + +///---------------------------- +/// @name Getting Response Data +///---------------------------- + +/** + The data received during the request. + */ +@property (readonly, nonatomic, strong, nullable) NSData *responseData; + +/** + The string representation of the response data. + */ +@property (readonly, nonatomic, copy, nullable) NSString *responseString; + +/** + The string encoding of the response. + + If the response does not specify a valid string encoding, `responseStringEncoding` will return `NSUTF8StringEncoding`. + */ +@property (readonly, nonatomic, assign) NSStringEncoding responseStringEncoding; + +///------------------------------- +/// @name Managing URL Credentials +///------------------------------- + +/** + Whether the URL connection should consult the credential storage for authenticating the connection. `YES` by default. + + This is the value that is returned in the `NSURLConnectionDelegate` method `-connectionShouldUseCredentialStorage:`. + */ +@property (nonatomic, assign) BOOL shouldUseCredentialStorage; + +/** + The credential used for authentication challenges in `-connection:didReceiveAuthenticationChallenge:`. + + This will be overridden by any shared credentials that exist for the username or password of the request URL, if present. + */ +@property (nonatomic, strong, nullable) NSURLCredential *credential; + +///------------------------------- +/// @name Managing Security Policy +///------------------------------- + +/** + The security policy used to evaluate server trust for secure connections. + */ +@property (nonatomic, strong) AFSecurityPolicy *securityPolicy; + +///------------------------ +/// @name Accessing Streams +///------------------------ + +/** + The input stream used to read data to be sent during the request. + + This property acts as a proxy to the `HTTPBodyStream` property of `request`. + */ +@property (nonatomic, strong) NSInputStream *inputStream; + +/** + The output stream that is used to write data received until the request is finished. + + By default, data is accumulated into a buffer that is stored into `responseData` upon completion of the request, with the intermediary `outputStream` property set to `nil`. When `outputStream` is set, the data will not be accumulated into an internal buffer, and as a result, the `responseData` property of the completed request will be `nil`. The output stream will be scheduled in the network thread runloop upon being set. + */ +@property (nonatomic, strong, nullable) NSOutputStream *outputStream; + +///--------------------------------- +/// @name Managing Callback Queues +///--------------------------------- + +/** + The dispatch queue for `completionBlock`. If `NULL` (default), the main queue is used. + */ +#if OS_OBJECT_HAVE_OBJC_SUPPORT +@property (nonatomic, strong, nullable) dispatch_queue_t completionQueue; +#else +@property (nonatomic, assign, nullable) dispatch_queue_t completionQueue; +#endif + +/** + The dispatch group for `completionBlock`. If `NULL` (default), a private dispatch group is used. + */ +#if OS_OBJECT_HAVE_OBJC_SUPPORT +@property (nonatomic, strong, nullable) dispatch_group_t completionGroup; +#else +@property (nonatomic, assign, nullable) dispatch_group_t completionGroup; +#endif + +///--------------------------------------------- +/// @name Managing Request Operation Information +///--------------------------------------------- + +/** + The user info dictionary for the receiver. + */ +@property (nonatomic, strong) NSDictionary *userInfo; +// FIXME: It doesn't seem that this userInfo is used anywhere in the implementation. + +///------------------------------------------------------ +/// @name Initializing an AFURLConnectionOperation Object +///------------------------------------------------------ + +/** + Initializes and returns a newly allocated operation object with a url connection configured with the specified url request. + + This is the designated initializer. + + @param urlRequest The request object to be used by the operation connection. + */ +- (instancetype)initWithRequest:(NSURLRequest *)urlRequest NS_DESIGNATED_INITIALIZER; + +///---------------------------------- +/// @name Pausing / Resuming Requests +///---------------------------------- + +/** + Pauses the execution of the request operation. + + A paused operation returns `NO` for `-isReady`, `-isExecuting`, and `-isFinished`. As such, it will remain in an `NSOperationQueue` until it is either cancelled or resumed. Pausing a finished, cancelled, or paused operation has no effect. + */ +- (void)pause; + +/** + Whether the request operation is currently paused. + + @return `YES` if the operation is currently paused, otherwise `NO`. + */ +- (BOOL)isPaused; + +/** + Resumes the execution of the paused request operation. + + Pause/Resume behavior varies depending on the underlying implementation for the operation class. In its base implementation, resuming a paused requests restarts the original request. However, since HTTP defines a specification for how to request a specific content range, `AFHTTPRequestOperation` will resume downloading the request from where it left off, instead of restarting the original request. + */ +- (void)resume; + +///---------------------------------------------- +/// @name Configuring Backgrounding Task Behavior +///---------------------------------------------- + +/** + Specifies that the operation should continue execution after the app has entered the background, and the expiration handler for that background task. + + @param handler A handler to be called shortly before the application’s remaining background time reaches 0. The handler is wrapped in a block that cancels the operation, and cleans up and marks the end of execution, unlike the `handler` parameter in `UIApplication -beginBackgroundTaskWithExpirationHandler:`, which expects this to be done in the handler itself. The handler is called synchronously on the main thread, thus blocking the application’s suspension momentarily while the application is notified. + */ +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +- (void)setShouldExecuteAsBackgroundTaskWithExpirationHandler:(nullable void (^)(void))handler NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extensions."); +#endif + +///--------------------------------- +/// @name Setting Progress Callbacks +///--------------------------------- + +/** + Sets a callback to be called when an undetermined number of bytes have been uploaded to the server. + + @param block A block object to be called when an undetermined number of bytes have been uploaded to the server. This block has no return value and takes three arguments: the number of bytes written since the last time the upload progress block was called, the total bytes written, and the total bytes expected to be written during the request, as initially determined by the length of the HTTP body. This block may be called multiple times, and will execute on the main thread. + */ +- (void)setUploadProgressBlock:(nullable void (^)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite))block; + +/** + Sets a callback to be called when an undetermined number of bytes have been downloaded from the server. + + @param block A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes three arguments: the number of bytes read since the last time the download progress block was called, the total bytes read, and the total bytes expected to be read during the request, as initially determined by the expected content size of the `NSHTTPURLResponse` object. This block may be called multiple times, and will execute on the main thread. + */ +- (void)setDownloadProgressBlock:(nullable void (^)(NSUInteger bytesRead, long long totalBytesRead, long long totalBytesExpectedToRead))block; + +///------------------------------------------------- +/// @name Setting NSURLConnection Delegate Callbacks +///------------------------------------------------- + +/** + Sets a block to be executed when the connection will authenticate a challenge in order to download its request, as handled by the `NSURLConnectionDelegate` method `connection:willSendRequestForAuthenticationChallenge:`. + + @param block A block object to be executed when the connection will authenticate a challenge in order to download its request. The block has no return type and takes two arguments: the URL connection object, and the challenge that must be authenticated. This block must invoke one of the challenge-responder methods (NSURLAuthenticationChallengeSender protocol). + + If `allowsInvalidSSLCertificate` is set to YES, `connection:willSendRequestForAuthenticationChallenge:` will attempt to have the challenge sender use credentials with invalid SSL certificates. + */ +- (void)setWillSendRequestForAuthenticationChallengeBlock:(nullable void (^)(NSURLConnection *connection, NSURLAuthenticationChallenge *challenge))block; + +/** + Sets a block to be executed when the server redirects the request from one URL to another URL, or when the request URL changed by the `NSURLProtocol` subclass handling the request in order to standardize its format, as handled by the `NSURLConnectionDataDelegate` method `connection:willSendRequest:redirectResponse:`. + + @param block A block object to be executed when the request URL was changed. The block returns an `NSURLRequest` object, the URL request to redirect, and takes three arguments: the URL connection object, the the proposed redirected request, and the URL response that caused the redirect. + */ +- (void)setRedirectResponseBlock:(nullable NSURLRequest * (^)(NSURLConnection *connection, NSURLRequest *request, NSURLResponse *redirectResponse))block; + + +/** + Sets a block to be executed to modify the response a connection will cache, if any, as handled by the `NSURLConnectionDelegate` method `connection:willCacheResponse:`. + + @param block A block object to be executed to determine what response a connection will cache, if any. The block returns an `NSCachedURLResponse` object, the cached response to store in memory or `nil` to prevent the response from being cached, and takes two arguments: the URL connection object, and the cached response provided for the request. + */ +- (void)setCacheResponseBlock:(nullable NSCachedURLResponse * (^)(NSURLConnection *connection, NSCachedURLResponse *cachedResponse))block; + +/// + +/** + + */ ++ (NSArray *)batchOfRequestOperations:(nullable NSArray *)operations + progressBlock:(nullable void (^)(NSUInteger numberOfFinishedOperations, NSUInteger totalNumberOfOperations))progressBlock + completionBlock:(nullable void (^)(NSArray *operations))completionBlock; + +@end + +///-------------------- +/// @name Notifications +///-------------------- + +/** + Posted when an operation begins executing. + */ +extern NSString * const AFNetworkingOperationDidStartNotification; + +/** + Posted when an operation finishes. + */ +extern NSString * const AFNetworkingOperationDidFinishNotification; + +NS_ASSUME_NONNULL_END diff --git a/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.m b/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.m new file mode 100644 index 0000000..d28d69a --- /dev/null +++ b/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.m @@ -0,0 +1,792 @@ +// AFURLConnectionOperation.m +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFURLConnectionOperation.h" + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#import +#endif + +#if !__has_feature(objc_arc) +#error AFNetworking must be built with ARC. +// You can turn on ARC for only AFNetworking files by adding -fobjc-arc to the build phase for each of its files. +#endif + +typedef NS_ENUM(NSInteger, AFOperationState) { + AFOperationPausedState = -1, + AFOperationReadyState = 1, + AFOperationExecutingState = 2, + AFOperationFinishedState = 3, +}; + +static dispatch_group_t url_request_operation_completion_group() { + static dispatch_group_t af_url_request_operation_completion_group; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + af_url_request_operation_completion_group = dispatch_group_create(); + }); + + return af_url_request_operation_completion_group; +} + +static dispatch_queue_t url_request_operation_completion_queue() { + static dispatch_queue_t af_url_request_operation_completion_queue; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + af_url_request_operation_completion_queue = dispatch_queue_create("com.alamofire.networking.operation.queue", DISPATCH_QUEUE_CONCURRENT ); + }); + + return af_url_request_operation_completion_queue; +} + +static NSString * const kAFNetworkingLockName = @"com.alamofire.networking.operation.lock"; + +NSString * const AFNetworkingOperationDidStartNotification = @"com.alamofire.networking.operation.start"; +NSString * const AFNetworkingOperationDidFinishNotification = @"com.alamofire.networking.operation.finish"; + +typedef void (^AFURLConnectionOperationProgressBlock)(NSUInteger bytes, long long totalBytes, long long totalBytesExpected); +typedef void (^AFURLConnectionOperationAuthenticationChallengeBlock)(NSURLConnection *connection, NSURLAuthenticationChallenge *challenge); +typedef NSCachedURLResponse * (^AFURLConnectionOperationCacheResponseBlock)(NSURLConnection *connection, NSCachedURLResponse *cachedResponse); +typedef NSURLRequest * (^AFURLConnectionOperationRedirectResponseBlock)(NSURLConnection *connection, NSURLRequest *request, NSURLResponse *redirectResponse); +typedef void (^AFURLConnectionOperationBackgroundTaskCleanupBlock)(); + +static inline NSString * AFKeyPathFromOperationState(AFOperationState state) { + switch (state) { + case AFOperationReadyState: + return @"isReady"; + case AFOperationExecutingState: + return @"isExecuting"; + case AFOperationFinishedState: + return @"isFinished"; + case AFOperationPausedState: + return @"isPaused"; + default: { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunreachable-code" + return @"state"; +#pragma clang diagnostic pop + } + } +} + +static inline BOOL AFStateTransitionIsValid(AFOperationState fromState, AFOperationState toState, BOOL isCancelled) { + switch (fromState) { + case AFOperationReadyState: + switch (toState) { + case AFOperationPausedState: + case AFOperationExecutingState: + return YES; + case AFOperationFinishedState: + return isCancelled; + default: + return NO; + } + case AFOperationExecutingState: + switch (toState) { + case AFOperationPausedState: + case AFOperationFinishedState: + return YES; + default: + return NO; + } + case AFOperationFinishedState: + return NO; + case AFOperationPausedState: + return toState == AFOperationReadyState; + default: { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunreachable-code" + switch (toState) { + case AFOperationPausedState: + case AFOperationReadyState: + case AFOperationExecutingState: + case AFOperationFinishedState: + return YES; + default: + return NO; + } + } +#pragma clang diagnostic pop + } +} + +@interface AFURLConnectionOperation () +@property (readwrite, nonatomic, assign) AFOperationState state; +@property (readwrite, nonatomic, strong) NSRecursiveLock *lock; +@property (readwrite, nonatomic, strong) NSURLConnection *connection; +@property (readwrite, nonatomic, strong) NSURLRequest *request; +@property (readwrite, nonatomic, strong) NSURLResponse *response; +@property (readwrite, nonatomic, strong) NSError *error; +@property (readwrite, nonatomic, strong) NSData *responseData; +@property (readwrite, nonatomic, copy) NSString *responseString; +@property (readwrite, nonatomic, assign) NSStringEncoding responseStringEncoding; +@property (readwrite, nonatomic, assign) long long totalBytesRead; +@property (readwrite, nonatomic, copy) AFURLConnectionOperationBackgroundTaskCleanupBlock backgroundTaskCleanup; +@property (readwrite, nonatomic, copy) AFURLConnectionOperationProgressBlock uploadProgress; +@property (readwrite, nonatomic, copy) AFURLConnectionOperationProgressBlock downloadProgress; +@property (readwrite, nonatomic, copy) AFURLConnectionOperationAuthenticationChallengeBlock authenticationChallenge; +@property (readwrite, nonatomic, copy) AFURLConnectionOperationCacheResponseBlock cacheResponse; +@property (readwrite, nonatomic, copy) AFURLConnectionOperationRedirectResponseBlock redirectResponse; + +- (void)operationDidStart; +- (void)finish; +- (void)cancelConnection; +@end + +@implementation AFURLConnectionOperation +@synthesize outputStream = _outputStream; + ++ (void)networkRequestThreadEntryPoint:(id)__unused object { + @autoreleasepool { + [[NSThread currentThread] setName:@"AFNetworking"]; + + NSRunLoop *runLoop = [NSRunLoop currentRunLoop]; + [runLoop addPort:[NSMachPort port] forMode:NSDefaultRunLoopMode]; + [runLoop run]; + } +} + ++ (NSThread *)networkRequestThread { + static NSThread *_networkRequestThread = nil; + static dispatch_once_t oncePredicate; + dispatch_once(&oncePredicate, ^{ + _networkRequestThread = [[NSThread alloc] initWithTarget:self selector:@selector(networkRequestThreadEntryPoint:) object:nil]; + [_networkRequestThread start]; + }); + + return _networkRequestThread; +} + +- (instancetype)initWithRequest:(NSURLRequest *)urlRequest { + NSParameterAssert(urlRequest); + + self = [super init]; + if (!self) { + return nil; + } + + _state = AFOperationReadyState; + + self.lock = [[NSRecursiveLock alloc] init]; + self.lock.name = kAFNetworkingLockName; + + self.runLoopModes = [NSSet setWithObject:NSRunLoopCommonModes]; + + self.request = urlRequest; + + self.shouldUseCredentialStorage = YES; + + self.securityPolicy = [AFSecurityPolicy defaultPolicy]; + + return self; +} + +- (instancetype)init NS_UNAVAILABLE +{ + return nil; +} + +- (void)dealloc { + if (_outputStream) { + [_outputStream close]; + _outputStream = nil; + } + + if (_backgroundTaskCleanup) { + _backgroundTaskCleanup(); + } +} + +#pragma mark - + +- (void)setResponseData:(NSData *)responseData { + [self.lock lock]; + if (!responseData) { + _responseData = nil; + } else { + _responseData = [NSData dataWithBytes:responseData.bytes length:responseData.length]; + } + [self.lock unlock]; +} + +- (NSString *)responseString { + [self.lock lock]; + if (!_responseString && self.response && self.responseData) { + self.responseString = [[NSString alloc] initWithData:self.responseData encoding:self.responseStringEncoding]; + } + [self.lock unlock]; + + return _responseString; +} + +- (NSStringEncoding)responseStringEncoding { + [self.lock lock]; + if (!_responseStringEncoding && self.response) { + NSStringEncoding stringEncoding = NSUTF8StringEncoding; + if (self.response.textEncodingName) { + CFStringEncoding IANAEncoding = CFStringConvertIANACharSetNameToEncoding((__bridge CFStringRef)self.response.textEncodingName); + if (IANAEncoding != kCFStringEncodingInvalidId) { + stringEncoding = CFStringConvertEncodingToNSStringEncoding(IANAEncoding); + } + } + + self.responseStringEncoding = stringEncoding; + } + [self.lock unlock]; + + return _responseStringEncoding; +} + +- (NSInputStream *)inputStream { + return self.request.HTTPBodyStream; +} + +- (void)setInputStream:(NSInputStream *)inputStream { + NSMutableURLRequest *mutableRequest = [self.request mutableCopy]; + mutableRequest.HTTPBodyStream = inputStream; + self.request = mutableRequest; +} + +- (NSOutputStream *)outputStream { + if (!_outputStream) { + self.outputStream = [NSOutputStream outputStreamToMemory]; + } + + return _outputStream; +} + +- (void)setOutputStream:(NSOutputStream *)outputStream { + [self.lock lock]; + if (outputStream != _outputStream) { + if (_outputStream) { + [_outputStream close]; + } + + _outputStream = outputStream; + } + [self.lock unlock]; +} + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +- (void)setShouldExecuteAsBackgroundTaskWithExpirationHandler:(void (^)(void))handler { + [self.lock lock]; + if (!self.backgroundTaskCleanup) { + UIApplication *application = [UIApplication sharedApplication]; + UIBackgroundTaskIdentifier __block backgroundTaskIdentifier = UIBackgroundTaskInvalid; + __weak __typeof(self)weakSelf = self; + + self.backgroundTaskCleanup = ^(){ + if (backgroundTaskIdentifier != UIBackgroundTaskInvalid) { + [[UIApplication sharedApplication] endBackgroundTask:backgroundTaskIdentifier]; + backgroundTaskIdentifier = UIBackgroundTaskInvalid; + } + }; + + backgroundTaskIdentifier = [application beginBackgroundTaskWithExpirationHandler:^{ + __strong __typeof(weakSelf)strongSelf = weakSelf; + + if (handler) { + handler(); + } + + if (strongSelf) { + [strongSelf cancel]; + strongSelf.backgroundTaskCleanup(); + } + }]; + } + [self.lock unlock]; +} +#endif + +#pragma mark - + +- (void)setState:(AFOperationState)state { + if (!AFStateTransitionIsValid(self.state, state, [self isCancelled])) { + return; + } + + [self.lock lock]; + NSString *oldStateKey = AFKeyPathFromOperationState(self.state); + NSString *newStateKey = AFKeyPathFromOperationState(state); + + [self willChangeValueForKey:newStateKey]; + [self willChangeValueForKey:oldStateKey]; + _state = state; + [self didChangeValueForKey:oldStateKey]; + [self didChangeValueForKey:newStateKey]; + [self.lock unlock]; +} + +- (void)pause { + if ([self isPaused] || [self isFinished] || [self isCancelled]) { + return; + } + + [self.lock lock]; + if ([self isExecuting]) { + [self performSelector:@selector(operationDidPause) onThread:[[self class] networkRequestThread] withObject:nil waitUntilDone:NO modes:[self.runLoopModes allObjects]]; + + dispatch_async(dispatch_get_main_queue(), ^{ + NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; + [notificationCenter postNotificationName:AFNetworkingOperationDidFinishNotification object:self]; + }); + } + + self.state = AFOperationPausedState; + [self.lock unlock]; +} + +- (void)operationDidPause { + [self.lock lock]; + [self.connection cancel]; + [self.lock unlock]; +} + +- (BOOL)isPaused { + return self.state == AFOperationPausedState; +} + +- (void)resume { + if (![self isPaused]) { + return; + } + + [self.lock lock]; + self.state = AFOperationReadyState; + + [self start]; + [self.lock unlock]; +} + +#pragma mark - + +- (void)setUploadProgressBlock:(void (^)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite))block { + self.uploadProgress = block; +} + +- (void)setDownloadProgressBlock:(void (^)(NSUInteger bytesRead, long long totalBytesRead, long long totalBytesExpectedToRead))block { + self.downloadProgress = block; +} + +- (void)setWillSendRequestForAuthenticationChallengeBlock:(void (^)(NSURLConnection *connection, NSURLAuthenticationChallenge *challenge))block { + self.authenticationChallenge = block; +} + +- (void)setCacheResponseBlock:(NSCachedURLResponse * (^)(NSURLConnection *connection, NSCachedURLResponse *cachedResponse))block { + self.cacheResponse = block; +} + +- (void)setRedirectResponseBlock:(NSURLRequest * (^)(NSURLConnection *connection, NSURLRequest *request, NSURLResponse *redirectResponse))block { + self.redirectResponse = block; +} + +#pragma mark - NSOperation + +- (void)setCompletionBlock:(void (^)(void))block { + [self.lock lock]; + if (!block) { + [super setCompletionBlock:nil]; + } else { + __weak __typeof(self)weakSelf = self; + [super setCompletionBlock:^ { + __strong __typeof(weakSelf)strongSelf = weakSelf; + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu" + dispatch_group_t group = strongSelf.completionGroup ?: url_request_operation_completion_group(); + dispatch_queue_t queue = strongSelf.completionQueue ?: dispatch_get_main_queue(); +#pragma clang diagnostic pop + + dispatch_group_async(group, queue, ^{ + block(); + }); + + dispatch_group_notify(group, url_request_operation_completion_queue(), ^{ + [strongSelf setCompletionBlock:nil]; + }); + }]; + } + [self.lock unlock]; +} + +- (BOOL)isReady { + return self.state == AFOperationReadyState && [super isReady]; +} + +- (BOOL)isExecuting { + return self.state == AFOperationExecutingState; +} + +- (BOOL)isFinished { + return self.state == AFOperationFinishedState; +} + +- (BOOL)isConcurrent { + return YES; +} + +- (void)start { + [self.lock lock]; + if ([self isCancelled]) { + [self performSelector:@selector(cancelConnection) onThread:[[self class] networkRequestThread] withObject:nil waitUntilDone:NO modes:[self.runLoopModes allObjects]]; + } else if ([self isReady]) { + self.state = AFOperationExecutingState; + + [self performSelector:@selector(operationDidStart) onThread:[[self class] networkRequestThread] withObject:nil waitUntilDone:NO modes:[self.runLoopModes allObjects]]; + } + [self.lock unlock]; +} + +- (void)operationDidStart { + [self.lock lock]; + if (![self isCancelled]) { + self.connection = [[NSURLConnection alloc] initWithRequest:self.request delegate:self startImmediately:NO]; + + NSRunLoop *runLoop = [NSRunLoop currentRunLoop]; + for (NSString *runLoopMode in self.runLoopModes) { + [self.connection scheduleInRunLoop:runLoop forMode:runLoopMode]; + [self.outputStream scheduleInRunLoop:runLoop forMode:runLoopMode]; + } + + [self.outputStream open]; + [self.connection start]; + } + [self.lock unlock]; + + dispatch_async(dispatch_get_main_queue(), ^{ + [[NSNotificationCenter defaultCenter] postNotificationName:AFNetworkingOperationDidStartNotification object:self]; + }); +} + +- (void)finish { + [self.lock lock]; + self.state = AFOperationFinishedState; + [self.lock unlock]; + + dispatch_async(dispatch_get_main_queue(), ^{ + [[NSNotificationCenter defaultCenter] postNotificationName:AFNetworkingOperationDidFinishNotification object:self]; + }); +} + +- (void)cancel { + [self.lock lock]; + if (![self isFinished] && ![self isCancelled]) { + [super cancel]; + + if ([self isExecuting]) { + [self performSelector:@selector(cancelConnection) onThread:[[self class] networkRequestThread] withObject:nil waitUntilDone:NO modes:[self.runLoopModes allObjects]]; + } + } + [self.lock unlock]; +} + +- (void)cancelConnection { + NSDictionary *userInfo = nil; + if ([self.request URL]) { + userInfo = @{NSURLErrorFailingURLErrorKey : [self.request URL]}; + } + NSError *error = [NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorCancelled userInfo:userInfo]; + + if (![self isFinished]) { + if (self.connection) { + [self.connection cancel]; + [self performSelector:@selector(connection:didFailWithError:) withObject:self.connection withObject:error]; + } else { + // Accommodate race condition where `self.connection` has not yet been set before cancellation + self.error = error; + [self finish]; + } + } +} + +#pragma mark - + ++ (NSArray *)batchOfRequestOperations:(NSArray *)operations + progressBlock:(void (^)(NSUInteger numberOfFinishedOperations, NSUInteger totalNumberOfOperations))progressBlock + completionBlock:(void (^)(NSArray *operations))completionBlock +{ + if (!operations || [operations count] == 0) { + return @[[NSBlockOperation blockOperationWithBlock:^{ + dispatch_async(dispatch_get_main_queue(), ^{ + if (completionBlock) { + completionBlock(@[]); + } + }); + }]]; + } + + __block dispatch_group_t group = dispatch_group_create(); + NSBlockOperation *batchedOperation = [NSBlockOperation blockOperationWithBlock:^{ + dispatch_group_notify(group, dispatch_get_main_queue(), ^{ + if (completionBlock) { + completionBlock(operations); + } + }); + }]; + + for (AFURLConnectionOperation *operation in operations) { + operation.completionGroup = group; + void (^originalCompletionBlock)(void) = [operation.completionBlock copy]; + __weak __typeof(operation)weakOperation = operation; + operation.completionBlock = ^{ + __strong __typeof(weakOperation)strongOperation = weakOperation; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu" + dispatch_queue_t queue = strongOperation.completionQueue ?: dispatch_get_main_queue(); +#pragma clang diagnostic pop + dispatch_group_async(group, queue, ^{ + if (originalCompletionBlock) { + originalCompletionBlock(); + } + + NSUInteger numberOfFinishedOperations = [[operations indexesOfObjectsPassingTest:^BOOL(id op, NSUInteger __unused idx, BOOL __unused *stop) { + return [op isFinished]; + }] count]; + + if (progressBlock) { + progressBlock(numberOfFinishedOperations, [operations count]); + } + + dispatch_group_leave(group); + }); + }; + + dispatch_group_enter(group); + [batchedOperation addDependency:operation]; + } + + return [operations arrayByAddingObject:batchedOperation]; +} + +#pragma mark - NSObject + +- (NSString *)description { + [self.lock lock]; + NSString *description = [NSString stringWithFormat:@"<%@: %p, state: %@, cancelled: %@ request: %@, response: %@>", NSStringFromClass([self class]), self, AFKeyPathFromOperationState(self.state), ([self isCancelled] ? @"YES" : @"NO"), self.request, self.response]; + [self.lock unlock]; + return description; +} + +#pragma mark - NSURLConnectionDelegate + +- (void)connection:(NSURLConnection *)connection +willSendRequestForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge +{ + if (self.authenticationChallenge) { + self.authenticationChallenge(connection, challenge); + return; + } + + if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) { + if ([self.securityPolicy evaluateServerTrust:challenge.protectionSpace.serverTrust forDomain:challenge.protectionSpace.host]) { + NSURLCredential *credential = [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]; + [[challenge sender] useCredential:credential forAuthenticationChallenge:challenge]; + } else { + [[challenge sender] cancelAuthenticationChallenge:challenge]; + } + } else { + if ([challenge previousFailureCount] == 0) { + if (self.credential) { + [[challenge sender] useCredential:self.credential forAuthenticationChallenge:challenge]; + } else { + [[challenge sender] continueWithoutCredentialForAuthenticationChallenge:challenge]; + } + } else { + [[challenge sender] continueWithoutCredentialForAuthenticationChallenge:challenge]; + } + } +} + +- (BOOL)connectionShouldUseCredentialStorage:(NSURLConnection __unused *)connection { + return self.shouldUseCredentialStorage; +} + +- (NSURLRequest *)connection:(NSURLConnection *)connection + willSendRequest:(NSURLRequest *)request + redirectResponse:(NSURLResponse *)redirectResponse +{ + if (self.redirectResponse) { + return self.redirectResponse(connection, request, redirectResponse); + } else { + return request; + } +} + +- (void)connection:(NSURLConnection __unused *)connection + didSendBodyData:(NSInteger)bytesWritten + totalBytesWritten:(NSInteger)totalBytesWritten +totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite +{ + dispatch_async(dispatch_get_main_queue(), ^{ + if (self.uploadProgress) { + self.uploadProgress((NSUInteger)bytesWritten, totalBytesWritten, totalBytesExpectedToWrite); + } + }); +} + +- (void)connection:(NSURLConnection __unused *)connection +didReceiveResponse:(NSURLResponse *)response +{ + self.response = response; +} + +- (void)connection:(NSURLConnection __unused *)connection + didReceiveData:(NSData *)data +{ + NSUInteger length = [data length]; + while (YES) { + NSInteger totalNumberOfBytesWritten = 0; + if ([self.outputStream hasSpaceAvailable]) { + const uint8_t *dataBuffer = (uint8_t *)[data bytes]; + + NSInteger numberOfBytesWritten = 0; + while (totalNumberOfBytesWritten < (NSInteger)length) { + numberOfBytesWritten = [self.outputStream write:&dataBuffer[(NSUInteger)totalNumberOfBytesWritten] maxLength:(length - (NSUInteger)totalNumberOfBytesWritten)]; + if (numberOfBytesWritten == -1) { + break; + } + + totalNumberOfBytesWritten += numberOfBytesWritten; + } + + break; + } + + if (self.outputStream.streamError) { + [self.connection cancel]; + [self performSelector:@selector(connection:didFailWithError:) withObject:self.connection withObject:self.outputStream.streamError]; + return; + } + } + + dispatch_async(dispatch_get_main_queue(), ^{ + self.totalBytesRead += (long long)length; + + if (self.downloadProgress) { + self.downloadProgress(length, self.totalBytesRead, self.response.expectedContentLength); + } + }); +} + +- (void)connectionDidFinishLoading:(NSURLConnection __unused *)connection { + self.responseData = [self.outputStream propertyForKey:NSStreamDataWrittenToMemoryStreamKey]; + + [self.outputStream close]; + if (self.responseData) { + self.outputStream = nil; + } + + self.connection = nil; + + [self finish]; +} + +- (void)connection:(NSURLConnection __unused *)connection + didFailWithError:(NSError *)error +{ + self.error = error; + + [self.outputStream close]; + if (self.responseData) { + self.outputStream = nil; + } + + self.connection = nil; + + [self finish]; +} + +- (NSCachedURLResponse *)connection:(NSURLConnection *)connection + willCacheResponse:(NSCachedURLResponse *)cachedResponse +{ + if (self.cacheResponse) { + return self.cacheResponse(connection, cachedResponse); + } else { + if ([self isCancelled]) { + return nil; + } + + return cachedResponse; + } +} + +#pragma mark - NSSecureCoding + ++ (BOOL)supportsSecureCoding { + return YES; +} + +- (id)initWithCoder:(NSCoder *)decoder { + NSURLRequest *request = [decoder decodeObjectOfClass:[NSURLRequest class] forKey:NSStringFromSelector(@selector(request))]; + + self = [self initWithRequest:request]; + if (!self) { + return nil; + } + + self.state = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(state))] integerValue]; + self.response = [decoder decodeObjectOfClass:[NSHTTPURLResponse class] forKey:NSStringFromSelector(@selector(response))]; + self.error = [decoder decodeObjectOfClass:[NSError class] forKey:NSStringFromSelector(@selector(error))]; + self.responseData = [decoder decodeObjectOfClass:[NSData class] forKey:NSStringFromSelector(@selector(responseData))]; + self.totalBytesRead = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(totalBytesRead))] longLongValue]; + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [self pause]; + + [coder encodeObject:self.request forKey:NSStringFromSelector(@selector(request))]; + + switch (self.state) { + case AFOperationExecutingState: + case AFOperationPausedState: + [coder encodeInteger:AFOperationReadyState forKey:NSStringFromSelector(@selector(state))]; + break; + default: + [coder encodeInteger:self.state forKey:NSStringFromSelector(@selector(state))]; + break; + } + + [coder encodeObject:self.response forKey:NSStringFromSelector(@selector(response))]; + [coder encodeObject:self.error forKey:NSStringFromSelector(@selector(error))]; + [coder encodeObject:self.responseData forKey:NSStringFromSelector(@selector(responseData))]; + [coder encodeInt64:self.totalBytesRead forKey:NSStringFromSelector(@selector(totalBytesRead))]; +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone { + AFURLConnectionOperation *operation = [(AFURLConnectionOperation *)[[self class] allocWithZone:zone] initWithRequest:self.request]; + + operation.uploadProgress = self.uploadProgress; + operation.downloadProgress = self.downloadProgress; + operation.authenticationChallenge = self.authenticationChallenge; + operation.cacheResponse = self.cacheResponse; + operation.redirectResponse = self.redirectResponse; + operation.completionQueue = self.completionQueue; + operation.completionGroup = self.completionGroup; + + return operation; +} + +@end diff --git a/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h b/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h new file mode 100644 index 0000000..d747496 --- /dev/null +++ b/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h @@ -0,0 +1,473 @@ +// AFURLRequestSerialization.h +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#if TARGET_OS_IOS +#import +#elif TARGET_OS_WATCH +#import +#endif + +NS_ASSUME_NONNULL_BEGIN + +/** + The `AFURLRequestSerialization` protocol is adopted by an object that encodes parameters for a specified HTTP requests. Request serializers may encode parameters as query strings, HTTP bodies, setting the appropriate HTTP header fields as necessary. + + For example, a JSON request serializer may set the HTTP body of the request to a JSON representation, and set the `Content-Type` HTTP header field value to `application/json`. + */ +@protocol AFURLRequestSerialization + +/** + Returns a request with the specified parameters encoded into a copy of the original request. + + @param request The original request. + @param parameters The parameters to be encoded. + @param error The error that occurred while attempting to encode the request parameters. + + @return A serialized request. + */ +- (nullable NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request + withParameters:(nullable id)parameters + error:(NSError * __nullable __autoreleasing *)error; + +@end + +#pragma mark - + +/** + + */ +typedef NS_ENUM(NSUInteger, AFHTTPRequestQueryStringSerializationStyle) { + AFHTTPRequestQueryStringDefaultStyle = 0, +}; + +@protocol AFMultipartFormData; + +/** + `AFHTTPRequestSerializer` conforms to the `AFURLRequestSerialization` & `AFURLResponseSerialization` protocols, offering a concrete base implementation of query string / URL form-encoded parameter serialization and default request headers, as well as response status code and content type validation. + + Any request or response serializer dealing with HTTP is encouraged to subclass `AFHTTPRequestSerializer` in order to ensure consistent default behavior. + */ +@interface AFHTTPRequestSerializer : NSObject + +/** + The string encoding used to serialize parameters. `NSUTF8StringEncoding` by default. + */ +@property (nonatomic, assign) NSStringEncoding stringEncoding; + +/** + Whether created requests can use the device’s cellular radio (if present). `YES` by default. + + @see NSMutableURLRequest -setAllowsCellularAccess: + */ +@property (nonatomic, assign) BOOL allowsCellularAccess; + +/** + The cache policy of created requests. `NSURLRequestUseProtocolCachePolicy` by default. + + @see NSMutableURLRequest -setCachePolicy: + */ +@property (nonatomic, assign) NSURLRequestCachePolicy cachePolicy; + +/** + Whether created requests should use the default cookie handling. `YES` by default. + + @see NSMutableURLRequest -setHTTPShouldHandleCookies: + */ +@property (nonatomic, assign) BOOL HTTPShouldHandleCookies; + +/** + Whether created requests can continue transmitting data before receiving a response from an earlier transmission. `NO` by default + + @see NSMutableURLRequest -setHTTPShouldUsePipelining: + */ +@property (nonatomic, assign) BOOL HTTPShouldUsePipelining; + +/** + The network service type for created requests. `NSURLNetworkServiceTypeDefault` by default. + + @see NSMutableURLRequest -setNetworkServiceType: + */ +@property (nonatomic, assign) NSURLRequestNetworkServiceType networkServiceType; + +/** + The timeout interval, in seconds, for created requests. The default timeout interval is 60 seconds. + + @see NSMutableURLRequest -setTimeoutInterval: + */ +@property (nonatomic, assign) NSTimeInterval timeoutInterval; + +///--------------------------------------- +/// @name Configuring HTTP Request Headers +///--------------------------------------- + +/** + Default HTTP header field values to be applied to serialized requests. By default, these include the following: + + - `Accept-Language` with the contents of `NSLocale +preferredLanguages` + - `User-Agent` with the contents of various bundle identifiers and OS designations + + @discussion To add or remove default request headers, use `setValue:forHTTPHeaderField:`. + */ +@property (readonly, nonatomic, strong) NSDictionary *HTTPRequestHeaders; + +/** + Creates and returns a serializer with default configuration. + */ ++ (instancetype)serializer; + +/** + Sets the value for the HTTP headers set in request objects made by the HTTP client. If `nil`, removes the existing value for that header. + + @param field The HTTP header to set a default value for + @param value The value set as default for the specified header, or `nil` + */ +- (void)setValue:(nullable NSString *)value +forHTTPHeaderField:(NSString *)field; + +/** + Returns the value for the HTTP headers set in the request serializer. + + @param field The HTTP header to retrieve the default value for + + @return The value set as default for the specified header, or `nil` + */ +- (nullable NSString *)valueForHTTPHeaderField:(NSString *)field; + +/** + Sets the "Authorization" HTTP header set in request objects made by the HTTP client to a basic authentication value with Base64-encoded username and password. This overwrites any existing value for this header. + + @param username The HTTP basic auth username + @param password The HTTP basic auth password + */ +- (void)setAuthorizationHeaderFieldWithUsername:(NSString *)username + password:(NSString *)password; + +/** + @deprecated This method has been deprecated. Use -setValue:forHTTPHeaderField: instead. + */ +- (void)setAuthorizationHeaderFieldWithToken:(NSString *)token DEPRECATED_ATTRIBUTE; + + +/** + Clears any existing value for the "Authorization" HTTP header. + */ +- (void)clearAuthorizationHeader; + +///------------------------------------------------------- +/// @name Configuring Query String Parameter Serialization +///------------------------------------------------------- + +/** + HTTP methods for which serialized requests will encode parameters as a query string. `GET`, `HEAD`, and `DELETE` by default. + */ +@property (nonatomic, strong) NSSet *HTTPMethodsEncodingParametersInURI; + +/** + Set the method of query string serialization according to one of the pre-defined styles. + + @param style The serialization style. + + @see AFHTTPRequestQueryStringSerializationStyle + */ +- (void)setQueryStringSerializationWithStyle:(AFHTTPRequestQueryStringSerializationStyle)style; + +/** + Set the a custom method of query string serialization according to the specified block. + + @param block A block that defines a process of encoding parameters into a query string. This block returns the query string and takes three arguments: the request, the parameters to encode, and the error that occurred when attempting to encode parameters for the given request. + */ +- (void)setQueryStringSerializationWithBlock:(nullable NSString * (^)(NSURLRequest *request, id parameters, NSError * __autoreleasing *error))block; + +///------------------------------- +/// @name Creating Request Objects +///------------------------------- + +/** + @deprecated This method has been deprecated. Use -requestWithMethod:URLString:parameters:error: instead. + */ +- (NSMutableURLRequest *)requestWithMethod:(NSString *)method + URLString:(NSString *)URLString + parameters:(id)parameters DEPRECATED_ATTRIBUTE; + +/** + Creates an `NSMutableURLRequest` object with the specified HTTP method and URL string. + + If the HTTP method is `GET`, `HEAD`, or `DELETE`, the parameters will be used to construct a url-encoded query string that is appended to the request's URL. Otherwise, the parameters will be encoded according to the value of the `parameterEncoding` property, and set as the request body. + + @param method The HTTP method for the request, such as `GET`, `POST`, `PUT`, or `DELETE`. This parameter must not be `nil`. + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be either set as a query string for `GET` requests, or the request HTTP body. + @param error The error that occurred while constructing the request. + + @return An `NSMutableURLRequest` object. + */ +- (NSMutableURLRequest *)requestWithMethod:(NSString *)method + URLString:(NSString *)URLString + parameters:(nullable id)parameters + error:(NSError * __nullable __autoreleasing *)error; + +/** + @deprecated This method has been deprecated. Use -multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:error: instead. + */ +- (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method + URLString:(NSString *)URLString + parameters:(NSDictionary *)parameters + constructingBodyWithBlock:(void (^)(id formData))block DEPRECATED_ATTRIBUTE; + +/** + Creates an `NSMutableURLRequest` object with the specified HTTP method and URLString, and constructs a `multipart/form-data` HTTP body, using the specified parameters and multipart form data block. See http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.2 + + Multipart form requests are automatically streamed, reading files directly from disk along with in-memory data in a single HTTP body. The resulting `NSMutableURLRequest` object has an `HTTPBodyStream` property, so refrain from setting `HTTPBodyStream` or `HTTPBody` on this request object, as it will clear out the multipart form body stream. + + @param method The HTTP method for the request. This parameter must not be `GET` or `HEAD`, or `nil`. + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded and set in the request HTTP body. + @param block A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the `AFMultipartFormData` protocol. + @param error The error that occurred while constructing the request. + + @return An `NSMutableURLRequest` object + */ +- (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method + URLString:(NSString *)URLString + parameters:(nullable NSDictionary *)parameters + constructingBodyWithBlock:(nullable void (^)(id formData))block + error:(NSError * __nullable __autoreleasing *)error; + +/** + Creates an `NSMutableURLRequest` by removing the `HTTPBodyStream` from a request, and asynchronously writing its contents into the specified file, invoking the completion handler when finished. + + @param request The multipart form request. The `HTTPBodyStream` property of `request` must not be `nil`. + @param fileURL The file URL to write multipart form contents to. + @param handler A handler block to execute. + + @discussion There is a bug in `NSURLSessionTask` that causes requests to not send a `Content-Length` header when streaming contents from an HTTP body, which is notably problematic when interacting with the Amazon S3 webservice. As a workaround, this method takes a request constructed with `multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:error:`, or any other request with an `HTTPBodyStream`, writes the contents to the specified file and returns a copy of the original request with the `HTTPBodyStream` property set to `nil`. From here, the file can either be passed to `AFURLSessionManager -uploadTaskWithRequest:fromFile:progress:completionHandler:`, or have its contents read into an `NSData` that's assigned to the `HTTPBody` property of the request. + + @see https://github.com/AFNetworking/AFNetworking/issues/1398 + */ +- (NSMutableURLRequest *)requestWithMultipartFormRequest:(NSURLRequest *)request + writingStreamContentsToFile:(NSURL *)fileURL + completionHandler:(nullable void (^)(NSError *error))handler; + +@end + +#pragma mark - + +/** + The `AFMultipartFormData` protocol defines the methods supported by the parameter in the block argument of `AFHTTPRequestSerializer -multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:`. + */ +@protocol AFMultipartFormData + +/** + Appends the HTTP header `Content-Disposition: file; filename=#{generated filename}; name=#{name}"` and `Content-Type: #{generated mimeType}`, followed by the encoded file data and the multipart form boundary. + + The filename and MIME type for this data in the form will be automatically generated, using the last path component of the `fileURL` and system associated MIME type for the `fileURL` extension, respectively. + + @param fileURL The URL corresponding to the file whose content will be appended to the form. This parameter must not be `nil`. + @param name The name to be associated with the specified data. This parameter must not be `nil`. + @param error If an error occurs, upon return contains an `NSError` object that describes the problem. + + @return `YES` if the file data was successfully appended, otherwise `NO`. + */ +- (BOOL)appendPartWithFileURL:(NSURL *)fileURL + name:(NSString *)name + error:(NSError * __nullable __autoreleasing *)error; + +/** + Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}"` and `Content-Type: #{mimeType}`, followed by the encoded file data and the multipart form boundary. + + @param fileURL The URL corresponding to the file whose content will be appended to the form. This parameter must not be `nil`. + @param name The name to be associated with the specified data. This parameter must not be `nil`. + @param fileName The file name to be used in the `Content-Disposition` header. This parameter must not be `nil`. + @param mimeType The declared MIME type of the file data. This parameter must not be `nil`. + @param error If an error occurs, upon return contains an `NSError` object that describes the problem. + + @return `YES` if the file data was successfully appended otherwise `NO`. + */ +- (BOOL)appendPartWithFileURL:(NSURL *)fileURL + name:(NSString *)name + fileName:(NSString *)fileName + mimeType:(NSString *)mimeType + error:(NSError * __nullable __autoreleasing *)error; + +/** + Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}"` and `Content-Type: #{mimeType}`, followed by the data from the input stream and the multipart form boundary. + + @param inputStream The input stream to be appended to the form data + @param name The name to be associated with the specified input stream. This parameter must not be `nil`. + @param fileName The filename to be associated with the specified input stream. This parameter must not be `nil`. + @param length The length of the specified input stream in bytes. + @param mimeType The MIME type of the specified data. (For example, the MIME type for a JPEG image is image/jpeg.) For a list of valid MIME types, see http://www.iana.org/assignments/media-types/. This parameter must not be `nil`. + */ +- (void)appendPartWithInputStream:(nullable NSInputStream *)inputStream + name:(NSString *)name + fileName:(NSString *)fileName + length:(int64_t)length + mimeType:(NSString *)mimeType; + +/** + Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}"` and `Content-Type: #{mimeType}`, followed by the encoded file data and the multipart form boundary. + + @param data The data to be encoded and appended to the form data. + @param name The name to be associated with the specified data. This parameter must not be `nil`. + @param fileName The filename to be associated with the specified data. This parameter must not be `nil`. + @param mimeType The MIME type of the specified data. (For example, the MIME type for a JPEG image is image/jpeg.) For a list of valid MIME types, see http://www.iana.org/assignments/media-types/. This parameter must not be `nil`. + */ +- (void)appendPartWithFileData:(NSData *)data + name:(NSString *)name + fileName:(NSString *)fileName + mimeType:(NSString *)mimeType; + +/** + Appends the HTTP headers `Content-Disposition: form-data; name=#{name}"`, followed by the encoded data and the multipart form boundary. + + @param data The data to be encoded and appended to the form data. + @param name The name to be associated with the specified data. This parameter must not be `nil`. + */ + +- (void)appendPartWithFormData:(NSData *)data + name:(NSString *)name; + + +/** + Appends HTTP headers, followed by the encoded data and the multipart form boundary. + + @param headers The HTTP headers to be appended to the form data. + @param body The data to be encoded and appended to the form data. This parameter must not be `nil`. + */ +- (void)appendPartWithHeaders:(nullable NSDictionary *)headers + body:(NSData *)body; + +/** + Throttles request bandwidth by limiting the packet size and adding a delay for each chunk read from the upload stream. + + When uploading over a 3G or EDGE connection, requests may fail with "request body stream exhausted". Setting a maximum packet size and delay according to the recommended values (`kAFUploadStream3GSuggestedPacketSize` and `kAFUploadStream3GSuggestedDelay`) lowers the risk of the input stream exceeding its allocated bandwidth. Unfortunately, there is no definite way to distinguish between a 3G, EDGE, or LTE connection over `NSURLConnection`. As such, it is not recommended that you throttle bandwidth based solely on network reachability. Instead, you should consider checking for the "request body stream exhausted" in a failure block, and then retrying the request with throttled bandwidth. + + @param numberOfBytes Maximum packet size, in number of bytes. The default packet size for an input stream is 16kb. + @param delay Duration of delay each time a packet is read. By default, no delay is set. + */ +- (void)throttleBandwidthWithPacketSize:(NSUInteger)numberOfBytes + delay:(NSTimeInterval)delay; + +@end + +#pragma mark - + +/** + `AFJSONRequestSerializer` is a subclass of `AFHTTPRequestSerializer` that encodes parameters as JSON using `NSJSONSerialization`, setting the `Content-Type` of the encoded request to `application/json`. + */ +@interface AFJSONRequestSerializer : AFHTTPRequestSerializer + +/** + Options for writing the request JSON data from Foundation objects. For possible values, see the `NSJSONSerialization` documentation section "NSJSONWritingOptions". `0` by default. + */ +@property (nonatomic, assign) NSJSONWritingOptions writingOptions; + +/** + Creates and returns a JSON serializer with specified reading and writing options. + + @param writingOptions The specified JSON writing options. + */ ++ (instancetype)serializerWithWritingOptions:(NSJSONWritingOptions)writingOptions; + +@end + +#pragma mark - + +/** + `AFPropertyListRequestSerializer` is a subclass of `AFHTTPRequestSerializer` that encodes parameters as JSON using `NSPropertyListSerializer`, setting the `Content-Type` of the encoded request to `application/x-plist`. + */ +@interface AFPropertyListRequestSerializer : AFHTTPRequestSerializer + +/** + The property list format. Possible values are described in "NSPropertyListFormat". + */ +@property (nonatomic, assign) NSPropertyListFormat format; + +/** + @warning The `writeOptions` property is currently unused. + */ +@property (nonatomic, assign) NSPropertyListWriteOptions writeOptions; + +/** + Creates and returns a property list serializer with a specified format, read options, and write options. + + @param format The property list format. + @param writeOptions The property list write options. + + @warning The `writeOptions` property is currently unused. + */ ++ (instancetype)serializerWithFormat:(NSPropertyListFormat)format + writeOptions:(NSPropertyListWriteOptions)writeOptions; + +@end + +#pragma mark - + +///---------------- +/// @name Constants +///---------------- + +/** + ## Error Domains + + The following error domain is predefined. + + - `NSString * const AFURLRequestSerializationErrorDomain` + + ### Constants + + `AFURLRequestSerializationErrorDomain` + AFURLRequestSerializer errors. Error codes for `AFURLRequestSerializationErrorDomain` correspond to codes in `NSURLErrorDomain`. + */ +extern NSString * const AFURLRequestSerializationErrorDomain; + +/** + ## User info dictionary keys + + These keys may exist in the user info dictionary, in addition to those defined for NSError. + + - `NSString * const AFNetworkingOperationFailingURLRequestErrorKey` + + ### Constants + + `AFNetworkingOperationFailingURLRequestErrorKey` + The corresponding value is an `NSURLRequest` containing the request of the operation associated with an error. This key is only present in the `AFURLRequestSerializationErrorDomain`. + */ +extern NSString * const AFNetworkingOperationFailingURLRequestErrorKey; + +/** + ## Throttling Bandwidth for HTTP Request Input Streams + + @see -throttleBandwidthWithPacketSize:delay: + + ### Constants + + `kAFUploadStream3GSuggestedPacketSize` + Maximum packet size, in number of bytes. Equal to 16kb. + + `kAFUploadStream3GSuggestedDelay` + Duration of delay each time a packet is read. Equal to 0.2 seconds. + */ +extern NSUInteger const kAFUploadStream3GSuggestedPacketSize; +extern NSTimeInterval const kAFUploadStream3GSuggestedDelay; + +NS_ASSUME_NONNULL_END diff --git a/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.m b/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.m new file mode 100644 index 0000000..8431761 --- /dev/null +++ b/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.m @@ -0,0 +1,1397 @@ +// AFURLRequestSerialization.m +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFURLRequestSerialization.h" + +#if __IPHONE_OS_VERSION_MIN_REQUIRED +#import +#else +#import +#endif + +NSString * const AFURLRequestSerializationErrorDomain = @"com.alamofire.error.serialization.request"; +NSString * const AFNetworkingOperationFailingURLRequestErrorKey = @"com.alamofire.serialization.request.error.response"; + +typedef NSString * (^AFQueryStringSerializationBlock)(NSURLRequest *request, id parameters, NSError *__autoreleasing *error); + +static NSString * AFBase64EncodedStringFromString(NSString *string) { + NSData *data = [NSData dataWithBytes:[string UTF8String] length:[string lengthOfBytesUsingEncoding:NSUTF8StringEncoding]]; + NSUInteger length = [data length]; + NSMutableData *mutableData = [NSMutableData dataWithLength:((length + 2) / 3) * 4]; + + uint8_t *input = (uint8_t *)[data bytes]; + uint8_t *output = (uint8_t *)[mutableData mutableBytes]; + + for (NSUInteger i = 0; i < length; i += 3) { + NSUInteger value = 0; + for (NSUInteger j = i; j < (i + 3); j++) { + value <<= 8; + if (j < length) { + value |= (0xFF & input[j]); + } + } + + static uint8_t const kAFBase64EncodingTable[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + + NSUInteger idx = (i / 3) * 4; + output[idx + 0] = kAFBase64EncodingTable[(value >> 18) & 0x3F]; + output[idx + 1] = kAFBase64EncodingTable[(value >> 12) & 0x3F]; + output[idx + 2] = (i + 1) < length ? kAFBase64EncodingTable[(value >> 6) & 0x3F] : '='; + output[idx + 3] = (i + 2) < length ? kAFBase64EncodingTable[(value >> 0) & 0x3F] : '='; + } + + return [[NSString alloc] initWithData:mutableData encoding:NSASCIIStringEncoding]; +} + +/** + Returns a percent-escaped string following RFC 3986 for a query string key or value. + RFC 3986 states that the following characters are "reserved" characters. + - General Delimiters: ":", "#", "[", "]", "@", "?", "/" + - Sub-Delimiters: "!", "$", "&", "'", "(", ")", "*", "+", ",", ";", "=" + + In RFC 3986 - Section 3.4, it states that the "?" and "/" characters should not be escaped to allow + query strings to include a URL. Therefore, all "reserved" characters with the exception of "?" and "/" + should be percent-escaped in the query string. + - parameter string: The string to be percent-escaped. + - returns: The percent-escaped string. + */ +static NSString * AFPercentEscapedStringFromString(NSString *string) { + static NSString * const kAFCharactersGeneralDelimitersToEncode = @":#[]@"; // does not include "?" or "/" due to RFC 3986 - Section 3.4 + static NSString * const kAFCharactersSubDelimitersToEncode = @"!$&'()*+,;="; + + NSMutableCharacterSet * allowedCharacterSet = [[NSCharacterSet URLQueryAllowedCharacterSet] mutableCopy]; + [allowedCharacterSet removeCharactersInString:[kAFCharactersGeneralDelimitersToEncode stringByAppendingString:kAFCharactersSubDelimitersToEncode]]; + + return [string stringByAddingPercentEncodingWithAllowedCharacters:allowedCharacterSet]; +} + +#pragma mark - + +@interface AFQueryStringPair : NSObject +@property (readwrite, nonatomic, strong) id field; +@property (readwrite, nonatomic, strong) id value; + +- (id)initWithField:(id)field value:(id)value; + +- (NSString *)URLEncodedStringValue; +@end + +@implementation AFQueryStringPair + +- (id)initWithField:(id)field value:(id)value { + self = [super init]; + if (!self) { + return nil; + } + + self.field = field; + self.value = value; + + return self; +} + +- (NSString *)URLEncodedStringValue { + if (!self.value || [self.value isEqual:[NSNull null]]) { + return AFPercentEscapedStringFromString([self.field description]); + } else { + return [NSString stringWithFormat:@"%@=%@", AFPercentEscapedStringFromString([self.field description]), AFPercentEscapedStringFromString([self.value description])]; + } +} + +@end + +#pragma mark - + +extern NSArray * AFQueryStringPairsFromDictionary(NSDictionary *dictionary); +extern NSArray * AFQueryStringPairsFromKeyAndValue(NSString *key, id value); + +static NSString * AFQueryStringFromParameters(NSDictionary *parameters) { + NSMutableArray *mutablePairs = [NSMutableArray array]; + for (AFQueryStringPair *pair in AFQueryStringPairsFromDictionary(parameters)) { + [mutablePairs addObject:[pair URLEncodedStringValue]]; + } + + return [mutablePairs componentsJoinedByString:@"&"]; +} + +NSArray * AFQueryStringPairsFromDictionary(NSDictionary *dictionary) { + return AFQueryStringPairsFromKeyAndValue(nil, dictionary); +} + +NSArray * AFQueryStringPairsFromKeyAndValue(NSString *key, id value) { + NSMutableArray *mutableQueryStringComponents = [NSMutableArray array]; + + NSSortDescriptor *sortDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"description" ascending:YES selector:@selector(compare:)]; + + if ([value isKindOfClass:[NSDictionary class]]) { + NSDictionary *dictionary = value; + // Sort dictionary keys to ensure consistent ordering in query string, which is important when deserializing potentially ambiguous sequences, such as an array of dictionaries + for (id nestedKey in [dictionary.allKeys sortedArrayUsingDescriptors:@[ sortDescriptor ]]) { + id nestedValue = dictionary[nestedKey]; + if (nestedValue) { + [mutableQueryStringComponents addObjectsFromArray:AFQueryStringPairsFromKeyAndValue((key ? [NSString stringWithFormat:@"%@[%@]", key, nestedKey] : nestedKey), nestedValue)]; + } + } + } else if ([value isKindOfClass:[NSArray class]]) { + NSArray *array = value; + for (id nestedValue in array) { + [mutableQueryStringComponents addObjectsFromArray:AFQueryStringPairsFromKeyAndValue([NSString stringWithFormat:@"%@[]", key], nestedValue)]; + } + } else if ([value isKindOfClass:[NSSet class]]) { + NSSet *set = value; + for (id obj in [set sortedArrayUsingDescriptors:@[ sortDescriptor ]]) { + [mutableQueryStringComponents addObjectsFromArray:AFQueryStringPairsFromKeyAndValue(key, obj)]; + } + } else { + [mutableQueryStringComponents addObject:[[AFQueryStringPair alloc] initWithField:key value:value]]; + } + + return mutableQueryStringComponents; +} + +#pragma mark - + +@interface AFStreamingMultipartFormData : NSObject +- (instancetype)initWithURLRequest:(NSMutableURLRequest *)urlRequest + stringEncoding:(NSStringEncoding)encoding; + +- (NSMutableURLRequest *)requestByFinalizingMultipartFormData; +@end + +#pragma mark - + +static NSArray * AFHTTPRequestSerializerObservedKeyPaths() { + static NSArray *_AFHTTPRequestSerializerObservedKeyPaths = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + _AFHTTPRequestSerializerObservedKeyPaths = @[NSStringFromSelector(@selector(allowsCellularAccess)), NSStringFromSelector(@selector(cachePolicy)), NSStringFromSelector(@selector(HTTPShouldHandleCookies)), NSStringFromSelector(@selector(HTTPShouldUsePipelining)), NSStringFromSelector(@selector(networkServiceType)), NSStringFromSelector(@selector(timeoutInterval))]; + }); + + return _AFHTTPRequestSerializerObservedKeyPaths; +} + +static void *AFHTTPRequestSerializerObserverContext = &AFHTTPRequestSerializerObserverContext; + +@interface AFHTTPRequestSerializer () +@property (readwrite, nonatomic, strong) NSMutableSet *mutableObservedChangedKeyPaths; +@property (readwrite, nonatomic, strong) NSMutableDictionary *mutableHTTPRequestHeaders; +@property (readwrite, nonatomic, assign) AFHTTPRequestQueryStringSerializationStyle queryStringSerializationStyle; +@property (readwrite, nonatomic, copy) AFQueryStringSerializationBlock queryStringSerialization; +@end + +@implementation AFHTTPRequestSerializer + ++ (instancetype)serializer { + return [[self alloc] init]; +} + +- (instancetype)init { + self = [super init]; + if (!self) { + return nil; + } + + self.stringEncoding = NSUTF8StringEncoding; + + self.mutableHTTPRequestHeaders = [NSMutableDictionary dictionary]; + + // Accept-Language HTTP Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4 + NSMutableArray *acceptLanguagesComponents = [NSMutableArray array]; + [[NSLocale preferredLanguages] enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { + float q = 1.0f - (idx * 0.1f); + [acceptLanguagesComponents addObject:[NSString stringWithFormat:@"%@;q=%0.1g", obj, q]]; + *stop = q <= 0.5f; + }]; + [self setValue:[acceptLanguagesComponents componentsJoinedByString:@", "] forHTTPHeaderField:@"Accept-Language"]; + + NSString *userAgent = nil; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu" +#if TARGET_OS_IOS + // User-Agent Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.43 + userAgent = [NSString stringWithFormat:@"%@/%@ (%@; iOS %@; Scale/%0.2f)", [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleExecutableKey] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleIdentifierKey], [[NSBundle mainBundle] infoDictionary][@"CFBundleShortVersionString"] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleVersionKey], [[UIDevice currentDevice] model], [[UIDevice currentDevice] systemVersion], [[UIScreen mainScreen] scale]]; +#elif TARGET_OS_WATCH + // User-Agent Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.43 + userAgent = [NSString stringWithFormat:@"%@/%@ (%@; watchOS %@; Scale/%0.2f)", [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleExecutableKey] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleIdentifierKey], [[NSBundle mainBundle] infoDictionary][@"CFBundleShortVersionString"] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleVersionKey], [[WKInterfaceDevice currentDevice] model], [[WKInterfaceDevice currentDevice] systemVersion], [[WKInterfaceDevice currentDevice] screenScale]]; +#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) + userAgent = [NSString stringWithFormat:@"%@/%@ (Mac OS X %@)", [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleExecutableKey] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleIdentifierKey], [[NSBundle mainBundle] infoDictionary][@"CFBundleShortVersionString"] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleVersionKey], [[NSProcessInfo processInfo] operatingSystemVersionString]]; +#endif +#pragma clang diagnostic pop + if (userAgent) { + if (![userAgent canBeConvertedToEncoding:NSASCIIStringEncoding]) { + NSMutableString *mutableUserAgent = [userAgent mutableCopy]; + if (CFStringTransform((__bridge CFMutableStringRef)(mutableUserAgent), NULL, (__bridge CFStringRef)@"Any-Latin; Latin-ASCII; [:^ASCII:] Remove", false)) { + userAgent = mutableUserAgent; + } + } + [self setValue:userAgent forHTTPHeaderField:@"User-Agent"]; + } + + // HTTP Method Definitions; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html + self.HTTPMethodsEncodingParametersInURI = [NSSet setWithObjects:@"GET", @"HEAD", @"DELETE", nil]; + + self.mutableObservedChangedKeyPaths = [NSMutableSet set]; + for (NSString *keyPath in AFHTTPRequestSerializerObservedKeyPaths()) { + if ([self respondsToSelector:NSSelectorFromString(keyPath)]) { + [self addObserver:self forKeyPath:keyPath options:NSKeyValueObservingOptionNew context:AFHTTPRequestSerializerObserverContext]; + } + } + + return self; +} + +- (void)dealloc { + for (NSString *keyPath in AFHTTPRequestSerializerObservedKeyPaths()) { + if ([self respondsToSelector:NSSelectorFromString(keyPath)]) { + [self removeObserver:self forKeyPath:keyPath context:AFHTTPRequestSerializerObserverContext]; + } + } +} + +#pragma mark - + +// Workarounds for crashing behavior using Key-Value Observing with XCTest +// See https://github.com/AFNetworking/AFNetworking/issues/2523 + +- (void)setAllowsCellularAccess:(BOOL)allowsCellularAccess { + [self willChangeValueForKey:NSStringFromSelector(@selector(allowsCellularAccess))]; + _allowsCellularAccess = allowsCellularAccess; + [self didChangeValueForKey:NSStringFromSelector(@selector(allowsCellularAccess))]; +} + +- (void)setCachePolicy:(NSURLRequestCachePolicy)cachePolicy { + [self willChangeValueForKey:NSStringFromSelector(@selector(cachePolicy))]; + _cachePolicy = cachePolicy; + [self didChangeValueForKey:NSStringFromSelector(@selector(cachePolicy))]; +} + +- (void)setHTTPShouldHandleCookies:(BOOL)HTTPShouldHandleCookies { + [self willChangeValueForKey:NSStringFromSelector(@selector(HTTPShouldHandleCookies))]; + _HTTPShouldHandleCookies = HTTPShouldHandleCookies; + [self didChangeValueForKey:NSStringFromSelector(@selector(HTTPShouldHandleCookies))]; +} + +- (void)setHTTPShouldUsePipelining:(BOOL)HTTPShouldUsePipelining { + [self willChangeValueForKey:NSStringFromSelector(@selector(HTTPShouldUsePipelining))]; + _HTTPShouldUsePipelining = HTTPShouldUsePipelining; + [self didChangeValueForKey:NSStringFromSelector(@selector(HTTPShouldUsePipelining))]; +} + +- (void)setNetworkServiceType:(NSURLRequestNetworkServiceType)networkServiceType { + [self willChangeValueForKey:NSStringFromSelector(@selector(networkServiceType))]; + _networkServiceType = networkServiceType; + [self didChangeValueForKey:NSStringFromSelector(@selector(networkServiceType))]; +} + +- (void)setTimeoutInterval:(NSTimeInterval)timeoutInterval { + [self willChangeValueForKey:NSStringFromSelector(@selector(timeoutInterval))]; + _timeoutInterval = timeoutInterval; + [self didChangeValueForKey:NSStringFromSelector(@selector(timeoutInterval))]; +} + +#pragma mark - + +- (NSDictionary *)HTTPRequestHeaders { + return [NSDictionary dictionaryWithDictionary:self.mutableHTTPRequestHeaders]; +} + +- (void)setValue:(NSString *)value +forHTTPHeaderField:(NSString *)field +{ + [self.mutableHTTPRequestHeaders setValue:value forKey:field]; +} + +- (NSString *)valueForHTTPHeaderField:(NSString *)field { + return [self.mutableHTTPRequestHeaders valueForKey:field]; +} + +- (void)setAuthorizationHeaderFieldWithUsername:(NSString *)username + password:(NSString *)password +{ + NSString *basicAuthCredentials = [NSString stringWithFormat:@"%@:%@", username, password]; + [self setValue:[NSString stringWithFormat:@"Basic %@", AFBase64EncodedStringFromString(basicAuthCredentials)] forHTTPHeaderField:@"Authorization"]; +} + +- (void)setAuthorizationHeaderFieldWithToken:(NSString *)token { + [self setValue:[NSString stringWithFormat:@"Token token=\"%@\"", token] forHTTPHeaderField:@"Authorization"]; +} + +- (void)clearAuthorizationHeader { + [self.mutableHTTPRequestHeaders removeObjectForKey:@"Authorization"]; +} + +#pragma mark - + +- (void)setQueryStringSerializationWithStyle:(AFHTTPRequestQueryStringSerializationStyle)style { + self.queryStringSerializationStyle = style; + self.queryStringSerialization = nil; +} + +- (void)setQueryStringSerializationWithBlock:(NSString *(^)(NSURLRequest *, id, NSError *__autoreleasing *))block { + self.queryStringSerialization = block; +} + +#pragma mark - + +- (NSMutableURLRequest *)requestWithMethod:(NSString *)method + URLString:(NSString *)URLString + parameters:(id)parameters +{ + return [self requestWithMethod:method URLString:URLString parameters:parameters error:nil]; +} + +- (NSMutableURLRequest *)requestWithMethod:(NSString *)method + URLString:(NSString *)URLString + parameters:(id)parameters + error:(NSError *__autoreleasing *)error +{ + NSParameterAssert(method); + NSParameterAssert(URLString); + + NSURL *url = [NSURL URLWithString:URLString]; + + NSParameterAssert(url); + + NSMutableURLRequest *mutableRequest = [[NSMutableURLRequest alloc] initWithURL:url]; + mutableRequest.HTTPMethod = method; + + for (NSString *keyPath in AFHTTPRequestSerializerObservedKeyPaths()) { + if ([self.mutableObservedChangedKeyPaths containsObject:keyPath]) { + [mutableRequest setValue:[self valueForKeyPath:keyPath] forKey:keyPath]; + } + } + + mutableRequest = [[self requestBySerializingRequest:mutableRequest withParameters:parameters error:error] mutableCopy]; + + return mutableRequest; +} + +- (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method + URLString:(NSString *)URLString + parameters:(NSDictionary *)parameters + constructingBodyWithBlock:(void (^)(id formData))block +{ + return [self multipartFormRequestWithMethod:method URLString:URLString parameters:parameters constructingBodyWithBlock:block error:nil]; +} + +- (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method + URLString:(NSString *)URLString + parameters:(NSDictionary *)parameters + constructingBodyWithBlock:(void (^)(id formData))block + error:(NSError *__autoreleasing *)error +{ + NSParameterAssert(method); + NSParameterAssert(![method isEqualToString:@"GET"] && ![method isEqualToString:@"HEAD"]); + + NSMutableURLRequest *mutableRequest = [self requestWithMethod:method URLString:URLString parameters:nil error:error]; + + __block AFStreamingMultipartFormData *formData = [[AFStreamingMultipartFormData alloc] initWithURLRequest:mutableRequest stringEncoding:NSUTF8StringEncoding]; + + if (parameters) { + for (AFQueryStringPair *pair in AFQueryStringPairsFromDictionary(parameters)) { + NSData *data = nil; + if ([pair.value isKindOfClass:[NSData class]]) { + data = pair.value; + } else if ([pair.value isEqual:[NSNull null]]) { + data = [NSData data]; + } else { + data = [[pair.value description] dataUsingEncoding:self.stringEncoding]; + } + + if (data) { + [formData appendPartWithFormData:data name:[pair.field description]]; + } + } + } + + if (block) { + block(formData); + } + + return [formData requestByFinalizingMultipartFormData]; +} + +- (NSMutableURLRequest *)requestWithMultipartFormRequest:(NSURLRequest *)request + writingStreamContentsToFile:(NSURL *)fileURL + completionHandler:(void (^)(NSError *error))handler +{ + NSParameterAssert(request.HTTPBodyStream); + NSParameterAssert([fileURL isFileURL]); + + NSInputStream *inputStream = request.HTTPBodyStream; + NSOutputStream *outputStream = [[NSOutputStream alloc] initWithURL:fileURL append:NO]; + __block NSError *error = nil; + + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + [inputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; + [outputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; + + [inputStream open]; + [outputStream open]; + + while ([inputStream hasBytesAvailable] && [outputStream hasSpaceAvailable]) { + uint8_t buffer[1024]; + + NSInteger bytesRead = [inputStream read:buffer maxLength:1024]; + if (inputStream.streamError || bytesRead < 0) { + error = inputStream.streamError; + break; + } + + NSInteger bytesWritten = [outputStream write:buffer maxLength:(NSUInteger)bytesRead]; + if (outputStream.streamError || bytesWritten < 0) { + error = outputStream.streamError; + break; + } + + if (bytesRead == 0 && bytesWritten == 0) { + break; + } + } + + [outputStream close]; + [inputStream close]; + + if (handler) { + dispatch_async(dispatch_get_main_queue(), ^{ + handler(error); + }); + } + }); + + NSMutableURLRequest *mutableRequest = [request mutableCopy]; + mutableRequest.HTTPBodyStream = nil; + + return mutableRequest; +} + +#pragma mark - AFURLRequestSerialization + +- (NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request + withParameters:(id)parameters + error:(NSError *__autoreleasing *)error +{ + NSParameterAssert(request); + + NSMutableURLRequest *mutableRequest = [request mutableCopy]; + + [self.HTTPRequestHeaders enumerateKeysAndObjectsUsingBlock:^(id field, id value, BOOL * __unused stop) { + if (![request valueForHTTPHeaderField:field]) { + [mutableRequest setValue:value forHTTPHeaderField:field]; + } + }]; + + if (parameters) { + NSString *query = nil; + if (self.queryStringSerialization) { + NSError *serializationError; + query = self.queryStringSerialization(request, parameters, &serializationError); + + if (serializationError) { + if (error) { + *error = serializationError; + } + + return nil; + } + } else { + switch (self.queryStringSerializationStyle) { + case AFHTTPRequestQueryStringDefaultStyle: + query = AFQueryStringFromParameters(parameters); + break; + } + } + + if ([self.HTTPMethodsEncodingParametersInURI containsObject:[[request HTTPMethod] uppercaseString]]) { + mutableRequest.URL = [NSURL URLWithString:[[mutableRequest.URL absoluteString] stringByAppendingFormat:mutableRequest.URL.query ? @"&%@" : @"?%@", query]]; + } else { + if (![mutableRequest valueForHTTPHeaderField:@"Content-Type"]) { + [mutableRequest setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"]; + } + [mutableRequest setHTTPBody:[query dataUsingEncoding:self.stringEncoding]]; + } + } + + return mutableRequest; +} + +#pragma mark - NSKeyValueObserving + ++ (BOOL)automaticallyNotifiesObserversForKey:(NSString *)key { + if ([AFHTTPRequestSerializerObservedKeyPaths() containsObject:key]) { + return NO; + } + + return [super automaticallyNotifiesObserversForKey:key]; +} + +- (void)observeValueForKeyPath:(NSString *)keyPath + ofObject:(__unused id)object + change:(NSDictionary *)change + context:(void *)context +{ + if (context == AFHTTPRequestSerializerObserverContext) { + if ([change[NSKeyValueChangeNewKey] isEqual:[NSNull null]]) { + [self.mutableObservedChangedKeyPaths removeObject:keyPath]; + } else { + [self.mutableObservedChangedKeyPaths addObject:keyPath]; + } + } +} + +#pragma mark - NSSecureCoding + ++ (BOOL)supportsSecureCoding { + return YES; +} + +- (id)initWithCoder:(NSCoder *)decoder { + self = [self init]; + if (!self) { + return nil; + } + + self.mutableHTTPRequestHeaders = [[decoder decodeObjectOfClass:[NSDictionary class] forKey:NSStringFromSelector(@selector(mutableHTTPRequestHeaders))] mutableCopy]; + self.queryStringSerializationStyle = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(queryStringSerializationStyle))] unsignedIntegerValue]; + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [coder encodeObject:self.mutableHTTPRequestHeaders forKey:NSStringFromSelector(@selector(mutableHTTPRequestHeaders))]; + [coder encodeInteger:self.queryStringSerializationStyle forKey:NSStringFromSelector(@selector(queryStringSerializationStyle))]; +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone { + AFHTTPRequestSerializer *serializer = [[[self class] allocWithZone:zone] init]; + serializer.mutableHTTPRequestHeaders = [self.mutableHTTPRequestHeaders mutableCopyWithZone:zone]; + serializer.queryStringSerializationStyle = self.queryStringSerializationStyle; + serializer.queryStringSerialization = self.queryStringSerialization; + + return serializer; +} + +@end + +#pragma mark - + +static NSString * AFCreateMultipartFormBoundary() { + return [NSString stringWithFormat:@"Boundary+%08X%08X", arc4random(), arc4random()]; +} + +static NSString * const kAFMultipartFormCRLF = @"\r\n"; + +static inline NSString * AFMultipartFormInitialBoundary(NSString *boundary) { + return [NSString stringWithFormat:@"--%@%@", boundary, kAFMultipartFormCRLF]; +} + +static inline NSString * AFMultipartFormEncapsulationBoundary(NSString *boundary) { + return [NSString stringWithFormat:@"%@--%@%@", kAFMultipartFormCRLF, boundary, kAFMultipartFormCRLF]; +} + +static inline NSString * AFMultipartFormFinalBoundary(NSString *boundary) { + return [NSString stringWithFormat:@"%@--%@--%@", kAFMultipartFormCRLF, boundary, kAFMultipartFormCRLF]; +} + +static inline NSString * AFContentTypeForPathExtension(NSString *extension) { +#ifdef __UTTYPE__ + NSString *UTI = (__bridge_transfer NSString *)UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, (__bridge CFStringRef)extension, NULL); + NSString *contentType = (__bridge_transfer NSString *)UTTypeCopyPreferredTagWithClass((__bridge CFStringRef)UTI, kUTTagClassMIMEType); + if (!contentType) { + return @"application/octet-stream"; + } else { + return contentType; + } +#else +#pragma unused (extension) + return @"application/octet-stream"; +#endif +} + +NSUInteger const kAFUploadStream3GSuggestedPacketSize = 1024 * 16; +NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2; + +@interface AFHTTPBodyPart : NSObject +@property (nonatomic, assign) NSStringEncoding stringEncoding; +@property (nonatomic, strong) NSDictionary *headers; +@property (nonatomic, copy) NSString *boundary; +@property (nonatomic, strong) id body; +@property (nonatomic, assign) unsigned long long bodyContentLength; +@property (nonatomic, strong) NSInputStream *inputStream; + +@property (nonatomic, assign) BOOL hasInitialBoundary; +@property (nonatomic, assign) BOOL hasFinalBoundary; + +@property (readonly, nonatomic, assign, getter = hasBytesAvailable) BOOL bytesAvailable; +@property (readonly, nonatomic, assign) unsigned long long contentLength; + +- (NSInteger)read:(uint8_t *)buffer + maxLength:(NSUInteger)length; +@end + +@interface AFMultipartBodyStream : NSInputStream +@property (nonatomic, assign) NSUInteger numberOfBytesInPacket; +@property (nonatomic, assign) NSTimeInterval delay; +@property (nonatomic, strong) NSInputStream *inputStream; +@property (readonly, nonatomic, assign) unsigned long long contentLength; +@property (readonly, nonatomic, assign, getter = isEmpty) BOOL empty; + +- (id)initWithStringEncoding:(NSStringEncoding)encoding; +- (void)setInitialAndFinalBoundaries; +- (void)appendHTTPBodyPart:(AFHTTPBodyPart *)bodyPart; +@end + +#pragma mark - + +@interface AFStreamingMultipartFormData () +@property (readwrite, nonatomic, copy) NSMutableURLRequest *request; +@property (readwrite, nonatomic, assign) NSStringEncoding stringEncoding; +@property (readwrite, nonatomic, copy) NSString *boundary; +@property (readwrite, nonatomic, strong) AFMultipartBodyStream *bodyStream; +@end + +@implementation AFStreamingMultipartFormData + +- (id)initWithURLRequest:(NSMutableURLRequest *)urlRequest + stringEncoding:(NSStringEncoding)encoding +{ + self = [super init]; + if (!self) { + return nil; + } + + self.request = urlRequest; + self.stringEncoding = encoding; + self.boundary = AFCreateMultipartFormBoundary(); + self.bodyStream = [[AFMultipartBodyStream alloc] initWithStringEncoding:encoding]; + + return self; +} + +- (BOOL)appendPartWithFileURL:(NSURL *)fileURL + name:(NSString *)name + error:(NSError * __autoreleasing *)error +{ + NSParameterAssert(fileURL); + NSParameterAssert(name); + + NSString *fileName = [fileURL lastPathComponent]; + NSString *mimeType = AFContentTypeForPathExtension([fileURL pathExtension]); + + return [self appendPartWithFileURL:fileURL name:name fileName:fileName mimeType:mimeType error:error]; +} + +- (BOOL)appendPartWithFileURL:(NSURL *)fileURL + name:(NSString *)name + fileName:(NSString *)fileName + mimeType:(NSString *)mimeType + error:(NSError * __autoreleasing *)error +{ + NSParameterAssert(fileURL); + NSParameterAssert(name); + NSParameterAssert(fileName); + NSParameterAssert(mimeType); + + if (![fileURL isFileURL]) { + NSDictionary *userInfo = @{NSLocalizedFailureReasonErrorKey: NSLocalizedStringFromTable(@"Expected URL to be a file URL", @"AFNetworking", nil)}; + if (error) { + *error = [[NSError alloc] initWithDomain:AFURLRequestSerializationErrorDomain code:NSURLErrorBadURL userInfo:userInfo]; + } + + return NO; + } else if ([fileURL checkResourceIsReachableAndReturnError:error] == NO) { + NSDictionary *userInfo = @{NSLocalizedFailureReasonErrorKey: NSLocalizedStringFromTable(@"File URL not reachable.", @"AFNetworking", nil)}; + if (error) { + *error = [[NSError alloc] initWithDomain:AFURLRequestSerializationErrorDomain code:NSURLErrorBadURL userInfo:userInfo]; + } + + return NO; + } + + NSDictionary *fileAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:[fileURL path] error:error]; + if (!fileAttributes) { + return NO; + } + + NSMutableDictionary *mutableHeaders = [NSMutableDictionary dictionary]; + [mutableHeaders setValue:[NSString stringWithFormat:@"form-data; name=\"%@\"; filename=\"%@\"", name, fileName] forKey:@"Content-Disposition"]; + [mutableHeaders setValue:mimeType forKey:@"Content-Type"]; + + AFHTTPBodyPart *bodyPart = [[AFHTTPBodyPart alloc] init]; + bodyPart.stringEncoding = self.stringEncoding; + bodyPart.headers = mutableHeaders; + bodyPart.boundary = self.boundary; + bodyPart.body = fileURL; + bodyPart.bodyContentLength = [fileAttributes[NSFileSize] unsignedLongLongValue]; + [self.bodyStream appendHTTPBodyPart:bodyPart]; + + return YES; +} + +- (void)appendPartWithInputStream:(NSInputStream *)inputStream + name:(NSString *)name + fileName:(NSString *)fileName + length:(int64_t)length + mimeType:(NSString *)mimeType +{ + NSParameterAssert(name); + NSParameterAssert(fileName); + NSParameterAssert(mimeType); + + NSMutableDictionary *mutableHeaders = [NSMutableDictionary dictionary]; + [mutableHeaders setValue:[NSString stringWithFormat:@"form-data; name=\"%@\"; filename=\"%@\"", name, fileName] forKey:@"Content-Disposition"]; + [mutableHeaders setValue:mimeType forKey:@"Content-Type"]; + + AFHTTPBodyPart *bodyPart = [[AFHTTPBodyPart alloc] init]; + bodyPart.stringEncoding = self.stringEncoding; + bodyPart.headers = mutableHeaders; + bodyPart.boundary = self.boundary; + bodyPart.body = inputStream; + + bodyPart.bodyContentLength = (unsigned long long)length; + + [self.bodyStream appendHTTPBodyPart:bodyPart]; +} + +- (void)appendPartWithFileData:(NSData *)data + name:(NSString *)name + fileName:(NSString *)fileName + mimeType:(NSString *)mimeType +{ + NSParameterAssert(name); + NSParameterAssert(fileName); + NSParameterAssert(mimeType); + + NSMutableDictionary *mutableHeaders = [NSMutableDictionary dictionary]; + [mutableHeaders setValue:[NSString stringWithFormat:@"form-data; name=\"%@\"; filename=\"%@\"", name, fileName] forKey:@"Content-Disposition"]; + [mutableHeaders setValue:mimeType forKey:@"Content-Type"]; + + [self appendPartWithHeaders:mutableHeaders body:data]; +} + +- (void)appendPartWithFormData:(NSData *)data + name:(NSString *)name +{ + NSParameterAssert(name); + + NSMutableDictionary *mutableHeaders = [NSMutableDictionary dictionary]; + [mutableHeaders setValue:[NSString stringWithFormat:@"form-data; name=\"%@\"", name] forKey:@"Content-Disposition"]; + + [self appendPartWithHeaders:mutableHeaders body:data]; +} + +- (void)appendPartWithHeaders:(NSDictionary *)headers + body:(NSData *)body +{ + NSParameterAssert(body); + + AFHTTPBodyPart *bodyPart = [[AFHTTPBodyPart alloc] init]; + bodyPart.stringEncoding = self.stringEncoding; + bodyPart.headers = headers; + bodyPart.boundary = self.boundary; + bodyPart.bodyContentLength = [body length]; + bodyPart.body = body; + + [self.bodyStream appendHTTPBodyPart:bodyPart]; +} + +- (void)throttleBandwidthWithPacketSize:(NSUInteger)numberOfBytes + delay:(NSTimeInterval)delay +{ + self.bodyStream.numberOfBytesInPacket = numberOfBytes; + self.bodyStream.delay = delay; +} + +- (NSMutableURLRequest *)requestByFinalizingMultipartFormData { + if ([self.bodyStream isEmpty]) { + return self.request; + } + + // Reset the initial and final boundaries to ensure correct Content-Length + [self.bodyStream setInitialAndFinalBoundaries]; + [self.request setHTTPBodyStream:self.bodyStream]; + + [self.request setValue:[NSString stringWithFormat:@"multipart/form-data; boundary=%@", self.boundary] forHTTPHeaderField:@"Content-Type"]; + [self.request setValue:[NSString stringWithFormat:@"%llu", [self.bodyStream contentLength]] forHTTPHeaderField:@"Content-Length"]; + + return self.request; +} + +@end + +#pragma mark - + +@interface NSStream () +@property (readwrite) NSStreamStatus streamStatus; +@property (readwrite, copy) NSError *streamError; +@end + +@interface AFMultipartBodyStream () +@property (readwrite, nonatomic, assign) NSStringEncoding stringEncoding; +@property (readwrite, nonatomic, strong) NSMutableArray *HTTPBodyParts; +@property (readwrite, nonatomic, strong) NSEnumerator *HTTPBodyPartEnumerator; +@property (readwrite, nonatomic, strong) AFHTTPBodyPart *currentHTTPBodyPart; +@property (readwrite, nonatomic, strong) NSOutputStream *outputStream; +@property (readwrite, nonatomic, strong) NSMutableData *buffer; +@end + +@implementation AFMultipartBodyStream +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wimplicit-atomic-properties" +#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1100) +@synthesize delegate; +#endif +@synthesize streamStatus; +@synthesize streamError; +#pragma clang diagnostic pop + +- (id)initWithStringEncoding:(NSStringEncoding)encoding { + self = [super init]; + if (!self) { + return nil; + } + + self.stringEncoding = encoding; + self.HTTPBodyParts = [NSMutableArray array]; + self.numberOfBytesInPacket = NSIntegerMax; + + return self; +} + +- (void)setInitialAndFinalBoundaries { + if ([self.HTTPBodyParts count] > 0) { + for (AFHTTPBodyPart *bodyPart in self.HTTPBodyParts) { + bodyPart.hasInitialBoundary = NO; + bodyPart.hasFinalBoundary = NO; + } + + [[self.HTTPBodyParts firstObject] setHasInitialBoundary:YES]; + [[self.HTTPBodyParts lastObject] setHasFinalBoundary:YES]; + } +} + +- (void)appendHTTPBodyPart:(AFHTTPBodyPart *)bodyPart { + [self.HTTPBodyParts addObject:bodyPart]; +} + +- (BOOL)isEmpty { + return [self.HTTPBodyParts count] == 0; +} + +#pragma mark - NSInputStream + +- (NSInteger)read:(uint8_t *)buffer + maxLength:(NSUInteger)length +{ + if ([self streamStatus] == NSStreamStatusClosed) { + return 0; + } + + NSInteger totalNumberOfBytesRead = 0; + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu" + while ((NSUInteger)totalNumberOfBytesRead < MIN(length, self.numberOfBytesInPacket)) { + if (!self.currentHTTPBodyPart || ![self.currentHTTPBodyPart hasBytesAvailable]) { + if (!(self.currentHTTPBodyPart = [self.HTTPBodyPartEnumerator nextObject])) { + break; + } + } else { + NSUInteger maxLength = length - (NSUInteger)totalNumberOfBytesRead; + NSInteger numberOfBytesRead = [self.currentHTTPBodyPart read:&buffer[totalNumberOfBytesRead] maxLength:maxLength]; + if (numberOfBytesRead == -1) { + self.streamError = self.currentHTTPBodyPart.inputStream.streamError; + break; + } else { + totalNumberOfBytesRead += numberOfBytesRead; + + if (self.delay > 0.0f) { + [NSThread sleepForTimeInterval:self.delay]; + } + } + } + } +#pragma clang diagnostic pop + + return totalNumberOfBytesRead; +} + +- (BOOL)getBuffer:(__unused uint8_t **)buffer + length:(__unused NSUInteger *)len +{ + return NO; +} + +- (BOOL)hasBytesAvailable { + return [self streamStatus] == NSStreamStatusOpen; +} + +#pragma mark - NSStream + +- (void)open { + if (self.streamStatus == NSStreamStatusOpen) { + return; + } + + self.streamStatus = NSStreamStatusOpen; + + [self setInitialAndFinalBoundaries]; + self.HTTPBodyPartEnumerator = [self.HTTPBodyParts objectEnumerator]; +} + +- (void)close { + self.streamStatus = NSStreamStatusClosed; +} + +- (id)propertyForKey:(__unused NSString *)key { + return nil; +} + +- (BOOL)setProperty:(__unused id)property + forKey:(__unused NSString *)key +{ + return NO; +} + +- (void)scheduleInRunLoop:(__unused NSRunLoop *)aRunLoop + forMode:(__unused NSString *)mode +{} + +- (void)removeFromRunLoop:(__unused NSRunLoop *)aRunLoop + forMode:(__unused NSString *)mode +{} + +- (unsigned long long)contentLength { + unsigned long long length = 0; + for (AFHTTPBodyPart *bodyPart in self.HTTPBodyParts) { + length += [bodyPart contentLength]; + } + + return length; +} + +#pragma mark - Undocumented CFReadStream Bridged Methods + +- (void)_scheduleInCFRunLoop:(__unused CFRunLoopRef)aRunLoop + forMode:(__unused CFStringRef)aMode +{} + +- (void)_unscheduleFromCFRunLoop:(__unused CFRunLoopRef)aRunLoop + forMode:(__unused CFStringRef)aMode +{} + +- (BOOL)_setCFClientFlags:(__unused CFOptionFlags)inFlags + callback:(__unused CFReadStreamClientCallBack)inCallback + context:(__unused CFStreamClientContext *)inContext { + return NO; +} + +#pragma mark - NSCopying + +-(id)copyWithZone:(NSZone *)zone { + AFMultipartBodyStream *bodyStreamCopy = [[[self class] allocWithZone:zone] initWithStringEncoding:self.stringEncoding]; + + for (AFHTTPBodyPart *bodyPart in self.HTTPBodyParts) { + [bodyStreamCopy appendHTTPBodyPart:[bodyPart copy]]; + } + + [bodyStreamCopy setInitialAndFinalBoundaries]; + + return bodyStreamCopy; +} + +@end + +#pragma mark - + +typedef enum { + AFEncapsulationBoundaryPhase = 1, + AFHeaderPhase = 2, + AFBodyPhase = 3, + AFFinalBoundaryPhase = 4, +} AFHTTPBodyPartReadPhase; + +@interface AFHTTPBodyPart () { + AFHTTPBodyPartReadPhase _phase; + NSInputStream *_inputStream; + unsigned long long _phaseReadOffset; +} + +- (BOOL)transitionToNextPhase; +- (NSInteger)readData:(NSData *)data + intoBuffer:(uint8_t *)buffer + maxLength:(NSUInteger)length; +@end + +@implementation AFHTTPBodyPart + +- (id)init { + self = [super init]; + if (!self) { + return nil; + } + + [self transitionToNextPhase]; + + return self; +} + +- (void)dealloc { + if (_inputStream) { + [_inputStream close]; + _inputStream = nil; + } +} + +- (NSInputStream *)inputStream { + if (!_inputStream) { + if ([self.body isKindOfClass:[NSData class]]) { + _inputStream = [NSInputStream inputStreamWithData:self.body]; + } else if ([self.body isKindOfClass:[NSURL class]]) { + _inputStream = [NSInputStream inputStreamWithURL:self.body]; + } else if ([self.body isKindOfClass:[NSInputStream class]]) { + _inputStream = self.body; + } else { + _inputStream = [NSInputStream inputStreamWithData:[NSData data]]; + } + } + + return _inputStream; +} + +- (NSString *)stringForHeaders { + NSMutableString *headerString = [NSMutableString string]; + for (NSString *field in [self.headers allKeys]) { + [headerString appendString:[NSString stringWithFormat:@"%@: %@%@", field, [self.headers valueForKey:field], kAFMultipartFormCRLF]]; + } + [headerString appendString:kAFMultipartFormCRLF]; + + return [NSString stringWithString:headerString]; +} + +- (unsigned long long)contentLength { + unsigned long long length = 0; + + NSData *encapsulationBoundaryData = [([self hasInitialBoundary] ? AFMultipartFormInitialBoundary(self.boundary) : AFMultipartFormEncapsulationBoundary(self.boundary)) dataUsingEncoding:self.stringEncoding]; + length += [encapsulationBoundaryData length]; + + NSData *headersData = [[self stringForHeaders] dataUsingEncoding:self.stringEncoding]; + length += [headersData length]; + + length += _bodyContentLength; + + NSData *closingBoundaryData = ([self hasFinalBoundary] ? [AFMultipartFormFinalBoundary(self.boundary) dataUsingEncoding:self.stringEncoding] : [NSData data]); + length += [closingBoundaryData length]; + + return length; +} + +- (BOOL)hasBytesAvailable { + // Allows `read:maxLength:` to be called again if `AFMultipartFormFinalBoundary` doesn't fit into the available buffer + if (_phase == AFFinalBoundaryPhase) { + return YES; + } + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wcovered-switch-default" + switch (self.inputStream.streamStatus) { + case NSStreamStatusNotOpen: + case NSStreamStatusOpening: + case NSStreamStatusOpen: + case NSStreamStatusReading: + case NSStreamStatusWriting: + return YES; + case NSStreamStatusAtEnd: + case NSStreamStatusClosed: + case NSStreamStatusError: + default: + return NO; + } +#pragma clang diagnostic pop +} + +- (NSInteger)read:(uint8_t *)buffer + maxLength:(NSUInteger)length +{ + NSInteger totalNumberOfBytesRead = 0; + + if (_phase == AFEncapsulationBoundaryPhase) { + NSData *encapsulationBoundaryData = [([self hasInitialBoundary] ? AFMultipartFormInitialBoundary(self.boundary) : AFMultipartFormEncapsulationBoundary(self.boundary)) dataUsingEncoding:self.stringEncoding]; + totalNumberOfBytesRead += [self readData:encapsulationBoundaryData intoBuffer:&buffer[totalNumberOfBytesRead] maxLength:(length - (NSUInteger)totalNumberOfBytesRead)]; + } + + if (_phase == AFHeaderPhase) { + NSData *headersData = [[self stringForHeaders] dataUsingEncoding:self.stringEncoding]; + totalNumberOfBytesRead += [self readData:headersData intoBuffer:&buffer[totalNumberOfBytesRead] maxLength:(length - (NSUInteger)totalNumberOfBytesRead)]; + } + + if (_phase == AFBodyPhase) { + NSInteger numberOfBytesRead = 0; + + numberOfBytesRead = [self.inputStream read:&buffer[totalNumberOfBytesRead] maxLength:(length - (NSUInteger)totalNumberOfBytesRead)]; + if (numberOfBytesRead == -1) { + return -1; + } else { + totalNumberOfBytesRead += numberOfBytesRead; + + if ([self.inputStream streamStatus] >= NSStreamStatusAtEnd) { + [self transitionToNextPhase]; + } + } + } + + if (_phase == AFFinalBoundaryPhase) { + NSData *closingBoundaryData = ([self hasFinalBoundary] ? [AFMultipartFormFinalBoundary(self.boundary) dataUsingEncoding:self.stringEncoding] : [NSData data]); + totalNumberOfBytesRead += [self readData:closingBoundaryData intoBuffer:&buffer[totalNumberOfBytesRead] maxLength:(length - (NSUInteger)totalNumberOfBytesRead)]; + } + + return totalNumberOfBytesRead; +} + +- (NSInteger)readData:(NSData *)data + intoBuffer:(uint8_t *)buffer + maxLength:(NSUInteger)length +{ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu" + NSRange range = NSMakeRange((NSUInteger)_phaseReadOffset, MIN([data length] - ((NSUInteger)_phaseReadOffset), length)); + [data getBytes:buffer range:range]; +#pragma clang diagnostic pop + + _phaseReadOffset += range.length; + + if (((NSUInteger)_phaseReadOffset) >= [data length]) { + [self transitionToNextPhase]; + } + + return (NSInteger)range.length; +} + +- (BOOL)transitionToNextPhase { + if (![[NSThread currentThread] isMainThread]) { + dispatch_sync(dispatch_get_main_queue(), ^{ + [self transitionToNextPhase]; + }); + return YES; + } + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wcovered-switch-default" + switch (_phase) { + case AFEncapsulationBoundaryPhase: + _phase = AFHeaderPhase; + break; + case AFHeaderPhase: + [self.inputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes]; + [self.inputStream open]; + _phase = AFBodyPhase; + break; + case AFBodyPhase: + [self.inputStream close]; + _phase = AFFinalBoundaryPhase; + break; + case AFFinalBoundaryPhase: + default: + _phase = AFEncapsulationBoundaryPhase; + break; + } + _phaseReadOffset = 0; +#pragma clang diagnostic pop + + return YES; +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone { + AFHTTPBodyPart *bodyPart = [[[self class] allocWithZone:zone] init]; + + bodyPart.stringEncoding = self.stringEncoding; + bodyPart.headers = self.headers; + bodyPart.bodyContentLength = self.bodyContentLength; + bodyPart.body = self.body; + bodyPart.boundary = self.boundary; + + return bodyPart; +} + +@end + +#pragma mark - + +@implementation AFJSONRequestSerializer + ++ (instancetype)serializer { + return [self serializerWithWritingOptions:(NSJSONWritingOptions)0]; +} + ++ (instancetype)serializerWithWritingOptions:(NSJSONWritingOptions)writingOptions +{ + AFJSONRequestSerializer *serializer = [[self alloc] init]; + serializer.writingOptions = writingOptions; + + return serializer; +} + +#pragma mark - AFURLRequestSerialization + +- (NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request + withParameters:(id)parameters + error:(NSError *__autoreleasing *)error +{ + NSParameterAssert(request); + + if ([self.HTTPMethodsEncodingParametersInURI containsObject:[[request HTTPMethod] uppercaseString]]) { + return [super requestBySerializingRequest:request withParameters:parameters error:error]; + } + + NSMutableURLRequest *mutableRequest = [request mutableCopy]; + + [self.HTTPRequestHeaders enumerateKeysAndObjectsUsingBlock:^(id field, id value, BOOL * __unused stop) { + if (![request valueForHTTPHeaderField:field]) { + [mutableRequest setValue:value forHTTPHeaderField:field]; + } + }]; + + if (parameters) { + if (![mutableRequest valueForHTTPHeaderField:@"Content-Type"]) { + [mutableRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; + } + + [mutableRequest setHTTPBody:[NSJSONSerialization dataWithJSONObject:parameters options:self.writingOptions error:error]]; + } + + return mutableRequest; +} + +#pragma mark - NSSecureCoding + +- (id)initWithCoder:(NSCoder *)decoder { + self = [super initWithCoder:decoder]; + if (!self) { + return nil; + } + + self.writingOptions = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(writingOptions))] unsignedIntegerValue]; + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [super encodeWithCoder:coder]; + + [coder encodeInteger:self.writingOptions forKey:NSStringFromSelector(@selector(writingOptions))]; +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone { + AFJSONRequestSerializer *serializer = [super copyWithZone:zone]; + serializer.writingOptions = self.writingOptions; + + return serializer; +} + +@end + +#pragma mark - + +@implementation AFPropertyListRequestSerializer + ++ (instancetype)serializer { + return [self serializerWithFormat:NSPropertyListXMLFormat_v1_0 writeOptions:0]; +} + ++ (instancetype)serializerWithFormat:(NSPropertyListFormat)format + writeOptions:(NSPropertyListWriteOptions)writeOptions +{ + AFPropertyListRequestSerializer *serializer = [[self alloc] init]; + serializer.format = format; + serializer.writeOptions = writeOptions; + + return serializer; +} + +#pragma mark - AFURLRequestSerializer + +- (NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request + withParameters:(id)parameters + error:(NSError *__autoreleasing *)error +{ + NSParameterAssert(request); + + if ([self.HTTPMethodsEncodingParametersInURI containsObject:[[request HTTPMethod] uppercaseString]]) { + return [super requestBySerializingRequest:request withParameters:parameters error:error]; + } + + NSMutableURLRequest *mutableRequest = [request mutableCopy]; + + [self.HTTPRequestHeaders enumerateKeysAndObjectsUsingBlock:^(id field, id value, BOOL * __unused stop) { + if (![request valueForHTTPHeaderField:field]) { + [mutableRequest setValue:value forHTTPHeaderField:field]; + } + }]; + + if (parameters) { + if (![mutableRequest valueForHTTPHeaderField:@"Content-Type"]) { + [mutableRequest setValue:@"application/x-plist" forHTTPHeaderField:@"Content-Type"]; + } + + [mutableRequest setHTTPBody:[NSPropertyListSerialization dataWithPropertyList:parameters format:self.format options:self.writeOptions error:error]]; + } + + return mutableRequest; +} + +#pragma mark - NSSecureCoding + +- (id)initWithCoder:(NSCoder *)decoder { + self = [super initWithCoder:decoder]; + if (!self) { + return nil; + } + + self.format = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(format))] unsignedIntegerValue]; + self.writeOptions = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(writeOptions))] unsignedIntegerValue]; + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [super encodeWithCoder:coder]; + + [coder encodeInteger:self.format forKey:NSStringFromSelector(@selector(format))]; + [coder encodeObject:@(self.writeOptions) forKey:NSStringFromSelector(@selector(writeOptions))]; +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone { + AFPropertyListRequestSerializer *serializer = [super copyWithZone:zone]; + serializer.format = self.format; + serializer.writeOptions = self.writeOptions; + + return serializer; +} + +@end diff --git a/Pods/AFNetworking/AFNetworking/AFURLResponseSerialization.h b/Pods/AFNetworking/AFNetworking/AFURLResponseSerialization.h new file mode 100644 index 0000000..e14dc8a --- /dev/null +++ b/Pods/AFNetworking/AFNetworking/AFURLResponseSerialization.h @@ -0,0 +1,311 @@ +// AFURLResponseSerialization.h +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + The `AFURLResponseSerialization` protocol is adopted by an object that decodes data into a more useful object representation, according to details in the server response. Response serializers may additionally perform validation on the incoming response and data. + + For example, a JSON response serializer may check for an acceptable status code (`2XX` range) and content type (`application/json`), decoding a valid JSON response into an object. + */ +@protocol AFURLResponseSerialization + +/** + The response object decoded from the data associated with a specified response. + + @param response The response to be processed. + @param data The response data to be decoded. + @param error The error that occurred while attempting to decode the response data. + + @return The object decoded from the specified response data. + */ +- (nullable id)responseObjectForResponse:(nullable NSURLResponse *)response + data:(nullable NSData *)data + error:(NSError * __nullable __autoreleasing *)error; + +@end + +#pragma mark - + +/** + `AFHTTPResponseSerializer` conforms to the `AFURLRequestSerialization` & `AFURLResponseSerialization` protocols, offering a concrete base implementation of query string / URL form-encoded parameter serialization and default request headers, as well as response status code and content type validation. + + Any request or response serializer dealing with HTTP is encouraged to subclass `AFHTTPResponseSerializer` in order to ensure consistent default behavior. + */ +@interface AFHTTPResponseSerializer : NSObject + +- (instancetype)init; + +/** + The string encoding used to serialize data received from the server, when no string encoding is specified by the response. `NSUTF8StringEncoding` by default. + */ +@property (nonatomic, assign) NSStringEncoding stringEncoding; + +/** + Creates and returns a serializer with default configuration. + */ ++ (instancetype)serializer; + +///----------------------------------------- +/// @name Configuring Response Serialization +///----------------------------------------- + +/** + The acceptable HTTP status codes for responses. When non-`nil`, responses with status codes not contained by the set will result in an error during validation. + + See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html + */ +@property (nonatomic, copy, nullable) NSIndexSet *acceptableStatusCodes; + +/** + The acceptable MIME types for responses. When non-`nil`, responses with a `Content-Type` with MIME types that do not intersect with the set will result in an error during validation. + */ +@property (nonatomic, copy, nullable) NSSet *acceptableContentTypes; + +/** + Validates the specified response and data. + + In its base implementation, this method checks for an acceptable status code and content type. Subclasses may wish to add other domain-specific checks. + + @param response The response to be validated. + @param data The data associated with the response. + @param error The error that occurred while attempting to validate the response. + + @return `YES` if the response is valid, otherwise `NO`. + */ +- (BOOL)validateResponse:(nullable NSHTTPURLResponse *)response + data:(nullable NSData *)data + error:(NSError * __nullable __autoreleasing *)error; + +@end + +#pragma mark - + + +/** + `AFJSONResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes JSON responses. + + By default, `AFJSONResponseSerializer` accepts the following MIME types, which includes the official standard, `application/json`, as well as other commonly-used types: + + - `application/json` + - `text/json` + - `text/javascript` + */ +@interface AFJSONResponseSerializer : AFHTTPResponseSerializer + +- (instancetype)init; + +/** + Options for reading the response JSON data and creating the Foundation objects. For possible values, see the `NSJSONSerialization` documentation section "NSJSONReadingOptions". `0` by default. + */ +@property (nonatomic, assign) NSJSONReadingOptions readingOptions; + +/** + Whether to remove keys with `NSNull` values from response JSON. Defaults to `NO`. + */ +@property (nonatomic, assign) BOOL removesKeysWithNullValues; + +/** + Creates and returns a JSON serializer with specified reading and writing options. + + @param readingOptions The specified JSON reading options. + */ ++ (instancetype)serializerWithReadingOptions:(NSJSONReadingOptions)readingOptions; + +@end + +#pragma mark - + +/** + `AFXMLParserResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes XML responses as an `NSXMLParser` objects. + + By default, `AFXMLParserResponseSerializer` accepts the following MIME types, which includes the official standard, `application/xml`, as well as other commonly-used types: + + - `application/xml` + - `text/xml` + */ +@interface AFXMLParserResponseSerializer : AFHTTPResponseSerializer + +@end + +#pragma mark - + +#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED + +/** + `AFXMLDocumentResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes XML responses as an `NSXMLDocument` objects. + + By default, `AFXMLDocumentResponseSerializer` accepts the following MIME types, which includes the official standard, `application/xml`, as well as other commonly-used types: + + - `application/xml` + - `text/xml` + */ +@interface AFXMLDocumentResponseSerializer : AFHTTPResponseSerializer + +- (instancetype)init; + +/** + Input and output options specifically intended for `NSXMLDocument` objects. For possible values, see the `NSJSONSerialization` documentation section "NSJSONReadingOptions". `0` by default. + */ +@property (nonatomic, assign) NSUInteger options; + +/** + Creates and returns an XML document serializer with the specified options. + + @param mask The XML document options. + */ ++ (instancetype)serializerWithXMLDocumentOptions:(NSUInteger)mask; + +@end + +#endif + +#pragma mark - + +/** + `AFPropertyListResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes XML responses as an `NSXMLDocument` objects. + + By default, `AFPropertyListResponseSerializer` accepts the following MIME types: + + - `application/x-plist` + */ +@interface AFPropertyListResponseSerializer : AFHTTPResponseSerializer + +- (instancetype)init; + +/** + The property list format. Possible values are described in "NSPropertyListFormat". + */ +@property (nonatomic, assign) NSPropertyListFormat format; + +/** + The property list reading options. Possible values are described in "NSPropertyListMutabilityOptions." + */ +@property (nonatomic, assign) NSPropertyListReadOptions readOptions; + +/** + Creates and returns a property list serializer with a specified format, read options, and write options. + + @param format The property list format. + @param readOptions The property list reading options. + */ ++ (instancetype)serializerWithFormat:(NSPropertyListFormat)format + readOptions:(NSPropertyListReadOptions)readOptions; + +@end + +#pragma mark - + +/** + `AFImageResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes image responses. + + By default, `AFImageResponseSerializer` accepts the following MIME types, which correspond to the image formats supported by UIImage or NSImage: + + - `image/tiff` + - `image/jpeg` + - `image/gif` + - `image/png` + - `image/ico` + - `image/x-icon` + - `image/bmp` + - `image/x-bmp` + - `image/x-xbitmap` + - `image/x-win-bitmap` + */ +@interface AFImageResponseSerializer : AFHTTPResponseSerializer + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +/** + The scale factor used when interpreting the image data to construct `responseImage`. Specifying a scale factor of 1.0 results in an image whose size matches the pixel-based dimensions of the image. Applying a different scale factor changes the size of the image as reported by the size property. This is set to the value of scale of the main screen by default, which automatically scales images for retina displays, for instance. + */ +@property (nonatomic, assign) CGFloat imageScale; + +/** + Whether to automatically inflate response image data for compressed formats (such as PNG or JPEG). Enabling this can significantly improve drawing performance on iOS when used with `setCompletionBlockWithSuccess:failure:`, as it allows a bitmap representation to be constructed in the background rather than on the main thread. `YES` by default. + */ +@property (nonatomic, assign) BOOL automaticallyInflatesResponseImage; +#endif + +@end + +#pragma mark - + +/** + `AFCompoundSerializer` is a subclass of `AFHTTPResponseSerializer` that delegates the response serialization to the first `AFHTTPResponseSerializer` object that returns an object for `responseObjectForResponse:data:error:`, falling back on the default behavior of `AFHTTPResponseSerializer`. This is useful for supporting multiple potential types and structures of server responses with a single serializer. + */ +@interface AFCompoundResponseSerializer : AFHTTPResponseSerializer + +/** + The component response serializers. + */ +@property (readonly, nonatomic, copy) NSArray *responseSerializers; + +/** + Creates and returns a compound serializer comprised of the specified response serializers. + + @warning Each response serializer specified must be a subclass of `AFHTTPResponseSerializer`, and response to `-validateResponse:data:error:`. + */ ++ (instancetype)compoundSerializerWithResponseSerializers:(NSArray *)responseSerializers; + +@end + +///---------------- +/// @name Constants +///---------------- + +/** + ## Error Domains + + The following error domain is predefined. + + - `NSString * const AFURLResponseSerializationErrorDomain` + + ### Constants + + `AFURLResponseSerializationErrorDomain` + AFURLResponseSerializer errors. Error codes for `AFURLResponseSerializationErrorDomain` correspond to codes in `NSURLErrorDomain`. + */ +extern NSString * const AFURLResponseSerializationErrorDomain; + +/** + ## User info dictionary keys + + These keys may exist in the user info dictionary, in addition to those defined for NSError. + + - `NSString * const AFNetworkingOperationFailingURLResponseErrorKey` + - `NSString * const AFNetworkingOperationFailingURLResponseDataErrorKey` + + ### Constants + + `AFNetworkingOperationFailingURLResponseErrorKey` + The corresponding value is an `NSURLResponse` containing the response of the operation associated with an error. This key is only present in the `AFURLResponseSerializationErrorDomain`. + + `AFNetworkingOperationFailingURLResponseDataErrorKey` + The corresponding value is an `NSData` containing the original data of the operation associated with an error. This key is only present in the `AFURLResponseSerializationErrorDomain`. + */ +extern NSString * const AFNetworkingOperationFailingURLResponseErrorKey; + +extern NSString * const AFNetworkingOperationFailingURLResponseDataErrorKey; + +NS_ASSUME_NONNULL_END diff --git a/Pods/AFNetworking/AFNetworking/AFURLResponseSerialization.m b/Pods/AFNetworking/AFNetworking/AFURLResponseSerialization.m new file mode 100644 index 0000000..f95834f --- /dev/null +++ b/Pods/AFNetworking/AFNetworking/AFURLResponseSerialization.m @@ -0,0 +1,825 @@ +// AFURLResponseSerialization.m +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFURLResponseSerialization.h" + +#if TARGET_OS_IOS +#import +#elif TARGET_OS_WATCH +#import +#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) +#import +#endif + +NSString * const AFURLResponseSerializationErrorDomain = @"com.alamofire.error.serialization.response"; +NSString * const AFNetworkingOperationFailingURLResponseErrorKey = @"com.alamofire.serialization.response.error.response"; +NSString * const AFNetworkingOperationFailingURLResponseDataErrorKey = @"com.alamofire.serialization.response.error.data"; + +static NSError * AFErrorWithUnderlyingError(NSError *error, NSError *underlyingError) { + if (!error) { + return underlyingError; + } + + if (!underlyingError || error.userInfo[NSUnderlyingErrorKey]) { + return error; + } + + NSMutableDictionary *mutableUserInfo = [error.userInfo mutableCopy]; + mutableUserInfo[NSUnderlyingErrorKey] = underlyingError; + + return [[NSError alloc] initWithDomain:error.domain code:error.code userInfo:mutableUserInfo]; +} + +static BOOL AFErrorOrUnderlyingErrorHasCodeInDomain(NSError *error, NSInteger code, NSString *domain) { + if ([error.domain isEqualToString:domain] && error.code == code) { + return YES; + } else if (error.userInfo[NSUnderlyingErrorKey]) { + return AFErrorOrUnderlyingErrorHasCodeInDomain(error.userInfo[NSUnderlyingErrorKey], code, domain); + } + + return NO; +} + +static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingOptions readingOptions) { + if ([JSONObject isKindOfClass:[NSArray class]]) { + NSMutableArray *mutableArray = [NSMutableArray arrayWithCapacity:[(NSArray *)JSONObject count]]; + for (id value in (NSArray *)JSONObject) { + [mutableArray addObject:AFJSONObjectByRemovingKeysWithNullValues(value, readingOptions)]; + } + + return (readingOptions & NSJSONReadingMutableContainers) ? mutableArray : [NSArray arrayWithArray:mutableArray]; + } else if ([JSONObject isKindOfClass:[NSDictionary class]]) { + NSMutableDictionary *mutableDictionary = [NSMutableDictionary dictionaryWithDictionary:JSONObject]; + for (id key in [(NSDictionary *)JSONObject allKeys]) { + id value = (NSDictionary *)JSONObject[key]; + if (!value || [value isEqual:[NSNull null]]) { + [mutableDictionary removeObjectForKey:key]; + } else if ([value isKindOfClass:[NSArray class]] || [value isKindOfClass:[NSDictionary class]]) { + mutableDictionary[key] = AFJSONObjectByRemovingKeysWithNullValues(value, readingOptions); + } + } + + return (readingOptions & NSJSONReadingMutableContainers) ? mutableDictionary : [NSDictionary dictionaryWithDictionary:mutableDictionary]; + } + + return JSONObject; +} + +@implementation AFHTTPResponseSerializer + ++ (instancetype)serializer { + return [[self alloc] init]; +} + +- (instancetype)init { + self = [super init]; + if (!self) { + return nil; + } + + self.stringEncoding = NSUTF8StringEncoding; + + self.acceptableStatusCodes = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(200, 100)]; + self.acceptableContentTypes = nil; + + return self; +} + +#pragma mark - + +- (BOOL)validateResponse:(NSHTTPURLResponse *)response + data:(NSData *)data + error:(NSError * __autoreleasing *)error +{ + BOOL responseIsValid = YES; + NSError *validationError = nil; + + if (response && [response isKindOfClass:[NSHTTPURLResponse class]]) { + if (self.acceptableContentTypes && ![self.acceptableContentTypes containsObject:[response MIMEType]]) { + if ([data length] > 0 && [response URL]) { + NSMutableDictionary *mutableUserInfo = [@{ + NSLocalizedDescriptionKey: [NSString stringWithFormat:NSLocalizedStringFromTable(@"Request failed: unacceptable content-type: %@", @"AFNetworking", nil), [response MIMEType]], + NSURLErrorFailingURLErrorKey:[response URL], + AFNetworkingOperationFailingURLResponseErrorKey: response, + } mutableCopy]; + if (data) { + mutableUserInfo[AFNetworkingOperationFailingURLResponseDataErrorKey] = data; + } + + validationError = AFErrorWithUnderlyingError([NSError errorWithDomain:AFURLResponseSerializationErrorDomain code:NSURLErrorCannotDecodeContentData userInfo:mutableUserInfo], validationError); + } + + responseIsValid = NO; + } + + if (self.acceptableStatusCodes && ![self.acceptableStatusCodes containsIndex:(NSUInteger)response.statusCode] && [response URL]) { + NSMutableDictionary *mutableUserInfo = [@{ + NSLocalizedDescriptionKey: [NSString stringWithFormat:NSLocalizedStringFromTable(@"Request failed: %@ (%ld)", @"AFNetworking", nil), [NSHTTPURLResponse localizedStringForStatusCode:response.statusCode], (long)response.statusCode], + NSURLErrorFailingURLErrorKey:[response URL], + AFNetworkingOperationFailingURLResponseErrorKey: response, + } mutableCopy]; + + if (data) { + mutableUserInfo[AFNetworkingOperationFailingURLResponseDataErrorKey] = data; + } + + validationError = AFErrorWithUnderlyingError([NSError errorWithDomain:AFURLResponseSerializationErrorDomain code:NSURLErrorBadServerResponse userInfo:mutableUserInfo], validationError); + + responseIsValid = NO; + } + } + + if (error && !responseIsValid) { + *error = validationError; + } + + return responseIsValid; +} + +#pragma mark - AFURLResponseSerialization + +- (id)responseObjectForResponse:(NSURLResponse *)response + data:(NSData *)data + error:(NSError *__autoreleasing *)error +{ + [self validateResponse:(NSHTTPURLResponse *)response data:data error:error]; + + return data; +} + +#pragma mark - NSSecureCoding + ++ (BOOL)supportsSecureCoding { + return YES; +} + +- (id)initWithCoder:(NSCoder *)decoder { + self = [self init]; + if (!self) { + return nil; + } + + self.acceptableStatusCodes = [decoder decodeObjectOfClass:[NSIndexSet class] forKey:NSStringFromSelector(@selector(acceptableStatusCodes))]; + self.acceptableContentTypes = [decoder decodeObjectOfClass:[NSIndexSet class] forKey:NSStringFromSelector(@selector(acceptableContentTypes))]; + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [coder encodeObject:self.acceptableStatusCodes forKey:NSStringFromSelector(@selector(acceptableStatusCodes))]; + [coder encodeObject:self.acceptableContentTypes forKey:NSStringFromSelector(@selector(acceptableContentTypes))]; +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone { + AFHTTPResponseSerializer *serializer = [[[self class] allocWithZone:zone] init]; + serializer.acceptableStatusCodes = [self.acceptableStatusCodes copyWithZone:zone]; + serializer.acceptableContentTypes = [self.acceptableContentTypes copyWithZone:zone]; + + return serializer; +} + +@end + +#pragma mark - + +@implementation AFJSONResponseSerializer + ++ (instancetype)serializer { + return [self serializerWithReadingOptions:(NSJSONReadingOptions)0]; +} + ++ (instancetype)serializerWithReadingOptions:(NSJSONReadingOptions)readingOptions { + AFJSONResponseSerializer *serializer = [[self alloc] init]; + serializer.readingOptions = readingOptions; + + return serializer; +} + +- (instancetype)init { + self = [super init]; + if (!self) { + return nil; + } + + self.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript", nil]; + + return self; +} + +#pragma mark - AFURLResponseSerialization + +- (id)responseObjectForResponse:(NSURLResponse *)response + data:(NSData *)data + error:(NSError *__autoreleasing *)error +{ + if (![self validateResponse:(NSHTTPURLResponse *)response data:data error:error]) { + if (!error || AFErrorOrUnderlyingErrorHasCodeInDomain(*error, NSURLErrorCannotDecodeContentData, AFURLResponseSerializationErrorDomain)) { + return nil; + } + } + + // Workaround for behavior of Rails to return a single space for `head :ok` (a workaround for a bug in Safari), which is not interpreted as valid input by NSJSONSerialization. + // See https://github.com/rails/rails/issues/1742 + NSStringEncoding stringEncoding = self.stringEncoding; + if (response.textEncodingName) { + CFStringEncoding encoding = CFStringConvertIANACharSetNameToEncoding((CFStringRef)response.textEncodingName); + if (encoding != kCFStringEncodingInvalidId) { + stringEncoding = CFStringConvertEncodingToNSStringEncoding(encoding); + } + } + + id responseObject = nil; + NSError *serializationError = nil; + @autoreleasepool { + NSString *responseString = [[NSString alloc] initWithData:data encoding:stringEncoding]; + if (responseString && ![responseString isEqualToString:@" "]) { + // Workaround for a bug in NSJSONSerialization when Unicode character escape codes are used instead of the actual character + // See http://stackoverflow.com/a/12843465/157142 + data = [responseString dataUsingEncoding:NSUTF8StringEncoding]; + + if (data) { + if ([data length] > 0) { + responseObject = [NSJSONSerialization JSONObjectWithData:data options:self.readingOptions error:&serializationError]; + } else { + return nil; + } + } else { + NSDictionary *userInfo = @{ + NSLocalizedDescriptionKey: NSLocalizedStringFromTable(@"Data failed decoding as a UTF-8 string", @"AFNetworking", nil), + NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:NSLocalizedStringFromTable(@"Could not decode string: %@", @"AFNetworking", nil), responseString] + }; + + serializationError = [NSError errorWithDomain:AFURLResponseSerializationErrorDomain code:NSURLErrorCannotDecodeContentData userInfo:userInfo]; + } + } + } + + if (self.removesKeysWithNullValues && responseObject) { + responseObject = AFJSONObjectByRemovingKeysWithNullValues(responseObject, self.readingOptions); + } + + if (error) { + *error = AFErrorWithUnderlyingError(serializationError, *error); + } + + return responseObject; +} + +#pragma mark - NSSecureCoding + +- (id)initWithCoder:(NSCoder *)decoder { + self = [super initWithCoder:decoder]; + if (!self) { + return nil; + } + + self.readingOptions = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(readingOptions))] unsignedIntegerValue]; + self.removesKeysWithNullValues = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(removesKeysWithNullValues))] boolValue]; + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [super encodeWithCoder:coder]; + + [coder encodeObject:@(self.readingOptions) forKey:NSStringFromSelector(@selector(readingOptions))]; + [coder encodeObject:@(self.removesKeysWithNullValues) forKey:NSStringFromSelector(@selector(removesKeysWithNullValues))]; +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone { + AFJSONResponseSerializer *serializer = [[[self class] allocWithZone:zone] init]; + serializer.readingOptions = self.readingOptions; + serializer.removesKeysWithNullValues = self.removesKeysWithNullValues; + + return serializer; +} + +@end + +#pragma mark - + +@implementation AFXMLParserResponseSerializer + ++ (instancetype)serializer { + AFXMLParserResponseSerializer *serializer = [[self alloc] init]; + + return serializer; +} + +- (instancetype)init { + self = [super init]; + if (!self) { + return nil; + } + + self.acceptableContentTypes = [[NSSet alloc] initWithObjects:@"application/xml", @"text/xml", nil]; + + return self; +} + +#pragma mark - AFURLResponseSerialization + +- (id)responseObjectForResponse:(NSHTTPURLResponse *)response + data:(NSData *)data + error:(NSError *__autoreleasing *)error +{ + if (![self validateResponse:(NSHTTPURLResponse *)response data:data error:error]) { + if (!error || AFErrorOrUnderlyingErrorHasCodeInDomain(*error, NSURLErrorCannotDecodeContentData, AFURLResponseSerializationErrorDomain)) { + return nil; + } + } + + return [[NSXMLParser alloc] initWithData:data]; +} + +@end + +#pragma mark - + +#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED + +@implementation AFXMLDocumentResponseSerializer + ++ (instancetype)serializer { + return [self serializerWithXMLDocumentOptions:0]; +} + ++ (instancetype)serializerWithXMLDocumentOptions:(NSUInteger)mask { + AFXMLDocumentResponseSerializer *serializer = [[self alloc] init]; + serializer.options = mask; + + return serializer; +} + +- (instancetype)init { + self = [super init]; + if (!self) { + return nil; + } + + self.acceptableContentTypes = [[NSSet alloc] initWithObjects:@"application/xml", @"text/xml", nil]; + + return self; +} + +#pragma mark - AFURLResponseSerialization + +- (id)responseObjectForResponse:(NSURLResponse *)response + data:(NSData *)data + error:(NSError *__autoreleasing *)error +{ + if (![self validateResponse:(NSHTTPURLResponse *)response data:data error:error]) { + if (!error || AFErrorOrUnderlyingErrorHasCodeInDomain(*error, NSURLErrorCannotDecodeContentData, AFURLResponseSerializationErrorDomain)) { + return nil; + } + } + + NSError *serializationError = nil; + NSXMLDocument *document = [[NSXMLDocument alloc] initWithData:data options:self.options error:&serializationError]; + + if (error) { + *error = AFErrorWithUnderlyingError(serializationError, *error); + } + + return document; +} + +#pragma mark - NSSecureCoding + +- (id)initWithCoder:(NSCoder *)decoder { + self = [super initWithCoder:decoder]; + if (!self) { + return nil; + } + + self.options = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(options))] unsignedIntegerValue]; + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [super encodeWithCoder:coder]; + + [coder encodeObject:@(self.options) forKey:NSStringFromSelector(@selector(options))]; +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone { + AFXMLDocumentResponseSerializer *serializer = [[[self class] allocWithZone:zone] init]; + serializer.options = self.options; + + return serializer; +} + +@end + +#endif + +#pragma mark - + +@implementation AFPropertyListResponseSerializer + ++ (instancetype)serializer { + return [self serializerWithFormat:NSPropertyListXMLFormat_v1_0 readOptions:0]; +} + ++ (instancetype)serializerWithFormat:(NSPropertyListFormat)format + readOptions:(NSPropertyListReadOptions)readOptions +{ + AFPropertyListResponseSerializer *serializer = [[self alloc] init]; + serializer.format = format; + serializer.readOptions = readOptions; + + return serializer; +} + +- (instancetype)init { + self = [super init]; + if (!self) { + return nil; + } + + self.acceptableContentTypes = [[NSSet alloc] initWithObjects:@"application/x-plist", nil]; + + return self; +} + +#pragma mark - AFURLResponseSerialization + +- (id)responseObjectForResponse:(NSURLResponse *)response + data:(NSData *)data + error:(NSError *__autoreleasing *)error +{ + if (![self validateResponse:(NSHTTPURLResponse *)response data:data error:error]) { + if (!error || AFErrorOrUnderlyingErrorHasCodeInDomain(*error, NSURLErrorCannotDecodeContentData, AFURLResponseSerializationErrorDomain)) { + return nil; + } + } + + id responseObject; + NSError *serializationError = nil; + + if (data) { + responseObject = [NSPropertyListSerialization propertyListWithData:data options:self.readOptions format:NULL error:&serializationError]; + } + + if (error) { + *error = AFErrorWithUnderlyingError(serializationError, *error); + } + + return responseObject; +} + +#pragma mark - NSSecureCoding + +- (id)initWithCoder:(NSCoder *)decoder { + self = [super initWithCoder:decoder]; + if (!self) { + return nil; + } + + self.format = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(format))] unsignedIntegerValue]; + self.readOptions = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(readOptions))] unsignedIntegerValue]; + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [super encodeWithCoder:coder]; + + [coder encodeObject:@(self.format) forKey:NSStringFromSelector(@selector(format))]; + [coder encodeObject:@(self.readOptions) forKey:NSStringFromSelector(@selector(readOptions))]; +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone { + AFPropertyListResponseSerializer *serializer = [[[self class] allocWithZone:zone] init]; + serializer.format = self.format; + serializer.readOptions = self.readOptions; + + return serializer; +} + +@end + +#pragma mark - + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#import + +@interface UIImage (AFNetworkingSafeImageLoading) ++ (UIImage *)af_safeImageWithData:(NSData *)data; +@end + +static NSLock* imageLock = nil; + +@implementation UIImage (AFNetworkingSafeImageLoading) + ++ (UIImage *)af_safeImageWithData:(NSData *)data { + UIImage* image = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + imageLock = [[NSLock alloc] init]; + }); + + [imageLock lock]; + image = [UIImage imageWithData:data]; + [imageLock unlock]; + return image; +} + +@end + +static UIImage * AFImageWithDataAtScale(NSData *data, CGFloat scale) { + UIImage *image = [UIImage af_safeImageWithData:data]; + if (image.images) { + return image; + } + + return [[UIImage alloc] initWithCGImage:[image CGImage] scale:scale orientation:image.imageOrientation]; +} + +static UIImage * AFInflatedImageFromResponseWithDataAtScale(NSHTTPURLResponse *response, NSData *data, CGFloat scale) { + if (!data || [data length] == 0) { + return nil; + } + + CGImageRef imageRef = NULL; + CGDataProviderRef dataProvider = CGDataProviderCreateWithCFData((__bridge CFDataRef)data); + + if ([response.MIMEType isEqualToString:@"image/png"]) { + imageRef = CGImageCreateWithPNGDataProvider(dataProvider, NULL, true, kCGRenderingIntentDefault); + } else if ([response.MIMEType isEqualToString:@"image/jpeg"]) { + imageRef = CGImageCreateWithJPEGDataProvider(dataProvider, NULL, true, kCGRenderingIntentDefault); + + if (imageRef) { + CGColorSpaceRef imageColorSpace = CGImageGetColorSpace(imageRef); + CGColorSpaceModel imageColorSpaceModel = CGColorSpaceGetModel(imageColorSpace); + + // CGImageCreateWithJPEGDataProvider does not properly handle CMKY, so fall back to AFImageWithDataAtScale + if (imageColorSpaceModel == kCGColorSpaceModelCMYK) { + CGImageRelease(imageRef); + imageRef = NULL; + } + } + } + + CGDataProviderRelease(dataProvider); + + UIImage *image = AFImageWithDataAtScale(data, scale); + if (!imageRef) { + if (image.images || !image) { + return image; + } + + imageRef = CGImageCreateCopy([image CGImage]); + if (!imageRef) { + return nil; + } + } + + size_t width = CGImageGetWidth(imageRef); + size_t height = CGImageGetHeight(imageRef); + size_t bitsPerComponent = CGImageGetBitsPerComponent(imageRef); + + if (width * height > 1024 * 1024 || bitsPerComponent > 8) { + CGImageRelease(imageRef); + + return image; + } + + // CGImageGetBytesPerRow() calculates incorrectly in iOS 5.0, so defer to CGBitmapContextCreate + size_t bytesPerRow = 0; + CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); + CGColorSpaceModel colorSpaceModel = CGColorSpaceGetModel(colorSpace); + CGBitmapInfo bitmapInfo = CGImageGetBitmapInfo(imageRef); + + if (colorSpaceModel == kCGColorSpaceModelRGB) { + uint32_t alpha = (bitmapInfo & kCGBitmapAlphaInfoMask); +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wassign-enum" + if (alpha == kCGImageAlphaNone) { + bitmapInfo &= ~kCGBitmapAlphaInfoMask; + bitmapInfo |= kCGImageAlphaNoneSkipFirst; + } else if (!(alpha == kCGImageAlphaNoneSkipFirst || alpha == kCGImageAlphaNoneSkipLast)) { + bitmapInfo &= ~kCGBitmapAlphaInfoMask; + bitmapInfo |= kCGImageAlphaPremultipliedFirst; + } +#pragma clang diagnostic pop + } + + CGContextRef context = CGBitmapContextCreate(NULL, width, height, bitsPerComponent, bytesPerRow, colorSpace, bitmapInfo); + + CGColorSpaceRelease(colorSpace); + + if (!context) { + CGImageRelease(imageRef); + + return image; + } + + CGContextDrawImage(context, CGRectMake(0.0f, 0.0f, width, height), imageRef); + CGImageRef inflatedImageRef = CGBitmapContextCreateImage(context); + + CGContextRelease(context); + + UIImage *inflatedImage = [[UIImage alloc] initWithCGImage:inflatedImageRef scale:scale orientation:image.imageOrientation]; + + CGImageRelease(inflatedImageRef); + CGImageRelease(imageRef); + + return inflatedImage; +} +#endif + + +@implementation AFImageResponseSerializer + +- (instancetype)init { + self = [super init]; + if (!self) { + return nil; + } + + self.acceptableContentTypes = [[NSSet alloc] initWithObjects:@"image/tiff", @"image/jpeg", @"image/gif", @"image/png", @"image/ico", @"image/x-icon", @"image/bmp", @"image/x-bmp", @"image/x-xbitmap", @"image/x-win-bitmap", nil]; + +#if TARGET_OS_IOS + self.imageScale = [[UIScreen mainScreen] scale]; + self.automaticallyInflatesResponseImage = YES; +#elif TARGET_OS_WATCH + self.imageScale = [[WKInterfaceDevice currentDevice] screenScale]; + self.automaticallyInflatesResponseImage = YES; +#endif + + return self; +} + +#pragma mark - AFURLResponseSerializer + +- (id)responseObjectForResponse:(NSURLResponse *)response + data:(NSData *)data + error:(NSError *__autoreleasing *)error +{ + if (![self validateResponse:(NSHTTPURLResponse *)response data:data error:error]) { + if (!error || AFErrorOrUnderlyingErrorHasCodeInDomain(*error, NSURLErrorCannotDecodeContentData, AFURLResponseSerializationErrorDomain)) { + return nil; + } + } + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + if (self.automaticallyInflatesResponseImage) { + return AFInflatedImageFromResponseWithDataAtScale((NSHTTPURLResponse *)response, data, self.imageScale); + } else { + return AFImageWithDataAtScale(data, self.imageScale); + } +#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) + // Ensure that the image is set to it's correct pixel width and height + NSBitmapImageRep *bitimage = [[NSBitmapImageRep alloc] initWithData:data]; + NSImage *image = [[NSImage alloc] initWithSize:NSMakeSize([bitimage pixelsWide], [bitimage pixelsHigh])]; + [image addRepresentation:bitimage]; + + return image; +#endif + + return nil; +} + +#pragma mark - NSSecureCoding + +- (id)initWithCoder:(NSCoder *)decoder { + self = [super initWithCoder:decoder]; + if (!self) { + return nil; + } + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + NSNumber *imageScale = [decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(imageScale))]; +#if CGFLOAT_IS_DOUBLE + self.imageScale = [imageScale doubleValue]; +#else + self.imageScale = [imageScale floatValue]; +#endif + + self.automaticallyInflatesResponseImage = [decoder decodeBoolForKey:NSStringFromSelector(@selector(automaticallyInflatesResponseImage))]; +#endif + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [super encodeWithCoder:coder]; + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + [coder encodeObject:@(self.imageScale) forKey:NSStringFromSelector(@selector(imageScale))]; + [coder encodeBool:self.automaticallyInflatesResponseImage forKey:NSStringFromSelector(@selector(automaticallyInflatesResponseImage))]; +#endif +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone { + AFImageResponseSerializer *serializer = [[[self class] allocWithZone:zone] init]; + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + serializer.imageScale = self.imageScale; + serializer.automaticallyInflatesResponseImage = self.automaticallyInflatesResponseImage; +#endif + + return serializer; +} + +@end + +#pragma mark - + +@interface AFCompoundResponseSerializer () +@property (readwrite, nonatomic, copy) NSArray *responseSerializers; +@end + +@implementation AFCompoundResponseSerializer + ++ (instancetype)compoundSerializerWithResponseSerializers:(NSArray *)responseSerializers { + AFCompoundResponseSerializer *serializer = [[self alloc] init]; + serializer.responseSerializers = responseSerializers; + + return serializer; +} + +#pragma mark - AFURLResponseSerialization + +- (id)responseObjectForResponse:(NSURLResponse *)response + data:(NSData *)data + error:(NSError *__autoreleasing *)error +{ + for (id serializer in self.responseSerializers) { + if (![serializer isKindOfClass:[AFHTTPResponseSerializer class]]) { + continue; + } + + NSError *serializerError = nil; + id responseObject = [serializer responseObjectForResponse:response data:data error:&serializerError]; + if (responseObject) { + if (error) { + *error = AFErrorWithUnderlyingError(serializerError, *error); + } + + return responseObject; + } + } + + return [super responseObjectForResponse:response data:data error:error]; +} + +#pragma mark - NSSecureCoding + +- (id)initWithCoder:(NSCoder *)decoder { + self = [super initWithCoder:decoder]; + if (!self) { + return nil; + } + + self.responseSerializers = [decoder decodeObjectOfClass:[NSArray class] forKey:NSStringFromSelector(@selector(responseSerializers))]; + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [super encodeWithCoder:coder]; + + [coder encodeObject:self.responseSerializers forKey:NSStringFromSelector(@selector(responseSerializers))]; +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone { + AFCompoundResponseSerializer *serializer = [[[self class] allocWithZone:zone] init]; + serializer.responseSerializers = self.responseSerializers; + + return serializer; +} + +@end diff --git a/Pods/AFNetworking/AFNetworking/AFURLSessionManager.h b/Pods/AFNetworking/AFNetworking/AFURLSessionManager.h new file mode 100644 index 0000000..1cdb516 --- /dev/null +++ b/Pods/AFNetworking/AFNetworking/AFURLSessionManager.h @@ -0,0 +1,554 @@ +// AFURLSessionManager.h +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#import "AFURLResponseSerialization.h" +#import "AFURLRequestSerialization.h" +#import "AFSecurityPolicy.h" +#if !TARGET_OS_WATCH +#import "AFNetworkReachabilityManager.h" +#endif + +#ifndef NS_DESIGNATED_INITIALIZER +#if __has_attribute(objc_designated_initializer) +#define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +#else +#define NS_DESIGNATED_INITIALIZER +#endif +#endif + +/** + `AFURLSessionManager` creates and manages an `NSURLSession` object based on a specified `NSURLSessionConfiguration` object, which conforms to ``, ``, ``, and ``. + + ## Subclassing Notes + + This is the base class for `AFHTTPSessionManager`, which adds functionality specific to making HTTP requests. If you are looking to extend `AFURLSessionManager` specifically for HTTP, consider subclassing `AFHTTPSessionManager` instead. + + ## NSURLSession & NSURLSessionTask Delegate Methods + + `AFURLSessionManager` implements the following delegate methods: + + ### `NSURLSessionDelegate` + + - `URLSession:didBecomeInvalidWithError:` + - `URLSession:didReceiveChallenge:completionHandler:` + - `URLSessionDidFinishEventsForBackgroundURLSession:` + + ### `NSURLSessionTaskDelegate` + + - `URLSession:willPerformHTTPRedirection:newRequest:completionHandler:` + - `URLSession:task:didReceiveChallenge:completionHandler:` + - `URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:` + - `URLSession:task:didCompleteWithError:` + + ### `NSURLSessionDataDelegate` + + - `URLSession:dataTask:didReceiveResponse:completionHandler:` + - `URLSession:dataTask:didBecomeDownloadTask:` + - `URLSession:dataTask:didReceiveData:` + - `URLSession:dataTask:willCacheResponse:completionHandler:` + + ### `NSURLSessionDownloadDelegate` + + - `URLSession:downloadTask:didFinishDownloadingToURL:` + - `URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesWritten:totalBytesExpectedToWrite:` + - `URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:` + + If any of these methods are overridden in a subclass, they _must_ call the `super` implementation first. + + ## Network Reachability Monitoring + + Network reachability status and change monitoring is available through the `reachabilityManager` property. Applications may choose to monitor network reachability conditions in order to prevent or suspend any outbound requests. See `AFNetworkReachabilityManager` for more details. + + ## NSCoding Caveats + + - Encoded managers do not include any block properties. Be sure to set delegate callback blocks when using `-initWithCoder:` or `NSKeyedUnarchiver`. + + ## NSCopying Caveats + + - `-copy` and `-copyWithZone:` return a new manager with a new `NSURLSession` created from the configuration of the original. + - Operation copies do not include any delegate callback blocks, as they often strongly captures a reference to `self`, which would otherwise have the unintuitive side-effect of pointing to the _original_ session manager when copied. + + @warning Managers for background sessions must be owned for the duration of their use. This can be accomplished by creating an application-wide or shared singleton instance. + */ + +NS_ASSUME_NONNULL_BEGIN + +#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) || TARGET_OS_WATCH + +@interface AFURLSessionManager : NSObject + +/** + The managed session. + */ +@property (readonly, nonatomic, strong) NSURLSession *session; + +/** + The operation queue on which delegate callbacks are run. + */ +@property (readonly, nonatomic, strong) NSOperationQueue *operationQueue; + +/** + Responses sent from the server in data tasks created with `dataTaskWithRequest:success:failure:` and run using the `GET` / `POST` / et al. convenience methods are automatically validated and serialized by the response serializer. By default, this property is set to an instance of `AFJSONResponseSerializer`. + + @warning `responseSerializer` must not be `nil`. + */ +@property (nonatomic, strong) id responseSerializer; + +///------------------------------- +/// @name Managing Security Policy +///------------------------------- + +/** + The security policy used by created request operations to evaluate server trust for secure connections. `AFURLSessionManager` uses the `defaultPolicy` unless otherwise specified. + */ +@property (nonatomic, strong) AFSecurityPolicy *securityPolicy; + +#if !TARGET_OS_WATCH +///-------------------------------------- +/// @name Monitoring Network Reachability +///-------------------------------------- + +/** + The network reachability manager. `AFURLSessionManager` uses the `sharedManager` by default. + */ +@property (readwrite, nonatomic, strong) AFNetworkReachabilityManager *reachabilityManager; +#endif + +///---------------------------- +/// @name Getting Session Tasks +///---------------------------- + +/** + The data, upload, and download tasks currently run by the managed session. + */ +@property (readonly, nonatomic, strong) NSArray *tasks; + +/** + The data tasks currently run by the managed session. + */ +@property (readonly, nonatomic, strong) NSArray *dataTasks; + +/** + The upload tasks currently run by the managed session. + */ +@property (readonly, nonatomic, strong) NSArray *uploadTasks; + +/** + The download tasks currently run by the managed session. + */ +@property (readonly, nonatomic, strong) NSArray *downloadTasks; + +///------------------------------- +/// @name Managing Callback Queues +///------------------------------- + +/** + The dispatch queue for `completionBlock`. If `NULL` (default), the main queue is used. + */ +#if OS_OBJECT_HAVE_OBJC_SUPPORT +@property (nonatomic, strong, nullable) dispatch_queue_t completionQueue; +#else +@property (nonatomic, assign, nullable) dispatch_queue_t completionQueue; +#endif + +/** + The dispatch group for `completionBlock`. If `NULL` (default), a private dispatch group is used. + */ +#if OS_OBJECT_HAVE_OBJC_SUPPORT +@property (nonatomic, strong, nullable) dispatch_group_t completionGroup; +#else +@property (nonatomic, assign, nullable) dispatch_group_t completionGroup; +#endif + +///--------------------------------- +/// @name Working Around System Bugs +///--------------------------------- + +/** + Whether to attempt to retry creation of upload tasks for background sessions when initial call returns `nil`. `NO` by default. + + @bug As of iOS 7.0, there is a bug where upload tasks created for background tasks are sometimes `nil`. As a workaround, if this property is `YES`, AFNetworking will follow Apple's recommendation to try creating the task again. + + @see https://github.com/AFNetworking/AFNetworking/issues/1675 + */ +@property (nonatomic, assign) BOOL attemptsToRecreateUploadTasksForBackgroundSessions; + +///--------------------- +/// @name Initialization +///--------------------- + +/** + Creates and returns a manager for a session created with the specified configuration. This is the designated initializer. + + @param configuration The configuration used to create the managed session. + + @return A manager for a newly-created session. + */ +- (instancetype)initWithSessionConfiguration:(nullable NSURLSessionConfiguration *)configuration NS_DESIGNATED_INITIALIZER; + +/** + Invalidates the managed session, optionally canceling pending tasks. + + @param cancelPendingTasks Whether or not to cancel pending tasks. + */ +- (void)invalidateSessionCancelingTasks:(BOOL)cancelPendingTasks; + +///------------------------- +/// @name Running Data Tasks +///------------------------- + +/** + Creates an `NSURLSessionDataTask` with the specified request. + + @param request The HTTP request for the request. + @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any. + */ +- (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request + completionHandler:(nullable void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler; + +///--------------------------- +/// @name Running Upload Tasks +///--------------------------- + +/** + Creates an `NSURLSessionUploadTask` with the specified request for a local file. + + @param request The HTTP request for the request. + @param fileURL A URL to the local file to be uploaded. + @param progress A progress object monitoring the current upload progress. + @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any. + + @see `attemptsToRecreateUploadTasksForBackgroundSessions` + */ +- (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request + fromFile:(NSURL *)fileURL + progress:(NSProgress * __nullable __autoreleasing * __nullable)progress + completionHandler:(nullable void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler; + +/** + Creates an `NSURLSessionUploadTask` with the specified request for an HTTP body. + + @param request The HTTP request for the request. + @param bodyData A data object containing the HTTP body to be uploaded. + @param progress A progress object monitoring the current upload progress. + @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any. + */ +- (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request + fromData:(nullable NSData *)bodyData + progress:(NSProgress * __nullable __autoreleasing * __nullable)progress + completionHandler:(nullable void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler; + +/** + Creates an `NSURLSessionUploadTask` with the specified streaming request. + + @param request The HTTP request for the request. + @param progress A progress object monitoring the current upload progress. + @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any. + */ +- (NSURLSessionUploadTask *)uploadTaskWithStreamedRequest:(NSURLRequest *)request + progress:(NSProgress * __nullable __autoreleasing * __nullable)progress + completionHandler:(nullable void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler; + +///----------------------------- +/// @name Running Download Tasks +///----------------------------- + +/** + Creates an `NSURLSessionDownloadTask` with the specified request. + + @param request The HTTP request for the request. + @param progress A progress object monitoring the current download progress. + @param destination A block object to be executed in order to determine the destination of the downloaded file. This block takes two arguments, the target path & the server response, and returns the desired file URL of the resulting download. The temporary file used during the download will be automatically deleted after being moved to the returned URL. + @param completionHandler A block to be executed when a task finishes. This block has no return value and takes three arguments: the server response, the path of the downloaded file, and the error describing the network or parsing error that occurred, if any. + + @warning If using a background `NSURLSessionConfiguration` on iOS, these blocks will be lost when the app is terminated. Background sessions may prefer to use `-setDownloadTaskDidFinishDownloadingBlock:` to specify the URL for saving the downloaded file, rather than the destination block of this method. + */ +- (NSURLSessionDownloadTask *)downloadTaskWithRequest:(NSURLRequest *)request + progress:(NSProgress * __nullable __autoreleasing * __nullable)progress + destination:(nullable NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination + completionHandler:(nullable void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler; + +/** + Creates an `NSURLSessionDownloadTask` with the specified resume data. + + @param resumeData The data used to resume downloading. + @param progress A progress object monitoring the current download progress. + @param destination A block object to be executed in order to determine the destination of the downloaded file. This block takes two arguments, the target path & the server response, and returns the desired file URL of the resulting download. The temporary file used during the download will be automatically deleted after being moved to the returned URL. + @param completionHandler A block to be executed when a task finishes. This block has no return value and takes three arguments: the server response, the path of the downloaded file, and the error describing the network or parsing error that occurred, if any. + */ +- (NSURLSessionDownloadTask *)downloadTaskWithResumeData:(NSData *)resumeData + progress:(NSProgress * __nullable __autoreleasing * __nullable)progress + destination:(nullable NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination + completionHandler:(nullable void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler; + +///--------------------------------- +/// @name Getting Progress for Tasks +///--------------------------------- + +/** + Returns the upload progress of the specified task. + + @param uploadTask The session upload task. Must not be `nil`. + + @return An `NSProgress` object reporting the upload progress of a task, or `nil` if the progress is unavailable. + */ +- (nullable NSProgress *)uploadProgressForTask:(NSURLSessionUploadTask *)uploadTask; + +/** + Returns the download progress of the specified task. + + @param downloadTask The session download task. Must not be `nil`. + + @return An `NSProgress` object reporting the download progress of a task, or `nil` if the progress is unavailable. + */ +- (nullable NSProgress *)downloadProgressForTask:(NSURLSessionDownloadTask *)downloadTask; + +///----------------------------------------- +/// @name Setting Session Delegate Callbacks +///----------------------------------------- + +/** + Sets a block to be executed when the managed session becomes invalid, as handled by the `NSURLSessionDelegate` method `URLSession:didBecomeInvalidWithError:`. + + @param block A block object to be executed when the managed session becomes invalid. The block has no return value, and takes two arguments: the session, and the error related to the cause of invalidation. + */ +- (void)setSessionDidBecomeInvalidBlock:(nullable void (^)(NSURLSession *session, NSError *error))block; + +/** + Sets a block to be executed when a connection level authentication challenge has occurred, as handled by the `NSURLSessionDelegate` method `URLSession:didReceiveChallenge:completionHandler:`. + + @param block A block object to be executed when a connection level authentication challenge has occurred. The block returns the disposition of the authentication challenge, and takes three arguments: the session, the authentication challenge, and a pointer to the credential that should be used to resolve the challenge. + */ +- (void)setSessionDidReceiveAuthenticationChallengeBlock:(nullable NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLAuthenticationChallenge *challenge, NSURLCredential * __nullable __autoreleasing * __nullable credential))block; + +///-------------------------------------- +/// @name Setting Task Delegate Callbacks +///-------------------------------------- + +/** + Sets a block to be executed when a task requires a new request body stream to send to the remote server, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:needNewBodyStream:`. + + @param block A block object to be executed when a task requires a new request body stream. + */ +- (void)setTaskNeedNewBodyStreamBlock:(nullable NSInputStream * (^)(NSURLSession *session, NSURLSessionTask *task))block; + +/** + Sets a block to be executed when an HTTP request is attempting to perform a redirection to a different URL, as handled by the `NSURLSessionTaskDelegate` method `URLSession:willPerformHTTPRedirection:newRequest:completionHandler:`. + + @param block A block object to be executed when an HTTP request is attempting to perform a redirection to a different URL. The block returns the request to be made for the redirection, and takes four arguments: the session, the task, the redirection response, and the request corresponding to the redirection response. + */ +- (void)setTaskWillPerformHTTPRedirectionBlock:(nullable NSURLRequest * (^)(NSURLSession *session, NSURLSessionTask *task, NSURLResponse *response, NSURLRequest *request))block; + +/** + Sets a block to be executed when a session task has received a request specific authentication challenge, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didReceiveChallenge:completionHandler:`. + + @param block A block object to be executed when a session task has received a request specific authentication challenge. The block returns the disposition of the authentication challenge, and takes four arguments: the session, the task, the authentication challenge, and a pointer to the credential that should be used to resolve the challenge. + */ +- (void)setTaskDidReceiveAuthenticationChallengeBlock:(nullable NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLSessionTask *task, NSURLAuthenticationChallenge *challenge, NSURLCredential * __nullable __autoreleasing * __nullable credential))block; + +/** + Sets a block to be executed periodically to track upload progress, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:`. + + @param block A block object to be called when an undetermined number of bytes have been uploaded to the server. This block has no return value and takes five arguments: the session, the task, the number of bytes written since the last time the upload progress block was called, the total bytes written, and the total bytes expected to be written during the request, as initially determined by the length of the HTTP body. This block may be called multiple times, and will execute on the main thread. + */ +- (void)setTaskDidSendBodyDataBlock:(nullable void (^)(NSURLSession *session, NSURLSessionTask *task, int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend))block; + +/** + Sets a block to be executed as the last message related to a specific task, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didCompleteWithError:`. + + @param block A block object to be executed when a session task is completed. The block has no return value, and takes three arguments: the session, the task, and any error that occurred in the process of executing the task. + */ +- (void)setTaskDidCompleteBlock:(nullable void (^)(NSURLSession *session, NSURLSessionTask *task, NSError *error))block; + +///------------------------------------------- +/// @name Setting Data Task Delegate Callbacks +///------------------------------------------- + +/** + Sets a block to be executed when a data task has received a response, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:didReceiveResponse:completionHandler:`. + + @param block A block object to be executed when a data task has received a response. The block returns the disposition of the session response, and takes three arguments: the session, the data task, and the received response. + */ +- (void)setDataTaskDidReceiveResponseBlock:(nullable NSURLSessionResponseDisposition (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLResponse *response))block; + +/** + Sets a block to be executed when a data task has become a download task, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:didBecomeDownloadTask:`. + + @param block A block object to be executed when a data task has become a download task. The block has no return value, and takes three arguments: the session, the data task, and the download task it has become. + */ +- (void)setDataTaskDidBecomeDownloadTaskBlock:(nullable void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLSessionDownloadTask *downloadTask))block; + +/** + Sets a block to be executed when a data task receives data, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:didReceiveData:`. + + @param block A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes three arguments: the session, the data task, and the data received. This block may be called multiple times, and will execute on the session manager operation queue. + */ +- (void)setDataTaskDidReceiveDataBlock:(nullable void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSData *data))block; + +/** + Sets a block to be executed to determine the caching behavior of a data task, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:willCacheResponse:completionHandler:`. + + @param block A block object to be executed to determine the caching behavior of a data task. The block returns the response to cache, and takes three arguments: the session, the data task, and the proposed cached URL response. + */ +- (void)setDataTaskWillCacheResponseBlock:(nullable NSCachedURLResponse * (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSCachedURLResponse *proposedResponse))block; + +/** + Sets a block to be executed once all messages enqueued for a session have been delivered, as handled by the `NSURLSessionDataDelegate` method `URLSessionDidFinishEventsForBackgroundURLSession:`. + + @param block A block object to be executed once all messages enqueued for a session have been delivered. The block has no return value and takes a single argument: the session. + */ +- (void)setDidFinishEventsForBackgroundURLSessionBlock:(nullable void (^)(NSURLSession *session))block; + +///----------------------------------------------- +/// @name Setting Download Task Delegate Callbacks +///----------------------------------------------- + +/** + Sets a block to be executed when a download task has completed a download, as handled by the `NSURLSessionDownloadDelegate` method `URLSession:downloadTask:didFinishDownloadingToURL:`. + + @param block A block object to be executed when a download task has completed. The block returns the URL the download should be moved to, and takes three arguments: the session, the download task, and the temporary location of the downloaded file. If the file manager encounters an error while attempting to move the temporary file to the destination, an `AFURLSessionDownloadTaskDidFailToMoveFileNotification` will be posted, with the download task as its object, and the user info of the error. + */ +- (void)setDownloadTaskDidFinishDownloadingBlock:(nullable NSURL * (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, NSURL *location))block; + +/** + Sets a block to be executed periodically to track download progress, as handled by the `NSURLSessionDownloadDelegate` method `URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesWritten:totalBytesExpectedToWrite:`. + + @param block A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes five arguments: the session, the download task, the number of bytes read since the last time the download progress block was called, the total bytes read, and the total bytes expected to be read during the request, as initially determined by the expected content size of the `NSHTTPURLResponse` object. This block may be called multiple times, and will execute on the session manager operation queue. + */ +- (void)setDownloadTaskDidWriteDataBlock:(nullable void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t bytesWritten, int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite))block; + +/** + Sets a block to be executed when a download task has been resumed, as handled by the `NSURLSessionDownloadDelegate` method `URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:`. + + @param block A block object to be executed when a download task has been resumed. The block has no return value and takes four arguments: the session, the download task, the file offset of the resumed download, and the total number of bytes expected to be downloaded. + */ +- (void)setDownloadTaskDidResumeBlock:(nullable void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t fileOffset, int64_t expectedTotalBytes))block; + +@end + +#endif + +///-------------------- +/// @name Notifications +///-------------------- + +/** + Posted when a task begins executing. + + @deprecated Use `AFNetworkingTaskDidResumeNotification` instead. + */ +extern NSString * const AFNetworkingTaskDidStartNotification DEPRECATED_ATTRIBUTE; + +/** + Posted when a task resumes. + */ +extern NSString * const AFNetworkingTaskDidResumeNotification; + +/** + Posted when a task finishes executing. Includes a userInfo dictionary with additional information about the task. + + @deprecated Use `AFNetworkingTaskDidCompleteNotification` instead. + */ +extern NSString * const AFNetworkingTaskDidFinishNotification DEPRECATED_ATTRIBUTE; + +/** + Posted when a task finishes executing. Includes a userInfo dictionary with additional information about the task. + */ +extern NSString * const AFNetworkingTaskDidCompleteNotification; + +/** + Posted when a task suspends its execution. + */ +extern NSString * const AFNetworkingTaskDidSuspendNotification; + +/** + Posted when a session is invalidated. + */ +extern NSString * const AFURLSessionDidInvalidateNotification; + +/** + Posted when a session download task encountered an error when moving the temporary download file to a specified destination. + */ +extern NSString * const AFURLSessionDownloadTaskDidFailToMoveFileNotification; + +/** + The raw response data of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if response data exists for the task. + + @deprecated Use `AFNetworkingTaskDidCompleteResponseDataKey` instead. + */ +extern NSString * const AFNetworkingTaskDidFinishResponseDataKey DEPRECATED_ATTRIBUTE; + +/** + The raw response data of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if response data exists for the task. + */ +extern NSString * const AFNetworkingTaskDidCompleteResponseDataKey; + +/** + The serialized response object of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if the response was serialized. + + @deprecated Use `AFNetworkingTaskDidCompleteSerializedResponseKey` instead. + */ +extern NSString * const AFNetworkingTaskDidFinishSerializedResponseKey DEPRECATED_ATTRIBUTE; + +/** + The serialized response object of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if the response was serialized. + */ +extern NSString * const AFNetworkingTaskDidCompleteSerializedResponseKey; + +/** + The response serializer used to serialize the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if the task has an associated response serializer. + + @deprecated Use `AFNetworkingTaskDidCompleteResponseSerializerKey` instead. + */ +extern NSString * const AFNetworkingTaskDidFinishResponseSerializerKey DEPRECATED_ATTRIBUTE; + +/** + The response serializer used to serialize the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if the task has an associated response serializer. + */ +extern NSString * const AFNetworkingTaskDidCompleteResponseSerializerKey; + +/** + The file path associated with the download task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if an the response data has been stored directly to disk. + + @deprecated Use `AFNetworkingTaskDidCompleteAssetPathKey` instead. + */ +extern NSString * const AFNetworkingTaskDidFinishAssetPathKey DEPRECATED_ATTRIBUTE; + +/** + The file path associated with the download task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if an the response data has been stored directly to disk. + */ +extern NSString * const AFNetworkingTaskDidCompleteAssetPathKey; + +/** + Any error associated with the task, or the serialization of the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if an error exists. + + @deprecated Use `AFNetworkingTaskDidCompleteErrorKey` instead. + */ +extern NSString * const AFNetworkingTaskDidFinishErrorKey DEPRECATED_ATTRIBUTE; + +/** + Any error associated with the task, or the serialization of the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if an error exists. + */ +extern NSString * const AFNetworkingTaskDidCompleteErrorKey; + +NS_ASSUME_NONNULL_END diff --git a/Pods/AFNetworking/AFNetworking/AFURLSessionManager.m b/Pods/AFNetworking/AFNetworking/AFURLSessionManager.m new file mode 100644 index 0000000..a795a07 --- /dev/null +++ b/Pods/AFNetworking/AFNetworking/AFURLSessionManager.m @@ -0,0 +1,1169 @@ +// AFURLSessionManager.m +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFURLSessionManager.h" +#import + +#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) + +static dispatch_queue_t url_session_manager_creation_queue() { + static dispatch_queue_t af_url_session_manager_creation_queue; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + af_url_session_manager_creation_queue = dispatch_queue_create("com.alamofire.networking.session.manager.creation", DISPATCH_QUEUE_SERIAL); + }); + + return af_url_session_manager_creation_queue; +} + +static dispatch_queue_t url_session_manager_processing_queue() { + static dispatch_queue_t af_url_session_manager_processing_queue; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + af_url_session_manager_processing_queue = dispatch_queue_create("com.alamofire.networking.session.manager.processing", DISPATCH_QUEUE_CONCURRENT); + }); + + return af_url_session_manager_processing_queue; +} + +static dispatch_group_t url_session_manager_completion_group() { + static dispatch_group_t af_url_session_manager_completion_group; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + af_url_session_manager_completion_group = dispatch_group_create(); + }); + + return af_url_session_manager_completion_group; +} + +NSString * const AFNetworkingTaskDidResumeNotification = @"com.alamofire.networking.task.resume"; +NSString * const AFNetworkingTaskDidCompleteNotification = @"com.alamofire.networking.task.complete"; +NSString * const AFNetworkingTaskDidSuspendNotification = @"com.alamofire.networking.task.suspend"; +NSString * const AFURLSessionDidInvalidateNotification = @"com.alamofire.networking.session.invalidate"; +NSString * const AFURLSessionDownloadTaskDidFailToMoveFileNotification = @"com.alamofire.networking.session.download.file-manager-error"; + +NSString * const AFNetworkingTaskDidStartNotification = @"com.alamofire.networking.task.resume"; // Deprecated +NSString * const AFNetworkingTaskDidFinishNotification = @"com.alamofire.networking.task.complete"; // Deprecated + +NSString * const AFNetworkingTaskDidCompleteSerializedResponseKey = @"com.alamofire.networking.task.complete.serializedresponse"; +NSString * const AFNetworkingTaskDidCompleteResponseSerializerKey = @"com.alamofire.networking.task.complete.responseserializer"; +NSString * const AFNetworkingTaskDidCompleteResponseDataKey = @"com.alamofire.networking.complete.finish.responsedata"; +NSString * const AFNetworkingTaskDidCompleteErrorKey = @"com.alamofire.networking.task.complete.error"; +NSString * const AFNetworkingTaskDidCompleteAssetPathKey = @"com.alamofire.networking.task.complete.assetpath"; + +NSString * const AFNetworkingTaskDidFinishSerializedResponseKey = @"com.alamofire.networking.task.complete.serializedresponse"; // Deprecated +NSString * const AFNetworkingTaskDidFinishResponseSerializerKey = @"com.alamofire.networking.task.complete.responseserializer"; // Deprecated +NSString * const AFNetworkingTaskDidFinishResponseDataKey = @"com.alamofire.networking.complete.finish.responsedata"; // Deprecated +NSString * const AFNetworkingTaskDidFinishErrorKey = @"com.alamofire.networking.task.complete.error"; // Deprecated +NSString * const AFNetworkingTaskDidFinishAssetPathKey = @"com.alamofire.networking.task.complete.assetpath"; // Deprecated + +static NSString * const AFURLSessionManagerLockName = @"com.alamofire.networking.session.manager.lock"; + +static NSUInteger const AFMaximumNumberOfAttemptsToRecreateBackgroundSessionUploadTask = 3; + +static void * AFTaskStateChangedContext = &AFTaskStateChangedContext; + +typedef void (^AFURLSessionDidBecomeInvalidBlock)(NSURLSession *session, NSError *error); +typedef NSURLSessionAuthChallengeDisposition (^AFURLSessionDidReceiveAuthenticationChallengeBlock)(NSURLSession *session, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential); + +typedef NSURLRequest * (^AFURLSessionTaskWillPerformHTTPRedirectionBlock)(NSURLSession *session, NSURLSessionTask *task, NSURLResponse *response, NSURLRequest *request); +typedef NSURLSessionAuthChallengeDisposition (^AFURLSessionTaskDidReceiveAuthenticationChallengeBlock)(NSURLSession *session, NSURLSessionTask *task, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential); +typedef void (^AFURLSessionDidFinishEventsForBackgroundURLSessionBlock)(NSURLSession *session); + +typedef NSInputStream * (^AFURLSessionTaskNeedNewBodyStreamBlock)(NSURLSession *session, NSURLSessionTask *task); +typedef void (^AFURLSessionTaskDidSendBodyDataBlock)(NSURLSession *session, NSURLSessionTask *task, int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend); +typedef void (^AFURLSessionTaskDidCompleteBlock)(NSURLSession *session, NSURLSessionTask *task, NSError *error); + +typedef NSURLSessionResponseDisposition (^AFURLSessionDataTaskDidReceiveResponseBlock)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLResponse *response); +typedef void (^AFURLSessionDataTaskDidBecomeDownloadTaskBlock)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLSessionDownloadTask *downloadTask); +typedef void (^AFURLSessionDataTaskDidReceiveDataBlock)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSData *data); +typedef NSCachedURLResponse * (^AFURLSessionDataTaskWillCacheResponseBlock)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSCachedURLResponse *proposedResponse); + +typedef NSURL * (^AFURLSessionDownloadTaskDidFinishDownloadingBlock)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, NSURL *location); +typedef void (^AFURLSessionDownloadTaskDidWriteDataBlock)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t bytesWritten, int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite); +typedef void (^AFURLSessionDownloadTaskDidResumeBlock)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t fileOffset, int64_t expectedTotalBytes); + +typedef void (^AFURLSessionTaskCompletionHandler)(NSURLResponse *response, id responseObject, NSError *error); + +#pragma mark - + +@interface AFURLSessionManagerTaskDelegate : NSObject +@property (nonatomic, weak) AFURLSessionManager *manager; +@property (nonatomic, strong) NSMutableData *mutableData; +@property (nonatomic, strong) NSProgress *progress; +@property (nonatomic, copy) NSURL *downloadFileURL; +@property (nonatomic, copy) AFURLSessionDownloadTaskDidFinishDownloadingBlock downloadTaskDidFinishDownloading; +@property (nonatomic, copy) AFURLSessionTaskCompletionHandler completionHandler; +@end + +@implementation AFURLSessionManagerTaskDelegate + +- (instancetype)init { + self = [super init]; + if (!self) { + return nil; + } + + self.mutableData = [NSMutableData data]; + + self.progress = [NSProgress progressWithTotalUnitCount:0]; + + return self; +} + +#pragma mark - NSURLSessionTaskDelegate + +- (void)URLSession:(__unused NSURLSession *)session + task:(__unused NSURLSessionTask *)task + didSendBodyData:(__unused int64_t)bytesSent + totalBytesSent:(int64_t)totalBytesSent +totalBytesExpectedToSend:(int64_t)totalBytesExpectedToSend +{ + self.progress.totalUnitCount = totalBytesExpectedToSend; + self.progress.completedUnitCount = totalBytesSent; +} + +- (void)URLSession:(__unused NSURLSession *)session + task:(NSURLSessionTask *)task +didCompleteWithError:(NSError *)error +{ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu" + __strong AFURLSessionManager *manager = self.manager; + + __block id responseObject = nil; + + __block NSMutableDictionary *userInfo = [NSMutableDictionary dictionary]; + userInfo[AFNetworkingTaskDidCompleteResponseSerializerKey] = manager.responseSerializer; + + //Performance Improvement from #2672 + NSData *data = nil; + if (self.mutableData) { + data = [self.mutableData copy]; + //We no longer need the reference, so nil it out to gain back some memory. + self.mutableData = nil; + } + + if (self.downloadFileURL) { + userInfo[AFNetworkingTaskDidCompleteAssetPathKey] = self.downloadFileURL; + } else if (data) { + userInfo[AFNetworkingTaskDidCompleteResponseDataKey] = data; + } + + if (error) { + userInfo[AFNetworkingTaskDidCompleteErrorKey] = error; + + dispatch_group_async(manager.completionGroup ?: url_session_manager_completion_group(), manager.completionQueue ?: dispatch_get_main_queue(), ^{ + if (self.completionHandler) { + self.completionHandler(task.response, responseObject, error); + } + + dispatch_async(dispatch_get_main_queue(), ^{ + [[NSNotificationCenter defaultCenter] postNotificationName:AFNetworkingTaskDidCompleteNotification object:task userInfo:userInfo]; + }); + }); + } else { + dispatch_async(url_session_manager_processing_queue(), ^{ + NSError *serializationError = nil; + responseObject = [manager.responseSerializer responseObjectForResponse:task.response data:data error:&serializationError]; + + if (self.downloadFileURL) { + responseObject = self.downloadFileURL; + } + + if (responseObject) { + userInfo[AFNetworkingTaskDidCompleteSerializedResponseKey] = responseObject; + } + + if (serializationError) { + userInfo[AFNetworkingTaskDidCompleteErrorKey] = serializationError; + } + + dispatch_group_async(manager.completionGroup ?: url_session_manager_completion_group(), manager.completionQueue ?: dispatch_get_main_queue(), ^{ + if (self.completionHandler) { + self.completionHandler(task.response, responseObject, serializationError); + } + + dispatch_async(dispatch_get_main_queue(), ^{ + [[NSNotificationCenter defaultCenter] postNotificationName:AFNetworkingTaskDidCompleteNotification object:task userInfo:userInfo]; + }); + }); + }); + } +#pragma clang diagnostic pop +} + +#pragma mark - NSURLSessionDataTaskDelegate + +- (void)URLSession:(__unused NSURLSession *)session + dataTask:(__unused NSURLSessionDataTask *)dataTask + didReceiveData:(NSData *)data +{ + [self.mutableData appendData:data]; +} + +#pragma mark - NSURLSessionDownloadTaskDelegate + +- (void)URLSession:(NSURLSession *)session + downloadTask:(NSURLSessionDownloadTask *)downloadTask +didFinishDownloadingToURL:(NSURL *)location +{ + NSError *fileManagerError = nil; + self.downloadFileURL = nil; + + if (self.downloadTaskDidFinishDownloading) { + self.downloadFileURL = self.downloadTaskDidFinishDownloading(session, downloadTask, location); + if (self.downloadFileURL) { + [[NSFileManager defaultManager] moveItemAtURL:location toURL:self.downloadFileURL error:&fileManagerError]; + + if (fileManagerError) { + [[NSNotificationCenter defaultCenter] postNotificationName:AFURLSessionDownloadTaskDidFailToMoveFileNotification object:downloadTask userInfo:fileManagerError.userInfo]; + } + } + } +} + +- (void)URLSession:(__unused NSURLSession *)session + downloadTask:(__unused NSURLSessionDownloadTask *)downloadTask + didWriteData:(__unused int64_t)bytesWritten + totalBytesWritten:(int64_t)totalBytesWritten +totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite +{ + self.progress.totalUnitCount = totalBytesExpectedToWrite; + self.progress.completedUnitCount = totalBytesWritten; +} + +- (void)URLSession:(__unused NSURLSession *)session + downloadTask:(__unused NSURLSessionDownloadTask *)downloadTask + didResumeAtOffset:(int64_t)fileOffset +expectedTotalBytes:(int64_t)expectedTotalBytes { + self.progress.totalUnitCount = expectedTotalBytes; + self.progress.completedUnitCount = fileOffset; +} + +@end + +#pragma mark - + +/** + * A workaround for issues related to key-value observing the `state` of an `NSURLSessionTask`. + * + * See: + * - https://github.com/AFNetworking/AFNetworking/issues/1477 + * - https://github.com/AFNetworking/AFNetworking/issues/2638 + * - https://github.com/AFNetworking/AFNetworking/pull/2702 + */ + +static inline void af_swizzleSelector(Class class, SEL originalSelector, SEL swizzledSelector) { + Method originalMethod = class_getInstanceMethod(class, originalSelector); + Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector); + method_exchangeImplementations(originalMethod, swizzledMethod); +} + +static inline BOOL af_addMethod(Class class, SEL selector, Method method) { + return class_addMethod(class, selector, method_getImplementation(method), method_getTypeEncoding(method)); +} + +static NSString * const AFNSURLSessionTaskDidResumeNotification = @"com.alamofire.networking.nsurlsessiontask.resume"; +static NSString * const AFNSURLSessionTaskDidSuspendNotification = @"com.alamofire.networking.nsurlsessiontask.suspend"; + +@interface _AFURLSessionTaskSwizzling : NSObject + +@end + +@implementation _AFURLSessionTaskSwizzling + ++ (void)load { + /** + WARNING: Trouble Ahead + https://github.com/AFNetworking/AFNetworking/pull/2702 + */ + + if (NSClassFromString(@"NSURLSessionTask")) { + /** + iOS 7 and iOS 8 differ in NSURLSessionTask implementation, which makes the next bit of code a bit tricky. + Many Unit Tests have been built to validate as much of this behavior has possible. + Here is what we know: + - NSURLSessionTasks are implemented with class clusters, meaning the class you request from the API isn't actually the type of class you will get back. + - Simply referencing `[NSURLSessionTask class]` will not work. You need to ask an `NSURLSession` to actually create an object, and grab the class from there. + - On iOS 7, `localDataTask` is a `__NSCFLocalDataTask`, which inherits from `__NSCFLocalSessionTask`, which inherits from `__NSCFURLSessionTask`. + - On iOS 8, `localDataTask` is a `__NSCFLocalDataTask`, which inherits from `__NSCFLocalSessionTask`, which inherits from `NSURLSessionTask`. + - On iOS 7, `__NSCFLocalSessionTask` and `__NSCFURLSessionTask` are the only two classes that have their own implementations of `resume` and `suspend`, and `__NSCFLocalSessionTask` DOES NOT CALL SUPER. This means both classes need to be swizzled. + - On iOS 8, `NSURLSessionTask` is the only class that implements `resume` and `suspend`. This means this is the only class that needs to be swizzled. + - Because `NSURLSessionTask` is not involved in the class hierarchy for every version of iOS, its easier to add the swizzled methods to a dummy class and manage them there. + + Some Assumptions: + - No implementations of `resume` or `suspend` call super. If this were to change in a future version of iOS, we'd need to handle it. + - No background task classes override `resume` or `suspend` + + The current solution: + 1) Grab an instance of `__NSCFLocalDataTask` by asking an instance of `NSURLSession` for a data task. + 2) Grab a pointer to the original implementation of `af_resume` + 3) Check to see if the current class has an implementation of resume. If so, continue to step 4. + 4) Grab the super class of the current class. + 5) Grab a pointer for the current class to the current implementation of `resume`. + 6) Grab a pointer for the super class to the current implementation of `resume`. + 7) If the current class implementation of `resume` is not equal to the super class implementation of `resume` AND the current implementation of `resume` is not equal to the original implementation of `af_resume`, THEN swizzle the methods + 8) Set the current class to the super class, and repeat steps 3-8 + */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wnonnull" + NSURLSessionDataTask *localDataTask = [[NSURLSession sessionWithConfiguration:nil] dataTaskWithURL:nil]; +#pragma clang diagnostic pop + IMP originalAFResumeIMP = method_getImplementation(class_getInstanceMethod([_AFURLSessionTaskSwizzling class], @selector(af_resume))); + Class currentClass = [localDataTask class]; + + while (class_getInstanceMethod(currentClass, @selector(resume))) { + Class superClass = [currentClass superclass]; + IMP classResumeIMP = method_getImplementation(class_getInstanceMethod(currentClass, @selector(resume))); + IMP superclassResumeIMP = method_getImplementation(class_getInstanceMethod(superClass, @selector(resume))); + if (classResumeIMP != superclassResumeIMP && + originalAFResumeIMP != classResumeIMP) { + [self swizzleResumeAndSuspendMethodForClass:currentClass]; + } + currentClass = [currentClass superclass]; + } + + [localDataTask cancel]; + } +} + ++ (void)swizzleResumeAndSuspendMethodForClass:(Class)class { + Method afResumeMethod = class_getInstanceMethod(self, @selector(af_resume)); + Method afSuspendMethod = class_getInstanceMethod(self, @selector(af_suspend)); + + af_addMethod(class, @selector(af_resume), afResumeMethod); + af_addMethod(class, @selector(af_suspend), afSuspendMethod); + + af_swizzleSelector(class, @selector(resume), @selector(af_resume)); + af_swizzleSelector(class, @selector(suspend), @selector(af_suspend)); +} + +- (NSURLSessionTaskState)state { + NSAssert(NO, @"State method should never be called in the actual dummy class"); + return NSURLSessionTaskStateCanceling; +} + +- (void)af_resume { + NSAssert([self respondsToSelector:@selector(state)], @"Does not respond to state"); + NSURLSessionTaskState state = [self state]; + [self af_resume]; + + if (state != NSURLSessionTaskStateRunning) { + [[NSNotificationCenter defaultCenter] postNotificationName:AFNSURLSessionTaskDidResumeNotification object:self]; + } +} + +- (void)af_suspend { + NSAssert([self respondsToSelector:@selector(state)], @"Does not respond to state"); + NSURLSessionTaskState state = [self state]; + [self af_suspend]; + + if (state != NSURLSessionTaskStateSuspended) { + [[NSNotificationCenter defaultCenter] postNotificationName:AFNSURLSessionTaskDidSuspendNotification object:self]; + } +} +@end + +#pragma mark - + +@interface AFURLSessionManager () +@property (readwrite, nonatomic, strong) NSURLSessionConfiguration *sessionConfiguration; +@property (readwrite, nonatomic, strong) NSOperationQueue *operationQueue; +@property (readwrite, nonatomic, strong) NSURLSession *session; +@property (readwrite, nonatomic, strong) NSMutableDictionary *mutableTaskDelegatesKeyedByTaskIdentifier; +@property (readonly, nonatomic, copy) NSString *taskDescriptionForSessionTasks; +@property (readwrite, nonatomic, strong) NSLock *lock; +@property (readwrite, nonatomic, copy) AFURLSessionDidBecomeInvalidBlock sessionDidBecomeInvalid; +@property (readwrite, nonatomic, copy) AFURLSessionDidReceiveAuthenticationChallengeBlock sessionDidReceiveAuthenticationChallenge; +@property (readwrite, nonatomic, copy) AFURLSessionDidFinishEventsForBackgroundURLSessionBlock didFinishEventsForBackgroundURLSession; +@property (readwrite, nonatomic, copy) AFURLSessionTaskWillPerformHTTPRedirectionBlock taskWillPerformHTTPRedirection; +@property (readwrite, nonatomic, copy) AFURLSessionTaskDidReceiveAuthenticationChallengeBlock taskDidReceiveAuthenticationChallenge; +@property (readwrite, nonatomic, copy) AFURLSessionTaskNeedNewBodyStreamBlock taskNeedNewBodyStream; +@property (readwrite, nonatomic, copy) AFURLSessionTaskDidSendBodyDataBlock taskDidSendBodyData; +@property (readwrite, nonatomic, copy) AFURLSessionTaskDidCompleteBlock taskDidComplete; +@property (readwrite, nonatomic, copy) AFURLSessionDataTaskDidReceiveResponseBlock dataTaskDidReceiveResponse; +@property (readwrite, nonatomic, copy) AFURLSessionDataTaskDidBecomeDownloadTaskBlock dataTaskDidBecomeDownloadTask; +@property (readwrite, nonatomic, copy) AFURLSessionDataTaskDidReceiveDataBlock dataTaskDidReceiveData; +@property (readwrite, nonatomic, copy) AFURLSessionDataTaskWillCacheResponseBlock dataTaskWillCacheResponse; +@property (readwrite, nonatomic, copy) AFURLSessionDownloadTaskDidFinishDownloadingBlock downloadTaskDidFinishDownloading; +@property (readwrite, nonatomic, copy) AFURLSessionDownloadTaskDidWriteDataBlock downloadTaskDidWriteData; +@property (readwrite, nonatomic, copy) AFURLSessionDownloadTaskDidResumeBlock downloadTaskDidResume; +@end + +@implementation AFURLSessionManager + +- (instancetype)init { + return [self initWithSessionConfiguration:nil]; +} + +- (instancetype)initWithSessionConfiguration:(NSURLSessionConfiguration *)configuration { + self = [super init]; + if (!self) { + return nil; + } + + if (!configuration) { + configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; + } + + self.sessionConfiguration = configuration; + + self.operationQueue = [[NSOperationQueue alloc] init]; + self.operationQueue.maxConcurrentOperationCount = 1; + + self.session = [NSURLSession sessionWithConfiguration:self.sessionConfiguration delegate:self delegateQueue:self.operationQueue]; + + self.responseSerializer = [AFJSONResponseSerializer serializer]; + + self.securityPolicy = [AFSecurityPolicy defaultPolicy]; + +#if !TARGET_OS_WATCH + self.reachabilityManager = [AFNetworkReachabilityManager sharedManager]; +#endif + + self.mutableTaskDelegatesKeyedByTaskIdentifier = [[NSMutableDictionary alloc] init]; + + self.lock = [[NSLock alloc] init]; + self.lock.name = AFURLSessionManagerLockName; + + [self.session getTasksWithCompletionHandler:^(NSArray *dataTasks, NSArray *uploadTasks, NSArray *downloadTasks) { + for (NSURLSessionDataTask *task in dataTasks) { + [self addDelegateForDataTask:task completionHandler:nil]; + } + + for (NSURLSessionUploadTask *uploadTask in uploadTasks) { + [self addDelegateForUploadTask:uploadTask progress:nil completionHandler:nil]; + } + + for (NSURLSessionDownloadTask *downloadTask in downloadTasks) { + [self addDelegateForDownloadTask:downloadTask progress:nil destination:nil completionHandler:nil]; + } + }]; + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(taskDidResume:) name:AFNSURLSessionTaskDidResumeNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(taskDidSuspend:) name:AFNSURLSessionTaskDidSuspendNotification object:nil]; + + return self; +} + +- (void)dealloc { + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + +#pragma mark - + +- (NSString *)taskDescriptionForSessionTasks { + return [NSString stringWithFormat:@"%p", self]; +} + +- (void)taskDidResume:(NSNotification *)notification { + NSURLSessionTask *task = notification.object; + if ([task respondsToSelector:@selector(taskDescription)]) { + if ([task.taskDescription isEqualToString:self.taskDescriptionForSessionTasks]) { + dispatch_async(dispatch_get_main_queue(), ^{ + [[NSNotificationCenter defaultCenter] postNotificationName:AFNetworkingTaskDidResumeNotification object:task]; + }); + } + } +} + +- (void)taskDidSuspend:(NSNotification *)notification { + NSURLSessionTask *task = notification.object; + if ([task respondsToSelector:@selector(taskDescription)]) { + if ([task.taskDescription isEqualToString:self.taskDescriptionForSessionTasks]) { + dispatch_async(dispatch_get_main_queue(), ^{ + [[NSNotificationCenter defaultCenter] postNotificationName:AFNetworkingTaskDidSuspendNotification object:task]; + }); + } + } +} + +#pragma mark - + +- (AFURLSessionManagerTaskDelegate *)delegateForTask:(NSURLSessionTask *)task { + NSParameterAssert(task); + + AFURLSessionManagerTaskDelegate *delegate = nil; + [self.lock lock]; + delegate = self.mutableTaskDelegatesKeyedByTaskIdentifier[@(task.taskIdentifier)]; + [self.lock unlock]; + + return delegate; +} + +- (void)setDelegate:(AFURLSessionManagerTaskDelegate *)delegate + forTask:(NSURLSessionTask *)task +{ + NSParameterAssert(task); + NSParameterAssert(delegate); + + [self.lock lock]; + self.mutableTaskDelegatesKeyedByTaskIdentifier[@(task.taskIdentifier)] = delegate; + [self.lock unlock]; +} + +- (void)addDelegateForDataTask:(NSURLSessionDataTask *)dataTask + completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler +{ + AFURLSessionManagerTaskDelegate *delegate = [[AFURLSessionManagerTaskDelegate alloc] init]; + delegate.manager = self; + delegate.completionHandler = completionHandler; + + dataTask.taskDescription = self.taskDescriptionForSessionTasks; + [self setDelegate:delegate forTask:dataTask]; +} + +- (void)addDelegateForUploadTask:(NSURLSessionUploadTask *)uploadTask + progress:(NSProgress * __autoreleasing *)progress + completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler +{ + AFURLSessionManagerTaskDelegate *delegate = [[AFURLSessionManagerTaskDelegate alloc] init]; + delegate.manager = self; + delegate.completionHandler = completionHandler; + + int64_t totalUnitCount = uploadTask.countOfBytesExpectedToSend; + if(totalUnitCount == NSURLSessionTransferSizeUnknown) { + NSString *contentLength = [uploadTask.originalRequest valueForHTTPHeaderField:@"Content-Length"]; + if(contentLength) { + totalUnitCount = (int64_t)[contentLength longLongValue]; + } + } + + if (delegate.progress) { + delegate.progress.totalUnitCount = totalUnitCount; + } else { + delegate.progress = [NSProgress progressWithTotalUnitCount:totalUnitCount]; + } + + delegate.progress.pausingHandler = ^{ + [uploadTask suspend]; + }; + delegate.progress.cancellationHandler = ^{ + [uploadTask cancel]; + }; + + if (progress) { + *progress = delegate.progress; + } + + uploadTask.taskDescription = self.taskDescriptionForSessionTasks; + + [self setDelegate:delegate forTask:uploadTask]; +} + +- (void)addDelegateForDownloadTask:(NSURLSessionDownloadTask *)downloadTask + progress:(NSProgress * __autoreleasing *)progress + destination:(NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination + completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler +{ + AFURLSessionManagerTaskDelegate *delegate = [[AFURLSessionManagerTaskDelegate alloc] init]; + delegate.manager = self; + delegate.completionHandler = completionHandler; + + if (destination) { + delegate.downloadTaskDidFinishDownloading = ^NSURL * (NSURLSession * __unused session, NSURLSessionDownloadTask *task, NSURL *location) { + return destination(location, task.response); + }; + } + + if (progress) { + *progress = delegate.progress; + } + + downloadTask.taskDescription = self.taskDescriptionForSessionTasks; + + [self setDelegate:delegate forTask:downloadTask]; +} + +- (void)removeDelegateForTask:(NSURLSessionTask *)task { + NSParameterAssert(task); + + [self.lock lock]; + [self.mutableTaskDelegatesKeyedByTaskIdentifier removeObjectForKey:@(task.taskIdentifier)]; + [self.lock unlock]; +} + +- (void)removeAllDelegates { + [self.lock lock]; + [self.mutableTaskDelegatesKeyedByTaskIdentifier removeAllObjects]; + [self.lock unlock]; +} + +#pragma mark - + +- (NSArray *)tasksForKeyPath:(NSString *)keyPath { + __block NSArray *tasks = nil; + dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); + [self.session getTasksWithCompletionHandler:^(NSArray *dataTasks, NSArray *uploadTasks, NSArray *downloadTasks) { + if ([keyPath isEqualToString:NSStringFromSelector(@selector(dataTasks))]) { + tasks = dataTasks; + } else if ([keyPath isEqualToString:NSStringFromSelector(@selector(uploadTasks))]) { + tasks = uploadTasks; + } else if ([keyPath isEqualToString:NSStringFromSelector(@selector(downloadTasks))]) { + tasks = downloadTasks; + } else if ([keyPath isEqualToString:NSStringFromSelector(@selector(tasks))]) { + tasks = [@[dataTasks, uploadTasks, downloadTasks] valueForKeyPath:@"@unionOfArrays.self"]; + } + + dispatch_semaphore_signal(semaphore); + }]; + + dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER); + + return tasks; +} + +- (NSArray *)tasks { + return [self tasksForKeyPath:NSStringFromSelector(_cmd)]; +} + +- (NSArray *)dataTasks { + return [self tasksForKeyPath:NSStringFromSelector(_cmd)]; +} + +- (NSArray *)uploadTasks { + return [self tasksForKeyPath:NSStringFromSelector(_cmd)]; +} + +- (NSArray *)downloadTasks { + return [self tasksForKeyPath:NSStringFromSelector(_cmd)]; +} + +#pragma mark - + +- (void)invalidateSessionCancelingTasks:(BOOL)cancelPendingTasks { + dispatch_async(dispatch_get_main_queue(), ^{ + if (cancelPendingTasks) { + [self.session invalidateAndCancel]; + } else { + [self.session finishTasksAndInvalidate]; + } + }); +} + +#pragma mark - + +- (void)setResponseSerializer:(id )responseSerializer { + NSParameterAssert(responseSerializer); + + _responseSerializer = responseSerializer; +} + +#pragma mark - + +- (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request + completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler +{ + __block NSURLSessionDataTask *dataTask = nil; + dispatch_sync(url_session_manager_creation_queue(), ^{ + dataTask = [self.session dataTaskWithRequest:request]; + }); + + [self addDelegateForDataTask:dataTask completionHandler:completionHandler]; + + return dataTask; +} + +#pragma mark - + +- (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request + fromFile:(NSURL *)fileURL + progress:(NSProgress * __autoreleasing *)progress + completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler +{ + __block NSURLSessionUploadTask *uploadTask = nil; + dispatch_sync(url_session_manager_creation_queue(), ^{ + uploadTask = [self.session uploadTaskWithRequest:request fromFile:fileURL]; + }); + + if (!uploadTask && self.attemptsToRecreateUploadTasksForBackgroundSessions && self.session.configuration.identifier) { + for (NSUInteger attempts = 0; !uploadTask && attempts < AFMaximumNumberOfAttemptsToRecreateBackgroundSessionUploadTask; attempts++) { + uploadTask = [self.session uploadTaskWithRequest:request fromFile:fileURL]; + } + } + + [self addDelegateForUploadTask:uploadTask progress:progress completionHandler:completionHandler]; + + return uploadTask; +} + +- (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request + fromData:(NSData *)bodyData + progress:(NSProgress * __autoreleasing *)progress + completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler +{ + __block NSURLSessionUploadTask *uploadTask = nil; + dispatch_sync(url_session_manager_creation_queue(), ^{ + uploadTask = [self.session uploadTaskWithRequest:request fromData:bodyData]; + }); + + [self addDelegateForUploadTask:uploadTask progress:progress completionHandler:completionHandler]; + + return uploadTask; +} + +- (NSURLSessionUploadTask *)uploadTaskWithStreamedRequest:(NSURLRequest *)request + progress:(NSProgress * __autoreleasing *)progress + completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler +{ + __block NSURLSessionUploadTask *uploadTask = nil; + dispatch_sync(url_session_manager_creation_queue(), ^{ + uploadTask = [self.session uploadTaskWithStreamedRequest:request]; + }); + + [self addDelegateForUploadTask:uploadTask progress:progress completionHandler:completionHandler]; + + return uploadTask; +} + +#pragma mark - + +- (NSURLSessionDownloadTask *)downloadTaskWithRequest:(NSURLRequest *)request + progress:(NSProgress * __autoreleasing *)progress + destination:(NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination + completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler +{ + __block NSURLSessionDownloadTask *downloadTask = nil; + dispatch_sync(url_session_manager_creation_queue(), ^{ + downloadTask = [self.session downloadTaskWithRequest:request]; + }); + + [self addDelegateForDownloadTask:downloadTask progress:progress destination:destination completionHandler:completionHandler]; + + return downloadTask; +} + +- (NSURLSessionDownloadTask *)downloadTaskWithResumeData:(NSData *)resumeData + progress:(NSProgress * __autoreleasing *)progress + destination:(NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination + completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler +{ + __block NSURLSessionDownloadTask *downloadTask = nil; + dispatch_sync(url_session_manager_creation_queue(), ^{ + downloadTask = [self.session downloadTaskWithResumeData:resumeData]; + }); + + [self addDelegateForDownloadTask:downloadTask progress:progress destination:destination completionHandler:completionHandler]; + + return downloadTask; +} + +#pragma mark - + +- (NSProgress *)uploadProgressForTask:(NSURLSessionUploadTask *)uploadTask { + return [[self delegateForTask:uploadTask] progress]; +} + +- (NSProgress *)downloadProgressForTask:(NSURLSessionDownloadTask *)downloadTask { + return [[self delegateForTask:downloadTask] progress]; +} + +#pragma mark - + +- (void)setSessionDidBecomeInvalidBlock:(void (^)(NSURLSession *session, NSError *error))block { + self.sessionDidBecomeInvalid = block; +} + +- (void)setSessionDidReceiveAuthenticationChallengeBlock:(NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential))block { + self.sessionDidReceiveAuthenticationChallenge = block; +} + +- (void)setDidFinishEventsForBackgroundURLSessionBlock:(void (^)(NSURLSession *session))block { + self.didFinishEventsForBackgroundURLSession = block; +} + +#pragma mark - + +- (void)setTaskNeedNewBodyStreamBlock:(NSInputStream * (^)(NSURLSession *session, NSURLSessionTask *task))block { + self.taskNeedNewBodyStream = block; +} + +- (void)setTaskWillPerformHTTPRedirectionBlock:(NSURLRequest * (^)(NSURLSession *session, NSURLSessionTask *task, NSURLResponse *response, NSURLRequest *request))block { + self.taskWillPerformHTTPRedirection = block; +} + +- (void)setTaskDidReceiveAuthenticationChallengeBlock:(NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLSessionTask *task, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential))block { + self.taskDidReceiveAuthenticationChallenge = block; +} + +- (void)setTaskDidSendBodyDataBlock:(void (^)(NSURLSession *session, NSURLSessionTask *task, int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend))block { + self.taskDidSendBodyData = block; +} + +- (void)setTaskDidCompleteBlock:(void (^)(NSURLSession *session, NSURLSessionTask *task, NSError *error))block { + self.taskDidComplete = block; +} + +#pragma mark - + +- (void)setDataTaskDidReceiveResponseBlock:(NSURLSessionResponseDisposition (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLResponse *response))block { + self.dataTaskDidReceiveResponse = block; +} + +- (void)setDataTaskDidBecomeDownloadTaskBlock:(void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLSessionDownloadTask *downloadTask))block { + self.dataTaskDidBecomeDownloadTask = block; +} + +- (void)setDataTaskDidReceiveDataBlock:(void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSData *data))block { + self.dataTaskDidReceiveData = block; +} + +- (void)setDataTaskWillCacheResponseBlock:(NSCachedURLResponse * (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSCachedURLResponse *proposedResponse))block { + self.dataTaskWillCacheResponse = block; +} + +#pragma mark - + +- (void)setDownloadTaskDidFinishDownloadingBlock:(NSURL * (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, NSURL *location))block { + self.downloadTaskDidFinishDownloading = block; +} + +- (void)setDownloadTaskDidWriteDataBlock:(void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t bytesWritten, int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite))block { + self.downloadTaskDidWriteData = block; +} + +- (void)setDownloadTaskDidResumeBlock:(void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t fileOffset, int64_t expectedTotalBytes))block { + self.downloadTaskDidResume = block; +} + +#pragma mark - NSObject + +- (NSString *)description { + return [NSString stringWithFormat:@"<%@: %p, session: %@, operationQueue: %@>", NSStringFromClass([self class]), self, self.session, self.operationQueue]; +} + +- (BOOL)respondsToSelector:(SEL)selector { + if (selector == @selector(URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:)) { + return self.taskWillPerformHTTPRedirection != nil; + } else if (selector == @selector(URLSession:dataTask:didReceiveResponse:completionHandler:)) { + return self.dataTaskDidReceiveResponse != nil; + } else if (selector == @selector(URLSession:dataTask:willCacheResponse:completionHandler:)) { + return self.dataTaskWillCacheResponse != nil; + } else if (selector == @selector(URLSessionDidFinishEventsForBackgroundURLSession:)) { + return self.didFinishEventsForBackgroundURLSession != nil; + } + + return [[self class] instancesRespondToSelector:selector]; +} + +#pragma mark - NSURLSessionDelegate + +- (void)URLSession:(NSURLSession *)session +didBecomeInvalidWithError:(NSError *)error +{ + if (self.sessionDidBecomeInvalid) { + self.sessionDidBecomeInvalid(session, error); + } + + [self removeAllDelegates]; + [[NSNotificationCenter defaultCenter] postNotificationName:AFURLSessionDidInvalidateNotification object:session]; +} + +- (void)URLSession:(NSURLSession *)session +didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge + completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler +{ + NSURLSessionAuthChallengeDisposition disposition = NSURLSessionAuthChallengePerformDefaultHandling; + __block NSURLCredential *credential = nil; + + if (self.sessionDidReceiveAuthenticationChallenge) { + disposition = self.sessionDidReceiveAuthenticationChallenge(session, challenge, &credential); + } else { + if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) { + if ([self.securityPolicy evaluateServerTrust:challenge.protectionSpace.serverTrust forDomain:challenge.protectionSpace.host]) { + credential = [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]; + if (credential) { + disposition = NSURLSessionAuthChallengeUseCredential; + } else { + disposition = NSURLSessionAuthChallengePerformDefaultHandling; + } + } else { + disposition = NSURLSessionAuthChallengeCancelAuthenticationChallenge; + } + } else { + disposition = NSURLSessionAuthChallengePerformDefaultHandling; + } + } + + if (completionHandler) { + completionHandler(disposition, credential); + } +} + +#pragma mark - NSURLSessionTaskDelegate + +- (void)URLSession:(NSURLSession *)session + task:(NSURLSessionTask *)task +willPerformHTTPRedirection:(NSHTTPURLResponse *)response + newRequest:(NSURLRequest *)request + completionHandler:(void (^)(NSURLRequest *))completionHandler +{ + NSURLRequest *redirectRequest = request; + + if (self.taskWillPerformHTTPRedirection) { + redirectRequest = self.taskWillPerformHTTPRedirection(session, task, response, request); + } + + if (completionHandler) { + completionHandler(redirectRequest); + } +} + +- (void)URLSession:(NSURLSession *)session + task:(NSURLSessionTask *)task +didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge + completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler +{ + NSURLSessionAuthChallengeDisposition disposition = NSURLSessionAuthChallengePerformDefaultHandling; + __block NSURLCredential *credential = nil; + + if (self.taskDidReceiveAuthenticationChallenge) { + disposition = self.taskDidReceiveAuthenticationChallenge(session, task, challenge, &credential); + } else { + if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) { + if ([self.securityPolicy evaluateServerTrust:challenge.protectionSpace.serverTrust forDomain:challenge.protectionSpace.host]) { + disposition = NSURLSessionAuthChallengeUseCredential; + credential = [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]; + } else { + disposition = NSURLSessionAuthChallengeCancelAuthenticationChallenge; + } + } else { + disposition = NSURLSessionAuthChallengePerformDefaultHandling; + } + } + + if (completionHandler) { + completionHandler(disposition, credential); + } +} + +- (void)URLSession:(NSURLSession *)session + task:(NSURLSessionTask *)task + needNewBodyStream:(void (^)(NSInputStream *bodyStream))completionHandler +{ + NSInputStream *inputStream = nil; + + if (self.taskNeedNewBodyStream) { + inputStream = self.taskNeedNewBodyStream(session, task); + } else if (task.originalRequest.HTTPBodyStream && [task.originalRequest.HTTPBodyStream conformsToProtocol:@protocol(NSCopying)]) { + inputStream = [task.originalRequest.HTTPBodyStream copy]; + } + + if (completionHandler) { + completionHandler(inputStream); + } +} + +- (void)URLSession:(NSURLSession *)session + task:(NSURLSessionTask *)task + didSendBodyData:(int64_t)bytesSent + totalBytesSent:(int64_t)totalBytesSent +totalBytesExpectedToSend:(int64_t)totalBytesExpectedToSend +{ + + int64_t totalUnitCount = totalBytesExpectedToSend; + if(totalUnitCount == NSURLSessionTransferSizeUnknown) { + NSString *contentLength = [task.originalRequest valueForHTTPHeaderField:@"Content-Length"]; + if(contentLength) { + totalUnitCount = (int64_t) [contentLength longLongValue]; + } + } + + AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:task]; + [delegate URLSession:session task:task didSendBodyData:bytesSent totalBytesSent:totalBytesSent totalBytesExpectedToSend:totalUnitCount]; + + if (self.taskDidSendBodyData) { + self.taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalUnitCount); + } +} + +- (void)URLSession:(NSURLSession *)session + task:(NSURLSessionTask *)task +didCompleteWithError:(NSError *)error +{ + AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:task]; + + // delegate may be nil when completing a task in the background + if (delegate) { + [delegate URLSession:session task:task didCompleteWithError:error]; + + [self removeDelegateForTask:task]; + } + + if (self.taskDidComplete) { + self.taskDidComplete(session, task, error); + } + +} + +#pragma mark - NSURLSessionDataDelegate + +- (void)URLSession:(NSURLSession *)session + dataTask:(NSURLSessionDataTask *)dataTask +didReceiveResponse:(NSURLResponse *)response + completionHandler:(void (^)(NSURLSessionResponseDisposition disposition))completionHandler +{ + NSURLSessionResponseDisposition disposition = NSURLSessionResponseAllow; + + if (self.dataTaskDidReceiveResponse) { + disposition = self.dataTaskDidReceiveResponse(session, dataTask, response); + } + + if (completionHandler) { + completionHandler(disposition); + } +} + +- (void)URLSession:(NSURLSession *)session + dataTask:(NSURLSessionDataTask *)dataTask +didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask +{ + AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:dataTask]; + if (delegate) { + [self removeDelegateForTask:dataTask]; + [self setDelegate:delegate forTask:downloadTask]; + } + + if (self.dataTaskDidBecomeDownloadTask) { + self.dataTaskDidBecomeDownloadTask(session, dataTask, downloadTask); + } +} + +- (void)URLSession:(NSURLSession *)session + dataTask:(NSURLSessionDataTask *)dataTask + didReceiveData:(NSData *)data +{ + AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:dataTask]; + [delegate URLSession:session dataTask:dataTask didReceiveData:data]; + + if (self.dataTaskDidReceiveData) { + self.dataTaskDidReceiveData(session, dataTask, data); + } +} + +- (void)URLSession:(NSURLSession *)session + dataTask:(NSURLSessionDataTask *)dataTask + willCacheResponse:(NSCachedURLResponse *)proposedResponse + completionHandler:(void (^)(NSCachedURLResponse *cachedResponse))completionHandler +{ + NSCachedURLResponse *cachedResponse = proposedResponse; + + if (self.dataTaskWillCacheResponse) { + cachedResponse = self.dataTaskWillCacheResponse(session, dataTask, proposedResponse); + } + + if (completionHandler) { + completionHandler(cachedResponse); + } +} + +- (void)URLSessionDidFinishEventsForBackgroundURLSession:(NSURLSession *)session { + if (self.didFinishEventsForBackgroundURLSession) { + dispatch_async(dispatch_get_main_queue(), ^{ + self.didFinishEventsForBackgroundURLSession(session); + }); + } +} + +#pragma mark - NSURLSessionDownloadDelegate + +- (void)URLSession:(NSURLSession *)session + downloadTask:(NSURLSessionDownloadTask *)downloadTask +didFinishDownloadingToURL:(NSURL *)location +{ + AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:downloadTask]; + if (self.downloadTaskDidFinishDownloading) { + NSURL *fileURL = self.downloadTaskDidFinishDownloading(session, downloadTask, location); + if (fileURL) { + delegate.downloadFileURL = fileURL; + NSError *error = nil; + [[NSFileManager defaultManager] moveItemAtURL:location toURL:fileURL error:&error]; + if (error) { + [[NSNotificationCenter defaultCenter] postNotificationName:AFURLSessionDownloadTaskDidFailToMoveFileNotification object:downloadTask userInfo:error.userInfo]; + } + + return; + } + } + + if (delegate) { + [delegate URLSession:session downloadTask:downloadTask didFinishDownloadingToURL:location]; + } +} + +- (void)URLSession:(NSURLSession *)session + downloadTask:(NSURLSessionDownloadTask *)downloadTask + didWriteData:(int64_t)bytesWritten + totalBytesWritten:(int64_t)totalBytesWritten +totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite +{ + AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:downloadTask]; + [delegate URLSession:session downloadTask:downloadTask didWriteData:bytesWritten totalBytesWritten:totalBytesWritten totalBytesExpectedToWrite:totalBytesExpectedToWrite]; + + if (self.downloadTaskDidWriteData) { + self.downloadTaskDidWriteData(session, downloadTask, bytesWritten, totalBytesWritten, totalBytesExpectedToWrite); + } +} + +- (void)URLSession:(NSURLSession *)session + downloadTask:(NSURLSessionDownloadTask *)downloadTask + didResumeAtOffset:(int64_t)fileOffset +expectedTotalBytes:(int64_t)expectedTotalBytes +{ + AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:downloadTask]; + [delegate URLSession:session downloadTask:downloadTask didResumeAtOffset:fileOffset expectedTotalBytes:expectedTotalBytes]; + + if (self.downloadTaskDidResume) { + self.downloadTaskDidResume(session, downloadTask, fileOffset, expectedTotalBytes); + } +} + +#pragma mark - NSSecureCoding + ++ (BOOL)supportsSecureCoding { + return YES; +} + +- (id)initWithCoder:(NSCoder *)decoder { + NSURLSessionConfiguration *configuration = [decoder decodeObjectOfClass:[NSURLSessionConfiguration class] forKey:@"sessionConfiguration"]; + + self = [self initWithSessionConfiguration:configuration]; + if (!self) { + return nil; + } + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [coder encodeObject:self.session.configuration forKey:@"sessionConfiguration"]; +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone { + return [[[self class] allocWithZone:zone] initWithSessionConfiguration:self.session.configuration]; +} + +@end + +#endif diff --git a/Pods/AFNetworking/LICENSE b/Pods/AFNetworking/LICENSE new file mode 100644 index 0000000..91f125b --- /dev/null +++ b/Pods/AFNetworking/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Pods/AFNetworking/README.md b/Pods/AFNetworking/README.md new file mode 100644 index 0000000..f25efe0 --- /dev/null +++ b/Pods/AFNetworking/README.md @@ -0,0 +1,394 @@ +

+ AFNetworking +

+ +[![Build Status](https://travis-ci.org/AFNetworking/AFNetworking.svg)](https://travis-ci.org/AFNetworking/AFNetworking) + +AFNetworking is a delightful networking library for iOS and Mac OS X. It's built on top of the [Foundation URL Loading System](http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/URLLoadingSystem/URLLoadingSystem.html), extending the powerful high-level networking abstractions built into Cocoa. It has a modular architecture with well-designed, feature-rich APIs that are a joy to use. + +Perhaps the most important feature of all, however, is the amazing community of developers who use and contribute to AFNetworking every day. AFNetworking powers some of the most popular and critically-acclaimed apps on the iPhone, iPad, and Mac. + +Choose AFNetworking for your next project, or migrate over your existing projects—you'll be happy you did! + +## How To Get Started + +- [Download AFNetworking](https://github.com/AFNetworking/AFNetworking/archive/master.zip) and try out the included Mac and iPhone example apps +- Read the ["Getting Started" guide](https://github.com/AFNetworking/AFNetworking/wiki/Getting-Started-with-AFNetworking), [FAQ](https://github.com/AFNetworking/AFNetworking/wiki/AFNetworking-FAQ), or [other articles on the Wiki](https://github.com/AFNetworking/AFNetworking/wiki) +- Check out the [documentation](http://cocoadocs.org/docsets/AFNetworking/) for a comprehensive look at all of the APIs available in AFNetworking +- Read the [AFNetworking 2.0 Migration Guide](https://github.com/AFNetworking/AFNetworking/wiki/AFNetworking-2.0-Migration-Guide) for an overview of the architectural changes from 1.0. + +## Communication + +- If you **need help**, use [Stack Overflow](http://stackoverflow.com/questions/tagged/afnetworking). (Tag 'afnetworking') +- If you'd like to **ask a general question**, use [Stack Overflow](http://stackoverflow.com/questions/tagged/afnetworking). +- If you **found a bug**, _and can provide steps to reliably reproduce it_, open an issue. +- If you **have a feature request**, open an issue. +- If you **want to contribute**, submit a pull request. + +### Installation with CocoaPods + +[CocoaPods](http://cocoapods.org) is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like AFNetworking in your projects. See the ["Getting Started" guide for more information](https://github.com/AFNetworking/AFNetworking/wiki/Getting-Started-with-AFNetworking). + +#### Podfile + +```ruby +platform :ios, '7.0' +pod "AFNetworking", "~> 2.0" +``` + +## Requirements + +| AFNetworking Version | Minimum iOS Target | Minimum OS X Target | Notes | +|:--------------------:|:---------------------------:|:----------------------------:|:-------------------------------------------------------------------------:| +| 2.x | iOS 6 | OS X 10.8 | Xcode 5 is required. `NSURLSession` subspec requires iOS 7 or OS X 10.9. | +| [1.x](https://github.com/AFNetworking/AFNetworking/tree/1.x) | iOS 5 | Mac OS X 10.7 | | +| [0.10.x](https://github.com/AFNetworking/AFNetworking/tree/0.10.x) | iOS 4 | Mac OS X 10.6 | | + +(OS X projects must support [64-bit with modern Cocoa runtime](https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtVersionsPlatforms.html)). + +> Programming in Swift? Try [Alamofire](https://github.com/Alamofire/Alamofire) for a more conventional set of APIs. + +## Architecture + +### NSURLConnection + +- `AFURLConnectionOperation` +- `AFHTTPRequestOperation` +- `AFHTTPRequestOperationManager` + +### NSURLSession _(iOS 7 / Mac OS X 10.9)_ + +- `AFURLSessionManager` +- `AFHTTPSessionManager` + +### Serialization + +* `` + - `AFHTTPRequestSerializer` + - `AFJSONRequestSerializer` + - `AFPropertyListRequestSerializer` +* `` + - `AFHTTPResponseSerializer` + - `AFJSONResponseSerializer` + - `AFXMLParserResponseSerializer` + - `AFXMLDocumentResponseSerializer` _(Mac OS X)_ + - `AFPropertyListResponseSerializer` + - `AFImageResponseSerializer` + - `AFCompoundResponseSerializer` + +### Additional Functionality + +- `AFSecurityPolicy` +- `AFNetworkReachabilityManager` + +## Usage + +### HTTP Request Operation Manager + +`AFHTTPRequestOperationManager` encapsulates the common patterns of communicating with a web application over HTTP, including request creation, response serialization, network reachability monitoring, and security, as well as request operation management. + +#### `GET` Request + +```objective-c +AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; +[manager GET:@"http://example.com/resources.json" parameters:nil success:^(AFHTTPRequestOperation *operation, id responseObject) { + NSLog(@"JSON: %@", responseObject); +} failure:^(AFHTTPRequestOperation *operation, NSError *error) { + NSLog(@"Error: %@", error); +}]; +``` + +#### `POST` URL-Form-Encoded Request + +```objective-c +AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; +NSDictionary *parameters = @{@"foo": @"bar"}; +[manager POST:@"http://example.com/resources.json" parameters:parameters success:^(AFHTTPRequestOperation *operation, id responseObject) { + NSLog(@"JSON: %@", responseObject); +} failure:^(AFHTTPRequestOperation *operation, NSError *error) { + NSLog(@"Error: %@", error); +}]; +``` + +#### `POST` Multi-Part Request + +```objective-c +AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; +NSDictionary *parameters = @{@"foo": @"bar"}; +NSURL *filePath = [NSURL fileURLWithPath:@"file://path/to/image.png"]; +[manager POST:@"http://example.com/resources.json" parameters:parameters constructingBodyWithBlock:^(id formData) { + [formData appendPartWithFileURL:filePath name:@"image" error:nil]; +} success:^(AFHTTPRequestOperation *operation, id responseObject) { + NSLog(@"Success: %@", responseObject); +} failure:^(AFHTTPRequestOperation *operation, NSError *error) { + NSLog(@"Error: %@", error); +}]; +``` + +--- + +### AFURLSessionManager + +`AFURLSessionManager` creates and manages an `NSURLSession` object based on a specified `NSURLSessionConfiguration` object, which conforms to ``, ``, ``, and ``. + +#### Creating a Download Task + +```objective-c +NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; +AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:configuration]; + +NSURL *URL = [NSURL URLWithString:@"http://example.com/download.zip"]; +NSURLRequest *request = [NSURLRequest requestWithURL:URL]; + +NSURLSessionDownloadTask *downloadTask = [manager downloadTaskWithRequest:request progress:nil destination:^NSURL *(NSURL *targetPath, NSURLResponse *response) { + NSURL *documentsDirectoryURL = [[NSFileManager defaultManager] URLForDirectory:NSDocumentDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:NO error:nil]; + return [documentsDirectoryURL URLByAppendingPathComponent:[response suggestedFilename]]; +} completionHandler:^(NSURLResponse *response, NSURL *filePath, NSError *error) { + NSLog(@"File downloaded to: %@", filePath); +}]; +[downloadTask resume]; +``` + +#### Creating an Upload Task + +```objective-c +NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; +AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:configuration]; + +NSURL *URL = [NSURL URLWithString:@"http://example.com/upload"]; +NSURLRequest *request = [NSURLRequest requestWithURL:URL]; + +NSURL *filePath = [NSURL fileURLWithPath:@"file://path/to/image.png"]; +NSURLSessionUploadTask *uploadTask = [manager uploadTaskWithRequest:request fromFile:filePath progress:nil completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) { + if (error) { + NSLog(@"Error: %@", error); + } else { + NSLog(@"Success: %@ %@", response, responseObject); + } +}]; +[uploadTask resume]; +``` + +#### Creating an Upload Task for a Multi-Part Request, with Progress + +```objective-c +NSMutableURLRequest *request = [[AFHTTPRequestSerializer serializer] multipartFormRequestWithMethod:@"POST" URLString:@"http://example.com/upload" parameters:nil constructingBodyWithBlock:^(id formData) { + [formData appendPartWithFileURL:[NSURL fileURLWithPath:@"file://path/to/image.jpg"] name:@"file" fileName:@"filename.jpg" mimeType:@"image/jpeg" error:nil]; + } error:nil]; + +AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]]; +NSProgress *progress = nil; + +NSURLSessionUploadTask *uploadTask = [manager uploadTaskWithStreamedRequest:request progress:&progress completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) { + if (error) { + NSLog(@"Error: %@", error); + } else { + NSLog(@"%@ %@", response, responseObject); + } +}]; + +[uploadTask resume]; +``` + +#### Creating a Data Task + +```objective-c +NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; +AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:configuration]; + +NSURL *URL = [NSURL URLWithString:@"http://example.com/upload"]; +NSURLRequest *request = [NSURLRequest requestWithURL:URL]; + +NSURLSessionDataTask *dataTask = [manager dataTaskWithRequest:request completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) { + if (error) { + NSLog(@"Error: %@", error); + } else { + NSLog(@"%@ %@", response, responseObject); + } +}]; +[dataTask resume]; +``` + +--- + +### Request Serialization + +Request serializers create requests from URL strings, encoding parameters as either a query string or HTTP body. + +```objective-c +NSString *URLString = @"http://example.com"; +NSDictionary *parameters = @{@"foo": @"bar", @"baz": @[@1, @2, @3]}; +``` + +#### Query String Parameter Encoding + +```objective-c +[[AFHTTPRequestSerializer serializer] requestWithMethod:@"GET" URLString:URLString parameters:parameters error:nil]; +``` + + GET http://example.com?foo=bar&baz[]=1&baz[]=2&baz[]=3 + +#### URL Form Parameter Encoding + +```objective-c +[[AFHTTPRequestSerializer serializer] requestWithMethod:@"POST" URLString:URLString parameters:parameters]; +``` + + POST http://example.com/ + Content-Type: application/x-www-form-urlencoded + + foo=bar&baz[]=1&baz[]=2&baz[]=3 + +#### JSON Parameter Encoding + +```objective-c +[[AFJSONRequestSerializer serializer] requestWithMethod:@"POST" URLString:URLString parameters:parameters]; +``` + + POST http://example.com/ + Content-Type: application/json + + {"foo": "bar", "baz": [1,2,3]} + +--- + +### Network Reachability Manager + +`AFNetworkReachabilityManager` monitors the reachability of domains, and addresses for both WWAN and WiFi network interfaces. + +* Do not use Reachability to determine if the original request should be sent. + * You should try to send it. +* You can use Reachability to determine when a request should be automatically retried. + * Although it may still fail, a Reachability notification that the connectivity is available is a good time to retry something. +* Network reachability is a useful tool for determining why a request might have failed. + * After a network request has failed, telling the user they're offline is better than giving them a more technical but accurate error, such as "request timed out." + +See also [WWDC 2012 session 706, "Networking Best Practices."](https://developer.apple.com/videos/wwdc/2012/#706). + +#### Shared Network Reachability + +```objective-c +[[AFNetworkReachabilityManager sharedManager] setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) { + NSLog(@"Reachability: %@", AFStringFromNetworkReachabilityStatus(status)); +}]; + +[[AFNetworkReachabilityManager sharedManager] startMonitoring]; +``` + +#### HTTP Manager Reachability + +```objective-c +NSURL *baseURL = [NSURL URLWithString:@"http://example.com/"]; +AFHTTPRequestOperationManager *manager = [[AFHTTPRequestOperationManager alloc] initWithBaseURL:baseURL]; + +NSOperationQueue *operationQueue = manager.operationQueue; +[manager.reachabilityManager setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) { + switch (status) { + case AFNetworkReachabilityStatusReachableViaWWAN: + case AFNetworkReachabilityStatusReachableViaWiFi: + [operationQueue setSuspended:NO]; + break; + case AFNetworkReachabilityStatusNotReachable: + default: + [operationQueue setSuspended:YES]; + break; + } +}]; + +[manager.reachabilityManager startMonitoring]; +``` + +--- + +### Security Policy + +`AFSecurityPolicy` evaluates server trust against pinned X.509 certificates and public keys over secure connections. + +Adding pinned SSL certificates to your app helps prevent man-in-the-middle attacks and other vulnerabilities. Applications dealing with sensitive customer data or financial information are strongly encouraged to route all communication over an HTTPS connection with SSL pinning configured and enabled. + +#### Allowing Invalid SSL Certificates + +```objective-c +AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; +manager.securityPolicy.allowInvalidCertificates = YES; // not recommended for production +``` + +--- + +### AFHTTPRequestOperation + +`AFHTTPRequestOperation` is a subclass of `AFURLConnectionOperation` for requests using the HTTP or HTTPS protocols. It encapsulates the concept of acceptable status codes and content types, which determine the success or failure of a request. + +Although `AFHTTPRequestOperationManager` is usually the best way to go about making requests, `AFHTTPRequestOperation` can be used by itself. + +#### `GET` with `AFHTTPRequestOperation` + +```objective-c +NSURL *URL = [NSURL URLWithString:@"http://example.com/resources/123.json"]; +NSURLRequest *request = [NSURLRequest requestWithURL:URL]; +AFHTTPRequestOperation *op = [[AFHTTPRequestOperation alloc] initWithRequest:request]; +op.responseSerializer = [AFJSONResponseSerializer serializer]; +[op setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { + NSLog(@"JSON: %@", responseObject); +} failure:^(AFHTTPRequestOperation *operation, NSError *error) { + NSLog(@"Error: %@", error); +}]; +[[NSOperationQueue mainQueue] addOperation:op]; +``` + +#### Batch of Operations + +```objective-c +NSMutableArray *mutableOperations = [NSMutableArray array]; +for (NSURL *fileURL in filesToUpload) { + NSURLRequest *request = [[AFHTTPRequestSerializer serializer] multipartFormRequestWithMethod:@"POST" URLString:@"http://example.com/upload" parameters:nil constructingBodyWithBlock:^(id formData) { + [formData appendPartWithFileURL:fileURL name:@"images[]" error:nil]; + }]; + + AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:request]; + + [mutableOperations addObject:operation]; +} + +NSArray *operations = [AFURLConnectionOperation batchOfRequestOperations:@[...] progressBlock:^(NSUInteger numberOfFinishedOperations, NSUInteger totalNumberOfOperations) { + NSLog(@"%lu of %lu complete", numberOfFinishedOperations, totalNumberOfOperations); +} completionBlock:^(NSArray *operations) { + NSLog(@"All operations in batch complete"); +}]; +[[NSOperationQueue mainQueue] addOperations:operations waitUntilFinished:NO]; +``` + +## Unit Tests + +AFNetworking includes a suite of unit tests within the Tests subdirectory. In order to run the unit tests, you must install the testing dependencies via [CocoaPods](http://cocoapods.org/): + + $ cd Tests + $ pod install + +Once testing dependencies are installed, you can execute the test suite via the 'iOS Tests' and 'OS X Tests' schemes within Xcode. + +### Running Tests from the Command Line + +Tests can also be run from the command line or within a continuous integration environment. The [`xcpretty`](https://github.com/mneorr/xcpretty) utility needs to be installed before running the tests from the command line: + + $ gem install xcpretty + +Once `xcpretty` is installed, you can execute the suite via `rake test`. + +## Credits + +AFNetworking is owned and maintained by the [Alamofire Software Foundation](http://alamofire.org). + +AFNetworking was originally created by [Scott Raymond](https://github.com/sco/) and [Mattt Thompson](https://github.com/mattt/) in the development of [Gowalla for iPhone](http://en.wikipedia.org/wiki/Gowalla). + +AFNetworking's logo was designed by [Alan Defibaugh](http://www.alandefibaugh.com/). + +And most of all, thanks to AFNetworking's [growing list of contributors](https://github.com/AFNetworking/AFNetworking/contributors). + +### Security Disclosure + +If you believe you have identified a security vulnerability with AFNetworking, you should report it as soon as possible via email to security@alamofire.org. Please do not post it to a public issue tracker. + +## License + +AFNetworking is released under the MIT license. See LICENSE for details. diff --git a/Pods/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h b/Pods/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h new file mode 100644 index 0000000..3c7649b --- /dev/null +++ b/Pods/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h @@ -0,0 +1,80 @@ +// AFNetworkActivityIndicatorManager.h +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#import + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + `AFNetworkActivityIndicatorManager` manages the state of the network activity indicator in the status bar. When enabled, it will listen for notifications indicating that a network request operation has started or finished, and start or stop animating the indicator accordingly. The number of active requests is incremented and decremented much like a stack or a semaphore, and the activity indicator will animate so long as that number is greater than zero. + + You should enable the shared instance of `AFNetworkActivityIndicatorManager` when your application finishes launching. In `AppDelegate application:didFinishLaunchingWithOptions:` you can do so with the following code: + + [[AFNetworkActivityIndicatorManager sharedManager] setEnabled:YES]; + + By setting `enabled` to `YES` for `sharedManager`, the network activity indicator will show and hide automatically as requests start and finish. You should not ever need to call `incrementActivityCount` or `decrementActivityCount` yourself. + + See the Apple Human Interface Guidelines section about the Network Activity Indicator for more information: + http://developer.apple.com/library/iOS/#documentation/UserExperience/Conceptual/MobileHIG/UIElementGuidelines/UIElementGuidelines.html#//apple_ref/doc/uid/TP40006556-CH13-SW44 + */ +NS_EXTENSION_UNAVAILABLE_IOS("Use view controller based solutions where appropriate instead.") +@interface AFNetworkActivityIndicatorManager : NSObject + +/** + A Boolean value indicating whether the manager is enabled. + + If YES, the manager will change status bar network activity indicator according to network operation notifications it receives. The default value is NO. + */ +@property (nonatomic, assign, getter = isEnabled) BOOL enabled; + +/** + A Boolean value indicating whether the network activity indicator is currently displayed in the status bar. + */ +@property (readonly, nonatomic, assign) BOOL isNetworkActivityIndicatorVisible; + +/** + Returns the shared network activity indicator manager object for the system. + + @return The systemwide network activity indicator manager. + */ ++ (instancetype)sharedManager; + +/** + Increments the number of active network requests. If this number was zero before incrementing, this will start animating the status bar network activity indicator. + */ +- (void)incrementActivityCount; + +/** + Decrements the number of active network requests. If this number becomes zero after decrementing, this will stop animating the status bar network activity indicator. + */ +- (void)decrementActivityCount; + +@end + +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.m b/Pods/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.m new file mode 100644 index 0000000..cf13180 --- /dev/null +++ b/Pods/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.m @@ -0,0 +1,170 @@ +// AFNetworkActivityIndicatorManager.m +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFNetworkActivityIndicatorManager.h" + +#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) + +#import "AFHTTPRequestOperation.h" + +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000 +#import "AFURLSessionManager.h" +#endif + +static NSTimeInterval const kAFNetworkActivityIndicatorInvisibilityDelay = 0.17; + +static NSURLRequest * AFNetworkRequestFromNotification(NSNotification *notification) { + if ([[notification object] isKindOfClass:[AFURLConnectionOperation class]]) { + return [(AFURLConnectionOperation *)[notification object] request]; + } + +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000 + if ([[notification object] respondsToSelector:@selector(originalRequest)]) { + return [(NSURLSessionTask *)[notification object] originalRequest]; + } +#endif + + return nil; +} + +@interface AFNetworkActivityIndicatorManager () +@property (readwrite, nonatomic, assign) NSInteger activityCount; +@property (readwrite, nonatomic, strong) NSTimer *activityIndicatorVisibilityTimer; +@property (readonly, nonatomic, getter = isNetworkActivityIndicatorVisible) BOOL networkActivityIndicatorVisible; + +- (void)updateNetworkActivityIndicatorVisibility; +- (void)updateNetworkActivityIndicatorVisibilityDelayed; +@end + +@implementation AFNetworkActivityIndicatorManager +@dynamic networkActivityIndicatorVisible; + ++ (instancetype)sharedManager { + static AFNetworkActivityIndicatorManager *_sharedManager = nil; + static dispatch_once_t oncePredicate; + dispatch_once(&oncePredicate, ^{ + _sharedManager = [[self alloc] init]; + }); + + return _sharedManager; +} + ++ (NSSet *)keyPathsForValuesAffectingIsNetworkActivityIndicatorVisible { + return [NSSet setWithObject:@"activityCount"]; +} + +- (id)init { + self = [super init]; + if (!self) { + return nil; + } + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkRequestDidStart:) name:AFNetworkingOperationDidStartNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkRequestDidFinish:) name:AFNetworkingOperationDidFinishNotification object:nil]; + +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000 + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkRequestDidStart:) name:AFNetworkingTaskDidResumeNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkRequestDidFinish:) name:AFNetworkingTaskDidSuspendNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkRequestDidFinish:) name:AFNetworkingTaskDidCompleteNotification object:nil]; +#endif + + return self; +} + +- (void)dealloc { + [[NSNotificationCenter defaultCenter] removeObserver:self]; + + [_activityIndicatorVisibilityTimer invalidate]; +} + +- (void)updateNetworkActivityIndicatorVisibilityDelayed { + if (self.enabled) { + // Delay hiding of activity indicator for a short interval, to avoid flickering + if (![self isNetworkActivityIndicatorVisible]) { + [self.activityIndicatorVisibilityTimer invalidate]; + self.activityIndicatorVisibilityTimer = [NSTimer timerWithTimeInterval:kAFNetworkActivityIndicatorInvisibilityDelay target:self selector:@selector(updateNetworkActivityIndicatorVisibility) userInfo:nil repeats:NO]; + [[NSRunLoop mainRunLoop] addTimer:self.activityIndicatorVisibilityTimer forMode:NSRunLoopCommonModes]; + } else { + [self performSelectorOnMainThread:@selector(updateNetworkActivityIndicatorVisibility) withObject:nil waitUntilDone:NO modes:@[NSRunLoopCommonModes]]; + } + } +} + +- (BOOL)isNetworkActivityIndicatorVisible { + return self.activityCount > 0; +} + +- (void)updateNetworkActivityIndicatorVisibility { + [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:[self isNetworkActivityIndicatorVisible]]; +} + +- (void)setActivityCount:(NSInteger)activityCount { + @synchronized(self) { + _activityCount = activityCount; + } + + dispatch_async(dispatch_get_main_queue(), ^{ + [self updateNetworkActivityIndicatorVisibilityDelayed]; + }); +} + +- (void)incrementActivityCount { + [self willChangeValueForKey:@"activityCount"]; + @synchronized(self) { + _activityCount++; + } + [self didChangeValueForKey:@"activityCount"]; + + dispatch_async(dispatch_get_main_queue(), ^{ + [self updateNetworkActivityIndicatorVisibilityDelayed]; + }); +} + +- (void)decrementActivityCount { + [self willChangeValueForKey:@"activityCount"]; + @synchronized(self) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu" + _activityCount = MAX(_activityCount - 1, 0); +#pragma clang diagnostic pop + } + [self didChangeValueForKey:@"activityCount"]; + + dispatch_async(dispatch_get_main_queue(), ^{ + [self updateNetworkActivityIndicatorVisibilityDelayed]; + }); +} + +- (void)networkRequestDidStart:(NSNotification *)notification { + if ([AFNetworkRequestFromNotification(notification) URL]) { + [self incrementActivityCount]; + } +} + +- (void)networkRequestDidFinish:(NSNotification *)notification { + if ([AFNetworkRequestFromNotification(notification) URL]) { + [self decrementActivityCount]; + } +} + +@end + +#endif diff --git a/Pods/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h b/Pods/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h new file mode 100644 index 0000000..0c8f9b5 --- /dev/null +++ b/Pods/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h @@ -0,0 +1,63 @@ +// UIActivityIndicatorView+AFNetworking.h +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#import + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + +#import + +@class AFURLConnectionOperation; + +/** + This category adds methods to the UIKit framework's `UIActivityIndicatorView` class. The methods in this category provide support for automatically starting and stopping animation depending on the loading state of a request operation or session task. + */ +@interface UIActivityIndicatorView (AFNetworking) + +///---------------------------------- +/// @name Animating for Session Tasks +///---------------------------------- + +/** + Binds the animating state to the state of the specified task. + + @param task The task. If `nil`, automatic updating from any previously specified operation will be disabled. + */ +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 +- (void)setAnimatingWithStateOfTask:(nullable NSURLSessionTask *)task; +#endif + +///--------------------------------------- +/// @name Animating for Request Operations +///--------------------------------------- + +/** + Binds the animating state to the execution state of the specified operation. + + @param operation The operation. If `nil`, automatic updating from any previously specified operation will be disabled. + */ +- (void)setAnimatingWithStateOfOperation:(nullable AFURLConnectionOperation *)operation; + +@end + +#endif diff --git a/Pods/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.m b/Pods/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.m new file mode 100644 index 0000000..dd362b0 --- /dev/null +++ b/Pods/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.m @@ -0,0 +1,171 @@ +// UIActivityIndicatorView+AFNetworking.m +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "UIActivityIndicatorView+AFNetworking.h" +#import + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + +#import "AFHTTPRequestOperation.h" + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 +#import "AFURLSessionManager.h" +#endif + +@interface AFActivityIndicatorViewNotificationObserver : NSObject +@property (readonly, nonatomic, weak) UIActivityIndicatorView *activityIndicatorView; +- (instancetype)initWithActivityIndicatorView:(UIActivityIndicatorView *)activityIndicatorView; + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 +- (void)setAnimatingWithStateOfTask:(NSURLSessionTask *)task; +#endif +- (void)setAnimatingWithStateOfOperation:(AFURLConnectionOperation *)operation; + +@end + +@implementation UIActivityIndicatorView (AFNetworking) + +- (AFActivityIndicatorViewNotificationObserver *)af_notificationObserver { + AFActivityIndicatorViewNotificationObserver *notificationObserver = objc_getAssociatedObject(self, @selector(af_notificationObserver)); + if (notificationObserver == nil) { + notificationObserver = [[AFActivityIndicatorViewNotificationObserver alloc] initWithActivityIndicatorView:self]; + objc_setAssociatedObject(self, @selector(af_notificationObserver), notificationObserver, OBJC_ASSOCIATION_RETAIN_NONATOMIC); + } + return notificationObserver; +} + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 +- (void)setAnimatingWithStateOfTask:(NSURLSessionTask *)task { + [[self af_notificationObserver] setAnimatingWithStateOfTask:task]; +} +#endif + +- (void)setAnimatingWithStateOfOperation:(AFURLConnectionOperation *)operation { + [[self af_notificationObserver] setAnimatingWithStateOfOperation:operation]; +} + +@end + +@implementation AFActivityIndicatorViewNotificationObserver + +- (instancetype)initWithActivityIndicatorView:(UIActivityIndicatorView *)activityIndicatorView +{ + self = [super init]; + if (self) { + _activityIndicatorView = activityIndicatorView; + } + return self; +} + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 +- (void)setAnimatingWithStateOfTask:(NSURLSessionTask *)task { + NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; + + [notificationCenter removeObserver:self name:AFNetworkingTaskDidResumeNotification object:nil]; + [notificationCenter removeObserver:self name:AFNetworkingTaskDidSuspendNotification object:nil]; + [notificationCenter removeObserver:self name:AFNetworkingTaskDidCompleteNotification object:nil]; + + if (task) { + if (task.state != NSURLSessionTaskStateCompleted) { + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreceiver-is-weak" +#pragma clang diagnostic ignored "-Warc-repeated-use-of-weak" + if (task.state == NSURLSessionTaskStateRunning) { + [self.activityIndicatorView startAnimating]; + } else { + [self.activityIndicatorView stopAnimating]; + } +#pragma clang diagnostic pop + + [notificationCenter addObserver:self selector:@selector(af_startAnimating) name:AFNetworkingTaskDidResumeNotification object:task]; + [notificationCenter addObserver:self selector:@selector(af_stopAnimating) name:AFNetworkingTaskDidCompleteNotification object:task]; + [notificationCenter addObserver:self selector:@selector(af_stopAnimating) name:AFNetworkingTaskDidSuspendNotification object:task]; + } + } +} +#endif + +#pragma mark - + +- (void)setAnimatingWithStateOfOperation:(AFURLConnectionOperation *)operation { + NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; + + [notificationCenter removeObserver:self name:AFNetworkingOperationDidStartNotification object:nil]; + [notificationCenter removeObserver:self name:AFNetworkingOperationDidFinishNotification object:nil]; + + if (operation) { + if (![operation isFinished]) { + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreceiver-is-weak" +#pragma clang diagnostic ignored "-Warc-repeated-use-of-weak" + if ([operation isExecuting]) { + [self.activityIndicatorView startAnimating]; + } else { + [self.activityIndicatorView stopAnimating]; + } +#pragma clang diagnostic pop + + [notificationCenter addObserver:self selector:@selector(af_startAnimating) name:AFNetworkingOperationDidStartNotification object:operation]; + [notificationCenter addObserver:self selector:@selector(af_stopAnimating) name:AFNetworkingOperationDidFinishNotification object:operation]; + } + } +} + +#pragma mark - + +- (void)af_startAnimating { + dispatch_async(dispatch_get_main_queue(), ^{ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreceiver-is-weak" + [self.activityIndicatorView startAnimating]; +#pragma clang diagnostic pop + }); +} + +- (void)af_stopAnimating { + dispatch_async(dispatch_get_main_queue(), ^{ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreceiver-is-weak" + [self.activityIndicatorView stopAnimating]; +#pragma clang diagnostic pop + }); +} + +#pragma mark - + +- (void)dealloc { + NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 + [notificationCenter removeObserver:self name:AFNetworkingTaskDidCompleteNotification object:nil]; + [notificationCenter removeObserver:self name:AFNetworkingTaskDidResumeNotification object:nil]; + [notificationCenter removeObserver:self name:AFNetworkingTaskDidSuspendNotification object:nil]; +#endif + + [notificationCenter removeObserver:self name:AFNetworkingOperationDidStartNotification object:nil]; + [notificationCenter removeObserver:self name:AFNetworkingOperationDidFinishNotification object:nil]; +} + +@end + +#endif diff --git a/Pods/AFNetworking/UIKit+AFNetworking/UIAlertView+AFNetworking.h b/Pods/AFNetworking/UIKit+AFNetworking/UIAlertView+AFNetworking.h new file mode 100644 index 0000000..97f5622 --- /dev/null +++ b/Pods/AFNetworking/UIKit+AFNetworking/UIAlertView+AFNetworking.h @@ -0,0 +1,99 @@ +// UIAlertView+AFNetworking.h +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#import + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class AFURLConnectionOperation; + +/** + This category adds methods to the UIKit framework's `UIAlertView` class. The methods in this category provide support for automatically showing an alert if a session task or request operation finishes with an error. Alert title and message are filled from the corresponding `localizedDescription` & `localizedRecoverySuggestion` or `localizedFailureReason` of the error. + */ +@interface UIAlertView (AFNetworking) + +///------------------------------------- +/// @name Showing Alert for Session Task +///------------------------------------- + +/** + Shows an alert view with the error of the specified session task, if any. + + @param task The session task. + @param delegate The alert view delegate. + */ +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 ++ (void)showAlertViewForTaskWithErrorOnCompletion:(NSURLSessionTask *)task + delegate:(nullable id)delegate NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extensions."); +#endif + +/** + Shows an alert view with the error of the specified session task, if any, with a custom cancel button title and other button titles. + + @param task The session task. + @param delegate The alert view delegate. + @param cancelButtonTitle The title of the cancel button or nil if there is no cancel button. Using this argument is equivalent to setting the cancel button index to the value returned by invoking addButtonWithTitle: specifying this title. + @param otherButtonTitles The title of another button. Using this argument is equivalent to invoking addButtonWithTitle: with this title to add more buttons. Too many buttons can cause the alert view to scroll. For guidelines on the best ways to use an alert in an app, see "Temporary Views". Titles of additional buttons to add to the receiver, terminated with `nil`. + */ +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 ++ (void)showAlertViewForTaskWithErrorOnCompletion:(NSURLSessionTask *)task + delegate:(nullable id)delegate + cancelButtonTitle:(nullable NSString *)cancelButtonTitle + otherButtonTitles:(nullable NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extensions."); +#endif + +///------------------------------------------ +/// @name Showing Alert for Request Operation +///------------------------------------------ + +/** + Shows an alert view with the error of the specified request operation, if any. + + @param operation The request operation. + @param delegate The alert view delegate. + */ ++ (void)showAlertViewForRequestOperationWithErrorOnCompletion:(AFURLConnectionOperation *)operation + delegate:(nullable id)delegate NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extensions."); + +/** + Shows an alert view with the error of the specified request operation, if any, with a custom cancel button title and other button titles. + + @param operation The request operation. + @param delegate The alert view delegate. + @param cancelButtonTitle The title of the cancel button or nil if there is no cancel button. Using this argument is equivalent to setting the cancel button index to the value returned by invoking addButtonWithTitle: specifying this title. + @param otherButtonTitles The title of another button. Using this argument is equivalent to invoking addButtonWithTitle: with this title to add more buttons. Too many buttons can cause the alert view to scroll. For guidelines on the best ways to use an alert in an app, see "Temporary Views". Titles of additional buttons to add to the receiver, terminated with `nil`. + */ ++ (void)showAlertViewForRequestOperationWithErrorOnCompletion:(AFURLConnectionOperation *)operation + delegate:(nullable id)delegate + cancelButtonTitle:(nullable NSString *)cancelButtonTitle + otherButtonTitles:(nullable NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extensions."); + +@end + +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/AFNetworking/UIKit+AFNetworking/UIAlertView+AFNetworking.m b/Pods/AFNetworking/UIKit+AFNetworking/UIAlertView+AFNetworking.m new file mode 100644 index 0000000..0d1e9e7 --- /dev/null +++ b/Pods/AFNetworking/UIKit+AFNetworking/UIAlertView+AFNetworking.m @@ -0,0 +1,141 @@ +// UIAlertView+AFNetworking.m +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "UIAlertView+AFNetworking.h" + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + +#import "AFURLConnectionOperation.h" + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 +#import "AFURLSessionManager.h" +#endif + +static void AFGetAlertViewTitleAndMessageFromError(NSError *error, NSString * __autoreleasing *title, NSString * __autoreleasing *message) { + if (error.localizedDescription && (error.localizedRecoverySuggestion || error.localizedFailureReason)) { + *title = error.localizedDescription; + + if (error.localizedRecoverySuggestion) { + *message = error.localizedRecoverySuggestion; + } else { + *message = error.localizedFailureReason; + } + } else if (error.localizedDescription) { + *title = NSLocalizedStringFromTable(@"Error", @"AFNetworking", @"Fallback Error Description"); + *message = error.localizedDescription; + } else { + *title = NSLocalizedStringFromTable(@"Error", @"AFNetworking", @"Fallback Error Description"); + *message = [NSString stringWithFormat:NSLocalizedStringFromTable(@"%@ Error: %ld", @"AFNetworking", @"Fallback Error Failure Reason Format"), error.domain, (long)error.code]; + } +} + +@implementation UIAlertView (AFNetworking) + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 ++ (void)showAlertViewForTaskWithErrorOnCompletion:(NSURLSessionTask *)task + delegate:(id)delegate +{ + [self showAlertViewForTaskWithErrorOnCompletion:task delegate:delegate cancelButtonTitle:NSLocalizedStringFromTable(@"Dismiss", @"AFNetworking", @"UIAlertView Cancel Button Title") otherButtonTitles:nil, nil]; +} + ++ (void)showAlertViewForTaskWithErrorOnCompletion:(NSURLSessionTask *)task + delegate:(id)delegate + cancelButtonTitle:(NSString *)cancelButtonTitle + otherButtonTitles:(NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION +{ + NSMutableArray *mutableOtherTitles = [NSMutableArray array]; + va_list otherButtonTitleList; + va_start(otherButtonTitleList, otherButtonTitles); + { + for (NSString *otherButtonTitle = otherButtonTitles; otherButtonTitle != nil; otherButtonTitle = va_arg(otherButtonTitleList, NSString *)) { + [mutableOtherTitles addObject:otherButtonTitle]; + } + } + va_end(otherButtonTitleList); + + __block __weak id observer = [[NSNotificationCenter defaultCenter] addObserverForName:AFNetworkingTaskDidCompleteNotification object:task queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notification) { + NSError *error = notification.userInfo[AFNetworkingTaskDidCompleteErrorKey]; + if (error) { + NSString *title, *message; + AFGetAlertViewTitleAndMessageFromError(error, &title, &message); + + UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:nil message:nil delegate:delegate cancelButtonTitle:cancelButtonTitle otherButtonTitles:nil, nil]; + for (NSString *otherButtonTitle in mutableOtherTitles) { + [alertView addButtonWithTitle:otherButtonTitle]; + } + [alertView setTitle:title]; + [alertView setMessage:message]; + [alertView show]; + } + + [[NSNotificationCenter defaultCenter] removeObserver:observer]; + }]; +} +#endif + +#pragma mark - + ++ (void)showAlertViewForRequestOperationWithErrorOnCompletion:(AFURLConnectionOperation *)operation + delegate:(id)delegate +{ + [self showAlertViewForRequestOperationWithErrorOnCompletion:operation delegate:delegate cancelButtonTitle:NSLocalizedStringFromTable(@"Dismiss", @"AFNetworking", @"UIAlertView Cancel Button Title") otherButtonTitles:nil, nil]; +} + ++ (void)showAlertViewForRequestOperationWithErrorOnCompletion:(AFURLConnectionOperation *)operation + delegate:(id)delegate + cancelButtonTitle:(NSString *)cancelButtonTitle + otherButtonTitles:(NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION +{ + NSMutableArray *mutableOtherTitles = [NSMutableArray array]; + va_list otherButtonTitleList; + va_start(otherButtonTitleList, otherButtonTitles); + { + for (NSString *otherButtonTitle = otherButtonTitles; otherButtonTitle != nil; otherButtonTitle = va_arg(otherButtonTitleList, NSString *)) { + [mutableOtherTitles addObject:otherButtonTitle]; + } + } + va_end(otherButtonTitleList); + + __block __weak id observer = [[NSNotificationCenter defaultCenter] addObserverForName:AFNetworkingOperationDidFinishNotification object:operation queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notification) { + + if (notification.object && [notification.object isKindOfClass:[AFURLConnectionOperation class]]) { + NSError *error = [(AFURLConnectionOperation *)notification.object error]; + if (error) { + NSString *title, *message; + AFGetAlertViewTitleAndMessageFromError(error, &title, &message); + + UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:nil message:nil delegate:delegate cancelButtonTitle:cancelButtonTitle otherButtonTitles:nil, nil]; + for (NSString *otherButtonTitle in mutableOtherTitles) { + [alertView addButtonWithTitle:otherButtonTitle]; + } + [alertView setTitle:title]; + [alertView setMessage:message]; + [alertView show]; + } + } + + [[NSNotificationCenter defaultCenter] removeObserver:observer]; + }]; +} + +@end + +#endif diff --git a/Pods/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h b/Pods/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h new file mode 100644 index 0000000..327bdab --- /dev/null +++ b/Pods/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h @@ -0,0 +1,184 @@ +// UIButton+AFNetworking.h +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#import + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + +#import + +NS_ASSUME_NONNULL_BEGIN + +@protocol AFURLResponseSerialization, AFImageCache; + +/** + This category adds methods to the UIKit framework's `UIButton` class. The methods in this category provide support for loading remote images and background images asynchronously from a URL. + + @warning Compound values for control `state` (such as `UIControlStateHighlighted | UIControlStateDisabled`) are unsupported. + */ +@interface UIButton (AFNetworking) + +///---------------------------- +/// @name Accessing Image Cache +///---------------------------- + +/** + The image cache used to improve image loading performance on scroll views. By default, `UIButton` will use the `sharedImageCache` of `UIImageView`. + */ ++ (id )sharedImageCache; + +/** + Set the cache used for image loading. + + @param imageCache The image cache. + */ ++ (void)setSharedImageCache:(id )imageCache; + +///------------------------------------ +/// @name Accessing Response Serializer +///------------------------------------ + +/** + The response serializer used to create an image representation from the server response and response data. By default, this is an instance of `AFImageResponseSerializer`. + + @discussion Subclasses of `AFImageResponseSerializer` could be used to perform post-processing, such as color correction, face detection, or other effects. See https://github.com/AFNetworking/AFCoreImageSerializer + */ +@property (nonatomic, strong) id imageResponseSerializer; + +///-------------------- +/// @name Setting Image +///-------------------- + +/** + Asynchronously downloads an image from the specified URL, and sets it as the image for the specified state once the request is finished. Any previous image request for the receiver will be cancelled. + + If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished. + + @param state The control state. + @param url The URL used for the image request. + */ +- (void)setImageForState:(UIControlState)state + withURL:(NSURL *)url; + +/** + Asynchronously downloads an image from the specified URL, and sets it as the image for the specified state once the request is finished. Any previous image request for the receiver will be cancelled. + + If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished. + + @param state The control state. + @param url The URL used for the image request. + @param placeholderImage The image to be set initially, until the image request finishes. If `nil`, the button will not change its image until the image request finishes. + */ +- (void)setImageForState:(UIControlState)state + withURL:(NSURL *)url + placeholderImage:(nullable UIImage *)placeholderImage; + +/** + Asynchronously downloads an image from the specified URL request, and sets it as the image for the specified state once the request is finished. Any previous image request for the receiver will be cancelled. + + If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished. + + If a success block is specified, it is the responsibility of the block to set the image of the button before returning. If no success block is specified, the default behavior of setting the image with `setImage:forState:` is applied. + + @param state The control state. + @param urlRequest The URL request used for the image request. + @param placeholderImage The image to be set initially, until the image request finishes. If `nil`, the button will not change its image until the image request finishes. + @param success A block to be executed when the image request operation finishes successfully. This block has no return value and takes two arguments: the server response and the image. If the image was returned from cache, the request and response parameters will be `nil`. + @param failure A block object to be executed when the image request operation finishes unsuccessfully, or that finishes successfully. This block has no return value and takes a single argument: the error that occurred. + */ +- (void)setImageForState:(UIControlState)state + withURLRequest:(NSURLRequest *)urlRequest + placeholderImage:(nullable UIImage *)placeholderImage + success:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success + failure:(nullable void (^)(NSError *error))failure; + + +///------------------------------- +/// @name Setting Background Image +///------------------------------- + +/** + Asynchronously downloads an image from the specified URL, and sets it as the background image for the specified state once the request is finished. Any previous background image request for the receiver will be cancelled. + + If the background image is cached locally, the background image is set immediately, otherwise the specified placeholder background image will be set immediately, and then the remote background image will be set once the request is finished. + + @param state The control state. + @param url The URL used for the background image request. + */ +- (void)setBackgroundImageForState:(UIControlState)state + withURL:(NSURL *)url; + +/** + Asynchronously downloads an image from the specified URL, and sets it as the background image for the specified state once the request is finished. Any previous image request for the receiver will be cancelled. + + If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished. + + @param state The control state. + @param url The URL used for the background image request. + @param placeholderImage The background image to be set initially, until the background image request finishes. If `nil`, the button will not change its background image until the background image request finishes. + */ +- (void)setBackgroundImageForState:(UIControlState)state + withURL:(NSURL *)url + placeholderImage:(nullable UIImage *)placeholderImage; + +/** + Asynchronously downloads an image from the specified URL request, and sets it as the image for the specified state once the request is finished. Any previous image request for the receiver will be cancelled. + + If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished. + + If a success block is specified, it is the responsibility of the block to set the image of the button before returning. If no success block is specified, the default behavior of setting the image with `setBackgroundImage:forState:` is applied. + + @param state The control state. + @param urlRequest The URL request used for the image request. + @param placeholderImage The background image to be set initially, until the background image request finishes. If `nil`, the button will not change its background image until the background image request finishes. + */ +- (void)setBackgroundImageForState:(UIControlState)state + withURLRequest:(NSURLRequest *)urlRequest + placeholderImage:(nullable UIImage *)placeholderImage + success:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success + failure:(nullable void (^)(NSError *error))failure; + + +///------------------------------ +/// @name Canceling Image Loading +///------------------------------ + +/** + Cancels any executing image operation for the specified control state of the receiver, if one exists. + + @param state The control state. + */ +- (void)cancelImageRequestOperationForState:(UIControlState)state; + +/** + Cancels any executing background image operation for the specified control state of the receiver, if one exists. + + @param state The control state. + */ +- (void)cancelBackgroundImageRequestOperationForState:(UIControlState)state; + +@end + +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.m b/Pods/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.m new file mode 100644 index 0000000..f34631e --- /dev/null +++ b/Pods/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.m @@ -0,0 +1,293 @@ +// UIButton+AFNetworking.m +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "UIButton+AFNetworking.h" + +#import + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + +#import "AFURLResponseSerialization.h" +#import "AFHTTPRequestOperation.h" + +#import "UIImageView+AFNetworking.h" + +@interface UIButton (_AFNetworking) +@end + +@implementation UIButton (_AFNetworking) + ++ (NSOperationQueue *)af_sharedImageRequestOperationQueue { + static NSOperationQueue *_af_sharedImageRequestOperationQueue = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + _af_sharedImageRequestOperationQueue = [[NSOperationQueue alloc] init]; + _af_sharedImageRequestOperationQueue.maxConcurrentOperationCount = NSOperationQueueDefaultMaxConcurrentOperationCount; + }); + + return _af_sharedImageRequestOperationQueue; +} + +#pragma mark - + +static char AFImageRequestOperationNormal; +static char AFImageRequestOperationHighlighted; +static char AFImageRequestOperationSelected; +static char AFImageRequestOperationDisabled; + +static const char * af_imageRequestOperationKeyForState(UIControlState state) { + switch (state) { + case UIControlStateHighlighted: + return &AFImageRequestOperationHighlighted; + case UIControlStateSelected: + return &AFImageRequestOperationSelected; + case UIControlStateDisabled: + return &AFImageRequestOperationDisabled; + case UIControlStateNormal: + default: + return &AFImageRequestOperationNormal; + } +} + +- (AFHTTPRequestOperation *)af_imageRequestOperationForState:(UIControlState)state { + return (AFHTTPRequestOperation *)objc_getAssociatedObject(self, af_imageRequestOperationKeyForState(state)); +} + +- (void)af_setImageRequestOperation:(AFHTTPRequestOperation *)imageRequestOperation + forState:(UIControlState)state +{ + objc_setAssociatedObject(self, af_imageRequestOperationKeyForState(state), imageRequestOperation, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +#pragma mark - + +static char AFBackgroundImageRequestOperationNormal; +static char AFBackgroundImageRequestOperationHighlighted; +static char AFBackgroundImageRequestOperationSelected; +static char AFBackgroundImageRequestOperationDisabled; + +static const char * af_backgroundImageRequestOperationKeyForState(UIControlState state) { + switch (state) { + case UIControlStateHighlighted: + return &AFBackgroundImageRequestOperationHighlighted; + case UIControlStateSelected: + return &AFBackgroundImageRequestOperationSelected; + case UIControlStateDisabled: + return &AFBackgroundImageRequestOperationDisabled; + case UIControlStateNormal: + default: + return &AFBackgroundImageRequestOperationNormal; + } +} + +- (AFHTTPRequestOperation *)af_backgroundImageRequestOperationForState:(UIControlState)state { + return (AFHTTPRequestOperation *)objc_getAssociatedObject(self, af_backgroundImageRequestOperationKeyForState(state)); +} + +- (void)af_setBackgroundImageRequestOperation:(AFHTTPRequestOperation *)imageRequestOperation + forState:(UIControlState)state +{ + objc_setAssociatedObject(self, af_backgroundImageRequestOperationKeyForState(state), imageRequestOperation, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +@end + +#pragma mark - + +@implementation UIButton (AFNetworking) + ++ (id )sharedImageCache { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu" + return objc_getAssociatedObject(self, @selector(sharedImageCache)) ?: [UIImageView sharedImageCache]; +#pragma clang diagnostic pop +} + ++ (void)setSharedImageCache:(id )imageCache { + objc_setAssociatedObject(self, @selector(sharedImageCache), imageCache, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +#pragma mark - + +- (id )imageResponseSerializer { + static id _af_defaultImageResponseSerializer = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + _af_defaultImageResponseSerializer = [AFImageResponseSerializer serializer]; + }); + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu" + return objc_getAssociatedObject(self, @selector(imageResponseSerializer)) ?: _af_defaultImageResponseSerializer; +#pragma clang diagnostic pop +} + +- (void)setImageResponseSerializer:(id )serializer { + objc_setAssociatedObject(self, @selector(imageResponseSerializer), serializer, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +#pragma mark - + +- (void)setImageForState:(UIControlState)state + withURL:(NSURL *)url +{ + [self setImageForState:state withURL:url placeholderImage:nil]; +} + +- (void)setImageForState:(UIControlState)state + withURL:(NSURL *)url + placeholderImage:(UIImage *)placeholderImage +{ + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; + [request addValue:@"image/*" forHTTPHeaderField:@"Accept"]; + + [self setImageForState:state withURLRequest:request placeholderImage:placeholderImage success:nil failure:nil]; +} + +- (void)setImageForState:(UIControlState)state + withURLRequest:(NSURLRequest *)urlRequest + placeholderImage:(UIImage *)placeholderImage + success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success + failure:(void (^)(NSError *error))failure +{ + [self cancelImageRequestOperationForState:state]; + + UIImage *cachedImage = [[[self class] sharedImageCache] cachedImageForRequest:urlRequest]; + if (cachedImage) { + if (success) { + success(nil, nil, cachedImage); + } else { + [self setImage:cachedImage forState:state]; + } + + [self af_setImageRequestOperation:nil forState:state]; + } else { + if (placeholderImage) { + [self setImage:placeholderImage forState:state]; + } + + __weak __typeof(self)weakSelf = self; + AFHTTPRequestOperation *imageRequestOperation = [[AFHTTPRequestOperation alloc] initWithRequest:urlRequest]; + imageRequestOperation.responseSerializer = self.imageResponseSerializer; + [imageRequestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { + __strong __typeof(weakSelf)strongSelf = weakSelf; + if ([[urlRequest URL] isEqual:[operation.request URL]]) { + if (success) { + success(operation.request, operation.response, responseObject); + } else if (responseObject) { + [strongSelf setImage:responseObject forState:state]; + } + } + [[[strongSelf class] sharedImageCache] cacheImage:responseObject forRequest:urlRequest]; + } failure:^(AFHTTPRequestOperation *operation, NSError *error) { + if ([[urlRequest URL] isEqual:[operation.request URL]]) { + if (failure) { + failure(error); + } + } + }]; + + [self af_setImageRequestOperation:imageRequestOperation forState:state]; + [[[self class] af_sharedImageRequestOperationQueue] addOperation:imageRequestOperation]; + } +} + +#pragma mark - + +- (void)setBackgroundImageForState:(UIControlState)state + withURL:(NSURL *)url +{ + [self setBackgroundImageForState:state withURL:url placeholderImage:nil]; +} + +- (void)setBackgroundImageForState:(UIControlState)state + withURL:(NSURL *)url + placeholderImage:(UIImage *)placeholderImage +{ + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; + [request addValue:@"image/*" forHTTPHeaderField:@"Accept"]; + + [self setBackgroundImageForState:state withURLRequest:request placeholderImage:placeholderImage success:nil failure:nil]; +} + +- (void)setBackgroundImageForState:(UIControlState)state + withURLRequest:(NSURLRequest *)urlRequest + placeholderImage:(UIImage *)placeholderImage + success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success + failure:(void (^)(NSError *error))failure +{ + [self cancelBackgroundImageRequestOperationForState:state]; + + UIImage *cachedImage = [[[self class] sharedImageCache] cachedImageForRequest:urlRequest]; + if (cachedImage) { + if (success) { + success(nil, nil, cachedImage); + } else { + [self setBackgroundImage:cachedImage forState:state]; + } + + [self af_setBackgroundImageRequestOperation:nil forState:state]; + } else { + if (placeholderImage) { + [self setBackgroundImage:placeholderImage forState:state]; + } + + __weak __typeof(self)weakSelf = self; + AFHTTPRequestOperation *backgroundImageRequestOperation = [[AFHTTPRequestOperation alloc] initWithRequest:urlRequest]; + backgroundImageRequestOperation.responseSerializer = self.imageResponseSerializer; + [backgroundImageRequestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { + __strong __typeof(weakSelf)strongSelf = weakSelf; + if ([[urlRequest URL] isEqual:[operation.request URL]]) { + if (success) { + success(operation.request, operation.response, responseObject); + } else if (responseObject) { + [strongSelf setBackgroundImage:responseObject forState:state]; + } + } + [[[strongSelf class] sharedImageCache] cacheImage:responseObject forRequest:urlRequest]; + } failure:^(AFHTTPRequestOperation *operation, NSError *error) { + if ([[urlRequest URL] isEqual:[operation.request URL]]) { + if (failure) { + failure(error); + } + } + }]; + + [self af_setBackgroundImageRequestOperation:backgroundImageRequestOperation forState:state]; + [[[self class] af_sharedImageRequestOperationQueue] addOperation:backgroundImageRequestOperation]; + } +} + +#pragma mark - + +- (void)cancelImageRequestOperationForState:(UIControlState)state { + [[self af_imageRequestOperationForState:state] cancel]; + [self af_setImageRequestOperation:nil forState:state]; +} + +- (void)cancelBackgroundImageRequestOperationForState:(UIControlState)state { + [[self af_backgroundImageRequestOperationForState:state] cancel]; + [self af_setBackgroundImageRequestOperation:nil forState:state]; +} + +@end + +#endif diff --git a/Pods/AFNetworking/UIKit+AFNetworking/UIImage+AFNetworking.h b/Pods/AFNetworking/UIKit+AFNetworking/UIImage+AFNetworking.h new file mode 100644 index 0000000..3292920 --- /dev/null +++ b/Pods/AFNetworking/UIKit+AFNetworking/UIImage+AFNetworking.h @@ -0,0 +1,35 @@ +// +// UIImage+AFNetworking.h +// +// +// Created by Paulo Ferreira on 08/07/15. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + +#import + +@interface UIImage (AFNetworking) + ++ (UIImage*) safeImageWithData:(NSData*)data; + +@end + +#endif diff --git a/Pods/AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h b/Pods/AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h new file mode 100644 index 0000000..e33d8a0 --- /dev/null +++ b/Pods/AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h @@ -0,0 +1,146 @@ +// UIImageView+AFNetworking.h +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#import + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + +#import + +NS_ASSUME_NONNULL_BEGIN + +@protocol AFURLResponseSerialization, AFImageCache; + +/** + This category adds methods to the UIKit framework's `UIImageView` class. The methods in this category provide support for loading remote images asynchronously from a URL. + */ +@interface UIImageView (AFNetworking) + +///---------------------------- +/// @name Accessing Image Cache +///---------------------------- + +/** + The image cache used to improve image loading performance on scroll views. By default, this is an `NSCache` subclass conforming to the `AFImageCache` protocol, which listens for notification warnings and evicts objects accordingly. +*/ ++ (id )sharedImageCache; + +/** + Set the cache used for image loading. + + @param imageCache The image cache. + */ ++ (void)setSharedImageCache:(id )imageCache; + +///------------------------------------ +/// @name Accessing Response Serializer +///------------------------------------ + +/** + The response serializer used to create an image representation from the server response and response data. By default, this is an instance of `AFImageResponseSerializer`. + + @discussion Subclasses of `AFImageResponseSerializer` could be used to perform post-processing, such as color correction, face detection, or other effects. See https://github.com/AFNetworking/AFCoreImageSerializer + */ +@property (nonatomic, strong) id imageResponseSerializer; + +///-------------------- +/// @name Setting Image +///-------------------- + +/** + Asynchronously downloads an image from the specified URL, and sets it once the request is finished. Any previous image request for the receiver will be cancelled. + + If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished. + + By default, URL requests have a `Accept` header field value of "image / *", a cache policy of `NSURLCacheStorageAllowed` and a timeout interval of 30 seconds, and are set not handle cookies. To configure URL requests differently, use `setImageWithURLRequest:placeholderImage:success:failure:` + + @param url The URL used for the image request. + */ +- (void)setImageWithURL:(NSURL *)url; + +/** + Asynchronously downloads an image from the specified URL, and sets it once the request is finished. Any previous image request for the receiver will be cancelled. + + If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished. + + By default, URL requests have a `Accept` header field value of "image / *", a cache policy of `NSURLCacheStorageAllowed` and a timeout interval of 30 seconds, and are set not handle cookies. To configure URL requests differently, use `setImageWithURLRequest:placeholderImage:success:failure:` + + @param url The URL used for the image request. + @param placeholderImage The image to be set initially, until the image request finishes. If `nil`, the image view will not change its image until the image request finishes. + */ +- (void)setImageWithURL:(NSURL *)url + placeholderImage:(nullable UIImage *)placeholderImage; + +/** + Asynchronously downloads an image from the specified URL request, and sets it once the request is finished. Any previous image request for the receiver will be cancelled. + + If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished. + + If a success block is specified, it is the responsibility of the block to set the image of the image view before returning. If no success block is specified, the default behavior of setting the image with `self.image = image` is applied. + + @param urlRequest The URL request used for the image request. + @param placeholderImage The image to be set initially, until the image request finishes. If `nil`, the image view will not change its image until the image request finishes. + @param success A block to be executed when the image request operation finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the image created from the response data of request. If the image was returned from cache, the response parameter will be `nil`. + @param failure A block object to be executed when the image request operation finishes unsuccessfully, or that finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the error object describing the network or parsing error that occurred. + */ +- (void)setImageWithURLRequest:(NSURLRequest *)urlRequest + placeholderImage:(nullable UIImage *)placeholderImage + success:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success + failure:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure; + +/** + Cancels any executing image operation for the receiver, if one exists. + */ +- (void)cancelImageRequestOperation; + +@end + +#pragma mark - + +/** + The `AFImageCache` protocol is adopted by an object used to cache images loaded by the AFNetworking category on `UIImageView`. + */ +@protocol AFImageCache + +/** + Returns a cached image for the specified request, if available. + + @param request The image request. + + @return The cached image. + */ +- (nullable UIImage *)cachedImageForRequest:(NSURLRequest *)request; + +/** + Caches a particular image for the specified request. + + @param image The image to cache. + @param request The request to be used as a cache key. + */ +- (void)cacheImage:(UIImage *)image + forRequest:(NSURLRequest *)request; +@end + +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.m b/Pods/AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.m new file mode 100644 index 0000000..c1b0e1b --- /dev/null +++ b/Pods/AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.m @@ -0,0 +1,215 @@ +// UIImageView+AFNetworking.m +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "UIImageView+AFNetworking.h" + +#import + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + +#import "AFHTTPRequestOperation.h" + +@interface AFImageCache : NSCache +@end + +#pragma mark - + +@interface UIImageView (_AFNetworking) +@property (readwrite, nonatomic, strong, setter = af_setImageRequestOperation:) AFHTTPRequestOperation *af_imageRequestOperation; +@end + +@implementation UIImageView (_AFNetworking) + ++ (NSOperationQueue *)af_sharedImageRequestOperationQueue { + static NSOperationQueue *_af_sharedImageRequestOperationQueue = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + _af_sharedImageRequestOperationQueue = [[NSOperationQueue alloc] init]; + _af_sharedImageRequestOperationQueue.maxConcurrentOperationCount = NSOperationQueueDefaultMaxConcurrentOperationCount; + }); + + return _af_sharedImageRequestOperationQueue; +} + +- (AFHTTPRequestOperation *)af_imageRequestOperation { + return (AFHTTPRequestOperation *)objc_getAssociatedObject(self, @selector(af_imageRequestOperation)); +} + +- (void)af_setImageRequestOperation:(AFHTTPRequestOperation *)imageRequestOperation { + objc_setAssociatedObject(self, @selector(af_imageRequestOperation), imageRequestOperation, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +@end + +#pragma mark - + +@implementation UIImageView (AFNetworking) +@dynamic imageResponseSerializer; + ++ (id )sharedImageCache { + static AFImageCache *_af_defaultImageCache = nil; + static dispatch_once_t oncePredicate; + dispatch_once(&oncePredicate, ^{ + _af_defaultImageCache = [[AFImageCache alloc] init]; + + [[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationDidReceiveMemoryWarningNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification * __unused notification) { + [_af_defaultImageCache removeAllObjects]; + }]; + }); + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu" + return objc_getAssociatedObject(self, @selector(sharedImageCache)) ?: _af_defaultImageCache; +#pragma clang diagnostic pop +} + ++ (void)setSharedImageCache:(id )imageCache { + objc_setAssociatedObject(self, @selector(sharedImageCache), imageCache, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +#pragma mark - + +- (id )imageResponseSerializer { + static id _af_defaultImageResponseSerializer = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + _af_defaultImageResponseSerializer = [AFImageResponseSerializer serializer]; + }); + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu" + return objc_getAssociatedObject(self, @selector(imageResponseSerializer)) ?: _af_defaultImageResponseSerializer; +#pragma clang diagnostic pop +} + +- (void)setImageResponseSerializer:(id )serializer { + objc_setAssociatedObject(self, @selector(imageResponseSerializer), serializer, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +#pragma mark - + +- (void)setImageWithURL:(NSURL *)url { + [self setImageWithURL:url placeholderImage:nil]; +} + +- (void)setImageWithURL:(NSURL *)url + placeholderImage:(UIImage *)placeholderImage +{ + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; + [request addValue:@"image/*" forHTTPHeaderField:@"Accept"]; + + [self setImageWithURLRequest:request placeholderImage:placeholderImage success:nil failure:nil]; +} + +- (void)setImageWithURLRequest:(NSURLRequest *)urlRequest + placeholderImage:(UIImage *)placeholderImage + success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success + failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure +{ + [self cancelImageRequestOperation]; + + UIImage *cachedImage = [[[self class] sharedImageCache] cachedImageForRequest:urlRequest]; + if (cachedImage) { + if (success) { + success(urlRequest, nil, cachedImage); + } else { + self.image = cachedImage; + } + + self.af_imageRequestOperation = nil; + } else { + if (placeholderImage) { + self.image = placeholderImage; + } + + __weak __typeof(self)weakSelf = self; + self.af_imageRequestOperation = [[AFHTTPRequestOperation alloc] initWithRequest:urlRequest]; + self.af_imageRequestOperation.responseSerializer = self.imageResponseSerializer; + [self.af_imageRequestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { + __strong __typeof(weakSelf)strongSelf = weakSelf; + if ([[urlRequest URL] isEqual:[strongSelf.af_imageRequestOperation.request URL]]) { + if (success) { + success(urlRequest, operation.response, responseObject); + } else if (responseObject) { + strongSelf.image = responseObject; + } + + if (operation == strongSelf.af_imageRequestOperation){ + strongSelf.af_imageRequestOperation = nil; + } + } + + [[[strongSelf class] sharedImageCache] cacheImage:responseObject forRequest:urlRequest]; + } failure:^(AFHTTPRequestOperation *operation, NSError *error) { + __strong __typeof(weakSelf)strongSelf = weakSelf; + if ([[urlRequest URL] isEqual:[strongSelf.af_imageRequestOperation.request URL]]) { + if (failure) { + failure(urlRequest, operation.response, error); + } + + if (operation == strongSelf.af_imageRequestOperation){ + strongSelf.af_imageRequestOperation = nil; + } + } + }]; + + [[[self class] af_sharedImageRequestOperationQueue] addOperation:self.af_imageRequestOperation]; + } +} + +- (void)cancelImageRequestOperation { + [self.af_imageRequestOperation cancel]; + self.af_imageRequestOperation = nil; +} + +@end + +#pragma mark - + +static inline NSString * AFImageCacheKeyFromURLRequest(NSURLRequest *request) { + return [[request URL] absoluteString]; +} + +@implementation AFImageCache + +- (UIImage *)cachedImageForRequest:(NSURLRequest *)request { + switch ([request cachePolicy]) { + case NSURLRequestReloadIgnoringCacheData: + case NSURLRequestReloadIgnoringLocalAndRemoteCacheData: + return nil; + default: + break; + } + + return [self objectForKey:AFImageCacheKeyFromURLRequest(request)]; +} + +- (void)cacheImage:(UIImage *)image + forRequest:(NSURLRequest *)request +{ + if (image && request) { + [self setObject:image forKey:AFImageCacheKeyFromURLRequest(request)]; + } +} + +@end + +#endif diff --git a/Pods/AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h b/Pods/AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h new file mode 100644 index 0000000..49850ed --- /dev/null +++ b/Pods/AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h @@ -0,0 +1,39 @@ +// UIKit+AFNetworking.h +// +// Copyright (c) 2013 AFNetworking (http://afnetworking.com/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#if TARGET_OS_IOS +#import + +#ifndef _UIKIT_AFNETWORKING_ + #define _UIKIT_AFNETWORKING_ + + #import "AFNetworkActivityIndicatorManager.h" + + #import "UIActivityIndicatorView+AFNetworking.h" + #import "UIAlertView+AFNetworking.h" + #import "UIButton+AFNetworking.h" + #import "UIImageView+AFNetworking.h" + #import "UIProgressView+AFNetworking.h" + #import "UIRefreshControl+AFNetworking.h" + #import "UIWebView+AFNetworking.h" +#endif /* _UIKIT_AFNETWORKING_ */ +#endif diff --git a/Pods/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h b/Pods/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h new file mode 100644 index 0000000..5c00d6d --- /dev/null +++ b/Pods/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h @@ -0,0 +1,91 @@ +// UIProgressView+AFNetworking.h +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#import + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class AFURLConnectionOperation; + +/** + This category adds methods to the UIKit framework's `UIProgressView` class. The methods in this category provide support for binding the progress to the upload and download progress of a session task or request operation. + */ +@interface UIProgressView (AFNetworking) + +///------------------------------------ +/// @name Setting Session Task Progress +///------------------------------------ + +/** + Binds the progress to the upload progress of the specified session task. + + @param task The session task. + @param animated `YES` if the change should be animated, `NO` if the change should happen immediately. + */ +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 +- (void)setProgressWithUploadProgressOfTask:(NSURLSessionUploadTask *)task + animated:(BOOL)animated; +#endif + +/** + Binds the progress to the download progress of the specified session task. + + @param task The session task. + @param animated `YES` if the change should be animated, `NO` if the change should happen immediately. + */ +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 +- (void)setProgressWithDownloadProgressOfTask:(NSURLSessionDownloadTask *)task + animated:(BOOL)animated; +#endif + +///------------------------------------ +/// @name Setting Session Task Progress +///------------------------------------ + +/** + Binds the progress to the upload progress of the specified request operation. + + @param operation The request operation. + @param animated `YES` if the change should be animated, `NO` if the change should happen immediately. + */ +- (void)setProgressWithUploadProgressOfOperation:(AFURLConnectionOperation *)operation + animated:(BOOL)animated; + +/** + Binds the progress to the download progress of the specified request operation. + + @param operation The request operation. + @param animated `YES` if the change should be animated, `NO` if the change should happen immediately. + */ +- (void)setProgressWithDownloadProgressOfOperation:(AFURLConnectionOperation *)operation + animated:(BOOL)animated; + +@end + +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.m b/Pods/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.m new file mode 100644 index 0000000..ad2c280 --- /dev/null +++ b/Pods/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.m @@ -0,0 +1,182 @@ +// UIProgressView+AFNetworking.m +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "UIProgressView+AFNetworking.h" + +#import + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + +#import "AFURLConnectionOperation.h" + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 +#import "AFURLSessionManager.h" +#endif + +static void * AFTaskCountOfBytesSentContext = &AFTaskCountOfBytesSentContext; +static void * AFTaskCountOfBytesReceivedContext = &AFTaskCountOfBytesReceivedContext; + +@interface AFURLConnectionOperation (_UIProgressView) +@property (readwrite, nonatomic, copy) void (^uploadProgress)(NSUInteger bytes, long long totalBytes, long long totalBytesExpected); +@property (readwrite, nonatomic, assign, setter = af_setUploadProgressAnimated:) BOOL af_uploadProgressAnimated; + +@property (readwrite, nonatomic, copy) void (^downloadProgress)(NSUInteger bytes, long long totalBytes, long long totalBytesExpected); +@property (readwrite, nonatomic, assign, setter = af_setDownloadProgressAnimated:) BOOL af_downloadProgressAnimated; +@end + +@implementation AFURLConnectionOperation (_UIProgressView) +@dynamic uploadProgress; // Implemented in AFURLConnectionOperation +@dynamic af_uploadProgressAnimated; + +@dynamic downloadProgress; // Implemented in AFURLConnectionOperation +@dynamic af_downloadProgressAnimated; +@end + +#pragma mark - + +@implementation UIProgressView (AFNetworking) + +- (BOOL)af_uploadProgressAnimated { + return [(NSNumber *)objc_getAssociatedObject(self, @selector(af_uploadProgressAnimated)) boolValue]; +} + +- (void)af_setUploadProgressAnimated:(BOOL)animated { + objc_setAssociatedObject(self, @selector(af_uploadProgressAnimated), @(animated), OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +- (BOOL)af_downloadProgressAnimated { + return [(NSNumber *)objc_getAssociatedObject(self, @selector(af_downloadProgressAnimated)) boolValue]; +} + +- (void)af_setDownloadProgressAnimated:(BOOL)animated { + objc_setAssociatedObject(self, @selector(af_downloadProgressAnimated), @(animated), OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +#pragma mark - + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 +- (void)setProgressWithUploadProgressOfTask:(NSURLSessionUploadTask *)task + animated:(BOOL)animated +{ + [task addObserver:self forKeyPath:@"state" options:(NSKeyValueObservingOptions)0 context:AFTaskCountOfBytesSentContext]; + [task addObserver:self forKeyPath:@"countOfBytesSent" options:(NSKeyValueObservingOptions)0 context:AFTaskCountOfBytesSentContext]; + + [self af_setUploadProgressAnimated:animated]; +} + +- (void)setProgressWithDownloadProgressOfTask:(NSURLSessionDownloadTask *)task + animated:(BOOL)animated +{ + [task addObserver:self forKeyPath:@"state" options:(NSKeyValueObservingOptions)0 context:AFTaskCountOfBytesReceivedContext]; + [task addObserver:self forKeyPath:@"countOfBytesReceived" options:(NSKeyValueObservingOptions)0 context:AFTaskCountOfBytesReceivedContext]; + + [self af_setDownloadProgressAnimated:animated]; +} +#endif + +#pragma mark - + +- (void)setProgressWithUploadProgressOfOperation:(AFURLConnectionOperation *)operation + animated:(BOOL)animated +{ + __weak __typeof(self)weakSelf = self; + void (^original)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite) = [operation.uploadProgress copy]; + [operation setUploadProgressBlock:^(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite) { + if (original) { + original(bytesWritten, totalBytesWritten, totalBytesExpectedToWrite); + } + + dispatch_async(dispatch_get_main_queue(), ^{ + if (totalBytesExpectedToWrite > 0) { + __strong __typeof(weakSelf)strongSelf = weakSelf; + [strongSelf setProgress:(totalBytesWritten / (totalBytesExpectedToWrite * 1.0f)) animated:animated]; + } + }); + }]; +} + +- (void)setProgressWithDownloadProgressOfOperation:(AFURLConnectionOperation *)operation + animated:(BOOL)animated +{ + __weak __typeof(self)weakSelf = self; + void (^original)(NSUInteger bytesRead, long long totalBytesRead, long long totalBytesExpectedToRead) = [operation.downloadProgress copy]; + [operation setDownloadProgressBlock:^(NSUInteger bytesRead, long long totalBytesRead, long long totalBytesExpectedToRead) { + if (original) { + original(bytesRead, totalBytesRead, totalBytesExpectedToRead); + } + + dispatch_async(dispatch_get_main_queue(), ^{ + if (totalBytesExpectedToRead > 0) { + __strong __typeof(weakSelf)strongSelf = weakSelf; + [strongSelf setProgress:(totalBytesRead / (totalBytesExpectedToRead * 1.0f)) animated:animated]; + } + }); + }]; +} + +#pragma mark - NSKeyValueObserving + +- (void)observeValueForKeyPath:(NSString *)keyPath + ofObject:(id)object + change:(__unused NSDictionary *)change + context:(void *)context +{ +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 + if (context == AFTaskCountOfBytesSentContext || context == AFTaskCountOfBytesReceivedContext) { + if ([keyPath isEqualToString:NSStringFromSelector(@selector(countOfBytesSent))]) { + if ([object countOfBytesExpectedToSend] > 0) { + dispatch_async(dispatch_get_main_queue(), ^{ + [self setProgress:[object countOfBytesSent] / ([object countOfBytesExpectedToSend] * 1.0f) animated:self.af_uploadProgressAnimated]; + }); + } + } + + if ([keyPath isEqualToString:NSStringFromSelector(@selector(countOfBytesReceived))]) { + if ([object countOfBytesExpectedToReceive] > 0) { + dispatch_async(dispatch_get_main_queue(), ^{ + [self setProgress:[object countOfBytesReceived] / ([object countOfBytesExpectedToReceive] * 1.0f) animated:self.af_downloadProgressAnimated]; + }); + } + } + + if ([keyPath isEqualToString:NSStringFromSelector(@selector(state))]) { + if ([(NSURLSessionTask *)object state] == NSURLSessionTaskStateCompleted) { + @try { + [object removeObserver:self forKeyPath:NSStringFromSelector(@selector(state))]; + + if (context == AFTaskCountOfBytesSentContext) { + [object removeObserver:self forKeyPath:NSStringFromSelector(@selector(countOfBytesSent))]; + } + + if (context == AFTaskCountOfBytesReceivedContext) { + [object removeObserver:self forKeyPath:NSStringFromSelector(@selector(countOfBytesReceived))]; + } + } + @catch (NSException * __unused exception) {} + } + } + } +#endif +} + +@end + +#endif diff --git a/Pods/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h b/Pods/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h new file mode 100644 index 0000000..a65e390 --- /dev/null +++ b/Pods/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h @@ -0,0 +1,68 @@ +// UIRefreshControl+AFNetworking.m +// +// Copyright (c) 2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#import + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class AFURLConnectionOperation; + +/** + This category adds methods to the UIKit framework's `UIRefreshControl` class. The methods in this category provide support for automatically beginning and ending refreshing depending on the loading state of a request operation or session task. + */ +@interface UIRefreshControl (AFNetworking) + +///----------------------------------- +/// @name Refreshing for Session Tasks +///----------------------------------- + +/** + Binds the refreshing state to the state of the specified task. + + @param task The task. If `nil`, automatic updating from any previously specified operation will be disabled. + */ +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 +- (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task; +#endif + +///---------------------------------------- +/// @name Refreshing for Request Operations +///---------------------------------------- + +/** + Binds the refreshing state to the execution state of the specified operation. + + @param operation The operation. If `nil`, automatic updating from any previously specified operation will be disabled. + */ +- (void)setRefreshingWithStateOfOperation:(AFURLConnectionOperation *)operation; + +@end + +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.m b/Pods/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.m new file mode 100644 index 0000000..4c19245 --- /dev/null +++ b/Pods/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.m @@ -0,0 +1,166 @@ +// UIRefreshControl+AFNetworking.m +// +// Copyright (c) 2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "UIRefreshControl+AFNetworking.h" +#import + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + +#import "AFHTTPRequestOperation.h" + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 +#import "AFURLSessionManager.h" +#endif + +@interface AFRefreshControlNotificationObserver : NSObject +@property (readonly, nonatomic, weak) UIRefreshControl *refreshControl; +- (instancetype)initWithActivityRefreshControl:(UIRefreshControl *)refreshControl; + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 +- (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task; +#endif +- (void)setRefreshingWithStateOfOperation:(AFURLConnectionOperation *)operation; + +@end + +@implementation UIRefreshControl (AFNetworking) + +- (AFRefreshControlNotificationObserver *)af_notificationObserver { + AFRefreshControlNotificationObserver *notificationObserver = objc_getAssociatedObject(self, @selector(af_notificationObserver)); + if (notificationObserver == nil) { + notificationObserver = [[AFRefreshControlNotificationObserver alloc] initWithActivityRefreshControl:self]; + objc_setAssociatedObject(self, @selector(af_notificationObserver), notificationObserver, OBJC_ASSOCIATION_RETAIN_NONATOMIC); + } + return notificationObserver; +} + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 +- (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task { + [[self af_notificationObserver] setRefreshingWithStateOfTask:task]; +} +#endif + +- (void)setRefreshingWithStateOfOperation:(AFURLConnectionOperation *)operation { + [[self af_notificationObserver] setRefreshingWithStateOfOperation:operation]; +} + +@end + +@implementation AFRefreshControlNotificationObserver + +- (instancetype)initWithActivityRefreshControl:(UIRefreshControl *)refreshControl +{ + self = [super init]; + if (self) { + _refreshControl = refreshControl; + } + return self; +} + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 +- (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task { + NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; + + [notificationCenter removeObserver:self name:AFNetworkingTaskDidResumeNotification object:nil]; + [notificationCenter removeObserver:self name:AFNetworkingTaskDidSuspendNotification object:nil]; + [notificationCenter removeObserver:self name:AFNetworkingTaskDidCompleteNotification object:nil]; + + if (task) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreceiver-is-weak" +#pragma clang diagnostic ignored "-Warc-repeated-use-of-weak" + if (task.state == NSURLSessionTaskStateRunning) { + [self.refreshControl beginRefreshing]; + + [notificationCenter addObserver:self selector:@selector(af_beginRefreshing) name:AFNetworkingTaskDidResumeNotification object:task]; + [notificationCenter addObserver:self selector:@selector(af_endRefreshing) name:AFNetworkingTaskDidCompleteNotification object:task]; + [notificationCenter addObserver:self selector:@selector(af_endRefreshing) name:AFNetworkingTaskDidSuspendNotification object:task]; + } else { + [self.refreshControl endRefreshing]; + } +#pragma clang diagnostic pop + } +} +#endif + +- (void)setRefreshingWithStateOfOperation:(AFURLConnectionOperation *)operation { + NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; + + [notificationCenter removeObserver:self name:AFNetworkingOperationDidStartNotification object:nil]; + [notificationCenter removeObserver:self name:AFNetworkingOperationDidFinishNotification object:nil]; + + if (operation) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreceiver-is-weak" +#pragma clang diagnostic ignored "-Warc-repeated-use-of-weak" + if (![operation isFinished]) { + if ([operation isExecuting]) { + [self.refreshControl beginRefreshing]; + } else { + [self.refreshControl endRefreshing]; + } + + [notificationCenter addObserver:self selector:@selector(af_beginRefreshing) name:AFNetworkingOperationDidStartNotification object:operation]; + [notificationCenter addObserver:self selector:@selector(af_endRefreshing) name:AFNetworkingOperationDidFinishNotification object:operation]; + } +#pragma clang diagnostic pop + } +} + +#pragma mark - + +- (void)af_beginRefreshing { + dispatch_async(dispatch_get_main_queue(), ^{ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreceiver-is-weak" + [self.refreshControl beginRefreshing]; +#pragma clang diagnostic pop + }); +} + +- (void)af_endRefreshing { + dispatch_async(dispatch_get_main_queue(), ^{ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreceiver-is-weak" + [self.refreshControl endRefreshing]; +#pragma clang diagnostic pop + }); +} + +#pragma mark - + +- (void)dealloc { + NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 + [notificationCenter removeObserver:self name:AFNetworkingTaskDidCompleteNotification object:nil]; + [notificationCenter removeObserver:self name:AFNetworkingTaskDidResumeNotification object:nil]; + [notificationCenter removeObserver:self name:AFNetworkingTaskDidSuspendNotification object:nil]; +#endif + + [notificationCenter removeObserver:self name:AFNetworkingOperationDidStartNotification object:nil]; + [notificationCenter removeObserver:self name:AFNetworkingOperationDidFinishNotification object:nil]; +} + +@end + +#endif diff --git a/Pods/AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.h b/Pods/AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.h new file mode 100644 index 0000000..5d61d6a --- /dev/null +++ b/Pods/AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.h @@ -0,0 +1,86 @@ +// UIWebView+AFNetworking.h +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#import + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class AFHTTPRequestSerializer, AFHTTPResponseSerializer; +@protocol AFURLRequestSerialization, AFURLResponseSerialization; + +/** + This category adds methods to the UIKit framework's `UIWebView` class. The methods in this category provide increased control over the request cycle, including progress monitoring and success / failure handling. + + @discussion When using these category methods, make sure to assign `delegate` for the web view, which implements `–webView:shouldStartLoadWithRequest:navigationType:` appropriately. This allows for tapped links to be loaded through AFNetworking, and can ensure that `canGoBack` & `canGoForward` update their values correctly. + */ +@interface UIWebView (AFNetworking) + +/** + The request serializer used to serialize requests made with the `-loadRequest:...` category methods. By default, this is an instance of `AFHTTPRequestSerializer`. + */ +@property (nonatomic, strong) AFHTTPRequestSerializer * requestSerializer; + +/** + The response serializer used to serialize responses made with the `-loadRequest:...` category methods. By default, this is an instance of `AFHTTPResponseSerializer`. + */ +@property (nonatomic, strong) AFHTTPResponseSerializer * responseSerializer; + +/** + Asynchronously loads the specified request. + + @param request A URL request identifying the location of the content to load. This must not be `nil`. + @param progress A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes three arguments: the number of bytes read since the last time the download progress block was called, the total bytes read, and the total bytes expected to be read during the request, as initially determined by the expected content size of the `NSHTTPURLResponse` object. This block may be called multiple times, and will execute on the main thread. + @param success A block object to be executed when the request finishes loading successfully. This block returns the HTML string to be loaded by the web view, and takes two arguments: the response, and the response string. + @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a single argument: the error that occurred. + */ +- (void)loadRequest:(NSURLRequest *)request + progress:(nullable void (^)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite))progress + success:(nullable NSString * (^)(NSHTTPURLResponse *response, NSString *HTML))success + failure:(nullable void (^)(NSError *error))failure; + +/** + Asynchronously loads the data associated with a particular request with a specified MIME type and text encoding. + + @param request A URL request identifying the location of the content to load. This must not be `nil`. + @param MIMEType The MIME type of the content. Defaults to the content type of the response if not specified. + @param textEncodingName The IANA encoding name, as in `utf-8` or `utf-16`. Defaults to the response text encoding if not specified. + @param progress A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes three arguments: the number of bytes read since the last time the download progress block was called, the total bytes read, and the total bytes expected to be read during the request, as initially determined by the expected content size of the `NSHTTPURLResponse` object. This block may be called multiple times, and will execute on the main thread. + @param success A block object to be executed when the request finishes loading successfully. This block returns the data to be loaded by the web view and takes two arguments: the response, and the downloaded data. + @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a single argument: the error that occurred. + */ +- (void)loadRequest:(NSURLRequest *)request + MIMEType:(nullable NSString *)MIMEType + textEncodingName:(nullable NSString *)textEncodingName + progress:(nullable void (^)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite))progress + success:(nullable NSData * (^)(NSHTTPURLResponse *response, NSData *data))success + failure:(nullable void (^)(NSError *error))failure; + +@end + +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.m b/Pods/AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.m new file mode 100644 index 0000000..93eacaa --- /dev/null +++ b/Pods/AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.m @@ -0,0 +1,159 @@ +// UIWebView+AFNetworking.m +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "UIWebView+AFNetworking.h" + +#import + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + +#import "AFHTTPRequestOperation.h" +#import "AFURLResponseSerialization.h" +#import "AFURLRequestSerialization.h" + +@interface UIWebView (_AFNetworking) +@property (readwrite, nonatomic, strong, setter = af_setHTTPRequestOperation:) AFHTTPRequestOperation *af_HTTPRequestOperation; +@end + +@implementation UIWebView (_AFNetworking) + +- (AFHTTPRequestOperation *)af_HTTPRequestOperation { + return (AFHTTPRequestOperation *)objc_getAssociatedObject(self, @selector(af_HTTPRequestOperation)); +} + +- (void)af_setHTTPRequestOperation:(AFHTTPRequestOperation *)operation { + objc_setAssociatedObject(self, @selector(af_HTTPRequestOperation), operation, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +@end + +#pragma mark - + +@implementation UIWebView (AFNetworking) + +- (AFHTTPRequestSerializer *)requestSerializer { + static AFHTTPRequestSerializer *_af_defaultRequestSerializer = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + _af_defaultRequestSerializer = [AFHTTPRequestSerializer serializer]; + }); + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu" + return objc_getAssociatedObject(self, @selector(requestSerializer)) ?: _af_defaultRequestSerializer; +#pragma clang diagnostic pop +} + +- (void)setRequestSerializer:(AFHTTPRequestSerializer *)requestSerializer { + objc_setAssociatedObject(self, @selector(requestSerializer), requestSerializer, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +- (AFHTTPResponseSerializer *)responseSerializer { + static AFHTTPResponseSerializer *_af_defaultResponseSerializer = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + _af_defaultResponseSerializer = [AFHTTPResponseSerializer serializer]; + }); + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu" + return objc_getAssociatedObject(self, @selector(responseSerializer)) ?: _af_defaultResponseSerializer; +#pragma clang diagnostic pop +} + +- (void)setResponseSerializer:(AFHTTPResponseSerializer *)responseSerializer { + objc_setAssociatedObject(self, @selector(responseSerializer), responseSerializer, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +#pragma mark - + +- (void)loadRequest:(NSURLRequest *)request + progress:(void (^)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite))progress + success:(NSString * (^)(NSHTTPURLResponse *response, NSString *HTML))success + failure:(void (^)(NSError *error))failure +{ + [self loadRequest:request MIMEType:nil textEncodingName:nil progress:progress success:^NSData *(NSHTTPURLResponse *response, NSData *data) { + NSStringEncoding stringEncoding = NSUTF8StringEncoding; + if (response.textEncodingName) { + CFStringEncoding encoding = CFStringConvertIANACharSetNameToEncoding((CFStringRef)response.textEncodingName); + if (encoding != kCFStringEncodingInvalidId) { + stringEncoding = CFStringConvertEncodingToNSStringEncoding(encoding); + } + } + + NSString *string = [[NSString alloc] initWithData:data encoding:stringEncoding]; + if (success) { + string = success(response, string); + } + + return [string dataUsingEncoding:stringEncoding]; + } failure:failure]; +} + +- (void)loadRequest:(NSURLRequest *)request + MIMEType:(NSString *)MIMEType + textEncodingName:(NSString *)textEncodingName + progress:(void (^)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite))progress + success:(NSData * (^)(NSHTTPURLResponse *response, NSData *data))success + failure:(void (^)(NSError *error))failure +{ + NSParameterAssert(request); + + if (self.af_HTTPRequestOperation) { + [self.af_HTTPRequestOperation cancel]; + } + + request = [self.requestSerializer requestBySerializingRequest:request withParameters:nil error:nil]; + + self.af_HTTPRequestOperation = [[AFHTTPRequestOperation alloc] initWithRequest:request]; + self.af_HTTPRequestOperation.responseSerializer = self.responseSerializer; + + __weak __typeof(self)weakSelf = self; + [self.af_HTTPRequestOperation setDownloadProgressBlock:progress]; + [self.af_HTTPRequestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id __unused responseObject) { + NSData *data = success ? success(operation.response, operation.responseData) : operation.responseData; + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu" + __strong __typeof(weakSelf) strongSelf = weakSelf; + [strongSelf loadData:data MIMEType:(MIMEType ?: [operation.response MIMEType]) textEncodingName:(textEncodingName ?: [operation.response textEncodingName]) baseURL:[operation.response URL]]; + + if ([strongSelf.delegate respondsToSelector:@selector(webViewDidFinishLoad:)]) { + [strongSelf.delegate webViewDidFinishLoad:strongSelf]; + } + +#pragma clang diagnostic pop + } failure:^(AFHTTPRequestOperation * __unused operation, NSError *error) { + if (failure) { + failure(error); + } + }]; + + [self.af_HTTPRequestOperation start]; + + if ([self.delegate respondsToSelector:@selector(webViewDidStartLoad:)]) { + [self.delegate webViewDidStartLoad:self]; + } +} + +@end + +#endif diff --git a/Pods/GoogleMaps/CHANGELOG b/Pods/GoogleMaps/CHANGELOG new file mode 100644 index 0000000..ca34c2f --- /dev/null +++ b/Pods/GoogleMaps/CHANGELOG @@ -0,0 +1,468 @@ +Version 1.10.3 - September 2015 +=============================== +Features: + - Google logos have been updated. + +Resolved Issues: + - Framework now ships with the device version of bundles to pass Xcode 7 archive checks. + +Version 1.10.2 - August 2015 +============================ +Resolved Issues: + - Fixed a crash releasing a map view while in background. + - Resolved a conflict with apps using gtm-session-fetcher resumable downloads. + - Recompiled with Xcode 6.4 to avoid some bugs in Xcode 6.3 compiler. + - Updated GoogleMaps.bundle info.plist to avoid triggering new checks in + pre-submission verification. + +Version 1.10.1 - June 2015 +========================== +Resolved Issues: + - Fixed an issue where instantiating GMSPlacesClient triggered a request to enable Bluetooth. + - Miscellaneous improvements to the GMSPlacePicker UI. + +Version 1.10.0 - May 2015 +========================= +Major Feature: + - Places API is now bundled with the Google Maps SDK for iOS. + +Features: + - New allowScrollGesturesDuringRotateOrZoom property on GMSUISettings controls whether + the user can scroll by panning during multi-touch rotate or zoom gestures. + - GMSPanoramaView now supports being used via storyboard. + - GMSGeocoder now supports being used while the application is in the background. + - GMSServices sharedServices can now be called while application is in the background. Note + that if the first call to sharedServices is while application is in the background some + async initialization work will be deferred until the first time a map is shown where it will + be performed synchronously. + - GMSMapView/GMSPanoramaView init messages can now be handled while the application is in + background. This should remove the last case where GMSMapView/GMSPanoramaView could not + be used in the background. + - GMSMapView/GMSPanormaView delegate properties now support IBOutlet for easier use via + storyboard. + +Resolved Issues: + - mapView:didTapMyLocationButtonForMapView: is now correctly called even if no location is + available. + - GMSGroundOverlay now shows correctly when rotated if image aspect ratio doesn't match the + selected ground region. + - Fixed an issue resizing the map on iOS 8. + - Fixed a rare crash under fast camera changes. + - Map no longer hangs when adding a ground overlay with certain invalid bounds. + - Fixed a crash when texture memory is exhausted by markers. + - Correctly return the tapped GMSCircle to mapView:didTapOverlay: for tappable circles. + - mapView:idleAtCameraPosition: will now be called even if there is an ongoing update of the + my location dot. + +Notes: + - Due to an ABI change in the Xcode compiler, Xcode 6.3 is now the only supported version for + compiling against Google Maps SDK for iOS. + - The minimum target iOS version for Google Maps SDK for iOS is now 7.0. Version 6.0 is no + longer supported. + +Version 1.9.2 - February 2015 +============================= +Resolved Issues: + - Show correct characters for Myanmar place labels. + - Fixed small memory leak related to font registration. + - Fixed large memory leak in rare cases where My Location is enabled and the user rotates + the screen. + - Correctly show ground overlays defined by zoom level which extend across >180 degrees + of longitude. + - Allow selected marker to be set during mapView:didTapAtCoordinate:. + - Throw exception rather than crash when map services are initialized while application is + in background. + - Raise mapView:willMove: and mapView:idleAtCameraPosition: even for swipe motions which + last less than 30ms. + - Correctly handle animations starting while a gesture is decelerating. + - Always return an error from GMSPanoramaService callbacks if panorama is nil. + - Don't attempt to navigate to empty panorama if moveNearCoordinate: resolves to nil. + +Version 1.9.1 - December 2014 +============================= +Resolved Issues: + - Added workaround for userEmail private selector false positive. + - Improved handling of info windows for iPhone 6+ running applications in scaled mode. + +Version 1.9.0 - October 2014 +============================ +Features: + - Support for iOS 8 + - Support for iPhone 6/6+ + - Support for Swift + - UI elements have been updated for material design + +Resolved Issues: + - Fixed some memory reclamation issues + - Improved handling of application background state transition + +Notes: + ! In order to improve compatibility with Swift, two geometry library + functions have been renamed to avoid function overloading + The new names are GMSGeometryIsLocationOnPathTolerance and + GMSStyleSpansOffset + +Version 1.8.1 - May 2014 +======================== +Resolved Issues: + - Resolved GMSTileLayer not displaying + - Resolved a rare case where an app would crash when displaying polylines + while accessibility features are enabled + - mapView:willMove: is no longer called alongside a tap gesture + - Resolved symbol collisions with the Protocol Buffer library + +Version 1.8.0 - May 2014 +======================== +Resolved Issues: + - Resolved threading deadlock prominent on iPhone 4 running iOS 7.1 or later + - GMSMapView correctly releases some shared GL state previously causing + memory leak + - GMSPolyline no longer crashes in some cases where its path contained more + than 1024 segments + - The delegate method mapView:idleAtCameraPosition: is now only called once + all user gestures are complete + - The Google Maps SDK for iOS now includes fonts for languages currently + unsupported by the iOS system, such as Khmer + - These fonts may be safely removed from your GoogleMaps.framework if you + have no interest in these regions, but some text may render as "[?]" + +Version 1.7.2 - March 2014 +========================== +Resolved Issues: + - Heading will only appear on My Location dot when available + - Better reduction of colors on gradient or colored polylines at low zoom + - The search radius is now respected when retrieving a GMSPanorama object + via GMSPanoramaService and on GMSPanoramaView construction or move + - GMSPolyline is no longer grayscale on iOS 7.1 + +Version 1.7.0 - February 2014 +============================= +Features: + - Styled polylines: additional color options via GMSPolyline, including + gradients and colors per any number of polyline segments + * Each polyline may be drawn with many GMSStyleSpan instances, configuring + a unique color or gradient over an arbitrary number of segments + * Gradient or color may be specified via a GMSStrokeStyle + * GMSPath provides a helper category to determine distance along a path + * GMSStyleSpans helper to apply repeated styles along a polyline + - GMSGeocoder now provides structured addresses via GMSAddress, deprecating + GMSReverseGeocodeResult + - Added mutable version of GMSCameraPosition, GMSMutableCameraPosition + - Delegate method for user tapping the My Location button + - Added GMSMapPoint for linear interpolation between points in Mercator space + on the Earth + - My Location dot now shows compass arrow + - 3D building data at many places on the Earth + +Resolved Issues: + - GMSPolyline width is much closer to screen width + - GMSPolyline performance and memory improvements + - Reduced memory use of OpenGL textures + - Floor picker is positioned correctly when My Location button is disabled + - cameraForBounds:insets: on GMSMapView now correctly accounts for padding + +Notes: + ! To align with other Google Maps APIs, GMSMapView no longer provides helper + methods to retrieve previously added overlays, such as -markers, -polylines + and -groundOverlays + +Version 1.6.2 - January 2014 +============================ +Resolved Issues: + - Resolved a gesture bug effecting full-screen maps on iOS 7 + - Resolved an issue where overlays were sometimes not initially tappable + +Version 1.6.1 - December 2013 +============================= +Resolved Issues: + - Resolved a memory leak involving vector tiles + - Markers not immediately added to a GMSMapView no longer fail to appear + when configured at a later point + - GMSMapView/GMSPanoramaView will now continue to render while your + application is resigned + +Version 1.6.0 - November 2013 +============================= +Features: + - The Google Maps SDK for iOS now supports 64-bit architectures + - Added the ability to restrict min and max zoom on GMSMapView + - Added opacity on GMSTileLayer + - Added opacity on GMSMarker, which may be animated + ! Updated types within the SDK and used float or double instead of CGFloat + in cases where it was more appropriate + ! Core Animation on GMSMapView now requires model values to be set + +Resolved Issues: + - Marker info windows and tappable regions now rotate correctly with markers + - Padding on a GMSMapView is no longer clamped to its bounds (useful if + setting padding on an initially zero-sized map) + - Copyright information now animates alongside changing GMSMapView size or + padding + - Info windows are removed if their GMSMarker is removed from a GMSMapView + - My Location dot uses the last known information when enabled + - Resolved two rare race conditions that were causing crashes + - Resolved an issue where retain cycles were causing memory leaks on + GMSMapView and GMSPanoramaView + +Version 1.5.0 - September 2013 +============================== +Features: + ! This release officially supports iOS 7, and requires iOS 6.0 or later (iOS + 5.1 is no longer supported). + ! The 'animated' field on GMSMarker is now known as 'appearAnimation', and + may be set to kGMSMarkerAnimationNone (default) or kGMSMarkerAnimationPop + - The Google Maps SDK for iOS now ships with an armv7s slice + - New features for GMSMarker instances + * Markers can be made draggable using the draggable property, and new drag + delegate methods have been added to GMSMapViewDelegate + * Added GMSMarkerLayer, a custom CALayer subclass for GMSMarker that + supports animation of marker position and rotation + * Added support for markers that appear flat against the Earth's surface + * Added rotation property to rotate markers around their ground anchor + * The UIImage used by GMSMarker now supports the images and duration + properties, and will animate images with multiple frames + * The UIImage used by GMSMarker now supports alignmentRectInsets, and will + adjust groundAnchor, infoWindowAnchor, and the tappable region + - Added padding on GMSMapView, allowing you to indicate parts of the map that + may be obscured by other views; setting padding re-positions the standard + map controls, and the camera and camera updates will use the padded region + - GMSPanoramaView and GMSPanoramaService now support searching for panoramas + with custom radius + - Added cameraForBounds:insets: to GMSMapView, allowing construction of a + GMSCameraPosition for the map from a specified GMSCoordinateBounds + +Resolved Issues: + - My Location button now clips within GMSMapView + - Reduced memory usage of GMSMapView through less agressive tile caching + - Reduced the time taken to obtain GMSServices by moving some startup tasks + to a background thread; obtaining this object early in your application + (before creating a GMSMapView or other objects) may improve performance + - Polylines may now be drawn twice, as required, if they have very large + longitudinal span + - Resolved a rounding error with very small polygons far from latlng (0,0) + +Version 1.4.3 - August 2013 +=========================== +Resolved Issues: + - Resolved several causes of modifying markers that could cause 'ghost' + markers to appear + - Resolved excess texture use when modifying animated markers + +Version 1.4.2 - August 2013 +=========================== +Resolved Issues: + - Fixed a rare case where modifying an animated marker could cause 'ghost' + markers to appear + - Prioritized markers over other overlays for tappability + +Version 1.4.1 - August 2013 +=========================== +Features: + - Tappable markers inside GMSPanoramaView using the + panoramaView:didTapMarker: delegate method on GMSPanoramaViewDelegate + - Added GMSPanoramaLayer, a custom CALayer subclass for GMSPanoramaView that + supports animation of the panorama camera + - GMSPanoramaCamera supports custom field of view (FOV) + - Programmatic access to the floor picker allows you to enable or disable the + selector, and set which floor should be displayed + - GMSTileLayer now supports high DPI tiles, for use on a Retina device + - GMSMapView.camera is now observable via KVO + - Added fitBounds:withEdgeInsets: to GMSCameraUpdate + - The default behavior of a GMSMapView to consume all gestures within its + bounds may now be disabled via consumesGesturesInView + - Expanded GMSGeometryUtils to include additional helper methods + - GMSServices may be held by applications to maintain cache and connection to + Google; this can improve performance when creating and destroying many maps + - Improved visuals when resizing a GMSMapView via UIView animation methods + +Resolved Issues: + - Fixed crash bug during memory warning (related to indoor) + - Fixed crash bug with indoor maps on iOS 5.1 + - Performance improvements when using hundreds of GMSMarkers + - Reduced memory footprint of GMSMapView + - Touch target for GMSMarkers matches the size and shape of the marker when + the GMSMapView is tilted + - GMSMapView will no longer render a single frame of black in some cases + (noticable e.g., inside UISplitViewController on iPad) + - Street View imagery is now adjusted correctly for tilted base data + (e.g., data taken by a Street View car on a slope) + - Geodesic interpolation has been tweaked to be more correct + - Fixed incorrect GMSGroundOverlay sizing (regression in 1.4.0) + - fitBounds:withPadding: on GMSCameraUpdate now correctly applies padding to + all edges of the bounds; previously it used 1/2 padding on each edge + +Version 1.4.0 - July 2013 +========================= +Features: + - Support for Google Street View imagery, with coverage in 50+ countries + * Added GMSPanoramaView, a viewer for Street View imagery, that enables + both programmatic and user control + * GMSMarkers can be shared between GMSMapView and GMSPanoramaView + * GMSPanoramaService may be used to load panorama data ahead of display + - Indoor floor plans and a floor selector control will now be displayed when + available + - Updated map design inspired by the new Google Maps + - Info windows now show at 1:1 resolution on the screen regardless of tilt + - Additional delegate methods on GMSMapView - mapView:willMove: and + mapView:idleAtCameraPosition: - allow you to detect the start and + end of camera movement, respectively + - An improved look and feel for polylines and polygon stroke + - Added a zIndex property on all overlays; z-indexes are calculated in two + groups: GMSMarkers and all other overlays + - Added GMSGeometryUtils methods for heading, distance, offset etc. with + respect to points on the Earth + +Resolved Issues: + - Improved the tappability of GMSPolygon + - The compass now disappears when the map returns to zero bearing for any + reason, including animation + - Resolved crash issue when creating a zero-sized GMSPolygon + - Resolved an issue where active gestures could cause a GMSMapView to not + be released until deceleration completed + - Info windows no longer allow taps to pass through them + ! Accessibility elements on GMSMapView are now hidden by default; you can + enable via accessibilityElementsHidden + +Notes: + ! To align with other Google Maps APIs, GMSGroundOverlay no longer supports + the zoomLevel property. You can use the helper method + groundOverlayWithPosition:icon:zoomLevel: to migrate existing code + +Version 1.3.1 - June 2013 +========================= +Resolved Issues: + - Shows all tiles when animating across the antimeridian + - Performance improvements while zooming + - Touches are consumed more agressively by GMSMapView + - Fixed constructing a GMSMutablePath via pathFromEncodedPath: + - Restores OpenGL state correctly in GMSMapView in applications that also use + GLKView + +Version 1.3.0 - May 2013 +======================== +Features: + - Support for custom tile overlays (image-based) via GMSTileLayer + - Anti-aliasing for GMSPolyline and GMSPolygon stroke + - Support for 'invisible' base map tiles via kGMSTypeNone + - Basic support for CAAnimationGroup on GMSMapLayer + +Resolved Issues: + - Performance improvements with large numbers of overlays + - Resolved excessive memory use when device was locked/unlocked while an info + window was displayed + - Animations are stopped when a user performs a gesture + - Animations stop any active gesture (e.g., a pan) + - Resolved crash issue with setting/clearing My Location dot. + - GMSPolyline and GMSPolygon now support greater precision at high zoom + - GMSPolyline and GMSPolygon use the correct alpha values + - Touches are consumed by GMSMapView, allowing use within e.g. a scroll view + +Version 1.2.2 - April 2013 +========================== +Resolved Issues: + - Tappable regions for GMSMarker fixed. + - Overlays are no longer able to render on half pixels. + - Ground overlays appear underneath the My Location dot. + - GMSPolyline 'strokeColor' is no longer erroneously deallocated. + +Version 1.2.0 - April 2013 +========================== +Features: + ! Removed GMS...Options classes in favor of creating overlays directly + and setting their 'map' property + ! Map overlays (GMSMarker, GMSPolyline, others) now inherit from a shared + GMSOverlay class + ! GMSPolyline now has 'strokeWidth' and 'strokeColor' to match GMSPolygon, + rather than 'width' and 'stroke' + ! More helper methods on GMSCoordinateBounds, 'including' renamed to + 'includingCoordinate', added 'includingBounds' + - Added GMSPolygon and GMSCircle overlays + - A GMSMarker may be animated when added to a map + - Overlay types may now be subclassed + - GMSCameraUpdate to create camera update objects, including operations to + set a camera that presents a specified GMSCoordinateBounds + - GMSUISettings may be used to add a compass or My Location button (disabled + by default) + - Non-marker overlay types may be tapped (see GMSMapViewDelegate) + - Default marker changed to the Google Maps for iPhone marker + - Added markerImageWithColor: to create tinted versions of the default marker + - GMSMapLayer, the CALayer subclass for GMSMapView, now supports modification + of its camera properties, allowing for advanced animation effects + +Resolved Issues: + - visibleRegion now reports correctly sized region on Retina devices + - Double-tap to zoom now centers around tapped point + - Disabling pan via UISettings now prevents movement with zoom gestures + - GMSPolyline performance is improved for large polylines + - GMSMapView may be subclassed + - My Location dot appears underneath markers + - Performance improvements when using the My Location dot + - Grayscale polylines now render correctly + - Calling renderInContext: on the GMSMapView layer now renders correctly; + this allows for snapshots and UI effects + - The default behavior when a marker is tapped has been updated to also pan + the camera to the marker's position + - semaphore_wait_trap issue resolved + +Version 1.1.2 - March 2013 +========================== +Resolved Issues: + ! Updated the SDK to use libc++ instead of libstdc++ + - Improved support for including a GMSMapView and GLKView in the same app + +Version 1.1.1 - March 2013 +========================== +Features: + - Improved the messages that are logged to the console when a invalid key is + used or a connection error occurs + - Added multi-line snippet support for GMSMarker + +Resolved Issues: + - GMSMapView could return a nil camera + - Multiple GMSMapView instances no longer 'camera crosstalk.' + - The SDK contained unresolved external references + - A GMSMarker with an empty title and snippet no longer shows an empty + info window. + +Version 1.1.0 - February 2013 +============================= +Features: + ! The points of a GMSPolyline (and GMSPolylineOptions) are now specified as + a GMSPath and built via a GMSMutablePath, rather than addVertex: etc + - GMSPolyline may now be specified as geodesic + - animateToCameraPosition: method on GMSMapView + - GMSProjection provides containsCoordinate: and visibleRegion helpers + +Resolved Issues: + - GMSCameraPosition and animateToLocation: now clamp/wrap latitude/longitude + respectively; similarly, bearing is clamped to 0 <= bearing < 360 + - GMSGroundOverlay may be modified after creation + - The points of a GMSPoyline may be modified after creation + - GMSPolyline may cross the antimeridian + - Resolved a marker sorting issue + +Version 1.0.2 - January 2013 +============================ +Features: + ! GMSCamera (struct) has been dropped in favor of GMSCameraPosition * (objc + class), supports finer control of bearing and viewing angle + - Added GMSUISettings to control gesture availability + - Added GMSGroundOverlay/GMSGroundOverlayOptions for basic ground overlay + support + - Removed requirement to call startRendering/stopRendering + - Support for adding GMSMapView as a custom UIView in Interface Builder + - Improved texture memory handling + +Resolved Issues: + - Info windows now have highest tap priority + - Selected markers are automatically brought to front + - Polylines now render at constant size regardless of the zoom level + +Version 1.0.1 - December 2012 +============================= +Initial release alongside Google Maps for iOS. +Support for 3D maps, rotation, tilt, 3D buildings, markers, polylines, +satellite and terrain tiles, traffic data, and other features. + + +* Items denoted with an '!' may indicate a backwards incompatible change. diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/GoogleMaps b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/GoogleMaps new file mode 120000 index 0000000..17ed6fb --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/GoogleMaps @@ -0,0 +1 @@ +Versions/Current/GoogleMaps \ No newline at end of file diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Headers b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Headers new file mode 120000 index 0000000..a177d2a --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers \ No newline at end of file diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Modules b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Modules new file mode 120000 index 0000000..5736f31 --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Modules @@ -0,0 +1 @@ +Versions/Current/Modules \ No newline at end of file diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Resources b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Resources new file mode 120000 index 0000000..953ee36 --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/GoogleMaps b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/GoogleMaps new file mode 100644 index 0000000..fbf6c95 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/GoogleMaps differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSAddress.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSAddress.h new file mode 100644 index 0000000..e9b1a87 --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSAddress.h @@ -0,0 +1,69 @@ +// +// GMSAddress.h +// Google Maps SDK for iOS +// +// Copyright 2014 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +#import + +#import + +/** + * A result from a reverse geocode request, containing a human-readable address. This class is + * immutable and should be obtained via GMSGeocoder. + * + * Some of the fields may be nil, indicating they are not present. + */ +@interface GMSAddress : NSObject + +/** Location, or kLocationCoordinate2DInvalid if unknown. */ +@property(nonatomic, readonly) CLLocationCoordinate2D coordinate; + +/** Street number and name. */ +@property(nonatomic, copy, readonly) NSString *thoroughfare; + +/** Locality or city. */ +@property(nonatomic, copy, readonly) NSString *locality; + +/** Subdivision of locality, district or park. */ +@property(nonatomic, copy, readonly) NSString *subLocality; + +/** Region/State/Administrative area. */ +@property(nonatomic, copy, readonly) NSString *administrativeArea; + +/** Postal/Zip code. */ +@property(nonatomic, copy, readonly) NSString *postalCode; + +/** The country name. */ +@property(nonatomic, copy, readonly) NSString *country; + +/** An array of NSString containing formatted lines of the address. May be nil. */ +@property(nonatomic, copy, readonly) NSArray *lines; + +/** + * Returns the first line of the address. + * + * This method is obsolete and deprecated and will be removed in a future release. + * Use the lines property instead. + */ +- (NSString *)addressLine1 __GMS_AVAILABLE_BUT_DEPRECATED; + +/** + * Returns the second line of the address. + * + * This method is obsolete and deprecated and will be removed in a future release. + * Use the lines property instead. + */ +- (NSString *)addressLine2 __GMS_AVAILABLE_BUT_DEPRECATED; + +@end + +/** + * The former type of geocode results (pre-1.7). This remains here for migration and will be + * removed in future releases. + */ +@compatibility_alias GMSReverseGeocodeResult GMSAddress; diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSAutocompleteFilter.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSAutocompleteFilter.h new file mode 100644 index 0000000..080ad00 --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSAutocompleteFilter.h @@ -0,0 +1,62 @@ +// +// GMSAutocompleteFilter.h +// Google Maps SDK for iOS +// +// Copyright 2014 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +/** + * The type filters that may be applied to an autocomplete request to restrict results to different + * types. + */ +typedef NS_ENUM(NSInteger, GMSPlacesAutocompleteTypeFilter) { + /** + * All results. + */ + kGMSPlacesAutocompleteTypeFilterNoFilter, + /** + * Geeocoding results, as opposed to business results. + */ + kGMSPlacesAutocompleteTypeFilterGeocode, + /** + * Geocoding results with a precise address. + */ + kGMSPlacesAutocompleteTypeFilterAddress, + /** + * Business results. + */ + kGMSPlacesAutocompleteTypeFilterEstablishment, + /** + * Results that match the following types: + * "locality", + * "sublocality" + * "postal_code", + * "country", + * "administrative_area_level_1", + * "administrative_area_level_2" + */ + kGMSPlacesAutocompleteTypeFilterRegion, + /** + * Results that match the following types: + * "locality", + * "administrative_area_level_3" + */ + kGMSPlacesAutocompleteTypeFilterCity, +}; + +/** + * This class represents a set of restrictions that may be applied to autocomplete requests. This + * allows customization of autocomplete suggestions to only those places that are of interest. + */ +@interface GMSAutocompleteFilter : NSObject + +/** + * The type filter applied to an autocomplete request to restrict results to different types. + * Default value is kGMSPlacesAutocompleteTypeFilterNoFilter. + */ +@property(nonatomic, assign) GMSPlacesAutocompleteTypeFilter type; + +@end diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSAutocompleteMatchFragment.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSAutocompleteMatchFragment.h new file mode 100644 index 0000000..5eb36cf --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSAutocompleteMatchFragment.h @@ -0,0 +1,29 @@ +// +// GMSAutocompleteMatchFragment.h +// Google Maps SDK for iOS +// +// Copyright 2014 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + + +/** + * This class represents a matched fragment of a string. This is a contiguous range of characters + * in a string, suitable for highlighting in an autocompletion UI. + */ +@interface GMSAutocompleteMatchFragment : NSObject + +/** + * The offset of the matched fragment. This is an index into a string. The character at this index + * is the first matched character. + */ +@property(nonatomic, readonly) NSUInteger offset; + +/** + * The length of the matched fragment. + */ +@property(nonatomic, readonly) NSUInteger length; + +@end diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSAutocompletePrediction.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSAutocompletePrediction.h new file mode 100644 index 0000000..7ea0dbe --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSAutocompletePrediction.h @@ -0,0 +1,59 @@ +// +// GMSAutocompletePrediction.h +// Google Maps SDK for iOS +// +// Copyright 2014 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + + +/* + * Attribute name for match fragments in |GMSAutocompletePrediction| attributedFullText. + */ +extern NSString *const kGMSAutocompleteMatchAttribute; + +/** + * This class represents a prediction of a full query based on a partially typed string. + */ +@interface GMSAutocompletePrediction : NSObject + +/** + * The full description of the prediction as a NSAttributedString. E.g., "Sydney Opera House, + * Sydney, New South Wales, Australia". + * + * Every text range that matches the user input has a |kGMSAutocompleteMatchAttribute|. For + * example, you can make every match bold using enumerateAttribute: + *
+ *   UIFont *regularFont = [UIFont systemFontOfSize:[UIFont labelFontSize]];
+ *   UIFont *boldFont = [UIFont boldSystemFontOfSize:[UIFont labelFontSize]];
+ *
+ *   NSMutableAttributedString *bolded = [prediction.attributedFullText mutableCopy];
+ *   [bolded enumerateAttribute:kGMSAutocompleteMatchAttribute
+ *                      inRange:NSMakeRange(0, bolded.length)
+ *                      options:0
+ *                   usingBlock:^(id value, NSRange range, BOOL *stop) {
+ *                     UIFont *font = (value == nil) ? regularFont : boldFont;
+ *                     [bolded addAttribute:NSFontAttributeName value:font range:range];
+ *                   }];
+ *
+ *   label.attributedText = bolded;
+ * 
+ */ +@property(nonatomic, copy, readonly) NSAttributedString *attributedFullText; + + +/** + * An optional property representing the place ID of the prediction, suitable for use in a place + * details request. + */ +@property(nonatomic, copy, readonly) NSString *placeID; + +/** + * The types of this autocomplete result. Types are NSStrings, valid values are any types + * documented at . + */ +@property(nonatomic, copy, readonly) NSArray *types; + +@end diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSCALayer.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSCALayer.h new file mode 100644 index 0000000..c10bc7b --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSCALayer.h @@ -0,0 +1,20 @@ +// +// GMSCALayer.h +// Google Maps SDK for iOS +// +// Copyright 2013 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +#import + +/** + * GMSCALayer is a superclass used by layers in the Google Maps SDK for iOS, + * such as GMSMapLayer and GMSPanoramaLayer. + * + * This is an implementation detail and it should not be instantiated directly. + */ +@interface GMSCALayer : CALayer +@end diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSCameraPosition.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSCameraPosition.h new file mode 100644 index 0000000..8ecdeae --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSCameraPosition.h @@ -0,0 +1,117 @@ +// +// GMSCameraPosition.h +// Google Maps SDK for iOS +// +// Copyright 2013 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +#import + +/** +* An immutable class that aggregates all camera position parameters. + */ +@interface GMSCameraPosition : NSObject + +/** + * Location on the Earth towards which the camera points. + */ +@property(nonatomic, readonly) CLLocationCoordinate2D target; + +/** + * Zoom level. Zoom uses an exponentional scale, where zoom 0 represents the entire world as a + * 256 x 256 square. Each successive zoom level increases magnification by a factor of 2. So at + * zoom level 1, the world is 512x512, and at zoom level 2, the entire world is 1024x1024. + */ +@property(nonatomic, readonly) float zoom; + +/** + * Bearing of the camera, in degrees clockwise from true north. + */ +@property(nonatomic, readonly) CLLocationDirection bearing; + +/** + * The angle, in degrees, of the camera angle from the nadir (directly facing the Earth). 0 is + * straight down, 90 is parallel to the ground. Note that the maximum angle allowed is 45 degrees. + */ +@property(nonatomic, readonly) double viewingAngle; + +/** + * Designated initializer. Configures this GMSCameraPosition with all available camera properties. + * Building a GMSCameraPosition via this initializer (or by the following convenience constructors) + * will implicitly clamp camera values. + * + * @param target location on the earth which the camera points + * @param zoom the zoom level near the center of the screen + * @param bearing of the camera in degrees from true north + * @param viewingAngle in degrees, of the camera angle from the nadir + */ +- (id)initWithTarget:(CLLocationCoordinate2D)target + zoom:(float)zoom + bearing:(CLLocationDirection)bearing + viewingAngle:(double)viewingAngle; + +/** + * Convenience constructor for GMSCameraPosition for a particular target and zoom level. This will + * set the bearing and viewingAngle properties of this camera to zero defaults (i.e., directly + * facing the Earth's surface, with the top of the screen pointing north). + */ ++ (instancetype)cameraWithTarget:(CLLocationCoordinate2D)target zoom:(float)zoom; + +/** + * Convenience constructor for GMSCameraPosition, as per cameraWithTarget:zoom:. + */ ++ (instancetype)cameraWithLatitude:(CLLocationDegrees)latitude + longitude:(CLLocationDegrees)longitude + zoom:(float)zoom; + +/** + * Convenience constructor for GMSCameraPosition, with all camera properties as per + * initWithTarget:zoom:bearing:viewingAngle:. + */ ++ (instancetype)cameraWithTarget:(CLLocationCoordinate2D)target + zoom:(float)zoom + bearing:(CLLocationDirection)bearing + viewingAngle:(double)viewingAngle; + +/** + * Convenience constructor for GMSCameraPosition, with latitude/longitude and all other camera + * properties as per initWithTarget:zoom:bearing:viewingAngle:. + */ ++ (instancetype)cameraWithLatitude:(CLLocationDegrees)latitude + longitude:(CLLocationDegrees)longitude + zoom:(float)zoom + bearing:(CLLocationDirection)bearing + viewingAngle:(double)viewingAngle; + +/** + * Get the zoom level at which |meters| distance, at given |coord| on Earth, correspond to the + * specified number of screen |points|. + * + * For extremely large or small distances the returned zoom level may be smaller or larger than the + * minimum or maximum zoom level allowed on the camera. + * + * This helper method is useful for building camera positions that contain specific physical areas + * on Earth. + */ ++ (float)zoomAtCoordinate:(CLLocationCoordinate2D)coordinate + forMeters:(CLLocationDistance)meters + perPoints:(CGFloat)points; + +@end + +/** Mutable version of GMSCameraPosition. */ +@interface GMSMutableCameraPosition : GMSCameraPosition +@property(nonatomic, assign) CLLocationCoordinate2D target; +@property(nonatomic, assign) float zoom; +@property(nonatomic, assign) CLLocationDirection bearing; +@property(nonatomic, assign) double viewingAngle; +@end + +/** The maximum zoom (closest to the Earth's surface) permitted by the map camera. */ +FOUNDATION_EXTERN const float kGMSMaxZoomLevel; + +/** The minimum zoom (farthest from the Earth's surface) permitted by the map camera. */ +FOUNDATION_EXTERN const float kGMSMinZoomLevel; diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSCameraUpdate.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSCameraUpdate.h new file mode 100644 index 0000000..7145ff1 --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSCameraUpdate.h @@ -0,0 +1,106 @@ +// +// GMSCameraUpdate.h +// Google Maps SDK for iOS +// +// Copyright 2013 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +#import +#import + +@class GMSCameraPosition; +@class GMSCoordinateBounds; + +/** + * GMSCameraUpdate represents an update that may be applied to a GMSMapView. + * It encapsulates some logic for modifying the current camera. + * It should only be constructed using the factory helper methods below. + */ +@interface GMSCameraUpdate : NSObject + +/** + * Returns a GMSCameraUpdate that zooms in on the map. + * The zoom increment is 1.0. + */ ++ (GMSCameraUpdate *)zoomIn; + +/** + * Returns a GMSCameraUpdate that zooms out on the map. + * The zoom increment is -1.0. + */ ++ (GMSCameraUpdate *)zoomOut; + +/** + * Returns a GMSCameraUpdate that changes the zoom by the specified amount. + */ ++ (GMSCameraUpdate *)zoomBy:(float)delta; + +/** + * Returns a GMSCameraUpdate that sets the zoom to the specified amount. + */ ++ (GMSCameraUpdate *)zoomTo:(float)zoom; + +/** + * Returns a GMSCameraUpdate that sets the camera target to the specified + * coordinate. + */ ++ (GMSCameraUpdate *)setTarget:(CLLocationCoordinate2D)target; + +/** + * Returns a GMSCameraUpdate that sets the camera target and zoom to the + * specified values. + */ ++ (GMSCameraUpdate *)setTarget:(CLLocationCoordinate2D)target zoom:(float)zoom; + +/** + * Returns a GMSCameraUpdate that sets the camera to the specified + * GMSCameraPosition. + */ ++ (GMSCameraUpdate *)setCamera:(GMSCameraPosition *)camera; + +/** + * Returns a GMSCameraUpdate that transforms the camera such that the specified + * bounds are centered on screen at the greatest possible zoom level. The bounds + * will have a default padding of 64 points. + * + * The returned camera update will set the camera's bearing and tilt to their + * default zero values (i.e., facing north and looking directly at the Earth). + */ ++ (GMSCameraUpdate *)fitBounds:(GMSCoordinateBounds *)bounds; + +/** + * This is similar to fitBounds: but allows specifying the padding (in points) + * in order to inset the bounding box from the view's edges. + * If the requested |padding| is larger than the view size in either the + * vertical or horizontal direction the map will be maximally zoomed out. + */ ++ (GMSCameraUpdate *)fitBounds:(GMSCoordinateBounds *)bounds + withPadding:(CGFloat)padding; + +/** + * This is similar to fitBounds: but allows specifying edge insets + * in order to inset the bounding box from the view's edges. + * If the requested |edgeInsets| are larger than the view size in either the + * vertical or horizontal direction the map will be maximally zoomed out. + */ ++ (GMSCameraUpdate *)fitBounds:(GMSCoordinateBounds *)bounds + withEdgeInsets:(UIEdgeInsets)edgeInsets; + +/** + * Returns a GMSCameraUpdate that shifts the center of the view by the + * specified number of points in the x and y directions. + * X grows to the right, Y grows down. + */ ++ (GMSCameraUpdate *)scrollByX:(CGFloat)dX Y:(CGFloat)dY; + +/** + * Returns a GMSCameraUpdate that zooms with a focus point; the focus point + * stays fixed on screen. + */ ++ (GMSCameraUpdate *)zoomBy:(float)zoom atPoint:(CGPoint)point; + +@end + diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSCircle.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSCircle.h new file mode 100644 index 0000000..b67e3bd --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSCircle.h @@ -0,0 +1,49 @@ +// +// GMSCircle.h +// Google Maps SDK for iOS +// +// Copyright 2013 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +#import + +#import + +/** + * A circle on the Earth's surface (spherical cap). + */ +@interface GMSCircle : GMSOverlay + +/** Position on Earth of circle center. */ +@property(nonatomic, assign) CLLocationCoordinate2D position; + +/** Radius of the circle in meters; must be positive. */ +@property(nonatomic, assign) CLLocationDistance radius; + +/** + * The width of the circle's outline in screen points. Defaults to 1. As per + * GMSPolygon, the width does not scale when the map is zoomed. + * Setting strokeWidth to 0 results in no stroke. + */ +@property(nonatomic, assign) CGFloat strokeWidth; + +/** The color of this circle's outline. The default value is black. */ +@property(nonatomic, strong) UIColor *strokeColor; + +/** + * The interior of the circle is painted with fillColor. + * The default value is nil, resulting in no fill. + */ +@property(nonatomic, strong) UIColor *fillColor; + +/** + * Convenience constructor for GMSCircle for a particular position and radius. + * Other properties will have default values. + */ ++ (instancetype)circleWithPosition:(CLLocationCoordinate2D)position + radius:(CLLocationDistance)radius; + +@end diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSCoordinateBounds.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSCoordinateBounds.h new file mode 100644 index 0000000..f7aae8a --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSCoordinateBounds.h @@ -0,0 +1,97 @@ +// +// GMSCoordinateBounds.h +// Google Maps SDK for iOS +// +// Copyright 2013 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +#import + +#import + +@class GMSPath; + +/** + * GMSCoordinateBounds represents a rectangular bounding box on the Earth's + * surface. GMSCoordinateBounds is immutable and can't be modified after + * construction. + */ +@interface GMSCoordinateBounds : NSObject + +/** The North-East corner of these bounds. */ +@property(nonatomic, readonly) CLLocationCoordinate2D northEast; + +/** The South-West corner of these bounds. */ +@property(nonatomic, readonly) CLLocationCoordinate2D southWest; + +/** + * Returns NO if this bounds does not contain any points. + * For example, [[GMSCoordinateBounds alloc] init].valid == NO. + * When an invalid bounds is expanded with valid coordinates via + * includingCoordinate: or includingBounds:, the resulting bounds will be valid + * but contain only the new coordinates. + */ +@property(readonly, getter=isValid) BOOL valid; + +/** + * Inits the northEast and southWest bounds corresponding + * to the rectangular region defined by the two corners. + * + * It is ambiguous whether the longitude of the box + * extends from |coord1| to |coord2| or vice-versa; + * the box is constructed as the smaller of the two variants, eliminating the + * ambiguity. + */ +- (id)initWithCoordinate:(CLLocationCoordinate2D)coord1 + coordinate:(CLLocationCoordinate2D)coord2; + +/** + * Inits with bounds that encompass |region|. + */ +- (id)initWithRegion:(GMSVisibleRegion)region; + +/** + * Inits with bounds that encompass |path|. + */ +- (id)initWithPath:(GMSPath *)path; + +/** + * Returns a GMSCoordinateBounds representing + * the current bounds extended to include the passed-in coordinate. + * If the current bounds is invalid, the result is a valid bounds containing + * only |coordinate|. + */ +- (GMSCoordinateBounds *)includingCoordinate:(CLLocationCoordinate2D)coordinate; + +/** + * Returns a GMSCoordinateBounds representing + * the current bounds extended to include the entire other bounds. + * If the current bounds is invalid, the result is a valid bounds equal + * to |other|. + */ +- (GMSCoordinateBounds *)includingBounds:(GMSCoordinateBounds *)other; + +/** + * Returns a GMSCoordinateBounds representing the current bounds extended to + * include |path|. + */ +- (GMSCoordinateBounds *)includingPath:(GMSPath *)path; + +/** + * Returns YES if |coordinate| is contained within this bounds. This includes + * points that lie exactly on the edge of the bounds. + */ +- (BOOL)containsCoordinate:(CLLocationCoordinate2D)coordinate; + +/** + * Returns YES if |other| overlaps with this bounds. + * Two bounds are overlapping if there is at least one coordinate point + * contained by both. + */ +- (BOOL)intersectsBounds:(GMSCoordinateBounds *)other; + +@end + diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSGeocoder.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSGeocoder.h new file mode 100644 index 0000000..6f3574b --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSGeocoder.h @@ -0,0 +1,56 @@ +// +// GMSGeocoder.h +// Google Maps SDK for iOS +// +// Copyright 2012 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +#import + +#import + +@class GMSReverseGeocodeResponse; + +/** GMSGeocoder error codes, embedded in NSError. */ +typedef NS_ENUM(NSInteger, GMSGeocoderErrorCode) { + kGMSGeocoderErrorInvalidCoordinate = 1, + kGMSGeocoderErrorInternal, +}; + +/** Handler that reports a reverse geocoding response, or error. */ +typedef void (^GMSReverseGeocodeCallback)(GMSReverseGeocodeResponse *, NSError *); + +/** + * Exposes a service for reverse geocoding. This maps Earth coordinates (latitude and longitude) to + * a collection of addresses near that coordinate. + */ +@interface GMSGeocoder : NSObject + +/* Convenience constructor for GMSGeocoder. */ ++ (GMSGeocoder *)geocoder; + +/** + * Reverse geocodes a coordinate on the Earth's surface. + * + * @param coordinate The coordinate to reverse geocode. + * @param handler The callback to invoke with the reverse geocode results. + * The callback will be invoked asynchronously from the main thread. + */ +- (void)reverseGeocodeCoordinate:(CLLocationCoordinate2D)coordinate + completionHandler:(GMSReverseGeocodeCallback)handler; + +@end + +/** A collection of results from a reverse geocode request. */ +@interface GMSReverseGeocodeResponse : NSObject + +/** Returns the first result, or nil if no results were available. */ +- (GMSAddress *)firstResult; + +/** Returns an array of all the results (contains GMSAddress), including the first result. */ +- (NSArray *)results; + +@end diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSGeometryUtils.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSGeometryUtils.h new file mode 100644 index 0000000..a50d6f6 --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSGeometryUtils.h @@ -0,0 +1,222 @@ +// +// GMSGeometryUtils.h +// Google Maps SDK for iOS +// +// Copyright 2013 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +/** + * \defgroup GeometryUtils GMSGeometryUtils + * @{ + */ + +#import + +#import + +@class GMSPath; + +/** Average Earth radius in meters. */ +static const CLLocationDistance kGMSEarthRadius = 6371009.0; + +/** + * A point on the map. May represent a projected coordinate. x is in [-1, 1]. + * The axis direction is normal: y grows towards North, x grows towards East. + * (0, 0) is the center of the map. See GMSProject() and GMSUnproject(). + */ +typedef struct GMSMapPoint { + double x; + double y; +} GMSMapPoint; + +/** Projects |coordinate| to the map. |coordinate| must be valid. */ +FOUNDATION_EXPORT +GMSMapPoint GMSProject(CLLocationCoordinate2D coordinate); + +/** Unprojects |point| from the map. point.x must be in [-1, 1]. */ +FOUNDATION_EXPORT +CLLocationCoordinate2D GMSUnproject(GMSMapPoint point); + +/** + * Returns a linearly interpolated point on the segment [a, b], at the fraction + * |t| from |a|. |t|==0 corresponds to |a|, |t|==1 corresponds to |b|. + * The interpolation takes place along the short path between the points + * potentially crossing the date line. E.g. interpolating from San Francisco + * to Tokyo will pass north of Hawaii and cross the date line. + */ +FOUNDATION_EXPORT +GMSMapPoint GMSMapPointInterpolate(GMSMapPoint a, GMSMapPoint b, double t); + +/** + * Returns the length of the segment [a, b] in projected space. The length is + * computed along the short path between the points potentially crossing the + * date line. E.g. the distance between the points corresponding to + * San Francisco and Tokyo measures the segment that passes north of Hawaii + * crossing the date line. + */ +FOUNDATION_EXPORT +double GMSMapPointDistance(GMSMapPoint a, GMSMapPoint b); + +/** + * Returns whether |point| lies inside of path. The path is always cosidered + * closed, regardless of whether the last point equals the first or not. + * Inside is defined as not containing the South Pole -- the South Pole is + * always outside. + * |path| describes great circle segments if |geodesic| is YES, and rhumb + * (loxodromic) segments otherwise. + * If |point| is exactly equal to one of the vertices, the result is YES. + * A point that is not equal to a vertex is on one side or the other of any path + * segment -- it can never be "exactly on the border". + * See GMSGeometryIsLocationOnPath() for a border test with tolerance. + */ +FOUNDATION_EXPORT +BOOL GMSGeometryContainsLocation(CLLocationCoordinate2D point, GMSPath *path, + BOOL geodesic); + +/** + * Returns whether |point| lies on or near |path|, within the specified + * |tolerance| in meters. + * |path| is composed of great circle segments if |geodesic| is YES, and of + * rhumb (loxodromic) segments if |geodesic| is NO. + * See also GMSGeometryIsLocationOnPath(point, path, geodesic). + * + * The tolerance, in meters, is relative to the spherical radius of the Earth. + * If you need to work on a sphere of different radius, + * you may compute the equivalent tolerance from the desired tolerance on the + * sphere of radius R: tolerance = toleranceR * (RadiusEarth / R), + * with RadiusEarth==6371009. + */ +FOUNDATION_EXPORT +BOOL GMSGeometryIsLocationOnPathTolerance(CLLocationCoordinate2D point, + GMSPath *path, + BOOL geodesic, + CLLocationDistance tolerance); + +/** + * Same as GMSGeometryIsLocationOnPath(point, path, geodesic, tolerance), + * with a default tolerance of 0.1 meters. + */ +FOUNDATION_EXPORT +BOOL GMSGeometryIsLocationOnPath(CLLocationCoordinate2D point, + GMSPath *path, + BOOL geodesic); + +/** + * Returns the great circle distance between two coordinates, in meters, + * on Earth. + * This is the shortest distance between the two coordinates on the sphere. + * Both coordinates must be valid. + */ +FOUNDATION_EXPORT +CLLocationDistance GMSGeometryDistance(CLLocationCoordinate2D from, + CLLocationCoordinate2D to); + +/** + * Returns the great circle length of |path|, in meters, on Earth. + * This is the sum of GMSGeometryDistance() over the path segments. + * All the coordinates of the path must be valid. + */ +FOUNDATION_EXPORT +CLLocationDistance GMSGeometryLength(GMSPath *path); + +/** + * Returns the area of a geodesic polygon defined by |path| on Earth. + * The "inside" of the polygon is defined as not containing the South pole. + * If |path| is not closed, it is implicitly treated as a closed path + * nevertheless and the result is the same. + * All coordinates of the path must be valid. + * If any segment of the path is a pair of antipodal points, the + * result is undefined -- because two antipodal points do not form a + * unique great circle segment on the sphere. + * The polygon must be simple (not self-overlapping) and may be concave. + */ +FOUNDATION_EXPORT +double GMSGeometryArea(GMSPath *path); + +/** + * Returns the signed area of a geodesic polygon defined by |path| on Earth. + * The result has the same absolute value as GMSGeometryArea(); it is positive + * if the points of path are in counter-clockwise order, and negative otherwise. + * The same restrictions as on GMSGeometryArea() apply. + */ +FOUNDATION_EXPORT +double GMSGeometrySignedArea(GMSPath *path); + +/** + * Returns the initial heading (degrees clockwise of North) at |from| + * of the shortest path to |to|. + * Returns 0 if the two coordinates are the same. + * Both coordinates must be valid. + * The returned value is in the range [0, 360). + * + * To get the final heading at |to| one may use + * (GMSGeometryHeading(|to|, |from|) + 180) modulo 360. + */ +FOUNDATION_EXPORT +CLLocationDirection GMSGeometryHeading(CLLocationCoordinate2D from, + CLLocationCoordinate2D to); + +/** + * Returns the destination coordinate, when starting at |from| + * with initial |heading|, travelling |distance| meters along a great circle + * arc, on Earth. + * The resulting longitude is in the range [-180, 180). + * Both coordinates must be valid. + */ +FOUNDATION_EXPORT +CLLocationCoordinate2D GMSGeometryOffset(CLLocationCoordinate2D from, + CLLocationDistance distance, + CLLocationDirection heading); + +/** + * Returns the coordinate that lies the given |fraction| of the way between + * the |from| and |to| coordinates on the shortest path between the two. + * The resulting longitude is in the range [-180, 180). + */ +FOUNDATION_EXPORT +CLLocationCoordinate2D GMSGeometryInterpolate(CLLocationCoordinate2D from, + CLLocationCoordinate2D to, + double fraction); + + +/** + * Returns an NSArray of GMSStyleSpan constructed by repeated application of style and length + * information from |styles| and |lengths| along |path|. + * + * |path| the path along which the output spans are computed. + * |styles| an NSArray of GMSStrokeStyle. Wraps if consumed. Can't be empty. + * |lengths| an NSArray of NSNumber; each entry gives the length of the corresponding + * style from |styles|. Wraps if consumed. Can't be empty. + * |lengthKind| the interpretation of values from |lengths| (geodesic, rhumb or projected). + * + * Example: a polyline with alternating black and white spans: + * + *
+ * GMSMutablePath *path;
+ * NSArray *styles = @[[GMSStrokeStyle solidColor:[UIColor whiteColor]],
+ *                     [GMSStrokeStyle solidColor:[UIColor blackColor]]];
+ * NSArray *lengths = @[@100000, @50000];
+ * polyline.path = path;
+ * polyline.spans = GMSStyleSpans(path, styles, lengths, kGMSLengthRhumb);
+ * 
+ */ +FOUNDATION_EXPORT +NSArray *GMSStyleSpans(GMSPath *path, NSArray *styles, NSArray *lengths, GMSLengthKind lengthKind); + +/** + * Similar to GMSStyleSpans(path, styles, lengths, lengthKind) but additionally takes an initial + * length offset that will be skipped over relative to the |lengths| array. + * + * |lengthOffset| the length (e.g. in meters) that should be skipped initially from |lengths|. + */ +FOUNDATION_EXPORT +NSArray *GMSStyleSpansOffset(GMSPath *path, + NSArray *styles, + NSArray *lengths, + GMSLengthKind lengthKind, + double lengthOffset); + +/**@}*/ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSGroundOverlay.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSGroundOverlay.h new file mode 100644 index 0000000..de88e0a --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSGroundOverlay.h @@ -0,0 +1,75 @@ +// +// GMSGroundOverlay.h +// Google Maps SDK for iOS +// +// Copyright 2013 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +#import + +@class GMSCoordinateBounds; + +/** + * GMSGroundOverlay specifies the available options for a ground overlay that + * exists on the Earth's surface. Unlike a marker, the position of a ground + * overlay is specified explicitly and it does not face the camera. + */ +@interface GMSGroundOverlay : GMSOverlay + +/** + * The position of this GMSGroundOverlay, or more specifically, the physical + * position of its anchor. If this is changed, |bounds| will be moved around + * the new position. + */ +@property(nonatomic, assign) CLLocationCoordinate2D position; + +/** + * The anchor specifies where this GMSGroundOverlay is anchored to the Earth in + * relation to |bounds|. If this is modified, |position| will be set to the + * corresponding new position within |bounds|. + */ +@property(nonatomic, assign) CGPoint anchor; + +/** + * Icon to render within |bounds| on the Earth. If this is nil, the overlay will + * not be visible (unlike GMSMarker which has a default image). + */ +@property(nonatomic, strong) UIImage *icon; + +/** + * Bearing of this ground overlay, in degrees. The default value, zero, points + * this ground overlay up/down along the normal Y axis of the earth. + */ +@property(nonatomic, assign) CLLocationDirection bearing; + +/** + * The 2D bounds on the Earth in which |icon| is drawn. Changing this value + * will adjust |position| accordingly. + */ +@property(nonatomic, strong) GMSCoordinateBounds *bounds; + +/** + * Convenience constructor for GMSGroundOverlay for a particular |bounds| and + * |icon|. Will set |position| accordingly. + */ ++ (instancetype)groundOverlayWithBounds:(GMSCoordinateBounds *)bounds + icon:(UIImage *)icon; + +/** + * Constructs a GMSGroundOverlay that renders the given |icon| at |position|, + * as if the image's actual size matches camera pixels at |zoomLevel|. + */ ++ (instancetype)groundOverlayWithPosition:(CLLocationCoordinate2D)position + icon:(UIImage *)icon + zoomLevel:(CGFloat)zoomLevel; + +@end + +/** + * The default position of the ground anchor of a GMSGroundOverlay: the center + * point of the icon. + */ +FOUNDATION_EXTERN const CGPoint kGMSGroundOverlayDefaultAnchor; diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSIndoorBuilding.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSIndoorBuilding.h new file mode 100644 index 0000000..c217483 --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSIndoorBuilding.h @@ -0,0 +1,35 @@ +// +// GMSIndoorBuilding.h +// Google Maps SDK for iOS +// +// Copyright 2013 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + + +#import + +/** + * Describes a building which contains levels. + */ +@interface GMSIndoorBuilding : NSObject + +/** + * Array of GMSIndoorLevel describing the levels which make up the building. + * The levels are in 'display order' from top to bottom. + */ +@property(nonatomic, strong, readonly) NSArray *levels; + +/** + * Index in the levels array of the default level. + */ +@property(nonatomic, assign, readonly) NSUInteger defaultLevelIndex; + +/** + * If YES, the building is entirely underground and supports being hidden. + */ +@property(nonatomic, assign, readonly, getter=isUnderground) BOOL underground; + +@end diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSIndoorDisplay.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSIndoorDisplay.h new file mode 100644 index 0000000..0094cf4 --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSIndoorDisplay.h @@ -0,0 +1,61 @@ +// +// GMSIndoorDisplay.h +// Google Maps SDK for iOS +// +// Copyright 2013 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +#import + +@class GMSIndoorBuilding; +@class GMSIndoorLevel; + +/** Delegate for events on GMSIndoorDisplay. */ +@protocol GMSIndoorDisplayDelegate +@optional + +/** + * Raised when the activeBuilding has changed. The activeLevel will also have + * already been updated for the new building, but didChangeActiveLevel: will + * be raised after this method. + */ +- (void)didChangeActiveBuilding:(GMSIndoorBuilding *)building; + +/** + * Raised when the activeLevel has changed. This event is raised for all + * changes, including explicit setting of the property. + */ +- (void)didChangeActiveLevel:(GMSIndoorLevel *)level; + +@end + +/** + * Provides ability to observe or control the display of indoor level data. + * + * Like GMSMapView, GMSIndoorDisplay may only be used from the main thread. + */ +@interface GMSIndoorDisplay : NSObject + +/** GMSIndoorDisplay delegate */ +@property(nonatomic, weak) id delegate; + +/** + * Provides the currently focused building, will be nil if there is no + * building with indoor data currently under focus. + */ +@property(nonatomic, strong, readonly) GMSIndoorBuilding *activeBuilding; + +/** + * Provides and controls the active level for activeBuilding. Will be updated + * whenever activeBuilding changes, and may be set to any member of + * activeBuilding's levels property. May also be set to nil if the building is + * underground, to stop showing the building (the building will remain active). + * Will always be nil if activeBuilding is nil. + * Any attempt to set it to an invalid value will be ignored. + */ +@property(nonatomic, strong) GMSIndoorLevel *activeLevel; + +@end diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSIndoorLevel.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSIndoorLevel.h new file mode 100644 index 0000000..3fb3d21 --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSIndoorLevel.h @@ -0,0 +1,27 @@ +// +// GMSIndoorLevel.h +// Google Maps SDK for iOS +// +// Copyright 2013 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + + +#import + +/** + * Describes a single level in a building. + * Multiple buildings can share a level - in this case the level instances will + * compare as equal, even though the level numbers/names may be different. + */ +@interface GMSIndoorLevel : NSObject + +/** Localized display name for the level, e.g. "Ground floor". */ +@property(nonatomic, copy, readonly) NSString *name; + +/** Localized short display name for the level, e.g. "1". */ +@property(nonatomic, copy, readonly) NSString *shortName; + +@end diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSMapLayer.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSMapLayer.h new file mode 100644 index 0000000..6c8388b --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSMapLayer.h @@ -0,0 +1,96 @@ +// +// GMSMapLayer.h +// Google Maps SDK for iOS +// +// Copyright 2013 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +#import +#import + +#import + +/** + * The following layer properties and constants describe the camera properties + * that may be animated on the custom model layer of a GMSMapView with Core + * Animation. For simple camera control and animation, please see the helper + * methods in GMSMapView+Animation.h, and the camera object definition within + * GMSCameraPosition.h. + * + * Changing layer properties triggers an implicit animation, e.g.:- + * mapView_.layer.cameraBearing = 20; + * + * An explicit animation, replacing the implicit animation, may be added after + * changing the property, e.g.- + * CAMediaTimingFunction *curve = [CAMediaTimingFunction functionWithName: + * kCAMediaTimingFunctionEaseInEaseOut]; + * CABasicAnimation *animation = + * [CABasicAnimation animationWithKeyPath:kGMSLayerCameraBearingKey]; + * animation.duration = 2.0f; + * animation.timingFunction = curve; + * animation.toValue = @20; + * [mapView_.layer addAnimation:animation forKey:kGMSLayerCameraBearingKey]; + * + * To control several implicit animations, Core Animation's transaction support + * may be used, e.g.- + * [CATransaction begin]; + * [CATransaction setAnimationDuration:2.0f]; + * mapView_.layer.cameraBearing = 20; + * mapView_.layer.cameraViewingAngle = 30; + * [CATransaction commit]; + * + * Note that these properties are not view-based. Please see "Animating View + * and Layer Changes Together" in the View Programming Guide for iOS- + * http://developer.apple.com/library/ios/#documentation/windowsviews/conceptual/viewpg_iphoneos/AnimatingViews/AnimatingViews.html + */ + +/** + * kGMSLayerCameraLatitudeKey ranges from [-85, 85], and values outside this + * range will be clamped. + */ +extern NSString *const kGMSLayerCameraLatitudeKey; + +/** + * kGMSLayerCameraLongitudeKey ranges from [-180, 180), and values outside this + * range will be wrapped to within this range. + */ +extern NSString *const kGMSLayerCameraLongitudeKey; + +/** + * kGMSLayerCameraBearingKey ranges from [0, 360), and values are wrapped. + */ +extern NSString *const kGMSLayerCameraBearingKey; + +/** + * kGMSLayerCameraZoomLevelKey ranges from [kGMSMinZoomLevel, kGMSMaxZoomLevel], + * and values are clamped. + */ +extern NSString *const kGMSLayerCameraZoomLevelKey; + +/** + * kGMSLayerCameraViewingAngleKey ranges from zero (i.e., facing straight down) + * and to between 30 and 45 degrees towards the horizon, depending on the model + * zoom level. + */ +extern NSString *const kGMSLayerCameraViewingAngleKey; + +/** + * GMSMapLayer is a custom subclass of CALayer, provided as the layer class on + * GMSMapView. This layer should not be instantiated directly. It provides + * model access to the camera normally defined on GMSMapView. + * + * Modifying or animating these properties will typically interrupt any current + * gesture on GMSMapView, e.g., a user's pan or rotation. Similarly, if a user + * performs an enabled gesture during an animation, the animation will stop + * 'in-place' (at the current presentation value). + */ +@interface GMSMapLayer : GMSCALayer +@property(nonatomic, assign) CLLocationDegrees cameraLatitude; +@property(nonatomic, assign) CLLocationDegrees cameraLongitude; +@property(nonatomic, assign) CLLocationDirection cameraBearing; +@property(nonatomic, assign) float cameraZoomLevel; +@property(nonatomic, assign) double cameraViewingAngle; +@end diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSMapView+Animation.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSMapView+Animation.h new file mode 100644 index 0000000..7dd2fef --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSMapView+Animation.h @@ -0,0 +1,57 @@ +// +// GMSMapView+Animation.h +// Google Maps SDK for iOS +// +// Copyright 2013 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +#import + +/** + * GMSMapView (Animation) offers several animation helper methods. + * + * During any animation, retrieving the camera position through the camera + * property on GMSMapView returns an intermediate immutable GMSCameraPosition. + * This camera position will typically represent the most recently drawn frame. + */ +@interface GMSMapView (Animation) + +/** Animates the camera of this map to |cameraPosition|. */ +- (void)animateToCameraPosition:(GMSCameraPosition *)cameraPosition; + +/** + * As animateToCameraPosition:, but changes only the location of the camera + * (i.e., from the current location to |location|). + */ +- (void)animateToLocation:(CLLocationCoordinate2D)location; + +/** + * As animateToCameraPosition:, but changes only the zoom level of the camera. + * This value is clamped by [kGMSMinZoomLevel, kGMSMaxZoomLevel]. + */ +- (void)animateToZoom:(float)zoom; + +/** + * As animateToCameraPosition:, but changes only the bearing of the camera (in + * degrees). Zero indicates true north. + */ +- (void)animateToBearing:(CLLocationDirection)bearing; + +/** + * As animateToCameraPosition:, but changes only the viewing angle of the camera + * (in degrees). This value will be clamped to a minimum of zero (i.e., facing + * straight down) and between 30 and 45 degrees towards the horizon, depending + * on the relative closeness to the earth. + */ +- (void)animateToViewingAngle:(double)viewingAngle; + +/** + * Applies |cameraUpdate| to the current camera, and then uses the result as + * per animateToCameraPosition:. + */ +- (void)animateWithCameraUpdate:(GMSCameraUpdate *)cameraUpdate; + +@end diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSMapView.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSMapView.h new file mode 100644 index 0000000..f58023e --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSMapView.h @@ -0,0 +1,378 @@ +// +// GMSMapView.h +// Google Maps SDK for iOS +// +// Copyright 2012 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +#import +#import + +#import +#import + +#ifndef __GMS_AVAILABLE_BUT_DEPRECATED +#define __GMS_AVAILABLE_BUT_DEPRECATED __deprecated +#endif + +@class GMSCameraPosition; +@class GMSCameraUpdate; +@class GMSCoordinateBounds; +@class GMSIndoorDisplay; +@class GMSMapLayer; +@class GMSMapView; +@class GMSMarker; +@class GMSOverlay; +@class GMSProjection; + +/** Delegate for events on GMSMapView. */ +@protocol GMSMapViewDelegate + +@optional + +/** + * Called before the camera on the map changes, either due to a gesture, + * animation (e.g., by a user tapping on the "My Location" button) or by being + * updated explicitly via the camera or a zero-length animation on layer. + * + * @param gesture If YES, this is occuring due to a user gesture. +*/ +- (void)mapView:(GMSMapView *)mapView willMove:(BOOL)gesture; + +/** + * Called repeatedly during any animations or gestures on the map (or once, if + * the camera is explicitly set). This may not be called for all intermediate + * camera positions. It is always called for the final position of an animation + * or gesture. + */ +- (void)mapView:(GMSMapView *)mapView + didChangeCameraPosition:(GMSCameraPosition *)position; + +/** + * Called when the map becomes idle, after any outstanding gestures or + * animations have completed (or after the camera has been explicitly set). + */ +- (void)mapView:(GMSMapView *)mapView + idleAtCameraPosition:(GMSCameraPosition *)position; + +/** + * Called after a tap gesture at a particular coordinate, but only if a marker + * was not tapped. This is called before deselecting any currently selected + * marker (the implicit action for tapping on the map). + */ +- (void)mapView:(GMSMapView *)mapView + didTapAtCoordinate:(CLLocationCoordinate2D)coordinate; + +/** + * Called after a long-press gesture at a particular coordinate. + * + * @param mapView The map view that was pressed. + * @param coordinate The location that was pressed. + */ +- (void)mapView:(GMSMapView *)mapView + didLongPressAtCoordinate:(CLLocationCoordinate2D)coordinate; + +/** + * Called after a marker has been tapped. + * + * @param mapView The map view that was pressed. + * @param marker The marker that was pressed. + * @return YES if this delegate handled the tap event, which prevents the map + * from performing its default selection behavior, and NO if the map + * should continue with its default selection behavior. + */ +- (BOOL)mapView:(GMSMapView *)mapView didTapMarker:(GMSMarker *)marker; + +/** + * Called after a marker's info window has been tapped. + */ +- (void)mapView:(GMSMapView *)mapView + didTapInfoWindowOfMarker:(GMSMarker *)marker; + +/** + * Called after an overlay has been tapped. + * This method is not called for taps on markers. + * + * @param mapView The map view that was pressed. + * @param overlay The overlay that was pressed. + */ +- (void)mapView:(GMSMapView *)mapView didTapOverlay:(GMSOverlay *)overlay; + +/** + * Called when a marker is about to become selected, and provides an optional + * custom info window to use for that marker if this method returns a UIView. + * If you change this view after this method is called, those changes will not + * necessarily be reflected in the rendered version. + * + * The returned UIView must not have bounds greater than 500 points on either + * dimension. As there is only one info window shown at any time, the returned + * view may be reused between other info windows. + * + * Removing the marker from the map or changing the map's selected marker during + * this call results in undefined behavior. + * + * @return The custom info window for the specified marker, or nil for default + */ +- (UIView *)mapView:(GMSMapView *)mapView markerInfoWindow:(GMSMarker *)marker; + +/** + * Called when mapView:markerInfoWindow: returns nil. If this method returns a + * view, it will be placed within the default info window frame. If this method + * returns nil, then the default rendering will be used instead. + * + * @param mapView The map view that was pressed. + * @param marker The marker that was pressed. + * @return The custom view to disaply as contents in the info window, or null to + * use the default content rendering instead + */ + +- (UIView *)mapView:(GMSMapView *)mapView markerInfoContents:(GMSMarker *)marker; + +/** + * Called when dragging has been initiated on a marker. + */ +- (void)mapView:(GMSMapView *)mapView didBeginDraggingMarker:(GMSMarker *)marker; + +/** + * Called after dragging of a marker ended. + */ +- (void)mapView:(GMSMapView *)mapView didEndDraggingMarker:(GMSMarker *)marker; + +/** + * Called while a marker is dragged. + */ +- (void)mapView:(GMSMapView *)mapView didDragMarker:(GMSMarker *)marker; + +/** + * Called when the My Location button is tapped. + * + * @return YES if the listener has consumed the event (i.e., the default behavior should not occur), + * NO otherwise (i.e., the default behavior should occur). The default behavior is for the + * camera to move such that it is centered on the user location. + */ +- (BOOL)didTapMyLocationButtonForMapView:(GMSMapView *)mapView; + +@end + +/** + * Display types for GMSMapView. + */ +typedef enum { + /** Basic maps. The default. */ + kGMSTypeNormal = 1, + + /** Satellite maps with no labels. */ + kGMSTypeSatellite, + + /** Terrain maps. */ + kGMSTypeTerrain, + + /** Satellite maps with a transparent label overview. */ + kGMSTypeHybrid, + + /** No maps, no labels. Display of traffic data is not supported. */ + kGMSTypeNone, + +} GMSMapViewType; + +/** + * This is the main class of the Google Maps SDK for iOS and is the entry point + * for all methods related to the map. + * + * The map should be instantiated via the convenience constructor + * [GMSMapView mapWithFrame:camera:]. It may also be created with the default + * [[GMSMapView alloc] initWithFrame:] method (wherein its camera will be set to + * a default location). + * + * GMSMapView can only be read and modified from the main thread, similar to all + * UIKit objects. Calling these methods from another thread will result in an + * exception or undefined behavior. + */ +@interface GMSMapView : UIView + +/** GMSMapView delegate. */ +@property(nonatomic, weak) IBOutlet id delegate; + +/** + * Controls the camera, which defines how the map is oriented. Modification of + * this property is instantaneous. + */ +@property(nonatomic, copy) GMSCameraPosition *camera; + +/** + * Returns a GMSProjection object that you can use to convert between screen + * coordinates and latitude/longitude coordinates. + * + * This is a snapshot of the current projection, and will not automatically + * update when the camera moves. It represents either the projection of the last + * drawn GMSMapView frame, or; where the camera has been explicitly set or the + * map just created, the upcoming frame. It will never be nil. + */ +@property(nonatomic, readonly) GMSProjection *projection; + +/** + * Controls whether the My Location dot and accuracy circle is enabled. + * Defaults to NO. + */ +@property(nonatomic, assign, getter=isMyLocationEnabled) BOOL myLocationEnabled; + +/** + * If My Location is enabled, reveals where the user location dot is being + * drawn. If it is disabled, or it is enabled but no location data is available, + * this will be nil. This property is observable using KVO. + */ +@property(nonatomic, strong, readonly) CLLocation *myLocation; + +/** + * The marker that is selected. Setting this property selects a particular + * marker, showing an info window on it. If this property is non-nil, setting + * it to nil deselects the marker, hiding the info window. This property is + * observable using KVO. + */ +@property(nonatomic, strong) GMSMarker *selectedMarker; + +/** + * Controls whether the map is drawing traffic data, if available. This is + * subject to the availability of traffic data. Defaults to NO. + */ +@property(nonatomic, assign, getter=isTrafficEnabled) BOOL trafficEnabled; + +/** + * Controls the type of map tiles that should be displayed. Defaults to + * kGMSTypeNormal. + */ +@property(nonatomic, assign) GMSMapViewType mapType; + +/** + * Minimum zoom (the farthest the camera may be zoomed out). Defaults to + * kGMSMinZoomLevel. Modified with -setMinZoom:maxZoom:. + */ +@property(nonatomic, assign, readonly) float minZoom; + +/** + * Maximum zoom (the closest the camera may be to the Earth). Defaults to + * kGMSMaxZoomLevel. Modified with -setMinZoom:maxZoom:. + */ +@property(nonatomic, assign, readonly) float maxZoom; + +/** + * If set, 3D buildings will be shown where available. Defaults to YES. + * + * This may be useful when adding a custom tile layer to the map, in order to + * make it clearer at high zoom levels. Changing this value will cause all + * tiles to be briefly invalidated. + */ +@property(nonatomic, assign, getter=isBuildingsEnabled) BOOL buildingsEnabled; + +/** + * Sets whether indoor maps are shown, where available. Defaults to YES. + * + * If this is set to NO, caches for indoor data may be purged and any floor + * currently selected by the end-user may be reset. + */ +@property(nonatomic, assign, getter=isIndoorEnabled) BOOL indoorEnabled; + +/** + * Gets the GMSIndoorDisplay instance which allows to observe or control + * aspects of indoor data display. + */ +@property(nonatomic, strong, readonly) GMSIndoorDisplay *indoorDisplay; + +/** + * Gets the GMSUISettings object, which controls user interface settings for the + * map. + */ +@property(nonatomic, strong, readonly) GMSUISettings *settings; + +/** + * Controls the 'visible' region of the view. By applying padding an area + * arround the edge of the view can be created which will contain map data + * but will not contain UI controls. + * + * If the padding is not balanced, the visual center of the view will move as + * appropriate. Padding will also affect the |projection| property so the + * visible region will not include the padding area. GMSCameraUpdate + * fitToBounds will ensure that both this padding and any padding requested + * will be taken into account. + * + * This property may be animated within a UIView-based animation block. + */ +@property(nonatomic, assign) UIEdgeInsets padding; + +/** + * Defaults to YES. If set to NO, GMSMapView will generate accessibility + * elements for overlay objects, such as GMSMarker and GMSPolyline. + * + * This property is as per the informal UIAcessibility protocol, except for the + * default value of YES. + */ +@property(nonatomic) BOOL accessibilityElementsHidden; + +/** + * Accessor for the custom CALayer type used for the layer. + */ +@property(nonatomic, readonly, retain) GMSMapLayer *layer; + +/** + * Builds and returns a GMSMapView, with a frame and camera target. + */ ++ (instancetype)mapWithFrame:(CGRect)frame camera:(GMSCameraPosition *)camera; + +/** + * Tells this map to power up its renderer. This is optional and idempotent. + * + * This method is obsolete and deprecated and will be removed in a future release. + */ +- (void)startRendering __GMS_AVAILABLE_BUT_DEPRECATED; + +/** + * Tells this map to power down its renderer. This is optional and idempotent. + * + * This method is obsolete and deprecated and will be removed in a future release. + */ +- (void)stopRendering __GMS_AVAILABLE_BUT_DEPRECATED; + +/** + * Clears all markup that has been added to the map, including markers, + * polylines and ground overlays. This will not clear the visible location dot + * or reset the current mapType. + */ +- (void)clear; + +/** + * Sets |minZoom| and |maxZoom|. This method expects the minimum to be less than + * or equal to the maximum, and will throw an exception with name + * NSRangeException otherwise. + */ +- (void)setMinZoom:(float)minZoom maxZoom:(float)maxZoom; + +/** + * Build a GMSCameraPosition that presents |bounds| with |padding|. The camera + * will have a zero bearing and tilt (i.e., facing north and looking directly at + * the Earth). This takes the frame and padding of this GMSMapView into account. + * + * If the bounds is nil or invalid this method will return a nil camera. + */ +- (GMSCameraPosition *)cameraForBounds:(GMSCoordinateBounds *)bounds + insets:(UIEdgeInsets)insets; + +/** + * Changes the camera according to |update|. + * The camera change is instantaneous (with no animation). + */ +- (void)moveCamera:(GMSCameraUpdate *)update; + +@end + +/** + * Accessibility identifier for the compass button. + */ +extern NSString *const kGMSAccessibilityCompass; + +/** + * Accessibility identifier for the "my location" button. + */ +extern NSString *const kGMSAccessibilityMyLocation; diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSMarker.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSMarker.h new file mode 100644 index 0000000..aaf0f99 --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSMarker.h @@ -0,0 +1,151 @@ +// +// GMSMarker.h +// Google Maps SDK for iOS +// +// Copyright 2012 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +#import + +@class GMSMarkerLayer; +@class GMSPanoramaView; +@class UIImage; + +/** + * Animation types for GMSMarker. + */ +typedef enum { + /** No animation (default). */ + kGMSMarkerAnimationNone = 0, + + /** The marker will pop from its groundAnchor when added. */ + kGMSMarkerAnimationPop, +} GMSMarkerAnimation; + +/** + * A marker is an icon placed at a particular point on the map's surface. A + * marker's icon is drawn oriented against the device's screen rather than the + * map's surface; i.e., it will not necessarily change orientation due to map + * rotations, tilting, or zooming. + */ +@interface GMSMarker : GMSOverlay + +/** Marker position. Animated. */ +@property(nonatomic, assign) CLLocationCoordinate2D position; + +/** Snippet text, shown beneath the title in the info window when selected. */ +@property(nonatomic, copy) NSString *snippet; + +/** + * Marker icon to render. If left nil, uses a default SDK place marker. + * + * Supports animated images, but each frame must be the same size or the + * behavior is undefined. + * + * Supports the use of alignmentRectInsets to specify a reduced tap area. This + * also redefines how anchors are specified. For an animated image the + * value for the animation is used, not the individual frames. + */ +@property(nonatomic, strong) UIImage *icon; + +/** + * The ground anchor specifies the point in the icon image that is anchored to + * the marker's position on the Earth's surface. This point is specified within + * the continuous space [0.0, 1.0] x [0.0, 1.0], where (0,0) is the top-left + * corner of the image, and (1,1) is the bottom-right corner. + * + * If the image has non-zero alignmentRectInsets, the top-left and bottom-right + * mentioned above refer to the inset section of the image. + */ +@property(nonatomic, assign) CGPoint groundAnchor; + +/** + * The info window anchor specifies the point in the icon image at which to + * anchor the info window, which will be displayed directly above this point. + * This point is specified within the same space as groundAnchor. + */ +@property(nonatomic, assign) CGPoint infoWindowAnchor; + +/** + * Controls the animation used when this marker is placed on a GMSMapView + * (default kGMSMarkerAnimationNone, no animation). + */ +@property(nonatomic, assign) GMSMarkerAnimation appearAnimation; + +/** + * Controls whether this marker can be dragged interactively (default NO). + */ +@property(nonatomic, assign, getter=isDraggable) BOOL draggable; + +/** + * Controls whether this marker should be flat against the Earth's surface (YES) + * or a billboard facing the camera (NO, default). + */ +@property(nonatomic, assign, getter=isFlat) BOOL flat; + +/** + * Sets the rotation of the marker in degrees clockwise about the marker's + * anchor point. The axis of rotation is perpendicular to the marker. A rotation + * of 0 corresponds to the default position of the marker. Animated. + * + * When the marker is flat on the map, the default position is north aligned and + * the rotation is such that the marker always remains flat on the map. When the + * marker is a billboard, the default position is pointing up and the rotation + * is such that the marker is always facing the camera. + */ +@property(nonatomic, assign) CLLocationDegrees rotation; + +/** + * Sets the opacity of the marker, between 0 (completely transparent) and 1 + * (default) inclusive. + */ +@property(nonatomic, assign) float opacity; + +/** + * Marker data. You can use this property to associate an arbitrary object with + * this marker. Google Maps SDK for iOS neither reads nor writes this property. + * + * Note that userData should not hold any strong references to any Maps + * objects, otherwise a loop may be created (preventing ARC from releasing + * objects). + */ +@property(nonatomic, strong) id userData; + +/** + * Provides the Core Animation layer for this GMSMarker. + */ +@property(nonatomic, strong, readonly) GMSMarkerLayer *layer; + +/** + * The |panoramaView| specifies which panorama view will attempt to show this + * marker. Note that if the marker's |position| is too far away from the + * |panoramaView|'s current panorama location, it will not be displayed as it + * will be too small. + * Can be set to nil to remove the marker from any current panorama view it + * is attached to. + * A marker can be shown on both a panorama and a map at the same time. + */ +@property(nonatomic, weak) GMSPanoramaView *panoramaView; + +/** Convenience constructor for a default marker. */ ++ (instancetype)markerWithPosition:(CLLocationCoordinate2D)position; + +/** Creates a tinted version of the default marker image for use as an icon. */ ++ (UIImage *)markerImageWithColor:(UIColor *)color; + +@end + +/** + * The default position of the ground anchor of a GMSMarker: the center bottom + * point of the marker icon. + */ +FOUNDATION_EXTERN const CGPoint kGMSMarkerDefaultGroundAnchor; + +/** + * The default position of the info window anchor of a GMSMarker: the center top + * point of the marker icon. + */ +FOUNDATION_EXTERN const CGPoint kGMSMarkerDefaultInfoWindowAnchor; diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSMarkerLayer.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSMarkerLayer.h new file mode 100644 index 0000000..91347b2 --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSMarkerLayer.h @@ -0,0 +1,42 @@ +// +// GMSMarkerLayer.h +// Google Maps SDK for iOS +// +// Copyright 2013 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +#import +#import + +/** + * GMSMarkerLayer is a custom subclass of CALayer, available on a per-marker + * basis, that allows animation of several properties of its associated + * GMSMarker. + * + * Note that this CALayer is never actually rendered directly, as GMSMapView is + * provided entirely via an OpenGL layer. As such, adjustments or animations to + * 'default' properties of CALayer will not have any effect. + */ +@interface GMSMarkerLayer : CALayer + +/** Latitude, part of |position| on GMSMarker. */ +@property(nonatomic, assign) CLLocationDegrees latitude; + +/** Longitude, part of |position| on GMSMarker. */ +@property(nonatomic, assign) CLLocationDegrees longitude; + +/** Rotation, as per GMSMarker. */ +@property(nonatomic, assign) CLLocationDegrees rotation; + +/** Opacity, as per GMSMarker. */ +@property float opacity; + +@end + +extern NSString *const kGMSMarkerLayerLatitude; +extern NSString *const kGMSMarkerLayerLongitude; +extern NSString *const kGMSMarkerLayerRotation; +extern NSString *const kGMSMarkerLayerOpacity; diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSMutablePath.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSMutablePath.h new file mode 100644 index 0000000..4f0100c --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSMutablePath.h @@ -0,0 +1,61 @@ +// +// GMSMutablePath.h +// Google Maps SDK for iOS +// +// Copyright 2013 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +#import + +#import +#import + +/** + * GMSMutablePath is a dynamic (resizable) array of CLLocationCoordinate2D. All coordinates must be + * valid. GMSMutablePath is the mutable counterpart to the immutable GMSPath. + */ +@interface GMSMutablePath : GMSPath + +/** Adds |coord| at the end of the path. */ +- (void)addCoordinate:(CLLocationCoordinate2D)coord; + +/** Adds a new CLLocationCoordinate2D instance with the given lat/lng. */ +- (void)addLatitude:(CLLocationDegrees)latitude longitude:(CLLocationDegrees)longitude; + +/** + * Inserts |coord| at |index|. + * + * If this is smaller than the size of the path, shifts all coordinates forward by one. Otherwise, + * behaves as replaceCoordinateAtIndex:withCoordinate:. + */ +- (void)insertCoordinate:(CLLocationCoordinate2D)coord atIndex:(NSUInteger)index; + +/** + * Replace the coordinate at |index| with |coord|. If |index| is after the end, grows the array with + * an undefined coordinate. + */ +- (void)replaceCoordinateAtIndex:(NSUInteger)index + withCoordinate:(CLLocationCoordinate2D)coord; + +/** + * Remove entry at |index|. + * + * If |index| < count decrements size. If |index| >= count this is a silent + * no-op. + */ +- (void)removeCoordinateAtIndex:(NSUInteger)index; + +/** + * Removes the last coordinate of the path. + * + * If the array is non-empty decrements size. If the array is empty, this is a silent no-op. + */ +- (void)removeLastCoordinate; + +/** Removes all coordinates in this path. */ +- (void)removeAllCoordinates; + +@end diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSOrientation.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSOrientation.h new file mode 100644 index 0000000..9a975c4 --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSOrientation.h @@ -0,0 +1,40 @@ +// +// GMSOrientation.h +// Google Maps SDK for iOS +// +// Copyright 2013 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +#import + +/** + * GMSOrientation is a tuple of heading and pitch used to control the viewing direction of a + * GMSPanoramaCamera. + */ +typedef struct { + /** The camera heading (horizontal angle) in degrees. */ + const CLLocationDirection heading; + + /** + * The camera pitch (vertical angle), in degrees from the horizon. The |pitch| range is [-90,90], + * although it is possible that not the full range is supported. + */ + const double pitch; +} GMSOrientation; + +#ifdef __cplusplus +extern "C" { +#endif + +/** Returns a GMSOrientation with the given |heading| and |pitch|. */ +inline GMSOrientation GMSOrientationMake(CLLocationDirection heading, double pitch) { + GMSOrientation orientation = {heading, pitch}; + return orientation; +} + +#ifdef __cplusplus +} +#endif diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSOverlay.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSOverlay.h new file mode 100644 index 0000000..a404868 --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSOverlay.h @@ -0,0 +1,56 @@ +// +// GMSOverlay.h +// Google Maps SDK for iOS +// +// Copyright 2013 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +#import + +@class GMSMapView; + +/** + * GMSOverlay is an abstract class that represents some overlay that may be + * attached to a specific GMSMapView. It may not be instantiated directly; + * instead, instances of concrete overlay types should be created directly + * (such as GMSMarker, GMSPolyline, and GMSPolygon). + * + * This supports the NSCopying protocol; [overlay_ copy] will return a copy + * of the overlay type, but with |map| set to nil. + */ +@interface GMSOverlay : NSObject + +/** + * Title, a short description of the overlay. Some overlays, such as markers, + * will display the title on the map. The title is also the default + * accessibility text. + */ +@property(nonatomic, copy) NSString *title; + +/** + * The map this overlay is on. Setting this property will add the overlay to the + * map. Setting it to nil removes this overlay from the map. An overlay may be + * active on at most one map at any given time. + */ +@property(nonatomic, weak) GMSMapView *map; + +/** + * If this overlay should cause tap notifications. Some overlays, such as + * markers, will default to being tappable. + */ +@property(nonatomic, assign, getter=isTappable) BOOL tappable; + +/** + * Higher |zIndex| value overlays will be drawn on top of lower |zIndex| + * value tile layers and overlays. Equal values result in undefined draw + * ordering. Markers are an exception that regardless of |zIndex|, they will + * always be drawn above tile layers and other non-marker overlays; they + * are effectively considered to be in a separate z-index group compared to + * other overlays. + */ +@property(nonatomic, assign) int zIndex; + +@end diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPanorama.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPanorama.h new file mode 100644 index 0000000..25a4e90 --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPanorama.h @@ -0,0 +1,28 @@ +// +// GMSPanorama.h +// Google Maps SDK for iOS +// +// Copyright 2013 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +#import + +/** + * GMSPanorama represents metadata for a specific panorama on the Earth. This class is not + * instantiable directly and is obtained via GMSPanoramaService or GMSPanoramaView. + */ +@interface GMSPanorama : NSObject + +/** The precise location of this panorama. */ +@property(nonatomic, readonly) CLLocationCoordinate2D coordinate; + +/** The ID of this panorama. Panoramas may change ID over time, so this should not be persisted */ +@property(nonatomic, copy, readonly) NSString *panoramaID; + +/** An array of GMSPanoramaLink describing the neighboring panoramas. */ +@property(nonatomic, copy, readonly) NSArray *links; + +@end diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPanoramaCamera.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPanoramaCamera.h new file mode 100644 index 0000000..bf02be4 --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPanoramaCamera.h @@ -0,0 +1,77 @@ +// +// GMSPanoramaCamera.h +// Google Maps SDK for iOS +// +// Copyright 2013 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +#import + +#import + +/** + * GMSPanoramaCamera is used to control the viewing direction of a GMSPanoramaView. It does not + * contain information about which particular panorama should be displayed. + */ +@interface GMSPanoramaCamera : NSObject + +/** + * Designated initializer. Configures this GMSPanoramaCamera with |orientation|, |zoom| and |FOV|. + * These values will be clamped to acceptable ranges. + */ +- (id)initWithOrientation:(GMSOrientation)orientation zoom:(float)zoom FOV:(double)FOV; + +/** + * Convenience constructor specifying heading and pitch as part of |orientation|, plus |zoom| and + * default field of view (90 degrees). + */ ++ (instancetype)cameraWithOrientation:(GMSOrientation)orientation zoom:(float)zoom; + +/** + * Convenience constructor specifying |heading|, |pitch|, |zoom| with default field of view (90 + * degrees). + */ ++ (instancetype)cameraWithHeading:(CLLocationDirection)heading pitch:(double)pitch zoom:(float)zoom; + +/** + * Convenience constructor for GMSPanoramaCamera, specifying all camera properties with heading and + * pitch as part of |orientation|. + */ ++ (instancetype)cameraWithOrientation:(GMSOrientation)orientation zoom:(float)zoom FOV:(double)FOV; + +/** + * Convenience constructor for GMSPanoramaCamera, specifying all camera properties. + */ ++ (instancetype)cameraWithHeading:(CLLocationDirection)heading + pitch:(double)pitch + zoom:(float)zoom + FOV:(double)FOV; + +/** + * The field of view (FOV) encompassed by the larger dimension (width or height) of the view in + * degrees at zoom 1. This is clamped to the range [1, 160] degrees, and has a default value of 90. + * + * Lower FOV values produce a zooming in effect; larger FOV values produce an fisheye effect. + * + * Note: This is not the displayed FOV if zoom is anything other than 1. User zoom gestures + * control the zoom property, not this property. + */ +@property(nonatomic, assign, readonly) double FOV; + +/** + * Adjusts the visible region of the screen. A zoom of N will show the same area as the central + * width/N height/N area of what is shown at zoom 1. + * + * Zoom is clamped to the implementation defined range [1, 5]. + */ +@property(nonatomic, assign, readonly) float zoom; + +/** + * The camera orientation, which groups together heading and pitch. + */ +@property(nonatomic, assign, readonly) GMSOrientation orientation; + +@end diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPanoramaCameraUpdate.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPanoramaCameraUpdate.h new file mode 100644 index 0000000..e97aabd --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPanoramaCameraUpdate.h @@ -0,0 +1,25 @@ +// +// GMSPanoramaCameraUpdate.h +// Google Maps SDK for iOS +// +// Copyright 2013 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +@interface GMSPanoramaCameraUpdate : NSObject + +/** Returns an update that increments the camera heading with |deltaHeading|. */ ++ (GMSPanoramaCameraUpdate *)rotateBy:(CGFloat)deltaHeading; + +/** Returns an update that sets the camera heading to the given value. */ ++ (GMSPanoramaCameraUpdate *)setHeading:(CGFloat)heading; + +/** Returns an update that sets the camera pitch to the given value. */ ++ (GMSPanoramaCameraUpdate *)setPitch:(CGFloat)pitch; + +/** Returns an update that sets the camera zoom to the given value. */ ++ (GMSPanoramaCameraUpdate *)setZoom:(CGFloat)zoom; + +@end diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPanoramaLayer.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPanoramaLayer.h new file mode 100644 index 0000000..7dd0524 --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPanoramaLayer.h @@ -0,0 +1,37 @@ +// +// GMSPanoramaLayer.h +// Google Maps SDK for iOS +// +// Copyright 2013 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +#import +#import + +#import + +/** kGMSLayerPanoramaHeadingKey ranges from [0, 360). */ +extern NSString *const kGMSLayerPanoramaHeadingKey; + +/** kGMSLayerPanoramaPitchKey ranges from [-90, 90]. */ +extern NSString *const kGMSLayerPanoramaPitchKey; + +/** kGMSLayerCameraZoomLevelKey ranges from [1, 5], default 1. */ +extern NSString *const kGMSLayerPanoramaZoomKey; + +/** kGMSLayerPanoramaFOVKey ranges from [1, 160] (in degrees), default 90. */ +extern NSString *const kGMSLayerPanoramaFOVKey; + +/** + * GMSPanoramaLayer is a custom subclass of CALayer, provided as the layer + * class on GMSPanoramaView. This layer should not be instantiated directly. + */ +@interface GMSPanoramaLayer : GMSCALayer +@property(nonatomic, assign) CLLocationDirection cameraHeading; +@property(nonatomic, assign) double cameraPitch; +@property(nonatomic, assign) float cameraZoom; +@property(nonatomic, assign) double cameraFOV; +@end diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPanoramaLink.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPanoramaLink.h new file mode 100644 index 0000000..f741d0e --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPanoramaLink.h @@ -0,0 +1,23 @@ +// +// GMSPanoramaLink.h +// Google Maps SDK for iOS +// +// Copyright 2013 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +/** Links from a GMSPanorama to neighboring panoramas. */ +@interface GMSPanoramaLink : NSObject + +/** Angle of the neighboring panorama, clockwise from north in degrees. */ +@property(nonatomic, assign) CGFloat heading; + +/** + * Panorama ID for the neighboring panorama. + * Do not store this persistenly, it changes in time. + */ +@property(nonatomic, copy) NSString *panoramaID; + +@end diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPanoramaService.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPanoramaService.h new file mode 100644 index 0000000..0d72e61 --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPanoramaService.h @@ -0,0 +1,52 @@ +// +// GMSPanoramaService.h +// Google Maps SDK for iOS +// +// Copyright 2013 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +#import + +@class GMSPanorama; + +/** + * Callback for when a panorama metadata becomes available. + * If an error occured, |panorama| is nil and |error| is not nil. + * Otherwise, |panorama| is not nil and |error| is nil. + */ +typedef void (^GMSPanoramaCallback)(GMSPanorama *panorama, NSError *error); + +/** + * GMSPanoramaService can be used to request panorama metadata even when a + * GMSPanoramaView is not active. + * Get an instance like this: [[GMSPanoramaService alloc] init]. + */ +@interface GMSPanoramaService : NSObject + +/** + * Retrieves information about a panorama near the given |coordinate|. + * This is an asynchronous request, |callback| will be called with the result. + */ +- (void)requestPanoramaNearCoordinate:(CLLocationCoordinate2D)coordinate + callback:(GMSPanoramaCallback)callback; + +/** + * Similar to requestPanoramaNearCoordinate:callback: but allows specifying + * a search radius (meters) around |coordinate|. + */ +- (void)requestPanoramaNearCoordinate:(CLLocationCoordinate2D)coordinate + radius:(NSUInteger)radius + callback:(GMSPanoramaCallback)callback; + +/** + * Retrieves information about a panorama with the given |panoramaID|. + * |callback| will be called with the result. Only panoramaIDs obtained + * from the Google Maps SDK for iOS are supported. + */ +- (void)requestPanoramaWithID:(NSString *)panoramaID + callback:(GMSPanoramaCallback)callback; + +@end diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPanoramaView.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPanoramaView.h new file mode 100644 index 0000000..cf3895d --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPanoramaView.h @@ -0,0 +1,248 @@ +// +// GMSPanoramaView.h +// Google Maps SDK for iOS +// +// Copyright 2013 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +#import + +#import +#import + +@class GMSMarker; +@class GMSPanorama; +@class GMSPanoramaCamera; +@class GMSPanoramaCameraUpdate; +@class GMSPanoramaView; + +/** Delegate for events on GMSPanoramaView. */ +@protocol GMSPanoramaViewDelegate +@optional + +/** + * Called when starting a move to another panorama. + * This can be the result of interactive navigation to a neighbouring panorama. + * At the moment this method is called, the |view|.panorama is still + * pointing to the old panorama, as the new panorama identified by |panoID| + * is not yet resolved. panoramaView:didMoveToPanorama: will be called when the + * new panorama is ready. + */ +- (void)panoramaView:(GMSPanoramaView *)view + willMoveToPanoramaID:(NSString *)panoramaID; + +/** + * This is invoked every time the |view|.panorama property changes. + */ +- (void)panoramaView:(GMSPanoramaView *)view + didMoveToPanorama:(GMSPanorama *)panorama; + +/** + * Called when the panorama change was caused by invoking + * moveToPanoramaNearCoordinate:. The coordinate passed to that method will also + * be passed here. + */ +- (void)panoramaView:(GMSPanoramaView *)view + didMoveToPanorama:(GMSPanorama *)panorama + nearCoordinate:(CLLocationCoordinate2D)coordinate; + +/** + * Called when moveNearCoordinate: produces an error. + */ +- (void)panoramaView:(GMSPanoramaView *)view + error:(NSError *)error + onMoveNearCoordinate:(CLLocationCoordinate2D)coordinate; + +/** + * Called when moveToPanoramaID: produces an error. + */ +- (void)panoramaView:(GMSPanoramaView *)view + error:(NSError *)error + onMoveToPanoramaID:(NSString *)panoramaID; + +/** + * Called repeatedly during changes to the camera on GMSPanoramaView. This may + * not be called for all intermediate camera values, but is always called for + * the final position of the camera after an animation or gesture. + */ +- (void)panoramaView:(GMSPanoramaView *)panoramaView + didMoveCamera:(GMSPanoramaCamera *)camera; + +/** + * Called when a user has tapped on the GMSPanoramaView, but this tap was not + * consumed (taps may be consumed by e.g., tapping on a navigation arrow). + */ +- (void)panoramaView:(GMSPanoramaView *)panoramaView didTap:(CGPoint)point; + +/** + * Called after a marker has been tapped. May return YES to indicate the event + * has been fully handled and suppress any default behavior. + */ +- (BOOL)panoramaView:(GMSPanoramaView *)panoramaView + didTapMarker:(GMSMarker *)marker; + +@end + +/** + * A panorama is used to display Street View imagery. It should be constructed + * via [[GMSPanoramaView alloc] initWithFrame:], and configured + * post-initialization. + * + * All properties and methods should be accessed on the main thread, similar to + * all UIKit objects. The GMSPanoramaViewDelegate methods will also be called + * back only on the main thread. + * + * The backgroundColor of this view is shown while no panorama is visible, such + * as while it is loading or if the panorama is later set to nil. The alpha + * color of backgroundColor is not supported. + */ +@interface GMSPanoramaView : UIView + +/** + * The panorama to display; setting it will transition to a new panorama. This + * is animated, except for the initial panorama. + * + * Can be set to nil to clear the view. + */ +@property(nonatomic, strong) GMSPanorama *panorama; + +/** GMSPanoramaView delegate. */ +@property(nonatomic, weak) IBOutlet id delegate; + +/** + * Sets the preference for whether all gestures should be enabled (default) or + * disabled. + * This does not limit programmatic movement of the camera or control of the + * panorama. + */ +- (void)setAllGesturesEnabled:(BOOL)enabled; + +/** + * Controls whether orientation gestures are enabled (default) or disabled. If + * enabled, users may use gestures to change the orientation of the camera. + * This does not limit programmatic movement of the camera. + */ +@property(nonatomic, assign) BOOL orientationGestures; + +/** + * Controls whether zoom gestures are enabled (default) or disabled. If + * enabled, users may pinch to zoom the camera. + * This does not limit programmatic movement of the camera. + */ +@property(nonatomic, assign) BOOL zoomGestures; + +/** + * Controls whether navigation gestures are enabled (default) or disabled. If + * enabled, users may use a single tap on navigation links or double tap the + * view to change panoramas. + * This does not limit programmatic control of the panorama. + */ +@property(nonatomic, assign) BOOL navigationGestures; + +/** + * Controls whether the tappable navigation links are hidden or visible + * (default). + * Hidden navigation links cannot be tapped. + */ +@property(nonatomic, assign) BOOL navigationLinksHidden; + +/** + * Controls whether the street name overlays are hidden or visible (default). + */ +@property(nonatomic, assign) BOOL streetNamesHidden; + +/** + * Controls the panorama's camera. Setting a new camera here jumps to the new + * camera value, with no animation. + */ +@property(nonatomic, strong) GMSPanoramaCamera *camera; + +/** + * Accessor for the custom CALayer type used for the layer. + */ +@property(nonatomic, readonly, retain) GMSPanoramaLayer *layer; + +/** + * Animates the camera of this GMSPanoramaView to |camera|, over |duration| + * (specified in seconds). + */ +- (void)animateToCamera:(GMSPanoramaCamera *)camera + animationDuration:(NSTimeInterval)duration; + +/** + * Modifies the camera according to |cameraUpdate|, over |duration| (specified + * in seconds). + */ +- (void)updateCamera:(GMSPanoramaCameraUpdate *)cameraUpdate + animationDuration:(NSTimeInterval)duration; + +/** + * Requests a panorama near |coordinate|. + * Upon successful completion panoramaView:didMoveToPanorama: and + * panoramaView:didMoveToPanorama:nearCoordinate: will be sent to + * GMSPanoramaViewDelegate. + * On error panoramaView:error:onMoveNearCoordinate: will be sent. + * Repeated calls to moveNearCoordinate: result in the previous pending + * (incomplete) transitions being cancelled -- only the most recent of + * moveNearCoordinate: and moveToPanoramaId: will proceed and generate events. + */ +- (void)moveNearCoordinate:(CLLocationCoordinate2D)coordinate; + +/** + * Similar to moveNearCoordinate: but allows specifying a search radius (meters) + * around |coordinate|. + */ +- (void)moveNearCoordinate:(CLLocationCoordinate2D)coordinate + radius:(NSUInteger)radius; + +/** + * Requests a panorama with |panoramaID|. + * Upon successful completion panoramaView:didMoveToPanorama: will be sent to + * GMSPanoramaViewDelegate. + * On error panoramaView:error:onMoveToPanoramaID: will be sent. + * Repeated calls to moveToPanoramaID: result in the previous pending + * (incomplete) transitions being cancelled -- only the most recent of + * moveNearCoordinate: and moveToPanoramaId: will proceed and generate events. + * Only panoramaIDs obtained from the Google Maps SDK for iOS are supported. + */ +- (void)moveToPanoramaID:(NSString *)panoramaID; + +/** + * For the current view, returns the screen point the |orientation| points + * through. This value may be outside the view for forward facing orientations + * which are far enough away from straight ahead. + * The result will contain NaNs for camera orientations which point away from + * the view, where the implied screen point would have had a negative distance + * from the camera in the direction of orientation. + */ +- (CGPoint)pointForOrientation:(GMSOrientation)orientation; + +/** + * Given a point for this view, returns the current camera orientation pointing + * through that screen location. At the center of this view, the returned + * GMSOrientation will be approximately equal to that of the current + * GMSPanoramaCamera. + */ +- (GMSOrientation)orientationForPoint:(CGPoint)point; + +/** + * Convenience constructor for GMSPanoramaView, which searches for and displays + * a GMSPanorama near |coordinate|. This performs a similar action to that of + * moveNearCoordinate:, and will call the same delegate methods. + */ ++ (instancetype)panoramaWithFrame:(CGRect)frame + nearCoordinate:(CLLocationCoordinate2D)coordinate; + +/** + * Similar to panoramaWithFrame:nearCoordinate: but allows specifying a + * search radius (meters) around |coordinate|. + */ ++ (instancetype)panoramaWithFrame:(CGRect)frame + nearCoordinate:(CLLocationCoordinate2D)coordinate + radius:(NSUInteger)radius; + + +@end diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPath.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPath.h new file mode 100644 index 0000000..6b84012 --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPath.h @@ -0,0 +1,103 @@ +// +// GMSPath.h +// Google Maps SDK for iOS +// +// Copyright 2013 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +#import + +/** + * GMSPath encapsulates an immutable array of CLLocationCooordinate2D. All the coordinates of a + * GMSPath must be valid. The mutable counterpart is GMSMutablePath. + */ +@interface GMSPath : NSObject + +/** Convenience constructor for an empty path. */ ++ (instancetype)path; + +/** Initializes a newly allocated path with the contents of another GMSPath. */ +- (id)initWithPath:(GMSPath *)path; + +/** Get size of path. */ +- (NSUInteger)count; + +/** Returns kCLLocationCoordinate2DInvalid if |index| >= count. */ +- (CLLocationCoordinate2D)coordinateAtIndex:(NSUInteger)index; + +/** + * Initializes a newly allocated path from |encodedPath|. This format is described at: + * https://developers.google.com/maps/documentation/utilities/polylinealgorithm + */ ++ (instancetype)pathFromEncodedPath:(NSString *)encodedPath; + +/** Returns an encoded string of the path in the format described above. */ +- (NSString *)encodedPath; + +/** + * Returns a new path obtained by adding |deltaLatitude| and |deltaLongitude| to each coordinate + * of the current path. Does not modify the current path. + */ +- (instancetype)pathOffsetByLatitude:(CLLocationDegrees)deltaLatitude + longitude:(CLLocationDegrees)deltaLongitude; + +@end + + +/** + * kGMSEquatorProjectedMeter may be useful when specifying lengths for segment in "projected" units. + * The value of kGMSEquatorProjectedMeter, 1/(pi * EarthRadius), represents the length of one meter + * at the equator in projected units. For example to specify a projected length that corresponds + * to 100km at the equator use 100000 * kGMSEquatorProjectedMeter. + * See [GMSPath segmentsForLength:kind:], [GMSPath lengthOfKind:] and kGMSLengthProjected. + */ +extern const double kGMSEquatorProjectedMeter; + +/** + * GMSLengthKind indicates the type of a length value, which can be geodesic (in meters), rhumb + * length (in meters) and projected length (in GMSMapPoint units). + */ +typedef enum { + /* + * Geodesic length, in meters, along geodesic segments. May be useful, for example, to specify + * lengths along the the trajectory of airplanes or ships. + */ + kGMSLengthGeodesic, + + /* + * Rhumb length, in meters, along rhumb (straight line) segments. May be useful, for example, to + * draw a scale bar on a map. The visual size of a segment of a given length depens on the + * latitude. + */ + kGMSLengthRhumb, + + /* + * Length in projected space, along rhumb segments. Projected length uses the same units as + * GMSMapPoint - the Earth equator circumference has length 2. It is possible to specify projected + * length in units corresponding to 1 meter at the equator by multiplying with + * kGMSEquatorProjectedMeter, equal to 1/(pi * EarthRadius). + * + * Projected length may be useful, for example, to specify segments with the same visual length + * regardless of latitude. + */ + kGMSLengthProjected +} GMSLengthKind; + + +@interface GMSPath (GMSPathLength) + +/** + * Returns the fractional number of segments along the path that correspond to |length|, + * interpreted according to |kind|. See GMSLengthKind. + */ +- (double)segmentsForLength:(CLLocationDistance)length kind:(GMSLengthKind)kind; + +/** + * Returns the length of the path, according to |kind|. See GMSLengthKind. + */ +- (CLLocationDistance)lengthOfKind:(GMSLengthKind)kind; + +@end diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPlace.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPlace.h new file mode 100644 index 0000000..ca2ad4c --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPlace.h @@ -0,0 +1,109 @@ +// +// GMSPlace.h +// Google Maps SDK for iOS +// +// Copyright 2014 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +#import + +#import + +@class GMSPlaceUserData; + + +/** Describes the current open status of a place. */ +typedef NS_ENUM(NSInteger, GMSPlacesOpenNowStatus) { + /** The place is open now. */ + kGMSPlacesOpenNowStatusYes, + /** The place is not open now. */ + kGMSPlacesOpenNowStatusNo, + /** We don't know whether the place is open now. */ + kGMSPlacesOpenNowStatusUnknown, +}; + +typedef NS_ENUM(NSInteger, GMSPlacesPriceLevel) { + kGMSPlacesPriceLevelUnknown = -1, + kGMSPlacesPriceLevelFree = 0, + kGMSPlacesPriceLevelCheap = 1, + kGMSPlacesPriceLevelMedium = 2, + kGMSPlacesPriceLevelHigh = 3, + kGMSPlacesPriceLevelExpensive = 4, +}; + +/** + * Represents a particular physical place. A GMSPlace encapsulates information about a physical + * location, including its name, location, and any other information we might have about it. This + * class is immutable. + */ +@interface GMSPlace : NSObject + +/** Name of the place. */ +@property(nonatomic, copy, readonly) NSString *name; + +/** Place ID of this place. */ +@property(nonatomic, copy, readonly) NSString *placeID; + +/** + * Location of the place. The location is not necessarily the center of the Place, or any + * particular entry or exit point, but some arbitrarily chosen point within the geographic extent of + * the Place. + */ +@property(nonatomic, readonly) CLLocationCoordinate2D coordinate; + +/** + * Represents the open now status of the place at the time that the place was created. + */ +@property(nonatomic, readonly) GMSPlacesOpenNowStatus openNowStatus; + +/** + * Phone number of this place, in international format, i.e. including the country code prefixed + * with "+". For example, Google Sydney's phone number is "+61 2 9374 4000". + */ +@property(nonatomic, copy, readonly) NSString *phoneNumber; + +/** + * Address of the place as a simple string. + */ +@property(nonatomic, copy, readonly) NSString *formattedAddress; + +/** + * Five-star rating for this place based on user reviews. + * + * Ratings range from 1.0 to 5.0. 0.0 means we have no rating for this place (e.g. because not + * enough users have reviewed this place). + */ +@property(nonatomic, readonly) float rating; + +/** + * Price level for this place, as integers from 0 to 4. + * + * e.g. A value of 4 means this place is "$$$$" (expensive). A value of 0 means free (such as a + * museum with free admission). + */ +@property(nonatomic, readonly) GMSPlacesPriceLevel priceLevel; + +/** + * The types of this place. Types are NSStrings, valid values are any types documented at + * . + */ +@property(nonatomic, copy, readonly) NSArray *types; + +/** Website for this place. */ +@property(nonatomic, copy, readonly) NSURL *website; + +/** + * The data provider attribution string for this place. + * + * These are provided as a NSAttributedString, which may contain hyperlinks to the website of each + * provider. + * + * In general, these must be shown to the user if data from this GMSPlace is shown, as described in + * the Places API Terms of Service. + */ +@property(nonatomic, copy, readonly) NSAttributedString *attributions; + +@end diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPlaceLikelihood.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPlaceLikelihood.h new file mode 100644 index 0000000..e7a059a --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPlaceLikelihood.h @@ -0,0 +1,35 @@ +// +// GMSPlaceLikelihood.h +// Google Maps SDK for iOS +// +// Copyright 2014 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + + +@class GMSPlace; + +/** + * Represents a |GMSPlace| and the relative likelihood of the place being the best match within the + * list of returned places for a single request. For more information about place likelihoods, see + * |GMSPlaceLikelihoodList|. + */ +@interface GMSPlaceLikelihood : NSObject + +/** + * The place contained in this place likelihood. + */ +@property(nonatomic, strong, readonly) GMSPlace *place; + +/** + * Returns a value from 0.0 to 1.0 indicating the confidence that the user is at this place. The + * larger the value the more confident we are of the place returned. For example, a likelihood of + * 0.75 means that the user is at least 75% likely to be at this place. + */ +@property(nonatomic, assign, readonly) double likelihood; + +- (instancetype)initWithPlace:(GMSPlace *)place likelihood:(double)likelihood; + +@end diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPlaceLikelihoodList.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPlaceLikelihoodList.h new file mode 100644 index 0000000..1baadf1 --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPlaceLikelihoodList.h @@ -0,0 +1,34 @@ +// +// GMSPlaceLikelihoodList.h +// Google Maps SDK for iOS +// +// Copyright 2014 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +/** + * Represents a list of places with an associated likelihood for the place being the correct place. + * For example, the Places service may be uncertain what the true Place is, but think it 55% likely + * to be PlaceA, and 35% likely to be PlaceB. The corresponding likelihood list has two members, one + * with likelihood 0.55 and the other with likelihood 0.35. The likelihoods are not guaranteed to be + * correct, and in a given place likelihood list they may not sum to 1.0. + */ +@interface GMSPlaceLikelihoodList : NSObject + +/** An array of |GMSPlaceLikelihood|s containing the likelihoods in the list. */ +@property(nonatomic, copy) NSArray *likelihoods; + +/** + * The data provider attribution strings for the likelihood list. + * + * These are provided as a NSAttributedString, which may contain hyperlinks to the website of each + * provider. + * + * In general, these must be shown to the user if data from this likelihood list is shown, as + * described in the Places API Terms of Service. + */ +@property(nonatomic, copy, readonly) NSAttributedString *attributions; + +@end diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPlacePicker.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPlacePicker.h new file mode 100644 index 0000000..2edfb89 --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPlacePicker.h @@ -0,0 +1,72 @@ +// +// GMSPlacePicker.h +// Google Maps SDK for iOS +// +// Copyright 2014 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +#import + + +/* Error domain used for Place Picker errors. */ +extern NSString * const kGMSPlacePickerErrorDomain; + +/* Error codes for |kGMSPlacePickerErrorDomain|. */ +typedef NS_ENUM(NSInteger, GMSPlacePickerErrorCode) { + /** + * Something unknown went wrong. + */ + kGMSPlacePickerUnknownError = -1, + /** + * An internal error occurred in the Places API library. + */ + kGMSPlacePickerInternalError = -2, + /** + * An invalid GMSPlacePickerConfig was used. + */ + kGMSPlacePickerInvalidConfig = -3, + /** + * Attempted to perform simultaneous place picking operations. + */ + kGMSPlacePickerOverlappingCalls = -4, +}; + +/** + * The Place Picker is a dialog that allows the user to pick a |GMSPlace| using an interactive map + * and other tools. Users can select the place they're at or nearby. + */ +@interface GMSPlacePicker : NSObject + +/** + * The configuration of the place picker, as passed in at initialization. + */ +@property(nonatomic, readonly, copy) GMSPlacePickerConfig *config; + +/** + * Initializes the place picker with a given configuration. This does not start the process of + * picking a place. + */ +- (instancetype)initWithConfig:(GMSPlacePickerConfig *)config; + +/** + * Prompt the user to pick a place. The place picker is a full-screen window that appears on + * [UIScreen mainScreen]. The place picker takes over the screen until the user cancels the + * operation or picks a place. The supplied callback will be invoked with the chosen place, or nil + * if no place was chosen. + * + * This method should be called on the main thread. The callback will also be invoked on the main + * thread. + * + * It is not possible to have multiple place picking operations active at the same time. If this is + * attempted, the second callback will be invoked with an error. + * + * A reference to the place picker must be retained for the duration of the place picking operation. + * If the retain count of the place picker object becomes 0, the picking operation will be cancelled + * and the callback will not be invoked. + */ +- (void)pickPlaceWithCallback:(GMSPlaceResultCallback)callback; + +@end diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPlacePickerConfig.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPlacePickerConfig.h new file mode 100644 index 0000000..bf9da34 --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPlacePickerConfig.h @@ -0,0 +1,31 @@ +// +// GMSPlacePickerConfig.h +// Google Maps SDK for iOS +// +// Copyright 2014 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +#import +#import + + +/** + * Configuration object used to change the behaviour of the place picker. + */ +@interface GMSPlacePickerConfig : NSObject + +/** + * The initial viewport that the place picker map should show. If this is nil, a sensible default + * will be chosen based on the user's location. + */ +@property(nonatomic, strong, readonly) GMSCoordinateBounds *viewport; + +/** + * Initialize the configuration. + */ +- (instancetype)initWithViewport:(GMSCoordinateBounds *)viewport; + +@end diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPlaceTypes.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPlaceTypes.h new file mode 100644 index 0000000..574a715 --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPlaceTypes.h @@ -0,0 +1,137 @@ +// +// GMSPlaceTypes.h +// Google Maps SDK for iOS +// +// Copyright 2014 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + + + +extern NSString *const kGMSPlaceTypeAccounting; +extern NSString *const kGMSPlaceTypeAdministrativeAreaLevel1; +extern NSString *const kGMSPlaceTypeAdministrativeAreaLevel2; +extern NSString *const kGMSPlaceTypeAdministrativeAreaLevel3; +extern NSString *const kGMSPlaceTypeAirport; +extern NSString *const kGMSPlaceTypeAmusementPark; +extern NSString *const kGMSPlaceTypeAquarium; +extern NSString *const kGMSPlaceTypeArtGallery; +extern NSString *const kGMSPlaceTypeAtm; +extern NSString *const kGMSPlaceTypeBakery; +extern NSString *const kGMSPlaceTypeBank; +extern NSString *const kGMSPlaceTypeBar; +extern NSString *const kGMSPlaceTypeBeautySalon; +extern NSString *const kGMSPlaceTypeBicycleStore; +extern NSString *const kGMSPlaceTypeBookStore; +extern NSString *const kGMSPlaceTypeBowlingAlley; +extern NSString *const kGMSPlaceTypeBusStation; +extern NSString *const kGMSPlaceTypeCafe; +extern NSString *const kGMSPlaceTypeCampground; +extern NSString *const kGMSPlaceTypeCarDealer; +extern NSString *const kGMSPlaceTypeCarRental; +extern NSString *const kGMSPlaceTypeCarRepair; +extern NSString *const kGMSPlaceTypeCarWash; +extern NSString *const kGMSPlaceTypeCasino; +extern NSString *const kGMSPlaceTypeCemetery; +extern NSString *const kGMSPlaceTypeChurch; +extern NSString *const kGMSPlaceTypeCityHall; +extern NSString *const kGMSPlaceTypeClothingStore; +extern NSString *const kGMSPlaceTypeColloquialArea; +extern NSString *const kGMSPlaceTypeConvenienceStore; +extern NSString *const kGMSPlaceTypeCountry; +extern NSString *const kGMSPlaceTypeCourthouse; +extern NSString *const kGMSPlaceTypeDentist; +extern NSString *const kGMSPlaceTypeDepartmentStore; +extern NSString *const kGMSPlaceTypeDoctor; +extern NSString *const kGMSPlaceTypeElectrician; +extern NSString *const kGMSPlaceTypeElectronicsStore; +extern NSString *const kGMSPlaceTypeEmbassy; +extern NSString *const kGMSPlaceTypeEstablishment; +extern NSString *const kGMSPlaceTypeFinance; +extern NSString *const kGMSPlaceTypeFireStation; +extern NSString *const kGMSPlaceTypeFloor; +extern NSString *const kGMSPlaceTypeFlorist; +extern NSString *const kGMSPlaceTypeFood; +extern NSString *const kGMSPlaceTypeFuneralHome; +extern NSString *const kGMSPlaceTypeFurnitureStore; +extern NSString *const kGMSPlaceTypeGasStation; +extern NSString *const kGMSPlaceTypeGeneralContractor; +extern NSString *const kGMSPlaceTypeGeocode; +extern NSString *const kGMSPlaceTypeGroceryOrSupermarket; +extern NSString *const kGMSPlaceTypeGym; +extern NSString *const kGMSPlaceTypeHairCare; +extern NSString *const kGMSPlaceTypeHardwareStore; +extern NSString *const kGMSPlaceTypeHealth; +extern NSString *const kGMSPlaceTypeHinduTemple; +extern NSString *const kGMSPlaceTypeHomeGoodsStore; +extern NSString *const kGMSPlaceTypeHospital; +extern NSString *const kGMSPlaceTypeInsuranceAgency; +extern NSString *const kGMSPlaceTypeIntersection; +extern NSString *const kGMSPlaceTypeJewelryStore; +extern NSString *const kGMSPlaceTypeLaundry; +extern NSString *const kGMSPlaceTypeLawyer; +extern NSString *const kGMSPlaceTypeLibrary; +extern NSString *const kGMSPlaceTypeLiquorStore; +extern NSString *const kGMSPlaceTypeLocalGovernmentOffice; +extern NSString *const kGMSPlaceTypeLocality; +extern NSString *const kGMSPlaceTypeLocksmith; +extern NSString *const kGMSPlaceTypeLodging; +extern NSString *const kGMSPlaceTypeMealDelivery; +extern NSString *const kGMSPlaceTypeMealTakeaway; +extern NSString *const kGMSPlaceTypeMosque; +extern NSString *const kGMSPlaceTypeMovieRental; +extern NSString *const kGMSPlaceTypeMovieTheater; +extern NSString *const kGMSPlaceTypeMovingCompany; +extern NSString *const kGMSPlaceTypeMuseum; +extern NSString *const kGMSPlaceTypeNaturalFeature; +extern NSString *const kGMSPlaceTypeNeighborhood; +extern NSString *const kGMSPlaceTypeNightClub; +extern NSString *const kGMSPlaceTypePainter; +extern NSString *const kGMSPlaceTypePark; +extern NSString *const kGMSPlaceTypeParking; +extern NSString *const kGMSPlaceTypePetStore; +extern NSString *const kGMSPlaceTypePharmacy; +extern NSString *const kGMSPlaceTypePhysiotherapist; +extern NSString *const kGMSPlaceTypePlaceOfWorship; +extern NSString *const kGMSPlaceTypePlumber; +extern NSString *const kGMSPlaceTypePointOfInterest; +extern NSString *const kGMSPlaceTypePolice; +extern NSString *const kGMSPlaceTypePolitical; +extern NSString *const kGMSPlaceTypePostBox; +extern NSString *const kGMSPlaceTypePostOffice; +extern NSString *const kGMSPlaceTypePostalCode; +extern NSString *const kGMSPlaceTypePostalCodePrefix; +extern NSString *const kGMSPlaceTypePostalTown; +extern NSString *const kGMSPlaceTypePremise; +extern NSString *const kGMSPlaceTypeRealEstateAgency; +extern NSString *const kGMSPlaceTypeRestaurant; +extern NSString *const kGMSPlaceTypeRoofingContractor; +extern NSString *const kGMSPlaceTypeRoom; +extern NSString *const kGMSPlaceTypeRoute; +extern NSString *const kGMSPlaceTypeRvPark; +extern NSString *const kGMSPlaceTypeSchool; +extern NSString *const kGMSPlaceTypeShoeStore; +extern NSString *const kGMSPlaceTypeShoppingMall; +extern NSString *const kGMSPlaceTypeSpa; +extern NSString *const kGMSPlaceTypeStadium; +extern NSString *const kGMSPlaceTypeStorage; +extern NSString *const kGMSPlaceTypeStore; +extern NSString *const kGMSPlaceTypeStreetAddress; +extern NSString *const kGMSPlaceTypeSublocality; +extern NSString *const kGMSPlaceTypeSublocalityLevel1; +extern NSString *const kGMSPlaceTypeSublocalityLevel2; +extern NSString *const kGMSPlaceTypeSublocalityLevel3; +extern NSString *const kGMSPlaceTypeSublocalityLevel4; +extern NSString *const kGMSPlaceTypeSublocalityLevel5; +extern NSString *const kGMSPlaceTypeSubpremise; +extern NSString *const kGMSPlaceTypeSubwayStation; +extern NSString *const kGMSPlaceTypeSynagogue; +extern NSString *const kGMSPlaceTypeTaxiStand; +extern NSString *const kGMSPlaceTypeTrainStation; +extern NSString *const kGMSPlaceTypeTransitStation; +extern NSString *const kGMSPlaceTypeTravelAgency; +extern NSString *const kGMSPlaceTypeUniversity; +extern NSString *const kGMSPlaceTypeVeterinaryCare; +extern NSString *const kGMSPlaceTypeZoo; diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPlacesClient.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPlacesClient.h new file mode 100644 index 0000000..a7ef2ae --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPlacesClient.h @@ -0,0 +1,192 @@ +// +// GMSPlacesClient.h +// Google Maps SDK for iOS +// +// Copyright 2014 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +#import + +#import +#import +#import + + +@class GMSAutocompleteFilter; +@class GMSPlaceLikelihoodList; + +GMS_ASSUME_NONNULL_BEGIN + +/* Error domain used for Places API errors. */ +extern NSString * const kGMSPlacesErrorDomain; + +/* Error codes for |kGMSPlacesErrorDomain|. */ +typedef NS_ENUM(NSInteger, GMSPlacesErrorCode) { + /** + * Something went wrong with the connection to the Places API server. + */ + kGMSPlacesNetworkError = -1, + /** + * The Places API server returned a response that we couldn't understand. + */ + kGMSPlacesServerError = -2, + /** + * An internal error occurred in the Places API library. + */ + kGMSPlacesInternalError = -3, + /** + * Operation failed due to an invalid (malformed or missing) API key. + *

+ * See the developer's guide + * for information on creating and using an API key. + */ + kGMSPlacesKeyInvalid = -4, + /** + * Operation failed due to an expired API key. + *

+ * See the developer's guide + * for information on creating and using an API key. + */ + kGMSPlacesKeyExpired = -5, + /** + * Operation failed due to exceeding the quota usage limit. + *

+ * See the developer's guide + * for information on usage limits and how to request a higher limit. + */ + kGMSPlacesUsageLimitExceeded = -6, + /** + * Operation failed due to exceeding the usage rate limit for the API key. + *

+ * This status code shouldn't be returned during normal usage of the API. It relates to usage of + * the API that far exceeds normal request levels. + */ + kGMSPlacesRateLimitExceeded = -7, + /** + * Operation failed due to exceeding the per-device usage rate limit. + *

+ * This status code shouldn't be returned during normal usage of the API. It relates to usage of + * the API that far exceeds normal request levels. + */ + kGMSPlacesDeviceRateLimitExceeded = -8, + /** + * The Places API is not enabled. + *

+ * See the developer's guide for how + * to enable the Google Places API for iOS. + */ + kGMSPlacesAccessNotConfigured = -9, + /** + * The application's bundle identifier does not match one of the allowed iOS applications for the + * API key. + *

+ * See the developer's guide + * for how to configure bundle restrictions on API keys. + */ + kGMSPlacesIncorrectBundleIdentifier = -10 +}; + +/** + * @relates GMSPlacesClient + * Callback type for receiving place details lookups. If an error occurred, + * |result| will be nil and |error| will contain information about the error. + * @param result The |GMSPlace| that was returned. + * @param error The error that occured, if any. + */ +typedef void (^GMSPlaceResultCallback)( + GMSPlace * GMS_NULLABLE_PTR result, + NSError * GMS_NULLABLE_PTR error); + +/** + * @relates GMSPlacesClient + * Callback type for receiving place likelihood lists. If an error occurred, |likelihoodList| will + * be nil and |error| will contain information about the error. + * @param likelihoodList The list of place likelihoods. + * @param error The error that occured, if any. + */ +typedef void (^GMSPlaceLikelihoodListCallback)( + GMSPlaceLikelihoodList * GMS_NULLABLE_PTR likelihoodList, + NSError * GMS_NULLABLE_PTR error); + +/** + * @relates GMSPlacesClient + * Callback type for receiving autocompletion results. |results| is an array of + * GMSAutocompletePredictions representing candidate completions of the query. + * @param results An array of |GMSAutocompletePrediction|s. + * @param error The error that occured, if any. + */ +typedef void (^GMSAutocompletePredictionsCallback)( + NSArray * GMS_NULLABLE_PTR results, + NSError * GMS_NULLABLE_PTR error); + +/** + * Main interface to the Places API. Used for searching and getting details about places. This class + * should be accessed through the [GMSPlacesClient sharedClient] method. + * + * GMSPlacesClient methods should only be called from the main thread. Calling these methods from + * another thread will result in an exception or undefined behavior. Unless otherwise specified, all + * callbacks will be invoked on the main thread. + */ +@interface GMSPlacesClient : NSObject + +/** + * Provides the shared instance of GMSPlacesClient for the Google Maps SDK for iOS, + * creating it if necessary. + * + * If your application often uses methods of GMSPlacesClient it may want to hold + * onto this object directly, as otherwise your connection to Google may be restarted + * on a regular basis. + */ ++ (instancetype)sharedClient; + +/** + * Report that the device is at a particular place. + */ +- (void)reportDeviceAtPlaceWithID:(NSString *)placeID; + +/** + * Get details for a place. This method is non-blocking. + * @param placeID The place ID to lookup. + * @param callback The callback to invoke with the lookup result. + */ +- (void)lookUpPlaceID:(NSString *)placeID callback:(GMSPlaceResultCallback)callback; + +/** + * Returns an estimate of the place where the device is currently known to be located. + * + * Generates a place likelihood list based on the device's last estimated location. The supplied + * callback will be invoked with this likelihood list upon success and an NSError upon an error. + * @param callback The callback to invoke with the place likelihood list. + */ +- (void)currentPlaceWithCallback:(GMSPlaceLikelihoodListCallback)callback; + +/** + * Autocompletes a given text query. Results may optionally be biased towards a certain location. + * The supplied callback will be invoked with an array of autocompletion predictions upon success + * and an NSError upon an error. + * @param query The partial text to autocomplete. + * @param bounds The bounds used to bias the results. This is not a hard restrict - places may still + * be returned outside of these bounds. This parameter may be nil. + * @param filter The filter to apply to the results. This parameter may be nil. + * @param callback The callback to invoke with the predictions. + */ +- (void)autocompleteQuery:(NSString *)query + bounds:(GMSCoordinateBounds * GMS_NULLABLE_PTR)bounds + filter:(GMSAutocompleteFilter * GMS_NULLABLE_PTR)filter + callback:(GMSAutocompletePredictionsCallback)callback; + +/** + * Add a place. The |place| must have all its fields set, except that website or phoneNumber may be + * nil. + * @param place The details of the place to be added. + * @param callback The callback to invoke with the place that was added. + */ +- (void)addPlace:(GMSUserAddedPlace *)place + callback:(GMSPlaceResultCallback)callback; + +@end + +GMS_ASSUME_NONNULL_END diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPlacesMacros.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPlacesMacros.h new file mode 100644 index 0000000..76206be --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPlacesMacros.h @@ -0,0 +1,23 @@ +// +// GMSPlacesMacros.h +// Google Maps SDK for iOS +// +// Copyright 2015 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +#if !__has_feature(nullability) \ + || !defined(NS_ASSUME_NONNULL_BEGIN) \ + || !defined(NS_ASSUME_NONNULL_END) +#define GMS_ASSUME_NONNULL_BEGIN +#define GMS_ASSUME_NONNULL_END +#define GMS_NULLABLE +#define GMS_NULLABLE_PTR +#else +#define GMS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN +#define GMS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END +#define GMS_NULLABLE nullable +#define GMS_NULLABLE_PTR __nullable +#endif diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPolygon.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPolygon.h new file mode 100644 index 0000000..7bc115b --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPolygon.h @@ -0,0 +1,43 @@ +// +// GMSPolygon.h +// Google Maps SDK for iOS +// +// Copyright 2013 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +#import + +@class GMSPath; + +/** + * GMSPolygon defines a polygon that appears on the map. A polygon (like a polyline) defines a + * series of connected coordinates in an ordered sequence; additionally, polygons form a closed loop + * and define a filled region. + */ +@interface GMSPolygon : GMSOverlay + +/** The path that describes this polygon. The coordinates composing the path must be valid. */ +@property(nonatomic, copy) GMSPath *path; + +/** The width of the polygon outline in screen points. Defaults to 1. */ +@property(nonatomic, assign) CGFloat strokeWidth; + +/** The color of the polygon outline. Defaults to nil. */ +@property(nonatomic, strong) UIColor *strokeColor; + +/** The fill color. Defaults to blueColor. */ +@property(nonatomic, strong) UIColor *fillColor; + +/** Whether this polygon should be rendered with geodesic correction. */ +@property(nonatomic, assign) BOOL geodesic; + +/** + * Convenience constructor for GMSPolygon for a particular path. Other properties will have default + * values. + */ ++ (instancetype)polygonWithPath:(GMSPath *)path; + +@end diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPolyline.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPolyline.h new file mode 100644 index 0000000..704e4f0 --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPolyline.h @@ -0,0 +1,102 @@ +// +// GMSPolyline.h +// Google Maps SDK for iOS +// +// Copyright 2012 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +#import + +@class GMSPath; + +/** Describes the drawing style for one-dimensional entities such as polylines. */ +@interface GMSStrokeStyle : NSObject + +/** Creates a solid color stroke style. */ ++ (instancetype)solidColor:(UIColor *)color; + +/** Creates a gradient stroke style interpolating from |fromColor| to |toColor|. */ ++ (instancetype)gradientFromColor:(UIColor *)fromColor toColor:(UIColor *)toColor; + +@end + + +/** Describes the style for some region of a polyline. */ +@interface GMSStyleSpan : NSObject + +/** + * Factory returning a solid color span of length one segment. Equivalent to + * [GMSStyleSpan spanWithStyle:[GMSStrokeStyle solidColor:|color|] segments:1]. + */ ++ (instancetype)spanWithColor:(UIColor *)color; + +/** + * Factory returning a solid color span with a given number of segments. Equivalent to + * [GMSStyleSpan spanWithStyle:[GMSStrokeStyle solidColor:|color|] segments:|segments|]. + */ ++ (instancetype)spanWithColor:(UIColor *)color segments:(double)segments; + +/** + * Factory returning a span with the given |style| of length one segment. Equivalent to + * [GMSStyleSpan spanWithStyle:|style| segments:1]. + */ ++ (instancetype)spanWithStyle:(GMSStrokeStyle *)style; + +/** + * Factory returning a span with the given |style| and length in number of segments. + * |segments| must be greater than 0 (i.e. can't be 0). + */ ++ (instancetype)spanWithStyle:(GMSStrokeStyle *)style segments:(double)segments; + +/** The style of this span. */ +@property(nonatomic, readonly) GMSStrokeStyle *style; + +/** The length of this span in number of segments. */ +@property(nonatomic, readonly) double segments; + +@end + + +/** + * GMSPolyline specifies the available options for a polyline that exists on the Earth's surface. + * It is drawn as a physical line between the points specified in |path|. + */ +@interface GMSPolyline : GMSOverlay + +/** + * The path that describes this polyline. + */ +@property(nonatomic, copy) GMSPath *path; + +/** + * The width of the line in screen points. Defaults to 1. + */ +@property(nonatomic, assign) CGFloat strokeWidth; + +/** + * The UIColor used to render the polyline. Defaults to [UIColor blueColor]. + */ +@property(nonatomic, strong) UIColor *strokeColor; + +/** Whether this line should be rendered with geodesic correction. */ +@property(nonatomic, assign) BOOL geodesic; + +/** + * Convenience constructor for GMSPolyline for a particular path. Other properties will have + * default values. + */ ++ (instancetype)polylineWithPath:(GMSPath *)path; + +/** + * An array containing GMSStyleSpan, the spans used to render this polyline. + * + * If this array contains fewer segments than the polyline itself, the final segment will be applied + * over the remaining length. If this array is unset or empty, then |strokeColor| is used for the + * entire line instead. + */ +@property(nonatomic, copy) NSArray *spans; + +@end diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSProjection.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSProjection.h new file mode 100644 index 0000000..7596dba --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSProjection.h @@ -0,0 +1,75 @@ +// +// GMSProjection.h +// Google Maps SDK for iOS +// +// Copyright 2012 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +#import + +/** + * GMSVisibleRegion contains the four points defining the polygon that is visible in a map's camera. + * + * This polygon can be a trapezoid instead of a rectangle, because a camera can have tilt. If the + * camera is directly over the center of the camera, the shape is rectangular, but if the camera is + * tilted, the shape will appear to be a trapezoid whose smallest side is closest to the point of + * view. + */ +typedef struct { + + /** Bottom left corner of the camera. */ + CLLocationCoordinate2D nearLeft; + + /** Bottom right corner of the camera. */ + CLLocationCoordinate2D nearRight; + + /** Far left corner of the camera. */ + CLLocationCoordinate2D farLeft; + + /** Far right corner of the camera. */ + CLLocationCoordinate2D farRight; +} GMSVisibleRegion; + +/** + * Defines a mapping between Earth coordinates (CLLocationCoordinate2D) and coordinates in the map's + * view (CGPoint). A projection is constant and immutable, in that the mapping it embodies never + * changes. The mapping is not necessarily linear. + * + * Passing invalid Earth coordinates (i.e., per CLLocationCoordinate2DIsValid) to this object may + * result in undefined behavior. + * + * This class should not be instantiated directly, instead, obtained via projection on GMSMapView. + */ +@interface GMSProjection : NSObject + +/** Maps an Earth coordinate to a point coordinate in the map's view. */ +- (CGPoint)pointForCoordinate:(CLLocationCoordinate2D)coordinate; + +/** Maps a point coordinate in the map's view to an Earth coordinate. */ +- (CLLocationCoordinate2D)coordinateForPoint:(CGPoint)point; + +/** + * Converts a distance in meters to content size. This is only accurate for small Earth distances, + * as it uses CGFloat for screen distances. + */ +- (CGFloat)pointsForMeters:(CLLocationDistance)meters + atCoordinate:(CLLocationCoordinate2D)coordinate; + +/** + * Returns whether a given coordinate (lat/lng) is contained within the projection. + */ +- (BOOL)containsCoordinate:(CLLocationCoordinate2D)coordinate; + +/** + * Returns the region (four location coordinates) that is visible according to the projection. If + * padding was set on GMSMapView, this region takes the padding into account. + * + * The visible region can be non-rectangular. The result is undefined if the projection includes + * points that do not map to anywhere on the map (e.g., camera sees outer space). + */ +- (GMSVisibleRegion)visibleRegion; + +@end diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSServices.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSServices.h new file mode 100644 index 0000000..1829236 --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSServices.h @@ -0,0 +1,51 @@ +// +// GMSServices.h +// Google Maps SDK for iOS +// +// Copyright 2012 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +/** Service class for the Google Maps SDK for iOS. */ +@interface GMSServices : NSObject + +/** + * Provides the shared instance of GMSServices for the Google Maps SDK for iOS, + * creating it if necessary. Classes such as GMSMapView and GMSPanoramaView will + * hold this instance to provide their connection to Google. + * + * This is an opaque object. If your application often creates and destroys view + * or service classes provided by the Google Maps SDK for iOS, it may be useful + * to hold onto this object directly, as otherwise your connection to Google + * may be restarted on a regular basis. It also may be useful to take this + * object in advance of the first map creation, to reduce initial map creation + * performance cost. + * + * This method will throw an exception if provideAPIKey: has not been called. + */ ++ (id)sharedServices; + +/** + * Provides your API key to the Google Maps SDK for iOS. This key is generated + * for your application via the Google APIs Console, and is paired with your + * application's bundle ID to identify it. This should be called exactly once + * by your application, e.g., in application: didFinishLaunchingWithOptions:. + * + * @return YES if the APIKey was successfully provided + */ ++ (BOOL)provideAPIKey:(NSString *)APIKey; + +/** + * Returns the open source software license information for Google Maps SDK for + * iOS. This information must be made available within your application. + */ ++ (NSString *)openSourceLicenseInfo; + +/** + * Returns the version for this release of the Google Maps SDK for iOS. + */ ++ (NSString *)SDKVersion; + +@end diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSSyncTileLayer.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSSyncTileLayer.h new file mode 100644 index 0000000..c0671d9 --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSSyncTileLayer.h @@ -0,0 +1,29 @@ +// +// GMSSyncTileLayer.h +// Google Maps SDK for iOS +// +// Copyright 2013 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +#import + +/** + * GMSSyncTileLayer is an abstract subclass of GMSTileLayer that provides a sync + * interface to generate image tile data. + */ +@interface GMSSyncTileLayer : GMSTileLayer + +/** + * As per requestTileForX:y:zoom:receiver: on GMSTileLayer, but provides a + * synchronous interface to return tiles. This method may block or otherwise + * perform work, and is not called on the main thread. + * + * Calls to this method may also be made from multiple threads so + * implementations must be threadsafe. + */ +- (UIImage *)tileForX:(NSUInteger)x y:(NSUInteger)y zoom:(NSUInteger)zoom; + +@end diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSTileLayer.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSTileLayer.h new file mode 100644 index 0000000..20bf77b --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSTileLayer.h @@ -0,0 +1,103 @@ +// +// GMSTileLayer.h +// Google Maps SDK for iOS +// +// Copyright 2013 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +@class GMSMapView; + +/** + * Stub tile that is used to indicate that no tile exists for a specific tile + * coordinate. May be returned by tileForX:y:zoom: on GMSTileProvider. + */ +FOUNDATION_EXTERN UIImage *const kGMSTileLayerNoTile; + +/** + * GMSTileReceiver is provided to GMSTileLayer when a tile request is made, + * allowing the callback to be later (or immediately) invoked. + */ +@protocol GMSTileReceiver +- (void)receiveTileWithX:(NSUInteger)x + y:(NSUInteger)y + zoom:(NSUInteger)zoom + image:(UIImage *)image; +@end + +/** + * GMSTileLayer is an abstract class that allows overlaying of custom image + * tiles on a specified GMSMapView. It may not be initialized directly, and + * subclasses must implement the tileForX:y:zoom: method to return tiles. + * + * At zoom level 0 the whole world is a square covered by a single tile, + * and the coordinates |x| and |y| are both 0 for that tile. At zoom level 1, + * the world is covered by 4 tiles with |x| and |y| being 0 or 1, and so on. + */ +@interface GMSTileLayer : NSObject + +/** + * requestTileForX:y:zoom:receiver: generates image tiles for GMSTileOverlay. + * It must be overridden by subclasses. The tile for the given |x|, |y| and + * |zoom| _must_ be later passed to |receiver|. + * + * Specify kGMSTileLayerNoTile if no tile is available for this location; or + * nil if a transient error occured and a tile may be available later. + * + * Calls to this method will be made on the main thread. See GMSSyncTileLayer + * for a base class that implements a blocking tile layer that does not run on + * your application's main thread. + */ +- (void)requestTileForX:(NSUInteger)x + y:(NSUInteger)y + zoom:(NSUInteger)zoom + receiver:(id)receiver; + +/** + * Clears the cache so that all tiles will be requested again. + */ +- (void)clearTileCache; + +/** + * The map this GMSTileOverlay is displayed on. Setting this property will add + * the layer to the map. Setting it to nil removes this layer from the map. A + * layer may be active on at most one map at any given time. + */ +@property(nonatomic, weak) GMSMapView *map; + +/** + * Higher |zIndex| value tile layers will be drawn on top of lower |zIndex| + * value tile layers and overlays. Equal values result in undefined draw + * ordering. + */ +@property(nonatomic, assign) int zIndex; + +/** + * Specifies the number of pixels (not points) that the returned tile images + * will prefer to display as. For best results, this should be the edge + * length of your custom tiles. Defaults to 256, which is the traditional + * size of Google Maps tiles. + * + * Values less than the equivalent of 128 points (e.g. 256 pixels on retina + * devices) may not perform well and are not recommended. + * + * As an example, an application developer may wish to provide retina tiles + * (512 pixel edge length) on retina devices, to keep the same number of tiles + * per view as the default value of 256 would give on a non-retina device. + */ +@property(nonatomic, assign) NSInteger tileSize; + +/** + * Specifies the opacity of the tile layer. This provides a multiplier for + * the alpha channel of tile images. + */ +@property(nonatomic, assign) float opacity; + +/** + * Specifies whether the tiles should fade in. Default YES. + */ +@property(nonatomic, assign) BOOL fadeIn; + +@end diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSUISettings.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSUISettings.h new file mode 100644 index 0000000..6d05c97 --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSUISettings.h @@ -0,0 +1,94 @@ +// +// GMSUISettings.h +// Google Maps SDK for iOS +// +// Copyright 2013 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +/** Settings for the user interface of a GMSMapView. */ +@interface GMSUISettings : NSObject + +/** + * Sets the preference for whether all gestures should be enabled (default) or + * disabled. This doesn't restrict users from tapping any on screen buttons to + * move the camera (e.g., compass or zoom controls), nor does it restrict + * programmatic movements and animation. + */ +- (void)setAllGesturesEnabled:(BOOL)enabled; + +/** + * Controls whether scroll gestures are enabled (default) or disabled. If + * enabled, users may drag to pan the camera. This does not limit programmatic + * movement of the camera. + */ +@property(nonatomic, assign) BOOL scrollGestures; + +/** + * Controls whether zoom gestures are enabled (default) or disabled. If + * enabled, users may double tap/two-finger tap or pinch to zoom the camera. + * This does not limit programmatic movement of the camera. + */ +@property(nonatomic, assign) BOOL zoomGestures; + +/** + * Controls whether tilt gestures are enabled (default) or disabled. If enabled, + * users may use a two-finger vertical down or up swipe to tilt the camera. This + * does not limit programmatic control of the camera's viewingAngle. + */ +@property(nonatomic, assign) BOOL tiltGestures; + +/** + * Controls whether rotate gestures are enabled (default) or disabled. If + * enabled, users may use a two-finger rotate gesture to rotate the camera. This + * does not limit programmatic control of the camera's bearing. + */ +@property(nonatomic, assign) BOOL rotateGestures; + +/** + * Controls whether gestures by users are completely consumed by the GMSMapView + * when gestures are enabled (default YES). This prevents these gestures from + * being received by parent views. + * + * When the GMSMapView is contained by a UIScrollView (or other scrollable area), + * this means that gestures on the map will not be additional consumed as scroll + * gestures. However, disabling this (set to NO) may be userful to support + * complex view hierarchies or requirements. + */ +@property(nonatomic, assign) BOOL consumesGesturesInView; + +/** + * Enables or disables the compass. The compass is an icon on the map that + * indicates the direction of north on the map. + * + * If enabled, it is only shown when the camera is rotated away from its default + * orientation (bearing of 0). When a user taps the compass, the camera orients + * itself to its default orientation and fades away shortly after. If disabled, + * the compass will never be displayed. + */ +@property(nonatomic, assign) BOOL compassButton; + +/** + * Enables or disables the My Location button. This is a button visible on the + * map that, when tapped by users, will center the map on the current user + * location. + */ +@property(nonatomic, assign) BOOL myLocationButton; + +/** + * Enables (default) or disables the indoor floor picker. If enabled, it is only + * visible when the view is focused on a building with indoor floor data. + * If disabled, the selected floor can still be controlled programatically via + * the indoorDisplay mapView property. + */ +@property(nonatomic, assign) BOOL indoorPicker; + +/** + * Controls whether rotate and zoom gestures can be performed off-center and scrolled around + * (default YES). + */ +@property(nonatomic, assign) BOOL allowScrollGesturesDuringRotateOrZoom; + +@end diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSURLTileLayer.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSURLTileLayer.h new file mode 100644 index 0000000..a3c6e87 --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSURLTileLayer.h @@ -0,0 +1,50 @@ +// +// GMSURLTileLayer.h +// Google Maps SDK for iOS +// +// Copyright 2013 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +#import + +@class NSURL; + +/** + * |GMSTileURLConstructor| is a block taking |x|, |y| and |zoom| + * and returning an NSURL, or nil to indicate no tile for that location. + */ +typedef NSURL *(^GMSTileURLConstructor)(NSUInteger x, NSUInteger y, NSUInteger zoom); + +/** + * GMSURLTileProvider fetches tiles based on the URLs returned from a + * GMSTileURLConstructor. For example: + *

+ *   GMSTileURLConstructor constructor = ^(NSUInteger x, NSUInteger y, NSUInteger zoom) {
+ *     NSString *URLStr =
+ *         [NSString stringWithFormat:@"https://example.com/%d/%d/%d.png", x, y, zoom];
+ *     return [NSURL URLWithString:URLStr];
+ *   };
+ *   GMSTileLayer *layer =
+ *       [GMSURLTileLayer tileLayerWithURLConstructor:constructor];
+ *   layer.userAgent = @"SDK user agent";
+ *   layer.map = map;
+ * 
+ * + * GMSURLTileProvider may not be subclassed and should only be created via its + * convenience constructor. + */ +@interface GMSURLTileLayer : GMSTileLayer + +/** Convenience constructor. |constructor| must be non-nil. */ ++ (instancetype)tileLayerWithURLConstructor:(GMSTileURLConstructor)constructor; + +/** + * Specify the user agent to describe your application. If this is nil (the + * default), the default iOS user agent is used for HTTP requests. + */ +@property(nonatomic, copy) NSString *userAgent; + +@end diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSUserAddedPlace.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSUserAddedPlace.h new file mode 100644 index 0000000..c9f3472 --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSUserAddedPlace.h @@ -0,0 +1,40 @@ +// +// GMSUserAddedPlace.h +// Google Maps SDK for iOS +// +// Copyright 2014 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +#import +#import + +/** + * Represents a place constructed by a user, suitable for adding to Google's collection of places. + * + * All properties must be set before passing to GMSPlacesClient.addPlace, except that either website + * _or_ phoneNumber may be nil. + */ +@interface GMSUserAddedPlace : NSObject + +/** Name of the place. */ +@property(nonatomic, copy) NSString *name; + +/** Address of the place. */ +@property(nonatomic, copy) NSString *address; + +/** Location of the place. */ +@property(nonatomic, assign) CLLocationCoordinate2D coordinate; + +/** Phone number of the place. */ +@property(nonatomic, copy) NSString *phoneNumber; + +/** List of types of the place as an array of NSStrings, like the GMSPlace.types property. */ +@property(nonatomic, copy) NSArray *types; + +/** The website for the place. */ +@property(nonatomic, copy) NSString *website; + +@end diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GoogleMaps.h b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GoogleMaps.h new file mode 100644 index 0000000..bb86c01 --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GoogleMaps.h @@ -0,0 +1,60 @@ +// +// GoogleMaps.h +// Google Maps SDK for iOS +// +// Copyright 2012 Google Inc. +// +// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of +// Service: https://developers.google.com/maps/terms +// + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Modules/module.modulemap b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Modules/module.modulemap new file mode 100644 index 0000000..c85090a --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Modules/module.modulemap @@ -0,0 +1 @@ +framework module GoogleMaps { umbrella header "GoogleMaps.h" export * module * { export * } } diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCacheStorage.momd/Storage.mom b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCacheStorage.momd/Storage.mom new file mode 100644 index 0000000..89db31a Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCacheStorage.momd/Storage.mom differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCacheStorage.momd/Storage.omo b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCacheStorage.momd/Storage.omo new file mode 100644 index 0000000..03b35d1 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCacheStorage.momd/Storage.omo differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCacheStorage.momd/VersionInfo.plist b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCacheStorage.momd/VersionInfo.plist new file mode 100644 index 0000000..47b2dcd Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCacheStorage.momd/VersionInfo.plist differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/DroidSansMerged-Regular.ttf b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/DroidSansMerged-Regular.ttf new file mode 100644 index 0000000..2aca5f5 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/DroidSansMerged-Regular.ttf differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/GMSSprites-0-1x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/GMSSprites-0-1x.png new file mode 100644 index 0000000..8d7409e Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/GMSSprites-0-1x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/GMSSprites-0-2x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/GMSSprites-0-2x.png new file mode 100644 index 0000000..3491ab4 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/GMSSprites-0-2x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/GMSSprites-0-3x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/GMSSprites-0-3x.png new file mode 100644 index 0000000..8a35660 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/GMSSprites-0-3x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Info.plist b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Info.plist new file mode 100644 index 0000000..761a421 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Info.plist differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-Black.ttf b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-Black.ttf new file mode 100644 index 0000000..cb905bc Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-Black.ttf differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-BlackItalic.ttf b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-BlackItalic.ttf new file mode 100644 index 0000000..3ebdc7d Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-BlackItalic.ttf differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-Bold.ttf b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-Bold.ttf new file mode 100644 index 0000000..68822ca Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-Bold.ttf differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-BoldItalic.ttf b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-BoldItalic.ttf new file mode 100644 index 0000000..aebf8eb Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-BoldItalic.ttf differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-Italic.ttf b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-Italic.ttf new file mode 100644 index 0000000..2041cbc Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-Italic.ttf differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-Light.ttf b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-Light.ttf new file mode 100644 index 0000000..aa45340 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-Light.ttf differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-LightItalic.ttf b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-LightItalic.ttf new file mode 100644 index 0000000..a85444f Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-LightItalic.ttf differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-Medium.ttf b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-Medium.ttf new file mode 100644 index 0000000..a3c1a1f Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-Medium.ttf differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-MediumItalic.ttf b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-MediumItalic.ttf new file mode 100644 index 0000000..b828205 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-MediumItalic.ttf differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-Regular.ttf b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-Regular.ttf new file mode 100644 index 0000000..0e58508 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-Regular.ttf differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-Thin.ttf b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-Thin.ttf new file mode 100644 index 0000000..8779333 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-Thin.ttf differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-ThinItalic.ttf b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-ThinItalic.ttf new file mode 100644 index 0000000..b79cb26 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Roboto-ThinItalic.ttf differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/RobotoCondensed-Italic.ttf b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/RobotoCondensed-Italic.ttf new file mode 100644 index 0000000..d2b611f Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/RobotoCondensed-Italic.ttf differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/RobotoCondensed-Regular.ttf b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/RobotoCondensed-Regular.ttf new file mode 100644 index 0000000..b9fc49c Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/RobotoCondensed-Regular.ttf differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Siemreap.ttf b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Siemreap.ttf new file mode 100644 index 0000000..a2c8dff Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Siemreap.ttf differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Tharlon-Regular.ttf b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Tharlon-Regular.ttf new file mode 100644 index 0000000..4717d70 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Tharlon-Regular.ttf differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ar.lproj/GMSCore.strings b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ar.lproj/GMSCore.strings new file mode 100644 index 0000000..de9f9e8 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ar.lproj/GMSCore.strings differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/button_background.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/button_background.png new file mode 100644 index 0000000..847575a Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/button_background.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/button_background@2x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/button_background@2x.png new file mode 100644 index 0000000..84e76a3 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/button_background@2x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/button_background@3x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/button_background@3x.png new file mode 100644 index 0000000..b89372f Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/button_background@3x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/button_compass.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/button_compass.png new file mode 100644 index 0000000..a0b07bb Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/button_compass.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/button_compass@2x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/button_compass@2x.png new file mode 100644 index 0000000..c03e1e9 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/button_compass@2x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/button_my_location.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/button_my_location.png new file mode 100644 index 0000000..e32568d Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/button_my_location.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/button_my_location@2x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/button_my_location@2x.png new file mode 100644 index 0000000..c5465b7 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/button_my_location@2x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ca.lproj/GMSCore.strings b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ca.lproj/GMSCore.strings new file mode 100644 index 0000000..83af8e3 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ca.lproj/GMSCore.strings differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/cs.lproj/GMSCore.strings b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/cs.lproj/GMSCore.strings new file mode 100644 index 0000000..aacf12c Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/cs.lproj/GMSCore.strings differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/da.lproj/GMSCore.strings b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/da.lproj/GMSCore.strings new file mode 100644 index 0000000..d9d96ac Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/da.lproj/GMSCore.strings differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/dav_one_way_16_256.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/dav_one_way_16_256.png new file mode 100644 index 0000000..cb77f83 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/dav_one_way_16_256.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/de.lproj/GMSCore.strings b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/de.lproj/GMSCore.strings new file mode 100644 index 0000000..ffa8a58 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/de.lproj/GMSCore.strings differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/el.lproj/GMSCore.strings b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/el.lproj/GMSCore.strings new file mode 100644 index 0000000..457e994 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/el.lproj/GMSCore.strings differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/en.lproj/GMSCore.strings b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/en.lproj/GMSCore.strings new file mode 100644 index 0000000..4ee0314 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/en.lproj/GMSCore.strings differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/en_GB.lproj/GMSCore.strings b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/en_GB.lproj/GMSCore.strings new file mode 100644 index 0000000..91e4ccb Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/en_GB.lproj/GMSCore.strings differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/es.lproj/GMSCore.strings b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/es.lproj/GMSCore.strings new file mode 100644 index 0000000..50636cb Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/es.lproj/GMSCore.strings differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/fi.lproj/GMSCore.strings b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/fi.lproj/GMSCore.strings new file mode 100644 index 0000000..bb6c09a Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/fi.lproj/GMSCore.strings differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/fr.lproj/GMSCore.strings b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/fr.lproj/GMSCore.strings new file mode 100644 index 0000000..f8b7c87 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/fr.lproj/GMSCore.strings differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/he.lproj/GMSCore.strings b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/he.lproj/GMSCore.strings new file mode 100644 index 0000000..1288e8a Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/he.lproj/GMSCore.strings differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/hr.lproj/GMSCore.strings b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/hr.lproj/GMSCore.strings new file mode 100644 index 0000000..3d840fa Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/hr.lproj/GMSCore.strings differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/hu.lproj/GMSCore.strings b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/hu.lproj/GMSCore.strings new file mode 100644 index 0000000..9c6b00b Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/hu.lproj/GMSCore.strings differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ic_compass_needle.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ic_compass_needle.png new file mode 100644 index 0000000..6e0663e Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ic_compass_needle.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ic_compass_needle@2x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ic_compass_needle@2x.png new file mode 100644 index 0000000..f1d5caf Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ic_compass_needle@2x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ic_qu_direction_mylocation.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ic_qu_direction_mylocation.png new file mode 100644 index 0000000..4bd8c8f Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ic_qu_direction_mylocation.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ic_qu_direction_mylocation@2x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ic_qu_direction_mylocation@2x.png new file mode 100644 index 0000000..b2cf321 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ic_qu_direction_mylocation@2x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ic_qu_direction_mylocation@3x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ic_qu_direction_mylocation@3x.png new file mode 100644 index 0000000..91cf55f Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ic_qu_direction_mylocation@3x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/id.lproj/GMSCore.strings b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/id.lproj/GMSCore.strings new file mode 100644 index 0000000..61faea9 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/id.lproj/GMSCore.strings differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/it.lproj/GMSCore.strings b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/it.lproj/GMSCore.strings new file mode 100644 index 0000000..0afe1f2 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/it.lproj/GMSCore.strings differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ja.lproj/GMSCore.strings b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ja.lproj/GMSCore.strings new file mode 100644 index 0000000..54a532b Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ja.lproj/GMSCore.strings differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ko.lproj/GMSCore.strings b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ko.lproj/GMSCore.strings new file mode 100644 index 0000000..9f4c41c Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ko.lproj/GMSCore.strings differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ms.lproj/GMSCore.strings b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ms.lproj/GMSCore.strings new file mode 100644 index 0000000..3eee646 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ms.lproj/GMSCore.strings differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/nl.lproj/GMSCore.strings b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/nl.lproj/GMSCore.strings new file mode 100644 index 0000000..31a4197 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/nl.lproj/GMSCore.strings differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/no.lproj/GMSCore.strings b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/no.lproj/GMSCore.strings new file mode 100644 index 0000000..dad08a4 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/no.lproj/GMSCore.strings differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/pl.lproj/GMSCore.strings b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/pl.lproj/GMSCore.strings new file mode 100644 index 0000000..f59c162 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/pl.lproj/GMSCore.strings differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/polyline_colors_texture.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/polyline_colors_texture.png new file mode 100644 index 0000000..badf109 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/polyline_colors_texture.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/pt.lproj/GMSCore.strings b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/pt.lproj/GMSCore.strings new file mode 100644 index 0000000..d08bfc1 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/pt.lproj/GMSCore.strings differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/pt_PT.lproj/GMSCore.strings b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/pt_PT.lproj/GMSCore.strings new file mode 100644 index 0000000..f98aac2 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/pt_PT.lproj/GMSCore.strings differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ro.lproj/GMSCore.strings b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ro.lproj/GMSCore.strings new file mode 100644 index 0000000..576d222 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ro.lproj/GMSCore.strings differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/road_1-1.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/road_1-1.png new file mode 100644 index 0000000..46b0843 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/road_1-1.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/road_128-32.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/road_128-32.png new file mode 100644 index 0000000..357d1df Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/road_128-32.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/road_16-4.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/road_16-4.png new file mode 100644 index 0000000..35f58cf Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/road_16-4.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/road_2-1.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/road_2-1.png new file mode 100644 index 0000000..df77f65 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/road_2-1.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/road_256-64.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/road_256-64.png new file mode 100644 index 0000000..5162343 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/road_256-64.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/road_32-8.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/road_32-8.png new file mode 100644 index 0000000..ed0424b Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/road_32-8.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/road_4-1.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/road_4-1.png new file mode 100644 index 0000000..a44a743 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/road_4-1.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/road_64-16.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/road_64-16.png new file mode 100644 index 0000000..46915dc Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/road_64-16.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/road_8-2.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/road_8-2.png new file mode 100644 index 0000000..be12717 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/road_8-2.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ru.lproj/GMSCore.strings b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ru.lproj/GMSCore.strings new file mode 100644 index 0000000..c488955 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ru.lproj/GMSCore.strings differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/sk.lproj/GMSCore.strings b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/sk.lproj/GMSCore.strings new file mode 100644 index 0000000..3188adf Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/sk.lproj/GMSCore.strings differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/sv.lproj/GMSCore.strings b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/sv.lproj/GMSCore.strings new file mode 100644 index 0000000..530d064 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/sv.lproj/GMSCore.strings differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/th.lproj/GMSCore.strings b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/th.lproj/GMSCore.strings new file mode 100644 index 0000000..b544aa9 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/th.lproj/GMSCore.strings differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/tr.lproj/GMSCore.strings b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/tr.lproj/GMSCore.strings new file mode 100644 index 0000000..2878e9a Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/tr.lproj/GMSCore.strings differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/uk.lproj/GMSCore.strings b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/uk.lproj/GMSCore.strings new file mode 100644 index 0000000..249e3d6 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/uk.lproj/GMSCore.strings differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/vi.lproj/GMSCore.strings b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/vi.lproj/GMSCore.strings new file mode 100644 index 0000000..6539316 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/vi.lproj/GMSCore.strings differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/watermark_dark.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/watermark_dark.png new file mode 100644 index 0000000..be3a8ab Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/watermark_dark.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/watermark_dark@2x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/watermark_dark@2x.png new file mode 100644 index 0000000..4bae5d5 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/watermark_dark@2x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/watermark_dark@3x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/watermark_dark@3x.png new file mode 100644 index 0000000..ef7290b Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/watermark_dark@3x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/watermark_light.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/watermark_light.png new file mode 100644 index 0000000..10624db Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/watermark_light.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/watermark_light@2x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/watermark_light@2x.png new file mode 100644 index 0000000..36112a0 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/watermark_light@2x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/watermark_light@3x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/watermark_light@3x.png new file mode 100644 index 0000000..6ad6233 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/watermark_light@3x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/zh_CN.lproj/GMSCore.strings b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/zh_CN.lproj/GMSCore.strings new file mode 100644 index 0000000..dd4b0a5 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/zh_CN.lproj/GMSCore.strings differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/zh_TW.lproj/GMSCore.strings b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/zh_TW.lproj/GMSCore.strings new file mode 100644 index 0000000..6ec7c70 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/zh_TW.lproj/GMSCore.strings differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/Info.plist b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/Info.plist new file mode 100644 index 0000000..be46cbe Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/Info.plist differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/active.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/active.png new file mode 100644 index 0000000..cbcf301 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/active.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/active@2x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/active@2x.png new file mode 100644 index 0000000..5f8306a Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/active@2x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/active@3x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/active@3x.png new file mode 100644 index 0000000..170c60f Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/active@3x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/active_grouped.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/active_grouped.png new file mode 100644 index 0000000..1e1bcf6 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/active_grouped.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/active_grouped@2x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/active_grouped@2x.png new file mode 100644 index 0000000..143e144 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/active_grouped@2x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/active_grouped@3x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/active_grouped@3x.png new file mode 100644 index 0000000..1205603 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/active_grouped@3x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/back.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/back.png new file mode 100644 index 0000000..2765dbc Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/back.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/back@2x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/back@2x.png new file mode 100644 index 0000000..a9fcb27 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/back@2x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/back@3x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/back@3x.png new file mode 100644 index 0000000..add6f20 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/back@3x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/bubble_left.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/bubble_left.png new file mode 100644 index 0000000..0f8db09 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/bubble_left.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/bubble_left@2x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/bubble_left@2x.png new file mode 100644 index 0000000..8ece32c Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/bubble_left@2x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/bubble_left@3x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/bubble_left@3x.png new file mode 100644 index 0000000..dfdc21a Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/bubble_left@3x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/bubble_right.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/bubble_right.png new file mode 100644 index 0000000..4ed47e4 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/bubble_right.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/bubble_right@2x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/bubble_right@2x.png new file mode 100644 index 0000000..475f4b8 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/bubble_right@2x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/bubble_right@3x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/bubble_right@3x.png new file mode 100644 index 0000000..fc7e633 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/bubble_right@3x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/card_bg.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/card_bg.png new file mode 100644 index 0000000..2ae75f6 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/card_bg.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/card_bg@2x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/card_bg@2x.png new file mode 100644 index 0000000..3638007 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/card_bg@2x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/card_bg@3x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/card_bg@3x.png new file mode 100644 index 0000000..8d7ae8f Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/card_bg@3x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/close.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/close.png new file mode 100644 index 0000000..9e693f1 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/close.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/close@2x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/close@2x.png new file mode 100644 index 0000000..8b9caea Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/close@2x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/close@3x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/close@3x.png new file mode 100644 index 0000000..6edea38 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/close@3x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/default_marker.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/default_marker.png new file mode 100644 index 0000000..f51c3a4 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/default_marker.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/default_marker@2x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/default_marker@2x.png new file mode 100644 index 0000000..59dbd92 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/default_marker@2x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/default_marker@3x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/default_marker@3x.png new file mode 100644 index 0000000..829ea5f Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/default_marker@3x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/en.lproj/InfoPlist.strings b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/en.lproj/InfoPlist.strings new file mode 100644 index 0000000..3967e06 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/en.lproj/InfoPlist.strings differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/place_picker_nav_back.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/place_picker_nav_back.png new file mode 100644 index 0000000..4c72bcf Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/place_picker_nav_back.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/place_picker_nav_back@2x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/place_picker_nav_back@2x.png new file mode 100644 index 0000000..95bc759 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/place_picker_nav_back@2x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/place_picker_search_icon.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/place_picker_search_icon.png new file mode 100644 index 0000000..7e6193a Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/place_picker_search_icon.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/place_picker_search_icon@2x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/place_picker_search_icon@2x.png new file mode 100644 index 0000000..61e1e74 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/place_picker_search_icon@2x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/red_icons.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/red_icons.png new file mode 100644 index 0000000..c6a7bec Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/red_icons.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/red_icons@2x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/red_icons@2x.png new file mode 100644 index 0000000..f0a5e9f Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/red_icons@2x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/red_icons@3x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/red_icons@3x.png new file mode 100644 index 0000000..02f0826 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/red_icons@3x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/white_icons.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/white_icons.png new file mode 100644 index 0000000..49b4e9d Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/white_icons.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/white_icons@2x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/white_icons@2x.png new file mode 100644 index 0000000..a42707e Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/white_icons@2x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/white_icons@3x.png b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/white_icons@3x.png new file mode 100644 index 0000000..5838eb0 Binary files /dev/null and b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/white_icons@3x.png differ diff --git a/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/Current b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/Current new file mode 120000 index 0000000..8c7e5a6 --- /dev/null +++ b/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/GoogleMaps.framework b/Pods/GoogleMaps/GoogleMapsSDKDemos/GoogleMaps.framework new file mode 120000 index 0000000..4e52fac --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/GoogleMaps.framework @@ -0,0 +1 @@ +../Frameworks/GoogleMaps.framework \ No newline at end of file diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/README.GoogleMapsSDKDemos b/Pods/GoogleMaps/GoogleMapsSDKDemos/README.GoogleMapsSDKDemos new file mode 100644 index 0000000..e39aa06 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/README.GoogleMapsSDKDemos @@ -0,0 +1,22 @@ +GoogleMapsSDKDemos contains a demo application showcasing various features of +the Google Maps SDK for iOS. + +Before starting, please note that these demos are directed towards a technical +audience. You'll also need Xcode 6.3 or later, with the iOS SDK 7.0 or later. + +If you're new to the SDK, please read the Introduction section of the Google +Maps SDK for iOS documentation- + https://developers.google.com/maps/documentation/ios + +Once you've read the Introduction page, follow the first couple of steps on the +"Getting Started" page. Specifically; + + * Obtain an API key for the demo application, and specify the bundle ID of + this demo application as an an 'allowed iOS app'. By default, the bundle ID + is "com.example.SDKDemos". + + * Open the project in Xcode, and update `SDKDemoAPIKey.h` with this key. + +If you'd like to add a new sample, add a new subclass of `ViewController` and +add it to the samples definitions inside the `Samples.m`. + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos.gyp b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos.gyp new file mode 100644 index 0000000..fdc89bc --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos.gyp @@ -0,0 +1,60 @@ +{ + 'xcode_settings': { + 'SDKROOT': 'iphoneos', + }, + 'targets': [ + { + 'target_name': 'SDKDemos', + 'type': 'executable', + 'mac_bundle': 1, + 'mac_framework_dirs': [ + '$(SRCROOT)', + ], + 'link_settings': { + 'mac_bundle_resources': [ + '"; }; + 031103FAE4E394EA78895993 /* SDKDemoMasterViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDKDemoMasterViewController.m; sourceTree = ""; }; + 0372FAEB924D0ADD012FBDFE /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; + 0416087FE83DCD914CF69FA9 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 043F8041B5649C26BCE75231 /* Samples.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Samples.m; sourceTree = ""; }; + 09F0DD5C27A815E1A9720747 /* TrafficMapViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TrafficMapViewController.h; sourceTree = ""; }; + 0B6999063F311237F673B8B0 /* IndoorViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = IndoorViewController.m; sourceTree = ""; }; + 0BA108F4D0C3BDA34CE54180 /* GestureControlViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GestureControlViewController.m; sourceTree = ""; }; + 0F33C1C90D61AD0E2B502215 /* sdkdemos_icon-72@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "sdkdemos_icon-72@2x.png"; sourceTree = ""; }; + 124B199908A64B1EE958F3CA /* x29@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "x29@2x.png"; sourceTree = ""; }; + 13CBFFCFE30583D29D77B5A1 /* MarkerInfoWindowViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MarkerInfoWindowViewController.h; sourceTree = ""; }; + 14532E524E38739F32328ECE /* Samples+Places.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Samples+Places.h"; sourceTree = ""; }; + 14A1E50F98F1EA56590AA120 /* step3@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "step3@2x.png"; sourceTree = ""; }; + 15F93E8BE938118367B428AA /* MarkersViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MarkersViewController.h; sourceTree = ""; }; + 193951C11D1549E7701FFC40 /* libc++.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libc++.dylib"; path = "usr/lib/libc++.dylib"; sourceTree = SDKROOT; }; + 1A597E83DFFF77F1EBD76B64 /* museum-exhibits.json */ = {isa = PBXFileReference; lastKnownFileType = text; path = "museum-exhibits.json"; sourceTree = ""; }; + 1BA8114B0A4CDC672F1CBD6F /* GeocoderViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeocoderViewController.h; sourceTree = ""; }; + 1F1D873627D847B5C1B099FC /* MarkerEventsViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MarkerEventsViewController.m; sourceTree = ""; }; + 2AB2A95CCD24024671158AD9 /* PanoramaViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PanoramaViewController.h; sourceTree = ""; }; + 2E95ACF5DD497E15A0B746DF /* glow-marker.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glow-marker.png"; sourceTree = ""; }; + 31DE8BA62A492FBC67E923AD /* sdkdemos_icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "sdkdemos_icon-72.png"; sourceTree = ""; }; + 31F229C07CCFB0CFEBD70F68 /* MapLayerViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MapLayerViewController.m; sourceTree = ""; }; + 3401A5B1795F7B7056A7F491 /* arrow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = arrow.png; sourceTree = ""; }; + 3449C03C22DABB720D80FF72 /* GestureControlViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GestureControlViewController.h; sourceTree = ""; }; + 359EF8FC1D5600228CFFBF4D /* step6.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = step6.png; sourceTree = ""; }; + 3628691A5936DDD1821A622B /* step7.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = step7.png; sourceTree = ""; }; + 394AF35F597FB89E9D6A1E3D /* MapZoomViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MapZoomViewController.h; sourceTree = ""; }; + 3AAAD985B0FF3AF55E964A33 /* IndoorMuseumNavigationViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = IndoorMuseumNavigationViewController.m; sourceTree = ""; }; + 3BD92F5F6AB10EDD9098A9DC /* GeocoderViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GeocoderViewController.m; sourceTree = ""; }; + 3C1A74AB0EFA8C78AF23E564 /* step5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = step5.png; sourceTree = ""; }; + 3F1ABBF9B2E96BC488485119 /* track.json */ = {isa = PBXFileReference; lastKnownFileType = text; path = track.json; sourceTree = ""; }; + 4152CBF14080E0C84DFD6613 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; + 425802FD822D22CC110119BA /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; + 429F95111FD1F8B8A1C16865 /* PolylinesViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PolylinesViewController.m; sourceTree = ""; }; + 45580B3C558B48DD3359F2A1 /* MapZoomViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MapZoomViewController.m; sourceTree = ""; }; + 460EBDFBDFFE13DB517214A5 /* BasicMapViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BasicMapViewController.h; sourceTree = ""; }; + 46FF553F45838251496245F9 /* arrow@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "arrow@2x.png"; sourceTree = ""; }; + 487E4999CFF757EA18C569D8 /* x29.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = x29.png; sourceTree = ""; }; + 48C5F2798147CFFA14B5B7DD /* SDKDemoPlacePickerViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDKDemoPlacePickerViewController.h; sourceTree = ""; }; + 4BA4E139EA9FAA0D6A639CE6 /* BasicMapViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BasicMapViewController.m; sourceTree = ""; }; + 4C29D1A0DA47D1691C6CE0A5 /* argentina-large.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "argentina-large.png"; sourceTree = ""; }; + 4C3CBB9D63F29447E8C3C06F /* step2@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "step2@2x.png"; sourceTree = ""; }; + 4D35CE548040C1EF3B8BD581 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + 4F353004786E58271D76683E /* Default-Landscape~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Landscape~ipad.png"; sourceTree = ""; }; + 54743FFF10003AA647D1654F /* australia-large.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "australia-large.png"; sourceTree = ""; }; + 550E6B03BFE321336D066223 /* spitfire@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "spitfire@2x.png"; sourceTree = ""; }; + 58B0EFEC1C69A989B6E84744 /* h1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = h1.png; sourceTree = ""; }; + 5977F6DB8B9BD6609BE664B0 /* TileLayerViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TileLayerViewController.h; sourceTree = ""; }; + 59940AD9F86687DEA94EDE8C /* CameraViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CameraViewController.h; sourceTree = ""; }; + 5AA08AB86BAE0FBBB8B3705F /* boat.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = boat.png; sourceTree = ""; }; + 5EC5186C29703467E4C2ED80 /* SDKDemoAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDKDemoAppDelegate.m; sourceTree = ""; }; + 5F3C1FEA265C2BC44CFFB4BD /* MapTypesViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MapTypesViewController.m; sourceTree = ""; }; + 62CBE24F5F8C7DF19AE8452C /* step4@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "step4@2x.png"; sourceTree = ""; }; + 63B21B38E81405568CD36449 /* AnimatedCurrentLocationViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AnimatedCurrentLocationViewController.h; sourceTree = ""; }; + 64888C52E2E272FEFE7C18AA /* StructuredGeocoderViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StructuredGeocoderViewController.m; sourceTree = ""; }; + 656D0083D388D030EA0C9E3E /* SDKDemos.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SDKDemos.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 6571C6FD38FB80E9657C6CF4 /* PolylinesViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PolylinesViewController.h; sourceTree = ""; }; + 6A37ED9FA16A22EFC586E32E /* MyLocationViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyLocationViewController.m; sourceTree = ""; }; + 6D2F332D6F2FB20FE11DFB6E /* step3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = step3.png; sourceTree = ""; }; + 6DEE18F2AE053B9A1DB19C5C /* TileLayerViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TileLayerViewController.m; sourceTree = ""; }; + 72FF2F70BA1B0073BE1F375F /* newark_nj_1922.jpg */ = {isa = PBXFileReference; lastKnownFileType = text; path = newark_nj_1922.jpg; sourceTree = ""; }; + 735DFE797020C7F09B21F773 /* CustomIndoorViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CustomIndoorViewController.h; sourceTree = ""; }; + 7385EE81D06D3C1BD826B7C5 /* step5@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "step5@2x.png"; sourceTree = ""; }; + 74A9950FBE5A377D1EBB2230 /* SDKDemoMasterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDKDemoMasterViewController.h; sourceTree = ""; }; + 74F5EF3ED006A948BCC2BF82 /* libobjc.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libobjc.dylib; path = usr/lib/libobjc.dylib; sourceTree = SDKROOT; }; + 75E000124A1962A304CEAAB8 /* aeroplane.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = aeroplane.png; sourceTree = ""; }; + 778A178288F1E9593A03C6DB /* Samples.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Samples.h; sourceTree = ""; }; + 778FAE1359A6570015F495EA /* GroundOverlayViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GroundOverlayViewController.h; sourceTree = ""; }; + 77EA8532CD15A6B5E800415E /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; + 78C6F7D665C6DD4328894967 /* TrafficMapViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TrafficMapViewController.m; sourceTree = ""; }; + 799CC7F35C34DAA014613DDF /* aeroplane@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "aeroplane@2x.png"; sourceTree = ""; }; + 79A9E14215E011A6DFD2B0BA /* GradientPolylinesViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GradientPolylinesViewController.h; sourceTree = ""; }; + 7B47995B2A94F831E8B7DD0F /* GLKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLKit.framework; path = System/Library/Frameworks/GLKit.framework; sourceTree = SDKROOT; }; + 7B4AF795B18672B900DE3568 /* MarkerEventsViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MarkerEventsViewController.h; sourceTree = ""; }; + 7BBAEFAF2820EDE4EBA5D943 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; + 7BFD80C8485C48F2C90C85A8 /* GradientPolylinesViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GradientPolylinesViewController.m; sourceTree = ""; }; + 7EC4132AB51E1500FF16E4C5 /* voyager.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = voyager.png; sourceTree = ""; }; + 81B8039817FFB9A398E1158B /* DoubleMapViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DoubleMapViewController.h; sourceTree = ""; }; + 837C86EA9AC87A3A5EA16145 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; + 842A2FB43838968D313B1783 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; + 85109740028667AB1646AC2D /* glow-marker@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glow-marker@2x.png"; sourceTree = ""; }; + 85288BF143D609A7145A7846 /* popup_santa.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = popup_santa.png; sourceTree = ""; }; + 88F50C2BAD0B000697EBECCE /* boat@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "boat@2x.png"; sourceTree = ""; }; + 8B3EA327A271CA6A64D117A6 /* FitBoundsViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FitBoundsViewController.m; sourceTree = ""; }; + 8EB73A280D8FE0A1D2C054C8 /* bulgaria-large.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "bulgaria-large.png"; sourceTree = ""; }; + 8F59372BD761533A2A6B470A /* GoogleMaps.bundle */ = {isa = PBXFileReference; lastKnownFileType = wrapper.cfbundle; path = GoogleMaps.bundle; sourceTree = ""; }; + 8F6ED0C99E84A5FE46148309 /* libicucore.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libicucore.dylib; path = usr/lib/libicucore.dylib; sourceTree = SDKROOT; }; + 90258FFF395A5E25CCEC3AB0 /* PolygonsViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PolygonsViewController.m; sourceTree = ""; }; + 9285758C5E07413BA20C8840 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 933F14F944559A5D5538023D /* AnimatedCurrentLocationViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AnimatedCurrentLocationViewController.m; sourceTree = ""; }; + 959C749EEFBCC25DCDCC1416 /* Launch.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = Launch.xib; sourceTree = ""; }; + 97284C2589969381B1F2BF65 /* botswana.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = botswana.png; sourceTree = ""; }; + 9820B8516BCB7CD9A6553720 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; + 989BBAF7DF1CD21CA2F9CC0E /* FixedPanoramaViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FixedPanoramaViewController.h; sourceTree = ""; }; + 98A5F219881F5A5612905ABC /* step4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = step4.png; sourceTree = ""; }; + 9A2729CB24AF1A2D245CD886 /* CameraViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CameraViewController.m; sourceTree = ""; }; + 9AB08565AAF1A341BC7D2A61 /* MarkerLayerViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MarkerLayerViewController.m; sourceTree = ""; }; + 9C2D5258F1365BCD57029138 /* MarkersViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MarkersViewController.m; sourceTree = ""; }; + A38AE667ACADB5627CF67973 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; + A48DE20E9EF0EFE5F9656B51 /* SDKDemoAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDKDemoAppDelegate.h; sourceTree = ""; }; + A56AF9AA60B75EF16CE3EF8C /* Default-Portrait~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Portrait~ipad.png"; sourceTree = ""; }; + A578CA16809EBB3047B3C573 /* DoubleMapViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DoubleMapViewController.m; sourceTree = ""; }; + A849C0D00CED5DEF33AC6844 /* MapLayerViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MapLayerViewController.h; sourceTree = ""; }; + AAA8B2B19FA46102744D14EF /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; + AB330C8620876E40BEC85968 /* voyager@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "voyager@2x.png"; sourceTree = ""; }; + ABAA14F70E24A8E44326BBAE /* FixedPanoramaViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FixedPanoramaViewController.m; sourceTree = ""; }; + AC4F4FF0F15305FE7DB327D5 /* MyLocationViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyLocationViewController.h; sourceTree = ""; }; + ADB6F5B2F34C4461E2AFF686 /* CustomMarkersViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CustomMarkersViewController.h; sourceTree = ""; }; + ADDE981D53FECD067A463663 /* CoreBluetooth.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreBluetooth.framework; path = System/Library/Frameworks/CoreBluetooth.framework; sourceTree = SDKROOT; }; + B1FA4EC4A89767E10B655CB0 /* MarkerLayerViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MarkerLayerViewController.h; sourceTree = ""; }; + B247AC68273A6B9F29ED6CDC /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; }; + B6D2F25F8F4B1159C707B4A2 /* IndoorViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IndoorViewController.h; sourceTree = ""; }; + B8B2C467E3382D3E31EA92E1 /* SDKDemoPlacePickerViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDKDemoPlacePickerViewController.m; sourceTree = ""; }; + BA7783E4FDFA7455B4EF6174 /* PolygonsViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PolygonsViewController.h; sourceTree = ""; }; + BAF511F09C737A22E0A76E59 /* bulgaria.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bulgaria.png; sourceTree = ""; }; + BD36A58B321268BB8E267874 /* CustomMarkersViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CustomMarkersViewController.m; sourceTree = ""; }; + BD7A194DAB9B544294D7A2D0 /* GroundOverlayViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GroundOverlayViewController.m; sourceTree = ""; }; + C07CD02A92489C92FC822C3A /* SDKDemoAPIKey.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDKDemoAPIKey.h; sourceTree = ""; }; + C4D94F429262C3A09166D73F /* australia-large@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "australia-large@2x.png"; sourceTree = ""; }; + C7AB12C7756274D40E649762 /* step7@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "step7@2x.png"; sourceTree = ""; }; + C9926C6844E111CB23EF2E80 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + CD99D73AD66B03243C670572 /* sdkdemos_icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = sdkdemos_icon.png; sourceTree = ""; }; + D03EB3995F5EF92504D8E44F /* Default-Portrait@2x~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Portrait@2x~ipad.png"; sourceTree = ""; }; + D05C1274204C92F13ABD8599 /* step6@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "step6@2x.png"; sourceTree = ""; }; + D1B2675ECA97CB1F5D0F5F88 /* MapTypesViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MapTypesViewController.h; sourceTree = ""; }; + D2325AC9E493AAC86F87681E /* GoogleMaps.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = GoogleMaps.framework; sourceTree = ""; }; + D2DFE1BF52A3A8AFFF379322 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; }; + D619B3D989A533F358F1D077 /* botswana-large.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "botswana-large.png"; sourceTree = ""; }; + D6A64F2A232BF392091BFB79 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; + D7B0E6B7E378BF2301E42C6A /* StructuredGeocoderViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StructuredGeocoderViewController.h; sourceTree = ""; }; + D81C6119C4C7DE07FB42F86D /* popup_santa@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "popup_santa@2x.png"; sourceTree = ""; }; + D83F65E0A08406E055A906B0 /* step2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = step2.png; sourceTree = ""; }; + D8C04CF121E2CAC61D549125 /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; }; + DABC6731995E50EBF60E82DA /* VisibleRegionViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VisibleRegionViewController.m; sourceTree = ""; }; + DBBB2837C3A8ADB3D5191304 /* PanoramaViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PanoramaViewController.m; sourceTree = ""; }; + DC53293C94A672B4C62AD559 /* step1@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "step1@2x.png"; sourceTree = ""; }; + DC8661CA82A046ED2AF5B71F /* MarkerInfoWindowViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MarkerInfoWindowViewController.m; sourceTree = ""; }; + E0D4EAD84FB1F606F6016E0B /* VisibleRegionViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VisibleRegionViewController.h; sourceTree = ""; }; + E4B1CC9979AFE466B59A9AC4 /* IndoorMuseumNavigationViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IndoorMuseumNavigationViewController.h; sourceTree = ""; }; + E8CF929DF33D172F36F845E3 /* step8.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = step8.png; sourceTree = ""; }; + EA55E63E3ECB92756B8A8854 /* australia.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = australia.png; sourceTree = ""; }; + EB1CD2C01411A35969C872BA /* CustomIndoorViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CustomIndoorViewController.m; sourceTree = ""; }; + EBDAAD248E528C9D828A2878 /* argentina.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = argentina.png; sourceTree = ""; }; + EBDF69733C905396E3568053 /* Samples+Places.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "Samples+Places.m"; sourceTree = ""; }; + EF3CF28401B594ADE426E656 /* h1@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "h1@2x.png"; sourceTree = ""; }; + FA940308742FE4A8E2ACB6DB /* Default-Landscape@2x~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Landscape@2x~ipad.png"; sourceTree = ""; }; + FAF66F7D7BC732C1A5A896B0 /* SDKDemos.gyp */ = {isa = PBXFileReference; explicitFileType = sourcecode; path = SDKDemos.gyp; sourceTree = ""; }; + FCCC58E7443B387046306EEF /* step8@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "step8@2x.png"; sourceTree = ""; }; + FD181A33530788C065AA2D90 /* sdkdemos_icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "sdkdemos_icon@2x.png"; sourceTree = ""; }; + FD40AB7623BD1C9A81EA9239 /* FitBoundsViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FitBoundsViewController.h; sourceTree = ""; }; + FE2B3D4C04A8916BC8027A72 /* spitfire.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = spitfire.png; sourceTree = ""; }; + FE7C2DA207359F759D081156 /* step1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = step1.png; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 9F427D7DE56744A968901ED9 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + FF3DA502EBB043CA9CBCC44C /* GoogleMaps.framework in Frameworks */, + 939D9DD972B3C9CEF6268682 /* libobjc.dylib in Frameworks */, + 7151879999E96F2B5F8EC9AD /* CoreFoundation.framework in Frameworks */, + 541DAAB4C469032E7585D5D6 /* Foundation.framework in Frameworks */, + 586C3C40DC409C135B0AA19A /* CoreGraphics.framework in Frameworks */, + 93326C0FF4EE9F4BC32A072C /* UIKit.framework in Frameworks */, + 0B225B8CEA118D7190C02F8A /* AVFoundation.framework in Frameworks */, + D9993D35B97D8FF8F5F99A76 /* CoreData.framework in Frameworks */, + AB2D25C2602C7E82EA483032 /* CoreLocation.framework in Frameworks */, + D256FE4FDF4FDC2AF346BD7B /* CoreText.framework in Frameworks */, + 495DCD4434C57715950F77B4 /* GLKit.framework in Frameworks */, + 9CD7E5647D53C860A29AEF86 /* ImageIO.framework in Frameworks */, + A223A4F133AD8F8474895B2D /* Security.framework in Frameworks */, + BB82297CC4CD1B229302A5EB /* CoreBluetooth.framework in Frameworks */, + 2F8454DDC3837DA90C5E9114 /* Accelerate.framework in Frameworks */, + 6FC1A0CD8C09A8A7A8C394AA /* libc++.dylib in Frameworks */, + 1BC4F897035B4D58120062D4 /* libicucore.dylib in Frameworks */, + 7677FF7FF78329D9A3205687 /* libz.dylib in Frameworks */, + 9A09C9C77E8CEC959473BBB4 /* OpenGLES.framework in Frameworks */, + B29088B5D465871C06402A9A /* QuartzCore.framework in Frameworks */, + 0C50E0E757CCCCAFCC64FBB4 /* SystemConfiguration.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 1CC686768E6E7BE8890097AC /* PlacesSamples */ = { + isa = PBXGroup; + children = ( + 48C5F2798147CFFA14B5B7DD /* SDKDemoPlacePickerViewController.h */, + B8B2C467E3382D3E31EA92E1 /* SDKDemoPlacePickerViewController.m */, + 14532E524E38739F32328ECE /* Samples+Places.h */, + EBDF69733C905396E3568053 /* Samples+Places.m */, + ); + path = PlacesSamples; + sourceTree = ""; + }; + 2DBE6964ECA9681577AD08E9 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 837C86EA9AC87A3A5EA16145 /* AVFoundation.framework */, + D6A64F2A232BF392091BFB79 /* Accelerate.framework */, + ADDE981D53FECD067A463663 /* CoreBluetooth.framework */, + 9820B8516BCB7CD9A6553720 /* CoreData.framework */, + D2DFE1BF52A3A8AFFF379322 /* CoreFoundation.framework */, + 0416087FE83DCD914CF69FA9 /* CoreGraphics.framework */, + A38AE667ACADB5627CF67973 /* CoreLocation.framework */, + D8C04CF121E2CAC61D549125 /* CoreText.framework */, + C9926C6844E111CB23EF2E80 /* Foundation.framework */, + 7B47995B2A94F831E8B7DD0F /* GLKit.framework */, + D2325AC9E493AAC86F87681E /* GoogleMaps.framework */, + B247AC68273A6B9F29ED6CDC /* ImageIO.framework */, + 7BBAEFAF2820EDE4EBA5D943 /* OpenGLES.framework */, + 4D35CE548040C1EF3B8BD581 /* QuartzCore.framework */, + 425802FD822D22CC110119BA /* Security.framework */, + 4152CBF14080E0C84DFD6613 /* SystemConfiguration.framework */, + 9285758C5E07413BA20C8840 /* UIKit.framework */, + 193951C11D1549E7701FFC40 /* libc++.dylib */, + 8F6ED0C99E84A5FE46148309 /* libicucore.dylib */, + 74F5EF3ED006A948BCC2BF82 /* libobjc.dylib */, + AAA8B2B19FA46102744D14EF /* libz.dylib */, + ); + name = Frameworks; + sourceTree = ""; + }; + 4B066C2469FD81496EBDEF55 /* Resources */ = { + isa = PBXGroup; + children = ( + 69EBDE721FDFDCCDBB9DCC7A /* Images */, + 5F82E697DB805D8F5C7C7129 /* Museum-Icons */, + 959C749EEFBCC25DCDCC1416 /* Launch.xib */, + 75E000124A1962A304CEAAB8 /* aeroplane.png */, + 799CC7F35C34DAA014613DDF /* aeroplane@2x.png */, + 4C29D1A0DA47D1691C6CE0A5 /* argentina-large.png */, + EBDAAD248E528C9D828A2878 /* argentina.png */, + 3401A5B1795F7B7056A7F491 /* arrow.png */, + 46FF553F45838251496245F9 /* arrow@2x.png */, + 54743FFF10003AA647D1654F /* australia-large.png */, + C4D94F429262C3A09166D73F /* australia-large@2x.png */, + EA55E63E3ECB92756B8A8854 /* australia.png */, + 5AA08AB86BAE0FBBB8B3705F /* boat.png */, + 88F50C2BAD0B000697EBECCE /* boat@2x.png */, + D619B3D989A533F358F1D077 /* botswana-large.png */, + 97284C2589969381B1F2BF65 /* botswana.png */, + 8EB73A280D8FE0A1D2C054C8 /* bulgaria-large.png */, + BAF511F09C737A22E0A76E59 /* bulgaria.png */, + 2E95ACF5DD497E15A0B746DF /* glow-marker.png */, + 85109740028667AB1646AC2D /* glow-marker@2x.png */, + 1A597E83DFFF77F1EBD76B64 /* museum-exhibits.json */, + 72FF2F70BA1B0073BE1F375F /* newark_nj_1922.jpg */, + 85288BF143D609A7145A7846 /* popup_santa.png */, + D81C6119C4C7DE07FB42F86D /* popup_santa@2x.png */, + FE7C2DA207359F759D081156 /* step1.png */, + DC53293C94A672B4C62AD559 /* step1@2x.png */, + D83F65E0A08406E055A906B0 /* step2.png */, + 4C3CBB9D63F29447E8C3C06F /* step2@2x.png */, + 6D2F332D6F2FB20FE11DFB6E /* step3.png */, + 14A1E50F98F1EA56590AA120 /* step3@2x.png */, + 98A5F219881F5A5612905ABC /* step4.png */, + 62CBE24F5F8C7DF19AE8452C /* step4@2x.png */, + 3C1A74AB0EFA8C78AF23E564 /* step5.png */, + 7385EE81D06D3C1BD826B7C5 /* step5@2x.png */, + 359EF8FC1D5600228CFFBF4D /* step6.png */, + D05C1274204C92F13ABD8599 /* step6@2x.png */, + 3628691A5936DDD1821A622B /* step7.png */, + C7AB12C7756274D40E649762 /* step7@2x.png */, + E8CF929DF33D172F36F845E3 /* step8.png */, + FCCC58E7443B387046306EEF /* step8@2x.png */, + 3F1ABBF9B2E96BC488485119 /* track.json */, + ); + path = Resources; + sourceTree = ""; + }; + 55584DEF78F797697AA2FD6D /* GoogleMaps.framework/Resources */ = { + isa = PBXGroup; + children = ( + 8F59372BD761533A2A6B470A /* GoogleMaps.bundle */, + ); + path = GoogleMaps.framework/Resources; + sourceTree = ""; + }; + 5F82E697DB805D8F5C7C7129 /* Museum-Icons */ = { + isa = PBXGroup; + children = ( + 58B0EFEC1C69A989B6E84744 /* h1.png */, + EF3CF28401B594ADE426E656 /* h1@2x.png */, + FE2B3D4C04A8916BC8027A72 /* spitfire.png */, + 550E6B03BFE321336D066223 /* spitfire@2x.png */, + 7EC4132AB51E1500FF16E4C5 /* voyager.png */, + AB330C8620876E40BEC85968 /* voyager@2x.png */, + 487E4999CFF757EA18C569D8 /* x29.png */, + 124B199908A64B1EE958F3CA /* x29@2x.png */, + ); + path = "Museum-Icons"; + sourceTree = ""; + }; + 69EBDE721FDFDCCDBB9DCC7A /* Images */ = { + isa = PBXGroup; + children = ( + 77EA8532CD15A6B5E800415E /* Default-568h@2x.png */, + FA940308742FE4A8E2ACB6DB /* Default-Landscape@2x~ipad.png */, + 4F353004786E58271D76683E /* Default-Landscape~ipad.png */, + D03EB3995F5EF92504D8E44F /* Default-Portrait@2x~ipad.png */, + A56AF9AA60B75EF16CE3EF8C /* Default-Portrait~ipad.png */, + 842A2FB43838968D313B1783 /* Default.png */, + 0372FAEB924D0ADD012FBDFE /* Default@2x.png */, + 31DE8BA62A492FBC67E923AD /* sdkdemos_icon-72.png */, + 0F33C1C90D61AD0E2B502215 /* sdkdemos_icon-72@2x.png */, + CD99D73AD66B03243C670572 /* sdkdemos_icon.png */, + FD181A33530788C065AA2D90 /* sdkdemos_icon@2x.png */, + ); + path = Images; + sourceTree = ""; + }; + 6B58453C62AFCD886F0EED66 /* Source */ = { + isa = PBXGroup; + children = ( + 55584DEF78F797697AA2FD6D /* GoogleMaps.framework/Resources */, + 99979DB0F5D442647B9411F8 /* SDKDemos */, + ); + name = Source; + sourceTree = ""; + }; + 7F4C35C83CCF9EE02F5CB56A /* Samples */ = { + isa = PBXGroup; + children = ( + 63B21B38E81405568CD36449 /* AnimatedCurrentLocationViewController.h */, + 933F14F944559A5D5538023D /* AnimatedCurrentLocationViewController.m */, + 460EBDFBDFFE13DB517214A5 /* BasicMapViewController.h */, + 4BA4E139EA9FAA0D6A639CE6 /* BasicMapViewController.m */, + 59940AD9F86687DEA94EDE8C /* CameraViewController.h */, + 9A2729CB24AF1A2D245CD886 /* CameraViewController.m */, + 735DFE797020C7F09B21F773 /* CustomIndoorViewController.h */, + EB1CD2C01411A35969C872BA /* CustomIndoorViewController.m */, + ADB6F5B2F34C4461E2AFF686 /* CustomMarkersViewController.h */, + BD36A58B321268BB8E267874 /* CustomMarkersViewController.m */, + 81B8039817FFB9A398E1158B /* DoubleMapViewController.h */, + A578CA16809EBB3047B3C573 /* DoubleMapViewController.m */, + FD40AB7623BD1C9A81EA9239 /* FitBoundsViewController.h */, + 8B3EA327A271CA6A64D117A6 /* FitBoundsViewController.m */, + 989BBAF7DF1CD21CA2F9CC0E /* FixedPanoramaViewController.h */, + ABAA14F70E24A8E44326BBAE /* FixedPanoramaViewController.m */, + 1BA8114B0A4CDC672F1CBD6F /* GeocoderViewController.h */, + 3BD92F5F6AB10EDD9098A9DC /* GeocoderViewController.m */, + 3449C03C22DABB720D80FF72 /* GestureControlViewController.h */, + 0BA108F4D0C3BDA34CE54180 /* GestureControlViewController.m */, + 79A9E14215E011A6DFD2B0BA /* GradientPolylinesViewController.h */, + 7BFD80C8485C48F2C90C85A8 /* GradientPolylinesViewController.m */, + 778FAE1359A6570015F495EA /* GroundOverlayViewController.h */, + BD7A194DAB9B544294D7A2D0 /* GroundOverlayViewController.m */, + E4B1CC9979AFE466B59A9AC4 /* IndoorMuseumNavigationViewController.h */, + 3AAAD985B0FF3AF55E964A33 /* IndoorMuseumNavigationViewController.m */, + B6D2F25F8F4B1159C707B4A2 /* IndoorViewController.h */, + 0B6999063F311237F673B8B0 /* IndoorViewController.m */, + A849C0D00CED5DEF33AC6844 /* MapLayerViewController.h */, + 31F229C07CCFB0CFEBD70F68 /* MapLayerViewController.m */, + D1B2675ECA97CB1F5D0F5F88 /* MapTypesViewController.h */, + 5F3C1FEA265C2BC44CFFB4BD /* MapTypesViewController.m */, + 394AF35F597FB89E9D6A1E3D /* MapZoomViewController.h */, + 45580B3C558B48DD3359F2A1 /* MapZoomViewController.m */, + 7B4AF795B18672B900DE3568 /* MarkerEventsViewController.h */, + 1F1D873627D847B5C1B099FC /* MarkerEventsViewController.m */, + 13CBFFCFE30583D29D77B5A1 /* MarkerInfoWindowViewController.h */, + DC8661CA82A046ED2AF5B71F /* MarkerInfoWindowViewController.m */, + B1FA4EC4A89767E10B655CB0 /* MarkerLayerViewController.h */, + 9AB08565AAF1A341BC7D2A61 /* MarkerLayerViewController.m */, + 15F93E8BE938118367B428AA /* MarkersViewController.h */, + 9C2D5258F1365BCD57029138 /* MarkersViewController.m */, + AC4F4FF0F15305FE7DB327D5 /* MyLocationViewController.h */, + 6A37ED9FA16A22EFC586E32E /* MyLocationViewController.m */, + 2AB2A95CCD24024671158AD9 /* PanoramaViewController.h */, + DBBB2837C3A8ADB3D5191304 /* PanoramaViewController.m */, + BA7783E4FDFA7455B4EF6174 /* PolygonsViewController.h */, + 90258FFF395A5E25CCEC3AB0 /* PolygonsViewController.m */, + 6571C6FD38FB80E9657C6CF4 /* PolylinesViewController.h */, + 429F95111FD1F8B8A1C16865 /* PolylinesViewController.m */, + 778A178288F1E9593A03C6DB /* Samples.h */, + 043F8041B5649C26BCE75231 /* Samples.m */, + D7B0E6B7E378BF2301E42C6A /* StructuredGeocoderViewController.h */, + 64888C52E2E272FEFE7C18AA /* StructuredGeocoderViewController.m */, + 5977F6DB8B9BD6609BE664B0 /* TileLayerViewController.h */, + 6DEE18F2AE053B9A1DB19C5C /* TileLayerViewController.m */, + 09F0DD5C27A815E1A9720747 /* TrafficMapViewController.h */, + 78C6F7D665C6DD4328894967 /* TrafficMapViewController.m */, + E0D4EAD84FB1F606F6016E0B /* VisibleRegionViewController.h */, + DABC6731995E50EBF60E82DA /* VisibleRegionViewController.m */, + ); + path = Samples; + sourceTree = ""; + }; + 99979DB0F5D442647B9411F8 /* SDKDemos */ = { + isa = PBXGroup; + children = ( + 1CC686768E6E7BE8890097AC /* PlacesSamples */, + 4B066C2469FD81496EBDEF55 /* Resources */, + 7F4C35C83CCF9EE02F5CB56A /* Samples */, + C07CD02A92489C92FC822C3A /* SDKDemoAPIKey.h */, + A48DE20E9EF0EFE5F9656B51 /* SDKDemoAppDelegate.h */, + 5EC5186C29703467E4C2ED80 /* SDKDemoAppDelegate.m */, + 74A9950FBE5A377D1EBB2230 /* SDKDemoMasterViewController.h */, + 031103FAE4E394EA78895993 /* SDKDemoMasterViewController.m */, + 006739C6096E6B69D83F4A03 /* main.m */, + ); + path = SDKDemos; + sourceTree = ""; + }; + A2C8628B55F950FE20E7137C = { + isa = PBXGroup; + children = ( + 6B58453C62AFCD886F0EED66 /* Source */, + 2DBE6964ECA9681577AD08E9 /* Frameworks */, + E432E4A5C2DA557A55565E67 /* Products */, + D7938F561BAB3DB37E038EF7 /* Build */, + ); + sourceTree = ""; + }; + D7938F561BAB3DB37E038EF7 /* Build */ = { + isa = PBXGroup; + children = ( + FAF66F7D7BC732C1A5A896B0 /* SDKDemos.gyp */, + ); + name = Build; + sourceTree = ""; + }; + E432E4A5C2DA557A55565E67 /* Products */ = { + isa = PBXGroup; + children = ( + 656D0083D388D030EA0C9E3E /* SDKDemos.app */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + F0A34C824BF91068571FB9C9 /* SDKDemos */ = { + isa = PBXNativeTarget; + buildConfigurationList = 258F0E920477D8ADA8B68139 /* Build configuration list for PBXNativeTarget "SDKDemos" */; + buildPhases = ( + ADA7B6829517252313848C86 /* Resources */, + 2F23BF35CD9D8A7EBB7A3277 /* Sources */, + 9F427D7DE56744A968901ED9 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SDKDemos; + productName = SDKDemos; + productReference = 656D0083D388D030EA0C9E3E /* SDKDemos.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + C0152C353C1C1C999BE34696 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + }; + buildConfigurationList = 3203C92569C9F50F18471A03 /* Build configuration list for PBXProject "SDKDemos" */; + compatibilityVersion = "Xcode 3.2"; + hasScannedForEncodings = 1; + mainGroup = A2C8628B55F950FE20E7137C; + projectDirPath = ""; + projectRoot = ""; + targets = ( + F0A34C824BF91068571FB9C9 /* SDKDemos */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + ADA7B6829517252313848C86 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + F17C0B74A739BF14D241F16B /* aeroplane.png in Resources */, + C230F93CE1D3114716A8BB21 /* aeroplane@2x.png in Resources */, + 800859CC04D2A160A19CBEF7 /* argentina-large.png in Resources */, + 526533CE6B1C0ED1B688F483 /* argentina.png in Resources */, + 1E50BD7CDD9844B9D59D100E /* arrow.png in Resources */, + 59FCB7DFF4C3A3F9D7D09CEF /* arrow@2x.png in Resources */, + 9931F73B835246208F13740C /* australia-large.png in Resources */, + 67D720CC13969DD22BFA987A /* australia-large@2x.png in Resources */, + 8E8CDF0B6C238C4A12355BA6 /* australia.png in Resources */, + 07143A1B00A26FB01E24A850 /* boat.png in Resources */, + 1C19BC7BF5541FECFAC6D1E7 /* boat@2x.png in Resources */, + 742CEB5206972B2A9DF79010 /* botswana-large.png in Resources */, + 0248CC2CFECAE929CBA46D32 /* botswana.png in Resources */, + 7D0AC180E00091E865619B3A /* bulgaria-large.png in Resources */, + FF90C83B482F1E9B6B3CEDE9 /* bulgaria.png in Resources */, + 15B014D5EE4D4B8A9E5F1FAD /* glow-marker.png in Resources */, + 41A1EB571CD2C902160F70BA /* glow-marker@2x.png in Resources */, + ABB9D9368C8C9AA0F4E98A5B /* Default-568h@2x.png in Resources */, + 3008E4FF586C0C4CCE5414A0 /* Default-Landscape@2x~ipad.png in Resources */, + 8D032C0D459BAA28785D4D82 /* Default-Landscape~ipad.png in Resources */, + FF5B48D04F4CA6E5E78737D6 /* Default-Portrait@2x~ipad.png in Resources */, + 158A3EEE3E90A6CDE07C8D3E /* Default-Portrait~ipad.png in Resources */, + 0804F89A761192E17C4E14A0 /* Default.png in Resources */, + 4A32F95C94EB31838B53D74D /* Default@2x.png in Resources */, + D86BD487B00D457841F89438 /* sdkdemos_icon-72.png in Resources */, + 14AEFDCDCBCBA9BD4D739777 /* sdkdemos_icon-72@2x.png in Resources */, + B45757B5CE9CEDE5C085AC17 /* sdkdemos_icon.png in Resources */, + EDBD021F4894885DCBCF392F /* sdkdemos_icon@2x.png in Resources */, + DD3DCD76A940EBD4E58E76F3 /* h1.png in Resources */, + 8711D42833BA78FA57565605 /* h1@2x.png in Resources */, + 37D656EEA738FCF3B8FAAE89 /* spitfire.png in Resources */, + EB83CCF71D1F521D867360E6 /* spitfire@2x.png in Resources */, + ED6DEEBDC0298BF1AC19F0B0 /* voyager.png in Resources */, + B65254ACFCCA101144AEA425 /* voyager@2x.png in Resources */, + C6C66578EE0A3295A2392185 /* x29.png in Resources */, + E5CEE60985676D8CC6AC0FE8 /* x29@2x.png in Resources */, + C9B58772C3374D132D54B79E /* popup_santa.png in Resources */, + D8114F384AA6E0242578FAC3 /* popup_santa@2x.png in Resources */, + B3D44230385773BFD2CB22E7 /* step1.png in Resources */, + 150069CF910745504A7E3F7F /* step1@2x.png in Resources */, + 439219410CB49A6BB29EA6AA /* step2.png in Resources */, + EBDEB695207B4D4D9F3C677F /* step2@2x.png in Resources */, + DAD13235132F0A7B9A7D9A86 /* step3.png in Resources */, + 740C876D089202BF76EFF6D7 /* step3@2x.png in Resources */, + 0966341B5DECEEB70F824FB4 /* step4.png in Resources */, + 6E44FC6890A0979EED438270 /* step4@2x.png in Resources */, + 0A9073D3525470D2441215B2 /* step5.png in Resources */, + F844A584365DC27FDFC38368 /* step5@2x.png in Resources */, + 7E32939A0E72D31989291E78 /* step6.png in Resources */, + FAA88DA5B6CB123CB79FAB1E /* step6@2x.png in Resources */, + D5B79AD1DE6AFB7CA050796F /* step7.png in Resources */, + 696DC26814A711ED1FB8ACC8 /* step7@2x.png in Resources */, + 7BDA92EDDAB1F6D3BD5E3D33 /* step8.png in Resources */, + A1C1CC6329A61E8AC8DEF45E /* step8@2x.png in Resources */, + 099C7BEF376638CC84DE5779 /* newark_nj_1922.jpg in Resources */, + 81EE689DC035CAF1D9C479FD /* museum-exhibits.json in Resources */, + 93179278EF404CB0AB3AD109 /* track.json in Resources */, + F8DEB16CA5084A02112ACF8E /* Launch.xib in Resources */, + 6C86DB77A73CAEE2C48E6668 /* GoogleMaps.bundle in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2F23BF35CD9D8A7EBB7A3277 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 13F27F941CFF1FF90A26E9FB /* main.m in Sources */, + 984203D4FC972F6775785F60 /* Samples+Places.m in Sources */, + 59B1403950BAF2A027E7AD06 /* SDKDemoPlacePickerViewController.m in Sources */, + 8305DE85D47096FF5E6B2C7F /* AnimatedCurrentLocationViewController.m in Sources */, + 1E848AC8B09FCD0B029B2515 /* BasicMapViewController.m in Sources */, + 4DAF1D27C71D97CEC4D35A40 /* CameraViewController.m in Sources */, + B5C57041E4F43FACD9D7855D /* CustomIndoorViewController.m in Sources */, + 3E0BB6C829DA62BCB801089E /* CustomMarkersViewController.m in Sources */, + C38470C15BFF9DAA51DB24CE /* DoubleMapViewController.m in Sources */, + 077F9A9BF20CCC7396BA038D /* FitBoundsViewController.m in Sources */, + F776F3C2E208EE9378C970C9 /* FixedPanoramaViewController.m in Sources */, + EB1E651BF9DC2712EDB689E2 /* GeocoderViewController.m in Sources */, + 5AFC6A9EF7E5334274F2003B /* GestureControlViewController.m in Sources */, + 73B795E621B99087515948DB /* GradientPolylinesViewController.m in Sources */, + BFAF2B58B5447DC7F6700608 /* GroundOverlayViewController.m in Sources */, + 5E25A0B2F58A1DC71D3D095E /* IndoorMuseumNavigationViewController.m in Sources */, + D81F4D7B477B99779B2E26BB /* IndoorViewController.m in Sources */, + D9E9F4337CCE7C06D731C309 /* MapLayerViewController.m in Sources */, + B62B3CD1C9493C6DC10D0F6A /* MapTypesViewController.m in Sources */, + 2351AA58A2D1B916CE6FC02F /* MapZoomViewController.m in Sources */, + 22E010704EB4D09C613E3D02 /* MarkerEventsViewController.m in Sources */, + 7CA30F964585636F7722EF50 /* MarkerInfoWindowViewController.m in Sources */, + 0AB2EA98279BC321EA4EFC30 /* MarkerLayerViewController.m in Sources */, + FB3CCF78441EF08378478AAA /* MarkersViewController.m in Sources */, + 35F868C56688C0541E7C08D6 /* MyLocationViewController.m in Sources */, + 96A9D65C45A6AC6A72B7A83D /* PanoramaViewController.m in Sources */, + 58ADE659AEBDB89F90AA0006 /* PolygonsViewController.m in Sources */, + E471D0D1812EBBED5E1BFC3E /* PolylinesViewController.m in Sources */, + C8FAEF11B1140F995C4AF50E /* Samples.m in Sources */, + A211BD2291B236DFBDB6F703 /* StructuredGeocoderViewController.m in Sources */, + BCDA5CF64C63BF71C5805642 /* TileLayerViewController.m in Sources */, + 317AF024CEE06AB3E759BE77 /* TrafficMapViewController.m in Sources */, + 55C349437FEF9D735F70C826 /* VisibleRegionViewController.m in Sources */, + 2B53A795F430861957A94EB2 /* SDKDemoAppDelegate.m in Sources */, + F67ADB09D12D294ABF56944E /* SDKDemoMasterViewController.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 182F5544C35981299E88F8A3 /* Default */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_OBJC_ARC = YES; + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)"; + INFOPLIST_FILE = "./SDKDemos/SDKDemo-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 6.0; + LIBRARY_SEARCH_PATHS = ( + ., + "$(SDKROOT)/System/Library/Frameworks", + ); + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = SDKDemos; + TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = "$(SRCROOT)"; + USE_HEADERMAP = NO; + VALID_ARCHS = "i386 armv7"; + WRAPPER_PREFIX = ""; + }; + name = Default; + }; + A37B5359681FA0FDEE47E9A5 /* Default */ = { + isa = XCBuildConfiguration; + buildSettings = { + INTERMEDIATE_DIR = "$(PROJECT_DERIVED_FILE_DIR)/$(CONFIGURATION)"; + SDKROOT = iphoneos; + SHARED_INTERMEDIATE_DIR = "$(SYMROOT)/DerivedSources/$(CONFIGURATION)"; + }; + name = Default; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 258F0E920477D8ADA8B68139 /* Build configuration list for PBXNativeTarget "SDKDemos" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 182F5544C35981299E88F8A3 /* Default */, + ); + defaultConfigurationIsVisible = 1; + defaultConfigurationName = Default; + }; + 3203C92569C9F50F18471A03 /* Build configuration list for PBXProject "SDKDemos" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A37B5359681FA0FDEE47E9A5 /* Default */, + ); + defaultConfigurationIsVisible = 1; + defaultConfigurationName = Default; + }; +/* End XCConfigurationList section */ + }; + rootObject = C0152C353C1C1C999BE34696 /* Project object */; +} diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/PlacesSamples/SDKDemoPlacePickerViewController.h b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/PlacesSamples/SDKDemoPlacePickerViewController.h new file mode 100644 index 0000000..4f6afc2 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/PlacesSamples/SDKDemoPlacePickerViewController.h @@ -0,0 +1,5 @@ +#import + +@interface SDKDemoPlacePickerViewController : UIViewController + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/PlacesSamples/SDKDemoPlacePickerViewController.m b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/PlacesSamples/SDKDemoPlacePickerViewController.m new file mode 100644 index 0000000..5a8823a --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/PlacesSamples/SDKDemoPlacePickerViewController.m @@ -0,0 +1,62 @@ +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "SDKDemos/PlacesSamples/SDKDemoPlacePickerViewController.h" + +#import "SDKDemos/SDKDemoAPIKey.h" + + +@implementation SDKDemoPlacePickerViewController { + GMSPlacePicker *_placePicker; +} + +- (instancetype)init { + if ((self = [super init])) { + CLLocationCoordinate2D southWestSydney = CLLocationCoordinate2DMake(-33.8659, 151.1953); + CLLocationCoordinate2D northEastSydney = CLLocationCoordinate2DMake(-33.8645, 151.1969); + GMSCoordinateBounds *sydneyBounds = + [[GMSCoordinateBounds alloc] initWithCoordinate:southWestSydney coordinate:northEastSydney]; + GMSPlacePickerConfig *config = + [[GMSPlacePickerConfig alloc] initWithViewport:sydneyBounds]; + _placePicker = [[GMSPlacePicker alloc] initWithConfig:config]; + } + return self; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + UITextView *textView = [[UITextView alloc] initWithFrame:self.view.bounds]; + textView.delegate = self; + textView.editable = NO; + [self.view addSubview:textView]; + __weak UITextView *weakResultView = textView; + [_placePicker pickPlaceWithCallback:^(GMSPlace *place, NSError *error) { + UITextView *resultView = weakResultView; + if (resultView == nil) { + return; + } + if (place) { + NSMutableAttributedString *text = + [[NSMutableAttributedString alloc] initWithString:[place description]]; + [text appendAttributedString:[[NSAttributedString alloc] initWithString:@"\n\n"]]; + [text appendAttributedString:place.attributions]; + resultView.attributedText = text; + } else if (error) { + resultView.text = + [NSString stringWithFormat:@"Place picking failed with error: %@", error]; + } else { + resultView.text = @"Place picking cancelled."; + } + }]; +} + +#pragma mark - UITextViewDelegate + +- (BOOL)textView:(UITextView *)textView + shouldInteractWithURL:(NSURL *)url + inRange:(NSRange)characterRange { + // Make links clickable. + return YES; +} +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/PlacesSamples/Samples+Places.h b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/PlacesSamples/Samples+Places.h new file mode 100644 index 0000000..376a8ec --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/PlacesSamples/Samples+Places.h @@ -0,0 +1,7 @@ +#import "SDKDemos/Samples/Samples.h" + +@interface Samples (Places) + ++ (NSArray *)placesDemos; + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/PlacesSamples/Samples+Places.m b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/PlacesSamples/Samples+Places.m new file mode 100644 index 0000000..6f4d194 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/PlacesSamples/Samples+Places.m @@ -0,0 +1,19 @@ +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "SDKDemos/PlacesSamples/Samples+Places.h" + +#import "SDKDemos/PlacesSamples/SDKDemoPlacePickerViewController.h" + +@implementation Samples (Places) + ++ (NSArray *)placesDemos { + return @[ + [Samples newDemo:[SDKDemoPlacePickerViewController class] + withTitle:@"Places API Place Picker" + andDescription:nil], + ]; +} + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Images/Default-568h@2x.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Images/Default-568h@2x.png new file mode 100644 index 0000000..8443cbe Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Images/Default-568h@2x.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Images/Default-Landscape@2x~ipad.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Images/Default-Landscape@2x~ipad.png new file mode 100644 index 0000000..3efbab7 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Images/Default-Landscape@2x~ipad.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Images/Default-Landscape~ipad.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Images/Default-Landscape~ipad.png new file mode 100644 index 0000000..4cfca97 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Images/Default-Landscape~ipad.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Images/Default-Portrait@2x~ipad.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Images/Default-Portrait@2x~ipad.png new file mode 100644 index 0000000..66789fb Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Images/Default-Portrait@2x~ipad.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Images/Default-Portrait~ipad.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Images/Default-Portrait~ipad.png new file mode 100644 index 0000000..0a62073 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Images/Default-Portrait~ipad.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Images/Default.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Images/Default.png new file mode 100644 index 0000000..bcbeb8c Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Images/Default.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Images/Default@2x.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Images/Default@2x.png new file mode 100644 index 0000000..a631978 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Images/Default@2x.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Images/sdkdemos_icon-72.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Images/sdkdemos_icon-72.png new file mode 100644 index 0000000..689b3a2 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Images/sdkdemos_icon-72.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Images/sdkdemos_icon-72@2x.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Images/sdkdemos_icon-72@2x.png new file mode 100644 index 0000000..3abcd45 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Images/sdkdemos_icon-72@2x.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Images/sdkdemos_icon.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Images/sdkdemos_icon.png new file mode 100644 index 0000000..6e98095 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Images/sdkdemos_icon.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Images/sdkdemos_icon@2x.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Images/sdkdemos_icon@2x.png new file mode 100644 index 0000000..0979478 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Images/sdkdemos_icon@2x.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Launch.xib b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Launch.xib new file mode 100644 index 0000000..c9334a5 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Launch.xib @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Museum-Icons/h1.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Museum-Icons/h1.png new file mode 100644 index 0000000..9859ded Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Museum-Icons/h1.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Museum-Icons/h1@2x.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Museum-Icons/h1@2x.png new file mode 100644 index 0000000..0eb550f Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Museum-Icons/h1@2x.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Museum-Icons/spitfire.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Museum-Icons/spitfire.png new file mode 100644 index 0000000..ed82a1a Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Museum-Icons/spitfire.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Museum-Icons/spitfire@2x.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Museum-Icons/spitfire@2x.png new file mode 100644 index 0000000..883152c Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Museum-Icons/spitfire@2x.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Museum-Icons/voyager.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Museum-Icons/voyager.png new file mode 100644 index 0000000..2f83887 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Museum-Icons/voyager.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Museum-Icons/voyager@2x.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Museum-Icons/voyager@2x.png new file mode 100644 index 0000000..f796311 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Museum-Icons/voyager@2x.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Museum-Icons/x29.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Museum-Icons/x29.png new file mode 100644 index 0000000..5c84651 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Museum-Icons/x29.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Museum-Icons/x29@2x.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Museum-Icons/x29@2x.png new file mode 100644 index 0000000..7fb4758 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/Museum-Icons/x29@2x.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/aeroplane.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/aeroplane.png new file mode 100644 index 0000000..0ca6d73 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/aeroplane.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/aeroplane@2x.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/aeroplane@2x.png new file mode 100644 index 0000000..013d570 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/aeroplane@2x.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/ar.lproj/InfoPlist.strings b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/ar.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/ar.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/argentina-large.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/argentina-large.png new file mode 100644 index 0000000..50ee6b2 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/argentina-large.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/argentina.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/argentina.png new file mode 100644 index 0000000..23637d1 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/argentina.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/arrow.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/arrow.png new file mode 100644 index 0000000..43a0465 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/arrow.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/arrow@2x.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/arrow@2x.png new file mode 100644 index 0000000..318efd5 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/arrow@2x.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/australia-large.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/australia-large.png new file mode 100644 index 0000000..098821d Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/australia-large.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/australia-large@2x.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/australia-large@2x.png new file mode 100644 index 0000000..8d28a75 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/australia-large@2x.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/australia.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/australia.png new file mode 100644 index 0000000..b2e7c40 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/australia.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/boat.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/boat.png new file mode 100644 index 0000000..0c6c08b Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/boat.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/boat@2x.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/boat@2x.png new file mode 100644 index 0000000..609863f Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/boat@2x.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/botswana-large.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/botswana-large.png new file mode 100644 index 0000000..ee171c8 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/botswana-large.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/botswana.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/botswana.png new file mode 100644 index 0000000..1e34013 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/botswana.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/bulgaria-large.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/bulgaria-large.png new file mode 100644 index 0000000..ab22b29 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/bulgaria-large.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/bulgaria.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/bulgaria.png new file mode 100644 index 0000000..bffb2af Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/bulgaria.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/ca.lproj/InfoPlist.strings b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/ca.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/ca.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/cs.lproj/InfoPlist.strings b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/cs.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/cs.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/da.lproj/InfoPlist.strings b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/da.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/da.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/de.lproj/InfoPlist.strings b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/de.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/de.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/el.lproj/InfoPlist.strings b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/el.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/el.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/en.lproj/InfoPlist.strings b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/en.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/en.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/en_GB.lproj/InfoPlist.strings b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/en_GB.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/en_GB.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/es.lproj/InfoPlist.strings b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/es.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/es.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/fi.lproj/InfoPlist.strings b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/fi.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/fi.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/fr.lproj/InfoPlist.strings b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/fr.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/fr.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/glow-marker.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/glow-marker.png new file mode 100644 index 0000000..1a4b884 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/glow-marker.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/glow-marker@2x.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/glow-marker@2x.png new file mode 100644 index 0000000..f061e16 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/glow-marker@2x.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/he.lproj/InfoPlist.strings b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/he.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/he.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/hr.lproj/InfoPlist.strings b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/hr.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/hr.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/hu.lproj/InfoPlist.strings b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/hu.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/hu.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/id.lproj/InfoPlist.strings b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/id.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/id.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/it.lproj/InfoPlist.strings b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/it.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/it.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/ja.lproj/InfoPlist.strings b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/ja.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/ja.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/ko.lproj/InfoPlist.strings b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/ko.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/ko.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/ms.lproj/InfoPlist.strings b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/ms.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/ms.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/museum-exhibits.json b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/museum-exhibits.json new file mode 100644 index 0000000..231334b --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/museum-exhibits.json @@ -0,0 +1,30 @@ +[ + { + "key": "h1", + "name": "Hughes H-1", + "lat": 38.8879, + "lng": -77.02085, + "level": "1", + }, + { + "key": "voyager", + "name": "Rutan Voyager", + "lat": 38.8880, + "lng": -77.0199, + "level": "1", + }, + { + "key": "spitfire", + "name": "Supermarine Spitfire", + "lat": 38.8879, + "lng": -77.0208, + "level": "2", + }, + { + "key": "x29", + "name": "Grumman X-29", + "lat": 38.88845, + "lng": -77.01875, + "level": "2", + } +] \ No newline at end of file diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/nb.lproj/InfoPlist.strings b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/nb.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/nb.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/newark_nj_1922.jpg b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/newark_nj_1922.jpg new file mode 100644 index 0000000..1f4ae59 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/newark_nj_1922.jpg differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/nl.lproj/InfoPlist.strings b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/nl.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/nl.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/pl.lproj/InfoPlist.strings b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/pl.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/pl.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/popup_santa.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/popup_santa.png new file mode 100644 index 0000000..50b8f59 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/popup_santa.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/popup_santa@2x.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/popup_santa@2x.png new file mode 100644 index 0000000..4bdd7a3 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/popup_santa@2x.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/pt.lproj/InfoPlist.strings b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/pt.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/pt.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/pt_PT.lproj/InfoPlist.strings b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/pt_PT.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/pt_PT.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/ro.lproj/InfoPlist.strings b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/ro.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/ro.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/ru.lproj/InfoPlist.strings b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/ru.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/ru.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/sk.lproj/InfoPlist.strings b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/sk.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/sk.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step1.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step1.png new file mode 100644 index 0000000..172e9fd Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step1.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step1@2x.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step1@2x.png new file mode 100644 index 0000000..aceedc6 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step1@2x.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step2.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step2.png new file mode 100644 index 0000000..c1c762e Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step2.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step2@2x.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step2@2x.png new file mode 100644 index 0000000..1457248 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step2@2x.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step3.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step3.png new file mode 100644 index 0000000..2dcc088 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step3.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step3@2x.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step3@2x.png new file mode 100644 index 0000000..7e0544c Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step3@2x.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step4.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step4.png new file mode 100644 index 0000000..a1e8155 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step4.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step4@2x.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step4@2x.png new file mode 100644 index 0000000..6bcc25b Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step4@2x.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step5.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step5.png new file mode 100644 index 0000000..4ff116e Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step5.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step5@2x.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step5@2x.png new file mode 100644 index 0000000..ec16e0d Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step5@2x.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step6.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step6.png new file mode 100644 index 0000000..09d9b37 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step6.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step6@2x.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step6@2x.png new file mode 100644 index 0000000..e759f9d Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step6@2x.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step7.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step7.png new file mode 100644 index 0000000..60fbf74 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step7.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step7@2x.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step7@2x.png new file mode 100644 index 0000000..2719641 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step7@2x.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step8.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step8.png new file mode 100644 index 0000000..f51cccc Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step8.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step8@2x.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step8@2x.png new file mode 100644 index 0000000..81a6196 Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/step8@2x.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/sv.lproj/InfoPlist.strings b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/sv.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/sv.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/th.lproj/InfoPlist.strings b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/th.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/th.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/tr.lproj/InfoPlist.strings b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/tr.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/tr.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/track.json b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/track.json new file mode 100644 index 0000000..1d49290 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/track.json @@ -0,0 +1 @@ +[{"lat": "44.145331", "lng": "9.661942", "elevation": "173.8000030517578", "time": "2013-09-20T08:40:00.855Z"}, {"lat": "44.145157", "lng": "9.661917", "elevation": "177.3000030517578", "time": "2013-09-20T08:40:01.824Z"}, {"lat": "44.14505", "lng": "9.662049", "elevation": "170.60000610351563", "time": "2013-09-20T08:40:02.945Z"}, {"lat": "44.145", "lng": "9.662165", "elevation": "156.5", "time": "2013-09-20T08:40:03.828Z"}, {"lat": "44.144918", "lng": "9.662227", "elevation": "130.6999969482422", "time": "2013-09-20T08:40:04.823Z"}, {"lat": "44.144945", "lng": "9.662122", "elevation": "149.5", "time": "2013-09-20T08:40:06.123Z"}, {"lat": "44.14503", "lng": "9.662141", "elevation": "152.89999389648438", "time": "2013-09-20T08:40:07.122Z"}, {"lat": "44.144943", "lng": "9.662169", "elevation": "155.3000030517578", "time": "2013-09-20T08:40:19.117Z"}, {"lat": "44.144937", "lng": "9.66217", "elevation": "155.5", "time": "2013-09-20T08:40:20.157Z"}, {"lat": "44.144933", "lng": "9.662171", "elevation": "154.8000030517578", "time": "2013-09-20T08:40:22.132Z"}, {"lat": "44.144933", "lng": "9.662173", "elevation": "155.0", "time": "2013-09-20T08:40:23.141Z"}, {"lat": "44.144937", "lng": "9.662186", "elevation": "155.8000030517578", "time": "2013-09-20T08:40:45.224Z"}, {"lat": "44.144934", "lng": "9.66219", "elevation": "158.5", "time": "2013-09-20T08:40:46.191Z"}, {"lat": "44.144911", "lng": "9.662248", "elevation": "161.6999969482422", "time": "2013-09-20T08:40:59.133Z"}, {"lat": "44.144911", "lng": "9.662249", "elevation": "161.8000030517578", "time": "2013-09-20T08:41:00.124Z"}, {"lat": "44.14491", "lng": "9.662258", "elevation": "161.6999969482422", "time": "2013-09-20T08:41:09.127Z"}, {"lat": "44.144907", "lng": "9.662263", "elevation": "162.0", "time": "2013-09-20T08:41:10.185Z"}, {"lat": "44.144884", "lng": "9.662378", "elevation": "161.3000030517578", "time": "2013-09-20T08:41:17.137Z"}, {"lat": "44.144879", "lng": "9.662397", "elevation": "161.1999969482422", "time": "2013-09-20T08:41:18.211Z"}, {"lat": "44.144874", "lng": "9.662517", "elevation": "163.0", "time": "2013-09-20T08:41:26.217Z"}, {"lat": "44.144877", "lng": "9.66253", "elevation": "163.39999389648438", "time": "2013-09-20T08:41:27.220Z"}, {"lat": "44.144812", "lng": "9.662617", "elevation": "166.8000030517578", "time": "2013-09-20T08:41:36.137Z"}, {"lat": "44.144806", "lng": "9.662625", "elevation": "166.89999389648438", "time": "2013-09-20T08:41:37.146Z"}, {"lat": "44.14477", "lng": "9.662604", "elevation": "167.10000610351563", "time": "2013-09-20T08:41:49.143Z"}, {"lat": "44.14477", "lng": "9.662607", "elevation": "167.1999969482422", "time": "2013-09-20T08:41:50.138Z"}, {"lat": "44.144763", "lng": "9.662619", "elevation": "168.0", "time": "2013-09-20T08:41:58.146Z"}, {"lat": "44.14476", "lng": "9.662618", "elevation": "168.3000030517578", "time": "2013-09-20T08:41:59.133Z"}, {"lat": "44.144755", "lng": "9.662616", "elevation": "168.5", "time": "2013-09-20T08:42:01.147Z"}, {"lat": "44.144755", "lng": "9.662616", "elevation": "168.6999969482422", "time": "2013-09-20T08:42:02.133Z"}, {"lat": "44.144754", "lng": "9.662623", "elevation": "169.8000030517578", "time": "2013-09-20T08:43:18.202Z"}, {"lat": "44.144753", "lng": "9.662633", "elevation": "169.39999389648438", "time": "2013-09-20T08:43:19.274Z"}, {"lat": "44.144768", "lng": "9.662683", "elevation": "173.8000030517578", "time": "2013-09-20T08:43:28.140Z"}, {"lat": "44.144768", "lng": "9.662684", "elevation": "174.0", "time": "2013-09-20T08:43:29.177Z"}, {"lat": "44.144764", "lng": "9.662687", "elevation": "172.89999389648438", "time": "2013-09-20T08:43:33.140Z"}, {"lat": "44.144761", "lng": "9.662692", "elevation": "173.3000030517578", "time": "2013-09-20T08:43:34.147Z"}, {"lat": "44.144755", "lng": "9.662699", "elevation": "173.1999969482422", "time": "2013-09-20T08:43:37.220Z"}, {"lat": "44.144754", "lng": "9.6627", "elevation": "173.1999969482422", "time": "2013-09-20T08:43:38.164Z"}, {"lat": "44.144755", "lng": "9.662702", "elevation": "173.3000030517578", "time": "2013-09-20T08:43:43.148Z"}, {"lat": "44.144756", "lng": "9.662709", "elevation": "172.6999969482422", "time": "2013-09-20T08:43:44.141Z"}, {"lat": "44.144716", "lng": "9.662816", "elevation": "179.5", "time": "2013-09-20T08:43:51.157Z"}, {"lat": "44.144717", "lng": "9.662831", "elevation": "180.8000030517578", "time": "2013-09-20T08:43:52.141Z"}, {"lat": "44.1447", "lng": "9.662945", "elevation": "182.3000030517578", "time": "2013-09-20T08:44:01.165Z"}, {"lat": "44.144696", "lng": "9.662956", "elevation": "181.89999389648438", "time": "2013-09-20T08:44:02.153Z"}, {"lat": "44.144679", "lng": "9.662965", "elevation": "181.6999969482422", "time": "2013-09-20T08:44:08.135Z"}, {"lat": "44.144679", "lng": "9.662966", "elevation": "181.60000610351563", "time": "2013-09-20T08:44:09.139Z"}, {"lat": "44.14469", "lng": "9.66299", "elevation": "183.1999969482422", "time": "2013-09-20T08:44:26.146Z"}, {"lat": "44.144687", "lng": "9.662998", "elevation": "182.89999389648438", "time": "2013-09-20T08:44:27.145Z"}, {"lat": "44.144661", "lng": "9.663117", "elevation": "193.1999969482422", "time": "2013-09-20T08:44:38.177Z"}, {"lat": "44.144658", "lng": "9.66312", "elevation": "193.1999969482422", "time": "2013-09-20T08:44:39.232Z"}, {"lat": "44.144581", "lng": "9.663173", "elevation": "199.3000030517578", "time": "2013-09-20T08:44:51.156Z"}, {"lat": "44.144572", "lng": "9.66319", "elevation": "199.39999389648438", "time": "2013-09-20T08:44:52.153Z"}, {"lat": "44.144518", "lng": "9.663271", "elevation": "201.1999969482422", "time": "2013-09-20T08:44:57.156Z"}, {"lat": "44.144506", "lng": "9.663276", "elevation": "202.5", "time": "2013-09-20T08:44:58.141Z"}, {"lat": "44.144498", "lng": "9.663277", "elevation": "202.3000030517578", "time": "2013-09-20T08:45:02.212Z"}, {"lat": "44.144506", "lng": "9.663277", "elevation": "201.8000030517578", "time": "2013-09-20T08:45:03.249Z"}, {"lat": "44.144513", "lng": "9.66328", "elevation": "201.1999969482422", "time": "2013-09-20T08:45:04.186Z"}, {"lat": "44.144526", "lng": "9.663302", "elevation": "199.5", "time": "2013-09-20T08:45:09.163Z"}, {"lat": "44.144526", "lng": "9.663298", "elevation": "199.89999389648438", "time": "2013-09-20T08:45:10.157Z"}, {"lat": "44.144527", "lng": "9.663291", "elevation": "200.6999969482422", "time": "2013-09-20T08:45:11.229Z"}, {"lat": "44.144527", "lng": "9.663281", "elevation": "201.8000030517578", "time": "2013-09-20T08:45:12.229Z"}, {"lat": "44.144522", "lng": "9.663257", "elevation": "202.0", "time": "2013-09-20T08:45:17.165Z"}, {"lat": "44.14452", "lng": "9.663259", "elevation": "201.60000610351563", "time": "2013-09-20T08:45:18.220Z"}, {"lat": "44.144511", "lng": "9.663258", "elevation": "202.0", "time": "2013-09-20T08:45:27.262Z"}, {"lat": "44.144503", "lng": "9.663259", "elevation": "200.39999389648438", "time": "2013-09-20T08:45:28.141Z"}, {"lat": "44.144419", "lng": "9.663262", "elevation": "198.3000030517578", "time": "2013-09-20T08:45:33.164Z"}, {"lat": "44.144404", "lng": "9.663262", "elevation": "197.3000030517578", "time": "2013-09-20T08:45:34.204Z"}, {"lat": "44.144364", "lng": "9.663282", "elevation": "198.3000030517578", "time": "2013-09-20T08:45:42.142Z"}, {"lat": "44.144366", "lng": "9.663283", "elevation": "198.10000610351563", "time": "2013-09-20T08:45:43.149Z"}, {"lat": "44.144362", "lng": "9.663275", "elevation": "199.3000030517578", "time": "2013-09-20T08:46:03.152Z"}, {"lat": "44.144358", "lng": "9.663284", "elevation": "199.1999969482422", "time": "2013-09-20T08:46:04.142Z"}, {"lat": "44.144319", "lng": "9.663392", "elevation": "201.60000610351563", "time": "2013-09-20T08:46:12.160Z"}, {"lat": "44.144313", "lng": "9.663404", "elevation": "201.0", "time": "2013-09-20T08:46:13.153Z"}, {"lat": "44.144264", "lng": "9.663501", "elevation": "204.89999389648438", "time": "2013-09-20T08:46:20.144Z"}, {"lat": "44.144256", "lng": "9.663513", "elevation": "206.60000610351563", "time": "2013-09-20T08:46:21.170Z"}, {"lat": "44.144207", "lng": "9.663617", "elevation": "207.89999389648438", "time": "2013-09-20T08:46:31.257Z"}, {"lat": "44.144203", "lng": "9.663625", "elevation": "208.6999969482422", "time": "2013-09-20T08:46:32.221Z"}, {"lat": "44.144194", "lng": "9.6637", "elevation": "210.10000610351563", "time": "2013-09-20T08:46:44.148Z"}, {"lat": "44.144195", "lng": "9.663701", "elevation": "210.0", "time": "2013-09-20T08:46:45.162Z"}, {"lat": "44.144193", "lng": "9.663706", "elevation": "210.0", "time": "2013-09-20T08:47:02.176Z"}, {"lat": "44.144194", "lng": "9.663712", "elevation": "209.39999389648438", "time": "2013-09-20T08:47:03.180Z"}, {"lat": "44.144242", "lng": "9.663813", "elevation": "205.8000030517578", "time": "2013-09-20T08:47:19.246Z"}, {"lat": "44.144247", "lng": "9.663822", "elevation": "205.1999969482422", "time": "2013-09-20T08:47:20.183Z"}, {"lat": "44.144316", "lng": "9.663899", "elevation": "202.10000610351563", "time": "2013-09-20T08:47:34.231Z"}, {"lat": "44.14432", "lng": "9.663909", "elevation": "201.89999389648438", "time": "2013-09-20T08:47:35.229Z"}, {"lat": "44.144355", "lng": "9.66397", "elevation": "205.89999389648438", "time": "2013-09-20T08:47:43.176Z"}, {"lat": "44.144354", "lng": "9.663968", "elevation": "205.8000030517578", "time": "2013-09-20T08:47:44.172Z"}, {"lat": "44.144359", "lng": "9.663989", "elevation": "207.8000030517578", "time": "2013-09-20T08:47:53.213Z"}, {"lat": "44.14436", "lng": "9.663996", "elevation": "207.89999389648438", "time": "2013-09-20T08:47:54.162Z"}, {"lat": "44.144404", "lng": "9.664094", "elevation": "210.10000610351563", "time": "2013-09-20T08:48:01.203Z"}, {"lat": "44.14441", "lng": "9.664112", "elevation": "209.89999389648438", "time": "2013-09-20T08:48:02.167Z"}, {"lat": "44.144445", "lng": "9.664217", "elevation": "208.39999389648438", "time": "2013-09-20T08:48:09.225Z"}, {"lat": "44.14445", "lng": "9.664226", "elevation": "207.39999389648438", "time": "2013-09-20T08:48:10.169Z"}, {"lat": "44.14451", "lng": "9.664318", "elevation": "207.6999969482422", "time": "2013-09-20T08:48:19.190Z"}, {"lat": "44.144516", "lng": "9.664334", "elevation": "206.0", "time": "2013-09-20T08:48:20.177Z"}, {"lat": "44.144565", "lng": "9.664426", "elevation": "205.0", "time": "2013-09-20T08:48:27.171Z"}, {"lat": "44.144574", "lng": "9.664434", "elevation": "205.10000610351563", "time": "2013-09-20T08:48:28.180Z"}, {"lat": "44.144609", "lng": "9.664543", "elevation": "206.6999969482422", "time": "2013-09-20T08:48:40.184Z"}, {"lat": "44.14461", "lng": "9.664554", "elevation": "206.39999389648438", "time": "2013-09-20T08:48:41.182Z"}, {"lat": "44.144638", "lng": "9.664672", "elevation": "205.10000610351563", "time": "2013-09-20T08:48:51.188Z"}, {"lat": "44.144642", "lng": "9.664682", "elevation": "205.60000610351563", "time": "2013-09-20T08:48:52.230Z"}, {"lat": "44.144682", "lng": "9.664781", "elevation": "205.8000030517578", "time": "2013-09-20T08:49:02.254Z"}, {"lat": "44.144687", "lng": "9.664793", "elevation": "206.0", "time": "2013-09-20T08:49:03.262Z"}, {"lat": "44.144653", "lng": "9.664906", "elevation": "206.60000610351563", "time": "2013-09-20T08:49:15.287Z"}, {"lat": "44.14465", "lng": "9.664912", "elevation": "207.10000610351563", "time": "2013-09-20T08:49:16.261Z"}, {"lat": "44.144651", "lng": "9.664916", "elevation": "205.89999389648438", "time": "2013-09-20T08:49:18.271Z"}, {"lat": "44.144656", "lng": "9.664914", "elevation": "205.89999389648438", "time": "2013-09-20T08:49:19.343Z"}, {"lat": "44.144661", "lng": "9.664911", "elevation": "206.0", "time": "2013-09-20T08:49:20.304Z"}, {"lat": "44.144685", "lng": "9.664912", "elevation": "205.89999389648438", "time": "2013-09-20T08:49:28.388Z"}, {"lat": "44.144686", "lng": "9.664914", "elevation": "206.0", "time": "2013-09-20T08:49:29.371Z"}, {"lat": "44.144687", "lng": "9.66492", "elevation": "205.89999389648438", "time": "2013-09-20T08:49:35.323Z"}, {"lat": "44.144691", "lng": "9.664926", "elevation": "205.39999389648438", "time": "2013-09-20T08:49:36.247Z"}, {"lat": "44.144753", "lng": "9.665007", "elevation": "203.6999969482422", "time": "2013-09-20T08:49:42.194Z"}, {"lat": "44.144764", "lng": "9.665024", "elevation": "203.89999389648438", "time": "2013-09-20T08:49:43.371Z"}, {"lat": "44.144819", "lng": "9.66512", "elevation": "204.10000610351563", "time": "2013-09-20T08:49:51.386Z"}, {"lat": "44.14482", "lng": "9.665126", "elevation": "204.3000030517578", "time": "2013-09-20T08:49:52.321Z"}, {"lat": "44.144856", "lng": "9.665239", "elevation": "205.89999389648438", "time": "2013-09-20T08:50:03.402Z"}, {"lat": "44.144859", "lng": "9.665241", "elevation": "205.60000610351563", "time": "2013-09-20T08:50:04.370Z"}, {"lat": "44.144862", "lng": "9.665246", "elevation": "205.5", "time": "2013-09-20T08:50:07.377Z"}, {"lat": "44.144862", "lng": "9.665247", "elevation": "205.5", "time": "2013-09-20T08:50:08.322Z"}, {"lat": "44.144864", "lng": "9.665254", "elevation": "206.1999969482422", "time": "2013-09-20T08:50:17.332Z"}, {"lat": "44.144867", "lng": "9.665261", "elevation": "206.10000610351563", "time": "2013-09-20T08:50:18.349Z"}, {"lat": "44.144931", "lng": "9.665342", "elevation": "207.6999969482422", "time": "2013-09-20T08:50:23.347Z"}, {"lat": "44.144945", "lng": "9.66536", "elevation": "208.0", "time": "2013-09-20T08:50:24.325Z"}, {"lat": "44.144995", "lng": "9.665457", "elevation": "206.39999389648438", "time": "2013-09-20T08:50:30.244Z"}, {"lat": "44.144997", "lng": "9.665466", "elevation": "206.3000030517578", "time": "2013-09-20T08:50:31.187Z"}, {"lat": "44.144991", "lng": "9.6655", "elevation": "206.1999969482422", "time": "2013-09-20T08:50:41.277Z"}, {"lat": "44.144991", "lng": "9.665502", "elevation": "205.8000030517578", "time": "2013-09-20T08:50:42.244Z"}, {"lat": "44.144995", "lng": "9.665519", "elevation": "204.1999969482422", "time": "2013-09-20T08:50:54.344Z"}, {"lat": "44.144995", "lng": "9.665528", "elevation": "204.1999969482422", "time": "2013-09-20T08:50:55.360Z"}, {"lat": "44.144992", "lng": "9.665644", "elevation": "206.8000030517578", "time": "2013-09-20T08:51:02.176Z"}, {"lat": "44.14499", "lng": "9.665659", "elevation": "206.6999969482422", "time": "2013-09-20T08:51:03.176Z"}, {"lat": "44.145013", "lng": "9.665772", "elevation": "204.60000610351563", "time": "2013-09-20T08:51:12.336Z"}, {"lat": "44.145022", "lng": "9.665786", "elevation": "204.10000610351563", "time": "2013-09-20T08:51:13.305Z"}, {"lat": "44.14507", "lng": "9.665875", "elevation": "204.3000030517578", "time": "2013-09-20T08:51:20.280Z"}, {"lat": "44.145072", "lng": "9.665891", "elevation": "202.89999389648438", "time": "2013-09-20T08:51:21.363Z"}, {"lat": "44.145067", "lng": "9.666001", "elevation": "197.8000030517578", "time": "2013-09-20T08:51:37.323Z"}, {"lat": "44.145074", "lng": "9.666025", "elevation": "197.5", "time": "2013-09-20T08:51:38.322Z"}, {"lat": "44.145099", "lng": "9.666122", "elevation": "196.3000030517578", "time": "2013-09-20T08:51:41.330Z"}, {"lat": "44.145112", "lng": "9.666149", "elevation": "196.3000030517578", "time": "2013-09-20T08:51:42.355Z"}, {"lat": "44.14516", "lng": "9.666228", "elevation": "197.6999969482422", "time": "2013-09-20T08:51:46.256Z"}, {"lat": "44.14517", "lng": "9.666247", "elevation": "197.3000030517578", "time": "2013-09-20T08:51:47.227Z"}, {"lat": "44.145223", "lng": "9.666331", "elevation": "199.89999389648438", "time": "2013-09-20T08:51:54.211Z"}, {"lat": "44.145231", "lng": "9.666343", "elevation": "201.0", "time": "2013-09-20T08:51:55.178Z"}, {"lat": "44.145287", "lng": "9.666436", "elevation": "202.60000610351563", "time": "2013-09-20T08:52:02.194Z"}, {"lat": "44.145294", "lng": "9.666447", "elevation": "202.89999389648438", "time": "2013-09-20T08:52:03.228Z"}, {"lat": "44.145377", "lng": "9.666465", "elevation": "201.0", "time": "2013-09-20T08:52:13.181Z"}, {"lat": "44.145386", "lng": "9.666461", "elevation": "201.10000610351563", "time": "2013-09-20T08:52:14.212Z"}, {"lat": "44.14542", "lng": "9.666575", "elevation": "199.1999969482422", "time": "2013-09-20T08:52:29.348Z"}, {"lat": "44.145421", "lng": "9.666594", "elevation": "199.0", "time": "2013-09-20T08:52:30.327Z"}, {"lat": "44.145417", "lng": "9.666709", "elevation": "195.39999389648438", "time": "2013-09-20T08:52:36.199Z"}, {"lat": "44.145418", "lng": "9.666721", "elevation": "196.10000610351563", "time": "2013-09-20T08:52:37.197Z"}, {"lat": "44.145423", "lng": "9.666843", "elevation": "195.6999969482422", "time": "2013-09-20T08:52:49.192Z"}, {"lat": "44.145426", "lng": "9.666855", "elevation": "195.10000610351563", "time": "2013-09-20T08:52:50.233Z"}, {"lat": "44.145455", "lng": "9.666967", "elevation": "194.1999969482422", "time": "2013-09-20T08:52:58.191Z"}, {"lat": "44.145459", "lng": "9.66698", "elevation": "194.0", "time": "2013-09-20T08:52:59.184Z"}, {"lat": "44.145496", "lng": "9.667082", "elevation": "191.10000610351563", "time": "2013-09-20T08:53:09.183Z"}, {"lat": "44.1455", "lng": "9.667098", "elevation": "191.1999969482422", "time": "2013-09-20T08:53:10.200Z"}, {"lat": "44.145552", "lng": "9.667184", "elevation": "191.8000030517578", "time": "2013-09-20T08:53:16.329Z"}, {"lat": "44.145557", "lng": "9.667196", "elevation": "191.8000030517578", "time": "2013-09-20T08:53:17.356Z"}, {"lat": "44.145562", "lng": "9.667214", "elevation": "189.60000610351563", "time": "2013-09-20T08:53:22.291Z"}, {"lat": "44.14556", "lng": "9.667212", "elevation": "189.6999969482422", "time": "2013-09-20T08:53:23.241Z"}, {"lat": "44.145553", "lng": "9.66721", "elevation": "188.6999969482422", "time": "2013-09-20T08:53:50.175Z"}, {"lat": "44.145559", "lng": "9.66721", "elevation": "189.1999969482422", "time": "2013-09-20T08:53:51.175Z"}, {"lat": "44.145641", "lng": "9.667257", "elevation": "192.10000610351563", "time": "2013-09-20T08:53:58.197Z"}, {"lat": "44.14565", "lng": "9.667267", "elevation": "192.5", "time": "2013-09-20T08:53:59.181Z"}, {"lat": "44.145691", "lng": "9.66735", "elevation": "193.1999969482422", "time": "2013-09-20T08:54:05.205Z"}, {"lat": "44.145695", "lng": "9.667379", "elevation": "193.39999389648438", "time": "2013-09-20T08:54:06.190Z"}, {"lat": "44.145706", "lng": "9.66749", "elevation": "194.60000610351563", "time": "2013-09-20T08:54:09.182Z"}, {"lat": "44.145712", "lng": "9.667534", "elevation": "195.3000030517578", "time": "2013-09-20T08:54:10.213Z"}, {"lat": "44.145739", "lng": "9.667573", "elevation": "194.89999389648438", "time": "2013-09-20T08:54:19.207Z"}, {"lat": "44.145739", "lng": "9.667574", "elevation": "194.0", "time": "2013-09-20T08:54:20.196Z"}, {"lat": "44.14574", "lng": "9.667582", "elevation": "195.39999389648438", "time": "2013-09-20T08:54:22.213Z"}, {"lat": "44.145741", "lng": "9.667587", "elevation": "194.5", "time": "2013-09-20T08:54:23.191Z"}, {"lat": "44.145733", "lng": "9.667644", "elevation": "198.1999969482422", "time": "2013-09-20T08:54:32.207Z"}, {"lat": "44.145733", "lng": "9.667643", "elevation": "198.89999389648438", "time": "2013-09-20T08:54:33.214Z"}, {"lat": "44.145739", "lng": "9.667633", "elevation": "198.10000610351563", "time": "2013-09-20T08:54:42.192Z"}, {"lat": "44.145741", "lng": "9.667637", "elevation": "198.39999389648438", "time": "2013-09-20T08:54:43.214Z"}, {"lat": "44.145724", "lng": "9.667754", "elevation": "199.8000030517578", "time": "2013-09-20T08:54:52.188Z"}, {"lat": "44.145723", "lng": "9.667775", "elevation": "198.5", "time": "2013-09-20T08:54:53.202Z"}, {"lat": "44.145703", "lng": "9.667889", "elevation": "197.0", "time": "2013-09-20T08:55:07.208Z"}, {"lat": "44.145707", "lng": "9.667901", "elevation": "196.6999969482422", "time": "2013-09-20T08:55:08.242Z"}, {"lat": "44.14571", "lng": "9.667922", "elevation": "195.6999969482422", "time": "2013-09-20T08:55:13.217Z"}, {"lat": "44.145707", "lng": "9.667921", "elevation": "196.6999969482422", "time": "2013-09-20T08:55:14.251Z"}, {"lat": "44.145704", "lng": "9.66792", "elevation": "196.1999969482422", "time": "2013-09-20T08:55:15.210Z"}, {"lat": "44.1457", "lng": "9.667919", "elevation": "196.60000610351563", "time": "2013-09-20T08:55:16.230Z"}, {"lat": "44.145617", "lng": "9.667918", "elevation": "196.3000030517578", "time": "2013-09-20T08:55:29.211Z"}, {"lat": "44.145603", "lng": "9.667908", "elevation": "197.39999389648438", "time": "2013-09-20T08:55:30.197Z"}, {"lat": "44.145516", "lng": "9.667888", "elevation": "197.10000610351563", "time": "2013-09-20T08:55:37.203Z"}, {"lat": "44.145508", "lng": "9.667883", "elevation": "198.60000610351563", "time": "2013-09-20T08:55:38.212Z"}, {"lat": "44.14545", "lng": "9.667852", "elevation": "196.8000030517578", "time": "2013-09-20T08:55:56.193Z"}, {"lat": "44.14545", "lng": "9.667852", "elevation": "197.0", "time": "2013-09-20T08:55:57.198Z"}, {"lat": "44.145443", "lng": "9.667863", "elevation": "195.6999969482422", "time": "2013-09-20T08:56:10.210Z"}, {"lat": "44.145437", "lng": "9.667863", "elevation": "198.1999969482422", "time": "2013-09-20T08:56:11.230Z"}, {"lat": "44.145349", "lng": "9.667869", "elevation": "197.10000610351563", "time": "2013-09-20T08:56:18.200Z"}, {"lat": "44.145335", "lng": "9.66787", "elevation": "198.0", "time": "2013-09-20T08:56:19.231Z"}, {"lat": "44.145254", "lng": "9.667841", "elevation": "193.89999389648438", "time": "2013-09-20T08:56:25.279Z"}, {"lat": "44.145241", "lng": "9.667831", "elevation": "192.6999969482422", "time": "2013-09-20T08:56:26.230Z"}, {"lat": "44.145155", "lng": "9.667803", "elevation": "194.10000610351563", "time": "2013-09-20T08:56:32.207Z"}, {"lat": "44.145141", "lng": "9.667805", "elevation": "194.3000030517578", "time": "2013-09-20T08:56:33.233Z"}, {"lat": "44.145086", "lng": "9.667807", "elevation": "191.8000030517578", "time": "2013-09-20T08:56:46.216Z"}, {"lat": "44.145085", "lng": "9.667808", "elevation": "191.8000030517578", "time": "2013-09-20T08:56:47.207Z"}, {"lat": "44.145082", "lng": "9.667807", "elevation": "192.1999969482422", "time": "2013-09-20T08:56:48.217Z"}, {"lat": "44.145076", "lng": "9.667807", "elevation": "192.39999389648438", "time": "2013-09-20T08:56:49.217Z"}, {"lat": "44.144992", "lng": "9.667778", "elevation": "194.0", "time": "2013-09-20T08:56:55.208Z"}, {"lat": "44.144977", "lng": "9.667771", "elevation": "194.10000610351563", "time": "2013-09-20T08:56:56.234Z"}, {"lat": "44.1449", "lng": "9.66773", "elevation": "195.39999389648438", "time": "2013-09-20T08:57:02.217Z"}, {"lat": "44.144888", "lng": "9.667724", "elevation": "196.10000610351563", "time": "2013-09-20T08:57:03.267Z"}, {"lat": "44.144801", "lng": "9.667719", "elevation": "193.3000030517578", "time": "2013-09-20T08:57:15.224Z"}, {"lat": "44.144792", "lng": "9.667717", "elevation": "193.10000610351563", "time": "2013-09-20T08:57:16.310Z"}, {"lat": "44.144702", "lng": "9.667699", "elevation": "189.5", "time": "2013-09-20T08:57:30.220Z"}, {"lat": "44.144698", "lng": "9.667704", "elevation": "189.5", "time": "2013-09-20T08:57:31.220Z"}, {"lat": "44.144612", "lng": "9.667714", "elevation": "184.1999969482422", "time": "2013-09-20T08:57:41.244Z"}, {"lat": "44.144597", "lng": "9.667713", "elevation": "184.39999389648438", "time": "2013-09-20T08:57:42.215Z"}, {"lat": "44.144547", "lng": "9.667816", "elevation": "194.1999969482422", "time": "2013-09-20T08:57:57.230Z"}, {"lat": "44.144544", "lng": "9.667823", "elevation": "195.39999389648438", "time": "2013-09-20T08:57:58.256Z"}, {"lat": "44.144581", "lng": "9.667931", "elevation": "200.8000030517578", "time": "2013-09-20T08:58:12.304Z"}, {"lat": "44.144579", "lng": "9.667938", "elevation": "201.10000610351563", "time": "2013-09-20T08:58:13.264Z"}, {"lat": "44.144543", "lng": "9.668047", "elevation": "200.6999969482422", "time": "2013-09-20T08:58:22.288Z"}, {"lat": "44.144541", "lng": "9.668063", "elevation": "201.10000610351563", "time": "2013-09-20T08:58:23.381Z"}, {"lat": "44.144542", "lng": "9.668181", "elevation": "200.39999389648438", "time": "2013-09-20T08:58:32.226Z"}, {"lat": "44.144542", "lng": "9.66819", "elevation": "201.89999389648438", "time": "2013-09-20T08:58:33.213Z"}, {"lat": "44.144476", "lng": "9.668256", "elevation": "198.6999969482422", "time": "2013-09-20T08:58:44.323Z"}, {"lat": "44.14447", "lng": "9.668272", "elevation": "199.3000030517578", "time": "2013-09-20T08:58:45.291Z"}, {"lat": "44.144473", "lng": "9.668395", "elevation": "207.10000610351563", "time": "2013-09-20T08:58:59.284Z"}, {"lat": "44.144475", "lng": "9.668399", "elevation": "207.5", "time": "2013-09-20T08:59:00.355Z"}, {"lat": "44.144447", "lng": "9.668515", "elevation": "205.5", "time": "2013-09-20T08:59:12.285Z"}, {"lat": "44.144445", "lng": "9.668528", "elevation": "205.8000030517578", "time": "2013-09-20T08:59:13.231Z"}, {"lat": "44.144438", "lng": "9.668644", "elevation": "205.3000030517578", "time": "2013-09-20T08:59:25.359Z"}, {"lat": "44.144429", "lng": "9.668653", "elevation": "205.3000030517578", "time": "2013-09-20T08:59:26.367Z"}, {"lat": "44.144408", "lng": "9.668772", "elevation": "207.5", "time": "2013-09-20T08:59:39.319Z"}, {"lat": "44.144411", "lng": "9.668783", "elevation": "208.10000610351563", "time": "2013-09-20T08:59:40.365Z"}, {"lat": "44.144481", "lng": "9.668861", "elevation": "211.1999969482422", "time": "2013-09-20T08:59:52.223Z"}, {"lat": "44.144485", "lng": "9.66887", "elevation": "211.39999389648438", "time": "2013-09-20T08:59:53.240Z"}, {"lat": "44.144481", "lng": "9.668992", "elevation": "210.39999389648438", "time": "2013-09-20T09:00:04.345Z"}, {"lat": "44.144482", "lng": "9.669003", "elevation": "210.60000610351563", "time": "2013-09-20T09:00:05.306Z"}, {"lat": "44.144454", "lng": "9.66906", "elevation": "210.39999389648438", "time": "2013-09-20T09:00:15.349Z"}, {"lat": "44.144453", "lng": "9.66906", "elevation": "210.3000030517578", "time": "2013-09-20T09:00:16.373Z"}, {"lat": "44.144451", "lng": "9.669059", "elevation": "210.1999969482422", "time": "2013-09-20T09:00:17.328Z"}, {"lat": "44.144447", "lng": "9.669058", "elevation": "210.1999969482422", "time": "2013-09-20T09:00:18.393Z"}, {"lat": "44.144438", "lng": "9.669054", "elevation": "210.10000610351563", "time": "2013-09-20T09:00:22.266Z"}, {"lat": "44.144438", "lng": "9.669054", "elevation": "210.0", "time": "2013-09-20T09:00:23.234Z"}, {"lat": "44.144439", "lng": "9.669063", "elevation": "210.1999969482422", "time": "2013-09-20T09:00:41.226Z"}, {"lat": "44.144439", "lng": "9.669074", "elevation": "210.60000610351563", "time": "2013-09-20T09:00:42.241Z"}, {"lat": "44.144431", "lng": "9.669184", "elevation": "213.1999969482422", "time": "2013-09-20T09:00:48.323Z"}, {"lat": "44.144428", "lng": "9.669204", "elevation": "213.6999969482422", "time": "2013-09-20T09:00:49.323Z"}, {"lat": "44.144437", "lng": "9.669318", "elevation": "212.39999389648438", "time": "2013-09-20T09:00:54.282Z"}, {"lat": "44.14444", "lng": "9.669341", "elevation": "212.0", "time": "2013-09-20T09:00:55.227Z"}, {"lat": "44.144402", "lng": "9.669447", "elevation": "211.3000030517578", "time": "2013-09-20T09:01:02.394Z"}, {"lat": "44.144399", "lng": "9.669458", "elevation": "211.3000030517578", "time": "2013-09-20T09:01:03.344Z"}, {"lat": "44.144371", "lng": "9.669565", "elevation": "213.89999389648438", "time": "2013-09-20T09:01:13.236Z"}, {"lat": "44.144368", "lng": "9.669583", "elevation": "214.8000030517578", "time": "2013-09-20T09:01:14.244Z"}, {"lat": "44.144391", "lng": "9.669694", "elevation": "215.0", "time": "2013-09-20T09:01:21.336Z"}, {"lat": "44.144397", "lng": "9.669703", "elevation": "214.6999969482422", "time": "2013-09-20T09:01:22.334Z"}, {"lat": "44.144386", "lng": "9.66982", "elevation": "215.1999969482422", "time": "2013-09-20T09:01:31.282Z"}, {"lat": "44.144379", "lng": "9.669826", "elevation": "216.3000030517578", "time": "2013-09-20T09:01:32.321Z"}, {"lat": "44.144351", "lng": "9.669856", "elevation": "217.0", "time": "2013-09-20T09:01:41.344Z"}, {"lat": "44.144351", "lng": "9.669857", "elevation": "216.6999969482422", "time": "2013-09-20T09:01:42.295Z"}, {"lat": "44.144337", "lng": "9.66986", "elevation": "214.39999389648438", "time": "2013-09-20T09:01:55.249Z"}, {"lat": "44.144331", "lng": "9.669859", "elevation": "213.3000030517578", "time": "2013-09-20T09:01:56.251Z"}, {"lat": "44.144244", "lng": "9.669859", "elevation": "210.6999969482422", "time": "2013-09-20T09:02:04.326Z"}, {"lat": "44.144229", "lng": "9.669855", "elevation": "209.6999969482422", "time": "2013-09-20T09:02:05.266Z"}, {"lat": "44.144145", "lng": "9.669813", "elevation": "210.3000030517578", "time": "2013-09-20T09:02:12.254Z"}, {"lat": "44.144133", "lng": "9.669806", "elevation": "211.60000610351563", "time": "2013-09-20T09:02:13.307Z"}, {"lat": "44.144084", "lng": "9.669726", "elevation": "211.8000030517578", "time": "2013-09-20T09:02:18.230Z"}, {"lat": "44.144075", "lng": "9.669703", "elevation": "211.60000610351563", "time": "2013-09-20T09:02:19.260Z"}, {"lat": "44.144018", "lng": "9.669627", "elevation": "213.5", "time": "2013-09-20T09:02:24.285Z"}, {"lat": "44.144005", "lng": "9.669616", "elevation": "214.3000030517578", "time": "2013-09-20T09:02:25.259Z"}, {"lat": "44.143925", "lng": "9.669578", "elevation": "214.0", "time": "2013-09-20T09:02:30.279Z"}, {"lat": "44.143911", "lng": "9.669575", "elevation": "213.5", "time": "2013-09-20T09:02:31.326Z"}, {"lat": "44.143833", "lng": "9.669571", "elevation": "214.3000030517578", "time": "2013-09-20T09:02:37.235Z"}, {"lat": "44.143818", "lng": "9.669571", "elevation": "214.10000610351563", "time": "2013-09-20T09:02:38.282Z"}, {"lat": "44.143755", "lng": "9.669483", "elevation": "213.1999969482422", "time": "2013-09-20T09:02:46.284Z"}, {"lat": "44.143748", "lng": "9.669477", "elevation": "212.3000030517578", "time": "2013-09-20T09:02:47.326Z"}, {"lat": "44.143667", "lng": "9.669444", "elevation": "211.1999969482422", "time": "2013-09-20T09:02:57.271Z"}, {"lat": "44.143659", "lng": "9.669438", "elevation": "211.39999389648438", "time": "2013-09-20T09:02:58.247Z"}, {"lat": "44.143598", "lng": "9.669348", "elevation": "216.1999969482422", "time": "2013-09-20T09:03:06.234Z"}, {"lat": "44.143589", "lng": "9.669334", "elevation": "217.0", "time": "2013-09-20T09:03:07.235Z"}, {"lat": "44.143531", "lng": "9.669243", "elevation": "218.8000030517578", "time": "2013-09-20T09:03:13.238Z"}, {"lat": "44.143523", "lng": "9.66923", "elevation": "219.0", "time": "2013-09-20T09:03:14.235Z"}, {"lat": "44.143485", "lng": "9.669128", "elevation": "219.1999969482422", "time": "2013-09-20T09:03:22.241Z"}, {"lat": "44.143479", "lng": "9.66912", "elevation": "219.10000610351563", "time": "2013-09-20T09:03:23.255Z"}, {"lat": "44.143393", "lng": "9.669141", "elevation": "220.3000030517578", "time": "2013-09-20T09:03:42.332Z"}, {"lat": "44.143389", "lng": "9.66914", "elevation": "220.8000030517578", "time": "2013-09-20T09:03:43.343Z"}, {"lat": "44.143316", "lng": "9.669112", "elevation": "224.60000610351563", "time": "2013-09-20T09:03:57.267Z"}, {"lat": "44.143317", "lng": "9.669111", "elevation": "224.6999969482422", "time": "2013-09-20T09:03:58.315Z"}, {"lat": "44.143317", "lng": "9.669118", "elevation": "224.10000610351563", "time": "2013-09-20T09:04:03.241Z"}, {"lat": "44.143314", "lng": "9.669121", "elevation": "224.1999969482422", "time": "2013-09-20T09:04:04.306Z"}, {"lat": "44.143311", "lng": "9.669125", "elevation": "224.6999969482422", "time": "2013-09-20T09:04:06.251Z"}, {"lat": "44.14331", "lng": "9.669126", "elevation": "225.10000610351563", "time": "2013-09-20T09:04:07.261Z"}, {"lat": "44.143303", "lng": "9.66912", "elevation": "225.39999389648438", "time": "2013-09-20T09:04:14.248Z"}, {"lat": "44.1433", "lng": "9.669122", "elevation": "224.1999969482422", "time": "2013-09-20T09:04:15.253Z"}, {"lat": "44.143214", "lng": "9.669147", "elevation": "221.60000610351563", "time": "2013-09-20T09:04:23.285Z"}, {"lat": "44.143201", "lng": "9.669156", "elevation": "220.5", "time": "2013-09-20T09:04:24.292Z"}, {"lat": "44.143132", "lng": "9.669228", "elevation": "218.8000030517578", "time": "2013-09-20T09:04:31.331Z"}, {"lat": "44.143125", "lng": "9.669245", "elevation": "219.1999969482422", "time": "2013-09-20T09:04:32.334Z"}, {"lat": "44.143048", "lng": "9.669309", "elevation": "216.0", "time": "2013-09-20T09:04:40.320Z"}, {"lat": "44.143039", "lng": "9.669316", "elevation": "217.39999389648438", "time": "2013-09-20T09:04:41.273Z"}, {"lat": "44.14297", "lng": "9.669391", "elevation": "220.1999969482422", "time": "2013-09-20T09:04:52.254Z"}, {"lat": "44.142966", "lng": "9.669397", "elevation": "220.3000030517578", "time": "2013-09-20T09:04:53.262Z"}, {"lat": "44.14292", "lng": "9.669493", "elevation": "231.0", "time": "2013-09-20T09:05:08.249Z"}, {"lat": "44.142916", "lng": "9.669504", "elevation": "231.6999969482422", "time": "2013-09-20T09:05:09.270Z"}, {"lat": "44.142854", "lng": "9.669583", "elevation": "229.3000030517578", "time": "2013-09-20T09:05:17.264Z"}, {"lat": "44.142843", "lng": "9.669591", "elevation": "229.0", "time": "2013-09-20T09:05:18.267Z"}, {"lat": "44.142811", "lng": "9.669699", "elevation": "229.1999969482422", "time": "2013-09-20T09:05:38.291Z"}, {"lat": "44.142812", "lng": "9.6697", "elevation": "229.39999389648438", "time": "2013-09-20T09:05:39.265Z"}, {"lat": "44.142807", "lng": "9.669704", "elevation": "229.10000610351563", "time": "2013-09-20T09:05:53.343Z"}, {"lat": "44.142802", "lng": "9.66971", "elevation": "228.60000610351563", "time": "2013-09-20T09:05:54.266Z"}, {"lat": "44.142739", "lng": "9.669788", "elevation": "226.89999389648438", "time": "2013-09-20T09:06:00.365Z"}, {"lat": "44.142725", "lng": "9.669803", "elevation": "225.60000610351563", "time": "2013-09-20T09:06:01.348Z"}, {"lat": "44.142665", "lng": "9.669875", "elevation": "224.6999969482422", "time": "2013-09-20T09:06:06.260Z"}, {"lat": "44.142658", "lng": "9.669893", "elevation": "225.39999389648438", "time": "2013-09-20T09:06:07.262Z"}, {"lat": "44.142614", "lng": "9.669987", "elevation": "223.60000610351563", "time": "2013-09-20T09:06:12.262Z"}, {"lat": "44.1426", "lng": "9.670006", "elevation": "223.5", "time": "2013-09-20T09:06:13.255Z"}, {"lat": "44.142532", "lng": "9.670084", "elevation": "221.60000610351563", "time": "2013-09-20T09:06:18.269Z"}, {"lat": "44.142521", "lng": "9.670096", "elevation": "221.0", "time": "2013-09-20T09:06:19.292Z"}, {"lat": "44.142444", "lng": "9.670138", "elevation": "220.39999389648438", "time": "2013-09-20T09:06:28.263Z"}, {"lat": "44.142433", "lng": "9.670138", "elevation": "219.5", "time": "2013-09-20T09:06:29.275Z"}, {"lat": "44.142349", "lng": "9.67018", "elevation": "215.10000610351563", "time": "2013-09-20T09:06:37.272Z"}, {"lat": "44.14234", "lng": "9.670191", "elevation": "215.0", "time": "2013-09-20T09:06:38.255Z"}, {"lat": "44.142282", "lng": "9.670284", "elevation": "212.60000610351563", "time": "2013-09-20T09:06:47.259Z"}, {"lat": "44.142278", "lng": "9.670289", "elevation": "211.6999969482422", "time": "2013-09-20T09:06:48.281Z"}, {"lat": "44.142205", "lng": "9.670358", "elevation": "212.3000030517578", "time": "2013-09-20T09:06:58.282Z"}, {"lat": "44.142197", "lng": "9.670374", "elevation": "212.0", "time": "2013-09-20T09:06:59.264Z"}, {"lat": "44.142145", "lng": "9.670464", "elevation": "211.60000610351563", "time": "2013-09-20T09:07:07.267Z"}, {"lat": "44.142132", "lng": "9.670468", "elevation": "211.89999389648438", "time": "2013-09-20T09:07:08.264Z"}, {"lat": "44.142055", "lng": "9.670509", "elevation": "208.5", "time": "2013-09-20T09:07:19.283Z"}, {"lat": "44.142045", "lng": "9.670511", "elevation": "207.8000030517578", "time": "2013-09-20T09:07:20.310Z"}, {"lat": "44.141963", "lng": "9.670544", "elevation": "205.1999969482422", "time": "2013-09-20T09:07:28.260Z"}, {"lat": "44.141956", "lng": "9.670557", "elevation": "204.89999389648438", "time": "2013-09-20T09:07:29.274Z"}, {"lat": "44.141916", "lng": "9.670662", "elevation": "203.6999969482422", "time": "2013-09-20T09:07:37.269Z"}, {"lat": "44.141911", "lng": "9.670673", "elevation": "204.0", "time": "2013-09-20T09:07:38.292Z"}, {"lat": "44.141832", "lng": "9.670726", "elevation": "203.5", "time": "2013-09-20T09:07:56.270Z"}, {"lat": "44.141829", "lng": "9.670736", "elevation": "203.89999389648438", "time": "2013-09-20T09:07:57.278Z"}, {"lat": "44.141775", "lng": "9.67069", "elevation": "208.89999389648438", "time": "2013-09-20T09:08:14.343Z"}, {"lat": "44.141775", "lng": "9.670689", "elevation": "208.6999969482422", "time": "2013-09-20T09:08:15.377Z"}, {"lat": "44.141772", "lng": "9.670694", "elevation": "208.89999389648438", "time": "2013-09-20T09:08:29.334Z"}, {"lat": "44.141767", "lng": "9.6707", "elevation": "209.8000030517578", "time": "2013-09-20T09:08:30.313Z"}, {"lat": "44.141695", "lng": "9.670774", "elevation": "209.0", "time": "2013-09-20T09:08:36.290Z"}, {"lat": "44.141682", "lng": "9.670793", "elevation": "206.3000030517578", "time": "2013-09-20T09:08:37.303Z"}, {"lat": "44.141676", "lng": "9.670903", "elevation": "206.3000030517578", "time": "2013-09-20T09:08:42.272Z"}, {"lat": "44.141676", "lng": "9.670921", "elevation": "206.5", "time": "2013-09-20T09:08:43.264Z"}, {"lat": "44.141665", "lng": "9.671042", "elevation": "209.10000610351563", "time": "2013-09-20T09:08:51.284Z"}, {"lat": "44.141658", "lng": "9.671052", "elevation": "208.60000610351563", "time": "2013-09-20T09:08:52.281Z"}, {"lat": "44.141598", "lng": "9.671141", "elevation": "207.5", "time": "2013-09-20T09:09:01.265Z"}, {"lat": "44.141586", "lng": "9.671158", "elevation": "207.8000030517578", "time": "2013-09-20T09:09:02.296Z"}, {"lat": "44.141525", "lng": "9.671237", "elevation": "208.8000030517578", "time": "2013-09-20T09:09:07.275Z"}, {"lat": "44.141513", "lng": "9.67125", "elevation": "209.1999969482422", "time": "2013-09-20T09:09:08.265Z"}, {"lat": "44.141455", "lng": "9.671324", "elevation": "210.39999389648438", "time": "2013-09-20T09:09:13.267Z"}, {"lat": "44.141449", "lng": "9.671346", "elevation": "210.89999389648438", "time": "2013-09-20T09:09:14.305Z"}, {"lat": "44.141409", "lng": "9.671437", "elevation": "212.5", "time": "2013-09-20T09:09:19.330Z"}, {"lat": "44.141397", "lng": "9.67145", "elevation": "212.10000610351563", "time": "2013-09-20T09:09:20.267Z"}, {"lat": "44.141331", "lng": "9.671521", "elevation": "211.39999389648438", "time": "2013-09-20T09:09:27.267Z"}, {"lat": "44.141326", "lng": "9.671536", "elevation": "211.3000030517578", "time": "2013-09-20T09:09:28.285Z"}, {"lat": "44.141303", "lng": "9.671647", "elevation": "212.6999969482422", "time": "2013-09-20T09:09:34.347Z"}, {"lat": "44.141298", "lng": "9.671664", "elevation": "212.60000610351563", "time": "2013-09-20T09:09:35.362Z"}, {"lat": "44.141252", "lng": "9.671752", "elevation": "211.3000030517578", "time": "2013-09-20T09:09:41.277Z"}, {"lat": "44.141247", "lng": "9.671769", "elevation": "211.1999969482422", "time": "2013-09-20T09:09:42.325Z"}, {"lat": "44.141196", "lng": "9.671864", "elevation": "213.8000030517578", "time": "2013-09-20T09:09:48.287Z"}, {"lat": "44.141177", "lng": "9.671877", "elevation": "213.3000030517578", "time": "2013-09-20T09:09:49.287Z"}, {"lat": "44.141107", "lng": "9.671917", "elevation": "214.3000030517578", "time": "2013-09-20T09:09:53.318Z"}, {"lat": "44.141094", "lng": "9.671927", "elevation": "214.10000610351563", "time": "2013-09-20T09:09:54.286Z"}, {"lat": "44.141035", "lng": "9.672006", "elevation": "213.6999969482422", "time": "2013-09-20T09:10:00.393Z"}, {"lat": "44.141027", "lng": "9.672018", "elevation": "212.60000610351563", "time": "2013-09-20T09:10:01.294Z"}, {"lat": "44.14094", "lng": "9.672043", "elevation": "213.1999969482422", "time": "2013-09-20T09:10:07.286Z"}, {"lat": "44.140927", "lng": "9.672048", "elevation": "214.39999389648438", "time": "2013-09-20T09:10:08.301Z"}, {"lat": "44.140852", "lng": "9.672109", "elevation": "217.5", "time": "2013-09-20T09:10:15.367Z"}, {"lat": "44.140845", "lng": "9.672117", "elevation": "217.0", "time": "2013-09-20T09:10:16.345Z"}, {"lat": "44.140788", "lng": "9.672193", "elevation": "215.60000610351563", "time": "2013-09-20T09:10:28.273Z"}, {"lat": "44.140779", "lng": "9.672203", "elevation": "216.1999969482422", "time": "2013-09-20T09:10:29.281Z"}, {"lat": "44.140702", "lng": "9.672256", "elevation": "214.89999389648438", "time": "2013-09-20T09:10:45.297Z"}, {"lat": "44.140699", "lng": "9.672262", "elevation": "214.1999969482422", "time": "2013-09-20T09:10:46.331Z"}, {"lat": "44.140637", "lng": "9.672337", "elevation": "216.10000610351563", "time": "2013-09-20T09:10:57.306Z"}, {"lat": "44.140626", "lng": "9.672344", "elevation": "216.1999969482422", "time": "2013-09-20T09:10:58.274Z"}, {"lat": "44.140567", "lng": "9.67243", "elevation": "216.10000610351563", "time": "2013-09-20T09:11:05.308Z"}, {"lat": "44.140564", "lng": "9.672447", "elevation": "216.8000030517578", "time": "2013-09-20T09:11:06.283Z"}, {"lat": "44.140541", "lng": "9.672555", "elevation": "218.5", "time": "2013-09-20T09:11:12.293Z"}, {"lat": "44.140535", "lng": "9.672568", "elevation": "218.89999389648438", "time": "2013-09-20T09:11:13.309Z"}, {"lat": "44.14053", "lng": "9.672691", "elevation": "218.0", "time": "2013-09-20T09:11:23.294Z"}, {"lat": "44.140535", "lng": "9.672708", "elevation": "216.89999389648438", "time": "2013-09-20T09:11:24.308Z"}, {"lat": "44.140551", "lng": "9.672822", "elevation": "221.10000610351563", "time": "2013-09-20T09:11:36.304Z"}, {"lat": "44.140552", "lng": "9.672832", "elevation": "221.5", "time": "2013-09-20T09:11:37.287Z"}, {"lat": "44.140572", "lng": "9.672943", "elevation": "219.8000030517578", "time": "2013-09-20T09:11:47.311Z"}, {"lat": "44.140574", "lng": "9.672955", "elevation": "219.3000030517578", "time": "2013-09-20T09:11:48.303Z"}, {"lat": "44.140561", "lng": "9.673054", "elevation": "218.5", "time": "2013-09-20T09:12:00.309Z"}, {"lat": "44.140562", "lng": "9.673054", "elevation": "218.6999969482422", "time": "2013-09-20T09:12:01.281Z"}, {"lat": "44.140573", "lng": "9.673073", "elevation": "217.6999969482422", "time": "2013-09-20T09:12:42.300Z"}, {"lat": "44.140572", "lng": "9.673081", "elevation": "216.60000610351563", "time": "2013-09-20T09:12:43.380Z"}, {"lat": "44.140562", "lng": "9.673203", "elevation": "212.5", "time": "2013-09-20T09:12:50.300Z"}, {"lat": "44.140571", "lng": "9.673217", "elevation": "212.39999389648438", "time": "2013-09-20T09:12:51.357Z"}, {"lat": "44.140627", "lng": "9.673314", "elevation": "209.8000030517578", "time": "2013-09-20T09:12:59.363Z"}, {"lat": "44.140628", "lng": "9.673317", "elevation": "210.10000610351563", "time": "2013-09-20T09:13:00.451Z"}, {"lat": "44.140604", "lng": "9.673426", "elevation": "208.89999389648438", "time": "2013-09-20T09:13:09.349Z"}, {"lat": "44.140605", "lng": "9.673443", "elevation": "206.89999389648438", "time": "2013-09-20T09:13:10.332Z"}, {"lat": "44.140649", "lng": "9.67355", "elevation": "204.89999389648438", "time": "2013-09-20T09:13:18.320Z"}, {"lat": "44.140649", "lng": "9.673571", "elevation": "204.8000030517578", "time": "2013-09-20T09:13:19.320Z"}, {"lat": "44.140614", "lng": "9.673678", "elevation": "208.0", "time": "2013-09-20T09:13:24.313Z"}, {"lat": "44.140609", "lng": "9.673696", "elevation": "208.5", "time": "2013-09-20T09:13:25.307Z"}, {"lat": "44.140609", "lng": "9.673815", "elevation": "209.1999969482422", "time": "2013-09-20T09:13:33.316Z"}, {"lat": "44.140604", "lng": "9.673838", "elevation": "208.8000030517578", "time": "2013-09-20T09:13:34.347Z"}, {"lat": "44.140612", "lng": "9.673959", "elevation": "205.10000610351563", "time": "2013-09-20T09:13:41.294Z"}, {"lat": "44.140623", "lng": "9.673962", "elevation": "205.5", "time": "2013-09-20T09:13:42.294Z"}, {"lat": "44.140633", "lng": "9.67408", "elevation": "206.60000610351563", "time": "2013-09-20T09:13:56.327Z"}, {"lat": "44.140625", "lng": "9.674094", "elevation": "205.3000030517578", "time": "2013-09-20T09:13:57.367Z"}, {"lat": "44.14059", "lng": "9.674206", "elevation": "204.5", "time": "2013-09-20T09:14:04.403Z"}, {"lat": "44.140588", "lng": "9.674225", "elevation": "204.89999389648438", "time": "2013-09-20T09:14:05.377Z"}, {"lat": "44.140568", "lng": "9.674345", "elevation": "206.0", "time": "2013-09-20T09:14:19.314Z"}, {"lat": "44.140567", "lng": "9.674357", "elevation": "206.39999389648438", "time": "2013-09-20T09:14:20.324Z"}, {"lat": "44.140591", "lng": "9.674469", "elevation": "207.1999969482422", "time": "2013-09-20T09:14:28.305Z"}, {"lat": "44.140591", "lng": "9.674481", "elevation": "206.89999389648438", "time": "2013-09-20T09:14:29.331Z"}, {"lat": "44.140605", "lng": "9.674598", "elevation": "209.60000610351563", "time": "2013-09-20T09:14:41.301Z"}, {"lat": "44.140609", "lng": "9.674611", "elevation": "210.60000610351563", "time": "2013-09-20T09:14:42.300Z"}, {"lat": "44.140588", "lng": "9.674654", "elevation": "211.3000030517578", "time": "2013-09-20T09:14:52.377Z"}, {"lat": "44.140587", "lng": "9.674654", "elevation": "211.10000610351563", "time": "2013-09-20T09:14:53.377Z"}, {"lat": "44.140596", "lng": "9.674662", "elevation": "210.3000030517578", "time": "2013-09-20T09:15:08.326Z"}, {"lat": "44.140596", "lng": "9.674669", "elevation": "210.10000610351563", "time": "2013-09-20T09:15:09.303Z"}, {"lat": "44.140624", "lng": "9.674769", "elevation": "205.1999969482422", "time": "2013-09-20T09:15:15.295Z"}, {"lat": "44.140634", "lng": "9.67479", "elevation": "204.60000610351563", "time": "2013-09-20T09:15:16.295Z"}, {"lat": "44.140666", "lng": "9.67489", "elevation": "206.10000610351563", "time": "2013-09-20T09:15:21.336Z"}, {"lat": "44.140673", "lng": "9.67491", "elevation": "207.39999389648438", "time": "2013-09-20T09:15:22.319Z"}, {"lat": "44.140681", "lng": "9.67502", "elevation": "207.6999969482422", "time": "2013-09-20T09:15:26.308Z"}, {"lat": "44.140676", "lng": "9.675045", "elevation": "209.3000030517578", "time": "2013-09-20T09:15:27.294Z"}, {"lat": "44.140648", "lng": "9.675161", "elevation": "210.10000610351563", "time": "2013-09-20T09:15:33.304Z"}, {"lat": "44.140649", "lng": "9.675166", "elevation": "210.0", "time": "2013-09-20T09:15:34.317Z"}, {"lat": "44.140668", "lng": "9.675164", "elevation": "210.0", "time": "2013-09-20T09:15:41.295Z"}, {"lat": "44.140669", "lng": "9.675165", "elevation": "210.0", "time": "2013-09-20T09:15:42.312Z"}, {"lat": "44.140668", "lng": "9.675169", "elevation": "209.1999969482422", "time": "2013-09-20T09:16:01.315Z"}, {"lat": "44.140663", "lng": "9.675176", "elevation": "208.1999969482422", "time": "2013-09-20T09:16:02.333Z"}, {"lat": "44.140639", "lng": "9.675219", "elevation": "207.10000610351563", "time": "2013-09-20T09:16:06.354Z"}, {"lat": "44.140631", "lng": "9.675516", "elevation": "195.5", "time": "2013-09-20T09:16:40.254Z"}, {"lat": "44.1406", "lng": "9.675602", "elevation": "206.89999389648438", "time": "2013-09-20T09:16:44.253Z"}, {"lat": "44.140593", "lng": "9.675632", "elevation": "209.0", "time": "2013-09-20T09:16:45.231Z"}, {"lat": "44.140526", "lng": "9.675678", "elevation": "207.89999389648438", "time": "2013-09-20T09:16:50.222Z"}, {"lat": "44.140505", "lng": "9.675667", "elevation": "207.3000030517578", "time": "2013-09-20T09:16:51.262Z"}, {"lat": "44.140521", "lng": "9.675644", "elevation": "205.60000610351563", "time": "2013-09-20T09:16:59.234Z"}, {"lat": "44.140522", "lng": "9.675644", "elevation": "205.6999969482422", "time": "2013-09-20T09:17:00.270Z"}, {"lat": "44.140515", "lng": "9.675657", "elevation": "206.0", "time": "2013-09-20T09:17:55.237Z"}, {"lat": "44.140517", "lng": "9.675663", "elevation": "207.5", "time": "2013-09-20T09:17:56.239Z"}, {"lat": "44.14057", "lng": "9.675754", "elevation": "209.39999389648438", "time": "2013-09-20T09:18:03.245Z"}, {"lat": "44.14058", "lng": "9.675765", "elevation": "209.1999969482422", "time": "2013-09-20T09:18:04.238Z"}, {"lat": "44.140586", "lng": "9.675823", "elevation": "211.5", "time": "2013-09-20T09:18:16.245Z"}, {"lat": "44.140586", "lng": "9.675825", "elevation": "211.60000610351563", "time": "2013-09-20T09:18:17.255Z"}, {"lat": "44.140592", "lng": "9.675829", "elevation": "211.6999969482422", "time": "2013-09-20T09:18:27.265Z"}, {"lat": "44.140593", "lng": "9.675839", "elevation": "212.6999969482422", "time": "2013-09-20T09:18:28.239Z"}, {"lat": "44.140558", "lng": "9.675943", "elevation": "219.39999389648438", "time": "2013-09-20T09:18:35.254Z"}, {"lat": "44.140548", "lng": "9.675955", "elevation": "220.1999969482422", "time": "2013-09-20T09:18:36.272Z"}, {"lat": "44.140505", "lng": "9.676063", "elevation": "222.6999969482422", "time": "2013-09-20T09:18:41.262Z"}, {"lat": "44.140501", "lng": "9.676086", "elevation": "223.3000030517578", "time": "2013-09-20T09:18:42.242Z"}, {"lat": "44.140424", "lng": "9.676136", "elevation": "223.60000610351563", "time": "2013-09-20T09:18:48.329Z"}, {"lat": "44.140408", "lng": "9.676142", "elevation": "223.60000610351563", "time": "2013-09-20T09:18:49.258Z"}, {"lat": "44.14036", "lng": "9.676245", "elevation": "221.0", "time": "2013-09-20T09:18:57.256Z"}, {"lat": "44.140359", "lng": "9.67626", "elevation": "219.8000030517578", "time": "2013-09-20T09:18:58.264Z"}, {"lat": "44.140321", "lng": "9.676372", "elevation": "220.60000610351563", "time": "2013-09-20T09:19:08.242Z"}, {"lat": "44.140317", "lng": "9.676377", "elevation": "221.0", "time": "2013-09-20T09:19:09.241Z"}, {"lat": "44.140239", "lng": "9.676438", "elevation": "218.89999389648438", "time": "2013-09-20T09:19:25.242Z"}, {"lat": "44.140236", "lng": "9.676448", "elevation": "220.5", "time": "2013-09-20T09:19:26.252Z"}, {"lat": "44.140213", "lng": "9.676558", "elevation": "213.5", "time": "2013-09-20T09:19:36.244Z"}, {"lat": "44.140218", "lng": "9.67658", "elevation": "212.3000030517578", "time": "2013-09-20T09:19:37.252Z"}, {"lat": "44.140208", "lng": "9.676694", "elevation": "208.10000610351563", "time": "2013-09-20T09:19:44.317Z"}, {"lat": "44.140202", "lng": "9.676706", "elevation": "207.1999969482422", "time": "2013-09-20T09:19:45.245Z"}, {"lat": "44.140178", "lng": "9.67682", "elevation": "206.60000610351563", "time": "2013-09-20T09:19:53.350Z"}, {"lat": "44.140177", "lng": "9.676834", "elevation": "207.3000030517578", "time": "2013-09-20T09:19:54.269Z"}, {"lat": "44.140178", "lng": "9.676951", "elevation": "204.5", "time": "2013-09-20T09:20:07.247Z"}, {"lat": "44.140184", "lng": "9.676964", "elevation": "204.10000610351563", "time": "2013-09-20T09:20:08.249Z"}, {"lat": "44.140158", "lng": "9.677077", "elevation": "206.10000610351563", "time": "2013-09-20T09:20:17.254Z"}, {"lat": "44.140146", "lng": "9.677089", "elevation": "206.60000610351563", "time": "2013-09-20T09:20:18.257Z"}, {"lat": "44.140076", "lng": "9.677164", "elevation": "208.10000610351563", "time": "2013-09-20T09:20:24.263Z"}, {"lat": "44.140066", "lng": "9.677187", "elevation": "207.3000030517578", "time": "2013-09-20T09:20:25.240Z"}, {"lat": "44.140011", "lng": "9.677273", "elevation": "208.39999389648438", "time": "2013-09-20T09:20:31.239Z"}, {"lat": "44.140003", "lng": "9.677287", "elevation": "208.3000030517578", "time": "2013-09-20T09:20:32.354Z"}, {"lat": "44.139937", "lng": "9.677346", "elevation": "209.39999389648438", "time": "2013-09-20T09:20:38.400Z"}, {"lat": "44.139926", "lng": "9.677353", "elevation": "210.0", "time": "2013-09-20T09:20:39.352Z"}, {"lat": "44.139849", "lng": "9.677395", "elevation": "208.39999389648438", "time": "2013-09-20T09:20:46.251Z"}, {"lat": "44.139841", "lng": "9.677402", "elevation": "210.39999389648438", "time": "2013-09-20T09:20:47.272Z"}, {"lat": "44.13977", "lng": "9.677457", "elevation": "211.60000610351563", "time": "2013-09-20T09:20:54.275Z"}, {"lat": "44.139763", "lng": "9.677472", "elevation": "212.0", "time": "2013-09-20T09:20:55.243Z"}, {"lat": "44.139711", "lng": "9.677569", "elevation": "214.0", "time": "2013-09-20T09:21:04.245Z"}, {"lat": "44.139705", "lng": "9.677577", "elevation": "213.60000610351563", "time": "2013-09-20T09:21:05.251Z"}, {"lat": "44.139645", "lng": "9.677534", "elevation": "217.1999969482422", "time": "2013-09-20T09:21:20.247Z"}, {"lat": "44.139644", "lng": "9.677533", "elevation": "217.1999969482422", "time": "2013-09-20T09:21:21.252Z"}, {"lat": "44.139635", "lng": "9.677543", "elevation": "216.89999389648438", "time": "2013-09-20T09:21:30.277Z"}, {"lat": "44.139631", "lng": "9.677547", "elevation": "217.10000610351563", "time": "2013-09-20T09:21:31.253Z"}, {"lat": "44.139551", "lng": "9.677589", "elevation": "218.8000030517578", "time": "2013-09-20T09:21:35.259Z"}, {"lat": "44.139524", "lng": "9.67759", "elevation": "218.60000610351563", "time": "2013-09-20T09:21:36.248Z"}, {"lat": "44.139454", "lng": "9.677585", "elevation": "219.10000610351563", "time": "2013-09-20T09:21:39.283Z"}, {"lat": "44.139433", "lng": "9.677585", "elevation": "218.89999389648438", "time": "2013-09-20T09:21:40.253Z"}, {"lat": "44.13935", "lng": "9.677614", "elevation": "219.1999969482422", "time": "2013-09-20T09:21:44.252Z"}, {"lat": "44.139334", "lng": "9.677625", "elevation": "218.60000610351563", "time": "2013-09-20T09:21:45.262Z"}, {"lat": "44.139269", "lng": "9.677702", "elevation": "216.5", "time": "2013-09-20T09:21:49.284Z"}, {"lat": "44.139256", "lng": "9.677719", "elevation": "214.89999389648438", "time": "2013-09-20T09:21:50.277Z"}, {"lat": "44.13917", "lng": "9.677756", "elevation": "220.89999389648438", "time": "2013-09-20T09:21:57.255Z"}, {"lat": "44.139157", "lng": "9.677764", "elevation": "221.5", "time": "2013-09-20T09:21:58.270Z"}, {"lat": "44.13907", "lng": "9.677779", "elevation": "221.5", "time": "2013-09-20T09:22:06.319Z"}, {"lat": "44.139058", "lng": "9.677776", "elevation": "220.6999969482422", "time": "2013-09-20T09:22:07.350Z"}, {"lat": "44.139001", "lng": "9.677871", "elevation": "224.0", "time": "2013-09-20T09:22:15.265Z"}, {"lat": "44.138985", "lng": "9.677885", "elevation": "225.0", "time": "2013-09-20T09:22:16.321Z"}, {"lat": "44.138915", "lng": "9.677936", "elevation": "227.10000610351563", "time": "2013-09-20T09:22:20.255Z"}, {"lat": "44.138896", "lng": "9.677943", "elevation": "227.39999389648438", "time": "2013-09-20T09:22:21.280Z"}, {"lat": "44.138807", "lng": "9.677963", "elevation": "228.60000610351563", "time": "2013-09-20T09:22:27.258Z"}, {"lat": "44.138795", "lng": "9.677966", "elevation": "228.5", "time": "2013-09-20T09:22:28.288Z"}, {"lat": "44.13872", "lng": "9.677989", "elevation": "229.60000610351563", "time": "2013-09-20T09:22:33.282Z"}, {"lat": "44.138702", "lng": "9.677992", "elevation": "232.39999389648438", "time": "2013-09-20T09:22:34.279Z"}, {"lat": "44.138622", "lng": "9.677985", "elevation": "231.39999389648438", "time": "2013-09-20T09:22:38.282Z"}, {"lat": "44.138604", "lng": "9.677982", "elevation": "232.10000610351563", "time": "2013-09-20T09:22:39.282Z"}, {"lat": "44.138516", "lng": "9.677967", "elevation": "234.60000610351563", "time": "2013-09-20T09:22:45.267Z"}, {"lat": "44.138508", "lng": "9.677969", "elevation": "236.3000030517578", "time": "2013-09-20T09:22:46.285Z"}, {"lat": "44.138439", "lng": "9.678037", "elevation": "238.89999389648438", "time": "2013-09-20T09:22:54.343Z"}, {"lat": "44.138428", "lng": "9.678039", "elevation": "240.1999969482422", "time": "2013-09-20T09:22:55.326Z"}, {"lat": "44.138345", "lng": "9.678053", "elevation": "235.39999389648438", "time": "2013-09-20T09:23:07.297Z"}, {"lat": "44.138338", "lng": "9.678057", "elevation": "236.39999389648438", "time": "2013-09-20T09:23:08.282Z"}, {"lat": "44.138254", "lng": "9.678067", "elevation": "240.89999389648438", "time": "2013-09-20T09:23:17.285Z"}, {"lat": "44.138247", "lng": "9.678071", "elevation": "240.8000030517578", "time": "2013-09-20T09:23:18.359Z"}, {"lat": "44.138243", "lng": "9.678189", "elevation": "224.6999969482422", "time": "2013-09-20T09:23:38.272Z"}, {"lat": "44.138243", "lng": "9.678197", "elevation": "224.5", "time": "2013-09-20T09:23:39.280Z"}, {"lat": "44.138248", "lng": "9.678206", "elevation": "223.8000030517578", "time": "2013-09-20T09:23:43.366Z"}, {"lat": "44.138248", "lng": "9.678205", "elevation": "224.8000030517578", "time": "2013-09-20T09:23:44.326Z"}, {"lat": "44.13825", "lng": "9.678205", "elevation": "223.10000610351563", "time": "2013-09-20T09:23:46.278Z"}, {"lat": "44.138254", "lng": "9.678206", "elevation": "222.89999389648438", "time": "2013-09-20T09:23:47.294Z"}, {"lat": "44.138273", "lng": "9.678225", "elevation": "219.39999389648438", "time": "2013-09-20T09:23:55.289Z"}, {"lat": "44.138273", "lng": "9.678226", "elevation": "219.3000030517578", "time": "2013-09-20T09:23:56.295Z"}, {"lat": "44.138272", "lng": "9.678229", "elevation": "219.0", "time": "2013-09-20T09:23:59.366Z"}, {"lat": "44.138272", "lng": "9.678235", "elevation": "216.6999969482422", "time": "2013-09-20T09:24:00.358Z"}, {"lat": "44.13827", "lng": "9.678347", "elevation": "205.6999969482422", "time": "2013-09-20T09:24:06.311Z"}, {"lat": "44.138268", "lng": "9.678371", "elevation": "204.8000030517578", "time": "2013-09-20T09:24:07.289Z"}, {"lat": "44.138286", "lng": "9.678438", "elevation": "204.8000030517578", "time": "2013-09-20T09:24:17.283Z"}, {"lat": "44.138286", "lng": "9.678439", "elevation": "204.5", "time": "2013-09-20T09:24:18.321Z"}, {"lat": "44.138282", "lng": "9.678456", "elevation": "202.89999389648438", "time": "2013-09-20T09:24:32.284Z"}, {"lat": "44.13828", "lng": "9.678465", "elevation": "202.3000030517578", "time": "2013-09-20T09:24:33.275Z"}, {"lat": "44.138262", "lng": "9.678573", "elevation": "197.1999969482422", "time": "2013-09-20T09:24:39.282Z"}, {"lat": "44.138254", "lng": "9.678589", "elevation": "197.6999969482422", "time": "2013-09-20T09:24:40.350Z"}, {"lat": "44.1382", "lng": "9.678683", "elevation": "196.39999389648438", "time": "2013-09-20T09:24:52.299Z"}, {"lat": "44.138196", "lng": "9.678692", "elevation": "195.0", "time": "2013-09-20T09:24:53.310Z"}, {"lat": "44.138166", "lng": "9.678792", "elevation": "196.10000610351563", "time": "2013-09-20T09:25:00.368Z"}, {"lat": "44.138159", "lng": "9.678807", "elevation": "196.3000030517578", "time": "2013-09-20T09:25:01.268Z"}, {"lat": "44.138194", "lng": "9.678917", "elevation": "198.6999969482422", "time": "2013-09-20T09:25:12.278Z"}, {"lat": "44.138197", "lng": "9.678928", "elevation": "198.8000030517578", "time": "2013-09-20T09:25:13.270Z"}, {"lat": "44.138226", "lng": "9.678961", "elevation": "197.39999389648438", "time": "2013-09-20T09:25:22.286Z"}, {"lat": "44.138225", "lng": "9.678964", "elevation": "197.1999969482422", "time": "2013-09-20T09:25:23.295Z"}, {"lat": "44.13823", "lng": "9.678985", "elevation": "194.39999389648438", "time": "2013-09-20T09:25:41.296Z"}, {"lat": "44.138232", "lng": "9.678992", "elevation": "194.6999969482422", "time": "2013-09-20T09:25:42.279Z"}, {"lat": "44.138286", "lng": "9.679026", "elevation": "190.8000030517578", "time": "2013-09-20T09:25:53.328Z"}, {"lat": "44.138286", "lng": "9.679026", "elevation": "190.5", "time": "2013-09-20T09:25:54.291Z"}, {"lat": "44.138286", "lng": "9.679034", "elevation": "191.0", "time": "2013-09-20T09:25:58.330Z"}, {"lat": "44.138288", "lng": "9.679045", "elevation": "190.1999969482422", "time": "2013-09-20T09:25:59.291Z"}, {"lat": "44.138312", "lng": "9.679158", "elevation": "185.89999389648438", "time": "2013-09-20T09:26:07.275Z"}, {"lat": "44.138313", "lng": "9.679171", "elevation": "184.6999969482422", "time": "2013-09-20T09:26:08.298Z"}, {"lat": "44.138306", "lng": "9.679292", "elevation": "183.10000610351563", "time": "2013-09-20T09:26:21.294Z"}, {"lat": "44.138303", "lng": "9.679298", "elevation": "183.39999389648438", "time": "2013-09-20T09:26:22.282Z"}, {"lat": "44.138285", "lng": "9.679396", "elevation": "176.60000610351563", "time": "2013-09-20T09:26:40.299Z"}, {"lat": "44.138285", "lng": "9.679395", "elevation": "176.6999969482422", "time": "2013-09-20T09:26:41.292Z"}, {"lat": "44.138283", "lng": "9.679398", "elevation": "176.60000610351563", "time": "2013-09-20T09:26:43.291Z"}, {"lat": "44.138279", "lng": "9.679403", "elevation": "176.3000030517578", "time": "2013-09-20T09:26:44.301Z"}, {"lat": "44.138229", "lng": "9.679493", "elevation": "172.5", "time": "2013-09-20T09:26:55.358Z"}, {"lat": "44.138228", "lng": "9.679506", "elevation": "172.89999389648438", "time": "2013-09-20T09:26:56.326Z"}, {"lat": "44.138213", "lng": "9.679581", "elevation": "172.60000610351563", "time": "2013-09-20T09:27:06.325Z"}, {"lat": "44.138215", "lng": "9.679582", "elevation": "172.6999969482422", "time": "2013-09-20T09:27:07.294Z"}, {"lat": "44.138199", "lng": "9.679572", "elevation": "172.0", "time": "2013-09-20T09:27:23.288Z"}, {"lat": "44.138195", "lng": "9.679574", "elevation": "172.1999969482422", "time": "2013-09-20T09:27:24.287Z"}, {"lat": "44.138114", "lng": "9.679621", "elevation": "169.5", "time": "2013-09-20T09:27:32.315Z"}, {"lat": "44.138106", "lng": "9.679629", "elevation": "170.60000610351563", "time": "2013-09-20T09:27:33.290Z"}, {"lat": "44.138108", "lng": "9.67968", "elevation": "168.1999969482422", "time": "2013-09-20T09:27:41.305Z"}, {"lat": "44.138107", "lng": "9.679679", "elevation": "168.1999969482422", "time": "2013-09-20T09:27:42.305Z"}, {"lat": "44.138102", "lng": "9.679695", "elevation": "165.39999389648438", "time": "2013-09-20T09:27:54.314Z"}, {"lat": "44.138099", "lng": "9.6797", "elevation": "165.5", "time": "2013-09-20T09:27:55.296Z"}, {"lat": "44.138052", "lng": "9.679789", "elevation": "166.0", "time": "2013-09-20T09:28:04.304Z"}, {"lat": "44.138043", "lng": "9.679801", "elevation": "166.60000610351563", "time": "2013-09-20T09:28:05.322Z"}, {"lat": "44.137982", "lng": "9.679877", "elevation": "163.5", "time": "2013-09-20T09:28:14.289Z"}, {"lat": "44.137973", "lng": "9.679881", "elevation": "163.6999969482422", "time": "2013-09-20T09:28:15.376Z"}, {"lat": "44.137898", "lng": "9.679945", "elevation": "163.1999969482422", "time": "2013-09-20T09:28:22.307Z"}, {"lat": "44.137892", "lng": "9.679957", "elevation": "163.10000610351563", "time": "2013-09-20T09:28:23.299Z"}, {"lat": "44.137811", "lng": "9.680002", "elevation": "161.0", "time": "2013-09-20T09:28:33.301Z"}, {"lat": "44.137806", "lng": "9.680006", "elevation": "161.6999969482422", "time": "2013-09-20T09:28:34.301Z"}, {"lat": "44.137785", "lng": "9.680024", "elevation": "160.6999969482422", "time": "2013-09-20T09:28:40.318Z"}, {"lat": "44.137789", "lng": "9.680023", "elevation": "161.10000610351563", "time": "2013-09-20T09:28:41.318Z"}, {"lat": "44.137792", "lng": "9.680034", "elevation": "162.5", "time": "2013-09-20T09:28:49.325Z"}, {"lat": "44.137787", "lng": "9.680036", "elevation": "162.1999969482422", "time": "2013-09-20T09:28:50.318Z"}, {"lat": "44.137728", "lng": "9.680109", "elevation": "156.8000030517578", "time": "2013-09-20T09:28:58.302Z"}, {"lat": "44.137718", "lng": "9.680118", "elevation": "155.6999969482422", "time": "2013-09-20T09:28:59.309Z"}, {"lat": "44.13766", "lng": "9.680206", "elevation": "153.60000610351563", "time": "2013-09-20T09:29:07.310Z"}, {"lat": "44.137658", "lng": "9.680217", "elevation": "152.39999389648438", "time": "2013-09-20T09:29:08.311Z"}, {"lat": "44.137629", "lng": "9.68033", "elevation": "151.39999389648438", "time": "2013-09-20T09:29:25.294Z"}, {"lat": "44.137629", "lng": "9.680338", "elevation": "151.1999969482422", "time": "2013-09-20T09:29:26.322Z"}, {"lat": "44.137663", "lng": "9.680357", "elevation": "148.1999969482422", "time": "2013-09-20T09:29:35.304Z"}, {"lat": "44.137662", "lng": "9.680357", "elevation": "148.1999969482422", "time": "2013-09-20T09:29:36.298Z"}, {"lat": "44.137657", "lng": "9.680357", "elevation": "147.8000030517578", "time": "2013-09-20T09:29:38.260Z"}, {"lat": "44.137652", "lng": "9.680356", "elevation": "147.89999389648438", "time": "2013-09-20T09:29:38.294Z"}, {"lat": "44.137566", "lng": "9.680328", "elevation": "147.89999389648438", "time": "2013-09-20T09:29:49.322Z"}, {"lat": "44.137562", "lng": "9.680335", "elevation": "148.3000030517578", "time": "2013-09-20T09:29:50.307Z"}, {"lat": "44.137504", "lng": "9.680421", "elevation": "146.0", "time": "2013-09-20T09:30:01.319Z"}, {"lat": "44.137495", "lng": "9.680429", "elevation": "146.8000030517578", "time": "2013-09-20T09:30:02.322Z"}, {"lat": "44.137471", "lng": "9.68045", "elevation": "142.1999969482422", "time": "2013-09-20T09:30:08.322Z"}, {"lat": "44.137475", "lng": "9.680451", "elevation": "142.39999389648438", "time": "2013-09-20T09:30:09.305Z"}, {"lat": "44.13748", "lng": "9.68045", "elevation": "142.60000610351563", "time": "2013-09-20T09:30:10.322Z"}, {"lat": "44.137481", "lng": "9.68045", "elevation": "142.60000610351563", "time": "2013-09-20T09:30:11.308Z"}, {"lat": "44.137477", "lng": "9.680446", "elevation": "142.8000030517578", "time": "2013-09-20T09:30:13.300Z"}, {"lat": "44.137471", "lng": "9.680443", "elevation": "145.0", "time": "2013-09-20T09:30:14.308Z"}, {"lat": "44.137448", "lng": "9.680447", "elevation": "144.60000610351563", "time": "2013-09-20T09:30:35.325Z"}, {"lat": "44.137448", "lng": "9.680446", "elevation": "144.5", "time": "2013-09-20T09:30:36.319Z"}, {"lat": "44.137441", "lng": "9.680445", "elevation": "144.10000610351563", "time": "2013-09-20T09:30:41.373Z"}, {"lat": "44.137436", "lng": "9.680444", "elevation": "143.6999969482422", "time": "2013-09-20T09:30:42.333Z"}, {"lat": "44.137362", "lng": "9.680377", "elevation": "140.89999389648438", "time": "2013-09-20T09:30:58.336Z"}, {"lat": "44.137354", "lng": "9.680371", "elevation": "141.89999389648438", "time": "2013-09-20T09:30:59.326Z"}, {"lat": "44.137318", "lng": "9.680375", "elevation": "141.3000030517578", "time": "2013-09-20T09:31:07.407Z"}, {"lat": "44.137319", "lng": "9.680376", "elevation": "141.1999969482422", "time": "2013-09-20T09:31:08.446Z"}, {"lat": "44.137316", "lng": "9.680386", "elevation": "140.6999969482422", "time": "2013-09-20T09:31:12.376Z"}, {"lat": "44.137313", "lng": "9.680391", "elevation": "140.1999969482422", "time": "2013-09-20T09:31:13.304Z"}, {"lat": "44.137241", "lng": "9.680448", "elevation": "140.5", "time": "2013-09-20T09:31:22.335Z"}, {"lat": "44.137234", "lng": "9.680452", "elevation": "140.10000610351563", "time": "2013-09-20T09:31:23.426Z"}, {"lat": "44.137146", "lng": "9.680462", "elevation": "139.60000610351563", "time": "2013-09-20T09:31:38.435Z"}, {"lat": "44.137138", "lng": "9.680468", "elevation": "137.39999389648438", "time": "2013-09-20T09:31:39.355Z"}, {"lat": "44.137067", "lng": "9.680541", "elevation": "134.8000030517578", "time": "2013-09-20T09:31:48.350Z"}, {"lat": "44.137056", "lng": "9.680546", "elevation": "135.1999969482422", "time": "2013-09-20T09:31:48.378Z"}, {"lat": "44.136989", "lng": "9.680622", "elevation": "132.10000610351563", "time": "2013-09-20T09:31:58.072Z"}, {"lat": "44.136983", "lng": "9.680626", "elevation": "131.8000030517578", "time": "2013-09-20T09:31:58.411Z"}, {"lat": "44.13691", "lng": "9.680685", "elevation": "122.5", "time": "2013-09-20T09:32:14.311Z"}, {"lat": "44.1369", "lng": "9.680693", "elevation": "122.0999984741211", "time": "2013-09-20T09:32:15.324Z"}, {"lat": "44.136825", "lng": "9.680753", "elevation": "122.30000305175781", "time": "2013-09-20T09:32:24.311Z"}, {"lat": "44.13682", "lng": "9.680757", "elevation": "122.4000015258789", "time": "2013-09-20T09:32:25.318Z"}, {"lat": "44.13679", "lng": "9.680869", "elevation": "118.9000015258789", "time": "2013-09-20T09:32:35.310Z"}, {"lat": "44.136793", "lng": "9.680883", "elevation": "117.69999694824219", "time": "2013-09-20T09:32:36.325Z"}, {"lat": "44.136808", "lng": "9.680865", "elevation": "119.30000305175781", "time": "2013-09-20T09:32:43.487Z"}, {"lat": "44.136807", "lng": "9.680862", "elevation": "119.4000015258789", "time": "2013-09-20T09:32:44.399Z"}, {"lat": "44.136809", "lng": "9.680865", "elevation": "118.0", "time": "2013-09-20T09:32:46.322Z"}, {"lat": "44.136816", "lng": "9.680872", "elevation": "116.0", "time": "2013-09-20T09:32:47.375Z"}, {"lat": "44.136808", "lng": "9.680989", "elevation": "115.19999694824219", "time": "2013-09-20T09:33:01.335Z"}, {"lat": "44.136796", "lng": "9.680997", "elevation": "115.80000305175781", "time": "2013-09-20T09:33:02.329Z"}, {"lat": "44.136744", "lng": "9.681017", "elevation": "122.0", "time": "2013-09-20T09:33:15.387Z"}, {"lat": "44.136743", "lng": "9.681018", "elevation": "122.0", "time": "2013-09-20T09:33:16.440Z"}, {"lat": "44.136747", "lng": "9.681026", "elevation": "122.0", "time": "2013-09-20T09:33:34.434Z"}, {"lat": "44.136746", "lng": "9.681032", "elevation": "121.69999694824219", "time": "2013-09-20T09:33:35.447Z"}, {"lat": "44.136743", "lng": "9.681041", "elevation": "121.80000305175781", "time": "2013-09-20T09:33:38.809Z"}, {"lat": "44.136743", "lng": "9.681042", "elevation": "121.5999984741211", "time": "2013-09-20T09:33:39.348Z"}, {"lat": "44.136738", "lng": "9.681053", "elevation": "121.0999984741211", "time": "2013-09-20T09:33:55.372Z"}, {"lat": "44.136735", "lng": "9.68106", "elevation": "120.5", "time": "2013-09-20T09:33:56.339Z"}, {"lat": "44.13669", "lng": "9.681147", "elevation": "117.0", "time": "2013-09-20T09:34:09.499Z"}, {"lat": "44.136683", "lng": "9.681162", "elevation": "117.0", "time": "2013-09-20T09:34:10.421Z"}, {"lat": "44.136632", "lng": "9.681262", "elevation": "109.9000015258789", "time": "2013-09-20T09:34:18.314Z"}, {"lat": "44.13663", "lng": "9.681274", "elevation": "110.19999694824219", "time": "2013-09-20T09:34:18.356Z"}, {"lat": "44.136596", "lng": "9.681383", "elevation": "107.5", "time": "2013-09-20T09:34:43.441Z"}, {"lat": "44.136597", "lng": "9.681385", "elevation": "106.80000305175781", "time": "2013-09-20T09:34:43.473Z"}, {"lat": "44.136606", "lng": "9.681394", "elevation": "104.80000305175781", "time": "2013-09-20T09:34:48.412Z"}, {"lat": "44.136609", "lng": "9.681397", "elevation": "102.30000305175781", "time": "2013-09-20T09:34:48.444Z"}, {"lat": "44.13664", "lng": "9.681501", "elevation": "102.80000305175781", "time": "2013-09-20T09:35:01.438Z"}, {"lat": "44.13664", "lng": "9.6815", "elevation": "102.9000015258789", "time": "2013-09-20T09:35:02.371Z"}, {"lat": "44.13665", "lng": "9.681504", "elevation": "103.0", "time": "2013-09-20T09:35:31.443Z"}, {"lat": "44.13665", "lng": "9.681513", "elevation": "101.4000015258789", "time": "2013-09-20T09:35:32.341Z"}, {"lat": "44.13667", "lng": "9.681625", "elevation": "97.5", "time": "2013-09-20T09:35:38.483Z"}, {"lat": "44.136679", "lng": "9.681646", "elevation": "97.30000305175781", "time": "2013-09-20T09:35:39.341Z"}, {"lat": "44.13673", "lng": "9.681748", "elevation": "92.80000305175781", "time": "2013-09-20T09:35:50.359Z"}, {"lat": "44.136739", "lng": "9.681759", "elevation": "92.5999984741211", "time": "2013-09-20T09:35:51.437Z"}, {"lat": "44.136706", "lng": "9.681826", "elevation": "94.80000305175781", "time": "2013-09-20T09:36:08.146Z"}, {"lat": "44.136707", "lng": "9.681825", "elevation": "94.5", "time": "2013-09-20T09:36:08.390Z"}, {"lat": "44.136707", "lng": "9.681837", "elevation": "94.5", "time": "2013-09-20T09:36:39.352Z"}, {"lat": "44.136704", "lng": "9.681846", "elevation": "94.19999694824219", "time": "2013-09-20T09:36:40.378Z"}, {"lat": "44.136751", "lng": "9.68195", "elevation": "92.9000015258789", "time": "2013-09-20T09:36:48.422Z"}, {"lat": "44.136759", "lng": "9.681955", "elevation": "92.80000305175781", "time": "2013-09-20T09:36:49.442Z"}, {"lat": "44.136748", "lng": "9.682016", "elevation": "91.69999694824219", "time": "2013-09-20T09:37:00.429Z"}, {"lat": "44.136748", "lng": "9.682016", "elevation": "91.80000305175781", "time": "2013-09-20T09:37:01.458Z"}, {"lat": "44.136742", "lng": "9.682022", "elevation": "90.19999694824219", "time": "2013-09-20T09:37:20.330Z"}, {"lat": "44.136735", "lng": "9.68226", "elevation": "91.80000305175781", "time": "2013-09-20T09:37:38.350Z"}, {"lat": "44.136665", "lng": "9.682325", "elevation": "95.69999694824219", "time": "2013-09-20T09:37:52.361Z"}, {"lat": "44.136658", "lng": "9.682328", "elevation": "96.5", "time": "2013-09-20T09:37:53.354Z"}, {"lat": "44.136652", "lng": "9.682356", "elevation": "96.80000305175781", "time": "2013-09-20T09:38:01.402Z"}, {"lat": "44.136653", "lng": "9.682355", "elevation": "96.5", "time": "2013-09-20T09:38:02.353Z"}, {"lat": "44.136645", "lng": "9.682335", "elevation": "96.80000305175781", "time": "2013-09-20T09:38:21.350Z"}, {"lat": "44.136642", "lng": "9.682327", "elevation": "96.9000015258789", "time": "2013-09-20T09:38:22.352Z"}, {"lat": "44.136583", "lng": "9.682238", "elevation": "96.9000015258789", "time": "2013-09-20T09:38:29.385Z"}, {"lat": "44.136569", "lng": "9.682232", "elevation": "97.4000015258789", "time": "2013-09-20T09:38:30.362Z"}, {"lat": "44.136498", "lng": "9.682229", "elevation": "98.5", "time": "2013-09-20T09:38:34.355Z"}, {"lat": "44.136478", "lng": "9.68223", "elevation": "98.5999984741211", "time": "2013-09-20T09:38:35.346Z"}, {"lat": "44.136424", "lng": "9.682296", "elevation": "96.19999694824219", "time": "2013-09-20T09:38:50.350Z"}, {"lat": "44.136424", "lng": "9.682297", "elevation": "96.0999984741211", "time": "2013-09-20T09:38:51.347Z"}, {"lat": "44.136423", "lng": "9.682303", "elevation": "97.5999984741211", "time": "2013-09-20T09:40:53.088Z"}, {"lat": "44.136423", "lng": "9.682312", "elevation": "98.19999694824219", "time": "2013-09-20T09:40:53.412Z"}, {"lat": "44.1364", "lng": "9.682417", "elevation": "94.5", "time": "2013-09-20T09:40:58.346Z"}, {"lat": "44.136392", "lng": "9.682442", "elevation": "93.69999694824219", "time": "2013-09-20T09:40:59.357Z"}, {"lat": "44.136363", "lng": "9.682493", "elevation": "92.9000015258789", "time": "2013-09-20T09:41:02.357Z"}, {"lat": "44.136197", "lng": "9.682553", "elevation": "95.30000305175781", "time": "2013-09-20T09:41:56.360Z"}, {"lat": "44.136195", "lng": "9.682557", "elevation": "95.19999694824219", "time": "2013-09-20T09:41:57.381Z"}, {"lat": "44.136195", "lng": "9.682557", "elevation": "95.19999694824219", "time": "2013-09-20T09:41:58.201Z"}, {"lat": "44.136191", "lng": "9.682562", "elevation": "95.0999984741211", "time": "2013-09-20T09:41:58.415Z"}, {"lat": "44.136141", "lng": "9.682635", "elevation": "95.5", "time": "2013-09-20T09:42:01.418Z"}, {"lat": "44.136117", "lng": "9.68266", "elevation": "95.30000305175781", "time": "2013-09-20T09:42:02.411Z"}, {"lat": "44.136062", "lng": "9.682709", "elevation": "95.30000305175781", "time": "2013-09-20T09:42:04.388Z"}, {"lat": "44.136034", "lng": "9.682733", "elevation": "94.30000305175781", "time": "2013-09-20T09:42:05.350Z"}, {"lat": "44.135954", "lng": "9.682785", "elevation": "94.30000305175781", "time": "2013-09-20T09:42:08.350Z"}, {"lat": "44.135928", "lng": "9.682794", "elevation": "94.19999694824219", "time": "2013-09-20T09:42:09.434Z"}, {"lat": "44.135858", "lng": "9.682798", "elevation": "95.80000305175781", "time": "2013-09-20T09:42:17.378Z"}, {"lat": "44.135863", "lng": "9.682797", "elevation": "95.5999984741211", "time": "2013-09-20T09:42:18.394Z"}, {"lat": "44.135866", "lng": "9.682803", "elevation": "95.19999694824219", "time": "2013-09-20T09:42:27.370Z"}, {"lat": "44.135862", "lng": "9.682808", "elevation": "93.5999984741211", "time": "2013-09-20T09:42:28.402Z"}, {"lat": "44.135818", "lng": "9.682786", "elevation": "88.5999984741211", "time": "2013-09-20T09:42:38.527Z"}, {"lat": "44.135817", "lng": "9.682786", "elevation": "88.5999984741211", "time": "2013-09-20T09:42:39.437Z"}, {"lat": "44.135806", "lng": "9.682802", "elevation": "87.69999694824219", "time": "2013-09-20T09:42:49.407Z"}, {"lat": "44.1358", "lng": "9.682803", "elevation": "87.19999694824219", "time": "2013-09-20T09:42:50.384Z"}, {"lat": "44.135722", "lng": "9.682807", "elevation": "87.69999694824219", "time": "2013-09-20T09:42:55.448Z"}, {"lat": "44.135702", "lng": "9.682807", "elevation": "87.4000015258789", "time": "2013-09-20T09:42:56.430Z"}, {"lat": "44.13562", "lng": "9.682857", "elevation": "82.0", "time": "2013-09-20T09:43:03.346Z"}, {"lat": "44.135619", "lng": "9.682872", "elevation": "81.5", "time": "2013-09-20T09:43:03.379Z"}, {"lat": "44.13562", "lng": "9.682894", "elevation": "81.69999694824219", "time": "2013-09-20T09:43:08.423Z"}, {"lat": "44.135619", "lng": "9.68289", "elevation": "82.0", "time": "2013-09-20T09:43:09.374Z"}, {"lat": "44.135616", "lng": "9.682886", "elevation": "82.19999694824219", "time": "2013-09-20T09:43:10.438Z"}, {"lat": "44.135614", "lng": "9.682881", "elevation": "82.19999694824219", "time": "2013-09-20T09:43:11.446Z"}, {"lat": "44.135599", "lng": "9.682876", "elevation": "82.0999984741211", "time": "2013-09-20T09:43:17.377Z"}, {"lat": "44.135598", "lng": "9.682876", "elevation": "82.0999984741211", "time": "2013-09-20T09:43:18.486Z"}, {"lat": "44.135599", "lng": "9.682874", "elevation": "82.30000305175781", "time": "2013-09-20T09:44:03.157Z"}, {"lat": "44.135593", "lng": "9.682876", "elevation": "82.30000305175781", "time": "2013-09-20T09:44:03.443Z"}, {"lat": "44.135517", "lng": "9.682874", "elevation": "82.30000305175781", "time": "2013-09-20T09:44:09.412Z"}, {"lat": "44.1355", "lng": "9.682868", "elevation": "82.19999694824219", "time": "2013-09-20T09:44:10.395Z"}, {"lat": "44.135417", "lng": "9.682881", "elevation": "84.5999984741211", "time": "2013-09-20T09:44:14.495Z"}, {"lat": "44.135402", "lng": "9.682891", "elevation": "85.0", "time": "2013-09-20T09:44:15.483Z"}, {"lat": "44.135328", "lng": "9.682879", "elevation": "83.30000305175781", "time": "2013-09-20T09:44:28.361Z"}, {"lat": "44.135333", "lng": "9.682882", "elevation": "83.30000305175781", "time": "2013-09-20T09:44:29.374Z"}, {"lat": "44.135338", "lng": "9.682885", "elevation": "83.30000305175781", "time": "2013-09-20T09:44:30.412Z"}, {"lat": "44.135343", "lng": "9.682889", "elevation": "83.30000305175781", "time": "2013-09-20T09:44:31.399Z"}, {"lat": "44.135358", "lng": "9.682907", "elevation": "83.30000305175781", "time": "2013-09-20T09:44:37.373Z"}, {"lat": "44.134955", "lng": "9.683342", "elevation": "82.30000305175781", "time": "2013-09-20T09:45:28.402Z"}, {"lat": "44.135033", "lng": "9.683385", "elevation": "82.0999984741211", "time": "2013-09-20T09:45:33.739Z"}, {"lat": "44.135044", "lng": "9.683382", "elevation": "82.0999984741211", "time": "2013-09-20T09:45:34.380Z"}, {"lat": "44.135052", "lng": "9.68337", "elevation": "82.19999694824219", "time": "2013-09-20T09:45:39.418Z"}, {"lat": "44.135049", "lng": "9.683368", "elevation": "82.19999694824219", "time": "2013-09-20T09:45:40.395Z"}, {"lat": "44.135041", "lng": "9.683368", "elevation": "82.0999984741211", "time": "2013-09-20T09:45:42.379Z"}, {"lat": "44.135027", "lng": "9.683364", "elevation": "82.0999984741211", "time": "2013-09-20T09:45:43.366Z"}, {"lat": "44.134971", "lng": "9.683342", "elevation": "82.0999984741211", "time": "2013-09-20T09:45:53.383Z"}, {"lat": "44.134971", "lng": "9.683342", "elevation": "82.0999984741211", "time": "2013-09-20T09:45:54.394Z"}, {"lat": "44.134975", "lng": "9.683344", "elevation": "82.0999984741211", "time": "2013-09-20T09:46:03.372Z"}, {"lat": "44.134663", "lng": "9.685106", "elevation": "53.70000076293945", "time": "2013-09-20T11:43:28.836Z"}, {"lat": "44.134807", "lng": "9.685014", "elevation": "31.0", "time": "2013-09-20T11:43:29.744Z"}, {"lat": "44.134857", "lng": "9.68503", "elevation": "39.400001525878906", "time": "2013-09-20T11:43:30.744Z"}, {"lat": "44.134907", "lng": "9.685014", "elevation": "22.299999237060547", "time": "2013-09-20T11:43:31.765Z"}, {"lat": "44.134884", "lng": "9.685022", "elevation": "36.20000076293945", "time": "2013-09-20T11:43:32.744Z"}, {"lat": "44.134806", "lng": "9.684967", "elevation": "65.0", "time": "2013-09-20T11:43:33.745Z"}, {"lat": "44.134806", "lng": "9.684967", "elevation": "65.0", "time": "2013-09-20T11:43:33.845Z"}, {"lat": "44.134683", "lng": "9.685084", "elevation": "65.30000305175781", "time": "2013-09-20T11:43:34.761Z"}, {"lat": "44.134762", "lng": "9.685107", "elevation": "42.70000076293945", "time": "2013-09-20T11:43:35.764Z"}, {"lat": "44.134857", "lng": "9.685136", "elevation": "41.099998474121094", "time": "2013-09-20T11:43:36.749Z"}, {"lat": "44.134875", "lng": "9.685044", "elevation": "59.5", "time": "2013-09-20T11:43:40.751Z"}, {"lat": "44.134842", "lng": "9.68501", "elevation": "51.5", "time": "2013-09-20T11:43:41.759Z"}, {"lat": "44.134779", "lng": "9.684951", "elevation": "56.0", "time": "2013-09-20T11:43:44.756Z"}, {"lat": "44.13472", "lng": "9.684971", "elevation": "65.19999694824219", "time": "2013-09-20T11:43:45.758Z"}, {"lat": "44.13465", "lng": "9.684897", "elevation": "68.5", "time": "2013-09-20T11:44:01.151Z"}, {"lat": "44.134646", "lng": "9.684896", "elevation": "69.30000305175781", "time": "2013-09-20T11:44:02.144Z"}, {"lat": "44.134566", "lng": "9.684845", "elevation": "69.19999694824219", "time": "2013-09-20T11:44:31.143Z"}, {"lat": "44.134553", "lng": "9.684842", "elevation": "69.0999984741211", "time": "2013-09-20T11:44:32.151Z"}, {"lat": "44.134488", "lng": "9.684778", "elevation": "72.9000015258789", "time": "2013-09-20T11:44:39.145Z"}, {"lat": "44.134478", "lng": "9.684769", "elevation": "72.80000305175781", "time": "2013-09-20T11:44:40.148Z"}, {"lat": "44.134453", "lng": "9.684716", "elevation": "71.9000015258789", "time": "2013-09-20T11:44:49.178Z"}, {"lat": "44.134452", "lng": "9.684716", "elevation": "72.0999984741211", "time": "2013-09-20T11:44:50.145Z"}, {"lat": "44.134453", "lng": "9.684705", "elevation": "72.9000015258789", "time": "2013-09-20T11:45:05.201Z"}, {"lat": "44.134451", "lng": "9.684696", "elevation": "74.30000305175781", "time": "2013-09-20T11:45:06.153Z"}, {"lat": "44.134457", "lng": "9.684581", "elevation": "77.19999694824219", "time": "2013-09-20T11:45:19.243Z"}, {"lat": "44.134457", "lng": "9.684581", "elevation": "77.30000305175781", "time": "2013-09-20T11:45:20.223Z"}, {"lat": "44.134455", "lng": "9.684583", "elevation": "77.5", "time": "2013-09-20T11:45:36.233Z"}, {"lat": "44.134449", "lng": "9.684583", "elevation": "78.0999984741211", "time": "2013-09-20T11:45:37.173Z"}, {"lat": "44.134413", "lng": "9.684617", "elevation": "80.4000015258789", "time": "2013-09-20T11:45:43.284Z"}, {"lat": "44.134391", "lng": "9.684664", "elevation": "82.30000305175781", "time": "2013-09-20T11:45:48.165Z"}, {"lat": "44.134324", "lng": "9.684725", "elevation": "79.80000305175781", "time": "2013-09-20T11:46:00.155Z"}, {"lat": "44.134327", "lng": "9.684724", "elevation": "79.9000015258789", "time": "2013-09-20T11:46:01.160Z"}, {"lat": "44.134329", "lng": "9.684725", "elevation": "80.19999694824219", "time": "2013-09-20T11:46:02.155Z"}, {"lat": "44.13434", "lng": "9.68473", "elevation": "80.9000015258789", "time": "2013-09-20T11:46:03.152Z"}, {"lat": "44.134355", "lng": "9.684735", "elevation": "80.69999694824219", "time": "2013-09-20T11:46:06.161Z"}, {"lat": "44.134355", "lng": "9.684736", "elevation": "80.80000305175781", "time": "2013-09-20T11:46:07.157Z"}, {"lat": "44.134354", "lng": "9.684733", "elevation": "81.19999694824219", "time": "2013-09-20T11:46:12.212Z"}, {"lat": "44.134351", "lng": "9.68473", "elevation": "81.19999694824219", "time": "2013-09-20T11:46:13.160Z"}, {"lat": "44.134286", "lng": "9.684733", "elevation": "83.5", "time": "2013-09-20T11:46:27.161Z"}, {"lat": "44.134287", "lng": "9.684733", "elevation": "83.4000015258789", "time": "2013-09-20T11:46:28.168Z"}, {"lat": "44.134277", "lng": "9.684726", "elevation": "87.5999984741211", "time": "2013-09-20T11:48:06.183Z"}, {"lat": "44.134276", "lng": "9.684735", "elevation": "88.5", "time": "2013-09-20T11:48:07.274Z"}, {"lat": "44.134284", "lng": "9.684856", "elevation": "90.0", "time": "2013-09-20T11:48:16.232Z"}, {"lat": "44.134286", "lng": "9.684878", "elevation": "90.5", "time": "2013-09-20T11:48:17.215Z"}, {"lat": "44.134275", "lng": "9.684992", "elevation": "88.9000015258789", "time": "2013-09-20T11:48:23.341Z"}, {"lat": "44.134271", "lng": "9.685005", "elevation": "88.30000305175781", "time": "2013-09-20T11:48:24.244Z"}, {"lat": "44.134207", "lng": "9.685056", "elevation": "88.19999694824219", "time": "2013-09-20T11:48:37.186Z"}, {"lat": "44.134207", "lng": "9.685055", "elevation": "88.19999694824219", "time": "2013-09-20T11:48:38.203Z"}, {"lat": "44.134212", "lng": "9.685062", "elevation": "88.4000015258789", "time": "2013-09-20T11:48:45.212Z"}, {"lat": "44.134217", "lng": "9.685065", "elevation": "87.80000305175781", "time": "2013-09-20T11:48:46.171Z"}, {"lat": "44.134234", "lng": "9.68509", "elevation": "87.0999984741211", "time": "2013-09-20T11:48:53.125Z"}, {"lat": "44.134234", "lng": "9.68509", "elevation": "86.80000305175781", "time": "2013-09-20T11:48:53.208Z"}, {"lat": "44.13423", "lng": "9.685092", "elevation": "87.0", "time": "2013-09-20T11:48:56.175Z"}, {"lat": "44.134225", "lng": "9.685089", "elevation": "86.5", "time": "2013-09-20T11:48:57.241Z"}, {"lat": "44.134191", "lng": "9.685074", "elevation": "90.30000305175781", "time": "2013-09-20T11:49:07.183Z"}, {"lat": "44.13419", "lng": "9.685075", "elevation": "90.19999694824219", "time": "2013-09-20T11:49:08.182Z"}, {"lat": "44.134185", "lng": "9.685077", "elevation": "91.0999984741211", "time": "2013-09-20T11:49:14.181Z"}, {"lat": "44.134182", "lng": "9.685085", "elevation": "90.69999694824219", "time": "2013-09-20T11:49:15.193Z"}, {"lat": "44.134132", "lng": "9.685179", "elevation": "91.0999984741211", "time": "2013-09-20T11:49:23.282Z"}, {"lat": "44.13413", "lng": "9.685195", "elevation": "91.0", "time": "2013-09-20T11:49:24.179Z"}, {"lat": "44.134134", "lng": "9.685243", "elevation": "92.5", "time": "2013-09-20T11:49:30.174Z"}, {"lat": "44.134135", "lng": "9.685239", "elevation": "92.4000015258789", "time": "2013-09-20T11:49:31.178Z"}, {"lat": "44.134131", "lng": "9.685253", "elevation": "94.0", "time": "2013-09-20T11:50:03.199Z"}, {"lat": "44.134127", "lng": "9.685259", "elevation": "94.5", "time": "2013-09-20T11:50:04.179Z"}, {"lat": "44.134111", "lng": "9.685357", "elevation": "98.0999984741211", "time": "2013-09-20T11:50:16.243Z"}, {"lat": "44.13411", "lng": "9.685357", "elevation": "98.30000305175781", "time": "2013-09-20T11:50:17.221Z"}, {"lat": "44.134101", "lng": "9.685357", "elevation": "99.5", "time": "2013-09-20T11:50:28.418Z"}, {"lat": "44.134095", "lng": "9.685358", "elevation": "100.0999984741211", "time": "2013-09-20T11:50:29.194Z"}, {"lat": "44.13401", "lng": "9.685381", "elevation": "100.69999694824219", "time": "2013-09-20T11:50:38.677Z"}, {"lat": "44.134001", "lng": "9.685388", "elevation": "99.80000305175781", "time": "2013-09-20T11:50:39.276Z"}, {"lat": "44.133965", "lng": "9.685502", "elevation": "90.30000305175781", "time": "2013-09-20T11:50:44.181Z"}, {"lat": "44.133962", "lng": "9.685525", "elevation": "90.0", "time": "2013-09-20T11:50:45.215Z"}, {"lat": "44.133912", "lng": "9.68562", "elevation": "91.0", "time": "2013-09-20T11:50:53.178Z"}, {"lat": "44.133905", "lng": "9.685635", "elevation": "90.80000305175781", "time": "2013-09-20T11:50:54.180Z"}, {"lat": "44.133842", "lng": "9.685708", "elevation": "91.80000305175781", "time": "2013-09-20T11:51:01.181Z"}, {"lat": "44.133834", "lng": "9.685717", "elevation": "90.69999694824219", "time": "2013-09-20T11:51:02.196Z"}, {"lat": "44.133794", "lng": "9.685815", "elevation": "90.5999984741211", "time": "2013-09-20T11:51:10.184Z"}, {"lat": "44.133788", "lng": "9.685826", "elevation": "91.5999984741211", "time": "2013-09-20T11:51:11.186Z"}, {"lat": "44.133727", "lng": "9.685894", "elevation": "96.0999984741211", "time": "2013-09-20T11:51:17.190Z"}, {"lat": "44.133715", "lng": "9.685901", "elevation": "95.5", "time": "2013-09-20T11:51:18.182Z"}, {"lat": "44.133657", "lng": "9.685932", "elevation": "98.5", "time": "2013-09-20T11:51:28.938Z"}, {"lat": "44.133658", "lng": "9.68593", "elevation": "99.69999694824219", "time": "2013-09-20T11:51:29.213Z"}, {"lat": "44.133655", "lng": "9.685926", "elevation": "101.0", "time": "2013-09-20T11:51:30.182Z"}, {"lat": "44.133635", "lng": "9.685912", "elevation": "103.0", "time": "2013-09-20T11:51:37.203Z"}, {"lat": "44.133633", "lng": "9.685913", "elevation": "103.69999694824219", "time": "2013-09-20T11:51:38.197Z"}, {"lat": "44.133632", "lng": "9.685919", "elevation": "110.4000015258789", "time": "2013-09-20T11:51:47.194Z"}, {"lat": "44.133627", "lng": "9.685926", "elevation": "110.5", "time": "2013-09-20T11:51:48.197Z"}, {"lat": "44.133579", "lng": "9.686024", "elevation": "112.0", "time": "2013-09-20T11:51:58.253Z"}, {"lat": "44.133574", "lng": "9.68603", "elevation": "112.9000015258789", "time": "2013-09-20T11:51:59.286Z"}, {"lat": "44.13351", "lng": "9.686115", "elevation": "113.19999694824219", "time": "2013-09-20T11:52:15.260Z"}, {"lat": "44.133508", "lng": "9.686117", "elevation": "111.4000015258789", "time": "2013-09-20T11:52:16.195Z"}, {"lat": "44.133449", "lng": "9.6862", "elevation": "120.0999984741211", "time": "2013-09-20T11:52:30.195Z"}, {"lat": "44.133443", "lng": "9.686208", "elevation": "119.69999694824219", "time": "2013-09-20T11:52:31.202Z"}, {"lat": "44.133378", "lng": "9.68628", "elevation": "124.69999694824219", "time": "2013-09-20T11:52:41.234Z"}, {"lat": "44.133366", "lng": "9.686279", "elevation": "125.19999694824219", "time": "2013-09-20T11:52:42.203Z"}, {"lat": "44.133279", "lng": "9.68631", "elevation": "125.80000305175781", "time": "2013-09-20T11:52:51.199Z"}, {"lat": "44.133273", "lng": "9.686313", "elevation": "126.0999984741211", "time": "2013-09-20T11:52:52.207Z"}, {"lat": "44.133205", "lng": "9.686391", "elevation": "129.89999389648438", "time": "2013-09-20T11:53:05.190Z"}, {"lat": "44.133198", "lng": "9.686383", "elevation": "129.6999969482422", "time": "2013-09-20T11:53:06.199Z"}, {"lat": "44.133194", "lng": "9.686363", "elevation": "129.39999389648438", "time": "2013-09-20T11:53:11.197Z"}, {"lat": "44.133194", "lng": "9.686364", "elevation": "128.89999389648438", "time": "2013-09-20T11:53:12.211Z"}, {"lat": "44.133195", "lng": "9.686378", "elevation": "129.10000610351563", "time": "2013-09-20T11:53:15.348Z"}, {"lat": "44.133196", "lng": "9.686384", "elevation": "128.6999969482422", "time": "2013-09-20T11:53:16.197Z"}, {"lat": "44.133205", "lng": "9.68641", "elevation": "129.5", "time": "2013-09-20T11:53:22.202Z"}, {"lat": "44.133205", "lng": "9.68641", "elevation": "129.5", "time": "2013-09-20T11:53:23.205Z"}, {"lat": "44.133202", "lng": "9.686414", "elevation": "128.60000610351563", "time": "2013-09-20T11:53:49.203Z"}, {"lat": "44.133203", "lng": "9.686419", "elevation": "128.39999389648438", "time": "2013-09-20T11:53:50.325Z"}, {"lat": "44.133202", "lng": "9.686527", "elevation": "126.5999984741211", "time": "2013-09-20T11:54:00.263Z"}, {"lat": "44.133202", "lng": "9.686549", "elevation": "125.69999694824219", "time": "2013-09-20T11:54:01.240Z"}, {"lat": "44.133192", "lng": "9.686659", "elevation": "127.30000305175781", "time": "2013-09-20T11:54:06.214Z"}, {"lat": "44.133187", "lng": "9.686677", "elevation": "127.0", "time": "2013-09-20T11:54:07.201Z"}, {"lat": "44.133136", "lng": "9.686765", "elevation": "129.1999969482422", "time": "2013-09-20T11:54:14.205Z"}, {"lat": "44.133128", "lng": "9.686776", "elevation": "129.3000030517578", "time": "2013-09-20T11:54:15.298Z"}, {"lat": "44.133068", "lng": "9.686852", "elevation": "131.10000610351563", "time": "2013-09-20T11:54:23.211Z"}, {"lat": "44.133064", "lng": "9.686867", "elevation": "131.0", "time": "2013-09-20T11:54:24.209Z"}, {"lat": "44.133024", "lng": "9.686974", "elevation": "128.60000610351563", "time": "2013-09-20T11:54:33.237Z"}, {"lat": "44.133018", "lng": "9.686986", "elevation": "128.5", "time": "2013-09-20T11:54:34.206Z"}, {"lat": "44.132967", "lng": "9.687078", "elevation": "131.1999969482422", "time": "2013-09-20T11:54:47.329Z"}, {"lat": "44.132962", "lng": "9.687087", "elevation": "129.8000030517578", "time": "2013-09-20T11:54:48.300Z"}, {"lat": "44.132916", "lng": "9.68719", "elevation": "128.8000030517578", "time": "2013-09-20T11:54:55.296Z"}, {"lat": "44.132911", "lng": "9.6872", "elevation": "128.89999389648438", "time": "2013-09-20T11:54:56.281Z"}, {"lat": "44.132873", "lng": "9.6873", "elevation": "130.1999969482422", "time": "2013-09-20T11:55:06.211Z"}, {"lat": "44.132865", "lng": "9.687314", "elevation": "131.39999389648438", "time": "2013-09-20T11:55:07.215Z"}, {"lat": "44.13282", "lng": "9.687412", "elevation": "134.1999969482422", "time": "2013-09-20T11:55:14.225Z"}, {"lat": "44.132812", "lng": "9.687425", "elevation": "134.5", "time": "2013-09-20T11:55:15.211Z"}, {"lat": "44.132782", "lng": "9.687533", "elevation": "130.5", "time": "2013-09-20T11:55:22.210Z"}, {"lat": "44.132784", "lng": "9.687551", "elevation": "130.89999389648438", "time": "2013-09-20T11:55:23.215Z"}, {"lat": "44.132749", "lng": "9.687664", "elevation": "133.6999969482422", "time": "2013-09-20T11:55:31.210Z"}, {"lat": "44.132745", "lng": "9.68768", "elevation": "134.1999969482422", "time": "2013-09-20T11:55:32.223Z"}, {"lat": "44.132741", "lng": "9.687762", "elevation": "133.89999389648438", "time": "2013-09-20T11:55:43.210Z"}, {"lat": "44.132742", "lng": "9.687762", "elevation": "134.3000030517578", "time": "2013-09-20T11:55:44.224Z"}, {"lat": "44.13274", "lng": "9.687767", "elevation": "135.10000610351563", "time": "2013-09-20T11:55:47.211Z"}, {"lat": "44.132738", "lng": "9.687772", "elevation": "136.39999389648438", "time": "2013-09-20T11:55:48.204Z"}, {"lat": "44.132731", "lng": "9.687895", "elevation": "138.1999969482422", "time": "2013-09-20T11:56:00.256Z"}, {"lat": "44.132735", "lng": "9.687903", "elevation": "137.6999969482422", "time": "2013-09-20T11:56:01.214Z"}, {"lat": "44.132757", "lng": "9.688023", "elevation": "137.6999969482422", "time": "2013-09-20T11:56:13.312Z"}, {"lat": "44.132754", "lng": "9.688027", "elevation": "138.3000030517578", "time": "2013-09-20T11:56:14.220Z"}, {"lat": "44.132759", "lng": "9.688064", "elevation": "141.3000030517578", "time": "2013-09-20T11:56:24.216Z"}, {"lat": "44.132759", "lng": "9.688065", "elevation": "141.3000030517578", "time": "2013-09-20T11:56:25.213Z"}, {"lat": "44.13275", "lng": "9.688102", "elevation": "143.39999389648438", "time": "2013-09-20T11:56:49.219Z"}, {"lat": "44.13275", "lng": "9.688108", "elevation": "143.3000030517578", "time": "2013-09-20T11:56:50.290Z"}, {"lat": "44.132754", "lng": "9.688224", "elevation": "144.1999969482422", "time": "2013-09-20T11:56:57.274Z"}, {"lat": "44.132755", "lng": "9.688243", "elevation": "144.39999389648438", "time": "2013-09-20T11:56:58.229Z"}, {"lat": "44.132775", "lng": "9.688359", "elevation": "141.8000030517578", "time": "2013-09-20T11:57:05.219Z"}, {"lat": "44.132778", "lng": "9.688378", "elevation": "141.5", "time": "2013-09-20T11:57:06.218Z"}, {"lat": "44.132775", "lng": "9.688494", "elevation": "142.0", "time": "2013-09-20T11:57:12.226Z"}, {"lat": "44.132773", "lng": "9.688514", "elevation": "140.8000030517578", "time": "2013-09-20T11:57:13.327Z"}, {"lat": "44.132758", "lng": "9.688635", "elevation": "142.39999389648438", "time": "2013-09-20T11:57:19.222Z"}, {"lat": "44.132756", "lng": "9.688659", "elevation": "142.39999389648438", "time": "2013-09-20T11:57:20.225Z"}, {"lat": "44.132744", "lng": "9.688781", "elevation": "142.3000030517578", "time": "2013-09-20T11:57:25.257Z"}, {"lat": "44.132741", "lng": "9.688806", "elevation": "142.5", "time": "2013-09-20T11:57:26.309Z"}, {"lat": "44.132725", "lng": "9.688919", "elevation": "141.6999969482422", "time": "2013-09-20T11:57:31.226Z"}, {"lat": "44.132725", "lng": "9.688943", "elevation": "141.10000610351563", "time": "2013-09-20T11:57:32.270Z"}, {"lat": "44.132733", "lng": "9.689059", "elevation": "138.89999389648438", "time": "2013-09-20T11:57:37.226Z"}, {"lat": "44.132738", "lng": "9.689083", "elevation": "139.39999389648438", "time": "2013-09-20T11:57:38.218Z"}, {"lat": "44.132716", "lng": "9.689201", "elevation": "137.89999389648438", "time": "2013-09-20T11:57:45.262Z"}, {"lat": "44.132707", "lng": "9.689214", "elevation": "138.6999969482422", "time": "2013-09-20T11:57:46.421Z"}, {"lat": "44.13265", "lng": "9.689307", "elevation": "137.3000030517578", "time": "2013-09-20T11:58:02.222Z"}, {"lat": "44.132656", "lng": "9.689324", "elevation": "137.8000030517578", "time": "2013-09-20T11:58:03.306Z"}, {"lat": "44.13269", "lng": "9.689431", "elevation": "135.6999969482422", "time": "2013-09-20T11:58:11.338Z"}, {"lat": "44.132692", "lng": "9.689446", "elevation": "134.89999389648438", "time": "2013-09-20T11:58:12.383Z"}, {"lat": "44.132681", "lng": "9.689563", "elevation": "135.1999969482422", "time": "2013-09-20T11:58:20.266Z"}, {"lat": "44.132678", "lng": "9.689578", "elevation": "135.1999969482422", "time": "2013-09-20T11:58:21.231Z"}, {"lat": "44.13266", "lng": "9.689694", "elevation": "137.10000610351563", "time": "2013-09-20T11:58:30.227Z"}, {"lat": "44.132654", "lng": "9.689707", "elevation": "136.60000610351563", "time": "2013-09-20T11:58:31.226Z"}, {"lat": "44.132598", "lng": "9.689803", "elevation": "138.39999389648438", "time": "2013-09-20T11:58:39.221Z"}, {"lat": "44.132596", "lng": "9.689812", "elevation": "138.10000610351563", "time": "2013-09-20T11:58:40.275Z"}, {"lat": "44.132594", "lng": "9.689823", "elevation": "137.89999389648438", "time": "2013-09-20T11:58:45.241Z"}, {"lat": "44.132593", "lng": "9.689823", "elevation": "138.39999389648438", "time": "2013-09-20T11:58:46.230Z"}, {"lat": "44.132585", "lng": "9.689827", "elevation": "138.3000030517578", "time": "2013-09-20T11:58:55.225Z"}, {"lat": "44.132582", "lng": "9.689834", "elevation": "137.89999389648438", "time": "2013-09-20T11:58:56.231Z"}, {"lat": "44.132518", "lng": "9.689917", "elevation": "139.1999969482422", "time": "2013-09-20T11:59:03.223Z"}, {"lat": "44.132503", "lng": "9.689923", "elevation": "139.1999969482422", "time": "2013-09-20T11:59:04.391Z"}, {"lat": "44.132441", "lng": "9.689981", "elevation": "135.5", "time": "2013-09-20T11:59:10.226Z"}, {"lat": "44.13243", "lng": "9.689998", "elevation": "136.39999389648438", "time": "2013-09-20T11:59:11.227Z"}, {"lat": "44.132368", "lng": "9.690086", "elevation": "136.89999389648438", "time": "2013-09-20T11:59:16.265Z"}, {"lat": "44.132359", "lng": "9.690106", "elevation": "137.6999969482422", "time": "2013-09-20T11:59:17.276Z"}, {"lat": "44.132334", "lng": "9.690212", "elevation": "133.1999969482422", "time": "2013-09-20T11:59:22.229Z"}, {"lat": "44.132329", "lng": "9.690232", "elevation": "133.89999389648438", "time": "2013-09-20T11:59:23.234Z"}, {"lat": "44.132301", "lng": "9.690341", "elevation": "130.0", "time": "2013-09-20T11:59:30.317Z"}, {"lat": "44.132303", "lng": "9.690363", "elevation": "130.3000030517578", "time": "2013-09-20T11:59:31.239Z"}, {"lat": "44.132272", "lng": "9.690465", "elevation": "127.9000015258789", "time": "2013-09-20T11:59:38.243Z"}, {"lat": "44.132265", "lng": "9.690477", "elevation": "129.60000610351563", "time": "2013-09-20T11:59:39.334Z"}, {"lat": "44.132224", "lng": "9.690581", "elevation": "129.39999389648438", "time": "2013-09-20T11:59:48.453Z"}, {"lat": "44.132226", "lng": "9.690597", "elevation": "128.8000030517578", "time": "2013-09-20T11:59:49.327Z"}, {"lat": "44.132231", "lng": "9.690711", "elevation": "127.19999694824219", "time": "2013-09-20T11:59:56.311Z"}, {"lat": "44.132231", "lng": "9.690723", "elevation": "125.9000015258789", "time": "2013-09-20T11:59:57.255Z"}, {"lat": "44.13221", "lng": "9.690783", "elevation": "129.0", "time": "2013-09-20T12:00:11.240Z"}, {"lat": "44.132213", "lng": "9.690787", "elevation": "129.0", "time": "2013-09-20T12:00:12.304Z"}, {"lat": "44.132218", "lng": "9.690793", "elevation": "128.60000610351563", "time": "2013-09-20T12:00:13.262Z"}, {"lat": "44.132238", "lng": "9.690817", "elevation": "128.10000610351563", "time": "2013-09-20T12:00:20.231Z"}, {"lat": "44.132239", "lng": "9.690817", "elevation": "128.1999969482422", "time": "2013-09-20T12:00:21.233Z"}, {"lat": "44.132235", "lng": "9.690816", "elevation": "128.1999969482422", "time": "2013-09-20T12:00:31.234Z"}, {"lat": "44.132228", "lng": "9.690816", "elevation": "128.5", "time": "2013-09-20T12:00:32.233Z"}, {"lat": "44.132147", "lng": "9.690857", "elevation": "129.8000030517578", "time": "2013-09-20T12:00:38.262Z"}, {"lat": "44.132133", "lng": "9.690872", "elevation": "130.5", "time": "2013-09-20T12:00:39.241Z"}, {"lat": "44.132094", "lng": "9.690973", "elevation": "131.10000610351563", "time": "2013-09-20T12:00:44.244Z"}, {"lat": "44.132088", "lng": "9.690988", "elevation": "131.3000030517578", "time": "2013-09-20T12:00:45.234Z"}, {"lat": "44.132052", "lng": "9.691091", "elevation": "130.8000030517578", "time": "2013-09-20T12:00:55.233Z"}, {"lat": "44.132049", "lng": "9.691105", "elevation": "131.60000610351563", "time": "2013-09-20T12:00:56.232Z"}, {"lat": "44.132004", "lng": "9.691212", "elevation": "131.39999389648438", "time": "2013-09-20T12:01:03.239Z"}, {"lat": "44.131997", "lng": "9.691229", "elevation": "131.3000030517578", "time": "2013-09-20T12:01:04.244Z"}, {"lat": "44.13198", "lng": "9.69126", "elevation": "131.0", "time": "2013-09-20T12:01:06.256Z"}, {"lat": "44.131924", "lng": "9.691412", "elevation": "132.6999969482422", "time": "2013-09-20T12:01:16.223Z"}, {"lat": "44.131908", "lng": "9.691519", "elevation": "131.89999389648438", "time": "2013-09-20T12:01:22.282Z"}, {"lat": "44.131905", "lng": "9.691535", "elevation": "131.60000610351563", "time": "2013-09-20T12:01:23.256Z"}, {"lat": "44.131852", "lng": "9.691635", "elevation": "133.10000610351563", "time": "2013-09-20T12:01:32.270Z"}, {"lat": "44.131838", "lng": "9.691635", "elevation": "133.8000030517578", "time": "2013-09-20T12:01:33.237Z"}, {"lat": "44.131776", "lng": "9.691718", "elevation": "134.10000610351563", "time": "2013-09-20T12:01:42.268Z"}, {"lat": "44.131766", "lng": "9.691726", "elevation": "134.0", "time": "2013-09-20T12:01:43.254Z"}, {"lat": "44.131685", "lng": "9.691775", "elevation": "133.39999389648438", "time": "2013-09-20T12:01:50.249Z"}, {"lat": "44.131671", "lng": "9.691779", "elevation": "132.60000610351563", "time": "2013-09-20T12:01:51.242Z"}, {"lat": "44.131625", "lng": "9.691876", "elevation": "129.89999389648438", "time": "2013-09-20T12:01:59.401Z"}, {"lat": "44.13162", "lng": "9.691888", "elevation": "130.5", "time": "2013-09-20T12:02:00.452Z"}, {"lat": "44.13156", "lng": "9.691973", "elevation": "133.1999969482422", "time": "2013-09-20T12:02:09.242Z"}, {"lat": "44.131555", "lng": "9.691984", "elevation": "133.39999389648438", "time": "2013-09-20T12:02:10.252Z"}, {"lat": "44.13151", "lng": "9.692083", "elevation": "133.6999969482422", "time": "2013-09-20T12:02:19.252Z"}, {"lat": "44.131508", "lng": "9.692097", "elevation": "133.8000030517578", "time": "2013-09-20T12:02:20.245Z"}, {"lat": "44.13145", "lng": "9.692182", "elevation": "134.3000030517578", "time": "2013-09-20T12:02:29.238Z"}, {"lat": "44.131441", "lng": "9.692189", "elevation": "134.39999389648438", "time": "2013-09-20T12:02:30.245Z"}, {"lat": "44.131361", "lng": "9.692245", "elevation": "140.89999389648438", "time": "2013-09-20T12:02:40.358Z"}, {"lat": "44.131355", "lng": "9.69225", "elevation": "140.6999969482422", "time": "2013-09-20T12:02:41.279Z"}, {"lat": "44.131277", "lng": "9.692304", "elevation": "144.1999969482422", "time": "2013-09-20T12:02:53.277Z"}, {"lat": "44.131271", "lng": "9.692311", "elevation": "143.89999389648438", "time": "2013-09-20T12:02:54.368Z"}, {"lat": "44.131207", "lng": "9.692396", "elevation": "149.89999389648438", "time": "2013-09-20T12:03:07.248Z"}, {"lat": "44.131205", "lng": "9.692406", "elevation": "149.60000610351563", "time": "2013-09-20T12:03:08.265Z"}, {"lat": "44.1312", "lng": "9.692455", "elevation": "149.8000030517578", "time": "2013-09-20T12:03:15.265Z"}, {"lat": "44.131202", "lng": "9.692456", "elevation": "149.60000610351563", "time": "2013-09-20T12:03:16.256Z"}, {"lat": "44.131204", "lng": "9.692461", "elevation": "149.5", "time": "2013-09-20T12:03:19.361Z"}, {"lat": "44.131203", "lng": "9.692466", "elevation": "149.6999969482422", "time": "2013-09-20T12:03:20.312Z"}, {"lat": "44.131145", "lng": "9.692559", "elevation": "153.0", "time": "2013-09-20T12:03:32.242Z"}, {"lat": "44.131137", "lng": "9.692568", "elevation": "152.8000030517578", "time": "2013-09-20T12:03:33.275Z"}, {"lat": "44.131071", "lng": "9.692643", "elevation": "153.89999389648438", "time": "2013-09-20T12:03:45.243Z"}, {"lat": "44.131065", "lng": "9.692646", "elevation": "154.8000030517578", "time": "2013-09-20T12:03:46.251Z"}, {"lat": "44.131004", "lng": "9.692735", "elevation": "162.6999969482422", "time": "2013-09-20T12:04:00.249Z"}, {"lat": "44.130998", "lng": "9.692735", "elevation": "161.89999389648438", "time": "2013-09-20T12:04:01.252Z"}, {"lat": "44.130974", "lng": "9.69277", "elevation": "162.8000030517578", "time": "2013-09-20T12:04:10.244Z"}, {"lat": "44.130975", "lng": "9.692769", "elevation": "163.6999969482422", "time": "2013-09-20T12:04:11.252Z"}, {"lat": "44.13096", "lng": "9.692758", "elevation": "165.60000610351563", "time": "2013-09-20T12:05:04.248Z"}, {"lat": "44.130953", "lng": "9.692763", "elevation": "165.1999969482422", "time": "2013-09-20T12:05:05.256Z"}, {"lat": "44.130945", "lng": "9.692876", "elevation": "160.10000610351563", "time": "2013-09-20T12:05:14.265Z"}, {"lat": "44.130943", "lng": "9.692887", "elevation": "160.5", "time": "2013-09-20T12:05:15.256Z"}, {"lat": "44.130979", "lng": "9.692999", "elevation": "169.10000610351563", "time": "2013-09-20T12:05:39.270Z"}, {"lat": "44.130976", "lng": "9.693003", "elevation": "169.89999389648438", "time": "2013-09-20T12:05:40.264Z"}, {"lat": "44.130921", "lng": "9.693018", "elevation": "171.39999389648438", "time": "2013-09-20T12:05:50.347Z"}, {"lat": "44.13092", "lng": "9.693017", "elevation": "172.3000030517578", "time": "2013-09-20T12:05:51.355Z"}, {"lat": "44.130914", "lng": "9.693011", "elevation": "172.89999389648438", "time": "2013-09-20T12:06:20.277Z"}, {"lat": "44.130908", "lng": "9.693012", "elevation": "173.89999389648438", "time": "2013-09-20T12:06:21.281Z"}, {"lat": "44.130823", "lng": "9.693026", "elevation": "172.5", "time": "2013-09-20T12:06:28.273Z"}, {"lat": "44.13081", "lng": "9.693039", "elevation": "170.3000030517578", "time": "2013-09-20T12:06:29.270Z"}, {"lat": "44.130792", "lng": "9.693152", "elevation": "166.39999389648438", "time": "2013-09-20T12:06:33.302Z"}, {"lat": "44.130789", "lng": "9.693182", "elevation": "165.89999389648438", "time": "2013-09-20T12:06:34.265Z"}, {"lat": "44.130722", "lng": "9.693263", "elevation": "166.6999969482422", "time": "2013-09-20T12:06:42.283Z"}, {"lat": "44.130721", "lng": "9.69327", "elevation": "166.8000030517578", "time": "2013-09-20T12:06:43.292Z"}, {"lat": "44.130718", "lng": "9.69328", "elevation": "167.5", "time": "2013-09-20T12:06:48.361Z"}, {"lat": "44.130717", "lng": "9.693279", "elevation": "167.39999389648438", "time": "2013-09-20T12:06:49.323Z"}, {"lat": "44.130711", "lng": "9.693278", "elevation": "168.39999389648438", "time": "2013-09-20T12:06:52.273Z"}, {"lat": "44.130706", "lng": "9.693278", "elevation": "168.8000030517578", "time": "2013-09-20T12:06:53.377Z"}, {"lat": "44.130619", "lng": "9.69328", "elevation": "174.5", "time": "2013-09-20T12:07:06.282Z"}, {"lat": "44.130612", "lng": "9.693275", "elevation": "174.6999969482422", "time": "2013-09-20T12:07:07.273Z"}, {"lat": "44.130602", "lng": "9.693267", "elevation": "174.89999389648438", "time": "2013-09-20T12:07:12.271Z"}, {"lat": "44.130603", "lng": "9.693267", "elevation": "174.89999389648438", "time": "2013-09-20T12:07:13.263Z"}, {"lat": "44.130599", "lng": "9.693273", "elevation": "178.1999969482422", "time": "2013-09-20T12:07:58.269Z"}, {"lat": "44.130594", "lng": "9.693271", "elevation": "179.5", "time": "2013-09-20T12:07:59.267Z"}, {"lat": "44.130574", "lng": "9.693262", "elevation": "180.1999969482422", "time": "2013-09-20T12:08:06.271Z"}, {"lat": "44.130573", "lng": "9.693263", "elevation": "180.3000030517578", "time": "2013-09-20T12:08:07.271Z"}, {"lat": "44.130558", "lng": "9.693261", "elevation": "180.5", "time": "2013-09-20T12:09:44.286Z"}, {"lat": "44.130556", "lng": "9.69326", "elevation": "180.8000030517578", "time": "2013-09-20T12:09:45.282Z"}, {"lat": "44.13054", "lng": "9.693267", "elevation": "180.5", "time": "2013-09-20T12:09:51.288Z"}, {"lat": "44.130539", "lng": "9.693268", "elevation": "180.60000610351563", "time": "2013-09-20T12:09:52.279Z"}, {"lat": "44.130536", "lng": "9.693273", "elevation": "180.89999389648438", "time": "2013-09-20T12:10:40.324Z"}, {"lat": "44.130534", "lng": "9.693277", "elevation": "181.0", "time": "2013-09-20T12:10:41.273Z"}, {"lat": "44.130497", "lng": "9.693262", "elevation": "184.0", "time": "2013-09-20T12:10:49.271Z"}, {"lat": "44.130496", "lng": "9.693261", "elevation": "184.0", "time": "2013-09-20T12:10:50.323Z"}, {"lat": "44.130496", "lng": "9.693252", "elevation": "186.10000610351563", "time": "2013-09-20T12:11:13.302Z"}, {"lat": "44.130495", "lng": "9.693244", "elevation": "185.6999969482422", "time": "2013-09-20T12:11:14.285Z"}, {"lat": "44.13048", "lng": "9.693198", "elevation": "189.6999969482422", "time": "2013-09-20T12:11:24.287Z"}, {"lat": "44.13048", "lng": "9.693199", "elevation": "189.1999969482422", "time": "2013-09-20T12:11:25.286Z"}, {"lat": "44.130479", "lng": "9.693214", "elevation": "192.39999389648438", "time": "2013-09-20T12:11:39.289Z"}, {"lat": "44.130476", "lng": "9.693218", "elevation": "190.6999969482422", "time": "2013-09-20T12:11:40.286Z"}, {"lat": "44.130508", "lng": "9.693334", "elevation": "197.5", "time": "2013-09-20T12:11:52.324Z"}, {"lat": "44.130514", "lng": "9.693345", "elevation": "197.1999969482422", "time": "2013-09-20T12:11:53.332Z"}, {"lat": "44.130525", "lng": "9.693463", "elevation": "196.10000610351563", "time": "2013-09-20T12:12:04.317Z"}, {"lat": "44.130519", "lng": "9.693474", "elevation": "196.60000610351563", "time": "2013-09-20T12:12:05.373Z"}, {"lat": "44.13049", "lng": "9.693587", "elevation": "198.6999969482422", "time": "2013-09-20T12:12:19.306Z"}, {"lat": "44.13049", "lng": "9.693596", "elevation": "199.3000030517578", "time": "2013-09-20T12:12:20.297Z"}, {"lat": "44.130512", "lng": "9.693715", "elevation": "200.0", "time": "2013-09-20T12:12:34.299Z"}, {"lat": "44.130511", "lng": "9.693722", "elevation": "200.0", "time": "2013-09-20T12:12:35.307Z"}, {"lat": "44.130487", "lng": "9.693839", "elevation": "203.6999969482422", "time": "2013-09-20T12:12:51.308Z"}, {"lat": "44.130481", "lng": "9.693851", "elevation": "204.60000610351563", "time": "2013-09-20T12:12:52.298Z"}, {"lat": "44.130447", "lng": "9.693964", "elevation": "207.5", "time": "2013-09-20T12:13:03.396Z"}, {"lat": "44.130444", "lng": "9.693975", "elevation": "208.3000030517578", "time": "2013-09-20T12:13:04.382Z"}, {"lat": "44.130406", "lng": "9.69408", "elevation": "210.10000610351563", "time": "2013-09-20T12:13:12.317Z"}, {"lat": "44.130399", "lng": "9.694092", "elevation": "210.1999969482422", "time": "2013-09-20T12:13:13.334Z"}, {"lat": "44.130349", "lng": "9.694189", "elevation": "213.1999969482422", "time": "2013-09-20T12:13:22.314Z"}, {"lat": "44.130347", "lng": "9.694202", "elevation": "213.6999969482422", "time": "2013-09-20T12:13:23.311Z"}, {"lat": "44.130305", "lng": "9.6943", "elevation": "217.39999389648438", "time": "2013-09-20T12:13:33.398Z"}, {"lat": "44.130299", "lng": "9.694309", "elevation": "217.1999969482422", "time": "2013-09-20T12:13:34.295Z"}, {"lat": "44.13023", "lng": "9.694378", "elevation": "217.8000030517578", "time": "2013-09-20T12:13:42.425Z"}, {"lat": "44.130222", "lng": "9.694384", "elevation": "216.3000030517578", "time": "2013-09-20T12:13:43.388Z"}, {"lat": "44.130217", "lng": "9.694383", "elevation": "217.60000610351563", "time": "2013-09-20T12:13:47.297Z"}, {"lat": "44.130218", "lng": "9.694382", "elevation": "217.89999389648438", "time": "2013-09-20T12:13:48.305Z"}, {"lat": "44.130224", "lng": "9.694398", "elevation": "218.6999969482422", "time": "2013-09-20T12:14:10.330Z"}, {"lat": "44.13022", "lng": "9.694404", "elevation": "219.8000030517578", "time": "2013-09-20T12:14:11.311Z"}, {"lat": "44.130142", "lng": "9.694452", "elevation": "222.10000610351563", "time": "2013-09-20T12:14:17.301Z"}, {"lat": "44.130127", "lng": "9.694465", "elevation": "223.0", "time": "2013-09-20T12:14:18.305Z"}, {"lat": "44.130056", "lng": "9.694534", "elevation": "228.10000610351563", "time": "2013-09-20T12:14:23.410Z"}, {"lat": "44.130044", "lng": "9.694544", "elevation": "229.39999389648438", "time": "2013-09-20T12:14:24.362Z"}, {"lat": "44.130043", "lng": "9.694603", "elevation": "229.6999969482422", "time": "2013-09-20T12:14:34.310Z"}, {"lat": "44.130043", "lng": "9.694603", "elevation": "229.8000030517578", "time": "2013-09-20T12:14:35.301Z"}, {"lat": "44.13004", "lng": "9.694613", "elevation": "231.89999389648438", "time": "2013-09-20T12:14:48.355Z"}, {"lat": "44.130038", "lng": "9.694621", "elevation": "233.10000610351563", "time": "2013-09-20T12:14:49.341Z"}, {"lat": "44.13003", "lng": "9.69474", "elevation": "231.3000030517578", "time": "2013-09-20T12:14:56.306Z"}, {"lat": "44.130032", "lng": "9.694756", "elevation": "231.5", "time": "2013-09-20T12:14:57.298Z"}, {"lat": "44.130048", "lng": "9.694868", "elevation": "234.60000610351563", "time": "2013-09-20T12:15:09.300Z"}, {"lat": "44.13005", "lng": "9.694878", "elevation": "234.5", "time": "2013-09-20T12:15:10.323Z"}, {"lat": "44.130062", "lng": "9.695001", "elevation": "240.39999389648438", "time": "2013-09-20T12:15:24.409Z"}, {"lat": "44.130061", "lng": "9.695013", "elevation": "239.60000610351563", "time": "2013-09-20T12:15:25.381Z"}, {"lat": "44.130046", "lng": "9.695119", "elevation": "242.5", "time": "2013-09-20T12:15:32.423Z"}, {"lat": "44.130044", "lng": "9.695139", "elevation": "242.1999969482422", "time": "2013-09-20T12:15:33.383Z"}, {"lat": "44.130013", "lng": "9.695249", "elevation": "244.10000610351563", "time": "2013-09-20T12:15:44.327Z"}, {"lat": "44.130008", "lng": "9.69526", "elevation": "243.39999389648438", "time": "2013-09-20T12:15:45.378Z"}, {"lat": "44.129972", "lng": "9.695373", "elevation": "240.89999389648438", "time": "2013-09-20T12:15:53.316Z"}, {"lat": "44.129971", "lng": "9.695387", "elevation": "241.10000610351563", "time": "2013-09-20T12:15:54.306Z"}, {"lat": "44.129946", "lng": "9.695495", "elevation": "239.5", "time": "2013-09-20T12:16:00.317Z"}, {"lat": "44.129944", "lng": "9.695514", "elevation": "239.89999389648438", "time": "2013-09-20T12:16:01.319Z"}, {"lat": "44.129932", "lng": "9.695626", "elevation": "241.89999389648438", "time": "2013-09-20T12:16:08.311Z"}, {"lat": "44.129931", "lng": "9.695641", "elevation": "241.1999969482422", "time": "2013-09-20T12:16:09.307Z"}, {"lat": "44.129948", "lng": "9.695759", "elevation": "239.89999389648438", "time": "2013-09-20T12:16:18.411Z"}, {"lat": "44.129943", "lng": "9.69577", "elevation": "239.60000610351563", "time": "2013-09-20T12:16:19.441Z"}, {"lat": "44.129886", "lng": "9.695858", "elevation": "240.60000610351563", "time": "2013-09-20T12:16:27.455Z"}, {"lat": "44.129879", "lng": "9.695862", "elevation": "240.6999969482422", "time": "2013-09-20T12:16:28.430Z"}, {"lat": "44.129859", "lng": "9.69586", "elevation": "241.3000030517578", "time": "2013-09-20T12:16:34.437Z"}, {"lat": "44.129859", "lng": "9.695862", "elevation": "241.10000610351563", "time": "2013-09-20T12:16:35.468Z"}, {"lat": "44.129857", "lng": "9.695866", "elevation": "240.8000030517578", "time": "2013-09-20T12:16:37.404Z"}, {"lat": "44.129856", "lng": "9.695873", "elevation": "241.10000610351563", "time": "2013-09-20T12:16:38.370Z"}, {"lat": "44.12983", "lng": "9.695987", "elevation": "241.10000610351563", "time": "2013-09-20T12:16:47.307Z"}, {"lat": "44.129824", "lng": "9.696002", "elevation": "240.60000610351563", "time": "2013-09-20T12:16:48.301Z"}, {"lat": "44.129766", "lng": "9.696096", "elevation": "240.89999389648438", "time": "2013-09-20T12:16:56.316Z"}, {"lat": "44.129759", "lng": "9.696104", "elevation": "241.3000030517578", "time": "2013-09-20T12:16:57.311Z"}, {"lat": "44.129704", "lng": "9.696183", "elevation": "244.5", "time": "2013-09-20T12:17:06.415Z"}, {"lat": "44.129696", "lng": "9.696194", "elevation": "245.3000030517578", "time": "2013-09-20T12:17:07.464Z"}, {"lat": "44.129652", "lng": "9.6963", "elevation": "244.3000030517578", "time": "2013-09-20T12:17:14.400Z"}, {"lat": "44.129646", "lng": "9.696318", "elevation": "244.10000610351563", "time": "2013-09-20T12:17:15.472Z"}, {"lat": "44.129623", "lng": "9.696427", "elevation": "242.89999389648438", "time": "2013-09-20T12:17:22.314Z"}, {"lat": "44.12962", "lng": "9.696438", "elevation": "242.6999969482422", "time": "2013-09-20T12:17:23.344Z"}, {"lat": "44.129613", "lng": "9.696561", "elevation": "243.0", "time": "2013-09-20T12:17:33.319Z"}, {"lat": "44.129611", "lng": "9.696573", "elevation": "241.6999969482422", "time": "2013-09-20T12:17:34.316Z"}, {"lat": "44.129587", "lng": "9.696684", "elevation": "239.3000030517578", "time": "2013-09-20T12:17:42.359Z"}, {"lat": "44.129582", "lng": "9.696701", "elevation": "241.8000030517578", "time": "2013-09-20T12:17:43.346Z"}, {"lat": "44.129531", "lng": "9.696803", "elevation": "243.0", "time": "2013-09-20T12:17:49.396Z"}, {"lat": "44.129522", "lng": "9.696815", "elevation": "242.8000030517578", "time": "2013-09-20T12:17:50.363Z"}, {"lat": "44.12949", "lng": "9.696912", "elevation": "238.10000610351563", "time": "2013-09-20T12:17:57.345Z"}, {"lat": "44.129493", "lng": "9.696939", "elevation": "238.8000030517578", "time": "2013-09-20T12:17:58.320Z"}, {"lat": "44.129491", "lng": "9.697058", "elevation": "238.60000610351563", "time": "2013-09-20T12:18:03.318Z"}, {"lat": "44.129485", "lng": "9.697074", "elevation": "238.5", "time": "2013-09-20T12:18:04.317Z"}, {"lat": "44.129466", "lng": "9.697191", "elevation": "237.89999389648438", "time": "2013-09-20T12:18:15.317Z"}, {"lat": "44.129465", "lng": "9.697197", "elevation": "237.8000030517578", "time": "2013-09-20T12:18:16.318Z"}, {"lat": "44.129422", "lng": "9.697305", "elevation": "241.5", "time": "2013-09-20T12:18:24.319Z"}, {"lat": "44.129417", "lng": "9.697319", "elevation": "242.0", "time": "2013-09-20T12:18:25.318Z"}, {"lat": "44.129413", "lng": "9.697439", "elevation": "241.39999389648438", "time": "2013-09-20T12:18:34.320Z"}, {"lat": "44.129413", "lng": "9.697456", "elevation": "240.5", "time": "2013-09-20T12:18:35.318Z"}, {"lat": "44.129429", "lng": "9.697569", "elevation": "241.5", "time": "2013-09-20T12:18:43.485Z"}, {"lat": "44.12943", "lng": "9.697582", "elevation": "241.6999969482422", "time": "2013-09-20T12:18:44.328Z"}, {"lat": "44.129449", "lng": "9.697693", "elevation": "246.1999969482422", "time": "2013-09-20T12:18:51.343Z"}, {"lat": "44.129453", "lng": "9.697706", "elevation": "246.5", "time": "2013-09-20T12:18:52.324Z"}, {"lat": "44.129456", "lng": "9.697718", "elevation": "245.39999389648438", "time": "2013-09-20T12:18:56.432Z"}, {"lat": "44.129455", "lng": "9.697716", "elevation": "246.0", "time": "2013-09-20T12:18:57.403Z"}, {"lat": "44.129455", "lng": "9.697715", "elevation": "244.89999389648438", "time": "2013-09-20T12:19:34.330Z"}, {"lat": "44.12946", "lng": "9.697717", "elevation": "245.1999969482422", "time": "2013-09-20T12:19:35.323Z"}, {"lat": "44.129524", "lng": "9.697802", "elevation": "247.0", "time": "2013-09-20T12:19:49.325Z"}, {"lat": "44.129527", "lng": "9.697805", "elevation": "246.8000030517578", "time": "2013-09-20T12:19:50.325Z"}, {"lat": "44.129549", "lng": "9.697924", "elevation": "242.3000030517578", "time": "2013-09-20T12:19:58.338Z"}, {"lat": "44.129552", "lng": "9.697946", "elevation": "242.89999389648438", "time": "2013-09-20T12:19:59.326Z"}, {"lat": "44.129515", "lng": "9.698055", "elevation": "246.89999389648438", "time": "2013-09-20T12:20:06.398Z"}, {"lat": "44.129511", "lng": "9.698068", "elevation": "246.1999969482422", "time": "2013-09-20T12:20:07.425Z"}, {"lat": "44.129494", "lng": "9.698177", "elevation": "246.8000030517578", "time": "2013-09-20T12:20:14.370Z"}, {"lat": "44.12949", "lng": "9.698193", "elevation": "247.10000610351563", "time": "2013-09-20T12:20:15.431Z"}, {"lat": "44.129447", "lng": "9.698291", "elevation": "247.60000610351563", "time": "2013-09-20T12:20:22.367Z"}, {"lat": "44.129441", "lng": "9.698306", "elevation": "247.10000610351563", "time": "2013-09-20T12:20:23.420Z"}, {"lat": "44.12944", "lng": "9.698421", "elevation": "246.39999389648438", "time": "2013-09-20T12:20:32.440Z"}, {"lat": "44.129439", "lng": "9.698433", "elevation": "246.1999969482422", "time": "2013-09-20T12:20:33.453Z"}, {"lat": "44.129409", "lng": "9.698538", "elevation": "245.8000030517578", "time": "2013-09-20T12:20:40.449Z"}, {"lat": "44.129406", "lng": "9.698551", "elevation": "245.5", "time": "2013-09-20T12:20:41.411Z"}, {"lat": "44.129428", "lng": "9.698656", "elevation": "243.8000030517578", "time": "2013-09-20T12:21:03.330Z"}, {"lat": "44.129424", "lng": "9.698658", "elevation": "244.60000610351563", "time": "2013-09-20T12:21:04.335Z"}, {"lat": "44.129419", "lng": "9.698661", "elevation": "244.6999969482422", "time": "2013-09-20T12:21:05.334Z"}, {"lat": "44.129416", "lng": "9.698663", "elevation": "244.60000610351563", "time": "2013-09-20T12:21:06.334Z"}, {"lat": "44.129411", "lng": "9.698665", "elevation": "244.60000610351563", "time": "2013-09-20T12:21:08.368Z"}, {"lat": "44.12941", "lng": "9.698666", "elevation": "244.60000610351563", "time": "2013-09-20T12:21:09.331Z"}, {"lat": "44.129423", "lng": "9.698705", "elevation": "242.5", "time": "2013-09-20T12:21:36.334Z"}, {"lat": "44.129429", "lng": "9.698716", "elevation": "244.60000610351563", "time": "2013-09-20T12:21:37.334Z"}, {"lat": "44.12947", "lng": "9.698803", "elevation": "247.8000030517578", "time": "2013-09-20T12:21:41.350Z"}, {"lat": "44.129479", "lng": "9.698838", "elevation": "250.10000610351563", "time": "2013-09-20T12:21:42.377Z"}, {"lat": "44.129478", "lng": "9.698962", "elevation": "255.1999969482422", "time": "2013-09-20T12:21:47.462Z"}, {"lat": "44.129475", "lng": "9.698981", "elevation": "255.0", "time": "2013-09-20T12:21:48.471Z"}, {"lat": "44.129489", "lng": "9.6991", "elevation": "257.5", "time": "2013-09-20T12:21:55.461Z"}, {"lat": "44.129487", "lng": "9.699113", "elevation": "258.70001220703125", "time": "2013-09-20T12:21:56.350Z"}, {"lat": "44.129481", "lng": "9.699237", "elevation": "261.79998779296875", "time": "2013-09-20T12:22:06.390Z"}, {"lat": "44.129483", "lng": "9.699249", "elevation": "262.1000061035156", "time": "2013-09-20T12:22:07.378Z"}, {"lat": "44.129483", "lng": "9.69937", "elevation": "266.3999938964844", "time": "2013-09-20T12:22:16.346Z"}, {"lat": "44.129483", "lng": "9.699384", "elevation": "266.0", "time": "2013-09-20T12:22:17.341Z"}, {"lat": "44.129476", "lng": "9.699499", "elevation": "265.20001220703125", "time": "2013-09-20T12:22:26.354Z"}, {"lat": "44.129476", "lng": "9.699511", "elevation": "265.20001220703125", "time": "2013-09-20T12:22:27.362Z"}, {"lat": "44.129482", "lng": "9.699628", "elevation": "266.5", "time": "2013-09-20T12:22:35.343Z"}, {"lat": "44.129483", "lng": "9.699644", "elevation": "266.3999938964844", "time": "2013-09-20T12:22:36.344Z"}, {"lat": "44.129467", "lng": "9.69976", "elevation": "267.5", "time": "2013-09-20T12:22:49.347Z"}, {"lat": "44.129468", "lng": "9.699768", "elevation": "267.3999938964844", "time": "2013-09-20T12:22:50.393Z"}, {"lat": "44.129434", "lng": "9.699871", "elevation": "272.70001220703125", "time": "2013-09-20T12:23:01.424Z"}, {"lat": "44.129423", "lng": "9.699888", "elevation": "272.5", "time": "2013-09-20T12:23:02.388Z"}, {"lat": "44.129365", "lng": "9.699975", "elevation": "271.79998779296875", "time": "2013-09-20T12:23:08.350Z"}, {"lat": "44.12936", "lng": "9.699988", "elevation": "271.29998779296875", "time": "2013-09-20T12:23:09.347Z"}, {"lat": "44.12933", "lng": "9.700052", "elevation": "271.79998779296875", "time": "2013-09-20T12:23:20.350Z"}, {"lat": "44.12933", "lng": "9.700053", "elevation": "271.5", "time": "2013-09-20T12:23:21.346Z"}, {"lat": "44.129329", "lng": "9.700055", "elevation": "271.5", "time": "2013-09-20T12:23:22.414Z"}, {"lat": "44.129327", "lng": "9.700057", "elevation": "270.6000061035156", "time": "2013-09-20T12:23:23.346Z"}, {"lat": "44.129278", "lng": "9.700151", "elevation": "268.0", "time": "2013-09-20T12:23:32.453Z"}, {"lat": "44.129272", "lng": "9.70017", "elevation": "268.1000061035156", "time": "2013-09-20T12:23:33.429Z"}, {"lat": "44.129243", "lng": "9.700282", "elevation": "267.20001220703125", "time": "2013-09-20T12:23:39.480Z"}, {"lat": "44.129236", "lng": "9.700293", "elevation": "267.5", "time": "2013-09-20T12:23:40.440Z"}, {"lat": "44.129218", "lng": "9.700301", "elevation": "267.1000061035156", "time": "2013-09-20T12:23:46.423Z"}, {"lat": "44.129219", "lng": "9.700299", "elevation": "267.1000061035156", "time": "2013-09-20T12:23:47.492Z"}, {"lat": "44.129224", "lng": "9.700306", "elevation": "267.0", "time": "2013-09-20T12:23:51.366Z"}, {"lat": "44.129224", "lng": "9.700313", "elevation": "268.1000061035156", "time": "2013-09-20T12:23:52.360Z"}, {"lat": "44.129148", "lng": "9.70038", "elevation": "271.8999938964844", "time": "2013-09-20T12:24:00.359Z"}, {"lat": "44.129135", "lng": "9.700388", "elevation": "271.8999938964844", "time": "2013-09-20T12:24:01.357Z"}, {"lat": "44.129087", "lng": "9.700477", "elevation": "271.1000061035156", "time": "2013-09-20T12:24:08.351Z"}, {"lat": "44.12908", "lng": "9.700491", "elevation": "270.29998779296875", "time": "2013-09-20T12:24:09.370Z"}, {"lat": "44.129045", "lng": "9.700595", "elevation": "265.5", "time": "2013-09-20T12:24:17.351Z"}, {"lat": "44.129041", "lng": "9.70061", "elevation": "265.70001220703125", "time": "2013-09-20T12:24:18.484Z"}, {"lat": "44.129019", "lng": "9.700718", "elevation": "265.3999938964844", "time": "2013-09-20T12:24:25.357Z"}, {"lat": "44.129018", "lng": "9.700733", "elevation": "265.0", "time": "2013-09-20T12:24:26.436Z"}, {"lat": "44.128987", "lng": "9.700839", "elevation": "261.3999938964844", "time": "2013-09-20T12:24:34.489Z"}, {"lat": "44.128987", "lng": "9.700854", "elevation": "259.6000061035156", "time": "2013-09-20T12:24:35.475Z"}, {"lat": "44.128987", "lng": "9.700972", "elevation": "257.20001220703125", "time": "2013-09-20T12:24:43.506Z"}, {"lat": "44.128989", "lng": "9.700981", "elevation": "256.29998779296875", "time": "2013-09-20T12:24:44.354Z"}, {"lat": "44.128958", "lng": "9.701041", "elevation": "256.20001220703125", "time": "2013-09-20T12:25:03.298Z"}, {"lat": "44.128956", "lng": "9.701041", "elevation": "256.5", "time": "2013-09-20T12:25:03.369Z"}, {"lat": "44.128952", "lng": "9.70104", "elevation": "256.1000061035156", "time": "2013-09-20T12:25:04.359Z"}, {"lat": "44.128947", "lng": "9.701038", "elevation": "256.0", "time": "2013-09-20T12:25:05.360Z"}, {"lat": "44.128921", "lng": "9.701043", "elevation": "256.5", "time": "2013-09-20T12:25:11.363Z"}, {"lat": "44.128922", "lng": "9.701045", "elevation": "256.3999938964844", "time": "2013-09-20T12:25:12.357Z"}, {"lat": "44.128919", "lng": "9.701067", "elevation": "257.70001220703125", "time": "2013-09-20T12:25:46.355Z"}, {"lat": "44.128915", "lng": "9.701071", "elevation": "257.3999938964844", "time": "2013-09-20T12:25:47.359Z"}, {"lat": "44.128904", "lng": "9.701189", "elevation": "244.39999389648438", "time": "2013-09-20T12:26:03.357Z"}, {"lat": "44.128906", "lng": "9.701205", "elevation": "245.39999389648438", "time": "2013-09-20T12:26:04.361Z"}, {"lat": "44.128893", "lng": "9.701294", "elevation": "245.1999969482422", "time": "2013-09-20T12:26:13.437Z"}, {"lat": "44.128893", "lng": "9.701293", "elevation": "244.1999969482422", "time": "2013-09-20T12:26:14.473Z"}, {"lat": "44.128885", "lng": "9.701297", "elevation": "245.1999969482422", "time": "2013-09-20T12:26:26.363Z"}, {"lat": "44.128886", "lng": "9.701302", "elevation": "245.10000610351563", "time": "2013-09-20T12:26:27.362Z"}, {"lat": "44.128906", "lng": "9.701423", "elevation": "246.10000610351563", "time": "2013-09-20T12:26:42.371Z"}, {"lat": "44.128906", "lng": "9.701446", "elevation": "246.6999969482422", "time": "2013-09-20T12:26:43.362Z"}, {"lat": "44.128899", "lng": "9.701556", "elevation": "247.10000610351563", "time": "2013-09-20T12:26:48.363Z"}, {"lat": "44.128897", "lng": "9.701573", "elevation": "247.0", "time": "2013-09-20T12:26:49.367Z"}, {"lat": "44.128871", "lng": "9.701631", "elevation": "246.5", "time": "2013-09-20T12:26:59.367Z"}, {"lat": "44.128872", "lng": "9.701631", "elevation": "246.5", "time": "2013-09-20T12:27:00.366Z"}, {"lat": "44.128875", "lng": "9.701643", "elevation": "244.5", "time": "2013-09-20T12:28:08.370Z"}, {"lat": "44.128877", "lng": "9.70165", "elevation": "244.39999389648438", "time": "2013-09-20T12:28:09.380Z"}, {"lat": "44.12887", "lng": "9.701716", "elevation": "246.39999389648438", "time": "2013-09-20T12:28:23.361Z"}, {"lat": "44.12887", "lng": "9.701716", "elevation": "246.39999389648438", "time": "2013-09-20T12:28:23.393Z"}, {"lat": "44.128873", "lng": "9.701713", "elevation": "246.10000610351563", "time": "2013-09-20T12:28:52.380Z"}, {"lat": "44.128876", "lng": "9.70172", "elevation": "245.5", "time": "2013-09-20T12:28:53.441Z"}, {"lat": "44.128935", "lng": "9.701809", "elevation": "245.5", "time": "2013-09-20T12:28:59.379Z"}, {"lat": "44.128945", "lng": "9.701817", "elevation": "245.1999969482422", "time": "2013-09-20T12:29:00.380Z"}, {"lat": "44.129022", "lng": "9.701861", "elevation": "239.5", "time": "2013-09-20T12:29:09.381Z"}, {"lat": "44.129029", "lng": "9.701876", "elevation": "239.6999969482422", "time": "2013-09-20T12:29:10.387Z"}, {"lat": "44.129091", "lng": "9.701959", "elevation": "237.6999969482422", "time": "2013-09-20T12:29:19.455Z"}, {"lat": "44.129097", "lng": "9.701968", "elevation": "238.1999969482422", "time": "2013-09-20T12:29:20.479Z"}, {"lat": "44.129162", "lng": "9.702031", "elevation": "237.6999969482422", "time": "2013-09-20T12:29:29.432Z"}, {"lat": "44.129172", "lng": "9.702037", "elevation": "238.3000030517578", "time": "2013-09-20T12:29:30.416Z"}, {"lat": "44.129235", "lng": "9.702101", "elevation": "239.0", "time": "2013-09-20T12:29:36.433Z"}, {"lat": "44.129245", "lng": "9.702115", "elevation": "239.10000610351563", "time": "2013-09-20T12:29:37.451Z"}, {"lat": "44.129271", "lng": "9.702144", "elevation": "237.0", "time": "2013-09-20T12:29:43.470Z"}, {"lat": "44.129271", "lng": "9.70214", "elevation": "236.6999969482422", "time": "2013-09-20T12:29:44.482Z"}, {"lat": "44.129273", "lng": "9.70215", "elevation": "238.3000030517578", "time": "2013-09-20T12:31:03.379Z"}, {"lat": "44.129277", "lng": "9.702157", "elevation": "238.60000610351563", "time": "2013-09-20T12:31:04.389Z"}, {"lat": "44.129349", "lng": "9.702223", "elevation": "241.5", "time": "2013-09-20T12:31:13.393Z"}, {"lat": "44.129357", "lng": "9.702229", "elevation": "242.0", "time": "2013-09-20T12:31:14.389Z"}, {"lat": "44.129421", "lng": "9.7023", "elevation": "239.39999389648438", "time": "2013-09-20T12:31:21.384Z"}, {"lat": "44.129429", "lng": "9.702318", "elevation": "239.3000030517578", "time": "2013-09-20T12:31:22.388Z"}, {"lat": "44.129476", "lng": "9.702409", "elevation": "239.60000610351563", "time": "2013-09-20T12:31:26.384Z"}, {"lat": "44.129483", "lng": "9.70242", "elevation": "239.60000610351563", "time": "2013-09-20T12:31:27.386Z"}, {"lat": "44.129499", "lng": "9.702465", "elevation": "240.1999969482422", "time": "2013-09-20T12:31:37.386Z"}, {"lat": "44.129499", "lng": "9.702466", "elevation": "240.1999969482422", "time": "2013-09-20T12:31:38.430Z"}, {"lat": "44.129499", "lng": "9.702472", "elevation": "240.10000610351563", "time": "2013-09-20T12:31:44.390Z"}, {"lat": "44.1295", "lng": "9.702479", "elevation": "239.89999389648438", "time": "2013-09-20T12:31:45.392Z"}, {"lat": "44.129526", "lng": "9.702587", "elevation": "241.39999389648438", "time": "2013-09-20T12:31:58.392Z"}, {"lat": "44.129521", "lng": "9.7026", "elevation": "242.39999389648438", "time": "2013-09-20T12:31:59.517Z"}, {"lat": "44.129451", "lng": "9.70267", "elevation": "240.3000030517578", "time": "2013-09-20T12:32:11.391Z"}, {"lat": "44.129454", "lng": "9.702671", "elevation": "240.3000030517578", "time": "2013-09-20T12:32:12.394Z"}, {"lat": "44.129455", "lng": "9.702676", "elevation": "240.1999969482422", "time": "2013-09-20T12:32:16.399Z"}, {"lat": "44.129451", "lng": "9.702682", "elevation": "240.6999969482422", "time": "2013-09-20T12:32:17.395Z"}, {"lat": "44.129404", "lng": "9.702783", "elevation": "236.1999969482422", "time": "2013-09-20T12:32:28.460Z"}, {"lat": "44.1294", "lng": "9.702801", "elevation": "236.0", "time": "2013-09-20T12:32:29.594Z"}, {"lat": "44.129382", "lng": "9.702908", "elevation": "232.8000030517578", "time": "2013-09-20T12:32:40.557Z"}, {"lat": "44.129379", "lng": "9.702926", "elevation": "232.5", "time": "2013-09-20T12:32:41.438Z"}, {"lat": "44.129306", "lng": "9.703", "elevation": "236.0", "time": "2013-09-20T12:32:50.393Z"}, {"lat": "44.129296", "lng": "9.703005", "elevation": "235.89999389648438", "time": "2013-09-20T12:32:51.415Z"}, {"lat": "44.129223", "lng": "9.703072", "elevation": "233.3000030517578", "time": "2013-09-20T12:33:03.393Z"}, {"lat": "44.12922", "lng": "9.703076", "elevation": "233.3000030517578", "time": "2013-09-20T12:33:04.400Z"}, {"lat": "44.129218", "lng": "9.703082", "elevation": "232.8000030517578", "time": "2013-09-20T12:33:06.397Z"}, {"lat": "44.129217", "lng": "9.703084", "elevation": "232.6999969482422", "time": "2013-09-20T12:33:07.402Z"}, {"lat": "44.129212", "lng": "9.703099", "elevation": "232.39999389648438", "time": "2013-09-20T12:33:16.395Z"}, {"lat": "44.129208", "lng": "9.703101", "elevation": "232.1999969482422", "time": "2013-09-20T12:33:17.395Z"}, {"lat": "44.129155", "lng": "9.703195", "elevation": "229.8000030517578", "time": "2013-09-20T12:33:33.559Z"}, {"lat": "44.12915", "lng": "9.703203", "elevation": "229.3000030517578", "time": "2013-09-20T12:33:34.403Z"}, {"lat": "44.129095", "lng": "9.703298", "elevation": "224.39999389648438", "time": "2013-09-20T12:33:51.438Z"}, {"lat": "44.129092", "lng": "9.703302", "elevation": "224.5", "time": "2013-09-20T12:33:52.443Z"}, {"lat": "44.129028", "lng": "9.703389", "elevation": "223.60000610351563", "time": "2013-09-20T12:34:06.408Z"}, {"lat": "44.129018", "lng": "9.703398", "elevation": "223.6999969482422", "time": "2013-09-20T12:34:07.557Z"}, {"lat": "44.128966", "lng": "9.703497", "elevation": "219.0", "time": "2013-09-20T12:34:16.567Z"}, {"lat": "44.128962", "lng": "9.703506", "elevation": "218.39999389648438", "time": "2013-09-20T12:34:17.597Z"}, {"lat": "44.128888", "lng": "9.703562", "elevation": "214.39999389648438", "time": "2013-09-20T12:34:30.522Z"}, {"lat": "44.128883", "lng": "9.703575", "elevation": "214.10000610351563", "time": "2013-09-20T12:34:31.407Z"}, {"lat": "44.12883", "lng": "9.703668", "elevation": "213.10000610351563", "time": "2013-09-20T12:34:45.391Z"}, {"lat": "44.128823", "lng": "9.703683", "elevation": "213.0", "time": "2013-09-20T12:34:46.401Z"}, {"lat": "44.12877", "lng": "9.703782", "elevation": "212.60000610351563", "time": "2013-09-20T12:34:53.404Z"}, {"lat": "44.128767", "lng": "9.703785", "elevation": "212.5", "time": "2013-09-20T12:34:54.406Z"}, {"lat": "44.128728", "lng": "9.703793", "elevation": "212.3000030517578", "time": "2013-09-20T12:35:06.404Z"}, {"lat": "44.128728", "lng": "9.703795", "elevation": "212.3000030517578", "time": "2013-09-20T12:35:07.401Z"}, {"lat": "44.128729", "lng": "9.703799", "elevation": "212.1999969482422", "time": "2013-09-20T12:35:09.405Z"}, {"lat": "44.128728", "lng": "9.703805", "elevation": "211.10000610351563", "time": "2013-09-20T12:35:10.419Z"}, {"lat": "44.128703", "lng": "9.703918", "elevation": "208.3000030517578", "time": "2013-09-20T12:35:16.403Z"}, {"lat": "44.128695", "lng": "9.703941", "elevation": "209.60000610351563", "time": "2013-09-20T12:35:17.401Z"}, {"lat": "44.128657", "lng": "9.704026", "elevation": "209.0", "time": "2013-09-20T12:35:21.408Z"}, {"lat": "44.12865", "lng": "9.704052", "elevation": "208.1999969482422", "time": "2013-09-20T12:35:22.403Z"}, {"lat": "44.128642", "lng": "9.704164", "elevation": "204.89999389648438", "time": "2013-09-20T12:35:26.403Z"}, {"lat": "44.128642", "lng": "9.704191", "elevation": "203.8000030517578", "time": "2013-09-20T12:35:27.403Z"}, {"lat": "44.128601", "lng": "9.704301", "elevation": "204.60000610351563", "time": "2013-09-20T12:35:34.404Z"}, {"lat": "44.128592", "lng": "9.704309", "elevation": "204.60000610351563", "time": "2013-09-20T12:35:35.403Z"}, {"lat": "44.128533", "lng": "9.70439", "elevation": "202.10000610351563", "time": "2013-09-20T12:35:44.407Z"}, {"lat": "44.128522", "lng": "9.704393", "elevation": "202.3000030517578", "time": "2013-09-20T12:35:45.405Z"}, {"lat": "44.128457", "lng": "9.704467", "elevation": "202.1999969482422", "time": "2013-09-20T12:35:53.407Z"}, {"lat": "44.128454", "lng": "9.704479", "elevation": "202.10000610351563", "time": "2013-09-20T12:35:54.411Z"}, {"lat": "44.128382", "lng": "9.704547", "elevation": "199.8000030517578", "time": "2013-09-20T12:36:08.418Z"}, {"lat": "44.128374", "lng": "9.704549", "elevation": "199.0", "time": "2013-09-20T12:36:09.422Z"}, {"lat": "44.128295", "lng": "9.704591", "elevation": "203.3000030517578", "time": "2013-09-20T12:36:21.456Z"}, {"lat": "44.128287", "lng": "9.704589", "elevation": "203.10000610351563", "time": "2013-09-20T12:36:22.404Z"}, {"lat": "44.128277", "lng": "9.704572", "elevation": "204.5", "time": "2013-09-20T12:36:27.458Z"}, {"lat": "44.12828", "lng": "9.704571", "elevation": "204.10000610351563", "time": "2013-09-20T12:36:28.415Z"}, {"lat": "44.128278", "lng": "9.704576", "elevation": "203.8000030517578", "time": "2013-09-20T12:36:48.450Z"}, {"lat": "44.128273", "lng": "9.704577", "elevation": "203.6999969482422", "time": "2013-09-20T12:36:49.413Z"}, {"lat": "44.128198", "lng": "9.704595", "elevation": "201.39999389648438", "time": "2013-09-20T12:36:53.502Z"}, {"lat": "44.128176", "lng": "9.704605", "elevation": "201.0", "time": "2013-09-20T12:36:54.428Z"}, {"lat": "44.128098", "lng": "9.704642", "elevation": "201.10000610351563", "time": "2013-09-20T12:36:58.439Z"}, {"lat": "44.128086", "lng": "9.704649", "elevation": "200.60000610351563", "time": "2013-09-20T12:36:59.433Z"}, {"lat": "44.128024", "lng": "9.704725", "elevation": "201.0", "time": "2013-09-20T12:37:07.421Z"}, {"lat": "44.128015", "lng": "9.704735", "elevation": "200.3000030517578", "time": "2013-09-20T12:37:08.410Z"}, {"lat": "44.127939", "lng": "9.704802", "elevation": "201.5", "time": "2013-09-20T12:37:16.415Z"}, {"lat": "44.127932", "lng": "9.704812", "elevation": "200.39999389648438", "time": "2013-09-20T12:37:17.413Z"}, {"lat": "44.127851", "lng": "9.704862", "elevation": "199.60000610351563", "time": "2013-09-20T12:37:25.411Z"}, {"lat": "44.127842", "lng": "9.704868", "elevation": "198.0", "time": "2013-09-20T12:37:26.412Z"}, {"lat": "44.127764", "lng": "9.704929", "elevation": "196.89999389648438", "time": "2013-09-20T12:37:35.437Z"}, {"lat": "44.127755", "lng": "9.704934", "elevation": "196.60000610351563", "time": "2013-09-20T12:37:36.412Z"}, {"lat": "44.127692", "lng": "9.70502", "elevation": "195.60000610351563", "time": "2013-09-20T12:37:50.413Z"}, {"lat": "44.127682", "lng": "9.705018", "elevation": "196.0", "time": "2013-09-20T12:37:51.418Z"}, {"lat": "44.12761", "lng": "9.705085", "elevation": "197.8000030517578", "time": "2013-09-20T12:38:00.457Z"}, {"lat": "44.127601", "lng": "9.705095", "elevation": "198.10000610351563", "time": "2013-09-20T12:38:01.416Z"}, {"lat": "44.127524", "lng": "9.70515", "elevation": "201.1999969482422", "time": "2013-09-20T12:38:08.421Z"}, {"lat": "44.127507", "lng": "9.705155", "elevation": "201.60000610351563", "time": "2013-09-20T12:38:09.423Z"}, {"lat": "44.127428", "lng": "9.705203", "elevation": "199.8000030517578", "time": "2013-09-20T12:38:16.418Z"}, {"lat": "44.127425", "lng": "9.705221", "elevation": "200.5", "time": "2013-09-20T12:38:17.427Z"}, {"lat": "44.127347", "lng": "9.705267", "elevation": "200.10000610351563", "time": "2013-09-20T12:38:26.413Z"}, {"lat": "44.127337", "lng": "9.705264", "elevation": "199.8000030517578", "time": "2013-09-20T12:38:27.419Z"}, {"lat": "44.127269", "lng": "9.705196", "elevation": "199.0", "time": "2013-09-20T12:38:35.418Z"}, {"lat": "44.12726", "lng": "9.705196", "elevation": "198.8000030517578", "time": "2013-09-20T12:38:36.417Z"}, {"lat": "44.127177", "lng": "9.705226", "elevation": "198.6999969482422", "time": "2013-09-20T12:38:44.433Z"}, {"lat": "44.127162", "lng": "9.70522", "elevation": "199.1999969482422", "time": "2013-09-20T12:38:45.429Z"}, {"lat": "44.127075", "lng": "9.705187", "elevation": "201.60000610351563", "time": "2013-09-20T12:38:54.421Z"}, {"lat": "44.127073", "lng": "9.705186", "elevation": "200.6999969482422", "time": "2013-09-20T12:38:55.425Z"}, {"lat": "44.127074", "lng": "9.705191", "elevation": "202.39999389648438", "time": "2013-09-20T12:38:57.451Z"}, {"lat": "44.127075", "lng": "9.705194", "elevation": "202.6999969482422", "time": "2013-09-20T12:38:58.448Z"}, {"lat": "44.127073", "lng": "9.705195", "elevation": "202.6999969482422", "time": "2013-09-20T12:38:59.424Z"}, {"lat": "44.127069", "lng": "9.705196", "elevation": "202.39999389648438", "time": "2013-09-20T12:39:00.447Z"}, {"lat": "44.126983", "lng": "9.705228", "elevation": "200.39999389648438", "time": "2013-09-20T12:39:07.436Z"}, {"lat": "44.126973", "lng": "9.705236", "elevation": "199.89999389648438", "time": "2013-09-20T12:39:08.452Z"}, {"lat": "44.126891", "lng": "9.705271", "elevation": "200.8000030517578", "time": "2013-09-20T12:39:16.420Z"}, {"lat": "44.12688", "lng": "9.705274", "elevation": "201.39999389648438", "time": "2013-09-20T12:39:17.426Z"}, {"lat": "44.126794", "lng": "9.705289", "elevation": "201.8000030517578", "time": "2013-09-20T12:39:25.422Z"}, {"lat": "44.126784", "lng": "9.705294", "elevation": "203.5", "time": "2013-09-20T12:39:26.435Z"}, {"lat": "44.126701", "lng": "9.705321", "elevation": "204.1999969482422", "time": "2013-09-20T12:39:34.434Z"}, {"lat": "44.126692", "lng": "9.705322", "elevation": "203.3000030517578", "time": "2013-09-20T12:39:35.415Z"}, {"lat": "44.126611", "lng": "9.705346", "elevation": "204.39999389648438", "time": "2013-09-20T12:39:47.423Z"}, {"lat": "44.1266", "lng": "9.705351", "elevation": "203.8000030517578", "time": "2013-09-20T12:39:48.421Z"}, {"lat": "44.12651", "lng": "9.705339", "elevation": "204.5", "time": "2013-09-20T12:39:56.426Z"}, {"lat": "44.126498", "lng": "9.705339", "elevation": "204.89999389648438", "time": "2013-09-20T12:39:57.423Z"}, {"lat": "44.126414", "lng": "9.705331", "elevation": "203.60000610351563", "time": "2013-09-20T12:40:06.428Z"}, {"lat": "44.126406", "lng": "9.705328", "elevation": "204.5", "time": "2013-09-20T12:40:07.434Z"}, {"lat": "44.126321", "lng": "9.705322", "elevation": "205.1999969482422", "time": "2013-09-20T12:40:16.431Z"}, {"lat": "44.126312", "lng": "9.705322", "elevation": "205.39999389648438", "time": "2013-09-20T12:40:17.426Z"}, {"lat": "44.126223", "lng": "9.705316", "elevation": "205.5", "time": "2013-09-20T12:40:28.427Z"}, {"lat": "44.126218", "lng": "9.705313", "elevation": "205.3000030517578", "time": "2013-09-20T12:40:29.427Z"}, {"lat": "44.126131", "lng": "9.705326", "elevation": "205.39999389648438", "time": "2013-09-20T12:40:40.431Z"}, {"lat": "44.126122", "lng": "9.705322", "elevation": "205.1999969482422", "time": "2013-09-20T12:40:41.428Z"}, {"lat": "44.126033", "lng": "9.705315", "elevation": "207.89999389648438", "time": "2013-09-20T12:40:53.425Z"}, {"lat": "44.126028", "lng": "9.705317", "elevation": "209.0", "time": "2013-09-20T12:40:54.425Z"}, {"lat": "44.125964", "lng": "9.705384", "elevation": "205.60000610351563", "time": "2013-09-20T12:41:05.431Z"}, {"lat": "44.125953", "lng": "9.70539", "elevation": "205.39999389648438", "time": "2013-09-20T12:41:06.430Z"}, {"lat": "44.125871", "lng": "9.705406", "elevation": "206.8000030517578", "time": "2013-09-20T12:41:13.431Z"}, {"lat": "44.125863", "lng": "9.705412", "elevation": "207.60000610351563", "time": "2013-09-20T12:41:14.431Z"}, {"lat": "44.12584", "lng": "9.705447", "elevation": "209.60000610351563", "time": "2013-09-20T12:41:22.458Z"}, {"lat": "44.125839", "lng": "9.705442", "elevation": "209.6999969482422", "time": "2013-09-20T12:41:23.479Z"}, {"lat": "44.125834", "lng": "9.705434", "elevation": "209.6999969482422", "time": "2013-09-20T12:41:24.467Z"}, {"lat": "44.125754", "lng": "9.705474", "elevation": "210.0", "time": "2013-09-20T12:41:41.436Z"}, {"lat": "44.125746", "lng": "9.705478", "elevation": "209.60000610351563", "time": "2013-09-20T12:41:42.427Z"}, {"lat": "44.125667", "lng": "9.705535", "elevation": "210.89999389648438", "time": "2013-09-20T12:41:56.435Z"}, {"lat": "44.125661", "lng": "9.70553", "elevation": "211.10000610351563", "time": "2013-09-20T12:41:57.430Z"}, {"lat": "44.125642", "lng": "9.705512", "elevation": "211.1999969482422", "time": "2013-09-20T12:42:03.763Z"}, {"lat": "44.125642", "lng": "9.705512", "elevation": "211.10000610351563", "time": "2013-09-20T12:42:04.433Z"}, {"lat": "44.125641", "lng": "9.705517", "elevation": "210.10000610351563", "time": "2013-09-20T12:42:20.442Z"}, {"lat": "44.125637", "lng": "9.705523", "elevation": "209.3000030517578", "time": "2013-09-20T12:42:21.443Z"}, {"lat": "44.125573", "lng": "9.705609", "elevation": "208.6999969482422", "time": "2013-09-20T12:42:34.481Z"}, {"lat": "44.125564", "lng": "9.705608", "elevation": "208.5", "time": "2013-09-20T12:42:35.461Z"}, {"lat": "44.125502", "lng": "9.70569", "elevation": "204.10000610351563", "time": "2013-09-20T12:42:59.440Z"}, {"lat": "44.125494", "lng": "9.70569", "elevation": "205.3000030517578", "time": "2013-09-20T12:43:00.442Z"}, {"lat": "44.12542", "lng": "9.705738", "elevation": "203.89999389648438", "time": "2013-09-20T12:43:08.576Z"}, {"lat": "44.125415", "lng": "9.705751", "elevation": "204.60000610351563", "time": "2013-09-20T12:43:09.438Z"}, {"lat": "44.125409", "lng": "9.705799", "elevation": "203.1999969482422", "time": "2013-09-20T12:43:17.451Z"}, {"lat": "44.125409", "lng": "9.7058", "elevation": "203.1999969482422", "time": "2013-09-20T12:43:18.450Z"}, {"lat": "44.125401", "lng": "9.705805", "elevation": "202.6999969482422", "time": "2013-09-20T12:43:27.453Z"}, {"lat": "44.125398", "lng": "9.705807", "elevation": "203.0", "time": "2013-09-20T12:43:28.442Z"}, {"lat": "44.125308", "lng": "9.705818", "elevation": "200.39999389648438", "time": "2013-09-20T12:43:41.442Z"}, {"lat": "44.125303", "lng": "9.705818", "elevation": "200.39999389648438", "time": "2013-09-20T12:43:42.451Z"}, {"lat": "44.125296", "lng": "9.705823", "elevation": "201.1999969482422", "time": "2013-09-20T12:43:46.451Z"}, {"lat": "44.125297", "lng": "9.705825", "elevation": "200.89999389648438", "time": "2013-09-20T12:43:47.444Z"}, {"lat": "44.125301", "lng": "9.705845", "elevation": "200.8000030517578", "time": "2013-09-20T12:44:50.504Z"}, {"lat": "44.125303", "lng": "9.705852", "elevation": "200.6999969482422", "time": "2013-09-20T12:44:51.550Z"}, {"lat": "44.125306", "lng": "9.705857", "elevation": "200.1999969482422", "time": "2013-09-20T12:44:53.569Z"}, {"lat": "44.125306", "lng": "9.705857", "elevation": "200.1999969482422", "time": "2013-09-20T12:44:54.512Z"}, {"lat": "44.125297", "lng": "9.705855", "elevation": "200.10000610351563", "time": "2013-09-20T12:45:04.464Z"}, {"lat": "44.125293", "lng": "9.705857", "elevation": "200.60000610351563", "time": "2013-09-20T12:45:05.456Z"}, {"lat": "44.125211", "lng": "9.705871", "elevation": "200.5", "time": "2013-09-20T12:45:16.543Z"}, {"lat": "44.125203", "lng": "9.705875", "elevation": "200.1999969482422", "time": "2013-09-20T12:45:17.520Z"}, {"lat": "44.125137", "lng": "9.705898", "elevation": "198.8000030517578", "time": "2013-09-20T12:45:35.458Z"}, {"lat": "44.125138", "lng": "9.705901", "elevation": "198.89999389648438", "time": "2013-09-20T12:45:36.451Z"}, {"lat": "44.125132", "lng": "9.7059", "elevation": "198.8000030517578", "time": "2013-09-20T12:45:41.522Z"}, {"lat": "44.125126", "lng": "9.705904", "elevation": "198.39999389648438", "time": "2013-09-20T12:45:42.556Z"}, {"lat": "44.125051", "lng": "9.705964", "elevation": "196.3000030517578", "time": "2013-09-20T12:45:52.460Z"}, {"lat": "44.125046", "lng": "9.705967", "elevation": "195.89999389648438", "time": "2013-09-20T12:45:53.472Z"}, {"lat": "44.124957", "lng": "9.705985", "elevation": "193.5", "time": "2013-09-20T12:46:08.499Z"}, {"lat": "44.12495", "lng": "9.70599", "elevation": "193.0", "time": "2013-09-20T12:46:09.460Z"}, {"lat": "44.124887", "lng": "9.706078", "elevation": "191.10000610351563", "time": "2013-09-20T12:46:30.474Z"}, {"lat": "44.124885", "lng": "9.706087", "elevation": "190.8000030517578", "time": "2013-09-20T12:46:31.459Z"}, {"lat": "44.124875", "lng": "9.706202", "elevation": "187.1999969482422", "time": "2013-09-20T12:46:40.467Z"}, {"lat": "44.124873", "lng": "9.706214", "elevation": "186.3000030517578", "time": "2013-09-20T12:46:41.467Z"}, {"lat": "44.124862", "lng": "9.706334", "elevation": "182.1999969482422", "time": "2013-09-20T12:46:55.468Z"}, {"lat": "44.124861", "lng": "9.70634", "elevation": "181.8000030517578", "time": "2013-09-20T12:46:56.457Z"}, {"lat": "44.124781", "lng": "9.706388", "elevation": "180.60000610351563", "time": "2013-09-20T12:47:09.469Z"}, {"lat": "44.124774", "lng": "9.70639", "elevation": "180.5", "time": "2013-09-20T12:47:10.475Z"}, {"lat": "44.124711", "lng": "9.706452", "elevation": "181.0", "time": "2013-09-20T12:47:34.564Z"}, {"lat": "44.12471", "lng": "9.706451", "elevation": "181.39999389648438", "time": "2013-09-20T12:47:35.605Z"}, {"lat": "44.124705", "lng": "9.706454", "elevation": "181.3000030517578", "time": "2013-09-20T12:47:38.571Z"}, {"lat": "44.124702", "lng": "9.706456", "elevation": "181.1999969482422", "time": "2013-09-20T12:47:39.486Z"}, {"lat": "44.124628", "lng": "9.706508", "elevation": "178.3000030517578", "time": "2013-09-20T12:47:51.589Z"}, {"lat": "44.12462", "lng": "9.706511", "elevation": "178.3000030517578", "time": "2013-09-20T12:47:52.581Z"}, {"lat": "44.124535", "lng": "9.706541", "elevation": "178.0", "time": "2013-09-20T12:48:02.461Z"}, {"lat": "44.124525", "lng": "9.706549", "elevation": "178.10000610351563", "time": "2013-09-20T12:48:03.461Z"}, {"lat": "44.124455", "lng": "9.706625", "elevation": "176.6999969482422", "time": "2013-09-20T12:48:18.527Z"}, {"lat": "44.124454", "lng": "9.706628", "elevation": "176.1999969482422", "time": "2013-09-20T12:48:19.495Z"}, {"lat": "44.124452", "lng": "9.706645", "elevation": "174.10000610351563", "time": "2013-09-20T12:48:25.559Z"}, {"lat": "44.124451", "lng": "9.706647", "elevation": "174.0", "time": "2013-09-20T12:48:26.517Z"}, {"lat": "44.124445", "lng": "9.706657", "elevation": "172.89999389648438", "time": "2013-09-20T12:48:31.569Z"}, {"lat": "44.124444", "lng": "9.706659", "elevation": "173.0", "time": "2013-09-20T12:48:32.560Z"}, {"lat": "44.124443", "lng": "9.706661", "elevation": "172.6999969482422", "time": "2013-09-20T12:48:33.561Z"}, {"lat": "44.12444", "lng": "9.706667", "elevation": "171.8000030517578", "time": "2013-09-20T12:48:36.475Z"}, {"lat": "44.124437", "lng": "9.70667", "elevation": "171.60000610351563", "time": "2013-09-20T12:48:37.470Z"}, {"lat": "44.124409", "lng": "9.706687", "elevation": "170.5", "time": "2013-09-20T12:48:46.479Z"}, {"lat": "44.124408", "lng": "9.706689", "elevation": "169.8000030517578", "time": "2013-09-20T12:48:47.472Z"}, {"lat": "44.124407", "lng": "9.706693", "elevation": "169.60000610351563", "time": "2013-09-20T12:48:48.479Z"}, {"lat": "44.124402", "lng": "9.706717", "elevation": "169.6999969482422", "time": "2013-09-20T12:48:54.477Z"}, {"lat": "44.124401", "lng": "9.706718", "elevation": "169.6999969482422", "time": "2013-09-20T12:48:55.476Z"}, {"lat": "44.124399", "lng": "9.706725", "elevation": "169.60000610351563", "time": "2013-09-20T12:49:12.474Z"}, {"lat": "44.124399", "lng": "9.706731", "elevation": "169.60000610351563", "time": "2013-09-20T12:49:13.473Z"}, {"lat": "44.124433", "lng": "9.706832", "elevation": "162.3000030517578", "time": "2013-09-20T12:49:22.492Z"}, {"lat": "44.124436", "lng": "9.706845", "elevation": "161.8000030517578", "time": "2013-09-20T12:49:23.488Z"}, {"lat": "44.124378", "lng": "9.70694", "elevation": "160.6999969482422", "time": "2013-09-20T12:49:30.523Z"}, {"lat": "44.124371", "lng": "9.706949", "elevation": "160.6999969482422", "time": "2013-09-20T12:49:31.483Z"}, {"lat": "44.124356", "lng": "9.706976", "elevation": "160.8000030517578", "time": "2013-09-20T12:49:39.501Z"}, {"lat": "44.124356", "lng": "9.706977", "elevation": "160.89999389648438", "time": "2013-09-20T12:49:40.486Z"}, {"lat": "44.124355", "lng": "9.706983", "elevation": "159.60000610351563", "time": "2013-09-20T12:49:55.493Z"}, {"lat": "44.124357", "lng": "9.70699", "elevation": "159.1999969482422", "time": "2013-09-20T12:49:56.485Z"}, {"lat": "44.124397", "lng": "9.707086", "elevation": "159.1999969482422", "time": "2013-09-20T12:50:04.485Z"}, {"lat": "44.124403", "lng": "9.707097", "elevation": "159.60000610351563", "time": "2013-09-20T12:50:05.512Z"}, {"lat": "44.12445", "lng": "9.707187", "elevation": "157.5", "time": "2013-09-20T12:50:17.483Z"}, {"lat": "44.124449", "lng": "9.707187", "elevation": "157.8000030517578", "time": "2013-09-20T12:50:18.482Z"}, {"lat": "44.124453", "lng": "9.707198", "elevation": "158.10000610351563", "time": "2013-09-20T12:50:40.536Z"}, {"lat": "44.124457", "lng": "9.707203", "elevation": "156.89999389648438", "time": "2013-09-20T12:50:41.491Z"}, {"lat": "44.124518", "lng": "9.707285", "elevation": "158.10000610351563", "time": "2013-09-20T12:50:52.656Z"}, {"lat": "44.12452", "lng": "9.707295", "elevation": "158.60000610351563", "time": "2013-09-20T12:50:53.649Z"}, {"lat": "44.124515", "lng": "9.707414", "elevation": "158.0", "time": "2013-09-20T12:51:04.490Z"}, {"lat": "44.124513", "lng": "9.707434", "elevation": "157.39999389648438", "time": "2013-09-20T12:51:05.683Z"}, {"lat": "44.12446", "lng": "9.707516", "elevation": "159.60000610351563", "time": "2013-09-20T12:51:12.562Z"}, {"lat": "44.124451", "lng": "9.707528", "elevation": "161.10000610351563", "time": "2013-09-20T12:51:13.518Z"}, {"lat": "44.1244", "lng": "9.707616", "elevation": "162.1999969482422", "time": "2013-09-20T12:51:20.684Z"}, {"lat": "44.124394", "lng": "9.70763", "elevation": "162.0", "time": "2013-09-20T12:51:21.661Z"}, {"lat": "44.124326", "lng": "9.707697", "elevation": "159.5", "time": "2013-09-20T12:51:29.516Z"}, {"lat": "44.124322", "lng": "9.707712", "elevation": "158.39999389648438", "time": "2013-09-20T12:51:30.487Z"}, {"lat": "44.124296", "lng": "9.707822", "elevation": "157.5", "time": "2013-09-20T12:51:39.488Z"}, {"lat": "44.124289", "lng": "9.707829", "elevation": "158.10000610351563", "time": "2013-09-20T12:51:40.485Z"}, {"lat": "44.124213", "lng": "9.707878", "elevation": "160.10000610351563", "time": "2013-09-20T12:51:51.489Z"}, {"lat": "44.124205", "lng": "9.707883", "elevation": "159.89999389648438", "time": "2013-09-20T12:51:52.487Z"}, {"lat": "44.124127", "lng": "9.707928", "elevation": "159.8000030517578", "time": "2013-09-20T12:52:01.486Z"}, {"lat": "44.124119", "lng": "9.707933", "elevation": "160.39999389648438", "time": "2013-09-20T12:52:02.496Z"}, {"lat": "44.12404", "lng": "9.707982", "elevation": "160.3000030517578", "time": "2013-09-20T12:52:12.487Z"}, {"lat": "44.12403", "lng": "9.707983", "elevation": "160.60000610351563", "time": "2013-09-20T12:52:13.491Z"}, {"lat": "44.123946", "lng": "9.708006", "elevation": "160.5", "time": "2013-09-20T12:52:22.489Z"}, {"lat": "44.123936", "lng": "9.70801", "elevation": "160.6999969482422", "time": "2013-09-20T12:52:23.489Z"}, {"lat": "44.123856", "lng": "9.70806", "elevation": "159.0", "time": "2013-09-20T12:52:31.678Z"}, {"lat": "44.12385", "lng": "9.708069", "elevation": "158.89999389648438", "time": "2013-09-20T12:52:32.600Z"}, {"lat": "44.123791", "lng": "9.70815", "elevation": "156.0", "time": "2013-09-20T12:52:40.651Z"}, {"lat": "44.123784", "lng": "9.70816", "elevation": "156.8000030517578", "time": "2013-09-20T12:52:41.668Z"}, {"lat": "44.123718", "lng": "9.708225", "elevation": "155.5", "time": "2013-09-20T12:52:49.611Z"}, {"lat": "44.123711", "lng": "9.708235", "elevation": "154.8000030517578", "time": "2013-09-20T12:52:50.673Z"}, {"lat": "44.123644", "lng": "9.708297", "elevation": "154.60000610351563", "time": "2013-09-20T12:52:58.579Z"}, {"lat": "44.123633", "lng": "9.708301", "elevation": "154.5", "time": "2013-09-20T12:52:59.698Z"}, {"lat": "44.123547", "lng": "9.708334", "elevation": "151.1999969482422", "time": "2013-09-20T12:53:08.497Z"}, {"lat": "44.123539", "lng": "9.70834", "elevation": "150.60000610351563", "time": "2013-09-20T12:53:09.504Z"}, {"lat": "44.123486", "lng": "9.708428", "elevation": "147.60000610351563", "time": "2013-09-20T12:53:17.492Z"}, {"lat": "44.123481", "lng": "9.708442", "elevation": "147.39999389648438", "time": "2013-09-20T12:53:18.495Z"}, {"lat": "44.123423", "lng": "9.708533", "elevation": "148.8000030517578", "time": "2013-09-20T12:53:28.646Z"}, {"lat": "44.12342", "lng": "9.708543", "elevation": "148.89999389648438", "time": "2013-09-20T12:53:29.629Z"}, {"lat": "44.123342", "lng": "9.708599", "elevation": "147.1999969482422", "time": "2013-09-20T12:53:39.554Z"}, {"lat": "44.123333", "lng": "9.708604", "elevation": "145.5", "time": "2013-09-20T12:53:40.655Z"}, {"lat": "44.123279", "lng": "9.708686", "elevation": "144.39999389648438", "time": "2013-09-20T12:53:48.492Z"}, {"lat": "44.123273", "lng": "9.708699", "elevation": "143.6999969482422", "time": "2013-09-20T12:53:49.500Z"}, {"lat": "44.123238", "lng": "9.708806", "elevation": "143.1999969482422", "time": "2013-09-20T12:53:57.495Z"}, {"lat": "44.123227", "lng": "9.708813", "elevation": "144.10000610351563", "time": "2013-09-20T12:53:58.668Z"}, {"lat": "44.123139", "lng": "9.708827", "elevation": "143.8000030517578", "time": "2013-09-20T12:54:07.671Z"}, {"lat": "44.123132", "lng": "9.708825", "elevation": "143.89999389648438", "time": "2013-09-20T12:54:08.594Z"}, {"lat": "44.12305", "lng": "9.708873", "elevation": "145.5", "time": "2013-09-20T12:54:19.653Z"}, {"lat": "44.123044", "lng": "9.708883", "elevation": "146.89999389648438", "time": "2013-09-20T12:54:20.530Z"}, {"lat": "44.123033", "lng": "9.709003", "elevation": "142.1999969482422", "time": "2013-09-20T12:54:27.547Z"}, {"lat": "44.123037", "lng": "9.709016", "elevation": "142.0", "time": "2013-09-20T12:54:28.661Z"}, {"lat": "44.123044", "lng": "9.709024", "elevation": "141.6999969482422", "time": "2013-09-20T12:54:33.566Z"}, {"lat": "44.123044", "lng": "9.709024", "elevation": "141.39999389648438", "time": "2013-09-20T12:54:34.573Z"}, {"lat": "44.123045", "lng": "9.709027", "elevation": "140.8000030517578", "time": "2013-09-20T12:54:37.499Z"}, {"lat": "44.123046", "lng": "9.709033", "elevation": "140.0", "time": "2013-09-20T12:54:38.502Z"}, {"lat": "44.123049", "lng": "9.709143", "elevation": "141.89999389648438", "time": "2013-09-20T12:54:45.501Z"}, {"lat": "44.123042", "lng": "9.70916", "elevation": "143.6999969482422", "time": "2013-09-20T12:54:46.499Z"}, {"lat": "44.122993", "lng": "9.709248", "elevation": "144.10000610351563", "time": "2013-09-20T12:54:52.577Z"}, {"lat": "44.122987", "lng": "9.709261", "elevation": "144.39999389648438", "time": "2013-09-20T12:54:53.616Z"}, {"lat": "44.12295", "lng": "9.709362", "elevation": "143.60000610351563", "time": "2013-09-20T12:55:04.674Z"}, {"lat": "44.122939", "lng": "9.70937", "elevation": "144.1999969482422", "time": "2013-09-20T12:55:05.669Z"}, {"lat": "44.122904", "lng": "9.709478", "elevation": "141.1999969482422", "time": "2013-09-20T12:55:11.596Z"}, {"lat": "44.122901", "lng": "9.709496", "elevation": "140.8000030517578", "time": "2013-09-20T12:55:12.702Z"}, {"lat": "44.122878", "lng": "9.709545", "elevation": "136.0", "time": "2013-09-20T12:55:20.525Z"}, {"lat": "44.122881", "lng": "9.709537", "elevation": "135.8000030517578", "time": "2013-09-20T12:55:21.639Z"}, {"lat": "44.122882", "lng": "9.709527", "elevation": "136.3000030517578", "time": "2013-09-20T12:55:22.615Z"}, {"lat": "44.122811", "lng": "9.709459", "elevation": "139.8000030517578", "time": "2013-09-20T12:55:30.609Z"}, {"lat": "44.122801", "lng": "9.709451", "elevation": "139.1999969482422", "time": "2013-09-20T12:55:31.549Z"}, {"lat": "44.122742", "lng": "9.709389", "elevation": "138.60000610351563", "time": "2013-09-20T12:55:47.577Z"}, {"lat": "44.122741", "lng": "9.70939", "elevation": "138.6999969482422", "time": "2013-09-20T12:55:48.739Z"}, {"lat": "44.122741", "lng": "9.70938", "elevation": "138.89999389648438", "time": "2013-09-20T12:55:53.713Z"}, {"lat": "44.122739", "lng": "9.709376", "elevation": "137.6999969482422", "time": "2013-09-20T12:55:54.606Z"}, {"lat": "44.122705", "lng": "9.709331", "elevation": "139.0", "time": "2013-09-20T12:56:03.557Z"}, {"lat": "44.122706", "lng": "9.709335", "elevation": "138.89999389648438", "time": "2013-09-20T12:56:04.738Z"}] \ No newline at end of file diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/uk.lproj/InfoPlist.strings b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/uk.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/uk.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/vi.lproj/InfoPlist.strings b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/vi.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/vi.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/zh_CN.lproj/InfoPlist.strings b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/zh_CN.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/zh_CN.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/zh_TW.lproj/InfoPlist.strings b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/zh_TW.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Resources/zh_TW.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/SDKDemo-Info.plist b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/SDKDemo-Info.plist new file mode 100644 index 0000000..47cc809 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/SDKDemo-Info.plist @@ -0,0 +1,51 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + com.example.SDKDemos + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + NSLocationWhenInUseUsageDescription + Show your location on the map + UILaunchStoryboardName + Launch + UIRequiredDeviceCapabilities + + armv7 + + UIStatusBarHidden + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/SDKDemo-Prefix.pch b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/SDKDemo-Prefix.pch new file mode 100644 index 0000000..f5560a7 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/SDKDemo-Prefix.pch @@ -0,0 +1,14 @@ +// +// Prefix header for all source files of the 'SDKDemo' target in the 'Google Maps SDK for iOS' project +// + +#import + +#ifndef __IPHONE_6_0 +#warning "This project uses features only available in iOS SDK 6.0 and later." +#endif + +#ifdef __OBJC__ + #import + #import +#endif diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/SDKDemoAPIKey.h b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/SDKDemoAPIKey.h new file mode 100644 index 0000000..142b44f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/SDKDemoAPIKey.h @@ -0,0 +1,10 @@ +/** + * To use GoogleMapsSDKDemos, please register an APIKey for your application + * and set it here. Your APIKey should be kept private. + * + * See documentation on getting an API Key for your API Project here: + * https://developers.google.com/maps/documentation/ios/start#get-key + */ + +#error Register for API Key and insert here. Then delete this line. +static NSString *const kAPIKey = @""; diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/SDKDemoAppDelegate.h b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/SDKDemoAppDelegate.h new file mode 100644 index 0000000..326053c --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/SDKDemoAppDelegate.h @@ -0,0 +1,17 @@ +#import + +@interface SDKDemoAppDelegate : UIResponder < + UIApplicationDelegate, + UISplitViewControllerDelegate> + +@property(strong, nonatomic) UIWindow *window; +@property(strong, nonatomic) UINavigationController *navigationController; +@property(strong, nonatomic) UISplitViewController *splitViewController; + +/** + * If the device is an iPad, this property controls the sample displayed in the + * right side of its split view controller. + */ +@property(strong, nonatomic) UIViewController *sample; + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/SDKDemoAppDelegate.m b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/SDKDemoAppDelegate.m new file mode 100644 index 0000000..7192043 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/SDKDemoAppDelegate.m @@ -0,0 +1,102 @@ +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "SDKDemos/SDKDemoAppDelegate.h" + +#import "SDKDemos/SDKDemoAPIKey.h" +#import "SDKDemos/SDKDemoMasterViewController.h" +#import + +@implementation SDKDemoAppDelegate { + id services_; +} + +@synthesize window = _window; + +- (BOOL)application:(UIApplication *)application + didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + NSLog(@"Build verison: %d", __apple_build_version__); + + if ([kAPIKey length] == 0) { + // Blow up if APIKey has not yet been set. + NSString *bundleId = [[NSBundle mainBundle] bundleIdentifier]; + NSString *format = @"Configure APIKey inside SDKDemoAPIKey.h for your " + @"bundle `%@`, see README.GoogleMapsSDKDemos for more information"; + @throw [NSException exceptionWithName:@"SDKDemoAppDelegate" + reason:[NSString stringWithFormat:format, bundleId] + userInfo:nil]; + } + [GMSServices provideAPIKey:kAPIKey]; + services_ = [GMSServices sharedServices]; + + // Log the required open source licenses! Yes, just NSLog-ing them is not + // enough but is good for a demo. + NSLog(@"Open source licenses:\n%@", [GMSServices openSourceLicenseInfo]); + + self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; + SDKDemoMasterViewController *master = [[SDKDemoMasterViewController alloc] init]; + master.appDelegate = self; + + if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) { + // This is an iPhone; configure the top-level navigation controller as the + // rootViewController, which contains the 'master' list of samples. + self.navigationController = + [[UINavigationController alloc] initWithRootViewController:master]; + + // Force non-translucent navigation bar for consistency of demo between + // iOS 6 and iOS 7. + self.navigationController.navigationBar.translucent = NO; + + self.window.rootViewController = self.navigationController; + } else { + // This is an iPad; configure a split-view controller that contains the + // the 'master' list of samples on the left side, and the current displayed + // sample on the right (begins empty). + UINavigationController *masterNavigationController = + [[UINavigationController alloc] initWithRootViewController:master]; + + UIViewController *empty = [[UIViewController alloc] init]; + UINavigationController *detailNavigationController = + [[UINavigationController alloc] initWithRootViewController:empty]; + + // Force non-translucent navigation bar for consistency of demo between + // iOS 6 and iOS 7. + detailNavigationController.navigationBar.translucent = NO; + + self.splitViewController = [[UISplitViewController alloc] init]; + self.splitViewController.delegate = master; + self.splitViewController.viewControllers = + @[masterNavigationController, detailNavigationController]; + self.splitViewController.presentsWithGesture = NO; + + self.window.rootViewController = self.splitViewController; + } + + [self.window makeKeyAndVisible]; + return YES; +} + +- (void)setSample:(UIViewController *)sample { + NSAssert([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad, + @"Expected device to be iPad inside setSample:"); + + // Finds the UINavigationController in the right side of the sample, and + // replace its displayed controller with the new sample. + UINavigationController *nav = + [self.splitViewController.viewControllers objectAtIndex:1]; + [nav setViewControllers:[NSArray arrayWithObject:sample] animated:NO]; +} + +- (UIViewController *)sample { + NSAssert([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad, + @"Expected device to be iPad inside sample"); + + // The current sample is the top-most VC in the right-hand pane of the + // splitViewController. + UINavigationController *nav = + [self.splitViewController.viewControllers objectAtIndex:1]; + return [[nav viewControllers] objectAtIndex:0]; +} + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/SDKDemoMasterViewController.h b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/SDKDemoMasterViewController.h new file mode 100644 index 0000000..27dab51 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/SDKDemoMasterViewController.h @@ -0,0 +1,12 @@ +#import + +@class SDKDemoAppDelegate; + +@interface SDKDemoMasterViewController : UITableViewController < + UISplitViewControllerDelegate, + UITableViewDataSource, + UITableViewDelegate> + +@property(nonatomic, assign) SDKDemoAppDelegate *appDelegate; + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/SDKDemoMasterViewController.m b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/SDKDemoMasterViewController.m new file mode 100644 index 0000000..11c696d --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/SDKDemoMasterViewController.m @@ -0,0 +1,167 @@ +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "SDKDemos/SDKDemoMasterViewController.h" + +#import "SDKDemos/PlacesSamples/Samples+Places.h" +#import "SDKDemos/SDKDemoAppDelegate.h" +#import +#import "SDKDemos/Samples/Samples.h" + +@implementation SDKDemoMasterViewController { + NSArray *demos_; + NSArray *demoSections_; + BOOL isPhone_; + UIPopoverController *popover_; + UIBarButtonItem *samplesButton_; + __weak UIViewController *controller_; + CLLocationManager *locationManager_; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + + isPhone_ = [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone; + + if (!isPhone_) { + self.clearsSelectionOnViewWillAppear = NO; + } else { + UIBarButtonItem *backButton = + [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Back", @"Back") + style:UIBarButtonItemStyleBordered + target:nil + action:nil]; + [self.navigationItem setBackBarButtonItem:backButton]; + } + + self.title = NSLocalizedString(@"Maps SDK Demos", @"Maps SDK Demos"); + self.title = [NSString stringWithFormat:@"%@: %@", self.title, [GMSServices SDKVersion]]; + + self.tableView.autoresizingMask = + UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth; + self.tableView.delegate = self; + self.tableView.dataSource = self; + + demoSections_ = [Samples loadSections]; + demos_ = [Samples loadDemos]; + [self addPlacesDemos]; + + if (!isPhone_) { + [self loadDemo:0 atIndex:0]; + } +} +- (void)addPlacesDemos { + NSMutableArray *sections = [NSMutableArray arrayWithArray:demoSections_]; + [sections insertObject:@"Places" atIndex:0]; + demoSections_ = [sections copy]; + + NSMutableArray *demos = [NSMutableArray arrayWithArray:demos_]; + [demos insertObject:[Samples placesDemos] + atIndex:0]; + demos_ = [demos copy]; +} + +#pragma mark - UITableViewController + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return demoSections_.count; +} + +- (CGFloat)tableView:(UITableView *)tableView + heightForHeaderInSection:(NSInteger)section { + return 35.0; +} + +- (NSString *)tableView:(UITableView *)tableView + titleForHeaderInSection:(NSInteger)section { + return [demoSections_ objectAtIndex:section]; +} + +- (NSInteger)tableView:(UITableView *)tableView + numberOfRowsInSection:(NSInteger)section { + return [[demos_ objectAtIndex: section] count]; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView + cellForRowAtIndexPath:(NSIndexPath *)indexPath { + static NSString *cellIdentifier = @"Cell"; + UITableViewCell *cell = + [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; + if (cell == nil) { + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle + reuseIdentifier:cellIdentifier]; + + if (isPhone_) { + [cell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator]; + } + } + + NSDictionary *demo = [[demos_ objectAtIndex:indexPath.section] + objectAtIndex:indexPath.row]; + cell.textLabel.text = [demo objectForKey:@"title"]; + cell.detailTextLabel.text = [demo objectForKey:@"description"]; + + return cell; +} + +- (void)tableView:(UITableView *)tableView + didSelectRowAtIndexPath:(NSIndexPath *)indexPath { + // The user has chosen a sample; load it and clear the selection! + [self loadDemo:indexPath.section atIndex:indexPath.row]; + [tableView deselectRowAtIndexPath:indexPath animated:YES]; +} + +#pragma mark - Split view + +- (void)splitViewController:(UISplitViewController *)splitController + willHideViewController:(UIViewController *)viewController + withBarButtonItem:(UIBarButtonItem *)barButtonItem + forPopoverController:(UIPopoverController *)popoverController { + popover_ = popoverController; + samplesButton_ = barButtonItem; + samplesButton_.title = NSLocalizedString(@"Samples", @"Samples"); + samplesButton_.style = UIBarButtonItemStyleDone; + [self updateSamplesButton]; +} + +- (void)splitViewController:(UISplitViewController *)splitController + willShowViewController:(UIViewController *)viewController + invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem { + popover_ = nil; + samplesButton_ = nil; + [self updateSamplesButton]; +} + +#pragma mark - Private methods + +- (void)loadDemo:(NSUInteger)section + atIndex:(NSUInteger)index { + NSDictionary *demo = [[demos_ objectAtIndex:section] objectAtIndex:index]; + UIViewController *controller = + [[[demo objectForKey:@"controller"] alloc] init]; + controller_ = controller; + + if (controller != nil) { + controller.title = [demo objectForKey:@"title"]; + + if (isPhone_) { + [self.navigationController pushViewController:controller animated:YES]; + } else { + [self.appDelegate setSample:controller]; + [popover_ dismissPopoverAnimated:YES]; + } + + [self updateSamplesButton]; + } +} + +// This method is invoked when the left 'back' button in the split view +// controller on iPad should be updated (either made visible or hidden). +// It assumes that the left bar button item may be safely modified to contain +// the samples button. +- (void)updateSamplesButton { + controller_.navigationItem.leftBarButtonItem = samplesButton_; +} + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/AnimatedCurrentLocationViewController.h b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/AnimatedCurrentLocationViewController.h new file mode 100644 index 0000000..fd45b85 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/AnimatedCurrentLocationViewController.h @@ -0,0 +1,9 @@ + +#import +#import + +#import + +@interface AnimatedCurrentLocationViewController : UIViewController + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/AnimatedCurrentLocationViewController.m b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/AnimatedCurrentLocationViewController.m new file mode 100644 index 0000000..dc50540 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/AnimatedCurrentLocationViewController.m @@ -0,0 +1,91 @@ +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "SDKDemos/Samples/AnimatedCurrentLocationViewController.h" + +@implementation AnimatedCurrentLocationViewController { + CLLocationManager *_manager; + GMSMapView *_mapView; + GMSMarker *_locationMarker; + +} + +- (void)viewDidLoad { + [super viewDidLoad]; + + GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:38.8879 + longitude:-77.0200 + zoom:17]; + _mapView = [GMSMapView mapWithFrame:CGRectZero camera:camera]; + _mapView.settings.myLocationButton = NO; + _mapView.settings.indoorPicker = NO; + + self.view = _mapView; + + // Setup location services + if (![CLLocationManager locationServicesEnabled]) { + NSLog(@"Please enable location services"); + return; + } + + if ([CLLocationManager authorizationStatus] == kCLAuthorizationStatusDenied) { + NSLog(@"Please authorize location services"); + return; + } + + _manager = [[CLLocationManager alloc] init]; + _manager.delegate = self; + _manager.desiredAccuracy = kCLLocationAccuracyBest; + _manager.distanceFilter = 5.0f; + [_manager startUpdatingLocation]; + +} + +#pragma mark - CLLocationManagerDelegate + +- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error { + if ([CLLocationManager authorizationStatus] == kCLAuthorizationStatusDenied) { + NSLog(@"Please authorize location services"); + return; + } + + NSLog(@"CLLocationManager error: %@", error.localizedFailureReason); + return; +} + +- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations { + CLLocation *location = [locations lastObject]; + + if (_locationMarker == nil) { + _locationMarker = [[GMSMarker alloc] init]; + _locationMarker.position = CLLocationCoordinate2DMake(-33.86, 151.20); + + // Animated walker images derived from an www.angryanimator.com tutorial. + // See: http://www.angryanimator.com/word/2010/11/26/tutorial-2-walk-cycle/ + + NSArray *frames = @[[UIImage imageNamed:@"step1"], + [UIImage imageNamed:@"step2"], + [UIImage imageNamed:@"step3"], + [UIImage imageNamed:@"step4"], + [UIImage imageNamed:@"step5"], + [UIImage imageNamed:@"step6"], + [UIImage imageNamed:@"step7"], + [UIImage imageNamed:@"step8"]]; + + _locationMarker.icon = [UIImage animatedImageWithImages:frames duration:0.8]; + _locationMarker.groundAnchor = CGPointMake(0.5f, 0.97f); // Taking into account walker's shadow + _locationMarker.map = _mapView; + } else { + [CATransaction begin]; + [CATransaction setAnimationDuration:2.0]; + _locationMarker.position = location.coordinate; + [CATransaction commit]; + } + + GMSCameraUpdate *move = [GMSCameraUpdate setTarget:location.coordinate zoom:17]; + [_mapView animateWithCameraUpdate:move]; +} + + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/BasicMapViewController.h b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/BasicMapViewController.h new file mode 100644 index 0000000..d6611e3 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/BasicMapViewController.h @@ -0,0 +1,5 @@ +#import + +@interface BasicMapViewController : UIViewController + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/BasicMapViewController.m b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/BasicMapViewController.m new file mode 100644 index 0000000..7ab1dbd --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/BasicMapViewController.m @@ -0,0 +1,19 @@ +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "SDKDemos/Samples/BasicMapViewController.h" + +#import + +@implementation BasicMapViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-33.868 + longitude:151.2086 + zoom:6]; + self.view = [GMSMapView mapWithFrame:CGRectZero camera:camera]; +} + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/CameraViewController.h b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/CameraViewController.h new file mode 100644 index 0000000..0853237 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/CameraViewController.h @@ -0,0 +1,5 @@ +#import + +@interface CameraViewController : UIViewController + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/CameraViewController.m b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/CameraViewController.m new file mode 100644 index 0000000..7291897 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/CameraViewController.m @@ -0,0 +1,61 @@ +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "SDKDemos/Samples/CameraViewController.h" + +#import + +@implementation CameraViewController { + GMSMapView *_mapView; + NSTimer *timer; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-37.809487 + longitude:144.965699 + zoom:20 + bearing:0 + viewingAngle:0]; + _mapView = [GMSMapView mapWithFrame:CGRectZero camera:camera]; + _mapView.settings.zoomGestures = NO; + _mapView.settings.scrollGestures = NO; + _mapView.settings.rotateGestures = NO; + _mapView.settings.tiltGestures = NO; + + self.view = _mapView; +} + +- (void)moveCamera { + GMSCameraPosition *camera = _mapView.camera; + float zoom = fmaxf(camera.zoom - 0.1f, 17.5f); + + GMSCameraPosition *newCamera = + [[GMSCameraPosition alloc] initWithTarget:camera.target + zoom:zoom + bearing:camera.bearing + 10 + viewingAngle:camera.viewingAngle + 10]; + [_mapView animateToCameraPosition:newCamera]; +} + +- (void)viewDidAppear:(BOOL)animated { + [super viewDidAppear:animated]; + timer = [NSTimer scheduledTimerWithTimeInterval:1.f/30.f + target:self + selector:@selector(moveCamera) + userInfo:nil + repeats:YES]; +} + +- (void)viewDidDisappear:(BOOL)animated { + [super viewDidDisappear:animated]; + [timer invalidate]; +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + [timer invalidate]; +} + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/CustomIndoorViewController.h b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/CustomIndoorViewController.h new file mode 100644 index 0000000..3379794 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/CustomIndoorViewController.h @@ -0,0 +1,4 @@ +#import + +@interface CustomIndoorViewController : UIViewController +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/CustomIndoorViewController.m b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/CustomIndoorViewController.m new file mode 100644 index 0000000..d2f0e3c --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/CustomIndoorViewController.m @@ -0,0 +1,139 @@ +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "SDKDemos/Samples/CustomIndoorViewController.h" + +#import + +@interface CustomIndoorViewController () < + GMSIndoorDisplayDelegate, + UIPickerViewDelegate, + UIPickerViewDataSource> + +@end + +@implementation CustomIndoorViewController { + GMSMapView *_mapView; + UIPickerView *_levelPickerView; + NSArray *_levels; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:37.78318 + longitude:-122.403874 + zoom:18]; + + // set backgroundColor, otherwise UIPickerView fades into the background + self.view.backgroundColor = [UIColor grayColor]; + + _mapView = [GMSMapView mapWithFrame:CGRectZero camera:camera]; + _mapView.settings.myLocationButton = NO; + _mapView.settings.indoorPicker = NO; // We are implementing a custom level picker. + + _mapView.indoorEnabled = YES; // Defaults to YES. Set to NO to hide indoor maps. + _mapView.indoorDisplay.delegate = self; + _mapView.translatesAutoresizingMaskIntoConstraints = NO; + [self.view addSubview:_mapView]; + + // This UIPickerView will be populated with the levels of the active building. + _levelPickerView = [[UIPickerView alloc] init]; + _levelPickerView.delegate = self; + _levelPickerView.dataSource = self; + _levelPickerView.showsSelectionIndicator = YES; + _levelPickerView.translatesAutoresizingMaskIntoConstraints = NO; + [self.view addSubview:_levelPickerView]; + + // The height of the UIPickerView, used below in the vertical constraint + NSDictionary *metrics = @{@"height": @180.0}; + NSDictionary *views = NSDictionaryOfVariableBindings(_mapView, _levelPickerView); + + // Constraining the map to the full width of the display. + // The |_levelPickerView| is constrained below with the NSLayoutFormatAlignAll* + // See http://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/AutolayoutPG/Articles/formatLanguage.html + [self.view addConstraints:[NSLayoutConstraint + constraintsWithVisualFormat:@"|[_mapView]|" + options:0 + metrics:metrics + views:views]]; + + // Constraining the _mapView and the _levelPickerView as siblings taking + // the full height of the display, with _levelPickerView at 200 points high + [self.view addConstraints:[NSLayoutConstraint + constraintsWithVisualFormat:@"V:|[_mapView][_levelPickerView(height)]|" + options:NSLayoutFormatAlignAllLeft|NSLayoutFormatAlignAllRight + metrics:metrics + views:views]]; +} + +#pragma mark - GMSIndoorDisplayDelegate + +- (void)didChangeActiveBuilding:(GMSIndoorBuilding *)building { + // Everytime we change active building force the picker to re-display the labels. + + NSMutableArray *levels = [NSMutableArray array]; + if (building.underground) { + // If this building is completely underground, add a fake 'top' floor. This must be the 'boxed' + // nil, [NSNull null], as NSArray/NSMutableArray cannot contain nils. + [levels addObject:[NSNull null]]; + } + [levels addObjectsFromArray:building.levels]; + _levels = [levels copy]; + + [_levelPickerView reloadAllComponents]; + [_levelPickerView selectRow:-1 inComponent:0 animated:NO]; + + // UIPickerView insists on having some data; disable interaction if there's no levels. + _levelPickerView.userInteractionEnabled = ([_levels count] > 0); +} + +- (void)didChangeActiveLevel:(GMSIndoorLevel *)level { + // On level change, sync our level picker's selection to the IndoorDisplay. + if (level == nil) { + level = (id)[NSNull null]; // box nil to NSNull for use in NSArray + } + NSUInteger index = [_levels indexOfObject:level]; + if (index != NSNotFound) { + NSInteger currentlySelectedLevel = [_levelPickerView selectedRowInComponent:0]; + if ((NSInteger)index != currentlySelectedLevel) { + [_levelPickerView selectRow:index inComponent:0 animated:NO]; + } + } +} + +#pragma mark - UIPickerViewDelegate + +- (void)pickerView:(UIPickerView *)pickerView + didSelectRow:(NSInteger)row + inComponent:(NSInteger)component { + // On user selection of a level in the picker, set the right level in IndoorDisplay + id level = _levels[row]; + if (level == [NSNull null]) { + level = nil; // unbox NSNull + } + [_mapView.indoorDisplay setActiveLevel:level]; +} + +- (NSString *)pickerView:(UIPickerView *)pickerView + titleForRow:(NSInteger)row + forComponent:(NSInteger)component { + id object = _levels[row]; + if (object == [NSNull null]) { + return @"\u2014"; // use an em dash for 'above ground' + } + GMSIndoorLevel *level = object; + return level.name; +} + +#pragma mark - UIPickerViewDataSource + +- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView { + return 1; +} + +- (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component { + return [_levels count]; +} + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/CustomMarkersViewController.h b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/CustomMarkersViewController.h new file mode 100644 index 0000000..f5b839f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/CustomMarkersViewController.h @@ -0,0 +1,5 @@ +#import + +@interface CustomMarkersViewController : UIViewController + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/CustomMarkersViewController.m b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/CustomMarkersViewController.m new file mode 100644 index 0000000..249e4cb --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/CustomMarkersViewController.m @@ -0,0 +1,111 @@ +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "SDKDemos/Samples/CustomMarkersViewController.h" + +#import + +static int kMarkerCount = 0; + +// Returns a random value from 0-1.0f. +static CGFloat randf() { + return (((float)arc4random()/0x100000000)*1.0f); +} + +@implementation CustomMarkersViewController { + GMSMapView *_mapView; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-37.81969 + longitude:144.966085 + zoom:4]; + _mapView = [GMSMapView mapWithFrame:CGRectZero camera:camera]; + [self addDefaultMarkers]; + + // Add a button which adds random markers to the map. + UIBarButtonItem *addButton = + [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd + target:self + action:@selector(didTapAdd)]; + addButton.accessibilityLabel = @"Add Markers"; + UIBarButtonItem *clearButton = + [[UIBarButtonItem alloc] initWithTitle:@"Clear Markers" + style:UIBarButtonItemStylePlain + target:self + action:@selector(didTapClear)]; + self.navigationItem.rightBarButtonItems = @[ addButton, clearButton ]; + + self.view = _mapView; +} + +- (void)addDefaultMarkers { + // Add a custom 'glow' marker around Sydney. + GMSMarker *sydneyMarker = [[GMSMarker alloc] init]; + sydneyMarker.title = @"Sydney!"; + sydneyMarker.icon = [UIImage imageNamed:@"glow-marker"]; + sydneyMarker.position = CLLocationCoordinate2DMake(-33.8683, 151.2086); + sydneyMarker.map = _mapView; + + // Add a custom 'arrow' marker pointing to Melbourne. + GMSMarker *melbourneMarker = [[GMSMarker alloc] init]; + melbourneMarker.title = @"Melbourne!"; + melbourneMarker.icon = [UIImage imageNamed:@"arrow"]; + melbourneMarker.position = CLLocationCoordinate2DMake(-37.81969, 144.966085); + melbourneMarker.map = _mapView; +} + +- (void)didTapAdd { + for (int i = 0; i < 10; ++i) { + // Add a marker every 0.25 seconds for the next ten markers, randomly + // within the bounds of the camera as it is at that point. + double delayInSeconds = (i * 0.25); + dispatch_time_t popTime = + dispatch_time(DISPATCH_TIME_NOW, + (int64_t)(delayInSeconds * NSEC_PER_SEC)); + dispatch_after(popTime, dispatch_get_main_queue(), ^(void) { + GMSVisibleRegion region = [_mapView.projection visibleRegion]; + GMSCoordinateBounds *bounds = + [[GMSCoordinateBounds alloc] initWithRegion:region]; + [self addMarkerInBounds:bounds]; + }); + } +} + +- (void)addMarkerInBounds:(GMSCoordinateBounds *)bounds { + CLLocationDegrees latitude = bounds.southWest.latitude + + randf() * (bounds.northEast.latitude - bounds.southWest.latitude); + + // If the visible region crosses the antimeridian (the right-most point is + // "smaller" than the left-most point), adjust the longitude accordingly. + BOOL offset = (bounds.northEast.longitude < bounds.southWest.longitude); + CLLocationDegrees longitude = bounds.southWest.longitude + randf() * + (bounds.northEast.longitude - bounds.southWest.longitude + (offset ? + 360 : 0)); + if (longitude > 180.f) { + longitude -= 360.f; + } + + UIColor *color = + [UIColor colorWithHue:randf() saturation:1.f brightness:1.f alpha:1.0f]; + + CLLocationCoordinate2D position = + CLLocationCoordinate2DMake(latitude, longitude); + GMSMarker *marker = [GMSMarker markerWithPosition:position]; + marker.title = [NSString stringWithFormat:@"Marker #%d", ++kMarkerCount]; + marker.appearAnimation = kGMSMarkerAnimationPop; + marker.icon = [GMSMarker markerImageWithColor:color]; + + marker.rotation = (randf()-0.5f)*20; // rotate between -20 and +20 degrees + + marker.map = _mapView; +} + +- (void)didTapClear { + [_mapView clear]; + [self addDefaultMarkers]; +} + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/DoubleMapViewController.h b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/DoubleMapViewController.h new file mode 100644 index 0000000..0a1d237 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/DoubleMapViewController.h @@ -0,0 +1,5 @@ +#import + +@interface DoubleMapViewController : UIViewController + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/DoubleMapViewController.m b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/DoubleMapViewController.m new file mode 100644 index 0000000..0948acc --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/DoubleMapViewController.m @@ -0,0 +1,65 @@ +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "SDKDemos/Samples/DoubleMapViewController.h" + +#import + +@interface DoubleMapViewController () +@end + +@implementation DoubleMapViewController { + GMSMapView *_mapView; + GMSMapView *_boundMapView; +} + ++ (GMSCameraPosition *)defaultCamera { + return [GMSCameraPosition cameraWithLatitude:37.7847 + longitude:-122.41 + zoom:5]; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + + // Two map views, second one has its camera target controlled by the first. + CGRect frame = self.view.bounds; + frame.size.height = frame.size.height / 2; + _mapView = [GMSMapView mapWithFrame:frame camera:[DoubleMapViewController defaultCamera]]; + _mapView.autoresizingMask = UIViewAutoresizingFlexibleWidth | + UIViewAutoresizingFlexibleHeight | + UIViewAutoresizingFlexibleBottomMargin; + + _mapView.delegate = self; + [self.view addSubview:_mapView]; + + frame = self.view.bounds; + frame.size.height = frame.size.height / 2; + frame.origin.y = frame.size.height; + _boundMapView = + [GMSMapView mapWithFrame:frame camera:[DoubleMapViewController defaultCamera]]; + _boundMapView.autoresizingMask = UIViewAutoresizingFlexibleWidth | + UIViewAutoresizingFlexibleHeight | + UIViewAutoresizingFlexibleTopMargin; + _boundMapView.settings.scrollGestures = NO; + + [self.view addSubview:_boundMapView]; +} + +- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation + duration:(NSTimeInterval)duration { + CGRect frame = self.view.bounds; + frame.size.height = frame.size.height / 2; + _mapView.frame = frame; +} + +- (void)mapView:(GMSMapView *)mapView didChangeCameraPosition:(GMSCameraPosition *)position { + GMSCameraPosition *previousCamera = _boundMapView.camera; + _boundMapView.camera = [GMSCameraPosition cameraWithTarget:position.target + zoom:previousCamera.zoom + bearing:previousCamera.bearing + viewingAngle:previousCamera.viewingAngle]; +} + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/FitBoundsViewController.h b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/FitBoundsViewController.h new file mode 100644 index 0000000..3cc38b0 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/FitBoundsViewController.h @@ -0,0 +1,5 @@ +#import + +@interface FitBoundsViewController : UIViewController + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/FitBoundsViewController.m b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/FitBoundsViewController.m new file mode 100644 index 0000000..f730201 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/FitBoundsViewController.m @@ -0,0 +1,82 @@ +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "SDKDemos/Samples/FitBoundsViewController.h" + +#import + +@interface FitBoundsViewController () +@end + +@implementation FitBoundsViewController { + GMSMapView *_mapView; + NSMutableArray *_markers; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-37.81969 + longitude:144.966085 + zoom:4]; + _mapView = [GMSMapView mapWithFrame:CGRectZero camera:camera]; + _mapView.delegate = self; + self.view = _mapView; + + // Add a default marker around Sydney. + GMSMarker *sydneyMarker = [[GMSMarker alloc] init]; + sydneyMarker.title = @"Sydney!"; + sydneyMarker.icon = [UIImage imageNamed:@"glow-marker"]; + sydneyMarker.position = CLLocationCoordinate2DMake(-33.8683, 151.2086); + sydneyMarker.map = _mapView; + + GMSMarker *anotherSydneyMarker = [[GMSMarker alloc] init]; + anotherSydneyMarker.title = @"Sydney 2!"; + anotherSydneyMarker.icon = [UIImage imageNamed:@"glow-marker"]; + anotherSydneyMarker.position = CLLocationCoordinate2DMake(-33.8683, 149.2086); + anotherSydneyMarker.map = _mapView; + + // Create a list of markers, adding the Sydney marker. + _markers = [NSMutableArray arrayWithObject:sydneyMarker]; + [_markers addObject:anotherSydneyMarker]; + + // Create a button that, when pressed, updates the camera to fit the bounds + // of the specified markers. + UIBarButtonItem *fitBoundsButton = + [[UIBarButtonItem alloc] initWithTitle:@"Fit Bounds" + style:UIBarButtonItemStylePlain + target:self + action:@selector(didTapFitBounds)]; + self.navigationItem.rightBarButtonItem = fitBoundsButton; +} + +- (void)didTapFitBounds { + GMSCoordinateBounds *bounds; + for (GMSMarker *marker in _markers) { + if (bounds == nil) { + bounds = [[GMSCoordinateBounds alloc] initWithCoordinate:marker.position + coordinate:marker.position]; + } + bounds = [bounds includingCoordinate:marker.position]; + } + GMSCameraUpdate *update = [GMSCameraUpdate fitBounds:bounds + withPadding:50.0f]; + [_mapView moveCamera:update]; +} + +#pragma mark - GMSMapViewDelegate + +- (void)mapView:(GMSMapView *)mapView + didLongPressAtCoordinate:(CLLocationCoordinate2D)coordinate { + GMSMarker *marker = [[GMSMarker alloc] init]; + marker.title = [NSString stringWithFormat:@"Marker at: %.2f,%.2f", + coordinate.latitude, coordinate.longitude]; + marker.position = coordinate; + marker.appearAnimation = kGMSMarkerAnimationPop; + marker.map = _mapView; + + // Add the new marker to the list of markers. + [_markers addObject:marker]; +} + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/FixedPanoramaViewController.h b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/FixedPanoramaViewController.h new file mode 100644 index 0000000..29968c5 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/FixedPanoramaViewController.h @@ -0,0 +1,5 @@ +#import + +@interface FixedPanoramaViewController : UIViewController + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/FixedPanoramaViewController.m b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/FixedPanoramaViewController.m new file mode 100644 index 0000000..0ef880e --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/FixedPanoramaViewController.m @@ -0,0 +1,33 @@ +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "SDKDemos/Samples/FixedPanoramaViewController.h" + +#import + +static CLLocationCoordinate2D kPanoramaNear = {-33.732022, 150.312114}; + +@interface FixedPanoramaViewController () +@end + +@implementation FixedPanoramaViewController { + GMSPanoramaView *_view; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + + _view = [GMSPanoramaView panoramaWithFrame:CGRectZero + nearCoordinate:kPanoramaNear]; + _view.camera = [GMSPanoramaCamera cameraWithHeading:180 + pitch:-10 + zoom:0]; + _view.delegate = self; + _view.orientationGestures = NO; + _view.navigationGestures = NO; + _view.navigationLinksHidden = YES; + self.view = _view; +} + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/GeocoderViewController.h b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/GeocoderViewController.h new file mode 100644 index 0000000..26bf09d --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/GeocoderViewController.h @@ -0,0 +1,7 @@ +#import + +#import + +@interface GeocoderViewController : UIViewController + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/GeocoderViewController.m b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/GeocoderViewController.m new file mode 100644 index 0000000..bc830f8 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/GeocoderViewController.m @@ -0,0 +1,53 @@ +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "SDKDemos/Samples/GeocoderViewController.h" + +#import + +@implementation GeocoderViewController { + GMSMapView *mapView_; + GMSGeocoder *geocoder_; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-33.868 + longitude:151.2086 + zoom:12]; + + mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera]; + mapView_.delegate = self; + + geocoder_ = [[GMSGeocoder alloc] init]; + + self.view = mapView_; +} + +- (void)mapView:(GMSMapView *)mapView + didLongPressAtCoordinate:(CLLocationCoordinate2D)coordinate { + // On a long press, reverse geocode this location. + GMSReverseGeocodeCallback handler = ^(GMSReverseGeocodeResponse *response, NSError *error) { + GMSAddress *address = response.firstResult; + if (address) { + NSLog(@"Geocoder result: %@", address); + + GMSMarker *marker = [GMSMarker markerWithPosition:address.coordinate]; + + marker.title = [[address lines] firstObject]; + if ([[address lines] count] > 1) { + marker.snippet = [[address lines] objectAtIndex:1]; + } + + marker.appearAnimation = kGMSMarkerAnimationPop; + marker.map = mapView_; + } else { + NSLog(@"Could not reverse geocode point (%f,%f): %@", + coordinate.latitude, coordinate.longitude, error); + } + }; + [geocoder_ reverseGeocodeCoordinate:coordinate completionHandler:handler]; +} + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/GestureControlViewController.h b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/GestureControlViewController.h new file mode 100644 index 0000000..fda8840 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/GestureControlViewController.h @@ -0,0 +1,5 @@ +#import + +@interface GestureControlViewController : UIViewController + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/GestureControlViewController.m b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/GestureControlViewController.m new file mode 100644 index 0000000..556af4a --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/GestureControlViewController.m @@ -0,0 +1,59 @@ +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "SDKDemos/Samples/GestureControlViewController.h" + +#import + +@implementation GestureControlViewController { + GMSMapView *mapView_; + UISwitch *zoomSwitch_; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-25.5605 + longitude:133.605097 + zoom:3]; + + mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera]; + mapView_.autoresizingMask = + UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; + + self.view = [[UIView alloc] initWithFrame:CGRectZero]; + [self.view addSubview:mapView_]; + + UIView *holder = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 0, 59)]; + holder.autoresizingMask = + UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleBottomMargin; + holder.backgroundColor = [UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:0.8f]; + [self.view addSubview:holder]; + + // Zoom label. + UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(16, 16, 200, 29)]; + label.text = @"Zooming?"; + label.font = [UIFont boldSystemFontOfSize:18.0f]; + label.textAlignment = NSTextAlignmentLeft; + label.backgroundColor = [UIColor clearColor]; + label.layer.shadowColor = [[UIColor whiteColor] CGColor]; + label.layer.shadowOffset = CGSizeMake(0.0f, 1.0f); + label.layer.shadowOpacity = 1.0f; + label.layer.shadowRadius = 0.0f; + [holder addSubview:label]; + + // Control zooming. + zoomSwitch_ = [[UISwitch alloc] initWithFrame:CGRectMake(-90, 16, 0, 0)]; + zoomSwitch_.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin; + [zoomSwitch_ addTarget:self + action:@selector(didChangeZoomSwitch) + forControlEvents:UIControlEventValueChanged]; + zoomSwitch_.on = YES; + [holder addSubview:zoomSwitch_]; +} + +- (void)didChangeZoomSwitch { + mapView_.settings.zoomGestures = zoomSwitch_.isOn; +} + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/GradientPolylinesViewController.h b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/GradientPolylinesViewController.h new file mode 100644 index 0000000..2de863c --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/GradientPolylinesViewController.h @@ -0,0 +1,5 @@ +#import + +@interface GradientPolylinesViewController : UIViewController + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/GradientPolylinesViewController.m b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/GradientPolylinesViewController.m new file mode 100644 index 0000000..13b51e4 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/GradientPolylinesViewController.m @@ -0,0 +1,76 @@ +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "SDKDemos/Samples/GradientPolylinesViewController.h" + +#import + + +@implementation GradientPolylinesViewController { + GMSMapView *mapView_; + GMSPolyline *polyline_; + NSMutableArray *trackData_; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:44.1314 + longitude:9.6921 + zoom:14.059f + bearing:328.f + viewingAngle:40.f]; + mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera]; + self.view = mapView_; + + [self parseTrackFile]; + [polyline_ setSpans:[self gradientSpans]]; +} + +- (NSArray *)gradientSpans { + NSMutableArray *colorSpans = [NSMutableArray array]; + NSUInteger count = [trackData_ count]; + UIColor *prevColor; + for (NSUInteger i = 0; i < count; i++) { + double elevation = [[[trackData_ objectAtIndex:i] objectForKey:@"elevation"] doubleValue]; + + UIColor *toColor = [UIColor colorWithHue:(float)elevation/700 + saturation:1.f + brightness:.9f + alpha:1.f]; + + if (prevColor == nil) { + prevColor = toColor; + } + + GMSStrokeStyle *style = [GMSStrokeStyle gradientFromColor:prevColor toColor:toColor]; + [colorSpans addObject:[GMSStyleSpan spanWithStyle:style]]; + + prevColor = toColor; + } + return colorSpans; +} + +- (void)parseTrackFile { + NSString *filePath = [[NSBundle mainBundle] pathForResource:@"track" ofType:@"json"]; + NSData *data = [NSData dataWithContentsOfFile:filePath]; + NSArray *json = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil]; + trackData_ = [[NSMutableArray alloc] init]; + GMSMutablePath *path = [GMSMutablePath path]; + + for (NSUInteger i = 0; i < [json count]; i++) { + NSDictionary *info = [json objectAtIndex:i]; + NSNumber *elevation = [info objectForKey:@"elevation"]; + CLLocationDegrees lat = [[info objectForKey:@"lat"] doubleValue]; + CLLocationDegrees lng = [[info objectForKey:@"lng"] doubleValue]; + CLLocation *loc = [[CLLocation alloc] initWithLatitude:lat longitude:lng]; + [trackData_ addObject:@{@"loc": loc, @"elevation": elevation}]; + [path addLatitude:lat longitude:lng]; + } + + polyline_ = [GMSPolyline polylineWithPath:path]; + polyline_.strokeWidth = 6; + polyline_.map = mapView_; +} + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/GroundOverlayViewController.h b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/GroundOverlayViewController.h new file mode 100644 index 0000000..e9bfa76 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/GroundOverlayViewController.h @@ -0,0 +1,5 @@ +#import + +@interface GroundOverlayViewController : UIViewController + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/GroundOverlayViewController.m b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/GroundOverlayViewController.m new file mode 100644 index 0000000..bfb200a --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/GroundOverlayViewController.m @@ -0,0 +1,41 @@ +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "SDKDemos/Samples/GroundOverlayViewController.h" + +#import + +@implementation GroundOverlayViewController { + GMSGroundOverlay *overlay_; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + + CLLocationCoordinate2D southWest = CLLocationCoordinate2DMake(40.712216, -74.22655); + CLLocationCoordinate2D northEast = CLLocationCoordinate2DMake(40.773941, -74.12544); + + GMSCoordinateBounds *overlayBounds = [[GMSCoordinateBounds alloc] initWithCoordinate:southWest + coordinate:northEast]; + + // Choose the midpoint of the coordinate to focus the camera on. + CLLocationCoordinate2D newark = GMSGeometryInterpolate(southWest, northEast, 0.5); + GMSCameraPosition *camera = [GMSCameraPosition cameraWithTarget:newark + zoom:12 + bearing:0 + viewingAngle:45]; + GMSMapView *mapView = [GMSMapView mapWithFrame:CGRectZero camera:camera]; + + // Add the ground overlay, centered in Newark, NJ + GMSGroundOverlay *groundOverlay = [[GMSGroundOverlay alloc] init]; + // Image from http://www.lib.utexas.edu/maps/historical/newark_nj_1922.jpg + groundOverlay.icon = [UIImage imageNamed:@"newark_nj_1922.jpg"]; + groundOverlay.position = newark; + groundOverlay.bounds = overlayBounds; + groundOverlay.map = mapView; + + self.view = mapView; +} + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/IndoorMuseumNavigationViewController.h b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/IndoorMuseumNavigationViewController.h new file mode 100644 index 0000000..1dc3756 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/IndoorMuseumNavigationViewController.h @@ -0,0 +1,9 @@ +#import + +#import + +@interface IndoorMuseumNavigationViewController : UIViewController< + GMSMapViewDelegate, + GMSIndoorDisplayDelegate> + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/IndoorMuseumNavigationViewController.m b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/IndoorMuseumNavigationViewController.m new file mode 100644 index 0000000..ca393b6 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/IndoorMuseumNavigationViewController.m @@ -0,0 +1,115 @@ +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "SDKDemos/Samples/IndoorMuseumNavigationViewController.h" + +@implementation IndoorMuseumNavigationViewController { + GMSMapView *mapView_; + NSArray *exhibits_; // Array of JSON exhibit data. + NSDictionary *exhibit_; // The currently selected exhibit. Will be nil initially. + GMSMarker *marker_; + NSDictionary *levels_; // The levels dictionary is updated when a new building is selected, and + // contains mapping from localized level name to GMSIndoorLevel. +} + +- (void)viewDidLoad { + [super viewDidLoad]; + + GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:38.8879 + longitude:-77.0200 + zoom:17]; + mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera]; + mapView_.settings.myLocationButton = NO; + mapView_.settings.indoorPicker = NO; + mapView_.delegate = self; + mapView_.indoorDisplay.delegate = self; + + self.view = mapView_; + + // Load the exhibits configuration from JSON + NSString *jsonPath = [[NSBundle mainBundle] pathForResource:@"museum-exhibits" ofType:@"json"]; + NSData *data = [NSData dataWithContentsOfFile:jsonPath]; + exhibits_ = [NSJSONSerialization JSONObjectWithData:data + options:kNilOptions + error:nil]; + + + UISegmentedControl *segmentedControl = [[UISegmentedControl alloc] init]; + [segmentedControl setTintColor:[UIColor colorWithRed:0.373f green:0.667f blue:0.882f alpha:1.0f]]; + + segmentedControl.translatesAutoresizingMaskIntoConstraints = NO; + [segmentedControl addTarget:self + action:@selector(exhibitSelected:) + forControlEvents:UIControlEventValueChanged]; + [self.view addSubview:segmentedControl]; + + for (NSDictionary *exhibit in exhibits_) { + [segmentedControl insertSegmentWithImage:[UIImage imageNamed:exhibit[@"key"]] + atIndex:[exhibits_ indexOfObject:exhibit] + animated:NO]; + } + + NSDictionary *views = NSDictionaryOfVariableBindings(segmentedControl); + + [self.view addConstraints:[NSLayoutConstraint + constraintsWithVisualFormat:@"[segmentedControl]-|" + options:kNilOptions + metrics:nil + views:views]]; + [self.view addConstraints:[NSLayoutConstraint + constraintsWithVisualFormat:@"V:[segmentedControl]-|" + options:kNilOptions + metrics:nil + views:views]]; + +} + +- (void)moveMarker { + CLLocationCoordinate2D loc = CLLocationCoordinate2DMake([exhibit_[@"lat"] doubleValue], + [exhibit_[@"lng"] doubleValue]); + if (marker_ == nil) { + marker_ = [GMSMarker markerWithPosition:loc]; + marker_.map = mapView_; + } else { + marker_.position = loc; + } + marker_.title = exhibit_[@"name"]; + [mapView_ animateToLocation:loc]; + [mapView_ animateToZoom:19]; +} + +- (void)exhibitSelected:(UISegmentedControl *)segmentedControl { + exhibit_ = exhibits_[[segmentedControl selectedSegmentIndex]]; + [self moveMarker]; +} + +#pragma mark - GMSMapViewDelegate + +- (void)mapView:(GMSMapView *)mapView idleAtCameraPosition:(GMSCameraPosition *)camera { + if (exhibit_ != nil) { + CLLocationCoordinate2D loc = CLLocationCoordinate2DMake([exhibit_[@"lat"] doubleValue], + [exhibit_[@"lng"] doubleValue]); + if ([mapView_.projection containsCoordinate:loc] && levels_ != nil) { + [mapView.indoorDisplay setActiveLevel:levels_[exhibit_[@"level"]]]; + } + } +} + +#pragma mark - GMSIndoorDisplayDelegate + +- (void)didChangeActiveBuilding:(GMSIndoorBuilding *)building { + if (building != nil) { + NSMutableDictionary *levels = [NSMutableDictionary dictionary]; + + for (GMSIndoorLevel *level in building.levels) { + [levels setObject:level forKey:level.shortName]; + } + + levels_ = [NSDictionary dictionaryWithDictionary:levels]; + } else { + levels_ = nil; + } +} + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/IndoorViewController.h b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/IndoorViewController.h new file mode 100644 index 0000000..95c10e1 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/IndoorViewController.h @@ -0,0 +1,5 @@ +#import + +@interface IndoorViewController : UIViewController + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/IndoorViewController.m b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/IndoorViewController.m new file mode 100644 index 0000000..6d849e3 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/IndoorViewController.m @@ -0,0 +1,26 @@ +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "SDKDemos/Samples/IndoorViewController.h" + +#import + +@implementation IndoorViewController { + GMSMapView *mapView_; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:37.78318 + longitude:-122.403874 + zoom:18]; + + mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera]; + mapView_.settings.myLocationButton = YES; + + self.view = mapView_; +} + + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MapLayerViewController.h b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MapLayerViewController.h new file mode 100644 index 0000000..6bc88e4 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MapLayerViewController.h @@ -0,0 +1,5 @@ +#import + +@interface MapLayerViewController : UIViewController + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MapLayerViewController.m b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MapLayerViewController.m new file mode 100644 index 0000000..40b31b0 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MapLayerViewController.m @@ -0,0 +1,79 @@ +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "SDKDemos/Samples/MapLayerViewController.h" + +#import + +@implementation MapLayerViewController { + GMSMapView *mapView_; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-37.81969 + longitude:144.966085 + zoom:4]; + mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera]; + self.view = mapView_; + + dispatch_async(dispatch_get_main_queue(), ^{ + mapView_.myLocationEnabled = YES; + }); + + UIBarButtonItem *myLocationButton = + [[UIBarButtonItem alloc] initWithTitle:@"Fly to My Location" + style:UIBarButtonItemStylePlain + target:self + action:@selector(didTapMyLocation)]; + self.navigationItem.rightBarButtonItem = myLocationButton; + +} + +- (void)didTapMyLocation { + CLLocation *location = mapView_.myLocation; + if (!location || !CLLocationCoordinate2DIsValid(location.coordinate)) { + return; + } + + mapView_.layer.cameraLatitude = location.coordinate.latitude; + mapView_.layer.cameraLongitude = location.coordinate.longitude; + mapView_.layer.cameraBearing = 0.0; + + // Access the GMSMapLayer directly to modify the following properties with a + // specified timing function and duration. + + CAMediaTimingFunction *curve = + [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; + CABasicAnimation *animation; + + animation = [CABasicAnimation animationWithKeyPath:kGMSLayerCameraLatitudeKey]; + animation.duration = 2.0f; + animation.timingFunction = curve; + animation.toValue = @(location.coordinate.latitude); + [mapView_.layer addAnimation:animation forKey:kGMSLayerCameraLatitudeKey]; + + animation = [CABasicAnimation animationWithKeyPath:kGMSLayerCameraLongitudeKey]; + animation.duration = 2.0f; + animation.timingFunction = curve; + animation.toValue = @(location.coordinate.longitude); + [mapView_.layer addAnimation:animation forKey:kGMSLayerCameraLongitudeKey]; + + animation = [CABasicAnimation animationWithKeyPath:kGMSLayerCameraBearingKey]; + animation.duration = 2.0f; + animation.timingFunction = curve; + animation.toValue = @0.0; + [mapView_.layer addAnimation:animation forKey:kGMSLayerCameraBearingKey]; + + // Fly out to the minimum zoom and then zoom back to the current zoom! + CGFloat zoom = mapView_.camera.zoom; + NSArray *keyValues = @[@(zoom), @(kGMSMinZoomLevel), @(zoom)]; + CAKeyframeAnimation *keyFrameAnimation = + [CAKeyframeAnimation animationWithKeyPath:kGMSLayerCameraZoomLevelKey]; + keyFrameAnimation.duration = 2.0f; + keyFrameAnimation.values = keyValues; + [mapView_.layer addAnimation:keyFrameAnimation forKey:kGMSLayerCameraZoomLevelKey]; +} + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MapTypesViewController.h b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MapTypesViewController.h new file mode 100644 index 0000000..33f5b67 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MapTypesViewController.h @@ -0,0 +1,5 @@ +#import + +@interface MapTypesViewController : UIViewController + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MapTypesViewController.m b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MapTypesViewController.m new file mode 100644 index 0000000..6d256c6 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MapTypesViewController.m @@ -0,0 +1,60 @@ +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "SDKDemos/Samples/MapTypesViewController.h" + +#import + +static NSString const * kNormalType = @"Normal"; +static NSString const * kSatelliteType = @"Satellite"; +static NSString const * kHybridType = @"Hybrid"; +static NSString const * kTerrainType = @"Terrain"; + +@implementation MapTypesViewController { + UISegmentedControl *switcher_; + GMSMapView *mapView_; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + + GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-33.868 + longitude:151.2086 + zoom:12]; + + mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera]; + self.view = mapView_; + + // The possible different types to show. + NSArray *types = @[kNormalType, kSatelliteType, kHybridType, kTerrainType]; + + // Create a UISegmentedControl that is the navigationItem's titleView. + switcher_ = [[UISegmentedControl alloc] initWithItems:types]; + switcher_.autoresizingMask = UIViewAutoresizingFlexibleBottomMargin | + UIViewAutoresizingFlexibleWidth | + UIViewAutoresizingFlexibleBottomMargin; + switcher_.selectedSegmentIndex = 0; + self.navigationItem.titleView = switcher_; + + // Listen to touch events on the UISegmentedControl. + [switcher_ addTarget:self action:@selector(didChangeSwitcher) + forControlEvents:UIControlEventValueChanged]; +} + +- (void)didChangeSwitcher { + // Switch to the type clicked on. + NSString *title = + [switcher_ titleForSegmentAtIndex:switcher_.selectedSegmentIndex]; + if ([kNormalType isEqualToString:title]) { + mapView_.mapType = kGMSTypeNormal; + } else if ([kSatelliteType isEqualToString:title]) { + mapView_.mapType = kGMSTypeSatellite; + } else if ([kHybridType isEqualToString:title]) { + mapView_.mapType = kGMSTypeHybrid; + } else if ([kTerrainType isEqualToString:title]) { + mapView_.mapType = kGMSTypeTerrain; + } +} + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MapZoomViewController.h b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MapZoomViewController.h new file mode 100644 index 0000000..d610aa9 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MapZoomViewController.h @@ -0,0 +1,5 @@ +#import + +@interface MapZoomViewController : UIViewController + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MapZoomViewController.m b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MapZoomViewController.m new file mode 100644 index 0000000..2371f87 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MapZoomViewController.m @@ -0,0 +1,73 @@ +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "SDKDemos/Samples/MapZoomViewController.h" + +#import + +@implementation MapZoomViewController { + GMSMapView *mapView_; + UITextView *zoomRangeView_; + NSUInteger nextMode_; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-33.868 + longitude:151.2086 + zoom:6]; + mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera]; + mapView_.settings.scrollGestures = NO; + self.view = mapView_; + + // Add a display for the current zoom range restriction. + zoomRangeView_ = [[UITextView alloc] init]; + zoomRangeView_.frame = + CGRectMake(0, 0, CGRectGetWidth(self.view.frame), 0); + zoomRangeView_.text = @""; + zoomRangeView_.textAlignment = NSTextAlignmentCenter; + zoomRangeView_.backgroundColor = [UIColor colorWithWhite:1.0 alpha:0.8f]; + zoomRangeView_.autoresizingMask = UIViewAutoresizingFlexibleWidth; + [self.view addSubview:zoomRangeView_]; + [zoomRangeView_ sizeToFit]; + [self didTapNext]; + + // Add a button toggling through modes. + self.navigationItem.rightBarButtonItem = + [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemPlay + target:self + action:@selector(didTapNext)]; +} + +- (void)didTapNext { + NSString *label = @""; + float minZoom = kGMSMinZoomLevel; + float maxZoom = kGMSMaxZoomLevel; + + switch (nextMode_) { + case 0: + label = @"Default"; + break; + case 1: + minZoom = 18; + label = @"Zoomed in"; + break; + case 2: + maxZoom = 8; + label = @"Zoomed out"; + break; + case 3: + minZoom = 10; + maxZoom = 11.5; + label = @"Small range"; + break; + } + nextMode_ = (nextMode_ + 1) % 4; + + [mapView_ setMinZoom:minZoom maxZoom:maxZoom]; + zoomRangeView_.text = + [NSString stringWithFormat:@"%@ (%.2f - %.2f)", label, mapView_.minZoom, mapView_.maxZoom]; +} + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MarkerEventsViewController.h b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MarkerEventsViewController.h new file mode 100644 index 0000000..414b293 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MarkerEventsViewController.h @@ -0,0 +1,7 @@ +#import + +#import + +@interface MarkerEventsViewController : UIViewController + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MarkerEventsViewController.m b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MarkerEventsViewController.m new file mode 100644 index 0000000..ad498c7 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MarkerEventsViewController.m @@ -0,0 +1,70 @@ +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "SDKDemos/Samples/MarkerEventsViewController.h" + +#import + +#import + +@implementation MarkerEventsViewController { + GMSMapView *mapView_; + GMSMarker *melbourneMarker_; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-37.81969 + longitude:144.966085 + zoom:4]; + mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera]; + + GMSMarker *sydneyMarker = [[GMSMarker alloc] init]; + sydneyMarker.position = CLLocationCoordinate2DMake(-33.8683, 151.2086); + sydneyMarker.map = mapView_; + + melbourneMarker_ = [[GMSMarker alloc] init]; + melbourneMarker_.position = CLLocationCoordinate2DMake(-37.81969, 144.966085); + melbourneMarker_.map = mapView_; + + mapView_.delegate = self; + self.view = mapView_; +} + +#pragma mark - GMSMapViewDelegate + +- (UIView *)mapView:(GMSMapView *)mapView markerInfoWindow:(GMSMarker *)marker { + if (marker == melbourneMarker_) { + return [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Icon"]]; + } + + return nil; +} + +- (BOOL)mapView:(GMSMapView *)mapView didTapMarker:(GMSMarker *)marker { + // Animate to the marker + [CATransaction begin]; + [CATransaction setAnimationDuration:3.f]; // 3 second animation + + GMSCameraPosition *camera = + [[GMSCameraPosition alloc] initWithTarget:marker.position + zoom:8 + bearing:50 + viewingAngle:60]; + [mapView animateToCameraPosition:camera]; + [CATransaction commit]; + + // Melbourne marker has a InfoWindow so return NO to allow markerInfoWindow to + // fire. Also check that the marker isn't already selected so that the + // InfoWindow doesn't close. + if (marker == melbourneMarker_ && + mapView.selectedMarker != melbourneMarker_) { + return NO; + } + + // The Tap has been handled so return YES + return YES; +} + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MarkerInfoWindowViewController.h b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MarkerInfoWindowViewController.h new file mode 100644 index 0000000..74c7953 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MarkerInfoWindowViewController.h @@ -0,0 +1,5 @@ +#import + +@interface MarkerInfoWindowViewController : UIViewController + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MarkerInfoWindowViewController.m b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MarkerInfoWindowViewController.m new file mode 100644 index 0000000..5f6c931 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MarkerInfoWindowViewController.m @@ -0,0 +1,73 @@ +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "SDKDemos/Samples/MarkerInfoWindowViewController.h" + +#import + +@interface MarkerInfoWindowViewController () +@end + +@implementation MarkerInfoWindowViewController { + GMSMarker *_sydneyMarker; + GMSMarker *_melbourneMarker; + GMSMarker *_brisbaneMarker; + UIView *_contentView; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-37.81969 + longitude:144.966085 + zoom:4]; + GMSMapView *mapView = [GMSMapView mapWithFrame:CGRectZero camera:camera]; + + + _sydneyMarker = [[GMSMarker alloc] init]; + _sydneyMarker.title = @"Sydney"; + _sydneyMarker.snippet = @"Population: 4,605,992"; + _sydneyMarker.position = CLLocationCoordinate2DMake(-33.8683, 151.2086); + _sydneyMarker.map = mapView; + NSLog(@"sydneyMarker: %@", _sydneyMarker); + + + _melbourneMarker.map = nil; + _melbourneMarker = [[GMSMarker alloc] init]; + _melbourneMarker.title = @"Melbourne"; + _melbourneMarker.snippet = @"Population: 4,169,103"; + _melbourneMarker.position = CLLocationCoordinate2DMake(-37.81969, 144.966085); + _melbourneMarker.map = mapView; + NSLog(@"melbourneMarker: %@", _melbourneMarker); + + _brisbaneMarker.map = nil; + _brisbaneMarker = [[GMSMarker alloc] init]; + _brisbaneMarker.title = @"Brisbane"; + _brisbaneMarker.snippet = @"Population: 2,189,878"; + _brisbaneMarker.position = CLLocationCoordinate2DMake(-27.4710107, 153.0234489); + _brisbaneMarker.map = mapView; + NSLog(@"brisbaneMarker: %@", _brisbaneMarker); + + _contentView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"aeroplane"]]; + + mapView.delegate = self; + self.view = mapView; +} + +#pragma mark GMSMapViewDelegate + +- (UIView *)mapView:(GMSMapView *)mapView markerInfoWindow:(GMSMarker *)marker { + if (marker == _sydneyMarker) { + return _contentView; + } + return nil; +} + +- (UIView *)mapView:(GMSMapView *)mapView markerInfoContents:(GMSMarker *)marker { + if (marker == _brisbaneMarker) { + return _contentView; + } + return nil; +} + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MarkerLayerViewController.h b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MarkerLayerViewController.h new file mode 100644 index 0000000..d40e364 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MarkerLayerViewController.h @@ -0,0 +1,7 @@ +#import + +#import + +@interface MarkerLayerViewController : UIViewController + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MarkerLayerViewController.m b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MarkerLayerViewController.m new file mode 100644 index 0000000..0bc8992 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MarkerLayerViewController.m @@ -0,0 +1,137 @@ +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "SDKDemos/Samples/MarkerLayerViewController.h" + +#import + +@interface CoordsList : NSObject +@property(nonatomic, readonly, copy) GMSPath *path; +@property(nonatomic, readonly) NSUInteger target; + +- (id)initWithPath:(GMSPath *)path; + +- (CLLocationCoordinate2D)next; + +@end + +@implementation CoordsList + +- (id)initWithPath:(GMSPath *)path { + if ((self = [super init])) { + _path = [path copy]; + _target = 0; + } + return self; +} + +- (CLLocationCoordinate2D)next { + ++_target; + if (_target == [_path count]) { + _target = 0; + } + return [_path coordinateAtIndex:_target]; +} + +@end + +@implementation MarkerLayerViewController { + GMSMapView *mapView_; + GMSMarker *fadedMarker_; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + mapView_ = [[GMSMapView alloc] init]; + mapView_.camera = [GMSCameraPosition cameraWithLatitude:50.6042 longitude:3.9599 zoom:5]; + mapView_.delegate = self; + self.view = mapView_; + + GMSMutablePath *coords; + GMSMarker *marker; + + // Create a plane that flies to several airports around western Europe. + coords = [GMSMutablePath path]; + [coords addLatitude:52.310683 longitude:4.765121]; + [coords addLatitude:51.471386 longitude:-0.457148]; + [coords addLatitude:49.01378 longitude:2.5542943]; + [coords addLatitude:50.036194 longitude:8.554519]; + marker = [GMSMarker markerWithPosition:[coords coordinateAtIndex:0]]; + marker.icon = [UIImage imageNamed:@"aeroplane"]; + marker.groundAnchor = CGPointMake(0.5f, 0.5f); + marker.flat = YES; + marker.map = mapView_; + marker.userData = [[CoordsList alloc] initWithPath:coords]; + [self animateToNextCoord:marker]; + + // Create a boat that moves around the Baltic Sea. + coords = [GMSMutablePath path]; + [coords addLatitude:57.598335 longitude:11.290512]; + [coords addLatitude:55.665193 longitude:10.741196]; + [coords addLatitude:55.065787 longitude:11.083488]; + [coords addLatitude:54.699234 longitude:10.863762]; + [coords addLatitude:54.482805 longitude:12.061272]; + [coords addLatitude:55.819802 longitude:16.148186]; // final point + [coords addLatitude:54.927142 longitude:16.455803]; // final point + [coords addLatitude:54.482805 longitude:12.061272]; // and back again + [coords addLatitude:54.699234 longitude:10.863762]; + [coords addLatitude:55.065787 longitude:11.083488]; + [coords addLatitude:55.665193 longitude:10.741196]; + marker = [GMSMarker markerWithPosition:[coords coordinateAtIndex:0]]; + marker.icon = [UIImage imageNamed:@"boat"]; + marker.map = mapView_; + marker.userData = [[CoordsList alloc] initWithPath:coords]; + [self animateToNextCoord:marker]; +} + +- (void)animateToNextCoord:(GMSMarker *)marker { + CoordsList *coords = marker.userData; + CLLocationCoordinate2D coord = [coords next]; + CLLocationCoordinate2D previous = marker.position; + + CLLocationDirection heading = GMSGeometryHeading(previous, coord); + CLLocationDistance distance = GMSGeometryDistance(previous, coord); + + // Use CATransaction to set a custom duration for this animation. By default, changes to the + // position are already animated, but with a very short default duration. When the animation is + // complete, trigger another animation step. + + [CATransaction begin]; + [CATransaction setAnimationDuration:(distance / (50 * 1000))]; // custom duration, 50km/sec + + __weak MarkerLayerViewController *weakSelf = self; + [CATransaction setCompletionBlock:^{ + [weakSelf animateToNextCoord:marker]; + }]; + + marker.position = coord; + + [CATransaction commit]; + + // If this marker is flat, implicitly trigger a change in rotation, which will finish quickly. + if (marker.flat) { + marker.rotation = heading; + } +} + +- (void)fadeMarker:(GMSMarker *)marker { + fadedMarker_.opacity = 1.0f; // reset previous faded marker + + // Fade this new marker. + fadedMarker_ = marker; + fadedMarker_.opacity = 0.5f; +} + +#pragma mark - GMSMapViewDelegate + +- (BOOL)mapView:(GMSMapView *)mapView didTapMarker:(GMSMarker *)marker { + [self fadeMarker:marker]; + return YES; +} + +- (void)mapView:(GMSMapView *)mapView didTapAtCoordinate:(CLLocationCoordinate2D)coordinate { + [self fadeMarker:nil]; +} + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MarkersViewController.h b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MarkersViewController.h new file mode 100644 index 0000000..f9eaeee --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MarkersViewController.h @@ -0,0 +1,5 @@ +#import + +@interface MarkersViewController : UIViewController + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MarkersViewController.m b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MarkersViewController.m new file mode 100644 index 0000000..b00ec08 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MarkersViewController.m @@ -0,0 +1,63 @@ +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "SDKDemos/Samples/MarkersViewController.h" + +#import + +@implementation MarkersViewController { + GMSMarker *_sydneyMarker; + GMSMarker *_melbourneMarker; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-37.81969 + longitude:144.966085 + zoom:4]; + GMSMapView *mapView = [GMSMapView mapWithFrame:CGRectZero camera:camera]; + + _sydneyMarker = [[GMSMarker alloc] init]; + _sydneyMarker.title = @"Sydney"; + _sydneyMarker.snippet = @"Population: 4,605,992"; + _sydneyMarker.position = CLLocationCoordinate2DMake(-33.8683, 151.2086); + _sydneyMarker.flat = NO; + _sydneyMarker.rotation = 30.0; + NSLog(@"sydneyMarker: %@", _sydneyMarker); + + GMSMarker *australiaMarker = [[GMSMarker alloc] init]; + australiaMarker.title = @"Australia"; + australiaMarker.position = CLLocationCoordinate2DMake(-27.994401,140.07019); + australiaMarker.appearAnimation = kGMSMarkerAnimationPop; + australiaMarker.flat = YES; + australiaMarker.draggable = YES; + australiaMarker.groundAnchor = CGPointMake(0.5, 0.5); + australiaMarker.icon = [UIImage imageNamed:@"australia"]; + australiaMarker.map = mapView; + + // Set the marker in Sydney to be selected + mapView.selectedMarker = _sydneyMarker; + + self.view = mapView; + self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(didTapAdd)]; +} + +- (void)didTapAdd { + if (_sydneyMarker.map == nil) { + _sydneyMarker.map = (GMSMapView *)self.view; +// _sydneyMarker.rotation += 45.0; + } else { + _sydneyMarker.map = nil; + } + + _melbourneMarker.map = nil; + _melbourneMarker = [[GMSMarker alloc] init]; + _melbourneMarker.title = @"Melbourne"; + _melbourneMarker.snippet = @"Population: 4,169,103"; + _melbourneMarker.position = CLLocationCoordinate2DMake(-37.81969, 144.966085); + _melbourneMarker.map = (GMSMapView *)self.view; +} + + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MyLocationViewController.h b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MyLocationViewController.h new file mode 100644 index 0000000..a592024 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MyLocationViewController.h @@ -0,0 +1,5 @@ +#import + +@interface MyLocationViewController : UIViewController + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MyLocationViewController.m b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MyLocationViewController.m new file mode 100644 index 0000000..baff8da --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/MyLocationViewController.m @@ -0,0 +1,60 @@ +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "SDKDemos/Samples/MyLocationViewController.h" + +#import + +@implementation MyLocationViewController { + GMSMapView *mapView_; + BOOL firstLocationUpdate_; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-33.868 + longitude:151.2086 + zoom:12]; + + mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera]; + mapView_.settings.compassButton = YES; + mapView_.settings.myLocationButton = YES; + + // Listen to the myLocation property of GMSMapView. + [mapView_ addObserver:self + forKeyPath:@"myLocation" + options:NSKeyValueObservingOptionNew + context:NULL]; + + self.view = mapView_; + + // Ask for My Location data after the map has already been added to the UI. + dispatch_async(dispatch_get_main_queue(), ^{ + mapView_.myLocationEnabled = YES; + }); +} + +- (void)dealloc { + [mapView_ removeObserver:self + forKeyPath:@"myLocation" + context:NULL]; +} + +#pragma mark - KVO updates + +- (void)observeValueForKeyPath:(NSString *)keyPath + ofObject:(id)object + change:(NSDictionary *)change + context:(void *)context { + if (!firstLocationUpdate_) { + // If the first location update has not yet been recieved, then jump to that + // location. + firstLocationUpdate_ = YES; + CLLocation *location = [change objectForKey:NSKeyValueChangeNewKey]; + mapView_.camera = [GMSCameraPosition cameraWithTarget:location.coordinate + zoom:14]; + } +} + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/PanoramaViewController.h b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/PanoramaViewController.h new file mode 100644 index 0000000..3d65447 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/PanoramaViewController.h @@ -0,0 +1,5 @@ +#import + +@interface PanoramaViewController : UIViewController + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/PanoramaViewController.m b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/PanoramaViewController.m new file mode 100644 index 0000000..c4ce998 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/PanoramaViewController.m @@ -0,0 +1,53 @@ +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "SDKDemos/Samples/PanoramaViewController.h" + +#import + +static CLLocationCoordinate2D kPanoramaNear = {40.761388, -73.978133}; +static CLLocationCoordinate2D kMarkerAt = {40.761455, -73.977814}; + +@interface PanoramaViewController () +@end + +@implementation PanoramaViewController { + GMSPanoramaView *view_; + BOOL configured_; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + + view_ = [GMSPanoramaView panoramaWithFrame:CGRectZero + nearCoordinate:kPanoramaNear]; + view_.backgroundColor = [UIColor grayColor]; + view_.delegate = self; + self.view = view_; +} + +#pragma mark - GMSPanoramaDelegate + +- (void)panoramaView:(GMSPanoramaView *)panoramaView + didMoveCamera:(GMSPanoramaCamera *)camera { + NSLog(@"Camera: (%f,%f,%f)", + camera.orientation.heading, camera.orientation.pitch, camera.zoom); +} + +- (void)panoramaView:(GMSPanoramaView *)view + didMoveToPanorama:(GMSPanorama *)panorama { + if (!configured_) { + GMSMarker *marker = [GMSMarker markerWithPosition:kMarkerAt]; + marker.icon = [GMSMarker markerImageWithColor:[UIColor purpleColor]]; + marker.panoramaView = view_; + + CLLocationDegrees heading = GMSGeometryHeading(kPanoramaNear, kMarkerAt); + view_.camera = + [GMSPanoramaCamera cameraWithHeading:heading pitch:0 zoom:1]; + + configured_ = YES; + } +} + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/PolygonsViewController.h b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/PolygonsViewController.h new file mode 100644 index 0000000..2a7cf41 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/PolygonsViewController.h @@ -0,0 +1,7 @@ +#import + +#import + +@interface PolygonsViewController : UIViewController + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/PolygonsViewController.m b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/PolygonsViewController.m new file mode 100644 index 0000000..e3495ee --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/PolygonsViewController.m @@ -0,0 +1,246 @@ +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "SDKDemos/Samples/PolygonsViewController.h" + +#import + +@implementation PolygonsViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:39.13006 + longitude:-77.508545 + zoom:4]; + GMSMapView *mapView = [GMSMapView mapWithFrame:CGRectZero camera:camera]; + mapView.delegate = self; // needed for didTapOverlay delegate method + + // Create the first polygon. + GMSPolygon *polygon = [[GMSPolygon alloc] init]; + polygon.path = [self pathOfNewYorkState]; + polygon.title = @"New York"; + polygon.fillColor = [UIColor colorWithRed:0.25 green:0 blue:0 alpha:0.2f]; + polygon.strokeColor = [UIColor blackColor]; + polygon.strokeWidth = 2; + polygon.tappable = YES; + polygon.map = mapView; + + // Copy the existing polygon and its settings and use it as a base for the + // second polygon. + polygon = [polygon copy]; + polygon.title = @"North Carolina"; + polygon.path = [self pathOfNorthCarolina]; + polygon.fillColor = [UIColor colorWithRed:0 green:0.25 blue:0 alpha:0.5]; + polygon.map = mapView; + + self.view = mapView; +} + +- (void)mapView:(GMSMapView *)mapView didTapOverlay:(GMSOverlay *)overlay { + // When a polygon is tapped, randomly change its fill color to a new hue. + if ([overlay isKindOfClass:[GMSPolygon class]]) { + GMSPolygon *polygon = (GMSPolygon *)overlay; + CGFloat hue = (((float)arc4random()/0x100000000)*1.0f); + polygon.fillColor = + [UIColor colorWithHue:hue saturation:1 brightness:1 alpha:0.5]; + } +} + +- (GMSPath *)pathOfNewYorkState { + GMSMutablePath *path = [GMSMutablePath path]; + [path addLatitude:42.5142 longitude:-79.7624]; + [path addLatitude:42.7783 longitude:-79.0672]; + [path addLatitude:42.8508 longitude:-78.9313]; + [path addLatitude:42.9061 longitude:-78.9024]; + [path addLatitude:42.9554 longitude:-78.9313]; + [path addLatitude:42.9584 longitude:-78.9656]; + [path addLatitude:42.9886 longitude:-79.0219]; + [path addLatitude:43.0568 longitude:-79.0027]; + [path addLatitude:43.0769 longitude:-79.0727]; + [path addLatitude:43.1220 longitude:-79.0713]; + [path addLatitude:43.1441 longitude:-79.0302]; + [path addLatitude:43.1801 longitude:-79.0576]; + [path addLatitude:43.2482 longitude:-79.0604]; + [path addLatitude:43.2812 longitude:-79.0837]; + [path addLatitude:43.4509 longitude:-79.2004]; + [path addLatitude:43.6311 longitude:-78.6909]; + [path addLatitude:43.6321 longitude:-76.7958]; + [path addLatitude:43.9987 longitude:-76.4978]; + [path addLatitude:44.0965 longitude:-76.4388]; + [path addLatitude:44.1349 longitude:-76.3536]; + [path addLatitude:44.1989 longitude:-76.3124]; + [path addLatitude:44.2049 longitude:-76.2437]; + [path addLatitude:44.2413 longitude:-76.1655]; + [path addLatitude:44.2973 longitude:-76.1353]; + [path addLatitude:44.3327 longitude:-76.0474]; + [path addLatitude:44.3553 longitude:-75.9856]; + [path addLatitude:44.3749 longitude:-75.9196]; + [path addLatitude:44.3994 longitude:-75.8730]; + [path addLatitude:44.4308 longitude:-75.8221]; + [path addLatitude:44.4740 longitude:-75.8098]; + [path addLatitude:44.5425 longitude:-75.7288]; + [path addLatitude:44.6647 longitude:-75.5585]; + [path addLatitude:44.7672 longitude:-75.4088]; + [path addLatitude:44.8101 longitude:-75.3442]; + [path addLatitude:44.8383 longitude:-75.3058]; + [path addLatitude:44.8676 longitude:-75.2399]; + [path addLatitude:44.9211 longitude:-75.1204]; + [path addLatitude:44.9609 longitude:-74.9995]; + [path addLatitude:44.9803 longitude:-74.9899]; + [path addLatitude:44.9852 longitude:-74.9103]; + [path addLatitude:45.0017 longitude:-74.8856]; + [path addLatitude:45.0153 longitude:-74.8306]; + [path addLatitude:45.0046 longitude:-74.7633]; + [path addLatitude:45.0027 longitude:-74.7070]; + [path addLatitude:45.0007 longitude:-74.5642]; + [path addLatitude:44.9920 longitude:-74.1467]; + [path addLatitude:45.0037 longitude:-73.7306]; + [path addLatitude:45.0085 longitude:-73.4203]; + [path addLatitude:45.0109 longitude:-73.3430]; + [path addLatitude:44.9874 longitude:-73.3547]; + [path addLatitude:44.9648 longitude:-73.3379]; + [path addLatitude:44.9160 longitude:-73.3396]; + [path addLatitude:44.8354 longitude:-73.3739]; + [path addLatitude:44.8013 longitude:-73.3324]; + [path addLatitude:44.7419 longitude:-73.3667]; + [path addLatitude:44.6139 longitude:-73.3873]; + [path addLatitude:44.5787 longitude:-73.3736]; + [path addLatitude:44.4916 longitude:-73.3049]; + [path addLatitude:44.4289 longitude:-73.2953]; + [path addLatitude:44.3513 longitude:-73.3365]; + [path addLatitude:44.2757 longitude:-73.3118]; + [path addLatitude:44.1980 longitude:-73.3818]; + [path addLatitude:44.1142 longitude:-73.4079]; + [path addLatitude:44.0511 longitude:-73.4367]; + [path addLatitude:44.0165 longitude:-73.4065]; + [path addLatitude:43.9375 longitude:-73.4079]; + [path addLatitude:43.8771 longitude:-73.3749]; + [path addLatitude:43.8167 longitude:-73.3914]; + [path addLatitude:43.7790 longitude:-73.3557]; + [path addLatitude:43.6460 longitude:-73.4244]; + [path addLatitude:43.5893 longitude:-73.4340]; + [path addLatitude:43.5655 longitude:-73.3969]; + [path addLatitude:43.6112 longitude:-73.3818]; + [path addLatitude:43.6271 longitude:-73.3049]; + [path addLatitude:43.5764 longitude:-73.3063]; + [path addLatitude:43.5675 longitude:-73.2582]; + [path addLatitude:43.5227 longitude:-73.2445]; + [path addLatitude:43.2582 longitude:-73.2582]; + [path addLatitude:42.9715 longitude:-73.2733]; + [path addLatitude:42.8004 longitude:-73.2898]; + [path addLatitude:42.7460 longitude:-73.2664]; + [path addLatitude:42.4630 longitude:-73.3708]; + [path addLatitude:42.0840 longitude:-73.5095]; + [path addLatitude:42.0218 longitude:-73.4903]; + [path addLatitude:41.8808 longitude:-73.4999]; + [path addLatitude:41.2953 longitude:-73.5535]; + [path addLatitude:41.2128 longitude:-73.4834]; + [path addLatitude:41.1011 longitude:-73.7275]; + [path addLatitude:41.0237 longitude:-73.6644]; + [path addLatitude:40.9851 longitude:-73.6578]; + [path addLatitude:40.9509 longitude:-73.6132]; + [path addLatitude:41.1869 longitude:-72.4823]; + [path addLatitude:41.2551 longitude:-72.0950]; + [path addLatitude:41.3005 longitude:-71.9714]; + [path addLatitude:41.3108 longitude:-71.9193]; + [path addLatitude:41.1838 longitude:-71.7915]; + [path addLatitude:41.1249 longitude:-71.7929]; + [path addLatitude:41.0462 longitude:-71.7517]; + [path addLatitude:40.6306 longitude:-72.9465]; + [path addLatitude:40.5368 longitude:-73.4628]; + [path addLatitude:40.4887 longitude:-73.8885]; + [path addLatitude:40.5232 longitude:-73.9490]; + [path addLatitude:40.4772 longitude:-74.2271]; + [path addLatitude:40.4861 longitude:-74.2532]; + [path addLatitude:40.6468 longitude:-74.1866]; + [path addLatitude:40.6556 longitude:-74.0547]; + [path addLatitude:40.7618 longitude:-74.0156]; + [path addLatitude:40.8699 longitude:-73.9421]; + [path addLatitude:40.9980 longitude:-73.8934]; + [path addLatitude:41.0343 longitude:-73.9854]; + [path addLatitude:41.3268 longitude:-74.6274]; + [path addLatitude:41.3583 longitude:-74.7084]; + [path addLatitude:41.3811 longitude:-74.7101]; + [path addLatitude:41.4386 longitude:-74.8265]; + [path addLatitude:41.5075 longitude:-74.9913]; + [path addLatitude:41.6000 longitude:-75.0668]; + [path addLatitude:41.6719 longitude:-75.0366]; + [path addLatitude:41.7672 longitude:-75.0545]; + [path addLatitude:41.8808 longitude:-75.1945]; + [path addLatitude:42.0013 longitude:-75.3552]; + [path addLatitude:42.0003 longitude:-75.4266]; + [path addLatitude:42.0013 longitude:-77.0306]; + [path addLatitude:41.9993 longitude:-79.7250]; + [path addLatitude:42.0003 longitude:-79.7621]; + [path addLatitude:42.1827 longitude:-79.7621]; + [path addLatitude:42.5146 longitude:-79.7621]; + return path; +} + +- (GMSPath *)pathOfNorthCarolina { + GMSMutablePath *path = [GMSMutablePath path]; + [path addLatitude:33.7963 longitude:-78.4850]; + [path addLatitude:34.8037 longitude:-79.6742]; + [path addLatitude:34.8206 longitude:-80.8003]; + [path addLatitude:34.9377 longitude:-80.7880]; + [path addLatitude:35.1019 longitude:-80.9377]; + [path addLatitude:35.0356 longitude:-81.0379]; + [path addLatitude:35.1457 longitude:-81.0324]; + [path addLatitude:35.1660 longitude:-81.3867]; + [path addLatitude:35.1985 longitude:-82.2739]; + [path addLatitude:35.2041 longitude:-82.3933]; + [path addLatitude:35.0637 longitude:-82.7765]; + [path addLatitude:35.0817 longitude:-82.7861]; + [path addLatitude:34.9996 longitude:-83.1075]; + [path addLatitude:34.9918 longitude:-83.6183]; + [path addLatitude:34.9918 longitude:-84.3201]; + [path addLatitude:35.2131 longitude:-84.2885]; + [path addLatitude:35.2680 longitude:-84.2226]; + [path addLatitude:35.2310 longitude:-84.1113]; + [path addLatitude:35.2815 longitude:-84.0454]; + [path addLatitude:35.4058 longitude:-84.0248]; + [path addLatitude:35.4719 longitude:-83.9424]; + [path addLatitude:35.5166 longitude:-83.8559]; + [path addLatitude:35.5512 longitude:-83.6938]; + [path addLatitude:35.5680 longitude:-83.5181]; + [path addLatitude:35.6327 longitude:-83.3849]; + [path addLatitude:35.7142 longitude:-83.2475]; + [path addLatitude:35.7799 longitude:-82.9962]; + [path addLatitude:35.8445 longitude:-82.9276]; + [path addLatitude:35.9224 longitude:-82.8191]; + [path addLatitude:35.9958 longitude:-82.7710]; + [path addLatitude:36.0613 longitude:-82.6419]; + [path addLatitude:35.9702 longitude:-82.6103]; + [path addLatitude:35.9547 longitude:-82.5677]; + [path addLatitude:36.0236 longitude:-82.4730]; + [path addLatitude:36.0669 longitude:-82.4194]; + [path addLatitude:36.1168 longitude:-82.3535]; + [path addLatitude:36.1345 longitude:-82.2862]; + [path addLatitude:36.1467 longitude:-82.1461]; + [path addLatitude:36.1035 longitude:-82.1228]; + [path addLatitude:36.1268 longitude:-82.0267]; + [path addLatitude:36.2797 longitude:-81.9360]; + [path addLatitude:36.3527 longitude:-81.7987]; + [path addLatitude:36.3361 longitude:-81.7081]; + [path addLatitude:36.5880 longitude:-81.6724]; + [path addLatitude:36.5659 longitude:-80.7234]; + [path addLatitude:36.5438 longitude:-80.2977]; + [path addLatitude:36.5449 longitude:-79.6729]; + [path addLatitude:36.5449 longitude:-77.2559]; + [path addLatitude:36.5505 longitude:-75.7562]; + [path addLatitude:36.3129 longitude:-75.7068]; + [path addLatitude:35.7131 longitude:-75.4129]; + [path addLatitude:35.2041 longitude:-75.4720]; + [path addLatitude:34.9794 longitude:-76.0748]; + [path addLatitude:34.5258 longitude:-76.4951]; + [path addLatitude:34.5880 longitude:-76.8109]; + [path addLatitude:34.5314 longitude:-77.1378]; + [path addLatitude:34.3910 longitude:-77.4481]; + [path addLatitude:34.0481 longitude:-77.7983]; + [path addLatitude:33.7666 longitude:-77.9260]; + [path addLatitude:33.7963 longitude:-78.4863]; + return path; +} + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/PolylinesViewController.h b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/PolylinesViewController.h new file mode 100644 index 0000000..56a9d37 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/PolylinesViewController.h @@ -0,0 +1,7 @@ +#import + +#import + +@interface PolylinesViewController : UIViewController + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/PolylinesViewController.m b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/PolylinesViewController.m new file mode 100644 index 0000000..518d796 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/PolylinesViewController.m @@ -0,0 +1,111 @@ +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "SDKDemos/Samples/PolylinesViewController.h" + +#import + +@interface GMSPolyline (length) + +@property(nonatomic, readonly) double length; + +@end + +@implementation GMSPolyline (length) + +- (double)length { + GMSLengthKind kind = [self geodesic] ? kGMSLengthGeodesic : kGMSLengthRhumb; + return [[self path] lengthOfKind:kind]; +} + +@end + +static CLLocationCoordinate2D kSydneyAustralia = {-33.866901, 151.195988}; +static CLLocationCoordinate2D kHawaiiUSA = {21.291982, -157.821856}; +static CLLocationCoordinate2D kFiji = {-18, 179}; +static CLLocationCoordinate2D kMountainViewUSA = {37.423802, -122.091859}; +static CLLocationCoordinate2D kLimaPeru = {-12, -77}; +static bool kAnimate = true; + +@implementation PolylinesViewController { + NSArray *_styles; + NSArray *_lengths; + NSArray *_polys; + double _pos, _step; + GMSMapView *_mapView; +} + +- (void)tick { + for (GMSPolyline *poly in _polys) { + poly.spans = + GMSStyleSpansOffset(poly.path, _styles, _lengths, kGMSLengthGeodesic, _pos); + } + _pos -= _step; + if (kAnimate) { + __weak id weakSelf = self; + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, NSEC_PER_SEC / 10), + dispatch_get_main_queue(), + ^{ [weakSelf tick]; }); + } +} + +- (void)initLines { + if (!_polys) { + NSMutableArray *polys = [NSMutableArray array]; + GMSMutablePath *path = [GMSMutablePath path]; + [path addCoordinate:kSydneyAustralia]; + [path addCoordinate:kFiji]; + [path addCoordinate:kHawaiiUSA]; + [path addCoordinate:kMountainViewUSA]; + [path addCoordinate:kLimaPeru]; + [path addCoordinate:kSydneyAustralia]; + path = [path pathOffsetByLatitude:-30 longitude:0]; + _lengths = @[@([path lengthOfKind:kGMSLengthGeodesic] / 21)]; + for (int i = 0; i < 30; ++i) { + GMSPolyline *poly = [[GMSPolyline alloc] init]; + poly.path = [path pathOffsetByLatitude:(i * 1.5) longitude:0]; + poly.strokeWidth = 8; + poly.geodesic = YES; + poly.map = _mapView; + [polys addObject:poly]; + } + _polys = polys; + } +} + +- (void)mapView:(GMSMapView *)mapView + didTapAtCoordinate:(CLLocationCoordinate2D)coordinate { + [self initLines]; + [self tick]; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-30 + longitude:-175 + zoom:3]; + GMSMapView *mapView = [GMSMapView mapWithFrame:CGRectZero camera:camera]; + mapView.accessibilityElementsHidden = YES; + self.view = mapView; + mapView.delegate = self; + _mapView = mapView; + + CGFloat alpha = 1; + UIColor *green = [UIColor colorWithRed:0 green:1 blue: 0 alpha:alpha]; + UIColor *greenTransp = [UIColor colorWithRed:0 green:1 blue: 0 alpha:0]; + UIColor *red = [UIColor colorWithRed:1 green:0 blue: 0 alpha:alpha]; + UIColor *redTransp = [UIColor colorWithRed:1 green:0 blue: 0 alpha:0]; + GMSStrokeStyle *grad1 = [GMSStrokeStyle gradientFromColor:green toColor:greenTransp]; + GMSStrokeStyle *grad2 = [GMSStrokeStyle gradientFromColor:redTransp toColor:red]; + _styles = @[ + grad1, + grad2, + [GMSStrokeStyle solidColor:[UIColor colorWithWhite:0 alpha:0]], + ]; + _step = 50000; + [self initLines]; + [self tick]; +} + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/Samples.h b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/Samples.h new file mode 100644 index 0000000..fdb0b1f --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/Samples.h @@ -0,0 +1,9 @@ +#import + +@interface Samples : NSObject ++ (NSArray *)loadSections; ++ (NSArray *)loadDemos; ++ (NSDictionary *)newDemo:(Class) class + withTitle:(NSString *)title + andDescription:(NSString *)description; +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/Samples.m b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/Samples.m new file mode 100644 index 0000000..9b8ab4a --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/Samples.m @@ -0,0 +1,161 @@ +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "SDKDemos/Samples/Samples.h" + +// Map Demos +#import "SDKDemos/Samples/BasicMapViewController.h" +#import "SDKDemos/Samples/CustomIndoorViewController.h" +#import "SDKDemos/Samples/DoubleMapViewController.h" +#import "SDKDemos/Samples/GestureControlViewController.h" +#import "SDKDemos/Samples/IndoorMuseumNavigationViewController.h" +#import "SDKDemos/Samples/IndoorViewController.h" +#import "SDKDemos/Samples/MapTypesViewController.h" +#import "SDKDemos/Samples/MapZoomViewController.h" +#import "SDKDemos/Samples/MyLocationViewController.h" +#import "SDKDemos/Samples/TrafficMapViewController.h" +#import "SDKDemos/Samples/VisibleRegionViewController.h" + +// Panorama Demos +#import "SDKDemos/Samples/FixedPanoramaViewController.h" +#import "SDKDemos/Samples/PanoramaViewController.h" + +// Overlay Demos +#import "SDKDemos/Samples/AnimatedCurrentLocationViewController.h" +#import "SDKDemos/Samples/CustomMarkersViewController.h" +#import "SDKDemos/Samples/GradientPolylinesViewController.h" +#import "SDKDemos/Samples/GroundOverlayViewController.h" +#import "SDKDemos/Samples/MarkerEventsViewController.h" +#import "SDKDemos/Samples/MarkerInfoWindowViewController.h" +#import "SDKDemos/Samples/MarkerLayerViewController.h" +#import "SDKDemos/Samples/MarkersViewController.h" +#import "SDKDemos/Samples/PolygonsViewController.h" +#import "SDKDemos/Samples/PolylinesViewController.h" +#import "SDKDemos/Samples/TileLayerViewController.h" + +// Camera Demos +#import "SDKDemos/Samples/CameraViewController.h" +#import "SDKDemos/Samples/FitBoundsViewController.h" +#import "SDKDemos/Samples/MapLayerViewController.h" + +// Services +#import "SDKDemos/Samples/GeocoderViewController.h" +#import "SDKDemos/Samples/StructuredGeocoderViewController.h" + +@implementation Samples + ++ (NSArray *)loadSections { + return @[ @"Map", @"Panorama", @"Overlays", @"Camera", @"Services" ]; +} + ++ (NSArray *)loadDemos { + NSArray *mapDemos = + @[[self newDemo:[BasicMapViewController class] + withTitle:@"Basic Map" + andDescription:nil], + [self newDemo:[MapTypesViewController class] + withTitle:@"Map Types" + andDescription:nil], + [self newDemo:[TrafficMapViewController class] + withTitle:@"Traffic Layer" + andDescription:nil], + [self newDemo:[MyLocationViewController class] + withTitle:@"My Location" + andDescription:nil], + [self newDemo:[IndoorViewController class] + withTitle:@"Indoor" + andDescription:nil], + [self newDemo:[CustomIndoorViewController class] + withTitle:@"Indoor with Custom Level Select" + andDescription:nil], + [self newDemo:[IndoorMuseumNavigationViewController class] + withTitle:@"Indoor Museum Navigator" + andDescription:nil], + [self newDemo:[GestureControlViewController class] + withTitle:@"Gesture Control" + andDescription:nil], + [self newDemo:[DoubleMapViewController class] + withTitle:@"Two Maps" + andDescription:nil], + [self newDemo:[VisibleRegionViewController class] + withTitle:@"Visible Regions" + andDescription:nil], + [self newDemo:[MapZoomViewController class] + withTitle:@"Min/Max Zoom" + andDescription:nil], + ]; + + NSArray *panoramaDemos = + @[[self newDemo:[PanoramaViewController class] + withTitle:@"Street View" + andDescription:nil], + [self newDemo:[FixedPanoramaViewController class] + withTitle:@"Fixed Street View" + andDescription:nil]]; + + NSArray *overlayDemos = + @[[self newDemo:[MarkersViewController class] + withTitle:@"Markers" + andDescription:nil], + [self newDemo:[CustomMarkersViewController class] + withTitle:@"Custom Markers" + andDescription:nil], + [self newDemo:[MarkerEventsViewController class] + withTitle:@"Marker Events" + andDescription:nil], + [self newDemo:[MarkerLayerViewController class] + withTitle:@"Marker Layer" + andDescription:nil], + [self newDemo:[MarkerInfoWindowViewController class] + withTitle:@"Custom Info Windows" + andDescription:nil], + [self newDemo:[PolygonsViewController class] + withTitle:@"Polygons" + andDescription:nil], + [self newDemo:[PolylinesViewController class] + withTitle:@"Polylines" + andDescription:nil], + [self newDemo:[GroundOverlayViewController class] + withTitle:@"Ground Overlays" + andDescription:nil], + [self newDemo:[TileLayerViewController class] + withTitle:@"Tile Layers" + andDescription:nil], + [self newDemo:[AnimatedCurrentLocationViewController class] + withTitle:@"Animated Current Location" + andDescription:nil], + [self newDemo:[GradientPolylinesViewController class] + withTitle:@"Gradient Polylines" + andDescription:nil]]; + + NSArray *cameraDemos = + @[[self newDemo:[FitBoundsViewController class] + withTitle:@"Fit Bounds" + andDescription:nil], + [self newDemo:[CameraViewController class] + withTitle:@"Camera Animation" + andDescription:nil], + [self newDemo:[MapLayerViewController class] + withTitle:@"Map Layer" + andDescription:nil]]; + + NSArray *servicesDemos = + @[[self newDemo:[GeocoderViewController class] + withTitle:@"Geocoder" + andDescription:nil], + [self newDemo:[StructuredGeocoderViewController class] + withTitle:@"Structured Geocoder" + andDescription:nil], + ]; + + return @[mapDemos, panoramaDemos, overlayDemos, cameraDemos, servicesDemos]; +} + ++ (NSDictionary *)newDemo:(Class) class + withTitle:(NSString *)title + andDescription:(NSString *)description { + return [[NSDictionary alloc] initWithObjectsAndKeys:class, @"controller", + title, @"title", description, @"description", nil]; +} +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/StructuredGeocoderViewController.h b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/StructuredGeocoderViewController.h new file mode 100644 index 0000000..bc852a8 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/StructuredGeocoderViewController.h @@ -0,0 +1,5 @@ +#import + +@interface StructuredGeocoderViewController : UIViewController + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/StructuredGeocoderViewController.m b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/StructuredGeocoderViewController.m new file mode 100644 index 0000000..ca66c61 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/StructuredGeocoderViewController.m @@ -0,0 +1,77 @@ +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "SDKDemos/Samples/StructuredGeocoderViewController.h" + +#import + +@interface StructuredGeocoderViewController () + +@end + +@implementation StructuredGeocoderViewController { + GMSMapView *_mapView; + GMSGeocoder *_geocoder; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-33.868 + longitude:151.2086 + zoom:12]; + + _mapView = [GMSMapView mapWithFrame:CGRectZero camera:camera]; + _mapView.delegate = self; + + _geocoder = [[GMSGeocoder alloc] init]; + + self.view = _mapView; +} + +#pragma mark - GMSMapViewDelegate + +- (void)mapView:(GMSMapView *)mapView + didLongPressAtCoordinate:(CLLocationCoordinate2D)coordinate { + // On a long press, reverse geocode this location. + GMSReverseGeocodeCallback handler = ^(GMSReverseGeocodeResponse *response, NSError *error) { + GMSAddress *address = response.firstResult; + if (address) { + NSLog(@"Geocoder result: %@", address); + + GMSMarker *marker = [GMSMarker markerWithPosition:address.coordinate]; + + marker.title = address.thoroughfare; + + NSMutableString *snippet = [[NSMutableString alloc] init]; + if (address.subLocality != NULL) { + [snippet appendString:[NSString stringWithFormat:@"subLocality: %@\n", + address.subLocality]]; + } + if (address.locality != NULL) { + [snippet appendString:[NSString stringWithFormat:@"locality: %@\n", + address.locality]]; + } + if (address.administrativeArea != NULL) { + [snippet appendString:[NSString stringWithFormat:@"administrativeArea: %@\n", + address.administrativeArea]]; + } + if (address.country != NULL) { + [snippet appendString:[NSString stringWithFormat:@"country: %@\n", + address.country]]; + } + + marker.snippet = snippet; + + marker.appearAnimation = kGMSMarkerAnimationPop; + mapView.selectedMarker = marker; + marker.map = _mapView; + } else { + NSLog(@"Could not reverse geocode point (%f,%f): %@", + coordinate.latitude, coordinate.longitude, error); + } + }; + [_geocoder reverseGeocodeCoordinate:coordinate completionHandler:handler]; +} + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/TileLayerViewController.h b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/TileLayerViewController.h new file mode 100644 index 0000000..e330a66 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/TileLayerViewController.h @@ -0,0 +1,5 @@ +#import + +@interface TileLayerViewController : UIViewController + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/TileLayerViewController.m b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/TileLayerViewController.m new file mode 100644 index 0000000..d23788e --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/TileLayerViewController.m @@ -0,0 +1,63 @@ +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "SDKDemos/Samples/TileLayerViewController.h" + +#import + +@implementation TileLayerViewController { + UISegmentedControl *_switcher; + GMSMapView *_mapView; + GMSTileLayer *_tileLayer; + NSInteger _floor; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:37.78318 + longitude:-122.403874 + zoom:18]; + + _mapView = [GMSMapView mapWithFrame:CGRectZero camera:camera]; + _mapView.buildingsEnabled = NO; + _mapView.indoorEnabled = NO; + self.view = _mapView; + + // The possible floors that might be shown. + NSArray *types = @[ @"1", @"2", @"3" ]; + + // Create a UISegmentedControl that is the navigationItem's titleView. + _switcher = [[UISegmentedControl alloc] initWithItems:types]; + _switcher.selectedSegmentIndex = 0; + _switcher.autoresizingMask = UIViewAutoresizingFlexibleWidth; + _switcher.frame = + CGRectMake(0, 0, 300, _switcher.frame.size.height); + self.navigationItem.titleView = _switcher; + + // Listen to touch events on the UISegmentedControl, force initial update. + [_switcher addTarget:self action:@selector(didChangeSwitcher) + forControlEvents:UIControlEventValueChanged]; + [self didChangeSwitcher]; +} + +- (void)didChangeSwitcher { + NSString *title = + [_switcher titleForSegmentAtIndex:_switcher.selectedSegmentIndex]; + NSInteger floor = [title integerValue]; + if (_floor != floor) { + // Clear existing tileLayer, if any. + _tileLayer.map = nil; + + // Create a new GMSTileLayer with the new floor choice. + GMSTileURLConstructor urls = ^(NSUInteger x, NSUInteger y, NSUInteger zoom) { + NSString *url = [NSString stringWithFormat:@"http://www.gstatic.com/io2010maps/tiles/9/L%zd_%tu_%tu_%tu.png", floor, zoom, x, y]; + return [NSURL URLWithString:url]; + }; + _tileLayer = [GMSURLTileLayer tileLayerWithURLConstructor:urls]; + _tileLayer.map = _mapView; + _floor = floor; + } +} + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/TrafficMapViewController.h b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/TrafficMapViewController.h new file mode 100644 index 0000000..f7c69f2 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/TrafficMapViewController.h @@ -0,0 +1,5 @@ +#import + +@interface TrafficMapViewController : UIViewController + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/TrafficMapViewController.m b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/TrafficMapViewController.m new file mode 100644 index 0000000..9ee26dd --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/TrafficMapViewController.m @@ -0,0 +1,22 @@ +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "SDKDemos/Samples/TrafficMapViewController.h" + +#import + +@implementation TrafficMapViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-33.868 + longitude:151.2086 + zoom:12]; + + GMSMapView *mapView = [GMSMapView mapWithFrame:CGRectZero camera:camera]; + mapView.trafficEnabled = YES; + self.view = mapView; +} + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/VisibleRegionViewController.h b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/VisibleRegionViewController.h new file mode 100644 index 0000000..d7747c4 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/VisibleRegionViewController.h @@ -0,0 +1,5 @@ +#import + +@interface VisibleRegionViewController : UIViewController + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/VisibleRegionViewController.m b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/VisibleRegionViewController.m new file mode 100644 index 0000000..e14dddd --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/Samples/VisibleRegionViewController.m @@ -0,0 +1,60 @@ +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "SDKDemos/Samples/VisibleRegionViewController.h" + +#import + +static CGFloat kOverlayHeight = 140.0f; + +@implementation VisibleRegionViewController { + GMSMapView *_mapView; + UIView *_overlay; + UIBarButtonItem *_flyInButton; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-37.81969 + longitude:144.966085 + zoom:4]; + _mapView = [GMSMapView mapWithFrame:CGRectZero camera:camera]; + + // Enable my location button to show more UI components updating. + _mapView.settings.myLocationButton = YES; + _mapView.myLocationEnabled = YES; + _mapView.padding = UIEdgeInsetsMake(0, 0, kOverlayHeight, 0); + self.view = _mapView; + + // Create a button that, when pressed, causes an overlaying view to fly-in/out. + _flyInButton = [[UIBarButtonItem alloc] initWithTitle:@"Toggle Overlay" + style:UIBarButtonItemStylePlain + target:self + action:@selector(didTapFlyIn)]; + self.navigationItem.rightBarButtonItem = _flyInButton; + + CGRect overlayFrame = CGRectMake(0, -kOverlayHeight, 0, kOverlayHeight); + _overlay = [[UIView alloc] initWithFrame:overlayFrame]; + _overlay.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleWidth; + + _overlay.backgroundColor = [UIColor colorWithHue:0.0 saturation:1.0 brightness:1.0 alpha:0.5]; + [self.view addSubview:_overlay]; +} + +- (void)didTapFlyIn { + UIEdgeInsets padding = _mapView.padding; + + [UIView animateWithDuration:2.0 animations:^{ + CGSize size = self.view.bounds.size; + if (padding.bottom == 0.0f) { + _overlay.frame = CGRectMake(0, size.height - kOverlayHeight, size.width, kOverlayHeight); + _mapView.padding = UIEdgeInsetsMake(0, 0, kOverlayHeight, 0); + } else { + _overlay.frame = CGRectMake(0, _mapView.bounds.size.height, size.width, 0); + _mapView.padding = UIEdgeInsetsZero; + } + }]; +} + +@end diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/iTunesArtwork-1024.png b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/iTunesArtwork-1024.png new file mode 100644 index 0000000..eff1c1f Binary files /dev/null and b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/iTunesArtwork-1024.png differ diff --git a/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/main.m b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/main.m new file mode 100644 index 0000000..d0d2818 --- /dev/null +++ b/Pods/GoogleMaps/GoogleMapsSDKDemos/SDKDemos/main.m @@ -0,0 +1,13 @@ +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import + +#import "SDKDemos/SDKDemoAppDelegate.h" + +int main(int argc, char *argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([SDKDemoAppDelegate class])); + } +} diff --git a/Pods/Headers/Private/AFNetworking/AFHTTPRequestOperation.h b/Pods/Headers/Private/AFNetworking/AFHTTPRequestOperation.h new file mode 120000 index 0000000..ac762c8 --- /dev/null +++ b/Pods/Headers/Private/AFNetworking/AFHTTPRequestOperation.h @@ -0,0 +1 @@ +../../../AFNetworking/AFNetworking/AFHTTPRequestOperation.h \ No newline at end of file diff --git a/Pods/Headers/Private/AFNetworking/AFHTTPRequestOperationManager.h b/Pods/Headers/Private/AFNetworking/AFHTTPRequestOperationManager.h new file mode 120000 index 0000000..9dcc623 --- /dev/null +++ b/Pods/Headers/Private/AFNetworking/AFHTTPRequestOperationManager.h @@ -0,0 +1 @@ +../../../AFNetworking/AFNetworking/AFHTTPRequestOperationManager.h \ No newline at end of file diff --git a/Pods/Headers/Private/AFNetworking/AFHTTPSessionManager.h b/Pods/Headers/Private/AFNetworking/AFHTTPSessionManager.h new file mode 120000 index 0000000..56feb9f --- /dev/null +++ b/Pods/Headers/Private/AFNetworking/AFHTTPSessionManager.h @@ -0,0 +1 @@ +../../../AFNetworking/AFNetworking/AFHTTPSessionManager.h \ No newline at end of file diff --git a/Pods/Headers/Private/AFNetworking/AFNetworkActivityIndicatorManager.h b/Pods/Headers/Private/AFNetworking/AFNetworkActivityIndicatorManager.h new file mode 120000 index 0000000..67519d9 --- /dev/null +++ b/Pods/Headers/Private/AFNetworking/AFNetworkActivityIndicatorManager.h @@ -0,0 +1 @@ +../../../AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h \ No newline at end of file diff --git a/Pods/Headers/Private/AFNetworking/AFNetworkReachabilityManager.h b/Pods/Headers/Private/AFNetworking/AFNetworkReachabilityManager.h new file mode 120000 index 0000000..68fc774 --- /dev/null +++ b/Pods/Headers/Private/AFNetworking/AFNetworkReachabilityManager.h @@ -0,0 +1 @@ +../../../AFNetworking/AFNetworking/AFNetworkReachabilityManager.h \ No newline at end of file diff --git a/Pods/Headers/Private/AFNetworking/AFNetworking.h b/Pods/Headers/Private/AFNetworking/AFNetworking.h new file mode 120000 index 0000000..a5a38da --- /dev/null +++ b/Pods/Headers/Private/AFNetworking/AFNetworking.h @@ -0,0 +1 @@ +../../../AFNetworking/AFNetworking/AFNetworking.h \ No newline at end of file diff --git a/Pods/Headers/Private/AFNetworking/AFSecurityPolicy.h b/Pods/Headers/Private/AFNetworking/AFSecurityPolicy.h new file mode 120000 index 0000000..fd1322d --- /dev/null +++ b/Pods/Headers/Private/AFNetworking/AFSecurityPolicy.h @@ -0,0 +1 @@ +../../../AFNetworking/AFNetworking/AFSecurityPolicy.h \ No newline at end of file diff --git a/Pods/Headers/Private/AFNetworking/AFURLConnectionOperation.h b/Pods/Headers/Private/AFNetworking/AFURLConnectionOperation.h new file mode 120000 index 0000000..d9b35fb --- /dev/null +++ b/Pods/Headers/Private/AFNetworking/AFURLConnectionOperation.h @@ -0,0 +1 @@ +../../../AFNetworking/AFNetworking/AFURLConnectionOperation.h \ No newline at end of file diff --git a/Pods/Headers/Private/AFNetworking/AFURLRequestSerialization.h b/Pods/Headers/Private/AFNetworking/AFURLRequestSerialization.h new file mode 120000 index 0000000..ca8209b --- /dev/null +++ b/Pods/Headers/Private/AFNetworking/AFURLRequestSerialization.h @@ -0,0 +1 @@ +../../../AFNetworking/AFNetworking/AFURLRequestSerialization.h \ No newline at end of file diff --git a/Pods/Headers/Private/AFNetworking/AFURLResponseSerialization.h b/Pods/Headers/Private/AFNetworking/AFURLResponseSerialization.h new file mode 120000 index 0000000..e36a765 --- /dev/null +++ b/Pods/Headers/Private/AFNetworking/AFURLResponseSerialization.h @@ -0,0 +1 @@ +../../../AFNetworking/AFNetworking/AFURLResponseSerialization.h \ No newline at end of file diff --git a/Pods/Headers/Private/AFNetworking/AFURLSessionManager.h b/Pods/Headers/Private/AFNetworking/AFURLSessionManager.h new file mode 120000 index 0000000..835101d --- /dev/null +++ b/Pods/Headers/Private/AFNetworking/AFURLSessionManager.h @@ -0,0 +1 @@ +../../../AFNetworking/AFNetworking/AFURLSessionManager.h \ No newline at end of file diff --git a/Pods/Headers/Private/AFNetworking/UIActivityIndicatorView+AFNetworking.h b/Pods/Headers/Private/AFNetworking/UIActivityIndicatorView+AFNetworking.h new file mode 120000 index 0000000..c534ebf --- /dev/null +++ b/Pods/Headers/Private/AFNetworking/UIActivityIndicatorView+AFNetworking.h @@ -0,0 +1 @@ +../../../AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h \ No newline at end of file diff --git a/Pods/Headers/Private/AFNetworking/UIAlertView+AFNetworking.h b/Pods/Headers/Private/AFNetworking/UIAlertView+AFNetworking.h new file mode 120000 index 0000000..f992813 --- /dev/null +++ b/Pods/Headers/Private/AFNetworking/UIAlertView+AFNetworking.h @@ -0,0 +1 @@ +../../../AFNetworking/UIKit+AFNetworking/UIAlertView+AFNetworking.h \ No newline at end of file diff --git a/Pods/Headers/Private/AFNetworking/UIButton+AFNetworking.h b/Pods/Headers/Private/AFNetworking/UIButton+AFNetworking.h new file mode 120000 index 0000000..8f2e221 --- /dev/null +++ b/Pods/Headers/Private/AFNetworking/UIButton+AFNetworking.h @@ -0,0 +1 @@ +../../../AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h \ No newline at end of file diff --git a/Pods/Headers/Private/AFNetworking/UIImage+AFNetworking.h b/Pods/Headers/Private/AFNetworking/UIImage+AFNetworking.h new file mode 120000 index 0000000..74f6649 --- /dev/null +++ b/Pods/Headers/Private/AFNetworking/UIImage+AFNetworking.h @@ -0,0 +1 @@ +../../../AFNetworking/UIKit+AFNetworking/UIImage+AFNetworking.h \ No newline at end of file diff --git a/Pods/Headers/Private/AFNetworking/UIImageView+AFNetworking.h b/Pods/Headers/Private/AFNetworking/UIImageView+AFNetworking.h new file mode 120000 index 0000000..a95d673 --- /dev/null +++ b/Pods/Headers/Private/AFNetworking/UIImageView+AFNetworking.h @@ -0,0 +1 @@ +../../../AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h \ No newline at end of file diff --git a/Pods/Headers/Private/AFNetworking/UIKit+AFNetworking.h b/Pods/Headers/Private/AFNetworking/UIKit+AFNetworking.h new file mode 120000 index 0000000..95017cc --- /dev/null +++ b/Pods/Headers/Private/AFNetworking/UIKit+AFNetworking.h @@ -0,0 +1 @@ +../../../AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h \ No newline at end of file diff --git a/Pods/Headers/Private/AFNetworking/UIProgressView+AFNetworking.h b/Pods/Headers/Private/AFNetworking/UIProgressView+AFNetworking.h new file mode 120000 index 0000000..730b167 --- /dev/null +++ b/Pods/Headers/Private/AFNetworking/UIProgressView+AFNetworking.h @@ -0,0 +1 @@ +../../../AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h \ No newline at end of file diff --git a/Pods/Headers/Private/AFNetworking/UIRefreshControl+AFNetworking.h b/Pods/Headers/Private/AFNetworking/UIRefreshControl+AFNetworking.h new file mode 120000 index 0000000..8efd826 --- /dev/null +++ b/Pods/Headers/Private/AFNetworking/UIRefreshControl+AFNetworking.h @@ -0,0 +1 @@ +../../../AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h \ No newline at end of file diff --git a/Pods/Headers/Private/AFNetworking/UIWebView+AFNetworking.h b/Pods/Headers/Private/AFNetworking/UIWebView+AFNetworking.h new file mode 120000 index 0000000..c8df6ef --- /dev/null +++ b/Pods/Headers/Private/AFNetworking/UIWebView+AFNetworking.h @@ -0,0 +1 @@ +../../../AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.h \ No newline at end of file diff --git a/Pods/Headers/Private/SDWebImage/NSData+ImageContentType.h b/Pods/Headers/Private/SDWebImage/NSData+ImageContentType.h new file mode 120000 index 0000000..8457498 --- /dev/null +++ b/Pods/Headers/Private/SDWebImage/NSData+ImageContentType.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/NSData+ImageContentType.h \ No newline at end of file diff --git a/Pods/Headers/Private/SDWebImage/SDImageCache.h b/Pods/Headers/Private/SDWebImage/SDImageCache.h new file mode 120000 index 0000000..0040b06 --- /dev/null +++ b/Pods/Headers/Private/SDWebImage/SDImageCache.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/SDImageCache.h \ No newline at end of file diff --git a/Pods/Headers/Private/SDWebImage/SDWebImageCompat.h b/Pods/Headers/Private/SDWebImage/SDWebImageCompat.h new file mode 120000 index 0000000..6ca2478 --- /dev/null +++ b/Pods/Headers/Private/SDWebImage/SDWebImageCompat.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/SDWebImageCompat.h \ No newline at end of file diff --git a/Pods/Headers/Private/SDWebImage/SDWebImageDecoder.h b/Pods/Headers/Private/SDWebImage/SDWebImageDecoder.h new file mode 120000 index 0000000..a2f3a68 --- /dev/null +++ b/Pods/Headers/Private/SDWebImage/SDWebImageDecoder.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/SDWebImageDecoder.h \ No newline at end of file diff --git a/Pods/Headers/Private/SDWebImage/SDWebImageDownloader.h b/Pods/Headers/Private/SDWebImage/SDWebImageDownloader.h new file mode 120000 index 0000000..303b03b --- /dev/null +++ b/Pods/Headers/Private/SDWebImage/SDWebImageDownloader.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/SDWebImageDownloader.h \ No newline at end of file diff --git a/Pods/Headers/Private/SDWebImage/SDWebImageDownloaderOperation.h b/Pods/Headers/Private/SDWebImage/SDWebImageDownloaderOperation.h new file mode 120000 index 0000000..99441c4 --- /dev/null +++ b/Pods/Headers/Private/SDWebImage/SDWebImageDownloaderOperation.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/SDWebImageDownloaderOperation.h \ No newline at end of file diff --git a/Pods/Headers/Private/SDWebImage/SDWebImageManager.h b/Pods/Headers/Private/SDWebImage/SDWebImageManager.h new file mode 120000 index 0000000..1b81848 --- /dev/null +++ b/Pods/Headers/Private/SDWebImage/SDWebImageManager.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/SDWebImageManager.h \ No newline at end of file diff --git a/Pods/Headers/Private/SDWebImage/SDWebImageOperation.h b/Pods/Headers/Private/SDWebImage/SDWebImageOperation.h new file mode 120000 index 0000000..20e5b89 --- /dev/null +++ b/Pods/Headers/Private/SDWebImage/SDWebImageOperation.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/SDWebImageOperation.h \ No newline at end of file diff --git a/Pods/Headers/Private/SDWebImage/SDWebImagePrefetcher.h b/Pods/Headers/Private/SDWebImage/SDWebImagePrefetcher.h new file mode 120000 index 0000000..50585c6 --- /dev/null +++ b/Pods/Headers/Private/SDWebImage/SDWebImagePrefetcher.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/SDWebImagePrefetcher.h \ No newline at end of file diff --git a/Pods/Headers/Private/SDWebImage/UIButton+WebCache.h b/Pods/Headers/Private/SDWebImage/UIButton+WebCache.h new file mode 120000 index 0000000..19d2d8e --- /dev/null +++ b/Pods/Headers/Private/SDWebImage/UIButton+WebCache.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/UIButton+WebCache.h \ No newline at end of file diff --git a/Pods/Headers/Private/SDWebImage/UIImage+GIF.h b/Pods/Headers/Private/SDWebImage/UIImage+GIF.h new file mode 120000 index 0000000..14d5aad --- /dev/null +++ b/Pods/Headers/Private/SDWebImage/UIImage+GIF.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/UIImage+GIF.h \ No newline at end of file diff --git a/Pods/Headers/Private/SDWebImage/UIImage+MultiFormat.h b/Pods/Headers/Private/SDWebImage/UIImage+MultiFormat.h new file mode 120000 index 0000000..1fb9650 --- /dev/null +++ b/Pods/Headers/Private/SDWebImage/UIImage+MultiFormat.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/UIImage+MultiFormat.h \ No newline at end of file diff --git a/Pods/Headers/Private/SDWebImage/UIImageView+HighlightedWebCache.h b/Pods/Headers/Private/SDWebImage/UIImageView+HighlightedWebCache.h new file mode 120000 index 0000000..fd4dea4 --- /dev/null +++ b/Pods/Headers/Private/SDWebImage/UIImageView+HighlightedWebCache.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/UIImageView+HighlightedWebCache.h \ No newline at end of file diff --git a/Pods/Headers/Private/SDWebImage/UIImageView+WebCache.h b/Pods/Headers/Private/SDWebImage/UIImageView+WebCache.h new file mode 120000 index 0000000..0c53a47 --- /dev/null +++ b/Pods/Headers/Private/SDWebImage/UIImageView+WebCache.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/UIImageView+WebCache.h \ No newline at end of file diff --git a/Pods/Headers/Private/SDWebImage/UIView+WebCacheOperation.h b/Pods/Headers/Private/SDWebImage/UIView+WebCacheOperation.h new file mode 120000 index 0000000..f9890c4 --- /dev/null +++ b/Pods/Headers/Private/SDWebImage/UIView+WebCacheOperation.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/UIView+WebCacheOperation.h \ No newline at end of file diff --git a/Pods/Headers/Public/AFNetworking/AFHTTPRequestOperation.h b/Pods/Headers/Public/AFNetworking/AFHTTPRequestOperation.h new file mode 120000 index 0000000..ac762c8 --- /dev/null +++ b/Pods/Headers/Public/AFNetworking/AFHTTPRequestOperation.h @@ -0,0 +1 @@ +../../../AFNetworking/AFNetworking/AFHTTPRequestOperation.h \ No newline at end of file diff --git a/Pods/Headers/Public/AFNetworking/AFHTTPRequestOperationManager.h b/Pods/Headers/Public/AFNetworking/AFHTTPRequestOperationManager.h new file mode 120000 index 0000000..9dcc623 --- /dev/null +++ b/Pods/Headers/Public/AFNetworking/AFHTTPRequestOperationManager.h @@ -0,0 +1 @@ +../../../AFNetworking/AFNetworking/AFHTTPRequestOperationManager.h \ No newline at end of file diff --git a/Pods/Headers/Public/AFNetworking/AFHTTPSessionManager.h b/Pods/Headers/Public/AFNetworking/AFHTTPSessionManager.h new file mode 120000 index 0000000..56feb9f --- /dev/null +++ b/Pods/Headers/Public/AFNetworking/AFHTTPSessionManager.h @@ -0,0 +1 @@ +../../../AFNetworking/AFNetworking/AFHTTPSessionManager.h \ No newline at end of file diff --git a/Pods/Headers/Public/AFNetworking/AFNetworkActivityIndicatorManager.h b/Pods/Headers/Public/AFNetworking/AFNetworkActivityIndicatorManager.h new file mode 120000 index 0000000..67519d9 --- /dev/null +++ b/Pods/Headers/Public/AFNetworking/AFNetworkActivityIndicatorManager.h @@ -0,0 +1 @@ +../../../AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h \ No newline at end of file diff --git a/Pods/Headers/Public/AFNetworking/AFNetworkReachabilityManager.h b/Pods/Headers/Public/AFNetworking/AFNetworkReachabilityManager.h new file mode 120000 index 0000000..68fc774 --- /dev/null +++ b/Pods/Headers/Public/AFNetworking/AFNetworkReachabilityManager.h @@ -0,0 +1 @@ +../../../AFNetworking/AFNetworking/AFNetworkReachabilityManager.h \ No newline at end of file diff --git a/Pods/Headers/Public/AFNetworking/AFNetworking.h b/Pods/Headers/Public/AFNetworking/AFNetworking.h new file mode 120000 index 0000000..a5a38da --- /dev/null +++ b/Pods/Headers/Public/AFNetworking/AFNetworking.h @@ -0,0 +1 @@ +../../../AFNetworking/AFNetworking/AFNetworking.h \ No newline at end of file diff --git a/Pods/Headers/Public/AFNetworking/AFSecurityPolicy.h b/Pods/Headers/Public/AFNetworking/AFSecurityPolicy.h new file mode 120000 index 0000000..fd1322d --- /dev/null +++ b/Pods/Headers/Public/AFNetworking/AFSecurityPolicy.h @@ -0,0 +1 @@ +../../../AFNetworking/AFNetworking/AFSecurityPolicy.h \ No newline at end of file diff --git a/Pods/Headers/Public/AFNetworking/AFURLConnectionOperation.h b/Pods/Headers/Public/AFNetworking/AFURLConnectionOperation.h new file mode 120000 index 0000000..d9b35fb --- /dev/null +++ b/Pods/Headers/Public/AFNetworking/AFURLConnectionOperation.h @@ -0,0 +1 @@ +../../../AFNetworking/AFNetworking/AFURLConnectionOperation.h \ No newline at end of file diff --git a/Pods/Headers/Public/AFNetworking/AFURLRequestSerialization.h b/Pods/Headers/Public/AFNetworking/AFURLRequestSerialization.h new file mode 120000 index 0000000..ca8209b --- /dev/null +++ b/Pods/Headers/Public/AFNetworking/AFURLRequestSerialization.h @@ -0,0 +1 @@ +../../../AFNetworking/AFNetworking/AFURLRequestSerialization.h \ No newline at end of file diff --git a/Pods/Headers/Public/AFNetworking/AFURLResponseSerialization.h b/Pods/Headers/Public/AFNetworking/AFURLResponseSerialization.h new file mode 120000 index 0000000..e36a765 --- /dev/null +++ b/Pods/Headers/Public/AFNetworking/AFURLResponseSerialization.h @@ -0,0 +1 @@ +../../../AFNetworking/AFNetworking/AFURLResponseSerialization.h \ No newline at end of file diff --git a/Pods/Headers/Public/AFNetworking/AFURLSessionManager.h b/Pods/Headers/Public/AFNetworking/AFURLSessionManager.h new file mode 120000 index 0000000..835101d --- /dev/null +++ b/Pods/Headers/Public/AFNetworking/AFURLSessionManager.h @@ -0,0 +1 @@ +../../../AFNetworking/AFNetworking/AFURLSessionManager.h \ No newline at end of file diff --git a/Pods/Headers/Public/AFNetworking/UIActivityIndicatorView+AFNetworking.h b/Pods/Headers/Public/AFNetworking/UIActivityIndicatorView+AFNetworking.h new file mode 120000 index 0000000..c534ebf --- /dev/null +++ b/Pods/Headers/Public/AFNetworking/UIActivityIndicatorView+AFNetworking.h @@ -0,0 +1 @@ +../../../AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h \ No newline at end of file diff --git a/Pods/Headers/Public/AFNetworking/UIAlertView+AFNetworking.h b/Pods/Headers/Public/AFNetworking/UIAlertView+AFNetworking.h new file mode 120000 index 0000000..f992813 --- /dev/null +++ b/Pods/Headers/Public/AFNetworking/UIAlertView+AFNetworking.h @@ -0,0 +1 @@ +../../../AFNetworking/UIKit+AFNetworking/UIAlertView+AFNetworking.h \ No newline at end of file diff --git a/Pods/Headers/Public/AFNetworking/UIButton+AFNetworking.h b/Pods/Headers/Public/AFNetworking/UIButton+AFNetworking.h new file mode 120000 index 0000000..8f2e221 --- /dev/null +++ b/Pods/Headers/Public/AFNetworking/UIButton+AFNetworking.h @@ -0,0 +1 @@ +../../../AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h \ No newline at end of file diff --git a/Pods/Headers/Public/AFNetworking/UIImage+AFNetworking.h b/Pods/Headers/Public/AFNetworking/UIImage+AFNetworking.h new file mode 120000 index 0000000..74f6649 --- /dev/null +++ b/Pods/Headers/Public/AFNetworking/UIImage+AFNetworking.h @@ -0,0 +1 @@ +../../../AFNetworking/UIKit+AFNetworking/UIImage+AFNetworking.h \ No newline at end of file diff --git a/Pods/Headers/Public/AFNetworking/UIImageView+AFNetworking.h b/Pods/Headers/Public/AFNetworking/UIImageView+AFNetworking.h new file mode 120000 index 0000000..a95d673 --- /dev/null +++ b/Pods/Headers/Public/AFNetworking/UIImageView+AFNetworking.h @@ -0,0 +1 @@ +../../../AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h \ No newline at end of file diff --git a/Pods/Headers/Public/AFNetworking/UIKit+AFNetworking.h b/Pods/Headers/Public/AFNetworking/UIKit+AFNetworking.h new file mode 120000 index 0000000..95017cc --- /dev/null +++ b/Pods/Headers/Public/AFNetworking/UIKit+AFNetworking.h @@ -0,0 +1 @@ +../../../AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h \ No newline at end of file diff --git a/Pods/Headers/Public/AFNetworking/UIProgressView+AFNetworking.h b/Pods/Headers/Public/AFNetworking/UIProgressView+AFNetworking.h new file mode 120000 index 0000000..730b167 --- /dev/null +++ b/Pods/Headers/Public/AFNetworking/UIProgressView+AFNetworking.h @@ -0,0 +1 @@ +../../../AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h \ No newline at end of file diff --git a/Pods/Headers/Public/AFNetworking/UIRefreshControl+AFNetworking.h b/Pods/Headers/Public/AFNetworking/UIRefreshControl+AFNetworking.h new file mode 120000 index 0000000..8efd826 --- /dev/null +++ b/Pods/Headers/Public/AFNetworking/UIRefreshControl+AFNetworking.h @@ -0,0 +1 @@ +../../../AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h \ No newline at end of file diff --git a/Pods/Headers/Public/AFNetworking/UIWebView+AFNetworking.h b/Pods/Headers/Public/AFNetworking/UIWebView+AFNetworking.h new file mode 120000 index 0000000..c8df6ef --- /dev/null +++ b/Pods/Headers/Public/AFNetworking/UIWebView+AFNetworking.h @@ -0,0 +1 @@ +../../../AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAddress.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAddress.h new file mode 120000 index 0000000..e90bc36 --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAddress.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSAddress.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAutocompleteFilter.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAutocompleteFilter.h new file mode 120000 index 0000000..481b137 --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAutocompleteFilter.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSAutocompleteFilter.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAutocompleteMatchFragment.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAutocompleteMatchFragment.h new file mode 120000 index 0000000..35dd8ce --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAutocompleteMatchFragment.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSAutocompleteMatchFragment.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAutocompletePrediction.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAutocompletePrediction.h new file mode 120000 index 0000000..1d0b893 --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAutocompletePrediction.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSAutocompletePrediction.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSCALayer.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSCALayer.h new file mode 120000 index 0000000..28ee5f1 --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSCALayer.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSCALayer.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSCameraPosition.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSCameraPosition.h new file mode 120000 index 0000000..378aded --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSCameraPosition.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSCameraPosition.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSCameraUpdate.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSCameraUpdate.h new file mode 120000 index 0000000..1750643 --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSCameraUpdate.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSCameraUpdate.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSCircle.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSCircle.h new file mode 120000 index 0000000..97cf3b4 --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSCircle.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSCircle.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSCoordinateBounds.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSCoordinateBounds.h new file mode 120000 index 0000000..b8f035b --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSCoordinateBounds.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSCoordinateBounds.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSGeocoder.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSGeocoder.h new file mode 120000 index 0000000..3ce1121 --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSGeocoder.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSGeocoder.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSGeometryUtils.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSGeometryUtils.h new file mode 120000 index 0000000..5e0ca0a --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSGeometryUtils.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSGeometryUtils.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSGroundOverlay.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSGroundOverlay.h new file mode 120000 index 0000000..dc73548 --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSGroundOverlay.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSGroundOverlay.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSIndoorBuilding.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSIndoorBuilding.h new file mode 120000 index 0000000..a0d4dae --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSIndoorBuilding.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSIndoorBuilding.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSIndoorDisplay.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSIndoorDisplay.h new file mode 120000 index 0000000..59d87f8 --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSIndoorDisplay.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSIndoorDisplay.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSIndoorLevel.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSIndoorLevel.h new file mode 120000 index 0000000..e662766 --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSIndoorLevel.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSIndoorLevel.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMapLayer.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMapLayer.h new file mode 120000 index 0000000..b794812 --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMapLayer.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSMapLayer.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMapView+Animation.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMapView+Animation.h new file mode 120000 index 0000000..e514ed7 --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMapView+Animation.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSMapView+Animation.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMapView.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMapView.h new file mode 120000 index 0000000..ede2388 --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMapView.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSMapView.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMarker.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMarker.h new file mode 120000 index 0000000..f756122 --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMarker.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSMarker.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMarkerLayer.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMarkerLayer.h new file mode 120000 index 0000000..9f2229c --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMarkerLayer.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSMarkerLayer.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMutablePath.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMutablePath.h new file mode 120000 index 0000000..0019964 --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMutablePath.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSMutablePath.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSOrientation.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSOrientation.h new file mode 120000 index 0000000..56c98c6 --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSOrientation.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSOrientation.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSOverlay.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSOverlay.h new file mode 120000 index 0000000..446d69f --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSOverlay.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSOverlay.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanorama.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanorama.h new file mode 120000 index 0000000..5ed18c8 --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanorama.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPanorama.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaCamera.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaCamera.h new file mode 120000 index 0000000..84670fe --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaCamera.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPanoramaCamera.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaCameraUpdate.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaCameraUpdate.h new file mode 120000 index 0000000..57a601c --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaCameraUpdate.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPanoramaCameraUpdate.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaLayer.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaLayer.h new file mode 120000 index 0000000..822f8b1 --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaLayer.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPanoramaLayer.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaLink.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaLink.h new file mode 120000 index 0000000..bd626ae --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaLink.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPanoramaLink.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaService.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaService.h new file mode 120000 index 0000000..1b54576 --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaService.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPanoramaService.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaView.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaView.h new file mode 120000 index 0000000..2dd1b1d --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaView.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPanoramaView.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPath.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPath.h new file mode 120000 index 0000000..0c77038 --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPath.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPath.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlace.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlace.h new file mode 120000 index 0000000..9afb1ed --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlace.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPlace.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlaceLikelihood.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlaceLikelihood.h new file mode 120000 index 0000000..8de608a --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlaceLikelihood.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPlaceLikelihood.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlaceLikelihoodList.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlaceLikelihoodList.h new file mode 120000 index 0000000..a471b77 --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlaceLikelihoodList.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPlaceLikelihoodList.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlacePicker.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlacePicker.h new file mode 120000 index 0000000..c521b88 --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlacePicker.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPlacePicker.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlacePickerConfig.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlacePickerConfig.h new file mode 120000 index 0000000..f3df3de --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlacePickerConfig.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPlacePickerConfig.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlaceTypes.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlaceTypes.h new file mode 120000 index 0000000..437a1a7 --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlaceTypes.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPlaceTypes.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlacesClient.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlacesClient.h new file mode 120000 index 0000000..360582a --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlacesClient.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPlacesClient.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlacesMacros.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlacesMacros.h new file mode 120000 index 0000000..05d05fe --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlacesMacros.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPlacesMacros.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPolygon.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPolygon.h new file mode 120000 index 0000000..2c636db --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPolygon.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPolygon.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPolyline.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPolyline.h new file mode 120000 index 0000000..f8a3104 --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPolyline.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSPolyline.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSProjection.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSProjection.h new file mode 120000 index 0000000..3f51982 --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSProjection.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSProjection.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSServices.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSServices.h new file mode 120000 index 0000000..6fe6119 --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSServices.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSServices.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSSyncTileLayer.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSSyncTileLayer.h new file mode 120000 index 0000000..c00d001 --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSSyncTileLayer.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSSyncTileLayer.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSTileLayer.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSTileLayer.h new file mode 120000 index 0000000..4713811 --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSTileLayer.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSTileLayer.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSUISettings.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSUISettings.h new file mode 120000 index 0000000..8c881d6 --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSUISettings.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSUISettings.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSURLTileLayer.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSURLTileLayer.h new file mode 120000 index 0000000..52a895a --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSURLTileLayer.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSURLTileLayer.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSUserAddedPlace.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSUserAddedPlace.h new file mode 120000 index 0000000..f9b53c7 --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSUserAddedPlace.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GMSUserAddedPlace.h \ No newline at end of file diff --git a/Pods/Headers/Public/GoogleMaps/GoogleMaps/GoogleMaps.h b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GoogleMaps.h new file mode 120000 index 0000000..904fee4 --- /dev/null +++ b/Pods/Headers/Public/GoogleMaps/GoogleMaps/GoogleMaps.h @@ -0,0 +1 @@ +../../../../GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Headers/GoogleMaps.h \ No newline at end of file diff --git a/Pods/Headers/Public/SDWebImage/NSData+ImageContentType.h b/Pods/Headers/Public/SDWebImage/NSData+ImageContentType.h new file mode 120000 index 0000000..8457498 --- /dev/null +++ b/Pods/Headers/Public/SDWebImage/NSData+ImageContentType.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/NSData+ImageContentType.h \ No newline at end of file diff --git a/Pods/Headers/Public/SDWebImage/SDImageCache.h b/Pods/Headers/Public/SDWebImage/SDImageCache.h new file mode 120000 index 0000000..0040b06 --- /dev/null +++ b/Pods/Headers/Public/SDWebImage/SDImageCache.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/SDImageCache.h \ No newline at end of file diff --git a/Pods/Headers/Public/SDWebImage/SDWebImageCompat.h b/Pods/Headers/Public/SDWebImage/SDWebImageCompat.h new file mode 120000 index 0000000..6ca2478 --- /dev/null +++ b/Pods/Headers/Public/SDWebImage/SDWebImageCompat.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/SDWebImageCompat.h \ No newline at end of file diff --git a/Pods/Headers/Public/SDWebImage/SDWebImageDecoder.h b/Pods/Headers/Public/SDWebImage/SDWebImageDecoder.h new file mode 120000 index 0000000..a2f3a68 --- /dev/null +++ b/Pods/Headers/Public/SDWebImage/SDWebImageDecoder.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/SDWebImageDecoder.h \ No newline at end of file diff --git a/Pods/Headers/Public/SDWebImage/SDWebImageDownloader.h b/Pods/Headers/Public/SDWebImage/SDWebImageDownloader.h new file mode 120000 index 0000000..303b03b --- /dev/null +++ b/Pods/Headers/Public/SDWebImage/SDWebImageDownloader.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/SDWebImageDownloader.h \ No newline at end of file diff --git a/Pods/Headers/Public/SDWebImage/SDWebImageDownloaderOperation.h b/Pods/Headers/Public/SDWebImage/SDWebImageDownloaderOperation.h new file mode 120000 index 0000000..99441c4 --- /dev/null +++ b/Pods/Headers/Public/SDWebImage/SDWebImageDownloaderOperation.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/SDWebImageDownloaderOperation.h \ No newline at end of file diff --git a/Pods/Headers/Public/SDWebImage/SDWebImageManager.h b/Pods/Headers/Public/SDWebImage/SDWebImageManager.h new file mode 120000 index 0000000..1b81848 --- /dev/null +++ b/Pods/Headers/Public/SDWebImage/SDWebImageManager.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/SDWebImageManager.h \ No newline at end of file diff --git a/Pods/Headers/Public/SDWebImage/SDWebImageOperation.h b/Pods/Headers/Public/SDWebImage/SDWebImageOperation.h new file mode 120000 index 0000000..20e5b89 --- /dev/null +++ b/Pods/Headers/Public/SDWebImage/SDWebImageOperation.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/SDWebImageOperation.h \ No newline at end of file diff --git a/Pods/Headers/Public/SDWebImage/SDWebImagePrefetcher.h b/Pods/Headers/Public/SDWebImage/SDWebImagePrefetcher.h new file mode 120000 index 0000000..50585c6 --- /dev/null +++ b/Pods/Headers/Public/SDWebImage/SDWebImagePrefetcher.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/SDWebImagePrefetcher.h \ No newline at end of file diff --git a/Pods/Headers/Public/SDWebImage/UIButton+WebCache.h b/Pods/Headers/Public/SDWebImage/UIButton+WebCache.h new file mode 120000 index 0000000..19d2d8e --- /dev/null +++ b/Pods/Headers/Public/SDWebImage/UIButton+WebCache.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/UIButton+WebCache.h \ No newline at end of file diff --git a/Pods/Headers/Public/SDWebImage/UIImage+GIF.h b/Pods/Headers/Public/SDWebImage/UIImage+GIF.h new file mode 120000 index 0000000..14d5aad --- /dev/null +++ b/Pods/Headers/Public/SDWebImage/UIImage+GIF.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/UIImage+GIF.h \ No newline at end of file diff --git a/Pods/Headers/Public/SDWebImage/UIImage+MultiFormat.h b/Pods/Headers/Public/SDWebImage/UIImage+MultiFormat.h new file mode 120000 index 0000000..1fb9650 --- /dev/null +++ b/Pods/Headers/Public/SDWebImage/UIImage+MultiFormat.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/UIImage+MultiFormat.h \ No newline at end of file diff --git a/Pods/Headers/Public/SDWebImage/UIImageView+HighlightedWebCache.h b/Pods/Headers/Public/SDWebImage/UIImageView+HighlightedWebCache.h new file mode 120000 index 0000000..fd4dea4 --- /dev/null +++ b/Pods/Headers/Public/SDWebImage/UIImageView+HighlightedWebCache.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/UIImageView+HighlightedWebCache.h \ No newline at end of file diff --git a/Pods/Headers/Public/SDWebImage/UIImageView+WebCache.h b/Pods/Headers/Public/SDWebImage/UIImageView+WebCache.h new file mode 120000 index 0000000..0c53a47 --- /dev/null +++ b/Pods/Headers/Public/SDWebImage/UIImageView+WebCache.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/UIImageView+WebCache.h \ No newline at end of file diff --git a/Pods/Headers/Public/SDWebImage/UIView+WebCacheOperation.h b/Pods/Headers/Public/SDWebImage/UIView+WebCacheOperation.h new file mode 120000 index 0000000..f9890c4 --- /dev/null +++ b/Pods/Headers/Public/SDWebImage/UIView+WebCacheOperation.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/UIView+WebCacheOperation.h \ No newline at end of file diff --git a/Pods/Manifest.lock b/Pods/Manifest.lock new file mode 100644 index 0000000..f4e6fde --- /dev/null +++ b/Pods/Manifest.lock @@ -0,0 +1,38 @@ +PODS: + - AFNetworking (2.6.0): + - AFNetworking/NSURLConnection (= 2.6.0) + - AFNetworking/NSURLSession (= 2.6.0) + - AFNetworking/Reachability (= 2.6.0) + - AFNetworking/Security (= 2.6.0) + - AFNetworking/Serialization (= 2.6.0) + - AFNetworking/UIKit (= 2.6.0) + - AFNetworking/NSURLConnection (2.6.0): + - AFNetworking/Reachability + - AFNetworking/Security + - AFNetworking/Serialization + - AFNetworking/NSURLSession (2.6.0): + - AFNetworking/Reachability + - AFNetworking/Security + - AFNetworking/Serialization + - AFNetworking/Reachability (2.6.0) + - AFNetworking/Security (2.6.0) + - AFNetworking/Serialization (2.6.0) + - AFNetworking/UIKit (2.6.0): + - AFNetworking/NSURLConnection + - AFNetworking/NSURLSession + - GoogleMaps (1.10.3) + - SDWebImage (3.7.3): + - SDWebImage/Core (= 3.7.3) + - SDWebImage/Core (3.7.3) + +DEPENDENCIES: + - AFNetworking + - GoogleMaps + - SDWebImage + +SPEC CHECKSUMS: + AFNetworking: 79f7eb1a0fcfa7beb409332b2ca49afe9ce53b05 + GoogleMaps: 945e4ac3b74bcca3ddada51df256eb7beddb474d + SDWebImage: 1d2b1a1efda1ade1b00b6f8498865f8ddedc8a84 + +COCOAPODS: 0.38.2 diff --git a/Pods/Pods.xcodeproj/project.pbxproj b/Pods/Pods.xcodeproj/project.pbxproj new file mode 100644 index 0000000..f21d9f8 --- /dev/null +++ b/Pods/Pods.xcodeproj/project.pbxproj @@ -0,0 +1,915 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 0684B0B1245A05BB7FEA8F746E298768 /* UIProgressView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 910CFAB2C8FF81946A103E266A398B47 /* UIProgressView+AFNetworking.h */; }; + 07E0DE6187B3EBD0870ECABCCEC9FA65 /* UIImage+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 071876CB199B174691465D1BAC226A4B /* UIImage+AFNetworking.h */; }; + 0943A4196177D34CF59C88E4AA77B576 /* SDWebImageDecoder.m in Sources */ = {isa = PBXBuildFile; fileRef = F6810D818545BACFD21ACAB72D23DC72 /* SDWebImageDecoder.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 0B7EAEC9FE6FB5A4943BF5E60DE61628 /* UIButton+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E28D0C2783C92D0818215372C2B9293 /* UIButton+AFNetworking.m */; }; + 0CBFA0FDE2C98DEB97B2B0DC291F6F3F /* UIImageView+WebCache.m in Sources */ = {isa = PBXBuildFile; fileRef = E1EFD1D330A4BC70F1C4C2ED395E2258 /* UIImageView+WebCache.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 18894FC9A166263E6CB1FC6EE6AD8EFF /* SDWebImageDownloader.m in Sources */ = {isa = PBXBuildFile; fileRef = 83F8CEA8D6C3D34590016ED7FF78B90C /* SDWebImageDownloader.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 19191A4BD8323354D6567B93B9D1CB1E /* AFSecurityPolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E75E489EEE7C398011E44C11D585E51 /* AFSecurityPolicy.m */; }; + 1CCA328442D8AAE7B592A182C758F00B /* Pods-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 073A391F3F374486E769F43AAEE8A185 /* Pods-dummy.m */; }; + 1EE1F95324A1022B81EAA83FDD1A0C46 /* UIActivityIndicatorView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 15414520995CA53264C196BDDA771DF1 /* UIActivityIndicatorView+AFNetworking.m */; }; + 2358EE556EF067512DADC50B59A15D25 /* SDWebImageManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C4C8A6792D4A925F9D3ABA38CB9537E /* SDWebImageManager.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 236F1ECD2D905D2BDF201EBA9EAD2E7B /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 67CBBA4B0D83C958E2F9C44AC5C34D94 /* Security.framework */; }; + 26B21B244340BA5A2F45F3B43F1D4926 /* UIButton+WebCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 5099BC8D81DEDA973F9FF97BE55354BB /* UIButton+WebCache.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 2923B0513DCC626235055CB509DC6AD9 /* AFNetworkReachabilityManager.h in Headers */ = {isa = PBXBuildFile; fileRef = C68F29B5D253C92FEC793FE8A0A6C1E2 /* AFNetworkReachabilityManager.h */; }; + 2AA00DD78A8A77BF307C09C7CE2B8D98 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 07D637F0B8EDC53BAFDB63B46EB51E44 /* MobileCoreServices.framework */; }; + 2C6AEC70A3E09CC7BD16C30B5B941981 /* SDWebImageManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 5ECFB2161C220584CD4F649E8EAE3896 /* SDWebImageManager.h */; }; + 2E94B79F849D7C3201152FC4F8048069 /* AFURLSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E7423FBF8F886A99671A0EB4AEB60C0D /* AFURLSessionManager.m */; }; + 37A315C532DA1A156F9676951702EFB9 /* SDWebImageDownloader.h in Headers */ = {isa = PBXBuildFile; fileRef = 565D0DE3F083F3D803EE8CA97CDAECC5 /* SDWebImageDownloader.h */; }; + 3E0A22C958FB84EFF9C4E91ED7B480FE /* AFNetworking-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 386D22908B1A6C2FB5AC66C5B66BCD61 /* AFNetworking-dummy.m */; }; + 46C6D0143AB94CDD866FB320B9DB3C14 /* NSData+ImageContentType.h in Headers */ = {isa = PBXBuildFile; fileRef = 76C518201A486FCF7036C9F9DDBD593D /* NSData+ImageContentType.h */; }; + 4861889C3E7AE62D9C31E3AC902783D4 /* AFHTTPSessionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 0D85C288383760F038CE77183742CCD5 /* AFHTTPSessionManager.h */; }; + 50151E9ABC4AC6EFCD9764698E392A3D /* UIImageView+HighlightedWebCache.m in Sources */ = {isa = PBXBuildFile; fileRef = E7B5566E66AC64253CA228C460AE2931 /* UIImageView+HighlightedWebCache.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 505651BE6DF50CBA5C6BE87452D20BCF /* UIImageView+HighlightedWebCache.h in Headers */ = {isa = PBXBuildFile; fileRef = D8DD99E890B5B9C7A22168DCDFF7F2F2 /* UIImageView+HighlightedWebCache.h */; }; + 57FDB0D84B88BA790448FB0099B256FB /* UIImage+MultiFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = 6437C050025F1A8C69647B6744A18170 /* UIImage+MultiFormat.h */; }; + 5B47AD7261F09529FBDF576FBF834238 /* AFHTTPRequestOperationManager.m in Sources */ = {isa = PBXBuildFile; fileRef = EC8116CB10ADAFA3521C2CB231FBF637 /* AFHTTPRequestOperationManager.m */; }; + 646A6FC808A0B280B80AD4949D8357F8 /* UIView+WebCacheOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 44E19C4AEA9338236A9FD2DDA753E214 /* UIView+WebCacheOperation.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 683D4409569BB94EA3E3CA4B20630763 /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DD298F4EF2F68C4B172982286D20D49 /* ImageIO.framework */; }; + 6C55AA5E00960B83FD04C71D896D2626 /* AFURLResponseSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C0BDEC1E1A1C18B7A4BFAA45D05770F /* AFURLResponseSerialization.h */; }; + 6DBBC964FE31C2FCB6D6656B10745778 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E17F556653796C99AAABDA059E433442 /* SystemConfiguration.framework */; }; + 751C7CA61D9FD97DF80431FC9050736F /* UIButton+WebCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 442BD5A86D7383D426EA6C87AB86FA93 /* UIButton+WebCache.h */; }; + 75D7CEA58A5F72C5F13499A11A573EEA /* SDWebImage-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 36868875BC2FD7CD9ACA53E772A68147 /* SDWebImage-dummy.m */; }; + 77A6AD0AA31E240EEBC43D80A0AEF8FE /* UIRefreshControl+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 89EDADE2E651587ECF0CE3AA490D6FCA /* UIRefreshControl+AFNetworking.h */; }; + 791A08AF9727A4E59CDDD53B49366865 /* AFNetworkActivityIndicatorManager.h in Headers */ = {isa = PBXBuildFile; fileRef = AF0E2F2ABC803AADC0AB6840CD7C3448 /* AFNetworkActivityIndicatorManager.h */; }; + 7E133A9836285A496F882CA0135D166D /* UIButton+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EEE208EB88B586B744351EC0EBF0574 /* UIButton+AFNetworking.h */; }; + 7E6254056AA895B8C0C51FFBFDFA78E6 /* AFURLConnectionOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = A4EB8FF669E6B7E2D369CF6E0BA4B65E /* AFURLConnectionOperation.m */; }; + 7F47EBDA28826BDBD28A502091E9D9FD /* SDWebImagePrefetcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D283561CA0E408531C1CA0651571381 /* SDWebImagePrefetcher.h */; }; + 815B547074BED8A31FA5E9AE11E9A3D4 /* UIImageView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 99E4D34997E312103737225BD94525B4 /* UIImageView+AFNetworking.h */; }; + 88E73B996D8355E9622B66AD1BCCB168 /* NSData+ImageContentType.m in Sources */ = {isa = PBXBuildFile; fileRef = 085ECBDDE362422A1BFD1DBE30FDB4F4 /* NSData+ImageContentType.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 898D8603930620AE3DE89A892967A505 /* SDImageCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 663FC8B8350D10A667A2FAF5EF29708C /* SDImageCache.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 8CF57ED1AA43E413DEEE3A8331BCDBEF /* AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 1B71E35ACC8E31F7DCDB75E8E07DE146 /* AFNetworking.h */; }; + 90144EA34E633F7A8746D9C8BF0FF942 /* SDWebImageDownloaderOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 15D66C1B89B8779333C904B6E1F0FE50 /* SDWebImageDownloaderOperation.h */; }; + 929F837297CF86B8373DB1E4553E2228 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 39BB348067387DCC8463FF5B80C9AE92 /* CoreGraphics.framework */; }; + 96D21B51E3BCC3FC48C060B0CCEF597A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1F8E9476ED04F42C4A300AC441C4BA61 /* Foundation.framework */; }; + 9C42B67B0898307659F1329CB052D049 /* AFURLSessionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = C1815E959643B3C1316D163670C4851F /* AFURLSessionManager.h */; }; + A02A56F753A8F762799F97E7B2540D68 /* AFURLConnectionOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 4921F1017DD61AB469812B742D1B682C /* AFURLConnectionOperation.h */; }; + A2222CEDD905A2D387F4A9C3895A093B /* UIImage+GIF.m in Sources */ = {isa = PBXBuildFile; fileRef = 0C8BE0864137B3554F8C368D6F6EA646 /* UIImage+GIF.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + A50D6CD5C1355A6B20B38C5392A36CEE /* AFHTTPRequestOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = C7944E4C11170A20D585134932487A39 /* AFHTTPRequestOperation.h */; }; + A652310EBFED5BF5E0626FD6BA4B84A1 /* AFHTTPRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 3FE0AECE52C8DEC4658633BFA14A7A08 /* AFHTTPRequestOperation.m */; }; + A6EC3E1CCB6DC24720F3D5902677421E /* SDWebImageCompat.h in Headers */ = {isa = PBXBuildFile; fileRef = 3CC3A4489FFEE078645C51D22848F697 /* SDWebImageCompat.h */; }; + A773D58B6468B559F2DAB70F8C57F985 /* SDWebImagePrefetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 21426DB0E26F4458B2B8E531ED929344 /* SDWebImagePrefetcher.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + AD22FBED3B2F3B5E300F4631FF325B0D /* SDImageCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 20C7708C9D92468D5D2DD3A56794B5F4 /* SDImageCache.h */; }; + AD87CA38523C7181D830CAF567473D7C /* AFHTTPSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 508AD14ED96FAE92EEFA77806C1441DB /* AFHTTPSessionManager.m */; }; + AF2E715BD7601DD0BFD107ED7D0C362B /* AFURLResponseSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = DC72BDD242479F67C1FF9A5BC4BDCFE7 /* AFURLResponseSerialization.m */; }; + B051E3F22E4BA58D5B93BAD8D72BEAF4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1F8E9476ED04F42C4A300AC441C4BA61 /* Foundation.framework */; }; + B108EF8640D45C3EC1F32CD7AC6DE75E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1F8E9476ED04F42C4A300AC441C4BA61 /* Foundation.framework */; }; + B9B24F1882156B9384823BC873391481 /* UIView+WebCacheOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 605FCA5E9AB5C444FED020AAB684D140 /* UIView+WebCacheOperation.h */; }; + BB2493C2C754CDBB528088EACCBD3CA4 /* UIProgressView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = C2CA9694DED15175D5FB5B31CFC45D0B /* UIProgressView+AFNetworking.m */; }; + C1185E296305793C5FC452BA59752A99 /* SDWebImageDownloaderOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = B3D5ADC47369DCB41D20305EB6B00EFA /* SDWebImageDownloaderOperation.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + C32516863188EAD0CB8D27A796372599 /* UIImage+GIF.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E1763D689FFF87A52680D3FDBBCCA2F /* UIImage+GIF.h */; }; + C477F72798C6C0D45615B277C23A8719 /* AFURLRequestSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = DAC9FC1E0850F561164206772C295DD9 /* AFURLRequestSerialization.m */; }; + CD26D855EDF31FAC7773A4BFB544D7DE /* AFHTTPRequestOperationManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 6C0C60BB25B504D96BCCFC19F269DDC1 /* AFHTTPRequestOperationManager.h */; }; + CF8333B5FEC0C76FD7155FE88D951248 /* SDWebImageDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = FF3208FF08E5445EB9E5049F4C5D94F3 /* SDWebImageDecoder.h */; }; + D24577F5F307EAC9CA4FCDB0329AE721 /* UIWebView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 762A1619491C5709EC5ABE6A69D10474 /* UIWebView+AFNetworking.m */; }; + D9ED52E7516DCFF5146355D1D8C435D4 /* AFNetworkReachabilityManager.m in Sources */ = {isa = PBXBuildFile; fileRef = C6F9D292ECB0B86D3E2EC4255A6418C4 /* AFNetworkReachabilityManager.m */; }; + DA67351F3C88B2C44A7F352B86E9745D /* AFURLRequestSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = ACA1473CC21B04E7E705F3CAA2A5014A /* AFURLRequestSerialization.h */; }; + DB306D14383CA3D4C84A992D049AFC43 /* UIWebView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BFB19D6A82017A6D630E245F177020E /* UIWebView+AFNetworking.h */; }; + E042F3EE15E5D06B958372257805F086 /* SDWebImageOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 1693790C9228360FA63950C2D796CFA5 /* SDWebImageOperation.h */; }; + E1F84D703837B66E3C51919D173EEF0C /* UIAlertView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 866545F66AD75ECD5B33484FAA68FBCD /* UIAlertView+AFNetworking.m */; }; + E35C0F9E9037F5CF0412DFFBC91EDD18 /* AFSecurityPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B148A4F33C247FD9C75C9B1D85D58A9 /* AFSecurityPolicy.h */; }; + E425B5BDA7311943CCEA473B9921A915 /* UIKit+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 142E983BF5932C78158A2647F698AB42 /* UIKit+AFNetworking.h */; }; + E546C629532E48CEAD8FE64899B76AB9 /* UIRefreshControl+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 93AFACF4D0AC5434E4AFB2E78BEFB4B9 /* UIRefreshControl+AFNetworking.m */; }; + EAAAE461B47CBA3CA69518D554A6717D /* UIActivityIndicatorView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = D12D335F1DE4485B5720442B7745ED4F /* UIActivityIndicatorView+AFNetworking.h */; }; + EEC70F07E66D6E0AB32E3E8337165EFD /* UIImage+MultiFormat.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BFEE3E0C36A901C0D63CDBB8F8D490A /* UIImage+MultiFormat.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + EF2E5E9490743E84AEAD0DDCD300CF54 /* UIImageView+WebCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 572E9757319756864DBF2880DCA92575 /* UIImageView+WebCache.h */; }; + F105763DA404C894339A617B11B546F4 /* UIImageView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 42C9C18D8BF3872DDF8C96BB229C868B /* UIImageView+AFNetworking.m */; }; + F4FDFA5A83BE4F0B473F228F6AC2C726 /* SDWebImageCompat.m in Sources */ = {isa = PBXBuildFile; fileRef = FE98519651ECB3ECA5C602AD82864FE1 /* SDWebImageCompat.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + FB8273F408F90DA94D95314C24648042 /* UIAlertView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 508770E612E923B4E8059F259957EDF9 /* UIAlertView+AFNetworking.h */; }; + FC6F9E6CD492D0E6599D4E3E112F26EF /* AFNetworkActivityIndicatorManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 72346E2FC87492766AA08C01B5524E81 /* AFNetworkActivityIndicatorManager.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 6387228E01D24ED7BF054F95B4FE4022 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 18EC14534F11FFCA91D0E5DDDB7B9729; + remoteInfo = AFNetworking; + }; + D8175A057F3398E11111C615845072C0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 5352D432641F0656C90741034E32F31E; + remoteInfo = SDWebImage; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 071876CB199B174691465D1BAC226A4B /* UIImage+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIImage+AFNetworking.h"; path = "UIKit+AFNetworking/UIImage+AFNetworking.h"; sourceTree = ""; }; + 073A391F3F374486E769F43AAEE8A185 /* Pods-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-dummy.m"; sourceTree = ""; }; + 07D637F0B8EDC53BAFDB63B46EB51E44 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/MobileCoreServices.framework; sourceTree = DEVELOPER_DIR; }; + 085ECBDDE362422A1BFD1DBE30FDB4F4 /* NSData+ImageContentType.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSData+ImageContentType.m"; path = "SDWebImage/NSData+ImageContentType.m"; sourceTree = ""; }; + 0C8BE0864137B3554F8C368D6F6EA646 /* UIImage+GIF.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIImage+GIF.m"; path = "SDWebImage/UIImage+GIF.m"; sourceTree = ""; }; + 0D59D872E2F296E4F6FF55C14C8295B4 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Pods.debug.xcconfig; sourceTree = ""; }; + 0D85C288383760F038CE77183742CCD5 /* AFHTTPSessionManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFHTTPSessionManager.h; path = AFNetworking/AFHTTPSessionManager.h; sourceTree = ""; }; + 142E983BF5932C78158A2647F698AB42 /* UIKit+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIKit+AFNetworking.h"; path = "UIKit+AFNetworking/UIKit+AFNetworking.h"; sourceTree = ""; }; + 15414520995CA53264C196BDDA771DF1 /* UIActivityIndicatorView+AFNetworking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIActivityIndicatorView+AFNetworking.m"; path = "UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.m"; sourceTree = ""; }; + 15A529C27057E4A57D259CBC6E6CE49C /* Pods-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-acknowledgements.markdown"; sourceTree = ""; }; + 15D66C1B89B8779333C904B6E1F0FE50 /* SDWebImageDownloaderOperation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SDWebImageDownloaderOperation.h; path = SDWebImage/SDWebImageDownloaderOperation.h; sourceTree = ""; }; + 1693790C9228360FA63950C2D796CFA5 /* SDWebImageOperation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SDWebImageOperation.h; path = SDWebImage/SDWebImageOperation.h; sourceTree = ""; }; + 1B71E35ACC8E31F7DCDB75E8E07DE146 /* AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFNetworking.h; path = AFNetworking/AFNetworking.h; sourceTree = ""; }; + 1C0BDEC1E1A1C18B7A4BFAA45D05770F /* AFURLResponseSerialization.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFURLResponseSerialization.h; path = AFNetworking/AFURLResponseSerialization.h; sourceTree = ""; }; + 1EEE208EB88B586B744351EC0EBF0574 /* UIButton+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIButton+AFNetworking.h"; path = "UIKit+AFNetworking/UIButton+AFNetworking.h"; sourceTree = ""; }; + 1F8E9476ED04F42C4A300AC441C4BA61 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + 20C7708C9D92468D5D2DD3A56794B5F4 /* SDImageCache.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SDImageCache.h; path = SDWebImage/SDImageCache.h; sourceTree = ""; }; + 21426DB0E26F4458B2B8E531ED929344 /* SDWebImagePrefetcher.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = SDWebImagePrefetcher.m; path = SDWebImage/SDWebImagePrefetcher.m; sourceTree = ""; }; + 22903FC7206E395C55F615E8FA978163 /* AFNetworking-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "AFNetworking-prefix.pch"; sourceTree = ""; }; + 22F721F92E9AE8C014DB4DCF3CCEF31D /* SDWebImage-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SDWebImage-prefix.pch"; sourceTree = ""; }; + 2676F4D68D7502376A5B7B4F246610E2 /* libAFNetworking.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libAFNetworking.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 2737F621C08298A484283DDA5649391A /* AFNetworking.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = AFNetworking.xcconfig; sourceTree = ""; }; + 2D283561CA0E408531C1CA0651571381 /* SDWebImagePrefetcher.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SDWebImagePrefetcher.h; path = SDWebImage/SDWebImagePrefetcher.h; sourceTree = ""; }; + 36868875BC2FD7CD9ACA53E772A68147 /* SDWebImage-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SDWebImage-dummy.m"; sourceTree = ""; }; + 386D22908B1A6C2FB5AC66C5B66BCD61 /* AFNetworking-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "AFNetworking-dummy.m"; sourceTree = ""; }; + 39BB348067387DCC8463FF5B80C9AE92 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/CoreGraphics.framework; sourceTree = DEVELOPER_DIR; }; + 3CC3A4489FFEE078645C51D22848F697 /* SDWebImageCompat.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SDWebImageCompat.h; path = SDWebImage/SDWebImageCompat.h; sourceTree = ""; }; + 3FE0AECE52C8DEC4658633BFA14A7A08 /* AFHTTPRequestOperation.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFHTTPRequestOperation.m; path = AFNetworking/AFHTTPRequestOperation.m; sourceTree = ""; }; + 42C9C18D8BF3872DDF8C96BB229C868B /* UIImageView+AFNetworking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIImageView+AFNetworking.m"; path = "UIKit+AFNetworking/UIImageView+AFNetworking.m"; sourceTree = ""; }; + 442BD5A86D7383D426EA6C87AB86FA93 /* UIButton+WebCache.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIButton+WebCache.h"; path = "SDWebImage/UIButton+WebCache.h"; sourceTree = ""; }; + 44E19C4AEA9338236A9FD2DDA753E214 /* UIView+WebCacheOperation.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIView+WebCacheOperation.m"; path = "SDWebImage/UIView+WebCacheOperation.m"; sourceTree = ""; }; + 4921F1017DD61AB469812B742D1B682C /* AFURLConnectionOperation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFURLConnectionOperation.h; path = AFNetworking/AFURLConnectionOperation.h; sourceTree = ""; }; + 4C4C8A6792D4A925F9D3ABA38CB9537E /* SDWebImageManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = SDWebImageManager.m; path = SDWebImage/SDWebImageManager.m; sourceTree = ""; }; + 4E28D0C2783C92D0818215372C2B9293 /* UIButton+AFNetworking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIButton+AFNetworking.m"; path = "UIKit+AFNetworking/UIButton+AFNetworking.m"; sourceTree = ""; }; + 508770E612E923B4E8059F259957EDF9 /* UIAlertView+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIAlertView+AFNetworking.h"; path = "UIKit+AFNetworking/UIAlertView+AFNetworking.h"; sourceTree = ""; }; + 508AD14ED96FAE92EEFA77806C1441DB /* AFHTTPSessionManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFHTTPSessionManager.m; path = AFNetworking/AFHTTPSessionManager.m; sourceTree = ""; }; + 5099BC8D81DEDA973F9FF97BE55354BB /* UIButton+WebCache.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIButton+WebCache.m"; path = "SDWebImage/UIButton+WebCache.m"; sourceTree = ""; }; + 565D0DE3F083F3D803EE8CA97CDAECC5 /* SDWebImageDownloader.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SDWebImageDownloader.h; path = SDWebImage/SDWebImageDownloader.h; sourceTree = ""; }; + 572E9757319756864DBF2880DCA92575 /* UIImageView+WebCache.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIImageView+WebCache.h"; path = "SDWebImage/UIImageView+WebCache.h"; sourceTree = ""; }; + 5ECFB2161C220584CD4F649E8EAE3896 /* SDWebImageManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SDWebImageManager.h; path = SDWebImage/SDWebImageManager.h; sourceTree = ""; }; + 605FCA5E9AB5C444FED020AAB684D140 /* UIView+WebCacheOperation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIView+WebCacheOperation.h"; path = "SDWebImage/UIView+WebCacheOperation.h"; sourceTree = ""; }; + 641AE05DD55E5E6AC1590CD7B4A18F97 /* Pods-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-resources.sh"; sourceTree = ""; }; + 6437C050025F1A8C69647B6744A18170 /* UIImage+MultiFormat.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIImage+MultiFormat.h"; path = "SDWebImage/UIImage+MultiFormat.h"; sourceTree = ""; }; + 663FC8B8350D10A667A2FAF5EF29708C /* SDImageCache.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = SDImageCache.m; path = SDWebImage/SDImageCache.m; sourceTree = ""; }; + 67CBBA4B0D83C958E2F9C44AC5C34D94 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/Security.framework; sourceTree = DEVELOPER_DIR; }; + 6C0C60BB25B504D96BCCFC19F269DDC1 /* AFHTTPRequestOperationManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFHTTPRequestOperationManager.h; path = AFNetworking/AFHTTPRequestOperationManager.h; sourceTree = ""; }; + 6DD298F4EF2F68C4B172982286D20D49 /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/ImageIO.framework; sourceTree = DEVELOPER_DIR; }; + 6E0C841EEF75B7179B79DF75A0FE6D3C /* AFNetworking-Private.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "AFNetworking-Private.xcconfig"; sourceTree = ""; }; + 72346E2FC87492766AA08C01B5524E81 /* AFNetworkActivityIndicatorManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFNetworkActivityIndicatorManager.m; path = "UIKit+AFNetworking/AFNetworkActivityIndicatorManager.m"; sourceTree = ""; }; + 739C151460388F78B0CA7B4B02D2F203 /* GoogleMaps.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GoogleMaps.framework; path = Frameworks/GoogleMaps.framework; sourceTree = ""; }; + 762A1619491C5709EC5ABE6A69D10474 /* UIWebView+AFNetworking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIWebView+AFNetworking.m"; path = "UIKit+AFNetworking/UIWebView+AFNetworking.m"; sourceTree = ""; }; + 76C518201A486FCF7036C9F9DDBD593D /* NSData+ImageContentType.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSData+ImageContentType.h"; path = "SDWebImage/NSData+ImageContentType.h"; sourceTree = ""; }; + 7B148A4F33C247FD9C75C9B1D85D58A9 /* AFSecurityPolicy.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFSecurityPolicy.h; path = AFNetworking/AFSecurityPolicy.h; sourceTree = ""; }; + 7BFEE3E0C36A901C0D63CDBB8F8D490A /* UIImage+MultiFormat.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIImage+MultiFormat.m"; path = "SDWebImage/UIImage+MultiFormat.m"; sourceTree = ""; }; + 7E1763D689FFF87A52680D3FDBBCCA2F /* UIImage+GIF.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIImage+GIF.h"; path = "SDWebImage/UIImage+GIF.h"; sourceTree = ""; }; + 7E75E489EEE7C398011E44C11D585E51 /* AFSecurityPolicy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFSecurityPolicy.m; path = AFNetworking/AFSecurityPolicy.m; sourceTree = ""; }; + 8143223B5CD9869F48A07B4A50272DC8 /* SDWebImage.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SDWebImage.xcconfig; sourceTree = ""; }; + 83F8CEA8D6C3D34590016ED7FF78B90C /* SDWebImageDownloader.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = SDWebImageDownloader.m; path = SDWebImage/SDWebImageDownloader.m; sourceTree = ""; }; + 866545F66AD75ECD5B33484FAA68FBCD /* UIAlertView+AFNetworking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIAlertView+AFNetworking.m"; path = "UIKit+AFNetworking/UIAlertView+AFNetworking.m"; sourceTree = ""; }; + 89AAE1F01DB890D4C00BF6A162C79C8A /* SDWebImage-Private.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "SDWebImage-Private.xcconfig"; sourceTree = ""; }; + 89EDADE2E651587ECF0CE3AA490D6FCA /* UIRefreshControl+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIRefreshControl+AFNetworking.h"; path = "UIKit+AFNetworking/UIRefreshControl+AFNetworking.h"; sourceTree = ""; }; + 8BFB19D6A82017A6D630E245F177020E /* UIWebView+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIWebView+AFNetworking.h"; path = "UIKit+AFNetworking/UIWebView+AFNetworking.h"; sourceTree = ""; }; + 910CFAB2C8FF81946A103E266A398B47 /* UIProgressView+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIProgressView+AFNetworking.h"; path = "UIKit+AFNetworking/UIProgressView+AFNetworking.h"; sourceTree = ""; }; + 93AFACF4D0AC5434E4AFB2E78BEFB4B9 /* UIRefreshControl+AFNetworking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIRefreshControl+AFNetworking.m"; path = "UIKit+AFNetworking/UIRefreshControl+AFNetworking.m"; sourceTree = ""; }; + 99E4D34997E312103737225BD94525B4 /* UIImageView+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIImageView+AFNetworking.h"; path = "UIKit+AFNetworking/UIImageView+AFNetworking.h"; sourceTree = ""; }; + 9A012CE89EC94ED08352F51130C1C9CE /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Pods.release.xcconfig; sourceTree = ""; }; + A4E3C75131DB73B535BA7338F6201845 /* libSDWebImage.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDWebImage.a; sourceTree = BUILT_PRODUCTS_DIR; }; + A4EB8FF669E6B7E2D369CF6E0BA4B65E /* AFURLConnectionOperation.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFURLConnectionOperation.m; path = AFNetworking/AFURLConnectionOperation.m; sourceTree = ""; }; + ACA1473CC21B04E7E705F3CAA2A5014A /* AFURLRequestSerialization.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFURLRequestSerialization.h; path = AFNetworking/AFURLRequestSerialization.h; sourceTree = ""; }; + AF0E2F2ABC803AADC0AB6840CD7C3448 /* AFNetworkActivityIndicatorManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFNetworkActivityIndicatorManager.h; path = "UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h"; sourceTree = ""; }; + AF97DC88C6D10A15B1A289D4E06FBF0C /* GoogleMaps.bundle */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "wrapper.plug-in"; name = GoogleMaps.bundle; path = Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle; sourceTree = ""; }; + B3D5ADC47369DCB41D20305EB6B00EFA /* SDWebImageDownloaderOperation.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = SDWebImageDownloaderOperation.m; path = SDWebImage/SDWebImageDownloaderOperation.m; sourceTree = ""; }; + BA6428E9F66FD5A23C0A2E06ED26CD2F /* Podfile */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + BF59BC15D23E1E1912C8F334E7236813 /* Pods-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-acknowledgements.plist"; sourceTree = ""; }; + C1815E959643B3C1316D163670C4851F /* AFURLSessionManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFURLSessionManager.h; path = AFNetworking/AFURLSessionManager.h; sourceTree = ""; }; + C2CA9694DED15175D5FB5B31CFC45D0B /* UIProgressView+AFNetworking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIProgressView+AFNetworking.m"; path = "UIKit+AFNetworking/UIProgressView+AFNetworking.m"; sourceTree = ""; }; + C68F29B5D253C92FEC793FE8A0A6C1E2 /* AFNetworkReachabilityManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFNetworkReachabilityManager.h; path = AFNetworking/AFNetworkReachabilityManager.h; sourceTree = ""; }; + C6F9D292ECB0B86D3E2EC4255A6418C4 /* AFNetworkReachabilityManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFNetworkReachabilityManager.m; path = AFNetworking/AFNetworkReachabilityManager.m; sourceTree = ""; }; + C7944E4C11170A20D585134932487A39 /* AFHTTPRequestOperation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFHTTPRequestOperation.h; path = AFNetworking/AFHTTPRequestOperation.h; sourceTree = ""; }; + C97344B7E8579E87FA86A52D47069F61 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; + D12D335F1DE4485B5720442B7745ED4F /* UIActivityIndicatorView+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIActivityIndicatorView+AFNetworking.h"; path = "UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h"; sourceTree = ""; }; + D8DD99E890B5B9C7A22168DCDFF7F2F2 /* UIImageView+HighlightedWebCache.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIImageView+HighlightedWebCache.h"; path = "SDWebImage/UIImageView+HighlightedWebCache.h"; sourceTree = ""; }; + DAC9FC1E0850F561164206772C295DD9 /* AFURLRequestSerialization.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFURLRequestSerialization.m; path = AFNetworking/AFURLRequestSerialization.m; sourceTree = ""; }; + DC72BDD242479F67C1FF9A5BC4BDCFE7 /* AFURLResponseSerialization.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFURLResponseSerialization.m; path = AFNetworking/AFURLResponseSerialization.m; sourceTree = ""; }; + E17F556653796C99AAABDA059E433442 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/SystemConfiguration.framework; sourceTree = DEVELOPER_DIR; }; + E1EFD1D330A4BC70F1C4C2ED395E2258 /* UIImageView+WebCache.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIImageView+WebCache.m"; path = "SDWebImage/UIImageView+WebCache.m"; sourceTree = ""; }; + E7423FBF8F886A99671A0EB4AEB60C0D /* AFURLSessionManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFURLSessionManager.m; path = AFNetworking/AFURLSessionManager.m; sourceTree = ""; }; + E7B5566E66AC64253CA228C460AE2931 /* UIImageView+HighlightedWebCache.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIImageView+HighlightedWebCache.m"; path = "SDWebImage/UIImageView+HighlightedWebCache.m"; sourceTree = ""; }; + EC8116CB10ADAFA3521C2CB231FBF637 /* AFHTTPRequestOperationManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFHTTPRequestOperationManager.m; path = AFNetworking/AFHTTPRequestOperationManager.m; sourceTree = ""; }; + F6810D818545BACFD21ACAB72D23DC72 /* SDWebImageDecoder.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = SDWebImageDecoder.m; path = SDWebImage/SDWebImageDecoder.m; sourceTree = ""; }; + FE98519651ECB3ECA5C602AD82864FE1 /* SDWebImageCompat.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = SDWebImageCompat.m; path = SDWebImage/SDWebImageCompat.m; sourceTree = ""; }; + FF3208FF08E5445EB9E5049F4C5D94F3 /* SDWebImageDecoder.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SDWebImageDecoder.h; path = SDWebImage/SDWebImageDecoder.h; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 6483CA59DE76B7505AC83F07E09B7794 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + B108EF8640D45C3EC1F32CD7AC6DE75E /* Foundation.framework in Frameworks */, + 683D4409569BB94EA3E3CA4B20630763 /* ImageIO.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 98E820BFC0B25B3E2406144A078B3BE7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 96D21B51E3BCC3FC48C060B0CCEF597A /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 9931A28C776A9D7BEB2E712D7404270A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 929F837297CF86B8373DB1E4553E2228 /* CoreGraphics.framework in Frameworks */, + B051E3F22E4BA58D5B93BAD8D72BEAF4 /* Foundation.framework in Frameworks */, + 2AA00DD78A8A77BF307C09C7CE2B8D98 /* MobileCoreServices.framework in Frameworks */, + 236F1ECD2D905D2BDF201EBA9EAD2E7B /* Security.framework in Frameworks */, + 6DBBC964FE31C2FCB6D6656B10745778 /* SystemConfiguration.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 03C74D54C37B7E4B1218CF04A115985F /* Security */ = { + isa = PBXGroup; + children = ( + 7B148A4F33C247FD9C75C9B1D85D58A9 /* AFSecurityPolicy.h */, + 7E75E489EEE7C398011E44C11D585E51 /* AFSecurityPolicy.m */, + ); + name = Security; + sourceTree = ""; + }; + 0F75DF6C7C5F002280EC53F48E80B587 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 999792CF8282488E81EFA3F843572F37 /* iOS */, + ); + name = Frameworks; + sourceTree = ""; + }; + 269CC189C10A5A1D991980C237001667 /* UIKit */ = { + isa = PBXGroup; + children = ( + AF0E2F2ABC803AADC0AB6840CD7C3448 /* AFNetworkActivityIndicatorManager.h */, + 72346E2FC87492766AA08C01B5524E81 /* AFNetworkActivityIndicatorManager.m */, + D12D335F1DE4485B5720442B7745ED4F /* UIActivityIndicatorView+AFNetworking.h */, + 15414520995CA53264C196BDDA771DF1 /* UIActivityIndicatorView+AFNetworking.m */, + 508770E612E923B4E8059F259957EDF9 /* UIAlertView+AFNetworking.h */, + 866545F66AD75ECD5B33484FAA68FBCD /* UIAlertView+AFNetworking.m */, + 1EEE208EB88B586B744351EC0EBF0574 /* UIButton+AFNetworking.h */, + 4E28D0C2783C92D0818215372C2B9293 /* UIButton+AFNetworking.m */, + 071876CB199B174691465D1BAC226A4B /* UIImage+AFNetworking.h */, + 99E4D34997E312103737225BD94525B4 /* UIImageView+AFNetworking.h */, + 42C9C18D8BF3872DDF8C96BB229C868B /* UIImageView+AFNetworking.m */, + 142E983BF5932C78158A2647F698AB42 /* UIKit+AFNetworking.h */, + 910CFAB2C8FF81946A103E266A398B47 /* UIProgressView+AFNetworking.h */, + C2CA9694DED15175D5FB5B31CFC45D0B /* UIProgressView+AFNetworking.m */, + 89EDADE2E651587ECF0CE3AA490D6FCA /* UIRefreshControl+AFNetworking.h */, + 93AFACF4D0AC5434E4AFB2E78BEFB4B9 /* UIRefreshControl+AFNetworking.m */, + 8BFB19D6A82017A6D630E245F177020E /* UIWebView+AFNetworking.h */, + 762A1619491C5709EC5ABE6A69D10474 /* UIWebView+AFNetworking.m */, + ); + name = UIKit; + sourceTree = ""; + }; + 32AC7E8C28E64275557540C8F679EF37 /* Resources */ = { + isa = PBXGroup; + children = ( + AF97DC88C6D10A15B1A289D4E06FBF0C /* GoogleMaps.bundle */, + ); + name = Resources; + sourceTree = ""; + }; + 48BA112F19A26208EE29B8642AD177E9 /* NSURLConnection */ = { + isa = PBXGroup; + children = ( + C7944E4C11170A20D585134932487A39 /* AFHTTPRequestOperation.h */, + 3FE0AECE52C8DEC4658633BFA14A7A08 /* AFHTTPRequestOperation.m */, + 6C0C60BB25B504D96BCCFC19F269DDC1 /* AFHTTPRequestOperationManager.h */, + EC8116CB10ADAFA3521C2CB231FBF637 /* AFHTTPRequestOperationManager.m */, + 4921F1017DD61AB469812B742D1B682C /* AFURLConnectionOperation.h */, + A4EB8FF669E6B7E2D369CF6E0BA4B65E /* AFURLConnectionOperation.m */, + ); + name = NSURLConnection; + sourceTree = ""; + }; + 523A190DC0FEC65A2959D96B49AC4DD2 /* Support Files */ = { + isa = PBXGroup; + children = ( + 2737F621C08298A484283DDA5649391A /* AFNetworking.xcconfig */, + 6E0C841EEF75B7179B79DF75A0FE6D3C /* AFNetworking-Private.xcconfig */, + 386D22908B1A6C2FB5AC66C5B66BCD61 /* AFNetworking-dummy.m */, + 22903FC7206E395C55F615E8FA978163 /* AFNetworking-prefix.pch */, + ); + name = "Support Files"; + path = "../Target Support Files/AFNetworking"; + sourceTree = ""; + }; + 7DB346D0F39D3F0E887471402A8071AB = { + isa = PBXGroup; + children = ( + BA6428E9F66FD5A23C0A2E06ED26CD2F /* Podfile */, + 0F75DF6C7C5F002280EC53F48E80B587 /* Frameworks */, + 98AC6DC81476D67D71ABE90BF2E934B5 /* Pods */, + CCA510CFBEA2D207524CDA0D73C3B561 /* Products */, + D2411A5FE7F7A004607BED49990C37F4 /* Targets Support Files */, + ); + sourceTree = ""; + }; + 87DCD5EBE05FD0CBCFD82D04C4E4343B /* NSURLSession */ = { + isa = PBXGroup; + children = ( + 0D85C288383760F038CE77183742CCD5 /* AFHTTPSessionManager.h */, + 508AD14ED96FAE92EEFA77806C1441DB /* AFHTTPSessionManager.m */, + C1815E959643B3C1316D163670C4851F /* AFURLSessionManager.h */, + E7423FBF8F886A99671A0EB4AEB60C0D /* AFURLSessionManager.m */, + ); + name = NSURLSession; + sourceTree = ""; + }; + 8B93A8C9F794701E5821675D7EE12BD1 /* GoogleMaps */ = { + isa = PBXGroup; + children = ( + E37DF33E8912DCDD4511E95F08A7C862 /* Frameworks */, + 32AC7E8C28E64275557540C8F679EF37 /* Resources */, + ); + path = GoogleMaps; + sourceTree = ""; + }; + 952EEBFAF8F7E620423C9F156F25A506 /* Pods */ = { + isa = PBXGroup; + children = ( + 15A529C27057E4A57D259CBC6E6CE49C /* Pods-acknowledgements.markdown */, + BF59BC15D23E1E1912C8F334E7236813 /* Pods-acknowledgements.plist */, + 073A391F3F374486E769F43AAEE8A185 /* Pods-dummy.m */, + 641AE05DD55E5E6AC1590CD7B4A18F97 /* Pods-resources.sh */, + 0D59D872E2F296E4F6FF55C14C8295B4 /* Pods.debug.xcconfig */, + 9A012CE89EC94ED08352F51130C1C9CE /* Pods.release.xcconfig */, + ); + name = Pods; + path = "Target Support Files/Pods"; + sourceTree = ""; + }; + 98AC6DC81476D67D71ABE90BF2E934B5 /* Pods */ = { + isa = PBXGroup; + children = ( + A3F0BAA0B549B8C9912859318F0EA0FC /* AFNetworking */, + 8B93A8C9F794701E5821675D7EE12BD1 /* GoogleMaps */, + F34B9DE3524FA2E78707101DA220A0AF /* SDWebImage */, + ); + name = Pods; + sourceTree = ""; + }; + 999792CF8282488E81EFA3F843572F37 /* iOS */ = { + isa = PBXGroup; + children = ( + 39BB348067387DCC8463FF5B80C9AE92 /* CoreGraphics.framework */, + 1F8E9476ED04F42C4A300AC441C4BA61 /* Foundation.framework */, + 6DD298F4EF2F68C4B172982286D20D49 /* ImageIO.framework */, + 07D637F0B8EDC53BAFDB63B46EB51E44 /* MobileCoreServices.framework */, + 67CBBA4B0D83C958E2F9C44AC5C34D94 /* Security.framework */, + E17F556653796C99AAABDA059E433442 /* SystemConfiguration.framework */, + ); + name = iOS; + sourceTree = ""; + }; + 9CD1D7C8165B6B82B36B8F3A2C24BADC /* Reachability */ = { + isa = PBXGroup; + children = ( + C68F29B5D253C92FEC793FE8A0A6C1E2 /* AFNetworkReachabilityManager.h */, + C6F9D292ECB0B86D3E2EC4255A6418C4 /* AFNetworkReachabilityManager.m */, + ); + name = Reachability; + sourceTree = ""; + }; + A3F0BAA0B549B8C9912859318F0EA0FC /* AFNetworking */ = { + isa = PBXGroup; + children = ( + 1B71E35ACC8E31F7DCDB75E8E07DE146 /* AFNetworking.h */, + 48BA112F19A26208EE29B8642AD177E9 /* NSURLConnection */, + 87DCD5EBE05FD0CBCFD82D04C4E4343B /* NSURLSession */, + 9CD1D7C8165B6B82B36B8F3A2C24BADC /* Reachability */, + 03C74D54C37B7E4B1218CF04A115985F /* Security */, + B4A6F8E7C1BEBF39F31395E337CC6AE6 /* Serialization */, + 523A190DC0FEC65A2959D96B49AC4DD2 /* Support Files */, + 269CC189C10A5A1D991980C237001667 /* UIKit */, + ); + path = AFNetworking; + sourceTree = ""; + }; + B4A6F8E7C1BEBF39F31395E337CC6AE6 /* Serialization */ = { + isa = PBXGroup; + children = ( + ACA1473CC21B04E7E705F3CAA2A5014A /* AFURLRequestSerialization.h */, + DAC9FC1E0850F561164206772C295DD9 /* AFURLRequestSerialization.m */, + 1C0BDEC1E1A1C18B7A4BFAA45D05770F /* AFURLResponseSerialization.h */, + DC72BDD242479F67C1FF9A5BC4BDCFE7 /* AFURLResponseSerialization.m */, + ); + name = Serialization; + sourceTree = ""; + }; + C1FE6B869C60AC39A65A98D783641C61 /* Core */ = { + isa = PBXGroup; + children = ( + 76C518201A486FCF7036C9F9DDBD593D /* NSData+ImageContentType.h */, + 085ECBDDE362422A1BFD1DBE30FDB4F4 /* NSData+ImageContentType.m */, + 20C7708C9D92468D5D2DD3A56794B5F4 /* SDImageCache.h */, + 663FC8B8350D10A667A2FAF5EF29708C /* SDImageCache.m */, + 3CC3A4489FFEE078645C51D22848F697 /* SDWebImageCompat.h */, + FE98519651ECB3ECA5C602AD82864FE1 /* SDWebImageCompat.m */, + FF3208FF08E5445EB9E5049F4C5D94F3 /* SDWebImageDecoder.h */, + F6810D818545BACFD21ACAB72D23DC72 /* SDWebImageDecoder.m */, + 565D0DE3F083F3D803EE8CA97CDAECC5 /* SDWebImageDownloader.h */, + 83F8CEA8D6C3D34590016ED7FF78B90C /* SDWebImageDownloader.m */, + 15D66C1B89B8779333C904B6E1F0FE50 /* SDWebImageDownloaderOperation.h */, + B3D5ADC47369DCB41D20305EB6B00EFA /* SDWebImageDownloaderOperation.m */, + 5ECFB2161C220584CD4F649E8EAE3896 /* SDWebImageManager.h */, + 4C4C8A6792D4A925F9D3ABA38CB9537E /* SDWebImageManager.m */, + 1693790C9228360FA63950C2D796CFA5 /* SDWebImageOperation.h */, + 2D283561CA0E408531C1CA0651571381 /* SDWebImagePrefetcher.h */, + 21426DB0E26F4458B2B8E531ED929344 /* SDWebImagePrefetcher.m */, + 442BD5A86D7383D426EA6C87AB86FA93 /* UIButton+WebCache.h */, + 5099BC8D81DEDA973F9FF97BE55354BB /* UIButton+WebCache.m */, + 7E1763D689FFF87A52680D3FDBBCCA2F /* UIImage+GIF.h */, + 0C8BE0864137B3554F8C368D6F6EA646 /* UIImage+GIF.m */, + 6437C050025F1A8C69647B6744A18170 /* UIImage+MultiFormat.h */, + 7BFEE3E0C36A901C0D63CDBB8F8D490A /* UIImage+MultiFormat.m */, + D8DD99E890B5B9C7A22168DCDFF7F2F2 /* UIImageView+HighlightedWebCache.h */, + E7B5566E66AC64253CA228C460AE2931 /* UIImageView+HighlightedWebCache.m */, + 572E9757319756864DBF2880DCA92575 /* UIImageView+WebCache.h */, + E1EFD1D330A4BC70F1C4C2ED395E2258 /* UIImageView+WebCache.m */, + 605FCA5E9AB5C444FED020AAB684D140 /* UIView+WebCacheOperation.h */, + 44E19C4AEA9338236A9FD2DDA753E214 /* UIView+WebCacheOperation.m */, + ); + name = Core; + sourceTree = ""; + }; + CCA510CFBEA2D207524CDA0D73C3B561 /* Products */ = { + isa = PBXGroup; + children = ( + 2676F4D68D7502376A5B7B4F246610E2 /* libAFNetworking.a */, + C97344B7E8579E87FA86A52D47069F61 /* libPods.a */, + A4E3C75131DB73B535BA7338F6201845 /* libSDWebImage.a */, + ); + name = Products; + sourceTree = ""; + }; + D2411A5FE7F7A004607BED49990C37F4 /* Targets Support Files */ = { + isa = PBXGroup; + children = ( + 952EEBFAF8F7E620423C9F156F25A506 /* Pods */, + ); + name = "Targets Support Files"; + sourceTree = ""; + }; + E37DF33E8912DCDD4511E95F08A7C862 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 739C151460388F78B0CA7B4B02D2F203 /* GoogleMaps.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + E78B1154AD77721C1264E84CA74DE7B5 /* Support Files */ = { + isa = PBXGroup; + children = ( + 8143223B5CD9869F48A07B4A50272DC8 /* SDWebImage.xcconfig */, + 89AAE1F01DB890D4C00BF6A162C79C8A /* SDWebImage-Private.xcconfig */, + 36868875BC2FD7CD9ACA53E772A68147 /* SDWebImage-dummy.m */, + 22F721F92E9AE8C014DB4DCF3CCEF31D /* SDWebImage-prefix.pch */, + ); + name = "Support Files"; + path = "../Target Support Files/SDWebImage"; + sourceTree = ""; + }; + F34B9DE3524FA2E78707101DA220A0AF /* SDWebImage */ = { + isa = PBXGroup; + children = ( + C1FE6B869C60AC39A65A98D783641C61 /* Core */, + E78B1154AD77721C1264E84CA74DE7B5 /* Support Files */, + ); + path = SDWebImage; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 70E692A35509AA009F46AAA3DCB430E9 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 46C6D0143AB94CDD866FB320B9DB3C14 /* NSData+ImageContentType.h in Headers */, + AD22FBED3B2F3B5E300F4631FF325B0D /* SDImageCache.h in Headers */, + A6EC3E1CCB6DC24720F3D5902677421E /* SDWebImageCompat.h in Headers */, + CF8333B5FEC0C76FD7155FE88D951248 /* SDWebImageDecoder.h in Headers */, + 37A315C532DA1A156F9676951702EFB9 /* SDWebImageDownloader.h in Headers */, + 90144EA34E633F7A8746D9C8BF0FF942 /* SDWebImageDownloaderOperation.h in Headers */, + 2C6AEC70A3E09CC7BD16C30B5B941981 /* SDWebImageManager.h in Headers */, + E042F3EE15E5D06B958372257805F086 /* SDWebImageOperation.h in Headers */, + 7F47EBDA28826BDBD28A502091E9D9FD /* SDWebImagePrefetcher.h in Headers */, + 751C7CA61D9FD97DF80431FC9050736F /* UIButton+WebCache.h in Headers */, + C32516863188EAD0CB8D27A796372599 /* UIImage+GIF.h in Headers */, + 57FDB0D84B88BA790448FB0099B256FB /* UIImage+MultiFormat.h in Headers */, + 505651BE6DF50CBA5C6BE87452D20BCF /* UIImageView+HighlightedWebCache.h in Headers */, + EF2E5E9490743E84AEAD0DDCD300CF54 /* UIImageView+WebCache.h in Headers */, + B9B24F1882156B9384823BC873391481 /* UIView+WebCacheOperation.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B04F70BE2EE6E3B50D7A86B71F63F536 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + A50D6CD5C1355A6B20B38C5392A36CEE /* AFHTTPRequestOperation.h in Headers */, + CD26D855EDF31FAC7773A4BFB544D7DE /* AFHTTPRequestOperationManager.h in Headers */, + 4861889C3E7AE62D9C31E3AC902783D4 /* AFHTTPSessionManager.h in Headers */, + 791A08AF9727A4E59CDDD53B49366865 /* AFNetworkActivityIndicatorManager.h in Headers */, + 2923B0513DCC626235055CB509DC6AD9 /* AFNetworkReachabilityManager.h in Headers */, + 8CF57ED1AA43E413DEEE3A8331BCDBEF /* AFNetworking.h in Headers */, + E35C0F9E9037F5CF0412DFFBC91EDD18 /* AFSecurityPolicy.h in Headers */, + A02A56F753A8F762799F97E7B2540D68 /* AFURLConnectionOperation.h in Headers */, + DA67351F3C88B2C44A7F352B86E9745D /* AFURLRequestSerialization.h in Headers */, + 6C55AA5E00960B83FD04C71D896D2626 /* AFURLResponseSerialization.h in Headers */, + 9C42B67B0898307659F1329CB052D049 /* AFURLSessionManager.h in Headers */, + EAAAE461B47CBA3CA69518D554A6717D /* UIActivityIndicatorView+AFNetworking.h in Headers */, + FB8273F408F90DA94D95314C24648042 /* UIAlertView+AFNetworking.h in Headers */, + 7E133A9836285A496F882CA0135D166D /* UIButton+AFNetworking.h in Headers */, + 07E0DE6187B3EBD0870ECABCCEC9FA65 /* UIImage+AFNetworking.h in Headers */, + 815B547074BED8A31FA5E9AE11E9A3D4 /* UIImageView+AFNetworking.h in Headers */, + E425B5BDA7311943CCEA473B9921A915 /* UIKit+AFNetworking.h in Headers */, + 0684B0B1245A05BB7FEA8F746E298768 /* UIProgressView+AFNetworking.h in Headers */, + 77A6AD0AA31E240EEBC43D80A0AEF8FE /* UIRefreshControl+AFNetworking.h in Headers */, + DB306D14383CA3D4C84A992D049AFC43 /* UIWebView+AFNetworking.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 18EC14534F11FFCA91D0E5DDDB7B9729 /* AFNetworking */ = { + isa = PBXNativeTarget; + buildConfigurationList = A8EE5F156001628F5C24389CEFCCF4BB /* Build configuration list for PBXNativeTarget "AFNetworking" */; + buildPhases = ( + 78DDA19DAD8B20849391682782603505 /* Sources */, + 9931A28C776A9D7BEB2E712D7404270A /* Frameworks */, + B04F70BE2EE6E3B50D7A86B71F63F536 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = AFNetworking; + productName = AFNetworking; + productReference = 2676F4D68D7502376A5B7B4F246610E2 /* libAFNetworking.a */; + productType = "com.apple.product-type.library.static"; + }; + 3013081EDFD3D437D305B9125F04822D /* Pods */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7443550283E7BEE5EDC495C3EC979172 /* Build configuration list for PBXNativeTarget "Pods" */; + buildPhases = ( + 97CAF3B45DB9A7E506DCCBBE435AEBAD /* Sources */, + 98E820BFC0B25B3E2406144A078B3BE7 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 3C928F082599405A6AE27BF5B2E8AA51 /* PBXTargetDependency */, + A1A9D2E7D0D16DC3505BD2FD1A80E0B6 /* PBXTargetDependency */, + ); + name = Pods; + productName = Pods; + productReference = C97344B7E8579E87FA86A52D47069F61 /* libPods.a */; + productType = "com.apple.product-type.library.static"; + }; + 5352D432641F0656C90741034E32F31E /* SDWebImage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1C450805480F718FD16967298BD9381E /* Build configuration list for PBXNativeTarget "SDWebImage" */; + buildPhases = ( + ED4867DE87E22E526FE5CFF638C86F4D /* Sources */, + 6483CA59DE76B7505AC83F07E09B7794 /* Frameworks */, + 70E692A35509AA009F46AAA3DCB430E9 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SDWebImage; + productName = SDWebImage; + productReference = A4E3C75131DB73B535BA7338F6201845 /* libSDWebImage.a */; + productType = "com.apple.product-type.library.static"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0700; + LastUpgradeCheck = 0700; + }; + buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 7DB346D0F39D3F0E887471402A8071AB; + productRefGroup = CCA510CFBEA2D207524CDA0D73C3B561 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 18EC14534F11FFCA91D0E5DDDB7B9729 /* AFNetworking */, + 3013081EDFD3D437D305B9125F04822D /* Pods */, + 5352D432641F0656C90741034E32F31E /* SDWebImage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 78DDA19DAD8B20849391682782603505 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A652310EBFED5BF5E0626FD6BA4B84A1 /* AFHTTPRequestOperation.m in Sources */, + 5B47AD7261F09529FBDF576FBF834238 /* AFHTTPRequestOperationManager.m in Sources */, + AD87CA38523C7181D830CAF567473D7C /* AFHTTPSessionManager.m in Sources */, + FC6F9E6CD492D0E6599D4E3E112F26EF /* AFNetworkActivityIndicatorManager.m in Sources */, + D9ED52E7516DCFF5146355D1D8C435D4 /* AFNetworkReachabilityManager.m in Sources */, + 3E0A22C958FB84EFF9C4E91ED7B480FE /* AFNetworking-dummy.m in Sources */, + 19191A4BD8323354D6567B93B9D1CB1E /* AFSecurityPolicy.m in Sources */, + 7E6254056AA895B8C0C51FFBFDFA78E6 /* AFURLConnectionOperation.m in Sources */, + C477F72798C6C0D45615B277C23A8719 /* AFURLRequestSerialization.m in Sources */, + AF2E715BD7601DD0BFD107ED7D0C362B /* AFURLResponseSerialization.m in Sources */, + 2E94B79F849D7C3201152FC4F8048069 /* AFURLSessionManager.m in Sources */, + 1EE1F95324A1022B81EAA83FDD1A0C46 /* UIActivityIndicatorView+AFNetworking.m in Sources */, + E1F84D703837B66E3C51919D173EEF0C /* UIAlertView+AFNetworking.m in Sources */, + 0B7EAEC9FE6FB5A4943BF5E60DE61628 /* UIButton+AFNetworking.m in Sources */, + F105763DA404C894339A617B11B546F4 /* UIImageView+AFNetworking.m in Sources */, + BB2493C2C754CDBB528088EACCBD3CA4 /* UIProgressView+AFNetworking.m in Sources */, + E546C629532E48CEAD8FE64899B76AB9 /* UIRefreshControl+AFNetworking.m in Sources */, + D24577F5F307EAC9CA4FCDB0329AE721 /* UIWebView+AFNetworking.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97CAF3B45DB9A7E506DCCBBE435AEBAD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1CCA328442D8AAE7B592A182C758F00B /* Pods-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + ED4867DE87E22E526FE5CFF638C86F4D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 88E73B996D8355E9622B66AD1BCCB168 /* NSData+ImageContentType.m in Sources */, + 898D8603930620AE3DE89A892967A505 /* SDImageCache.m in Sources */, + 75D7CEA58A5F72C5F13499A11A573EEA /* SDWebImage-dummy.m in Sources */, + F4FDFA5A83BE4F0B473F228F6AC2C726 /* SDWebImageCompat.m in Sources */, + 0943A4196177D34CF59C88E4AA77B576 /* SDWebImageDecoder.m in Sources */, + 18894FC9A166263E6CB1FC6EE6AD8EFF /* SDWebImageDownloader.m in Sources */, + C1185E296305793C5FC452BA59752A99 /* SDWebImageDownloaderOperation.m in Sources */, + 2358EE556EF067512DADC50B59A15D25 /* SDWebImageManager.m in Sources */, + A773D58B6468B559F2DAB70F8C57F985 /* SDWebImagePrefetcher.m in Sources */, + 26B21B244340BA5A2F45F3B43F1D4926 /* UIButton+WebCache.m in Sources */, + A2222CEDD905A2D387F4A9C3895A093B /* UIImage+GIF.m in Sources */, + EEC70F07E66D6E0AB32E3E8337165EFD /* UIImage+MultiFormat.m in Sources */, + 50151E9ABC4AC6EFCD9764698E392A3D /* UIImageView+HighlightedWebCache.m in Sources */, + 0CBFA0FDE2C98DEB97B2B0DC291F6F3F /* UIImageView+WebCache.m in Sources */, + 646A6FC808A0B280B80AD4949D8357F8 /* UIView+WebCacheOperation.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 3C928F082599405A6AE27BF5B2E8AA51 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = AFNetworking; + target = 18EC14534F11FFCA91D0E5DDDB7B9729 /* AFNetworking */; + targetProxy = 6387228E01D24ED7BF054F95B4FE4022 /* PBXContainerItemProxy */; + }; + A1A9D2E7D0D16DC3505BD2FD1A80E0B6 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = SDWebImage; + target = 5352D432641F0656C90741034E32F31E /* SDWebImage */; + targetProxy = D8175A057F3398E11111C615845072C0 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 31CAE307C041884BE71601DF145A26AF /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 0D59D872E2F296E4F6FF55C14C8295B4 /* Pods.debug.xcconfig */; + buildSettings = { + ENABLE_STRICT_OBJC_MSGSEND = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.1; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + 89F233CAB5266B9AC11250318F995E2B /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6E0C841EEF75B7179B79DF75A0FE6D3C /* AFNetworking-Private.xcconfig */; + buildSettings = { + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/AFNetworking/AFNetworking-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 8.1; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + 98FBA20562ECDA3E51D8416E941AE70A /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9A012CE89EC94ED08352F51130C1C9CE /* Pods.release.xcconfig */; + buildSettings = { + ENABLE_STRICT_OBJC_MSGSEND = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.1; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + }; + name = Release; + }; + 9E60D23B60A83DEC80951A1FA77E1235 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 89AAE1F01DB890D4C00BF6A162C79C8A /* SDWebImage-Private.xcconfig */; + buildSettings = { + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/SDWebImage/SDWebImage-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 8.1; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + 9EB645C612834738B99727720210C23E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.1; + ONLY_ACTIVE_ARCH = YES; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Debug; + }; + CE8DB10998C2AAC7A4FF7FAA19465437 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6E0C841EEF75B7179B79DF75A0FE6D3C /* AFNetworking-Private.xcconfig */; + buildSettings = { + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/AFNetworking/AFNetworking-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 8.1; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + }; + name = Release; + }; + DB598A1D16D47EF1400D494ACD6575C7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 89AAE1F01DB890D4C00BF6A162C79C8A /* SDWebImage-Private.xcconfig */; + buildSettings = { + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/SDWebImage/SDWebImage-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 8.1; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + }; + name = Release; + }; + E39CD1E764776175CB82EEC82A6C9948 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_PREPROCESSOR_DEFINITIONS = "RELEASE=1"; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.1; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1C450805480F718FD16967298BD9381E /* Build configuration list for PBXNativeTarget "SDWebImage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 9E60D23B60A83DEC80951A1FA77E1235 /* Debug */, + DB598A1D16D47EF1400D494ACD6575C7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 9EB645C612834738B99727720210C23E /* Debug */, + E39CD1E764776175CB82EEC82A6C9948 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7443550283E7BEE5EDC495C3EC979172 /* Build configuration list for PBXNativeTarget "Pods" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 31CAE307C041884BE71601DF145A26AF /* Debug */, + 98FBA20562ECDA3E51D8416E941AE70A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A8EE5F156001628F5C24389CEFCCF4BB /* Build configuration list for PBXNativeTarget "AFNetworking" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 89F233CAB5266B9AC11250318F995E2B /* Debug */, + CE8DB10998C2AAC7A4FF7FAA19465437 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; +} diff --git a/Pods/SDWebImage/LICENSE b/Pods/SDWebImage/LICENSE new file mode 100644 index 0000000..ae783e1 --- /dev/null +++ b/Pods/SDWebImage/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2009 Olivier Poitrey + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/Pods/SDWebImage/README.md b/Pods/SDWebImage/README.md new file mode 100644 index 0000000..bc47123 --- /dev/null +++ b/Pods/SDWebImage/README.md @@ -0,0 +1,315 @@ +Web Image +========= +[![Build Status](http://img.shields.io/travis/rs/SDWebImage/master.svg?style=flat)](https://travis-ci.org/rs/SDWebImage) +[![Pod Version](http://img.shields.io/cocoapods/v/SDWebImage.svg?style=flat)](http://cocoadocs.org/docsets/SDWebImage/) +[![Pod Platform](http://img.shields.io/cocoapods/p/SDWebImage.svg?style=flat)](http://cocoadocs.org/docsets/SDWebImage/) +[![Pod License](http://img.shields.io/cocoapods/l/SDWebImage.svg?style=flat)](https://www.apache.org/licenses/LICENSE-2.0.html) +[![Dependency Status](https://www.versioneye.com/objective-c/sdwebimage/3.3/badge.svg?style=flat)](https://www.versioneye.com/objective-c/sdwebimage/3.3) +[![Reference Status](https://www.versioneye.com/objective-c/sdwebimage/reference_badge.svg?style=flat)](https://www.versioneye.com/objective-c/sdwebimage/references) +[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/rs/SDWebImage) + +This library provides a category for UIImageView with support for remote images coming from the web. + +It provides: + +- An UIImageView category adding web image and cache management to the Cocoa Touch framework +- An asynchronous image downloader +- An asynchronous memory + disk image caching with automatic cache expiration handling +- Animated GIF support +- WebP format support +- A background image decompression +- A guarantee that the same URL won't be downloaded several times +- A guarantee that bogus URLs won't be retried again and again +- A guarantee that main thread will never be blocked +- Performances! +- Use GCD and ARC +- Arm64 support + +NOTE: The version 3.0 of SDWebImage isn't fully backward compatible with 2.0 and requires iOS 5.1.1 +minimum deployement version. If you need iOS < 5.0 support, please use the last [2.0 version](https://github.com/rs/SDWebImage/tree/2.0-compat). + +[How is SDWebImage better than X?](https://github.com/rs/SDWebImage/wiki/How-is-SDWebImage-better-than-X%3F) + +Who Use It +---------- + +Find out [who uses SDWebImage](https://github.com/rs/SDWebImage/wiki/Who-Uses-SDWebImage) and add your app to the list. + +How To Use +---------- + +API documentation is available at [CocoaDocs - SDWebImage](http://cocoadocs.org/docsets/SDWebImage/) + +### Using UIImageView+WebCache category with UITableView + +Just #import the UIImageView+WebCache.h header, and call the sd_setImageWithURL:placeholderImage: +method from the tableView:cellForRowAtIndexPath: UITableViewDataSource method. Everything will be +handled for you, from async downloads to caching management. + +```objective-c +#import + +... + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + static NSString *MyIdentifier = @"MyIdentifier"; + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier]; + + if (cell == nil) + { + cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault + reuseIdentifier:MyIdentifier] autorelease]; + } + + // Here we use the new provided sd_setImageWithURL: method to load the web image + [cell.imageView sd_setImageWithURL:[NSURL URLWithString:@"http://www.domain.com/path/to/image.jpg"] + placeholderImage:[UIImage imageNamed:@"placeholder.png"]]; + + cell.textLabel.text = @"My Text"; + return cell; +} +``` + +### Using blocks + +With blocks, you can be notified about the image download progress and whenever the image retrival +has completed with success or not: + +```objective-c +// Here we use the new provided sd_setImageWithURL: method to load the web image +[cell.imageView sd_setImageWithURL:[NSURL URLWithString:@"http://www.domain.com/path/to/image.jpg"] + placeholderImage:[UIImage imageNamed:@"placeholder.png"] + completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {... completion code here ...}]; +``` + +Note: neither your success nor failure block will be call if your image request is canceled before completion. + +### Using SDWebImageManager + +The SDWebImageManager is the class behind the UIImageView+WebCache category. It ties the +asynchronous downloader with the image cache store. You can use this class directly to benefit +from web image downloading with caching in another context than a UIView (ie: with Cocoa). + +Here is a simple example of how to use SDWebImageManager: + +```objective-c +SDWebImageManager *manager = [SDWebImageManager sharedManager]; +[manager downloadImageWithURL:imageURL + options:0 + progress:^(NSInteger receivedSize, NSInteger expectedSize) { + // progression tracking code + } + completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) { + if (image) { + // do something with image + } + }]; +``` + +### Using Asynchronous Image Downloader Independently + +It's also possible to use the async image downloader independently: + +```objective-c +[SDWebImageDownloader.sharedDownloader downloadImageWithURL:imageURL + options:0 + progress:^(NSInteger receivedSize, NSInteger expectedSize) + { + // progression tracking code + } + completed:^(UIImage *image, NSData *data, NSError *error, BOOL finished) + { + if (image && finished) + { + // do something with image + } + }]; +``` + +### Using Asynchronous Image Caching Independently + +It is also possible to use the async based image cache store independently. SDImageCache +maintains a memory cache and an optional disk cache. Disk cache write operations are performed +asynchronous so it doesn't add unnecessary latency to the UI. + +The SDImageCache class provides a singleton instance for convenience but you can create your own +instance if you want to create separated cache namespace. + +To lookup the cache, you use the `queryDiskCacheForKey:done:` method. If the method returns nil, it means the cache +doesn't currently own the image. You are thus responsible for generating and caching it. The cache +key is an application unique identifier for the image to cache. It is generally the absolute URL of +the image. + +```objective-c +SDImageCache *imageCache = [[SDImageCache alloc] initWithNamespace:@"myNamespace"]; +[imageCache queryDiskCacheForKey:myCacheKey done:^(UIImage *image) +{ + // image is not nil if image was found +}]; +``` + +By default SDImageCache will lookup the disk cache if an image can't be found in the memory cache. +You can prevent this from happening by calling the alternative method `imageFromMemoryCacheForKey:`. + +To store an image into the cache, you use the storeImage:forKey: method: + +```objective-c +[[SDImageCache sharedImageCache] storeImage:myImage forKey:myCacheKey]; +``` + +By default, the image will be stored in memory cache as well as on disk cache (asynchronously). If +you want only the memory cache, use the alternative method storeImage:forKey:toDisk: with a negative +third argument. + +### Using cache key filter + +Sometime, you may not want to use the image URL as cache key because part of the URL is dynamic +(i.e.: for access control purpose). SDWebImageManager provides a way to set a cache key filter that +takes the NSURL as input, and output a cache key NSString. + +The following example sets a filter in the application delegate that will remove any query-string from +the URL before to use it as a cache key: + +```objective-c +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + SDWebImageManager.sharedManager.cacheKeyFilter = ^(NSURL *url) { + url = [[NSURL alloc] initWithScheme:url.scheme host:url.host path:url.path]; + return [url absoluteString]; + }; + + // Your app init code... + return YES; +} +``` + + +Common Problems +--------------- + +### Using dynamic image size with UITableViewCell + +UITableView determines the size of the image by the first image set for a cell. If your remote images +don't have the same size as your placeholder image, you may experience strange anamorphic scaling issue. +The following article gives a way to workaround this issue: + +[http://www.wrichards.com/blog/2011/11/sdwebimage-fixed-width-cell-images/](http://www.wrichards.com/blog/2011/11/sdwebimage-fixed-width-cell-images/) + + +### Handle image refresh + +SDWebImage does very aggressive caching by default. It ignores all kind of caching control header returned by the HTTP server and cache the returned images with no time restriction. It implies your images URLs are static URLs pointing to images that never change. If the pointed image happen to change, some parts of the URL should change accordingly. + +If you don't control the image server you're using, you may not be able to change the URL when its content is updated. This is the case for Facebook avatar URLs for instance. In such case, you may use the `SDWebImageRefreshCached` flag. This will slightly degrade the performance but will respect the HTTP caching control headers: + +``` objective-c +[imageView sd_setImageWithURL:[NSURL URLWithString:@"https://graph.facebook.com/olivier.poitrey/picture"] + placeholderImage:[UIImage imageNamed:@"avatar-placeholder.png"] + options:SDWebImageRefreshCached]; +``` + +### Add a progress indicator + +See this category: https://github.com/JJSaccolo/UIActivityIndicator-for-SDWebImage + +Installation +------------ + +There are three ways to use SDWebImage in your project: +- using Cocoapods +- copying all the files into your project +- importing the project as a static library + +### Installation with CocoaPods + +[CocoaPods](http://cocoapods.org/) is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries in your projects. See the [Get Started](http://cocoapods.org/#get_started) section for more details. + +#### Podfile +``` +platform :ios, '6.1' +pod 'SDWebImage', '~>3.7' +``` + +### Installation with Carthage (iOS 8+) + +[Carthage](https://github.com/Carthage/Carthage) is a lightweight dependency manager for Swift and Objective-C. It leverages CocoaTouch modules and ins less invasive than CocoaPods. + +To install with carthage, follow the instruction on [Carthage](https://github.com/Carthage/Carthage) + +#### Cartfile +``` +github "rs/SDWebImage" +``` + +#### Usage +Swift + +``` +import WebImage + +``` + +Objective-C + +``` +@import WebImage; +``` + +### Installation by cloning the repository + +In order to gain access to all the files from the repository, you should clone it. +``` +git clone --recursive https://github.com/rs/SDWebImage.git +``` + +### Add the SDWebImage project to your project + +- Download and unzip the last version of the framework from the [download page](https://github.com/rs/SDWebImage/releases) +- Right-click on the project navigator and select "Add Files to "Your Project": +- In the dialog, select SDWebImage.framework: +- Check the "Copy items into destination group's folder (if needed)" checkbox + +### Add dependencies + +- In you application project app’s target settings, find the "Build Phases" section and open the "Link Binary With Libraries" block: +- Click the "+" button again and select the "ImageIO.framework", this is needed by the progressive download feature: + +### Add Linker Flag + +Open the "Build Settings" tab, in the "Linking" section, locate the "Other Linker Flags" setting and add the "-ObjC" flag: + +![Other Linker Flags](http://dl.dropbox.com/u/123346/SDWebImage/10_other_linker_flags.jpg) + +Alternatively, if this causes compilation problems with frameworks that extend optional libraries, such as Parse, RestKit or opencv2, instead of the -ObjC flag use: +``` +-force_load SDWebImage.framework/Versions/Current/SDWebImage +``` + +If you're using Cocoa Pods and have any frameworks that extend optional libraries, such as Parsen RestKit or opencv2, instead of the -ObjC flag use: +``` +-force_load $(TARGET_BUILD_DIR)/libPods.a +``` + +### Import headers in your source files + +In the source files where you need to use the library, import the header file: + +```objective-c +#import +``` + +### Build Project + +At this point your workspace should build without error. If you are having problem, post to the Issue and the +community can help you solve it. + +Future Enhancements +------------------- + +- LRU memory cache cleanup instead of reset on memory warning + +## Licenses + +All source code is licensed under the [MIT License](https://raw.github.com/rs/SDWebImage/master/LICENSE). diff --git a/Pods/SDWebImage/SDWebImage/NSData+ImageContentType.h b/Pods/SDWebImage/SDWebImage/NSData+ImageContentType.h new file mode 100644 index 0000000..69c76dc --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/NSData+ImageContentType.h @@ -0,0 +1,26 @@ +// +// Created by Fabrice Aneche on 06/01/14. +// Copyright (c) 2014 Dailymotion. All rights reserved. +// + +#import + +@interface NSData (ImageContentType) + +/** + * Compute the content type for an image data + * + * @param data the input data + * + * @return the content type as string (i.e. image/jpeg, image/gif) + */ ++ (NSString *)sd_contentTypeForImageData:(NSData *)data; + +@end + + +@interface NSData (ImageContentTypeDeprecated) + ++ (NSString *)contentTypeForImageData:(NSData *)data __deprecated_msg("Use `sd_contentTypeForImageData:`"); + +@end diff --git a/Pods/SDWebImage/SDWebImage/NSData+ImageContentType.m b/Pods/SDWebImage/SDWebImage/NSData+ImageContentType.m new file mode 100644 index 0000000..0941cfa --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/NSData+ImageContentType.m @@ -0,0 +1,49 @@ +// +// Created by Fabrice Aneche on 06/01/14. +// Copyright (c) 2014 Dailymotion. All rights reserved. +// + +#import "NSData+ImageContentType.h" + + +@implementation NSData (ImageContentType) + ++ (NSString *)sd_contentTypeForImageData:(NSData *)data { + uint8_t c; + [data getBytes:&c length:1]; + switch (c) { + case 0xFF: + return @"image/jpeg"; + case 0x89: + return @"image/png"; + case 0x47: + return @"image/gif"; + case 0x49: + case 0x4D: + return @"image/tiff"; + case 0x52: + // R as RIFF for WEBP + if ([data length] < 12) { + return nil; + } + + NSString *testString = [[NSString alloc] initWithData:[data subdataWithRange:NSMakeRange(0, 12)] encoding:NSASCIIStringEncoding]; + if ([testString hasPrefix:@"RIFF"] && [testString hasSuffix:@"WEBP"]) { + return @"image/webp"; + } + + return nil; + } + return nil; +} + +@end + + +@implementation NSData (ImageContentTypeDeprecated) + ++ (NSString *)contentTypeForImageData:(NSData *)data { + return [self sd_contentTypeForImageData:data]; +} + +@end diff --git a/Pods/SDWebImage/SDWebImage/SDImageCache.h b/Pods/SDWebImage/SDWebImage/SDImageCache.h new file mode 100644 index 0000000..8e08aa1 --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/SDImageCache.h @@ -0,0 +1,262 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import +#import "SDWebImageCompat.h" + +typedef NS_ENUM(NSInteger, SDImageCacheType) { + /** + * The image wasn't available the SDWebImage caches, but was downloaded from the web. + */ + SDImageCacheTypeNone, + /** + * The image was obtained from the disk cache. + */ + SDImageCacheTypeDisk, + /** + * The image was obtained from the memory cache. + */ + SDImageCacheTypeMemory +}; + +typedef void(^SDWebImageQueryCompletedBlock)(UIImage *image, SDImageCacheType cacheType); + +typedef void(^SDWebImageCheckCacheCompletionBlock)(BOOL isInCache); + +typedef void(^SDWebImageCalculateSizeBlock)(NSUInteger fileCount, NSUInteger totalSize); + +/** + * SDImageCache maintains a memory cache and an optional disk cache. Disk cache write operations are performed + * asynchronous so it doesn’t add unnecessary latency to the UI. + */ +@interface SDImageCache : NSObject + +/** + * Decompressing images that are downloaded and cached can improve peformance but can consume lot of memory. + * Defaults to YES. Set this to NO if you are experiencing a crash due to excessive memory consumption. + */ +@property (assign, nonatomic) BOOL shouldDecompressImages; + +/** + * The maximum "total cost" of the in-memory image cache. The cost function is the number of pixels held in memory. + */ +@property (assign, nonatomic) NSUInteger maxMemoryCost; + +/** + * The maximum number of objects the cache should hold. + */ +@property (assign, nonatomic) NSUInteger maxMemoryCountLimit; + +/** + * The maximum length of time to keep an image in the cache, in seconds + */ +@property (assign, nonatomic) NSInteger maxCacheAge; + +/** + * The maximum size of the cache, in bytes. + */ +@property (assign, nonatomic) NSUInteger maxCacheSize; + +/** + * Returns global shared cache instance + * + * @return SDImageCache global instance + */ ++ (SDImageCache *)sharedImageCache; + +/** + * Init a new cache store with a specific namespace + * + * @param ns The namespace to use for this cache store + */ +- (id)initWithNamespace:(NSString *)ns; + +/** + * Init a new cache store with a specific namespace and directory + * + * @param ns The namespace to use for this cache store + * @param directory Directory to cache disk images in + */ +- (id)initWithNamespace:(NSString *)ns diskCacheDirectory:(NSString *)directory; + +-(NSString *)makeDiskCachePath:(NSString*)fullNamespace; + +/** + * Add a read-only cache path to search for images pre-cached by SDImageCache + * Useful if you want to bundle pre-loaded images with your app + * + * @param path The path to use for this read-only cache path + */ +- (void)addReadOnlyCachePath:(NSString *)path; + +/** + * Store an image into memory and disk cache at the given key. + * + * @param image The image to store + * @param key The unique image cache key, usually it's image absolute URL + */ +- (void)storeImage:(UIImage *)image forKey:(NSString *)key; + +/** + * Store an image into memory and optionally disk cache at the given key. + * + * @param image The image to store + * @param key The unique image cache key, usually it's image absolute URL + * @param toDisk Store the image to disk cache if YES + */ +- (void)storeImage:(UIImage *)image forKey:(NSString *)key toDisk:(BOOL)toDisk; + +/** + * Store an image into memory and optionally disk cache at the given key. + * + * @param image The image to store + * @param recalculate BOOL indicates if imageData can be used or a new data should be constructed from the UIImage + * @param imageData The image data as returned by the server, this representation will be used for disk storage + * instead of converting the given image object into a storable/compressed image format in order + * to save quality and CPU + * @param key The unique image cache key, usually it's image absolute URL + * @param toDisk Store the image to disk cache if YES + */ +- (void)storeImage:(UIImage *)image recalculateFromImage:(BOOL)recalculate imageData:(NSData *)imageData forKey:(NSString *)key toDisk:(BOOL)toDisk; + +/** + * Query the disk cache asynchronously. + * + * @param key The unique key used to store the wanted image + */ +- (NSOperation *)queryDiskCacheForKey:(NSString *)key done:(SDWebImageQueryCompletedBlock)doneBlock; + +/** + * Query the memory cache synchronously. + * + * @param key The unique key used to store the wanted image + */ +- (UIImage *)imageFromMemoryCacheForKey:(NSString *)key; + +/** + * Query the disk cache synchronously after checking the memory cache. + * + * @param key The unique key used to store the wanted image + */ +- (UIImage *)imageFromDiskCacheForKey:(NSString *)key; + +/** + * Remove the image from memory and disk cache synchronously + * + * @param key The unique image cache key + */ +- (void)removeImageForKey:(NSString *)key; + + +/** + * Remove the image from memory and disk cache asynchronously + * + * @param key The unique image cache key + * @param completion An block that should be executed after the image has been removed (optional) + */ +- (void)removeImageForKey:(NSString *)key withCompletion:(SDWebImageNoParamsBlock)completion; + +/** + * Remove the image from memory and optionally disk cache asynchronously + * + * @param key The unique image cache key + * @param fromDisk Also remove cache entry from disk if YES + */ +- (void)removeImageForKey:(NSString *)key fromDisk:(BOOL)fromDisk; + +/** + * Remove the image from memory and optionally disk cache asynchronously + * + * @param key The unique image cache key + * @param fromDisk Also remove cache entry from disk if YES + * @param completion An block that should be executed after the image has been removed (optional) + */ +- (void)removeImageForKey:(NSString *)key fromDisk:(BOOL)fromDisk withCompletion:(SDWebImageNoParamsBlock)completion; + +/** + * Clear all memory cached images + */ +- (void)clearMemory; + +/** + * Clear all disk cached images. Non-blocking method - returns immediately. + * @param completion An block that should be executed after cache expiration completes (optional) + */ +- (void)clearDiskOnCompletion:(SDWebImageNoParamsBlock)completion; + +/** + * Clear all disk cached images + * @see clearDiskOnCompletion: + */ +- (void)clearDisk; + +/** + * Remove all expired cached image from disk. Non-blocking method - returns immediately. + * @param completionBlock An block that should be executed after cache expiration completes (optional) + */ +- (void)cleanDiskWithCompletionBlock:(SDWebImageNoParamsBlock)completionBlock; + +/** + * Remove all expired cached image from disk + * @see cleanDiskWithCompletionBlock: + */ +- (void)cleanDisk; + +/** + * Get the size used by the disk cache + */ +- (NSUInteger)getSize; + +/** + * Get the number of images in the disk cache + */ +- (NSUInteger)getDiskCount; + +/** + * Asynchronously calculate the disk cache's size. + */ +- (void)calculateSizeWithCompletionBlock:(SDWebImageCalculateSizeBlock)completionBlock; + +/** + * Async check if image exists in disk cache already (does not load the image) + * + * @param key the key describing the url + * @param completionBlock the block to be executed when the check is done. + * @note the completion block will be always executed on the main queue + */ +- (void)diskImageExistsWithKey:(NSString *)key completion:(SDWebImageCheckCacheCompletionBlock)completionBlock; + +/** + * Check if image exists in disk cache already (does not load the image) + * + * @param key the key describing the url + * + * @return YES if an image exists for the given key + */ +- (BOOL)diskImageExistsWithKey:(NSString *)key; + +/** + * Get the cache path for a certain key (needs the cache path root folder) + * + * @param key the key (can be obtained from url using cacheKeyForURL) + * @param path the cach path root folder + * + * @return the cache path + */ +- (NSString *)cachePathForKey:(NSString *)key inPath:(NSString *)path; + +/** + * Get the default cache path for a certain key + * + * @param key the key (can be obtained from url using cacheKeyForURL) + * + * @return the default cache path + */ +- (NSString *)defaultCachePathForKey:(NSString *)key; + +@end diff --git a/Pods/SDWebImage/SDWebImage/SDImageCache.m b/Pods/SDWebImage/SDWebImage/SDImageCache.m new file mode 100644 index 0000000..2202602 --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/SDImageCache.m @@ -0,0 +1,601 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import "SDImageCache.h" +#import "SDWebImageDecoder.h" +#import "UIImage+MultiFormat.h" +#import + +// See https://github.com/rs/SDWebImage/pull/1141 for discussion +@interface AutoPurgeCache : NSCache +@end + +@implementation AutoPurgeCache + +- (id)init +{ + self = [super init]; + if (self) { + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(removeAllObjects) name:UIApplicationDidReceiveMemoryWarningNotification object:nil]; + } + return self; +} + +- (void)dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationDidReceiveMemoryWarningNotification object:nil]; + +} + +@end + +static const NSInteger kDefaultCacheMaxCacheAge = 60 * 60 * 24 * 7; // 1 week +// PNG signature bytes and data (below) +static unsigned char kPNGSignatureBytes[8] = {0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A}; +static NSData *kPNGSignatureData = nil; + +BOOL ImageDataHasPNGPreffix(NSData *data); + +BOOL ImageDataHasPNGPreffix(NSData *data) { + NSUInteger pngSignatureLength = [kPNGSignatureData length]; + if ([data length] >= pngSignatureLength) { + if ([[data subdataWithRange:NSMakeRange(0, pngSignatureLength)] isEqualToData:kPNGSignatureData]) { + return YES; + } + } + + return NO; +} + +FOUNDATION_STATIC_INLINE NSUInteger SDCacheCostForImage(UIImage *image) { + return image.size.height * image.size.width * image.scale * image.scale; +} + +@interface SDImageCache () + +@property (strong, nonatomic) NSCache *memCache; +@property (strong, nonatomic) NSString *diskCachePath; +@property (strong, nonatomic) NSMutableArray *customPaths; +@property (SDDispatchQueueSetterSementics, nonatomic) dispatch_queue_t ioQueue; + +@end + + +@implementation SDImageCache { + NSFileManager *_fileManager; +} + ++ (SDImageCache *)sharedImageCache { + static dispatch_once_t once; + static id instance; + dispatch_once(&once, ^{ + instance = [self new]; + }); + return instance; +} + +- (id)init { + return [self initWithNamespace:@"default"]; +} + +- (id)initWithNamespace:(NSString *)ns { + NSString *path = [self makeDiskCachePath:ns]; + return [self initWithNamespace:ns diskCacheDirectory:path]; +} + +- (id)initWithNamespace:(NSString *)ns diskCacheDirectory:(NSString *)directory { + if ((self = [super init])) { + NSString *fullNamespace = [@"com.hackemist.SDWebImageCache." stringByAppendingString:ns]; + + // initialise PNG signature data + kPNGSignatureData = [NSData dataWithBytes:kPNGSignatureBytes length:8]; + + // Create IO serial queue + _ioQueue = dispatch_queue_create("com.hackemist.SDWebImageCache", DISPATCH_QUEUE_SERIAL); + + // Init default values + _maxCacheAge = kDefaultCacheMaxCacheAge; + + // Init the memory cache + _memCache = [[AutoPurgeCache alloc] init]; + _memCache.name = fullNamespace; + + // Init the disk cache + if (directory != nil) { + _diskCachePath = [directory stringByAppendingPathComponent:fullNamespace]; + } else { + NSString *path = [self makeDiskCachePath:ns]; + _diskCachePath = path; + } + + // Set decompression to YES + _shouldDecompressImages = YES; + + dispatch_sync(_ioQueue, ^{ + _fileManager = [NSFileManager new]; + }); + +#if TARGET_OS_IPHONE + // Subscribe to app events + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(clearMemory) + name:UIApplicationDidReceiveMemoryWarningNotification + object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(cleanDisk) + name:UIApplicationWillTerminateNotification + object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(backgroundCleanDisk) + name:UIApplicationDidEnterBackgroundNotification + object:nil]; +#endif + } + + return self; +} + +- (void)dealloc { + [[NSNotificationCenter defaultCenter] removeObserver:self]; + SDDispatchQueueRelease(_ioQueue); +} + +- (void)addReadOnlyCachePath:(NSString *)path { + if (!self.customPaths) { + self.customPaths = [NSMutableArray new]; + } + + if (![self.customPaths containsObject:path]) { + [self.customPaths addObject:path]; + } +} + +- (NSString *)cachePathForKey:(NSString *)key inPath:(NSString *)path { + NSString *filename = [self cachedFileNameForKey:key]; + return [path stringByAppendingPathComponent:filename]; +} + +- (NSString *)defaultCachePathForKey:(NSString *)key { + return [self cachePathForKey:key inPath:self.diskCachePath]; +} + +#pragma mark SDImageCache (private) + +- (NSString *)cachedFileNameForKey:(NSString *)key { + const char *str = [key UTF8String]; + if (str == NULL) { + str = ""; + } + unsigned char r[CC_MD5_DIGEST_LENGTH]; + CC_MD5(str, (CC_LONG)strlen(str), r); + NSString *filename = [NSString stringWithFormat:@"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", + r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7], r[8], r[9], r[10], r[11], r[12], r[13], r[14], r[15]]; + + return filename; +} + +#pragma mark ImageCache + +// Init the disk cache +-(NSString *)makeDiskCachePath:(NSString*)fullNamespace{ + NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES); + return [paths[0] stringByAppendingPathComponent:fullNamespace]; +} + +- (void)storeImage:(UIImage *)image recalculateFromImage:(BOOL)recalculate imageData:(NSData *)imageData forKey:(NSString *)key toDisk:(BOOL)toDisk { + if (!image || !key) { + return; + } + + NSUInteger cost = SDCacheCostForImage(image); + [self.memCache setObject:image forKey:key cost:cost]; + + if (toDisk) { + dispatch_async(self.ioQueue, ^{ + NSData *data = imageData; + + if (image && (recalculate || !data)) { +#if TARGET_OS_IPHONE + // We need to determine if the image is a PNG or a JPEG + // PNGs are easier to detect because they have a unique signature (http://www.w3.org/TR/PNG-Structure.html) + // The first eight bytes of a PNG file always contain the following (decimal) values: + // 137 80 78 71 13 10 26 10 + + // If the imageData is nil (i.e. if trying to save a UIImage directly or the image was transformed on download) + // and the image has an alpha channel, we will consider it PNG to avoid losing the transparency + int alphaInfo = CGImageGetAlphaInfo(image.CGImage); + BOOL hasAlpha = !(alphaInfo == kCGImageAlphaNone || + alphaInfo == kCGImageAlphaNoneSkipFirst || + alphaInfo == kCGImageAlphaNoneSkipLast); + BOOL imageIsPng = hasAlpha; + + // But if we have an image data, we will look at the preffix + if ([imageData length] >= [kPNGSignatureData length]) { + imageIsPng = ImageDataHasPNGPreffix(imageData); + } + + if (imageIsPng) { + data = UIImagePNGRepresentation(image); + } + else { + data = UIImageJPEGRepresentation(image, (CGFloat)1.0); + } +#else + data = [NSBitmapImageRep representationOfImageRepsInArray:image.representations usingType: NSJPEGFileType properties:nil]; +#endif + } + + if (data) { + if (![_fileManager fileExistsAtPath:_diskCachePath]) { + [_fileManager createDirectoryAtPath:_diskCachePath withIntermediateDirectories:YES attributes:nil error:NULL]; + } + + [_fileManager createFileAtPath:[self defaultCachePathForKey:key] contents:data attributes:nil]; + } + }); + } +} + +- (void)storeImage:(UIImage *)image forKey:(NSString *)key { + [self storeImage:image recalculateFromImage:YES imageData:nil forKey:key toDisk:YES]; +} + +- (void)storeImage:(UIImage *)image forKey:(NSString *)key toDisk:(BOOL)toDisk { + [self storeImage:image recalculateFromImage:YES imageData:nil forKey:key toDisk:toDisk]; +} + +- (BOOL)diskImageExistsWithKey:(NSString *)key { + BOOL exists = NO; + + // this is an exception to access the filemanager on another queue than ioQueue, but we are using the shared instance + // from apple docs on NSFileManager: The methods of the shared NSFileManager object can be called from multiple threads safely. + exists = [[NSFileManager defaultManager] fileExistsAtPath:[self defaultCachePathForKey:key]]; + + return exists; +} + +- (void)diskImageExistsWithKey:(NSString *)key completion:(SDWebImageCheckCacheCompletionBlock)completionBlock { + dispatch_async(_ioQueue, ^{ + BOOL exists = [_fileManager fileExistsAtPath:[self defaultCachePathForKey:key]]; + if (completionBlock) { + dispatch_async(dispatch_get_main_queue(), ^{ + completionBlock(exists); + }); + } + }); +} + +- (UIImage *)imageFromMemoryCacheForKey:(NSString *)key { + return [self.memCache objectForKey:key]; +} + +- (UIImage *)imageFromDiskCacheForKey:(NSString *)key { + // First check the in-memory cache... + UIImage *image = [self imageFromMemoryCacheForKey:key]; + if (image) { + return image; + } + + // Second check the disk cache... + UIImage *diskImage = [self diskImageForKey:key]; + if (diskImage) { + NSUInteger cost = SDCacheCostForImage(diskImage); + [self.memCache setObject:diskImage forKey:key cost:cost]; + } + + return diskImage; +} + +- (NSData *)diskImageDataBySearchingAllPathsForKey:(NSString *)key { + NSString *defaultPath = [self defaultCachePathForKey:key]; + NSData *data = [NSData dataWithContentsOfFile:defaultPath]; + if (data) { + return data; + } + + NSArray *customPaths = [self.customPaths copy]; + for (NSString *path in customPaths) { + NSString *filePath = [self cachePathForKey:key inPath:path]; + NSData *imageData = [NSData dataWithContentsOfFile:filePath]; + if (imageData) { + return imageData; + } + } + + return nil; +} + +- (UIImage *)diskImageForKey:(NSString *)key { + NSData *data = [self diskImageDataBySearchingAllPathsForKey:key]; + if (data) { + UIImage *image = [UIImage sd_imageWithData:data]; + image = [self scaledImageForKey:key image:image]; + if (self.shouldDecompressImages) { + image = [UIImage decodedImageWithImage:image]; + } + return image; + } + else { + return nil; + } +} + +- (UIImage *)scaledImageForKey:(NSString *)key image:(UIImage *)image { + return SDScaledImageForKey(key, image); +} + +- (NSOperation *)queryDiskCacheForKey:(NSString *)key done:(SDWebImageQueryCompletedBlock)doneBlock { + if (!doneBlock) { + return nil; + } + + if (!key) { + doneBlock(nil, SDImageCacheTypeNone); + return nil; + } + + // First check the in-memory cache... + UIImage *image = [self imageFromMemoryCacheForKey:key]; + if (image) { + doneBlock(image, SDImageCacheTypeMemory); + return nil; + } + + NSOperation *operation = [NSOperation new]; + dispatch_async(self.ioQueue, ^{ + if (operation.isCancelled) { + return; + } + + @autoreleasepool { + UIImage *diskImage = [self diskImageForKey:key]; + if (diskImage) { + NSUInteger cost = SDCacheCostForImage(diskImage); + [self.memCache setObject:diskImage forKey:key cost:cost]; + } + + dispatch_async(dispatch_get_main_queue(), ^{ + doneBlock(diskImage, SDImageCacheTypeDisk); + }); + } + }); + + return operation; +} + +- (void)removeImageForKey:(NSString *)key { + [self removeImageForKey:key withCompletion:nil]; +} + +- (void)removeImageForKey:(NSString *)key withCompletion:(SDWebImageNoParamsBlock)completion { + [self removeImageForKey:key fromDisk:YES withCompletion:completion]; +} + +- (void)removeImageForKey:(NSString *)key fromDisk:(BOOL)fromDisk { + [self removeImageForKey:key fromDisk:fromDisk withCompletion:nil]; +} + +- (void)removeImageForKey:(NSString *)key fromDisk:(BOOL)fromDisk withCompletion:(SDWebImageNoParamsBlock)completion { + + if (key == nil) { + return; + } + + [self.memCache removeObjectForKey:key]; + + if (fromDisk) { + dispatch_async(self.ioQueue, ^{ + [_fileManager removeItemAtPath:[self defaultCachePathForKey:key] error:nil]; + + if (completion) { + dispatch_async(dispatch_get_main_queue(), ^{ + completion(); + }); + } + }); + } else if (completion){ + completion(); + } + +} + +- (void)setMaxMemoryCost:(NSUInteger)maxMemoryCost { + self.memCache.totalCostLimit = maxMemoryCost; +} + +- (NSUInteger)maxMemoryCost { + return self.memCache.totalCostLimit; +} + +- (NSUInteger)maxMemoryCountLimit { + return self.memCache.countLimit; +} + +- (void)setMaxMemoryCountLimit:(NSUInteger)maxCountLimit { + self.memCache.countLimit = maxCountLimit; +} + +- (void)clearMemory { + [self.memCache removeAllObjects]; +} + +- (void)clearDisk { + [self clearDiskOnCompletion:nil]; +} + +- (void)clearDiskOnCompletion:(SDWebImageNoParamsBlock)completion +{ + dispatch_async(self.ioQueue, ^{ + [_fileManager removeItemAtPath:self.diskCachePath error:nil]; + [_fileManager createDirectoryAtPath:self.diskCachePath + withIntermediateDirectories:YES + attributes:nil + error:NULL]; + + if (completion) { + dispatch_async(dispatch_get_main_queue(), ^{ + completion(); + }); + } + }); +} + +- (void)cleanDisk { + [self cleanDiskWithCompletionBlock:nil]; +} + +- (void)cleanDiskWithCompletionBlock:(SDWebImageNoParamsBlock)completionBlock { + dispatch_async(self.ioQueue, ^{ + NSURL *diskCacheURL = [NSURL fileURLWithPath:self.diskCachePath isDirectory:YES]; + NSArray *resourceKeys = @[NSURLIsDirectoryKey, NSURLContentModificationDateKey, NSURLTotalFileAllocatedSizeKey]; + + // This enumerator prefetches useful properties for our cache files. + NSDirectoryEnumerator *fileEnumerator = [_fileManager enumeratorAtURL:diskCacheURL + includingPropertiesForKeys:resourceKeys + options:NSDirectoryEnumerationSkipsHiddenFiles + errorHandler:NULL]; + + NSDate *expirationDate = [NSDate dateWithTimeIntervalSinceNow:-self.maxCacheAge]; + NSMutableDictionary *cacheFiles = [NSMutableDictionary dictionary]; + NSUInteger currentCacheSize = 0; + + // Enumerate all of the files in the cache directory. This loop has two purposes: + // + // 1. Removing files that are older than the expiration date. + // 2. Storing file attributes for the size-based cleanup pass. + NSMutableArray *urlsToDelete = [[NSMutableArray alloc] init]; + for (NSURL *fileURL in fileEnumerator) { + NSDictionary *resourceValues = [fileURL resourceValuesForKeys:resourceKeys error:NULL]; + + // Skip directories. + if ([resourceValues[NSURLIsDirectoryKey] boolValue]) { + continue; + } + + // Remove files that are older than the expiration date; + NSDate *modificationDate = resourceValues[NSURLContentModificationDateKey]; + if ([[modificationDate laterDate:expirationDate] isEqualToDate:expirationDate]) { + [urlsToDelete addObject:fileURL]; + continue; + } + + // Store a reference to this file and account for its total size. + NSNumber *totalAllocatedSize = resourceValues[NSURLTotalFileAllocatedSizeKey]; + currentCacheSize += [totalAllocatedSize unsignedIntegerValue]; + [cacheFiles setObject:resourceValues forKey:fileURL]; + } + + for (NSURL *fileURL in urlsToDelete) { + [_fileManager removeItemAtURL:fileURL error:nil]; + } + + // If our remaining disk cache exceeds a configured maximum size, perform a second + // size-based cleanup pass. We delete the oldest files first. + if (self.maxCacheSize > 0 && currentCacheSize > self.maxCacheSize) { + // Target half of our maximum cache size for this cleanup pass. + const NSUInteger desiredCacheSize = self.maxCacheSize / 2; + + // Sort the remaining cache files by their last modification time (oldest first). + NSArray *sortedFiles = [cacheFiles keysSortedByValueWithOptions:NSSortConcurrent + usingComparator:^NSComparisonResult(id obj1, id obj2) { + return [obj1[NSURLContentModificationDateKey] compare:obj2[NSURLContentModificationDateKey]]; + }]; + + // Delete files until we fall below our desired cache size. + for (NSURL *fileURL in sortedFiles) { + if ([_fileManager removeItemAtURL:fileURL error:nil]) { + NSDictionary *resourceValues = cacheFiles[fileURL]; + NSNumber *totalAllocatedSize = resourceValues[NSURLTotalFileAllocatedSizeKey]; + currentCacheSize -= [totalAllocatedSize unsignedIntegerValue]; + + if (currentCacheSize < desiredCacheSize) { + break; + } + } + } + } + if (completionBlock) { + dispatch_async(dispatch_get_main_queue(), ^{ + completionBlock(); + }); + } + }); +} + +- (void)backgroundCleanDisk { + Class UIApplicationClass = NSClassFromString(@"UIApplication"); + if(!UIApplicationClass || ![UIApplicationClass respondsToSelector:@selector(sharedApplication)]) { + return; + } + UIApplication *application = [UIApplication performSelector:@selector(sharedApplication)]; + __block UIBackgroundTaskIdentifier bgTask = [application beginBackgroundTaskWithExpirationHandler:^{ + // Clean up any unfinished task business by marking where you + // stopped or ending the task outright. + [application endBackgroundTask:bgTask]; + bgTask = UIBackgroundTaskInvalid; + }]; + + // Start the long-running task and return immediately. + [self cleanDiskWithCompletionBlock:^{ + [application endBackgroundTask:bgTask]; + bgTask = UIBackgroundTaskInvalid; + }]; +} + +- (NSUInteger)getSize { + __block NSUInteger size = 0; + dispatch_sync(self.ioQueue, ^{ + NSDirectoryEnumerator *fileEnumerator = [_fileManager enumeratorAtPath:self.diskCachePath]; + for (NSString *fileName in fileEnumerator) { + NSString *filePath = [self.diskCachePath stringByAppendingPathComponent:fileName]; + NSDictionary *attrs = [[NSFileManager defaultManager] attributesOfItemAtPath:filePath error:nil]; + size += [attrs fileSize]; + } + }); + return size; +} + +- (NSUInteger)getDiskCount { + __block NSUInteger count = 0; + dispatch_sync(self.ioQueue, ^{ + NSDirectoryEnumerator *fileEnumerator = [_fileManager enumeratorAtPath:self.diskCachePath]; + count = [[fileEnumerator allObjects] count]; + }); + return count; +} + +- (void)calculateSizeWithCompletionBlock:(SDWebImageCalculateSizeBlock)completionBlock { + NSURL *diskCacheURL = [NSURL fileURLWithPath:self.diskCachePath isDirectory:YES]; + + dispatch_async(self.ioQueue, ^{ + NSUInteger fileCount = 0; + NSUInteger totalSize = 0; + + NSDirectoryEnumerator *fileEnumerator = [_fileManager enumeratorAtURL:diskCacheURL + includingPropertiesForKeys:@[NSFileSize] + options:NSDirectoryEnumerationSkipsHiddenFiles + errorHandler:NULL]; + + for (NSURL *fileURL in fileEnumerator) { + NSNumber *fileSize; + [fileURL getResourceValue:&fileSize forKey:NSURLFileSizeKey error:NULL]; + totalSize += [fileSize unsignedIntegerValue]; + fileCount += 1; + } + + if (completionBlock) { + dispatch_async(dispatch_get_main_queue(), ^{ + completionBlock(fileCount, totalSize); + }); + } + }); +} + +@end diff --git a/Pods/SDWebImage/SDWebImage/SDWebImageCompat.h b/Pods/SDWebImage/SDWebImage/SDWebImageCompat.h new file mode 100644 index 0000000..9773545 --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/SDWebImageCompat.h @@ -0,0 +1,72 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * (c) Jamie Pinkham + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import + +#ifdef __OBJC_GC__ +#error SDWebImage does not support Objective-C Garbage Collection +#endif + +#if __IPHONE_OS_VERSION_MIN_REQUIRED != 20000 && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_5_0 +#error SDWebImage doesn't support Deployement Target version < 5.0 +#endif + +#if !TARGET_OS_IPHONE +#import +#ifndef UIImage +#define UIImage NSImage +#endif +#ifndef UIImageView +#define UIImageView NSImageView +#endif +#else + +#import + +#endif + +#ifndef NS_ENUM +#define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type +#endif + +#ifndef NS_OPTIONS +#define NS_OPTIONS(_type, _name) enum _name : _type _name; enum _name : _type +#endif + +#if OS_OBJECT_USE_OBJC + #undef SDDispatchQueueRelease + #undef SDDispatchQueueSetterSementics + #define SDDispatchQueueRelease(q) + #define SDDispatchQueueSetterSementics strong +#else +#undef SDDispatchQueueRelease +#undef SDDispatchQueueSetterSementics +#define SDDispatchQueueRelease(q) (dispatch_release(q)) +#define SDDispatchQueueSetterSementics assign +#endif + +extern UIImage *SDScaledImageForKey(NSString *key, UIImage *image); + +typedef void(^SDWebImageNoParamsBlock)(); + +extern NSString *const SDWebImageErrorDomain; + +#define dispatch_main_sync_safe(block)\ + if ([NSThread isMainThread]) {\ + block();\ + } else {\ + dispatch_sync(dispatch_get_main_queue(), block);\ + } + +#define dispatch_main_async_safe(block)\ + if ([NSThread isMainThread]) {\ + block();\ + } else {\ + dispatch_async(dispatch_get_main_queue(), block);\ + } diff --git a/Pods/SDWebImage/SDWebImage/SDWebImageCompat.m b/Pods/SDWebImage/SDWebImage/SDWebImageCompat.m new file mode 100644 index 0000000..54fb60e --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/SDWebImageCompat.m @@ -0,0 +1,51 @@ +// +// SDWebImageCompat.m +// SDWebImage +// +// Created by Olivier Poitrey on 11/12/12. +// Copyright (c) 2012 Dailymotion. All rights reserved. +// + +#import "SDWebImageCompat.h" + +#if !__has_feature(objc_arc) +#error SDWebImage is ARC only. Either turn on ARC for the project or use -fobjc-arc flag +#endif + +inline UIImage *SDScaledImageForKey(NSString *key, UIImage *image) { + if (!image) { + return nil; + } + + if ([image.images count] > 0) { + NSMutableArray *scaledImages = [NSMutableArray array]; + + for (UIImage *tempImage in image.images) { + [scaledImages addObject:SDScaledImageForKey(key, tempImage)]; + } + + return [UIImage animatedImageWithImages:scaledImages duration:image.duration]; + } + else { + if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)]) { + CGFloat scale = 1.0; + if (key.length >= 8) { + NSRange range = [key rangeOfString:@"@2x."]; + if (range.location != NSNotFound) { + scale = 2.0; + } + + range = [key rangeOfString:@"@3x."]; + if (range.location != NSNotFound) { + scale = 3.0; + } + } + + UIImage *scaledImage = [[UIImage alloc] initWithCGImage:image.CGImage scale:scale orientation:image.imageOrientation]; + image = scaledImage; + } + return image; + } +} + +NSString *const SDWebImageErrorDomain = @"SDWebImageErrorDomain"; diff --git a/Pods/SDWebImage/SDWebImage/SDWebImageDecoder.h b/Pods/SDWebImage/SDWebImage/SDWebImageDecoder.h new file mode 100644 index 0000000..0176a7b --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/SDWebImageDecoder.h @@ -0,0 +1,18 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * Created by james on 9/28/11. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import +#import "SDWebImageCompat.h" + +@interface UIImage (ForceDecode) + ++ (UIImage *)decodedImageWithImage:(UIImage *)image; + +@end diff --git a/Pods/SDWebImage/SDWebImage/SDWebImageDecoder.m b/Pods/SDWebImage/SDWebImage/SDWebImageDecoder.m new file mode 100644 index 0000000..79ddb30 --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/SDWebImageDecoder.m @@ -0,0 +1,72 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * Created by james on 9/28/11. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import "SDWebImageDecoder.h" + +@implementation UIImage (ForceDecode) + ++ (UIImage *)decodedImageWithImage:(UIImage *)image { + if (image.images) { + // Do not decode animated images + return image; + } + + CGImageRef imageRef = image.CGImage; + CGSize imageSize = CGSizeMake(CGImageGetWidth(imageRef), CGImageGetHeight(imageRef)); + CGRect imageRect = (CGRect){.origin = CGPointZero, .size = imageSize}; + + CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); + CGBitmapInfo bitmapInfo = CGImageGetBitmapInfo(imageRef); + + int infoMask = (bitmapInfo & kCGBitmapAlphaInfoMask); + BOOL anyNonAlpha = (infoMask == kCGImageAlphaNone || + infoMask == kCGImageAlphaNoneSkipFirst || + infoMask == kCGImageAlphaNoneSkipLast); + + // CGBitmapContextCreate doesn't support kCGImageAlphaNone with RGB. + // https://developer.apple.com/library/mac/#qa/qa1037/_index.html + if (infoMask == kCGImageAlphaNone && CGColorSpaceGetNumberOfComponents(colorSpace) > 1) { + // Unset the old alpha info. + bitmapInfo &= ~kCGBitmapAlphaInfoMask; + + // Set noneSkipFirst. + bitmapInfo |= kCGImageAlphaNoneSkipFirst; + } + // Some PNGs tell us they have alpha but only 3 components. Odd. + else if (!anyNonAlpha && CGColorSpaceGetNumberOfComponents(colorSpace) == 3) { + // Unset the old alpha info. + bitmapInfo &= ~kCGBitmapAlphaInfoMask; + bitmapInfo |= kCGImageAlphaPremultipliedFirst; + } + + // It calculates the bytes-per-row based on the bitsPerComponent and width arguments. + CGContextRef context = CGBitmapContextCreate(NULL, + imageSize.width, + imageSize.height, + CGImageGetBitsPerComponent(imageRef), + 0, + colorSpace, + bitmapInfo); + CGColorSpaceRelease(colorSpace); + + // If failed, return undecompressed image + if (!context) return image; + + CGContextDrawImage(context, imageRect, imageRef); + CGImageRef decompressedImageRef = CGBitmapContextCreateImage(context); + + CGContextRelease(context); + + UIImage *decompressedImage = [UIImage imageWithCGImage:decompressedImageRef scale:image.scale orientation:image.imageOrientation]; + CGImageRelease(decompressedImageRef); + return decompressedImage; +} + +@end diff --git a/Pods/SDWebImage/SDWebImage/SDWebImageDownloader.h b/Pods/SDWebImage/SDWebImage/SDWebImageDownloader.h new file mode 100644 index 0000000..b8db86f --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/SDWebImageDownloader.h @@ -0,0 +1,186 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import +#import "SDWebImageCompat.h" +#import "SDWebImageOperation.h" + +typedef NS_OPTIONS(NSUInteger, SDWebImageDownloaderOptions) { + SDWebImageDownloaderLowPriority = 1 << 0, + SDWebImageDownloaderProgressiveDownload = 1 << 1, + + /** + * By default, request prevent the of NSURLCache. With this flag, NSURLCache + * is used with default policies. + */ + SDWebImageDownloaderUseNSURLCache = 1 << 2, + + /** + * Call completion block with nil image/imageData if the image was read from NSURLCache + * (to be combined with `SDWebImageDownloaderUseNSURLCache`). + */ + + SDWebImageDownloaderIgnoreCachedResponse = 1 << 3, + /** + * In iOS 4+, continue the download of the image if the app goes to background. This is achieved by asking the system for + * extra time in background to let the request finish. If the background task expires the operation will be cancelled. + */ + + SDWebImageDownloaderContinueInBackground = 1 << 4, + + /** + * Handles cookies stored in NSHTTPCookieStore by setting + * NSMutableURLRequest.HTTPShouldHandleCookies = YES; + */ + SDWebImageDownloaderHandleCookies = 1 << 5, + + /** + * Enable to allow untrusted SSL ceriticates. + * Useful for testing purposes. Use with caution in production. + */ + SDWebImageDownloaderAllowInvalidSSLCertificates = 1 << 6, + + /** + * Put the image in the high priority queue. + */ + SDWebImageDownloaderHighPriority = 1 << 7, +}; + +typedef NS_ENUM(NSInteger, SDWebImageDownloaderExecutionOrder) { + /** + * Default value. All download operations will execute in queue style (first-in-first-out). + */ + SDWebImageDownloaderFIFOExecutionOrder, + + /** + * All download operations will execute in stack style (last-in-first-out). + */ + SDWebImageDownloaderLIFOExecutionOrder +}; + +extern NSString *const SDWebImageDownloadStartNotification; +extern NSString *const SDWebImageDownloadStopNotification; + +typedef void(^SDWebImageDownloaderProgressBlock)(NSInteger receivedSize, NSInteger expectedSize); + +typedef void(^SDWebImageDownloaderCompletedBlock)(UIImage *image, NSData *data, NSError *error, BOOL finished); + +typedef NSDictionary *(^SDWebImageDownloaderHeadersFilterBlock)(NSURL *url, NSDictionary *headers); + +/** + * Asynchronous downloader dedicated and optimized for image loading. + */ +@interface SDWebImageDownloader : NSObject + +/** + * Decompressing images that are downloaded and cached can improve peformance but can consume lot of memory. + * Defaults to YES. Set this to NO if you are experiencing a crash due to excessive memory consumption. + */ +@property (assign, nonatomic) BOOL shouldDecompressImages; + +@property (assign, nonatomic) NSInteger maxConcurrentDownloads; + +/** + * Shows the current amount of downloads that still need to be downloaded + */ +@property (readonly, nonatomic) NSUInteger currentDownloadCount; + + +/** + * The timeout value (in seconds) for the download operation. Default: 15.0. + */ +@property (assign, nonatomic) NSTimeInterval downloadTimeout; + + +/** + * Changes download operations execution order. Default value is `SDWebImageDownloaderFIFOExecutionOrder`. + */ +@property (assign, nonatomic) SDWebImageDownloaderExecutionOrder executionOrder; + +/** + * Singleton method, returns the shared instance + * + * @return global shared instance of downloader class + */ ++ (SDWebImageDownloader *)sharedDownloader; + +/** + * Set username + */ +@property (strong, nonatomic) NSString *username; + +/** + * Set password + */ +@property (strong, nonatomic) NSString *password; + +/** + * Set filter to pick headers for downloading image HTTP request. + * + * This block will be invoked for each downloading image request, returned + * NSDictionary will be used as headers in corresponding HTTP request. + */ +@property (nonatomic, copy) SDWebImageDownloaderHeadersFilterBlock headersFilter; + +/** + * Set a value for a HTTP header to be appended to each download HTTP request. + * + * @param value The value for the header field. Use `nil` value to remove the header. + * @param field The name of the header field to set. + */ +- (void)setValue:(NSString *)value forHTTPHeaderField:(NSString *)field; + +/** + * Returns the value of the specified HTTP header field. + * + * @return The value associated with the header field field, or `nil` if there is no corresponding header field. + */ +- (NSString *)valueForHTTPHeaderField:(NSString *)field; + +/** + * Sets a subclass of `SDWebImageDownloaderOperation` as the default + * `NSOperation` to be used each time SDWebImage constructs a request + * operation to download an image. + * + * @param operationClass The subclass of `SDWebImageDownloaderOperation` to set + * as default. Passing `nil` will revert to `SDWebImageDownloaderOperation`. + */ +- (void)setOperationClass:(Class)operationClass; + +/** + * Creates a SDWebImageDownloader async downloader instance with a given URL + * + * The delegate will be informed when the image is finish downloaded or an error has happen. + * + * @see SDWebImageDownloaderDelegate + * + * @param url The URL to the image to download + * @param options The options to be used for this download + * @param progressBlock A block called repeatedly while the image is downloading + * @param completedBlock A block called once the download is completed. + * If the download succeeded, the image parameter is set, in case of error, + * error parameter is set with the error. The last parameter is always YES + * if SDWebImageDownloaderProgressiveDownload isn't use. With the + * SDWebImageDownloaderProgressiveDownload option, this block is called + * repeatedly with the partial image object and the finished argument set to NO + * before to be called a last time with the full image and finished argument + * set to YES. In case of error, the finished argument is always YES. + * + * @return A cancellable SDWebImageOperation + */ +- (id )downloadImageWithURL:(NSURL *)url + options:(SDWebImageDownloaderOptions)options + progress:(SDWebImageDownloaderProgressBlock)progressBlock + completed:(SDWebImageDownloaderCompletedBlock)completedBlock; + +/** + * Sets the download queue suspension state + */ +- (void)setSuspended:(BOOL)suspended; + +@end diff --git a/Pods/SDWebImage/SDWebImage/SDWebImageDownloader.m b/Pods/SDWebImage/SDWebImage/SDWebImageDownloader.m new file mode 100644 index 0000000..acda892 --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/SDWebImageDownloader.m @@ -0,0 +1,228 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import "SDWebImageDownloader.h" +#import "SDWebImageDownloaderOperation.h" +#import + +static NSString *const kProgressCallbackKey = @"progress"; +static NSString *const kCompletedCallbackKey = @"completed"; + +@interface SDWebImageDownloader () + +@property (strong, nonatomic) NSOperationQueue *downloadQueue; +@property (weak, nonatomic) NSOperation *lastAddedOperation; +@property (assign, nonatomic) Class operationClass; +@property (strong, nonatomic) NSMutableDictionary *URLCallbacks; +@property (strong, nonatomic) NSMutableDictionary *HTTPHeaders; +// This queue is used to serialize the handling of the network responses of all the download operation in a single queue +@property (SDDispatchQueueSetterSementics, nonatomic) dispatch_queue_t barrierQueue; + +@end + +@implementation SDWebImageDownloader + ++ (void)initialize { + // Bind SDNetworkActivityIndicator if available (download it here: http://github.com/rs/SDNetworkActivityIndicator ) + // To use it, just add #import "SDNetworkActivityIndicator.h" in addition to the SDWebImage import + if (NSClassFromString(@"SDNetworkActivityIndicator")) { + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Warc-performSelector-leaks" + id activityIndicator = [NSClassFromString(@"SDNetworkActivityIndicator") performSelector:NSSelectorFromString(@"sharedActivityIndicator")]; +#pragma clang diagnostic pop + + // Remove observer in case it was previously added. + [[NSNotificationCenter defaultCenter] removeObserver:activityIndicator name:SDWebImageDownloadStartNotification object:nil]; + [[NSNotificationCenter defaultCenter] removeObserver:activityIndicator name:SDWebImageDownloadStopNotification object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:activityIndicator + selector:NSSelectorFromString(@"startActivity") + name:SDWebImageDownloadStartNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:activityIndicator + selector:NSSelectorFromString(@"stopActivity") + name:SDWebImageDownloadStopNotification object:nil]; + } +} + ++ (SDWebImageDownloader *)sharedDownloader { + static dispatch_once_t once; + static id instance; + dispatch_once(&once, ^{ + instance = [self new]; + }); + return instance; +} + +- (id)init { + if ((self = [super init])) { + _operationClass = [SDWebImageDownloaderOperation class]; + _shouldDecompressImages = YES; + _executionOrder = SDWebImageDownloaderFIFOExecutionOrder; + _downloadQueue = [NSOperationQueue new]; + _downloadQueue.maxConcurrentOperationCount = 6; + _URLCallbacks = [NSMutableDictionary new]; +#ifdef SD_WEBP + _HTTPHeaders = [@{@"Accept": @"image/webp,image/*;q=0.8"} mutableCopy]; +#else + _HTTPHeaders = [@{@"Accept": @"image/*;q=0.8"} mutableCopy]; +#endif + _barrierQueue = dispatch_queue_create("com.hackemist.SDWebImageDownloaderBarrierQueue", DISPATCH_QUEUE_CONCURRENT); + _downloadTimeout = 15.0; + } + return self; +} + +- (void)dealloc { + [self.downloadQueue cancelAllOperations]; + SDDispatchQueueRelease(_barrierQueue); +} + +- (void)setValue:(NSString *)value forHTTPHeaderField:(NSString *)field { + if (value) { + self.HTTPHeaders[field] = value; + } + else { + [self.HTTPHeaders removeObjectForKey:field]; + } +} + +- (NSString *)valueForHTTPHeaderField:(NSString *)field { + return self.HTTPHeaders[field]; +} + +- (void)setMaxConcurrentDownloads:(NSInteger)maxConcurrentDownloads { + _downloadQueue.maxConcurrentOperationCount = maxConcurrentDownloads; +} + +- (NSUInteger)currentDownloadCount { + return _downloadQueue.operationCount; +} + +- (NSInteger)maxConcurrentDownloads { + return _downloadQueue.maxConcurrentOperationCount; +} + +- (void)setOperationClass:(Class)operationClass { + _operationClass = operationClass ?: [SDWebImageDownloaderOperation class]; +} + +- (id )downloadImageWithURL:(NSURL *)url options:(SDWebImageDownloaderOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageDownloaderCompletedBlock)completedBlock { + __block SDWebImageDownloaderOperation *operation; + __weak __typeof(self)wself = self; + + [self addProgressCallback:progressBlock andCompletedBlock:completedBlock forURL:url createCallback:^{ + NSTimeInterval timeoutInterval = wself.downloadTimeout; + if (timeoutInterval == 0.0) { + timeoutInterval = 15.0; + } + + // In order to prevent from potential duplicate caching (NSURLCache + SDImageCache) we disable the cache for image requests if told otherwise + NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:url cachePolicy:(options & SDWebImageDownloaderUseNSURLCache ? NSURLRequestUseProtocolCachePolicy : NSURLRequestReloadIgnoringLocalCacheData) timeoutInterval:timeoutInterval]; + request.HTTPShouldHandleCookies = (options & SDWebImageDownloaderHandleCookies); + request.HTTPShouldUsePipelining = YES; + if (wself.headersFilter) { + request.allHTTPHeaderFields = wself.headersFilter(url, [wself.HTTPHeaders copy]); + } + else { + request.allHTTPHeaderFields = wself.HTTPHeaders; + } + operation = [[wself.operationClass alloc] initWithRequest:request + options:options + progress:^(NSInteger receivedSize, NSInteger expectedSize) { + SDWebImageDownloader *sself = wself; + if (!sself) return; + __block NSArray *callbacksForURL; + dispatch_sync(sself.barrierQueue, ^{ + callbacksForURL = [sself.URLCallbacks[url] copy]; + }); + for (NSDictionary *callbacks in callbacksForURL) { + SDWebImageDownloaderProgressBlock callback = callbacks[kProgressCallbackKey]; + if (callback) callback(receivedSize, expectedSize); + } + } + completed:^(UIImage *image, NSData *data, NSError *error, BOOL finished) { + SDWebImageDownloader *sself = wself; + if (!sself) return; + __block NSArray *callbacksForURL; + dispatch_barrier_sync(sself.barrierQueue, ^{ + callbacksForURL = [sself.URLCallbacks[url] copy]; + if (finished) { + [sself.URLCallbacks removeObjectForKey:url]; + } + }); + for (NSDictionary *callbacks in callbacksForURL) { + SDWebImageDownloaderCompletedBlock callback = callbacks[kCompletedCallbackKey]; + if (callback) callback(image, data, error, finished); + } + } + cancelled:^{ + SDWebImageDownloader *sself = wself; + if (!sself) return; + dispatch_barrier_async(sself.barrierQueue, ^{ + [sself.URLCallbacks removeObjectForKey:url]; + }); + }]; + operation.shouldDecompressImages = wself.shouldDecompressImages; + + if (wself.username && wself.password) { + operation.credential = [NSURLCredential credentialWithUser:wself.username password:wself.password persistence:NSURLCredentialPersistenceForSession]; + } + + if (options & SDWebImageDownloaderHighPriority) { + operation.queuePriority = NSOperationQueuePriorityHigh; + } else if (options & SDWebImageDownloaderLowPriority) { + operation.queuePriority = NSOperationQueuePriorityLow; + } + + [wself.downloadQueue addOperation:operation]; + if (wself.executionOrder == SDWebImageDownloaderLIFOExecutionOrder) { + // Emulate LIFO execution order by systematically adding new operations as last operation's dependency + [wself.lastAddedOperation addDependency:operation]; + wself.lastAddedOperation = operation; + } + }]; + + return operation; +} + +- (void)addProgressCallback:(SDWebImageDownloaderProgressBlock)progressBlock andCompletedBlock:(SDWebImageDownloaderCompletedBlock)completedBlock forURL:(NSURL *)url createCallback:(SDWebImageNoParamsBlock)createCallback { + // The URL will be used as the key to the callbacks dictionary so it cannot be nil. If it is nil immediately call the completed block with no image or data. + if (url == nil) { + if (completedBlock != nil) { + completedBlock(nil, nil, nil, NO); + } + return; + } + + dispatch_barrier_sync(self.barrierQueue, ^{ + BOOL first = NO; + if (!self.URLCallbacks[url]) { + self.URLCallbacks[url] = [NSMutableArray new]; + first = YES; + } + + // Handle single download of simultaneous download request for the same URL + NSMutableArray *callbacksForURL = self.URLCallbacks[url]; + NSMutableDictionary *callbacks = [NSMutableDictionary new]; + if (progressBlock) callbacks[kProgressCallbackKey] = [progressBlock copy]; + if (completedBlock) callbacks[kCompletedCallbackKey] = [completedBlock copy]; + [callbacksForURL addObject:callbacks]; + self.URLCallbacks[url] = callbacksForURL; + + if (first) { + createCallback(); + } + }); +} + +- (void)setSuspended:(BOOL)suspended { + [self.downloadQueue setSuspended:suspended]; +} + +@end diff --git a/Pods/SDWebImage/SDWebImage/SDWebImageDownloaderOperation.h b/Pods/SDWebImage/SDWebImage/SDWebImageDownloaderOperation.h new file mode 100644 index 0000000..dd48b22 --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/SDWebImageDownloaderOperation.h @@ -0,0 +1,78 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import +#import "SDWebImageDownloader.h" +#import "SDWebImageOperation.h" + +extern NSString *const SDWebImageDownloadStartNotification; +extern NSString *const SDWebImageDownloadReceiveResponseNotification; +extern NSString *const SDWebImageDownloadStopNotification; +extern NSString *const SDWebImageDownloadFinishNotification; + +@interface SDWebImageDownloaderOperation : NSOperation + +/** + * The request used by the operation's connection. + */ +@property (strong, nonatomic, readonly) NSURLRequest *request; + + +@property (assign, nonatomic) BOOL shouldDecompressImages; + +/** + * Whether the URL connection should consult the credential storage for authenticating the connection. `YES` by default. + * + * This is the value that is returned in the `NSURLConnectionDelegate` method `-connectionShouldUseCredentialStorage:`. + */ +@property (nonatomic, assign) BOOL shouldUseCredentialStorage; + +/** + * The credential used for authentication challenges in `-connection:didReceiveAuthenticationChallenge:`. + * + * This will be overridden by any shared credentials that exist for the username or password of the request URL, if present. + */ +@property (nonatomic, strong) NSURLCredential *credential; + +/** + * The SDWebImageDownloaderOptions for the receiver. + */ +@property (assign, nonatomic, readonly) SDWebImageDownloaderOptions options; + +/** + * The expected size of data. + */ +@property (assign, nonatomic) NSInteger expectedSize; + +/** + * The response returned by the operation's connection. + */ +@property (strong, nonatomic) NSURLResponse *response; + +/** + * Initializes a `SDWebImageDownloaderOperation` object + * + * @see SDWebImageDownloaderOperation + * + * @param request the URL request + * @param options downloader options + * @param progressBlock the block executed when a new chunk of data arrives. + * @note the progress block is executed on a background queue + * @param completedBlock the block executed when the download is done. + * @note the completed block is executed on the main queue for success. If errors are found, there is a chance the block will be executed on a background queue + * @param cancelBlock the block executed if the download (operation) is cancelled + * + * @return the initialized instance + */ +- (id)initWithRequest:(NSURLRequest *)request + options:(SDWebImageDownloaderOptions)options + progress:(SDWebImageDownloaderProgressBlock)progressBlock + completed:(SDWebImageDownloaderCompletedBlock)completedBlock + cancelled:(SDWebImageNoParamsBlock)cancelBlock; + +@end diff --git a/Pods/SDWebImage/SDWebImage/SDWebImageDownloaderOperation.m b/Pods/SDWebImage/SDWebImage/SDWebImageDownloaderOperation.m new file mode 100644 index 0000000..5a8bd11 --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/SDWebImageDownloaderOperation.m @@ -0,0 +1,466 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import "SDWebImageDownloaderOperation.h" +#import "SDWebImageDecoder.h" +#import "UIImage+MultiFormat.h" +#import +#import "SDWebImageManager.h" + +NSString *const SDWebImageDownloadStartNotification = @"SDWebImageDownloadStartNotification"; +NSString *const SDWebImageDownloadReceiveResponseNotification = @"SDWebImageDownloadReceiveResponseNotification"; +NSString *const SDWebImageDownloadStopNotification = @"SDWebImageDownloadStopNotification"; +NSString *const SDWebImageDownloadFinishNotification = @"SDWebImageDownloadFinishNotification"; + +@interface SDWebImageDownloaderOperation () + +@property (copy, nonatomic) SDWebImageDownloaderProgressBlock progressBlock; +@property (copy, nonatomic) SDWebImageDownloaderCompletedBlock completedBlock; +@property (copy, nonatomic) SDWebImageNoParamsBlock cancelBlock; + +@property (assign, nonatomic, getter = isExecuting) BOOL executing; +@property (assign, nonatomic, getter = isFinished) BOOL finished; +@property (strong, nonatomic) NSMutableData *imageData; +@property (strong, nonatomic) NSURLConnection *connection; +@property (strong, atomic) NSThread *thread; + +#if TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_4_0 +@property (assign, nonatomic) UIBackgroundTaskIdentifier backgroundTaskId; +#endif + +@end + +@implementation SDWebImageDownloaderOperation { + size_t width, height; + UIImageOrientation orientation; + BOOL responseFromCached; +} + +@synthesize executing = _executing; +@synthesize finished = _finished; + +- (id)initWithRequest:(NSURLRequest *)request + options:(SDWebImageDownloaderOptions)options + progress:(SDWebImageDownloaderProgressBlock)progressBlock + completed:(SDWebImageDownloaderCompletedBlock)completedBlock + cancelled:(SDWebImageNoParamsBlock)cancelBlock { + if ((self = [super init])) { + _request = request; + _shouldDecompressImages = YES; + _shouldUseCredentialStorage = YES; + _options = options; + _progressBlock = [progressBlock copy]; + _completedBlock = [completedBlock copy]; + _cancelBlock = [cancelBlock copy]; + _executing = NO; + _finished = NO; + _expectedSize = 0; + responseFromCached = YES; // Initially wrong until `connection:willCacheResponse:` is called or not called + } + return self; +} + +- (void)start { + @synchronized (self) { + if (self.isCancelled) { + self.finished = YES; + [self reset]; + return; + } + +#if TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_4_0 + Class UIApplicationClass = NSClassFromString(@"UIApplication"); + BOOL hasApplication = UIApplicationClass && [UIApplicationClass respondsToSelector:@selector(sharedApplication)]; + if (hasApplication && [self shouldContinueWhenAppEntersBackground]) { + __weak __typeof__ (self) wself = self; + UIApplication * app = [UIApplicationClass performSelector:@selector(sharedApplication)]; + self.backgroundTaskId = [app beginBackgroundTaskWithExpirationHandler:^{ + __strong __typeof (wself) sself = wself; + + if (sself) { + [sself cancel]; + + [app endBackgroundTask:sself.backgroundTaskId]; + sself.backgroundTaskId = UIBackgroundTaskInvalid; + } + }]; + } +#endif + + self.executing = YES; + self.connection = [[NSURLConnection alloc] initWithRequest:self.request delegate:self startImmediately:NO]; + self.thread = [NSThread currentThread]; + } + + [self.connection start]; + + if (self.connection) { + if (self.progressBlock) { + self.progressBlock(0, NSURLResponseUnknownLength); + } + dispatch_async(dispatch_get_main_queue(), ^{ + [[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadStartNotification object:self]; + }); + + if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_5_1) { + // Make sure to run the runloop in our background thread so it can process downloaded data + // Note: we use a timeout to work around an issue with NSURLConnection cancel under iOS 5 + // not waking up the runloop, leading to dead threads (see https://github.com/rs/SDWebImage/issues/466) + CFRunLoopRunInMode(kCFRunLoopDefaultMode, 10, false); + } + else { + CFRunLoopRun(); + } + + if (!self.isFinished) { + [self.connection cancel]; + [self connection:self.connection didFailWithError:[NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorTimedOut userInfo:@{NSURLErrorFailingURLErrorKey : self.request.URL}]]; + } + } + else { + if (self.completedBlock) { + self.completedBlock(nil, nil, [NSError errorWithDomain:NSURLErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey : @"Connection can't be initialized"}], YES); + } + } + +#if TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_4_0 + Class UIApplicationClass = NSClassFromString(@"UIApplication"); + if(!UIApplicationClass || ![UIApplicationClass respondsToSelector:@selector(sharedApplication)]) { + return; + } + if (self.backgroundTaskId != UIBackgroundTaskInvalid) { + UIApplication * app = [UIApplication performSelector:@selector(sharedApplication)]; + [app endBackgroundTask:self.backgroundTaskId]; + self.backgroundTaskId = UIBackgroundTaskInvalid; + } +#endif +} + +- (void)cancel { + @synchronized (self) { + if (self.thread) { + [self performSelector:@selector(cancelInternalAndStop) onThread:self.thread withObject:nil waitUntilDone:NO]; + } + else { + [self cancelInternal]; + } + } +} + +- (void)cancelInternalAndStop { + if (self.isFinished) return; + [self cancelInternal]; + CFRunLoopStop(CFRunLoopGetCurrent()); +} + +- (void)cancelInternal { + if (self.isFinished) return; + [super cancel]; + if (self.cancelBlock) self.cancelBlock(); + + if (self.connection) { + [self.connection cancel]; + dispatch_async(dispatch_get_main_queue(), ^{ + [[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadStopNotification object:self]; + }); + + // As we cancelled the connection, its callback won't be called and thus won't + // maintain the isFinished and isExecuting flags. + if (self.isExecuting) self.executing = NO; + if (!self.isFinished) self.finished = YES; + } + + [self reset]; +} + +- (void)done { + self.finished = YES; + self.executing = NO; + [self reset]; +} + +- (void)reset { + self.cancelBlock = nil; + self.completedBlock = nil; + self.progressBlock = nil; + self.connection = nil; + self.imageData = nil; + self.thread = nil; +} + +- (void)setFinished:(BOOL)finished { + [self willChangeValueForKey:@"isFinished"]; + _finished = finished; + [self didChangeValueForKey:@"isFinished"]; +} + +- (void)setExecuting:(BOOL)executing { + [self willChangeValueForKey:@"isExecuting"]; + _executing = executing; + [self didChangeValueForKey:@"isExecuting"]; +} + +- (BOOL)isConcurrent { + return YES; +} + +#pragma mark NSURLConnection (delegate) + +- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { + + //'304 Not Modified' is an exceptional one + if (![response respondsToSelector:@selector(statusCode)] || ([((NSHTTPURLResponse *)response) statusCode] < 400 && [((NSHTTPURLResponse *)response) statusCode] != 304)) { + NSInteger expected = response.expectedContentLength > 0 ? (NSInteger)response.expectedContentLength : 0; + self.expectedSize = expected; + if (self.progressBlock) { + self.progressBlock(0, expected); + } + + self.imageData = [[NSMutableData alloc] initWithCapacity:expected]; + self.response = response; + dispatch_async(dispatch_get_main_queue(), ^{ + [[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadReceiveResponseNotification object:self]; + }); + } + else { + NSUInteger code = [((NSHTTPURLResponse *)response) statusCode]; + + //This is the case when server returns '304 Not Modified'. It means that remote image is not changed. + //In case of 304 we need just cancel the operation and return cached image from the cache. + if (code == 304) { + [self cancelInternal]; + } else { + [self.connection cancel]; + } + dispatch_async(dispatch_get_main_queue(), ^{ + [[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadStopNotification object:self]; + }); + + if (self.completedBlock) { + self.completedBlock(nil, nil, [NSError errorWithDomain:NSURLErrorDomain code:[((NSHTTPURLResponse *)response) statusCode] userInfo:nil], YES); + } + CFRunLoopStop(CFRunLoopGetCurrent()); + [self done]; + } +} + +- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { + [self.imageData appendData:data]; + + if ((self.options & SDWebImageDownloaderProgressiveDownload) && self.expectedSize > 0 && self.completedBlock) { + // The following code is from http://www.cocoaintheshell.com/2011/05/progressive-images-download-imageio/ + // Thanks to the author @Nyx0uf + + // Get the total bytes downloaded + const NSInteger totalSize = self.imageData.length; + + // Update the data source, we must pass ALL the data, not just the new bytes + CGImageSourceRef imageSource = CGImageSourceCreateWithData((__bridge CFDataRef)self.imageData, NULL); + + if (width + height == 0) { + CFDictionaryRef properties = CGImageSourceCopyPropertiesAtIndex(imageSource, 0, NULL); + if (properties) { + NSInteger orientationValue = -1; + CFTypeRef val = CFDictionaryGetValue(properties, kCGImagePropertyPixelHeight); + if (val) CFNumberGetValue(val, kCFNumberLongType, &height); + val = CFDictionaryGetValue(properties, kCGImagePropertyPixelWidth); + if (val) CFNumberGetValue(val, kCFNumberLongType, &width); + val = CFDictionaryGetValue(properties, kCGImagePropertyOrientation); + if (val) CFNumberGetValue(val, kCFNumberNSIntegerType, &orientationValue); + CFRelease(properties); + + // When we draw to Core Graphics, we lose orientation information, + // which means the image below born of initWithCGIImage will be + // oriented incorrectly sometimes. (Unlike the image born of initWithData + // in connectionDidFinishLoading.) So save it here and pass it on later. + orientation = [[self class] orientationFromPropertyValue:(orientationValue == -1 ? 1 : orientationValue)]; + } + + } + + if (width + height > 0 && totalSize < self.expectedSize) { + // Create the image + CGImageRef partialImageRef = CGImageSourceCreateImageAtIndex(imageSource, 0, NULL); + +#ifdef TARGET_OS_IPHONE + // Workaround for iOS anamorphic image + if (partialImageRef) { + const size_t partialHeight = CGImageGetHeight(partialImageRef); + CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); + CGContextRef bmContext = CGBitmapContextCreate(NULL, width, height, 8, width * 4, colorSpace, kCGBitmapByteOrderDefault | kCGImageAlphaPremultipliedFirst); + CGColorSpaceRelease(colorSpace); + if (bmContext) { + CGContextDrawImage(bmContext, (CGRect){.origin.x = 0.0f, .origin.y = 0.0f, .size.width = width, .size.height = partialHeight}, partialImageRef); + CGImageRelease(partialImageRef); + partialImageRef = CGBitmapContextCreateImage(bmContext); + CGContextRelease(bmContext); + } + else { + CGImageRelease(partialImageRef); + partialImageRef = nil; + } + } +#endif + + if (partialImageRef) { + UIImage *image = [UIImage imageWithCGImage:partialImageRef scale:1 orientation:orientation]; + NSString *key = [[SDWebImageManager sharedManager] cacheKeyForURL:self.request.URL]; + UIImage *scaledImage = [self scaledImageForKey:key image:image]; + if (self.shouldDecompressImages) { + image = [UIImage decodedImageWithImage:scaledImage]; + } + else { + image = scaledImage; + } + CGImageRelease(partialImageRef); + dispatch_main_sync_safe(^{ + if (self.completedBlock) { + self.completedBlock(image, nil, nil, NO); + } + }); + } + } + + CFRelease(imageSource); + } + + if (self.progressBlock) { + self.progressBlock(self.imageData.length, self.expectedSize); + } +} + ++ (UIImageOrientation)orientationFromPropertyValue:(NSInteger)value { + switch (value) { + case 1: + return UIImageOrientationUp; + case 3: + return UIImageOrientationDown; + case 8: + return UIImageOrientationLeft; + case 6: + return UIImageOrientationRight; + case 2: + return UIImageOrientationUpMirrored; + case 4: + return UIImageOrientationDownMirrored; + case 5: + return UIImageOrientationLeftMirrored; + case 7: + return UIImageOrientationRightMirrored; + default: + return UIImageOrientationUp; + } +} + +- (UIImage *)scaledImageForKey:(NSString *)key image:(UIImage *)image { + return SDScaledImageForKey(key, image); +} + +- (void)connectionDidFinishLoading:(NSURLConnection *)aConnection { + SDWebImageDownloaderCompletedBlock completionBlock = self.completedBlock; + @synchronized(self) { + CFRunLoopStop(CFRunLoopGetCurrent()); + self.thread = nil; + self.connection = nil; + dispatch_async(dispatch_get_main_queue(), ^{ + [[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadStopNotification object:self]; + [[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadFinishNotification object:self]; + }); + } + + if (![[NSURLCache sharedURLCache] cachedResponseForRequest:_request]) { + responseFromCached = NO; + } + + if (completionBlock) { + if (self.options & SDWebImageDownloaderIgnoreCachedResponse && responseFromCached) { + completionBlock(nil, nil, nil, YES); + } else if (self.imageData) { + UIImage *image = [UIImage sd_imageWithData:self.imageData]; + NSString *key = [[SDWebImageManager sharedManager] cacheKeyForURL:self.request.URL]; + image = [self scaledImageForKey:key image:image]; + + // Do not force decoding animated GIFs + if (!image.images) { + if (self.shouldDecompressImages) { + image = [UIImage decodedImageWithImage:image]; + } + } + if (CGSizeEqualToSize(image.size, CGSizeZero)) { + completionBlock(nil, nil, [NSError errorWithDomain:SDWebImageErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey : @"Downloaded image has 0 pixels"}], YES); + } + else { + completionBlock(image, self.imageData, nil, YES); + } + } else { + completionBlock(nil, nil, [NSError errorWithDomain:SDWebImageErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey : @"Image data is nil"}], YES); + } + } + self.completionBlock = nil; + [self done]; +} + +- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { + @synchronized(self) { + CFRunLoopStop(CFRunLoopGetCurrent()); + self.thread = nil; + self.connection = nil; + dispatch_async(dispatch_get_main_queue(), ^{ + [[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadStopNotification object:self]; + }); + } + + if (self.completedBlock) { + self.completedBlock(nil, nil, error, YES); + } + self.completionBlock = nil; + [self done]; +} + +- (NSCachedURLResponse *)connection:(NSURLConnection *)connection willCacheResponse:(NSCachedURLResponse *)cachedResponse { + responseFromCached = NO; // If this method is called, it means the response wasn't read from cache + if (self.request.cachePolicy == NSURLRequestReloadIgnoringLocalCacheData) { + // Prevents caching of responses + return nil; + } + else { + return cachedResponse; + } +} + +- (BOOL)shouldContinueWhenAppEntersBackground { + return self.options & SDWebImageDownloaderContinueInBackground; +} + +- (BOOL)connectionShouldUseCredentialStorage:(NSURLConnection __unused *)connection { + return self.shouldUseCredentialStorage; +} + +- (void)connection:(NSURLConnection *)connection willSendRequestForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge{ + if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) { + if (!(self.options & SDWebImageDownloaderAllowInvalidSSLCertificates) && + [challenge.sender respondsToSelector:@selector(performDefaultHandlingForAuthenticationChallenge:)]) { + [challenge.sender performDefaultHandlingForAuthenticationChallenge:challenge]; + } else { + NSURLCredential *credential = [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]; + [[challenge sender] useCredential:credential forAuthenticationChallenge:challenge]; + } + } else { + if ([challenge previousFailureCount] == 0) { + if (self.credential) { + [[challenge sender] useCredential:self.credential forAuthenticationChallenge:challenge]; + } else { + [[challenge sender] continueWithoutCredentialForAuthenticationChallenge:challenge]; + } + } else { + [[challenge sender] continueWithoutCredentialForAuthenticationChallenge:challenge]; + } + } +} + +@end diff --git a/Pods/SDWebImage/SDWebImage/SDWebImageManager.h b/Pods/SDWebImage/SDWebImage/SDWebImageManager.h new file mode 100644 index 0000000..7f80e24 --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/SDWebImageManager.h @@ -0,0 +1,299 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import "SDWebImageCompat.h" +#import "SDWebImageOperation.h" +#import "SDWebImageDownloader.h" +#import "SDImageCache.h" + +typedef NS_OPTIONS(NSUInteger, SDWebImageOptions) { + /** + * By default, when a URL fail to be downloaded, the URL is blacklisted so the library won't keep trying. + * This flag disable this blacklisting. + */ + SDWebImageRetryFailed = 1 << 0, + + /** + * By default, image downloads are started during UI interactions, this flags disable this feature, + * leading to delayed download on UIScrollView deceleration for instance. + */ + SDWebImageLowPriority = 1 << 1, + + /** + * This flag disables on-disk caching + */ + SDWebImageCacheMemoryOnly = 1 << 2, + + /** + * This flag enables progressive download, the image is displayed progressively during download as a browser would do. + * By default, the image is only displayed once completely downloaded. + */ + SDWebImageProgressiveDownload = 1 << 3, + + /** + * Even if the image is cached, respect the HTTP response cache control, and refresh the image from remote location if needed. + * The disk caching will be handled by NSURLCache instead of SDWebImage leading to slight performance degradation. + * This option helps deal with images changing behind the same request URL, e.g. Facebook graph api profile pics. + * If a cached image is refreshed, the completion block is called once with the cached image and again with the final image. + * + * Use this flag only if you can't make your URLs static with embeded cache busting parameter. + */ + SDWebImageRefreshCached = 1 << 4, + + /** + * In iOS 4+, continue the download of the image if the app goes to background. This is achieved by asking the system for + * extra time in background to let the request finish. If the background task expires the operation will be cancelled. + */ + SDWebImageContinueInBackground = 1 << 5, + + /** + * Handles cookies stored in NSHTTPCookieStore by setting + * NSMutableURLRequest.HTTPShouldHandleCookies = YES; + */ + SDWebImageHandleCookies = 1 << 6, + + /** + * Enable to allow untrusted SSL ceriticates. + * Useful for testing purposes. Use with caution in production. + */ + SDWebImageAllowInvalidSSLCertificates = 1 << 7, + + /** + * By default, image are loaded in the order they were queued. This flag move them to + * the front of the queue and is loaded immediately instead of waiting for the current queue to be loaded (which + * could take a while). + */ + SDWebImageHighPriority = 1 << 8, + + /** + * By default, placeholder images are loaded while the image is loading. This flag will delay the loading + * of the placeholder image until after the image has finished loading. + */ + SDWebImageDelayPlaceholder = 1 << 9, + + /** + * We usually don't call transformDownloadedImage delegate method on animated images, + * as most transformation code would mangle it. + * Use this flag to transform them anyway. + */ + SDWebImageTransformAnimatedImage = 1 << 10, + + /** + * By default, image is added to the imageView after download. But in some cases, we want to + * have the hand before setting the image (apply a filter or add it with cross-fade animation for instance) + * Use this flag if you want to manually set the image in the completion when success + */ + SDWebImageAvoidAutoSetImage = 1 << 11 +}; + +typedef void(^SDWebImageCompletionBlock)(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL); + +typedef void(^SDWebImageCompletionWithFinishedBlock)(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL); + +typedef NSString *(^SDWebImageCacheKeyFilterBlock)(NSURL *url); + + +@class SDWebImageManager; + +@protocol SDWebImageManagerDelegate + +@optional + +/** + * Controls which image should be downloaded when the image is not found in the cache. + * + * @param imageManager The current `SDWebImageManager` + * @param imageURL The url of the image to be downloaded + * + * @return Return NO to prevent the downloading of the image on cache misses. If not implemented, YES is implied. + */ +- (BOOL)imageManager:(SDWebImageManager *)imageManager shouldDownloadImageForURL:(NSURL *)imageURL; + +/** + * Allows to transform the image immediately after it has been downloaded and just before to cache it on disk and memory. + * NOTE: This method is called from a global queue in order to not to block the main thread. + * + * @param imageManager The current `SDWebImageManager` + * @param image The image to transform + * @param imageURL The url of the image to transform + * + * @return The transformed image object. + */ +- (UIImage *)imageManager:(SDWebImageManager *)imageManager transformDownloadedImage:(UIImage *)image withURL:(NSURL *)imageURL; + +@end + +/** + * The SDWebImageManager is the class behind the UIImageView+WebCache category and likes. + * It ties the asynchronous downloader (SDWebImageDownloader) with the image cache store (SDImageCache). + * You can use this class directly to benefit from web image downloading with caching in another context than + * a UIView. + * + * Here is a simple example of how to use SDWebImageManager: + * + * @code + +SDWebImageManager *manager = [SDWebImageManager sharedManager]; +[manager downloadImageWithURL:imageURL + options:0 + progress:nil + completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) { + if (image) { + // do something with image + } + }]; + + * @endcode + */ +@interface SDWebImageManager : NSObject + +@property (weak, nonatomic) id delegate; + +@property (strong, nonatomic, readonly) SDImageCache *imageCache; +@property (strong, nonatomic, readonly) SDWebImageDownloader *imageDownloader; + +/** + * The cache filter is a block used each time SDWebImageManager need to convert an URL into a cache key. This can + * be used to remove dynamic part of an image URL. + * + * The following example sets a filter in the application delegate that will remove any query-string from the + * URL before to use it as a cache key: + * + * @code + +[[SDWebImageManager sharedManager] setCacheKeyFilter:^(NSURL *url) { + url = [[NSURL alloc] initWithScheme:url.scheme host:url.host path:url.path]; + return [url absoluteString]; +}]; + + * @endcode + */ +@property (nonatomic, copy) SDWebImageCacheKeyFilterBlock cacheKeyFilter; + +/** + * Returns global SDWebImageManager instance. + * + * @return SDWebImageManager shared instance + */ ++ (SDWebImageManager *)sharedManager; + +/** + * Downloads the image at the given URL if not present in cache or return the cached version otherwise. + * + * @param url The URL to the image + * @param options A mask to specify options to use for this request + * @param progressBlock A block called while image is downloading + * @param completedBlock A block called when operation has been completed. + * + * This parameter is required. + * + * This block has no return value and takes the requested UIImage as first parameter. + * In case of error the image parameter is nil and the second parameter may contain an NSError. + * + * The third parameter is an `SDImageCacheType` enum indicating if the image was retrived from the local cache + * or from the memory cache or from the network. + * + * The last parameter is set to NO when the SDWebImageProgressiveDownload option is used and the image is + * downloading. This block is thus called repetidly with a partial image. When image is fully downloaded, the + * block is called a last time with the full image and the last parameter set to YES. + * + * @return Returns an NSObject conforming to SDWebImageOperation. Should be an instance of SDWebImageDownloaderOperation + */ +- (id )downloadImageWithURL:(NSURL *)url + options:(SDWebImageOptions)options + progress:(SDWebImageDownloaderProgressBlock)progressBlock + completed:(SDWebImageCompletionWithFinishedBlock)completedBlock; + +/** + * Saves image to cache for given URL + * + * @param image The image to cache + * @param url The URL to the image + * + */ + +- (void)saveImageToCache:(UIImage *)image forURL:(NSURL *)url; + +/** + * Cancel all current opreations + */ +- (void)cancelAll; + +/** + * Check one or more operations running + */ +- (BOOL)isRunning; + +/** + * Check if image has already been cached + * + * @param url image url + * + * @return if the image was already cached + */ +- (BOOL)cachedImageExistsForURL:(NSURL *)url; + +/** + * Check if image has already been cached on disk only + * + * @param url image url + * + * @return if the image was already cached (disk only) + */ +- (BOOL)diskImageExistsForURL:(NSURL *)url; + +/** + * Async check if image has already been cached + * + * @param url image url + * @param completionBlock the block to be executed when the check is finished + * + * @note the completion block is always executed on the main queue + */ +- (void)cachedImageExistsForURL:(NSURL *)url + completion:(SDWebImageCheckCacheCompletionBlock)completionBlock; + +/** + * Async check if image has already been cached on disk only + * + * @param url image url + * @param completionBlock the block to be executed when the check is finished + * + * @note the completion block is always executed on the main queue + */ +- (void)diskImageExistsForURL:(NSURL *)url + completion:(SDWebImageCheckCacheCompletionBlock)completionBlock; + + +/** + *Return the cache key for a given URL + */ +- (NSString *)cacheKeyForURL:(NSURL *)url; + +@end + + +#pragma mark - Deprecated + +typedef void(^SDWebImageCompletedBlock)(UIImage *image, NSError *error, SDImageCacheType cacheType) __deprecated_msg("Block type deprecated. Use `SDWebImageCompletionBlock`"); +typedef void(^SDWebImageCompletedWithFinishedBlock)(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished) __deprecated_msg("Block type deprecated. Use `SDWebImageCompletionWithFinishedBlock`"); + + +@interface SDWebImageManager (Deprecated) + +/** + * Downloads the image at the given URL if not present in cache or return the cached version otherwise. + * + * @deprecated This method has been deprecated. Use `downloadImageWithURL:options:progress:completed:` + */ +- (id )downloadWithURL:(NSURL *)url + options:(SDWebImageOptions)options + progress:(SDWebImageDownloaderProgressBlock)progressBlock + completed:(SDWebImageCompletedWithFinishedBlock)completedBlock __deprecated_msg("Method deprecated. Use `downloadImageWithURL:options:progress:completed:`"); + +@end diff --git a/Pods/SDWebImage/SDWebImage/SDWebImageManager.m b/Pods/SDWebImage/SDWebImage/SDWebImageManager.m new file mode 100644 index 0000000..3980ced --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/SDWebImageManager.m @@ -0,0 +1,354 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import "SDWebImageManager.h" +#import + +@interface SDWebImageCombinedOperation : NSObject + +@property (assign, nonatomic, getter = isCancelled) BOOL cancelled; +@property (copy, nonatomic) SDWebImageNoParamsBlock cancelBlock; +@property (strong, nonatomic) NSOperation *cacheOperation; + +@end + +@interface SDWebImageManager () + +@property (strong, nonatomic, readwrite) SDImageCache *imageCache; +@property (strong, nonatomic, readwrite) SDWebImageDownloader *imageDownloader; +@property (strong, nonatomic) NSMutableSet *failedURLs; +@property (strong, nonatomic) NSMutableArray *runningOperations; + +@end + +@implementation SDWebImageManager + ++ (id)sharedManager { + static dispatch_once_t once; + static id instance; + dispatch_once(&once, ^{ + instance = [self new]; + }); + return instance; +} + +- (id)init { + if ((self = [super init])) { + _imageCache = [self createCache]; + _imageDownloader = [SDWebImageDownloader sharedDownloader]; + _failedURLs = [NSMutableSet new]; + _runningOperations = [NSMutableArray new]; + } + return self; +} + +- (SDImageCache *)createCache { + return [SDImageCache sharedImageCache]; +} + +- (NSString *)cacheKeyForURL:(NSURL *)url { + if (self.cacheKeyFilter) { + return self.cacheKeyFilter(url); + } + else { + return [url absoluteString]; + } +} + +- (BOOL)cachedImageExistsForURL:(NSURL *)url { + NSString *key = [self cacheKeyForURL:url]; + if ([self.imageCache imageFromMemoryCacheForKey:key] != nil) return YES; + return [self.imageCache diskImageExistsWithKey:key]; +} + +- (BOOL)diskImageExistsForURL:(NSURL *)url { + NSString *key = [self cacheKeyForURL:url]; + return [self.imageCache diskImageExistsWithKey:key]; +} + +- (void)cachedImageExistsForURL:(NSURL *)url + completion:(SDWebImageCheckCacheCompletionBlock)completionBlock { + NSString *key = [self cacheKeyForURL:url]; + + BOOL isInMemoryCache = ([self.imageCache imageFromMemoryCacheForKey:key] != nil); + + if (isInMemoryCache) { + // making sure we call the completion block on the main queue + dispatch_async(dispatch_get_main_queue(), ^{ + if (completionBlock) { + completionBlock(YES); + } + }); + return; + } + + [self.imageCache diskImageExistsWithKey:key completion:^(BOOL isInDiskCache) { + // the completion block of checkDiskCacheForImageWithKey:completion: is always called on the main queue, no need to further dispatch + if (completionBlock) { + completionBlock(isInDiskCache); + } + }]; +} + +- (void)diskImageExistsForURL:(NSURL *)url + completion:(SDWebImageCheckCacheCompletionBlock)completionBlock { + NSString *key = [self cacheKeyForURL:url]; + + [self.imageCache diskImageExistsWithKey:key completion:^(BOOL isInDiskCache) { + // the completion block of checkDiskCacheForImageWithKey:completion: is always called on the main queue, no need to further dispatch + if (completionBlock) { + completionBlock(isInDiskCache); + } + }]; +} + +- (id )downloadImageWithURL:(NSURL *)url + options:(SDWebImageOptions)options + progress:(SDWebImageDownloaderProgressBlock)progressBlock + completed:(SDWebImageCompletionWithFinishedBlock)completedBlock { + // Invoking this method without a completedBlock is pointless + NSAssert(completedBlock != nil, @"If you mean to prefetch the image, use -[SDWebImagePrefetcher prefetchURLs] instead"); + + // Very common mistake is to send the URL using NSString object instead of NSURL. For some strange reason, XCode won't + // throw any warning for this type mismatch. Here we failsafe this error by allowing URLs to be passed as NSString. + if ([url isKindOfClass:NSString.class]) { + url = [NSURL URLWithString:(NSString *)url]; + } + + // Prevents app crashing on argument type error like sending NSNull instead of NSURL + if (![url isKindOfClass:NSURL.class]) { + url = nil; + } + + __block SDWebImageCombinedOperation *operation = [SDWebImageCombinedOperation new]; + __weak SDWebImageCombinedOperation *weakOperation = operation; + + BOOL isFailedUrl = NO; + @synchronized (self.failedURLs) { + isFailedUrl = [self.failedURLs containsObject:url]; + } + + if (!url || (!(options & SDWebImageRetryFailed) && isFailedUrl)) { + dispatch_main_sync_safe(^{ + NSError *error = [NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorFileDoesNotExist userInfo:nil]; + completedBlock(nil, error, SDImageCacheTypeNone, YES, url); + }); + return operation; + } + + @synchronized (self.runningOperations) { + [self.runningOperations addObject:operation]; + } + NSString *key = [self cacheKeyForURL:url]; + + operation.cacheOperation = [self.imageCache queryDiskCacheForKey:key done:^(UIImage *image, SDImageCacheType cacheType) { + if (operation.isCancelled) { + @synchronized (self.runningOperations) { + [self.runningOperations removeObject:operation]; + } + + return; + } + + if ((!image || options & SDWebImageRefreshCached) && (![self.delegate respondsToSelector:@selector(imageManager:shouldDownloadImageForURL:)] || [self.delegate imageManager:self shouldDownloadImageForURL:url])) { + if (image && options & SDWebImageRefreshCached) { + dispatch_main_sync_safe(^{ + // If image was found in the cache bug SDWebImageRefreshCached is provided, notify about the cached image + // AND try to re-download it in order to let a chance to NSURLCache to refresh it from server. + completedBlock(image, nil, cacheType, YES, url); + }); + } + + // download if no image or requested to refresh anyway, and download allowed by delegate + SDWebImageDownloaderOptions downloaderOptions = 0; + if (options & SDWebImageLowPriority) downloaderOptions |= SDWebImageDownloaderLowPriority; + if (options & SDWebImageProgressiveDownload) downloaderOptions |= SDWebImageDownloaderProgressiveDownload; + if (options & SDWebImageRefreshCached) downloaderOptions |= SDWebImageDownloaderUseNSURLCache; + if (options & SDWebImageContinueInBackground) downloaderOptions |= SDWebImageDownloaderContinueInBackground; + if (options & SDWebImageHandleCookies) downloaderOptions |= SDWebImageDownloaderHandleCookies; + if (options & SDWebImageAllowInvalidSSLCertificates) downloaderOptions |= SDWebImageDownloaderAllowInvalidSSLCertificates; + if (options & SDWebImageHighPriority) downloaderOptions |= SDWebImageDownloaderHighPriority; + if (image && options & SDWebImageRefreshCached) { + // force progressive off if image already cached but forced refreshing + downloaderOptions &= ~SDWebImageDownloaderProgressiveDownload; + // ignore image read from NSURLCache if image if cached but force refreshing + downloaderOptions |= SDWebImageDownloaderIgnoreCachedResponse; + } + id subOperation = [self.imageDownloader downloadImageWithURL:url options:downloaderOptions progress:progressBlock completed:^(UIImage *downloadedImage, NSData *data, NSError *error, BOOL finished) { + if (weakOperation.isCancelled) { + // Do nothing if the operation was cancelled + // See #699 for more details + // if we would call the completedBlock, there could be a race condition between this block and another completedBlock for the same object, so if this one is called second, we will overwrite the new data + } + else if (error) { + dispatch_main_sync_safe(^{ + if (!weakOperation.isCancelled) { + completedBlock(nil, error, SDImageCacheTypeNone, finished, url); + } + }); + + BOOL shouldBeFailedURLAlliOSVersion = (error.code != NSURLErrorNotConnectedToInternet && error.code != NSURLErrorCancelled && error.code != NSURLErrorTimedOut); + BOOL shouldBeFailedURLiOS7 = (NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_6_1 && error.code != NSURLErrorInternationalRoamingOff && error.code != NSURLErrorCallIsActive && error.code != NSURLErrorDataNotAllowed); + if (shouldBeFailedURLAlliOSVersion || shouldBeFailedURLiOS7) { + @synchronized (self.failedURLs) { + [self.failedURLs addObject:url]; + } + } + } + else { + if ((options & SDWebImageRetryFailed)) { + @synchronized (self.failedURLs) { + [self.failedURLs removeObject:url]; + } + } + + BOOL cacheOnDisk = !(options & SDWebImageCacheMemoryOnly); + + if (options & SDWebImageRefreshCached && image && !downloadedImage) { + // Image refresh hit the NSURLCache cache, do not call the completion block + } + else if (downloadedImage && (!downloadedImage.images || (options & SDWebImageTransformAnimatedImage)) && [self.delegate respondsToSelector:@selector(imageManager:transformDownloadedImage:withURL:)]) { + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{ + UIImage *transformedImage = [self.delegate imageManager:self transformDownloadedImage:downloadedImage withURL:url]; + + if (transformedImage && finished) { + BOOL imageWasTransformed = ![transformedImage isEqual:downloadedImage]; + [self.imageCache storeImage:transformedImage recalculateFromImage:imageWasTransformed imageData:(imageWasTransformed ? nil : data) forKey:key toDisk:cacheOnDisk]; + } + + dispatch_main_sync_safe(^{ + if (!weakOperation.isCancelled) { + completedBlock(transformedImage, nil, SDImageCacheTypeNone, finished, url); + } + }); + }); + } + else { + if (downloadedImage && finished) { + [self.imageCache storeImage:downloadedImage recalculateFromImage:NO imageData:data forKey:key toDisk:cacheOnDisk]; + } + + dispatch_main_sync_safe(^{ + if (!weakOperation.isCancelled) { + completedBlock(downloadedImage, nil, SDImageCacheTypeNone, finished, url); + } + }); + } + } + + if (finished) { + @synchronized (self.runningOperations) { + [self.runningOperations removeObject:operation]; + } + } + }]; + operation.cancelBlock = ^{ + [subOperation cancel]; + + @synchronized (self.runningOperations) { + [self.runningOperations removeObject:weakOperation]; + } + }; + } + else if (image) { + dispatch_main_sync_safe(^{ + if (!weakOperation.isCancelled) { + completedBlock(image, nil, cacheType, YES, url); + } + }); + @synchronized (self.runningOperations) { + [self.runningOperations removeObject:operation]; + } + } + else { + // Image not in cache and download disallowed by delegate + dispatch_main_sync_safe(^{ + if (!weakOperation.isCancelled) { + completedBlock(nil, nil, SDImageCacheTypeNone, YES, url); + } + }); + @synchronized (self.runningOperations) { + [self.runningOperations removeObject:operation]; + } + } + }]; + + return operation; +} + +- (void)saveImageToCache:(UIImage *)image forURL:(NSURL *)url { + if (image && url) { + NSString *key = [self cacheKeyForURL:url]; + [self.imageCache storeImage:image forKey:key toDisk:YES]; + } +} + +- (void)cancelAll { + @synchronized (self.runningOperations) { + NSArray *copiedOperations = [self.runningOperations copy]; + [copiedOperations makeObjectsPerformSelector:@selector(cancel)]; + [self.runningOperations removeObjectsInArray:copiedOperations]; + } +} + +- (BOOL)isRunning { + return self.runningOperations.count > 0; +} + +@end + + +@implementation SDWebImageCombinedOperation + +- (void)setCancelBlock:(SDWebImageNoParamsBlock)cancelBlock { + // check if the operation is already cancelled, then we just call the cancelBlock + if (self.isCancelled) { + if (cancelBlock) { + cancelBlock(); + } + _cancelBlock = nil; // don't forget to nil the cancelBlock, otherwise we will get crashes + } else { + _cancelBlock = [cancelBlock copy]; + } +} + +- (void)cancel { + self.cancelled = YES; + if (self.cacheOperation) { + [self.cacheOperation cancel]; + self.cacheOperation = nil; + } + if (self.cancelBlock) { + self.cancelBlock(); + + // TODO: this is a temporary fix to #809. + // Until we can figure the exact cause of the crash, going with the ivar instead of the setter +// self.cancelBlock = nil; + _cancelBlock = nil; + } +} + +@end + + +@implementation SDWebImageManager (Deprecated) + +// deprecated method, uses the non deprecated method +// adapter for the completion block +- (id )downloadWithURL:(NSURL *)url options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletedWithFinishedBlock)completedBlock { + return [self downloadImageWithURL:url + options:options + progress:progressBlock + completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) { + if (completedBlock) { + completedBlock(image, error, cacheType, finished); + } + }]; +} + +@end diff --git a/Pods/SDWebImage/SDWebImage/SDWebImageOperation.h b/Pods/SDWebImage/SDWebImage/SDWebImageOperation.h new file mode 100644 index 0000000..71094ee --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/SDWebImageOperation.h @@ -0,0 +1,15 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import + +@protocol SDWebImageOperation + +- (void)cancel; + +@end diff --git a/Pods/SDWebImage/SDWebImage/SDWebImagePrefetcher.h b/Pods/SDWebImage/SDWebImage/SDWebImagePrefetcher.h new file mode 100644 index 0000000..7bb67ac --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/SDWebImagePrefetcher.h @@ -0,0 +1,103 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import +#import "SDWebImageManager.h" + +@class SDWebImagePrefetcher; + +@protocol SDWebImagePrefetcherDelegate + +@optional + +/** + * Called when an image was prefetched. + * + * @param imagePrefetcher The current image prefetcher + * @param imageURL The image url that was prefetched + * @param finishedCount The total number of images that were prefetched (successful or not) + * @param totalCount The total number of images that were to be prefetched + */ +- (void)imagePrefetcher:(SDWebImagePrefetcher *)imagePrefetcher didPrefetchURL:(NSURL *)imageURL finishedCount:(NSUInteger)finishedCount totalCount:(NSUInteger)totalCount; + +/** + * Called when all images are prefetched. + * @param imagePrefetcher The current image prefetcher + * @param totalCount The total number of images that were prefetched (whether successful or not) + * @param skippedCount The total number of images that were skipped + */ +- (void)imagePrefetcher:(SDWebImagePrefetcher *)imagePrefetcher didFinishWithTotalCount:(NSUInteger)totalCount skippedCount:(NSUInteger)skippedCount; + +@end + +typedef void(^SDWebImagePrefetcherProgressBlock)(NSUInteger noOfFinishedUrls, NSUInteger noOfTotalUrls); +typedef void(^SDWebImagePrefetcherCompletionBlock)(NSUInteger noOfFinishedUrls, NSUInteger noOfSkippedUrls); + +/** + * Prefetch some URLs in the cache for future use. Images are downloaded in low priority. + */ +@interface SDWebImagePrefetcher : NSObject + +/** + * The web image manager + */ +@property (strong, nonatomic, readonly) SDWebImageManager *manager; + +/** + * Maximum number of URLs to prefetch at the same time. Defaults to 3. + */ +@property (nonatomic, assign) NSUInteger maxConcurrentDownloads; + +/** + * SDWebImageOptions for prefetcher. Defaults to SDWebImageLowPriority. + */ +@property (nonatomic, assign) SDWebImageOptions options; + +/** + * Queue options for Prefetcher. Defaults to Main Queue. + */ +@property (nonatomic, assign) dispatch_queue_t prefetcherQueue; + +@property (weak, nonatomic) id delegate; + +/** + * Return the global image prefetcher instance. + */ ++ (SDWebImagePrefetcher *)sharedImagePrefetcher; + +/** + * Assign list of URLs to let SDWebImagePrefetcher to queue the prefetching, + * currently one image is downloaded at a time, + * and skips images for failed downloads and proceed to the next image in the list + * + * @param urls list of URLs to prefetch + */ +- (void)prefetchURLs:(NSArray *)urls; + +/** + * Assign list of URLs to let SDWebImagePrefetcher to queue the prefetching, + * currently one image is downloaded at a time, + * and skips images for failed downloads and proceed to the next image in the list + * + * @param urls list of URLs to prefetch + * @param progressBlock block to be called when progress updates; + * first parameter is the number of completed (successful or not) requests, + * second parameter is the total number of images originally requested to be prefetched + * @param completionBlock block to be called when prefetching is completed + * first param is the number of completed (successful or not) requests, + * second parameter is the number of skipped requests + */ +- (void)prefetchURLs:(NSArray *)urls progress:(SDWebImagePrefetcherProgressBlock)progressBlock completed:(SDWebImagePrefetcherCompletionBlock)completionBlock; + +/** + * Remove and cancel queued list + */ +- (void)cancelPrefetching; + + +@end diff --git a/Pods/SDWebImage/SDWebImage/SDWebImagePrefetcher.m b/Pods/SDWebImage/SDWebImage/SDWebImagePrefetcher.m new file mode 100644 index 0000000..8756bd0 --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/SDWebImagePrefetcher.m @@ -0,0 +1,145 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import "SDWebImagePrefetcher.h" + +#if (!defined(DEBUG) && !defined (SD_VERBOSE)) || defined(SD_LOG_NONE) +#define NSLog(...) +#endif + +@interface SDWebImagePrefetcher () + +@property (strong, nonatomic) SDWebImageManager *manager; +@property (strong, nonatomic) NSArray *prefetchURLs; +@property (assign, nonatomic) NSUInteger requestedCount; +@property (assign, nonatomic) NSUInteger skippedCount; +@property (assign, nonatomic) NSUInteger finishedCount; +@property (assign, nonatomic) NSTimeInterval startedTime; +@property (copy, nonatomic) SDWebImagePrefetcherCompletionBlock completionBlock; +@property (copy, nonatomic) SDWebImagePrefetcherProgressBlock progressBlock; + +@end + +@implementation SDWebImagePrefetcher + ++ (SDWebImagePrefetcher *)sharedImagePrefetcher { + static dispatch_once_t once; + static id instance; + dispatch_once(&once, ^{ + instance = [self new]; + }); + return instance; +} + +- (id)init { + if ((self = [super init])) { + _manager = [SDWebImageManager new]; + _options = SDWebImageLowPriority; + _prefetcherQueue = dispatch_get_main_queue(); + self.maxConcurrentDownloads = 3; + } + return self; +} + +- (void)setMaxConcurrentDownloads:(NSUInteger)maxConcurrentDownloads { + self.manager.imageDownloader.maxConcurrentDownloads = maxConcurrentDownloads; +} + +- (NSUInteger)maxConcurrentDownloads { + return self.manager.imageDownloader.maxConcurrentDownloads; +} + +- (void)startPrefetchingAtIndex:(NSUInteger)index { + if (index >= self.prefetchURLs.count) return; + self.requestedCount++; + [self.manager downloadImageWithURL:self.prefetchURLs[index] options:self.options progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) { + if (!finished) return; + self.finishedCount++; + + if (image) { + if (self.progressBlock) { + self.progressBlock(self.finishedCount,[self.prefetchURLs count]); + } + NSLog(@"Prefetched %@ out of %@", @(self.finishedCount), @(self.prefetchURLs.count)); + } + else { + if (self.progressBlock) { + self.progressBlock(self.finishedCount,[self.prefetchURLs count]); + } + NSLog(@"Prefetched %@ out of %@ (Failed)", @(self.finishedCount), @(self.prefetchURLs.count)); + + // Add last failed + self.skippedCount++; + } + if ([self.delegate respondsToSelector:@selector(imagePrefetcher:didPrefetchURL:finishedCount:totalCount:)]) { + [self.delegate imagePrefetcher:self + didPrefetchURL:self.prefetchURLs[index] + finishedCount:self.finishedCount + totalCount:self.prefetchURLs.count + ]; + } + if (self.prefetchURLs.count > self.requestedCount) { + dispatch_async(self.prefetcherQueue, ^{ + [self startPrefetchingAtIndex:self.requestedCount]; + }); + } + else if (self.finishedCount == self.requestedCount) { + [self reportStatus]; + if (self.completionBlock) { + self.completionBlock(self.finishedCount, self.skippedCount); + self.completionBlock = nil; + } + self.progressBlock = nil; + } + }]; +} + +- (void)reportStatus { + NSUInteger total = [self.prefetchURLs count]; + NSLog(@"Finished prefetching (%@ successful, %@ skipped, timeElasped %.2f)", @(total - self.skippedCount), @(self.skippedCount), CFAbsoluteTimeGetCurrent() - self.startedTime); + if ([self.delegate respondsToSelector:@selector(imagePrefetcher:didFinishWithTotalCount:skippedCount:)]) { + [self.delegate imagePrefetcher:self + didFinishWithTotalCount:(total - self.skippedCount) + skippedCount:self.skippedCount + ]; + } +} + +- (void)prefetchURLs:(NSArray *)urls { + [self prefetchURLs:urls progress:nil completed:nil]; +} + +- (void)prefetchURLs:(NSArray *)urls progress:(SDWebImagePrefetcherProgressBlock)progressBlock completed:(SDWebImagePrefetcherCompletionBlock)completionBlock { + [self cancelPrefetching]; // Prevent duplicate prefetch request + self.startedTime = CFAbsoluteTimeGetCurrent(); + self.prefetchURLs = urls; + self.completionBlock = completionBlock; + self.progressBlock = progressBlock; + + if(urls.count == 0){ + if(completionBlock){ + completionBlock(0,0); + } + }else{ + // Starts prefetching from the very first image on the list with the max allowed concurrency + NSUInteger listCount = self.prefetchURLs.count; + for (NSUInteger i = 0; i < self.maxConcurrentDownloads && self.requestedCount < listCount; i++) { + [self startPrefetchingAtIndex:i]; + } + } +} + +- (void)cancelPrefetching { + self.prefetchURLs = nil; + self.skippedCount = 0; + self.requestedCount = 0; + self.finishedCount = 0; + [self.manager cancelAll]; +} + +@end diff --git a/Pods/SDWebImage/SDWebImage/UIButton+WebCache.h b/Pods/SDWebImage/SDWebImage/UIButton+WebCache.h new file mode 100644 index 0000000..48ad0d5 --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/UIButton+WebCache.h @@ -0,0 +1,229 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import "SDWebImageCompat.h" +#import "SDWebImageManager.h" + +/** + * Integrates SDWebImage async downloading and caching of remote images with UIButtonView. + */ +@interface UIButton (WebCache) + +/** + * Get the current image URL. + */ +- (NSURL *)sd_currentImageURL; + +/** + * Get the image URL for a control state. + * + * @param state Which state you want to know the URL for. The values are described in UIControlState. + */ +- (NSURL *)sd_imageURLForState:(UIControlState)state; + +/** + * Set the imageView `image` with an `url`. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param state The state that uses the specified title. The values are described in UIControlState. + */ +- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state; + +/** + * Set the imageView `image` with an `url` and a placeholder. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param state The state that uses the specified title. The values are described in UIControlState. + * @param placeholder The image to be set initially, until the image request finishes. + * @see sd_setImageWithURL:placeholderImage:options: + */ +- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder; + +/** + * Set the imageView `image` with an `url`, placeholder and custom options. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param state The state that uses the specified title. The values are described in UIControlState. + * @param placeholder The image to be set initially, until the image request finishes. + * @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values. + */ +- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options; + +/** + * Set the imageView `image` with an `url`. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param state The state that uses the specified title. The values are described in UIControlState. + * @param completedBlock A block called when operation has been completed. This block has no return value + * and takes the requested UIImage as first parameter. In case of error the image parameter + * is nil and the second parameter may contain an NSError. The third parameter is a Boolean + * indicating if the image was retrived from the local cache or from the network. + * The fourth parameter is the original image url. + */ +- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state completed:(SDWebImageCompletionBlock)completedBlock; + +/** + * Set the imageView `image` with an `url`, placeholder. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param state The state that uses the specified title. The values are described in UIControlState. + * @param placeholder The image to be set initially, until the image request finishes. + * @param completedBlock A block called when operation has been completed. This block has no return value + * and takes the requested UIImage as first parameter. In case of error the image parameter + * is nil and the second parameter may contain an NSError. The third parameter is a Boolean + * indicating if the image was retrived from the local cache or from the network. + * The fourth parameter is the original image url. + */ +- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletionBlock)completedBlock; + +/** + * Set the imageView `image` with an `url`, placeholder and custom options. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param state The state that uses the specified title. The values are described in UIControlState. + * @param placeholder The image to be set initially, until the image request finishes. + * @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values. + * @param completedBlock A block called when operation has been completed. This block has no return value + * and takes the requested UIImage as first parameter. In case of error the image parameter + * is nil and the second parameter may contain an NSError. The third parameter is a Boolean + * indicating if the image was retrived from the local cache or from the network. + * The fourth parameter is the original image url. + */ +- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletionBlock)completedBlock; + +/** + * Set the backgroundImageView `image` with an `url`. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param state The state that uses the specified title. The values are described in UIControlState. + */ +- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state; + +/** + * Set the backgroundImageView `image` with an `url` and a placeholder. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param state The state that uses the specified title. The values are described in UIControlState. + * @param placeholder The image to be set initially, until the image request finishes. + * @see sd_setImageWithURL:placeholderImage:options: + */ +- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder; + +/** + * Set the backgroundImageView `image` with an `url`, placeholder and custom options. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param state The state that uses the specified title. The values are described in UIControlState. + * @param placeholder The image to be set initially, until the image request finishes. + * @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values. + */ +- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options; + +/** + * Set the backgroundImageView `image` with an `url`. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param state The state that uses the specified title. The values are described in UIControlState. + * @param completedBlock A block called when operation has been completed. This block has no return value + * and takes the requested UIImage as first parameter. In case of error the image parameter + * is nil and the second parameter may contain an NSError. The third parameter is a Boolean + * indicating if the image was retrived from the local cache or from the network. + * The fourth parameter is the original image url. + */ +- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state completed:(SDWebImageCompletionBlock)completedBlock; + +/** + * Set the backgroundImageView `image` with an `url`, placeholder. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param state The state that uses the specified title. The values are described in UIControlState. + * @param placeholder The image to be set initially, until the image request finishes. + * @param completedBlock A block called when operation has been completed. This block has no return value + * and takes the requested UIImage as first parameter. In case of error the image parameter + * is nil and the second parameter may contain an NSError. The third parameter is a Boolean + * indicating if the image was retrived from the local cache or from the network. + * The fourth parameter is the original image url. + */ +- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletionBlock)completedBlock; + +/** + * Set the backgroundImageView `image` with an `url`, placeholder and custom options. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param placeholder The image to be set initially, until the image request finishes. + * @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values. + * @param completedBlock A block called when operation has been completed. This block has no return value + * and takes the requested UIImage as first parameter. In case of error the image parameter + * is nil and the second parameter may contain an NSError. The third parameter is a Boolean + * indicating if the image was retrived from the local cache or from the network. + * The fourth parameter is the original image url. + */ +- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletionBlock)completedBlock; + +/** + * Cancel the current image download + */ +- (void)sd_cancelImageLoadForState:(UIControlState)state; + +/** + * Cancel the current backgroundImage download + */ +- (void)sd_cancelBackgroundImageLoadForState:(UIControlState)state; + +@end + + +@interface UIButton (WebCacheDeprecated) + +- (NSURL *)currentImageURL __deprecated_msg("Use `sd_currentImageURL`"); +- (NSURL *)imageURLForState:(UIControlState)state __deprecated_msg("Use `sd_imageURLForState:`"); + +- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state __deprecated_msg("Method deprecated. Use `sd_setImageWithURL:forState:`"); +- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder __deprecated_msg("Method deprecated. Use `sd_setImageWithURL:forState:placeholderImage:`"); +- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options __deprecated_msg("Method deprecated. Use `sd_setImageWithURL:forState:placeholderImage:options:`"); + +- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state completed:(SDWebImageCompletedBlock)completedBlock __deprecated_msg("Method deprecated. Use `sd_setImageWithURL:forState:completed:`"); +- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletedBlock)completedBlock __deprecated_msg("Method deprecated. Use `sd_setImageWithURL:forState:placeholderImage:completed:`"); +- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock __deprecated_msg("Method deprecated. Use `sd_setImageWithURL:forState:placeholderImage:options:completed:`"); + +- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state __deprecated_msg("Method deprecated. Use `sd_setBackgroundImageWithURL:forState:`"); +- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder __deprecated_msg("Method deprecated. Use `sd_setBackgroundImageWithURL:forState:placeholderImage:`"); +- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options __deprecated_msg("Method deprecated. Use `sd_setBackgroundImageWithURL:forState:placeholderImage:options:`"); + +- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state completed:(SDWebImageCompletedBlock)completedBlock __deprecated_msg("Method deprecated. Use `sd_setBackgroundImageWithURL:forState:completed:`"); +- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletedBlock)completedBlock __deprecated_msg("Method deprecated. Use `sd_setBackgroundImageWithURL:forState:placeholderImage:completed:`"); +- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock __deprecated_msg("Method deprecated. Use `sd_setBackgroundImageWithURL:forState:placeholderImage:options:completed:`"); + +- (void)cancelCurrentImageLoad __deprecated_msg("Use `sd_cancelImageLoadForState:`"); +- (void)cancelBackgroundImageLoadForState:(UIControlState)state __deprecated_msg("Use `sd_cancelBackgroundImageLoadForState:`"); + +@end diff --git a/Pods/SDWebImage/SDWebImage/UIButton+WebCache.m b/Pods/SDWebImage/SDWebImage/UIButton+WebCache.m new file mode 100644 index 0000000..33f7c29 --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/UIButton+WebCache.m @@ -0,0 +1,260 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import "UIButton+WebCache.h" +#import "objc/runtime.h" +#import "UIView+WebCacheOperation.h" + +static char imageURLStorageKey; + +@implementation UIButton (WebCache) + +- (NSURL *)sd_currentImageURL { + NSURL *url = self.imageURLStorage[@(self.state)]; + + if (!url) { + url = self.imageURLStorage[@(UIControlStateNormal)]; + } + + return url; +} + +- (NSURL *)sd_imageURLForState:(UIControlState)state { + return self.imageURLStorage[@(state)]; +} + +- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state { + [self sd_setImageWithURL:url forState:state placeholderImage:nil options:0 completed:nil]; +} + +- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder { + [self sd_setImageWithURL:url forState:state placeholderImage:placeholder options:0 completed:nil]; +} + +- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options { + [self sd_setImageWithURL:url forState:state placeholderImage:placeholder options:options completed:nil]; +} + +- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state completed:(SDWebImageCompletionBlock)completedBlock { + [self sd_setImageWithURL:url forState:state placeholderImage:nil options:0 completed:completedBlock]; +} + +- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletionBlock)completedBlock { + [self sd_setImageWithURL:url forState:state placeholderImage:placeholder options:0 completed:completedBlock]; +} + +- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletionBlock)completedBlock { + + [self setImage:placeholder forState:state]; + [self sd_cancelImageLoadForState:state]; + + if (!url) { + [self.imageURLStorage removeObjectForKey:@(state)]; + + dispatch_main_async_safe(^{ + NSError *error = [NSError errorWithDomain:SDWebImageErrorDomain code:-1 userInfo:@{NSLocalizedDescriptionKey : @"Trying to load a nil url"}]; + if (completedBlock) { + completedBlock(nil, error, SDImageCacheTypeNone, url); + } + }); + + return; + } + + self.imageURLStorage[@(state)] = url; + + __weak __typeof(self)wself = self; + id operation = [SDWebImageManager.sharedManager downloadImageWithURL:url options:options progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) { + if (!wself) return; + dispatch_main_sync_safe(^{ + __strong UIButton *sself = wself; + if (!sself) return; + if (image) { + [sself setImage:image forState:state]; + } + if (completedBlock && finished) { + completedBlock(image, error, cacheType, url); + } + }); + }]; + [self sd_setImageLoadOperation:operation forState:state]; +} + +- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state { + [self sd_setBackgroundImageWithURL:url forState:state placeholderImage:nil options:0 completed:nil]; +} + +- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder { + [self sd_setBackgroundImageWithURL:url forState:state placeholderImage:placeholder options:0 completed:nil]; +} + +- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options { + [self sd_setBackgroundImageWithURL:url forState:state placeholderImage:placeholder options:options completed:nil]; +} + +- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state completed:(SDWebImageCompletionBlock)completedBlock { + [self sd_setBackgroundImageWithURL:url forState:state placeholderImage:nil options:0 completed:completedBlock]; +} + +- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletionBlock)completedBlock { + [self sd_setBackgroundImageWithURL:url forState:state placeholderImage:placeholder options:0 completed:completedBlock]; +} + +- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletionBlock)completedBlock { + [self sd_cancelImageLoadForState:state]; + + [self setBackgroundImage:placeholder forState:state]; + + if (url) { + __weak __typeof(self)wself = self; + id operation = [SDWebImageManager.sharedManager downloadImageWithURL:url options:options progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) { + if (!wself) return; + dispatch_main_sync_safe(^{ + __strong UIButton *sself = wself; + if (!sself) return; + if (image) { + [sself setBackgroundImage:image forState:state]; + } + if (completedBlock && finished) { + completedBlock(image, error, cacheType, url); + } + }); + }]; + [self sd_setBackgroundImageLoadOperation:operation forState:state]; + } else { + dispatch_main_async_safe(^{ + NSError *error = [NSError errorWithDomain:SDWebImageErrorDomain code:-1 userInfo:@{NSLocalizedDescriptionKey : @"Trying to load a nil url"}]; + if (completedBlock) { + completedBlock(nil, error, SDImageCacheTypeNone, url); + } + }); + } +} + +- (void)sd_setImageLoadOperation:(id)operation forState:(UIControlState)state { + [self sd_setImageLoadOperation:operation forKey:[NSString stringWithFormat:@"UIButtonImageOperation%@", @(state)]]; +} + +- (void)sd_cancelImageLoadForState:(UIControlState)state { + [self sd_cancelImageLoadOperationWithKey:[NSString stringWithFormat:@"UIButtonImageOperation%@", @(state)]]; +} + +- (void)sd_setBackgroundImageLoadOperation:(id)operation forState:(UIControlState)state { + [self sd_setImageLoadOperation:operation forKey:[NSString stringWithFormat:@"UIButtonBackgroundImageOperation%@", @(state)]]; +} + +- (void)sd_cancelBackgroundImageLoadForState:(UIControlState)state { + [self sd_cancelImageLoadOperationWithKey:[NSString stringWithFormat:@"UIButtonBackgroundImageOperation%@", @(state)]]; +} + +- (NSMutableDictionary *)imageURLStorage { + NSMutableDictionary *storage = objc_getAssociatedObject(self, &imageURLStorageKey); + if (!storage) + { + storage = [NSMutableDictionary dictionary]; + objc_setAssociatedObject(self, &imageURLStorageKey, storage, OBJC_ASSOCIATION_RETAIN_NONATOMIC); + } + + return storage; +} + +@end + + +@implementation UIButton (WebCacheDeprecated) + +- (NSURL *)currentImageURL { + return [self sd_currentImageURL]; +} + +- (NSURL *)imageURLForState:(UIControlState)state { + return [self sd_imageURLForState:state]; +} + +- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state { + [self sd_setImageWithURL:url forState:state placeholderImage:nil options:0 completed:nil]; +} + +- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder { + [self sd_setImageWithURL:url forState:state placeholderImage:placeholder options:0 completed:nil]; +} + +- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options { + [self sd_setImageWithURL:url forState:state placeholderImage:placeholder options:options completed:nil]; +} + +- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state completed:(SDWebImageCompletedBlock)completedBlock { + [self sd_setImageWithURL:url forState:state placeholderImage:nil options:0 completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { + if (completedBlock) { + completedBlock(image, error, cacheType); + } + }]; +} + +- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletedBlock)completedBlock { + [self sd_setImageWithURL:url forState:state placeholderImage:placeholder options:0 completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { + if (completedBlock) { + completedBlock(image, error, cacheType); + } + }]; +} + +- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock { + [self sd_setImageWithURL:url forState:state placeholderImage:placeholder options:options completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { + if (completedBlock) { + completedBlock(image, error, cacheType); + } + }]; +} + +- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state { + [self sd_setBackgroundImageWithURL:url forState:state placeholderImage:nil options:0 completed:nil]; +} + +- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder { + [self sd_setBackgroundImageWithURL:url forState:state placeholderImage:placeholder options:0 completed:nil]; +} + +- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options { + [self sd_setBackgroundImageWithURL:url forState:state placeholderImage:placeholder options:options completed:nil]; +} + +- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state completed:(SDWebImageCompletedBlock)completedBlock { + [self sd_setBackgroundImageWithURL:url forState:state placeholderImage:nil options:0 completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { + if (completedBlock) { + completedBlock(image, error, cacheType); + } + }]; +} + +- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletedBlock)completedBlock { + [self sd_setBackgroundImageWithURL:url forState:state placeholderImage:placeholder options:0 completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { + if (completedBlock) { + completedBlock(image, error, cacheType); + } + }]; +} + +- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock { + [self sd_setBackgroundImageWithURL:url forState:state placeholderImage:placeholder options:options completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { + if (completedBlock) { + completedBlock(image, error, cacheType); + } + }]; +} + +- (void)cancelCurrentImageLoad { + // in a backwards compatible manner, cancel for current state + [self sd_cancelImageLoadForState:self.state]; +} + +- (void)cancelBackgroundImageLoadForState:(UIControlState)state { + [self sd_cancelBackgroundImageLoadForState:state]; +} + +@end diff --git a/Pods/SDWebImage/SDWebImage/UIImage+GIF.h b/Pods/SDWebImage/SDWebImage/UIImage+GIF.h new file mode 100755 index 0000000..084f424 --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/UIImage+GIF.h @@ -0,0 +1,19 @@ +// +// UIImage+GIF.h +// LBGIFImage +// +// Created by Laurin Brandner on 06.01.12. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import + +@interface UIImage (GIF) + ++ (UIImage *)sd_animatedGIFNamed:(NSString *)name; + ++ (UIImage *)sd_animatedGIFWithData:(NSData *)data; + +- (UIImage *)sd_animatedImageByScalingAndCroppingToSize:(CGSize)size; + +@end diff --git a/Pods/SDWebImage/SDWebImage/UIImage+GIF.m b/Pods/SDWebImage/SDWebImage/UIImage+GIF.m new file mode 100755 index 0000000..a703637 --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/UIImage+GIF.m @@ -0,0 +1,158 @@ +// +// UIImage+GIF.m +// LBGIFImage +// +// Created by Laurin Brandner on 06.01.12. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import "UIImage+GIF.h" +#import + +@implementation UIImage (GIF) + ++ (UIImage *)sd_animatedGIFWithData:(NSData *)data { + if (!data) { + return nil; + } + + CGImageSourceRef source = CGImageSourceCreateWithData((__bridge CFDataRef)data, NULL); + + size_t count = CGImageSourceGetCount(source); + + UIImage *animatedImage; + + if (count <= 1) { + animatedImage = [[UIImage alloc] initWithData:data]; + } + else { + NSMutableArray *images = [NSMutableArray array]; + + NSTimeInterval duration = 0.0f; + + for (size_t i = 0; i < count; i++) { + CGImageRef image = CGImageSourceCreateImageAtIndex(source, i, NULL); + + duration += [self sd_frameDurationAtIndex:i source:source]; + + [images addObject:[UIImage imageWithCGImage:image scale:[UIScreen mainScreen].scale orientation:UIImageOrientationUp]]; + + CGImageRelease(image); + } + + if (!duration) { + duration = (1.0f / 10.0f) * count; + } + + animatedImage = [UIImage animatedImageWithImages:images duration:duration]; + } + + CFRelease(source); + + return animatedImage; +} + ++ (float)sd_frameDurationAtIndex:(NSUInteger)index source:(CGImageSourceRef)source { + float frameDuration = 0.1f; + CFDictionaryRef cfFrameProperties = CGImageSourceCopyPropertiesAtIndex(source, index, nil); + NSDictionary *frameProperties = (__bridge NSDictionary *)cfFrameProperties; + NSDictionary *gifProperties = frameProperties[(NSString *)kCGImagePropertyGIFDictionary]; + + NSNumber *delayTimeUnclampedProp = gifProperties[(NSString *)kCGImagePropertyGIFUnclampedDelayTime]; + if (delayTimeUnclampedProp) { + frameDuration = [delayTimeUnclampedProp floatValue]; + } + else { + + NSNumber *delayTimeProp = gifProperties[(NSString *)kCGImagePropertyGIFDelayTime]; + if (delayTimeProp) { + frameDuration = [delayTimeProp floatValue]; + } + } + + // Many annoying ads specify a 0 duration to make an image flash as quickly as possible. + // We follow Firefox's behavior and use a duration of 100 ms for any frames that specify + // a duration of <= 10 ms. See and + // for more information. + + if (frameDuration < 0.011f) { + frameDuration = 0.100f; + } + + CFRelease(cfFrameProperties); + return frameDuration; +} + ++ (UIImage *)sd_animatedGIFNamed:(NSString *)name { + CGFloat scale = [UIScreen mainScreen].scale; + + if (scale > 1.0f) { + NSString *retinaPath = [[NSBundle mainBundle] pathForResource:[name stringByAppendingString:@"@2x"] ofType:@"gif"]; + + NSData *data = [NSData dataWithContentsOfFile:retinaPath]; + + if (data) { + return [UIImage sd_animatedGIFWithData:data]; + } + + NSString *path = [[NSBundle mainBundle] pathForResource:name ofType:@"gif"]; + + data = [NSData dataWithContentsOfFile:path]; + + if (data) { + return [UIImage sd_animatedGIFWithData:data]; + } + + return [UIImage imageNamed:name]; + } + else { + NSString *path = [[NSBundle mainBundle] pathForResource:name ofType:@"gif"]; + + NSData *data = [NSData dataWithContentsOfFile:path]; + + if (data) { + return [UIImage sd_animatedGIFWithData:data]; + } + + return [UIImage imageNamed:name]; + } +} + +- (UIImage *)sd_animatedImageByScalingAndCroppingToSize:(CGSize)size { + if (CGSizeEqualToSize(self.size, size) || CGSizeEqualToSize(size, CGSizeZero)) { + return self; + } + + CGSize scaledSize = size; + CGPoint thumbnailPoint = CGPointZero; + + CGFloat widthFactor = size.width / self.size.width; + CGFloat heightFactor = size.height / self.size.height; + CGFloat scaleFactor = (widthFactor > heightFactor) ? widthFactor : heightFactor; + scaledSize.width = self.size.width * scaleFactor; + scaledSize.height = self.size.height * scaleFactor; + + if (widthFactor > heightFactor) { + thumbnailPoint.y = (size.height - scaledSize.height) * 0.5; + } + else if (widthFactor < heightFactor) { + thumbnailPoint.x = (size.width - scaledSize.width) * 0.5; + } + + NSMutableArray *scaledImages = [NSMutableArray array]; + + UIGraphicsBeginImageContextWithOptions(size, NO, 0.0); + + for (UIImage *image in self.images) { + [image drawInRect:CGRectMake(thumbnailPoint.x, thumbnailPoint.y, scaledSize.width, scaledSize.height)]; + UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext(); + + [scaledImages addObject:newImage]; + } + + UIGraphicsEndImageContext(); + + return [UIImage animatedImageWithImages:scaledImages duration:self.duration]; +} + +@end diff --git a/Pods/SDWebImage/SDWebImage/UIImage+MultiFormat.h b/Pods/SDWebImage/SDWebImage/UIImage+MultiFormat.h new file mode 100644 index 0000000..186ebc0 --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/UIImage+MultiFormat.h @@ -0,0 +1,15 @@ +// +// UIImage+MultiFormat.h +// SDWebImage +// +// Created by Olivier Poitrey on 07/06/13. +// Copyright (c) 2013 Dailymotion. All rights reserved. +// + +#import + +@interface UIImage (MultiFormat) + ++ (UIImage *)sd_imageWithData:(NSData *)data; + +@end diff --git a/Pods/SDWebImage/SDWebImage/UIImage+MultiFormat.m b/Pods/SDWebImage/SDWebImage/UIImage+MultiFormat.m new file mode 100644 index 0000000..a830754 --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/UIImage+MultiFormat.m @@ -0,0 +1,118 @@ +// +// UIImage+MultiFormat.m +// SDWebImage +// +// Created by Olivier Poitrey on 07/06/13. +// Copyright (c) 2013 Dailymotion. All rights reserved. +// + +#import "UIImage+MultiFormat.h" +#import "UIImage+GIF.h" +#import "NSData+ImageContentType.h" +#import + +#ifdef SD_WEBP +#import "UIImage+WebP.h" +#endif + +@implementation UIImage (MultiFormat) + ++ (UIImage *)sd_imageWithData:(NSData *)data { + if (!data) { + return nil; + } + + UIImage *image; + NSString *imageContentType = [NSData sd_contentTypeForImageData:data]; + if ([imageContentType isEqualToString:@"image/gif"]) { + image = [UIImage sd_animatedGIFWithData:data]; + } +#ifdef SD_WEBP + else if ([imageContentType isEqualToString:@"image/webp"]) + { + image = [UIImage sd_imageWithWebPData:data]; + } +#endif + else { + image = [[UIImage alloc] initWithData:data]; + UIImageOrientation orientation = [self sd_imageOrientationFromImageData:data]; + if (orientation != UIImageOrientationUp) { + image = [UIImage imageWithCGImage:image.CGImage + scale:image.scale + orientation:orientation]; + } + } + + + return image; +} + + ++(UIImageOrientation)sd_imageOrientationFromImageData:(NSData *)imageData { + UIImageOrientation result = UIImageOrientationUp; + CGImageSourceRef imageSource = CGImageSourceCreateWithData((__bridge CFDataRef)imageData, NULL); + if (imageSource) { + CFDictionaryRef properties = CGImageSourceCopyPropertiesAtIndex(imageSource, 0, NULL); + if (properties) { + CFTypeRef val; + int exifOrientation; + val = CFDictionaryGetValue(properties, kCGImagePropertyOrientation); + if (val) { + CFNumberGetValue(val, kCFNumberIntType, &exifOrientation); + result = [self sd_exifOrientationToiOSOrientation:exifOrientation]; + } // else - if it's not set it remains at up + CFRelease((CFTypeRef) properties); + } else { + //NSLog(@"NO PROPERTIES, FAIL"); + } + CFRelease(imageSource); + } + return result; +} + +#pragma mark EXIF orientation tag converter +// Convert an EXIF image orientation to an iOS one. +// reference see here: http://sylvana.net/jpegcrop/exif_orientation.html ++ (UIImageOrientation) sd_exifOrientationToiOSOrientation:(int)exifOrientation { + UIImageOrientation orientation = UIImageOrientationUp; + switch (exifOrientation) { + case 1: + orientation = UIImageOrientationUp; + break; + + case 3: + orientation = UIImageOrientationDown; + break; + + case 8: + orientation = UIImageOrientationLeft; + break; + + case 6: + orientation = UIImageOrientationRight; + break; + + case 2: + orientation = UIImageOrientationUpMirrored; + break; + + case 4: + orientation = UIImageOrientationDownMirrored; + break; + + case 5: + orientation = UIImageOrientationLeftMirrored; + break; + + case 7: + orientation = UIImageOrientationRightMirrored; + break; + default: + break; + } + return orientation; +} + + + +@end diff --git a/Pods/SDWebImage/SDWebImage/UIImageView+HighlightedWebCache.h b/Pods/SDWebImage/SDWebImage/UIImageView+HighlightedWebCache.h new file mode 100644 index 0000000..57f708f --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/UIImageView+HighlightedWebCache.h @@ -0,0 +1,100 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import +#import "SDWebImageCompat.h" +#import "SDWebImageManager.h" + +/** + * Integrates SDWebImage async downloading and caching of remote images with UIImageView for highlighted state. + */ +@interface UIImageView (HighlightedWebCache) + +/** + * Set the imageView `highlightedImage` with an `url`. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + */ +- (void)sd_setHighlightedImageWithURL:(NSURL *)url; + +/** + * Set the imageView `highlightedImage` with an `url` and custom options. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values. + */ +- (void)sd_setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options; + +/** + * Set the imageView `highlightedImage` with an `url`. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param completedBlock A block called when operation has been completed. This block has no return value + * and takes the requested UIImage as first parameter. In case of error the image parameter + * is nil and the second parameter may contain an NSError. The third parameter is a Boolean + * indicating if the image was retrived from the local cache or from the network. + * The fourth parameter is the original image url. + */ +- (void)sd_setHighlightedImageWithURL:(NSURL *)url completed:(SDWebImageCompletionBlock)completedBlock; + +/** + * Set the imageView `highlightedImage` with an `url` and custom options. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values. + * @param completedBlock A block called when operation has been completed. This block has no return value + * and takes the requested UIImage as first parameter. In case of error the image parameter + * is nil and the second parameter may contain an NSError. The third parameter is a Boolean + * indicating if the image was retrived from the local cache or from the network. + * The fourth parameter is the original image url. + */ +- (void)sd_setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options completed:(SDWebImageCompletionBlock)completedBlock; + +/** + * Set the imageView `highlightedImage` with an `url` and custom options. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values. + * @param progressBlock A block called while image is downloading + * @param completedBlock A block called when operation has been completed. This block has no return value + * and takes the requested UIImage as first parameter. In case of error the image parameter + * is nil and the second parameter may contain an NSError. The third parameter is a Boolean + * indicating if the image was retrived from the local cache or from the network. + * The fourth parameter is the original image url. + */ +- (void)sd_setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletionBlock)completedBlock; + +/** + * Cancel the current download + */ +- (void)sd_cancelCurrentHighlightedImageLoad; + +@end + + +@interface UIImageView (HighlightedWebCacheDeprecated) + +- (void)setHighlightedImageWithURL:(NSURL *)url __deprecated_msg("Method deprecated. Use `sd_setHighlightedImageWithURL:`"); +- (void)setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options __deprecated_msg("Method deprecated. Use `sd_setHighlightedImageWithURL:options:`"); +- (void)setHighlightedImageWithURL:(NSURL *)url completed:(SDWebImageCompletedBlock)completedBlock __deprecated_msg("Method deprecated. Use `sd_setHighlightedImageWithURL:completed:`"); +- (void)setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock __deprecated_msg("Method deprecated. Use `sd_setHighlightedImageWithURL:options:completed:`"); +- (void)setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletedBlock)completedBlock __deprecated_msg("Method deprecated. Use `sd_setHighlightedImageWithURL:options:progress:completed:`"); + +- (void)cancelCurrentHighlightedImageLoad __deprecated_msg("Use `sd_cancelCurrentHighlightedImageLoad`"); + +@end diff --git a/Pods/SDWebImage/SDWebImage/UIImageView+HighlightedWebCache.m b/Pods/SDWebImage/SDWebImage/UIImageView+HighlightedWebCache.m new file mode 100644 index 0000000..eed798f --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/UIImageView+HighlightedWebCache.m @@ -0,0 +1,107 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import "UIImageView+HighlightedWebCache.h" +#import "UIView+WebCacheOperation.h" + +#define UIImageViewHighlightedWebCacheOperationKey @"highlightedImage" + +@implementation UIImageView (HighlightedWebCache) + +- (void)sd_setHighlightedImageWithURL:(NSURL *)url { + [self sd_setHighlightedImageWithURL:url options:0 progress:nil completed:nil]; +} + +- (void)sd_setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options { + [self sd_setHighlightedImageWithURL:url options:options progress:nil completed:nil]; +} + +- (void)sd_setHighlightedImageWithURL:(NSURL *)url completed:(SDWebImageCompletionBlock)completedBlock { + [self sd_setHighlightedImageWithURL:url options:0 progress:nil completed:completedBlock]; +} + +- (void)sd_setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options completed:(SDWebImageCompletionBlock)completedBlock { + [self sd_setHighlightedImageWithURL:url options:options progress:nil completed:completedBlock]; +} + +- (void)sd_setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletionBlock)completedBlock { + [self sd_cancelCurrentHighlightedImageLoad]; + + if (url) { + __weak __typeof(self)wself = self; + id operation = [SDWebImageManager.sharedManager downloadImageWithURL:url options:options progress:progressBlock completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) { + if (!wself) return; + dispatch_main_sync_safe (^ + { + if (!wself) return; + if (image) { + wself.highlightedImage = image; + [wself setNeedsLayout]; + } + if (completedBlock && finished) { + completedBlock(image, error, cacheType, url); + } + }); + }]; + [self sd_setImageLoadOperation:operation forKey:UIImageViewHighlightedWebCacheOperationKey]; + } else { + dispatch_main_async_safe(^{ + NSError *error = [NSError errorWithDomain:SDWebImageErrorDomain code:-1 userInfo:@{NSLocalizedDescriptionKey : @"Trying to load a nil url"}]; + if (completedBlock) { + completedBlock(nil, error, SDImageCacheTypeNone, url); + } + }); + } +} + +- (void)sd_cancelCurrentHighlightedImageLoad { + [self sd_cancelImageLoadOperationWithKey:UIImageViewHighlightedWebCacheOperationKey]; +} + +@end + + +@implementation UIImageView (HighlightedWebCacheDeprecated) + +- (void)setHighlightedImageWithURL:(NSURL *)url { + [self sd_setHighlightedImageWithURL:url options:0 progress:nil completed:nil]; +} + +- (void)setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options { + [self sd_setHighlightedImageWithURL:url options:options progress:nil completed:nil]; +} + +- (void)setHighlightedImageWithURL:(NSURL *)url completed:(SDWebImageCompletedBlock)completedBlock { + [self sd_setHighlightedImageWithURL:url options:0 progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { + if (completedBlock) { + completedBlock(image, error, cacheType); + } + }]; +} + +- (void)setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock { + [self sd_setHighlightedImageWithURL:url options:options progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { + if (completedBlock) { + completedBlock(image, error, cacheType); + } + }]; +} + +- (void)setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletedBlock)completedBlock { + [self sd_setHighlightedImageWithURL:url options:0 progress:progressBlock completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { + if (completedBlock) { + completedBlock(image, error, cacheType); + } + }]; +} + +- (void)cancelCurrentHighlightedImageLoad { + [self sd_cancelCurrentHighlightedImageLoad]; +} + +@end diff --git a/Pods/SDWebImage/SDWebImage/UIImageView+WebCache.h b/Pods/SDWebImage/SDWebImage/UIImageView+WebCache.h new file mode 100644 index 0000000..e7489f4 --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/UIImageView+WebCache.h @@ -0,0 +1,201 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import "SDWebImageCompat.h" +#import "SDWebImageManager.h" + +/** + * Integrates SDWebImage async downloading and caching of remote images with UIImageView. + * + * Usage with a UITableViewCell sub-class: + * + * @code + +#import + +... + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + static NSString *MyIdentifier = @"MyIdentifier"; + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier]; + + if (cell == nil) { + cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:MyIdentifier] + autorelease]; + } + + // Here we use the provided sd_setImageWithURL: method to load the web image + // Ensure you use a placeholder image otherwise cells will be initialized with no image + [cell.imageView sd_setImageWithURL:[NSURL URLWithString:@"http://example.com/image.jpg"] + placeholderImage:[UIImage imageNamed:@"placeholder"]]; + + cell.textLabel.text = @"My Text"; + return cell; +} + + * @endcode + */ +@interface UIImageView (WebCache) + +/** + * Get the current image URL. + * + * Note that because of the limitations of categories this property can get out of sync + * if you use sd_setImage: directly. + */ +- (NSURL *)sd_imageURL; + +/** + * Set the imageView `image` with an `url`. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + */ +- (void)sd_setImageWithURL:(NSURL *)url; + +/** + * Set the imageView `image` with an `url` and a placeholder. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param placeholder The image to be set initially, until the image request finishes. + * @see sd_setImageWithURL:placeholderImage:options: + */ +- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder; + +/** + * Set the imageView `image` with an `url`, placeholder and custom options. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param placeholder The image to be set initially, until the image request finishes. + * @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values. + */ +- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options; + +/** + * Set the imageView `image` with an `url`. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param completedBlock A block called when operation has been completed. This block has no return value + * and takes the requested UIImage as first parameter. In case of error the image parameter + * is nil and the second parameter may contain an NSError. The third parameter is a Boolean + * indicating if the image was retrived from the local cache or from the network. + * The fourth parameter is the original image url. + */ +- (void)sd_setImageWithURL:(NSURL *)url completed:(SDWebImageCompletionBlock)completedBlock; + +/** + * Set the imageView `image` with an `url`, placeholder. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param placeholder The image to be set initially, until the image request finishes. + * @param completedBlock A block called when operation has been completed. This block has no return value + * and takes the requested UIImage as first parameter. In case of error the image parameter + * is nil and the second parameter may contain an NSError. The third parameter is a Boolean + * indicating if the image was retrived from the local cache or from the network. + * The fourth parameter is the original image url. + */ +- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletionBlock)completedBlock; + +/** + * Set the imageView `image` with an `url`, placeholder and custom options. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param placeholder The image to be set initially, until the image request finishes. + * @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values. + * @param completedBlock A block called when operation has been completed. This block has no return value + * and takes the requested UIImage as first parameter. In case of error the image parameter + * is nil and the second parameter may contain an NSError. The third parameter is a Boolean + * indicating if the image was retrived from the local cache or from the network. + * The fourth parameter is the original image url. + */ +- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletionBlock)completedBlock; + +/** + * Set the imageView `image` with an `url`, placeholder and custom options. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param placeholder The image to be set initially, until the image request finishes. + * @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values. + * @param progressBlock A block called while image is downloading + * @param completedBlock A block called when operation has been completed. This block has no return value + * and takes the requested UIImage as first parameter. In case of error the image parameter + * is nil and the second parameter may contain an NSError. The third parameter is a Boolean + * indicating if the image was retrived from the local cache or from the network. + * The fourth parameter is the original image url. + */ +- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletionBlock)completedBlock; + +/** + * Set the imageView `image` with an `url` and a optionaly placeholder image. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param placeholder The image to be set initially, until the image request finishes. + * @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values. + * @param progressBlock A block called while image is downloading + * @param completedBlock A block called when operation has been completed. This block has no return value + * and takes the requested UIImage as first parameter. In case of error the image parameter + * is nil and the second parameter may contain an NSError. The third parameter is a Boolean + * indicating if the image was retrived from the local cache or from the network. + * The fourth parameter is the original image url. + */ +- (void)sd_setImageWithPreviousCachedImageWithURL:(NSURL *)url andPlaceholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletionBlock)completedBlock; + +/** + * Download an array of images and starts them in an animation loop + * + * @param arrayOfURLs An array of NSURL + */ +- (void)sd_setAnimationImagesWithURLs:(NSArray *)arrayOfURLs; + +/** + * Cancel the current download + */ +- (void)sd_cancelCurrentImageLoad; + +- (void)sd_cancelCurrentAnimationImagesLoad; + +@end + + +@interface UIImageView (WebCacheDeprecated) + +- (NSURL *)imageURL __deprecated_msg("Use `sd_imageURL`"); + +- (void)setImageWithURL:(NSURL *)url __deprecated_msg("Method deprecated. Use `sd_setImageWithURL:`"); +- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder __deprecated_msg("Method deprecated. Use `sd_setImageWithURL:placeholderImage:`"); +- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options __deprecated_msg("Method deprecated. Use `sd_setImageWithURL:placeholderImage:options`"); + +- (void)setImageWithURL:(NSURL *)url completed:(SDWebImageCompletedBlock)completedBlock __deprecated_msg("Method deprecated. Use `sd_setImageWithURL:completed:`"); +- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletedBlock)completedBlock __deprecated_msg("Method deprecated. Use `sd_setImageWithURL:placeholderImage:completed:`"); +- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock __deprecated_msg("Method deprecated. Use `sd_setImageWithURL:placeholderImage:options:completed:`"); +- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletedBlock)completedBlock __deprecated_msg("Method deprecated. Use `sd_setImageWithURL:placeholderImage:options:progress:completed:`"); + +- (void)setAnimationImagesWithURLs:(NSArray *)arrayOfURLs __deprecated_msg("Use `sd_setAnimationImagesWithURLs:`"); + +- (void)cancelCurrentArrayLoad __deprecated_msg("Use `sd_cancelCurrentAnimationImagesLoad`"); + +- (void)cancelCurrentImageLoad __deprecated_msg("Use `sd_cancelCurrentImageLoad`"); + +@end diff --git a/Pods/SDWebImage/SDWebImage/UIImageView+WebCache.m b/Pods/SDWebImage/SDWebImage/UIImageView+WebCache.m new file mode 100644 index 0000000..162c49a --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/UIImageView+WebCache.m @@ -0,0 +1,202 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import "UIImageView+WebCache.h" +#import "objc/runtime.h" +#import "UIView+WebCacheOperation.h" + +static char imageURLKey; + +@implementation UIImageView (WebCache) + +- (void)sd_setImageWithURL:(NSURL *)url { + [self sd_setImageWithURL:url placeholderImage:nil options:0 progress:nil completed:nil]; +} + +- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder { + [self sd_setImageWithURL:url placeholderImage:placeholder options:0 progress:nil completed:nil]; +} + +- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options { + [self sd_setImageWithURL:url placeholderImage:placeholder options:options progress:nil completed:nil]; +} + +- (void)sd_setImageWithURL:(NSURL *)url completed:(SDWebImageCompletionBlock)completedBlock { + [self sd_setImageWithURL:url placeholderImage:nil options:0 progress:nil completed:completedBlock]; +} + +- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletionBlock)completedBlock { + [self sd_setImageWithURL:url placeholderImage:placeholder options:0 progress:nil completed:completedBlock]; +} + +- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletionBlock)completedBlock { + [self sd_setImageWithURL:url placeholderImage:placeholder options:options progress:nil completed:completedBlock]; +} + +- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletionBlock)completedBlock { + [self sd_cancelCurrentImageLoad]; + objc_setAssociatedObject(self, &imageURLKey, url, OBJC_ASSOCIATION_RETAIN_NONATOMIC); + + if (!(options & SDWebImageDelayPlaceholder)) { + dispatch_main_async_safe(^{ + self.image = placeholder; + }); + } + + if (url) { + __weak __typeof(self)wself = self; + id operation = [SDWebImageManager.sharedManager downloadImageWithURL:url options:options progress:progressBlock completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) { + if (!wself) return; + dispatch_main_sync_safe(^{ + if (!wself) return; + if (image && (options & SDWebImageAvoidAutoSetImage) && completedBlock) + { + completedBlock(image, error, cacheType, url); + return; + } + else if (image) { + wself.image = image; + [wself setNeedsLayout]; + } else { + if ((options & SDWebImageDelayPlaceholder)) { + wself.image = placeholder; + [wself setNeedsLayout]; + } + } + if (completedBlock && finished) { + completedBlock(image, error, cacheType, url); + } + }); + }]; + [self sd_setImageLoadOperation:operation forKey:@"UIImageViewImageLoad"]; + } else { + dispatch_main_async_safe(^{ + NSError *error = [NSError errorWithDomain:SDWebImageErrorDomain code:-1 userInfo:@{NSLocalizedDescriptionKey : @"Trying to load a nil url"}]; + if (completedBlock) { + completedBlock(nil, error, SDImageCacheTypeNone, url); + } + }); + } +} + +- (void)sd_setImageWithPreviousCachedImageWithURL:(NSURL *)url andPlaceholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletionBlock)completedBlock { + NSString *key = [[SDWebImageManager sharedManager] cacheKeyForURL:url]; + UIImage *lastPreviousCachedImage = [[SDImageCache sharedImageCache] imageFromDiskCacheForKey:key]; + + [self sd_setImageWithURL:url placeholderImage:lastPreviousCachedImage ?: placeholder options:options progress:progressBlock completed:completedBlock]; +} + +- (NSURL *)sd_imageURL { + return objc_getAssociatedObject(self, &imageURLKey); +} + +- (void)sd_setAnimationImagesWithURLs:(NSArray *)arrayOfURLs { + [self sd_cancelCurrentAnimationImagesLoad]; + __weak __typeof(self)wself = self; + + NSMutableArray *operationsArray = [[NSMutableArray alloc] init]; + + for (NSURL *logoImageURL in arrayOfURLs) { + id operation = [SDWebImageManager.sharedManager downloadImageWithURL:logoImageURL options:0 progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) { + if (!wself) return; + dispatch_main_sync_safe(^{ + __strong UIImageView *sself = wself; + [sself stopAnimating]; + if (sself && image) { + NSMutableArray *currentImages = [[sself animationImages] mutableCopy]; + if (!currentImages) { + currentImages = [[NSMutableArray alloc] init]; + } + [currentImages addObject:image]; + + sself.animationImages = currentImages; + [sself setNeedsLayout]; + } + [sself startAnimating]; + }); + }]; + [operationsArray addObject:operation]; + } + + [self sd_setImageLoadOperation:[NSArray arrayWithArray:operationsArray] forKey:@"UIImageViewAnimationImages"]; +} + +- (void)sd_cancelCurrentImageLoad { + [self sd_cancelImageLoadOperationWithKey:@"UIImageViewImageLoad"]; +} + +- (void)sd_cancelCurrentAnimationImagesLoad { + [self sd_cancelImageLoadOperationWithKey:@"UIImageViewAnimationImages"]; +} + +@end + + +@implementation UIImageView (WebCacheDeprecated) + +- (NSURL *)imageURL { + return [self sd_imageURL]; +} + +- (void)setImageWithURL:(NSURL *)url { + [self sd_setImageWithURL:url placeholderImage:nil options:0 progress:nil completed:nil]; +} + +- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder { + [self sd_setImageWithURL:url placeholderImage:placeholder options:0 progress:nil completed:nil]; +} + +- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options { + [self sd_setImageWithURL:url placeholderImage:placeholder options:options progress:nil completed:nil]; +} + +- (void)setImageWithURL:(NSURL *)url completed:(SDWebImageCompletedBlock)completedBlock { + [self sd_setImageWithURL:url placeholderImage:nil options:0 progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { + if (completedBlock) { + completedBlock(image, error, cacheType); + } + }]; +} + +- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletedBlock)completedBlock { + [self sd_setImageWithURL:url placeholderImage:placeholder options:0 progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { + if (completedBlock) { + completedBlock(image, error, cacheType); + } + }]; +} + +- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock { + [self sd_setImageWithURL:url placeholderImage:placeholder options:options progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { + if (completedBlock) { + completedBlock(image, error, cacheType); + } + }]; +} + +- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletedBlock)completedBlock { + [self sd_setImageWithURL:url placeholderImage:placeholder options:options progress:progressBlock completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { + if (completedBlock) { + completedBlock(image, error, cacheType); + } + }]; +} + +- (void)cancelCurrentArrayLoad { + [self sd_cancelCurrentAnimationImagesLoad]; +} + +- (void)cancelCurrentImageLoad { + [self sd_cancelCurrentImageLoad]; +} + +- (void)setAnimationImagesWithURLs:(NSArray *)arrayOfURLs { + [self sd_setAnimationImagesWithURLs:arrayOfURLs]; +} + +@end diff --git a/Pods/SDWebImage/SDWebImage/UIView+WebCacheOperation.h b/Pods/SDWebImage/SDWebImage/UIView+WebCacheOperation.h new file mode 100644 index 0000000..6719036 --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/UIView+WebCacheOperation.h @@ -0,0 +1,36 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import +#import "SDWebImageManager.h" + +@interface UIView (WebCacheOperation) + +/** + * Set the image load operation (storage in a UIView based dictionary) + * + * @param operation the operation + * @param key key for storing the operation + */ +- (void)sd_setImageLoadOperation:(id)operation forKey:(NSString *)key; + +/** + * Cancel all operations for the current UIView and key + * + * @param key key for identifying the operations + */ +- (void)sd_cancelImageLoadOperationWithKey:(NSString *)key; + +/** + * Just remove the operations corresponding to the current UIView and key without cancelling them + * + * @param key key for identifying the operations + */ +- (void)sd_removeImageLoadOperationWithKey:(NSString *)key; + +@end diff --git a/Pods/SDWebImage/SDWebImage/UIView+WebCacheOperation.m b/Pods/SDWebImage/SDWebImage/UIView+WebCacheOperation.m new file mode 100644 index 0000000..9219478 --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/UIView+WebCacheOperation.m @@ -0,0 +1,55 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import "UIView+WebCacheOperation.h" +#import "objc/runtime.h" + +static char loadOperationKey; + +@implementation UIView (WebCacheOperation) + +- (NSMutableDictionary *)operationDictionary { + NSMutableDictionary *operations = objc_getAssociatedObject(self, &loadOperationKey); + if (operations) { + return operations; + } + operations = [NSMutableDictionary dictionary]; + objc_setAssociatedObject(self, &loadOperationKey, operations, OBJC_ASSOCIATION_RETAIN_NONATOMIC); + return operations; +} + +- (void)sd_setImageLoadOperation:(id)operation forKey:(NSString *)key { + [self sd_cancelImageLoadOperationWithKey:key]; + NSMutableDictionary *operationDictionary = [self operationDictionary]; + [operationDictionary setObject:operation forKey:key]; +} + +- (void)sd_cancelImageLoadOperationWithKey:(NSString *)key { + // Cancel in progress downloader from queue + NSMutableDictionary *operationDictionary = [self operationDictionary]; + id operations = [operationDictionary objectForKey:key]; + if (operations) { + if ([operations isKindOfClass:[NSArray class]]) { + for (id operation in operations) { + if (operation) { + [operation cancel]; + } + } + } else if ([operations conformsToProtocol:@protocol(SDWebImageOperation)]){ + [(id) operations cancel]; + } + [operationDictionary removeObjectForKey:key]; + } +} + +- (void)sd_removeImageLoadOperationWithKey:(NSString *)key { + NSMutableDictionary *operationDictionary = [self operationDictionary]; + [operationDictionary removeObjectForKey:key]; +} + +@end diff --git a/Pods/Target Support Files/AFNetworking/AFNetworking-Private.xcconfig b/Pods/Target Support Files/AFNetworking/AFNetworking-Private.xcconfig new file mode 100644 index 0000000..52f642f --- /dev/null +++ b/Pods/Target Support Files/AFNetworking/AFNetworking-Private.xcconfig @@ -0,0 +1,6 @@ +#include "AFNetworking.xcconfig" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/AFNetworking" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/GoogleMaps" "${PODS_ROOT}/Headers/Public/GoogleMaps/GoogleMaps" "${PODS_ROOT}/Headers/Public/SDWebImage" +OTHER_LDFLAGS = ${AFNETWORKING_OTHER_LDFLAGS} +PODS_ROOT = ${SRCROOT} +SKIP_INSTALL = YES \ No newline at end of file diff --git a/Pods/Target Support Files/AFNetworking/AFNetworking-dummy.m b/Pods/Target Support Files/AFNetworking/AFNetworking-dummy.m new file mode 100644 index 0000000..6a29cf8 --- /dev/null +++ b/Pods/Target Support Files/AFNetworking/AFNetworking-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_AFNetworking : NSObject +@end +@implementation PodsDummy_AFNetworking +@end diff --git a/Pods/Target Support Files/AFNetworking/AFNetworking-prefix.pch b/Pods/Target Support Files/AFNetworking/AFNetworking-prefix.pch new file mode 100644 index 0000000..1e116a3 --- /dev/null +++ b/Pods/Target Support Files/AFNetworking/AFNetworking-prefix.pch @@ -0,0 +1,11 @@ +#ifdef __OBJC__ +#import +#endif + +#ifndef TARGET_OS_IOS + #define TARGET_OS_IOS TARGET_OS_IPHONE +#endif + +#ifndef TARGET_OS_WATCH + #define TARGET_OS_WATCH 0 +#endif diff --git a/Pods/Target Support Files/AFNetworking/AFNetworking.xcconfig b/Pods/Target Support Files/AFNetworking/AFNetworking.xcconfig new file mode 100644 index 0000000..b0b2d52 --- /dev/null +++ b/Pods/Target Support Files/AFNetworking/AFNetworking.xcconfig @@ -0,0 +1 @@ +AFNETWORKING_OTHER_LDFLAGS = -framework "CoreGraphics" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration" \ No newline at end of file diff --git a/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown b/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown new file mode 100644 index 0000000..5dbbee9 --- /dev/null +++ b/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown @@ -0,0 +1,61 @@ +# Acknowledgements +This application makes use of the following third party libraries: + +## AFNetworking + +Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +## GoogleMaps + +If you use the Google Maps SDK for iOS in your application, you must +include the attribution text as part of a legal notices section in your +application. Including legal notices as an independent menu item, or as +part of an "About" menu item, is recommended. + +You can get the attribution text by making a call to +[GMSServices openSourceLicenseInfo]. + + +## SDWebImage + +Copyright (c) 2009 Olivier Poitrey + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +Generated by CocoaPods - http://cocoapods.org diff --git a/Pods/Target Support Files/Pods/Pods-acknowledgements.plist b/Pods/Target Support Files/Pods/Pods-acknowledgements.plist new file mode 100644 index 0000000..75b4016 --- /dev/null +++ b/Pods/Target Support Files/Pods/Pods-acknowledgements.plist @@ -0,0 +1,99 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + Title + AFNetworking + Type + PSGroupSpecifier + + + FooterText + If you use the Google Maps SDK for iOS in your application, you must +include the attribution text as part of a legal notices section in your +application. Including legal notices as an independent menu item, or as +part of an "About" menu item, is recommended. + +You can get the attribution text by making a call to +[GMSServices openSourceLicenseInfo]. + + Title + GoogleMaps + Type + PSGroupSpecifier + + + FooterText + Copyright (c) 2009 Olivier Poitrey <rs@dailymotion.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + + Title + SDWebImage + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - http://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/Pods/Target Support Files/Pods/Pods-dummy.m b/Pods/Target Support Files/Pods/Pods-dummy.m new file mode 100644 index 0000000..ade64bd --- /dev/null +++ b/Pods/Target Support Files/Pods/Pods-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods : NSObject +@end +@implementation PodsDummy_Pods +@end diff --git a/Pods/Target Support Files/Pods/Pods-resources.sh b/Pods/Target Support Files/Pods/Pods-resources.sh new file mode 100755 index 0000000..14dec4d --- /dev/null +++ b/Pods/Target Support Files/Pods/Pods-resources.sh @@ -0,0 +1,101 @@ +#!/bin/sh +set -e + +mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +XCASSET_FILES=() + +realpath() { + DIRECTORY="$(cd "${1%/*}" && pwd)" + FILENAME="${1##*/}" + echo "$DIRECTORY/$FILENAME" +} + +install_resource() +{ + case $1 in + *.storyboard) + 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}" + 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}" + ;; + *.xib) + 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}" + 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}" + ;; + *.framework) + echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" + xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" + xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\"" + xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm" + ;; + *.xcassets) + ABSOLUTE_XCASSET_FILE=$(realpath "${PODS_ROOT}/$1") + XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") + ;; + /*) + echo "$1" + echo "$1" >> "$RESOURCES_TO_COPY" + ;; + *) + echo "${PODS_ROOT}/$1" + echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" + ;; + esac +} +if [[ "$CONFIGURATION" == "Debug" ]]; then + install_resource "GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle" +fi +if [[ "$CONFIGURATION" == "Release" ]]; then + install_resource "GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle" +fi + +mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]]; then + mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] +then + case "${TARGETED_DEVICE_FAMILY}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; + esac + + # Find all other xcassets (this unfortunately includes those of path pods and other targets). + OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) + while read line; do + if [[ $line != "`realpath $PODS_ROOT`*" ]]; then + XCASSET_FILES+=("$line") + fi + done <<<"$OTHER_XCASSETS" + + 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}" +fi diff --git a/Pods/Target Support Files/Pods/Pods.debug.xcconfig b/Pods/Target Support Files/Pods/Pods.debug.xcconfig new file mode 100644 index 0000000..c3ae37f --- /dev/null +++ b/Pods/Target Support Files/Pods/Pods.debug.xcconfig @@ -0,0 +1,6 @@ +FRAMEWORK_SEARCH_PATHS = "$(PODS_ROOT)/GoogleMaps/Frameworks" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/GoogleMaps" "${PODS_ROOT}/Headers/Public/GoogleMaps/GoogleMaps" "${PODS_ROOT}/Headers/Public/SDWebImage" +OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/GoogleMaps" -isystem "${PODS_ROOT}/Headers/Public/GoogleMaps/GoogleMaps" -isystem "${PODS_ROOT}/Headers/Public/SDWebImage" +OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking" -l"SDWebImage" -l"c++" -l"icucore" -l"z" -framework "AVFoundation" -framework "Accelerate" -framework "CoreBluetooth" -framework "CoreData" -framework "CoreGraphics" -framework "CoreLocation" -framework "CoreText" -framework "GLKit" -framework "GoogleMaps" -framework "ImageIO" -framework "MobileCoreServices" -framework "OpenGLES" -framework "QuartzCore" -framework "Security" -framework "SystemConfiguration" +PODS_ROOT = ${SRCROOT}/../Pods \ No newline at end of file diff --git a/Pods/Target Support Files/Pods/Pods.release.xcconfig b/Pods/Target Support Files/Pods/Pods.release.xcconfig new file mode 100644 index 0000000..c3ae37f --- /dev/null +++ b/Pods/Target Support Files/Pods/Pods.release.xcconfig @@ -0,0 +1,6 @@ +FRAMEWORK_SEARCH_PATHS = "$(PODS_ROOT)/GoogleMaps/Frameworks" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/GoogleMaps" "${PODS_ROOT}/Headers/Public/GoogleMaps/GoogleMaps" "${PODS_ROOT}/Headers/Public/SDWebImage" +OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/GoogleMaps" -isystem "${PODS_ROOT}/Headers/Public/GoogleMaps/GoogleMaps" -isystem "${PODS_ROOT}/Headers/Public/SDWebImage" +OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking" -l"SDWebImage" -l"c++" -l"icucore" -l"z" -framework "AVFoundation" -framework "Accelerate" -framework "CoreBluetooth" -framework "CoreData" -framework "CoreGraphics" -framework "CoreLocation" -framework "CoreText" -framework "GLKit" -framework "GoogleMaps" -framework "ImageIO" -framework "MobileCoreServices" -framework "OpenGLES" -framework "QuartzCore" -framework "Security" -framework "SystemConfiguration" +PODS_ROOT = ${SRCROOT}/../Pods \ No newline at end of file diff --git a/Pods/Target Support Files/SDWebImage/SDWebImage-Private.xcconfig b/Pods/Target Support Files/SDWebImage/SDWebImage-Private.xcconfig new file mode 100644 index 0000000..080e7c5 --- /dev/null +++ b/Pods/Target Support Files/SDWebImage/SDWebImage-Private.xcconfig @@ -0,0 +1,6 @@ +#include "SDWebImage.xcconfig" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/SDWebImage" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/GoogleMaps" "${PODS_ROOT}/Headers/Public/GoogleMaps/GoogleMaps" "${PODS_ROOT}/Headers/Public/SDWebImage" +OTHER_LDFLAGS = ${SDWEBIMAGE_OTHER_LDFLAGS} +PODS_ROOT = ${SRCROOT} +SKIP_INSTALL = YES \ No newline at end of file diff --git a/Pods/Target Support Files/SDWebImage/SDWebImage-dummy.m b/Pods/Target Support Files/SDWebImage/SDWebImage-dummy.m new file mode 100644 index 0000000..86d2b5f --- /dev/null +++ b/Pods/Target Support Files/SDWebImage/SDWebImage-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_SDWebImage : NSObject +@end +@implementation PodsDummy_SDWebImage +@end diff --git a/Pods/Target Support Files/SDWebImage/SDWebImage-prefix.pch b/Pods/Target Support Files/SDWebImage/SDWebImage-prefix.pch new file mode 100644 index 0000000..aa992a4 --- /dev/null +++ b/Pods/Target Support Files/SDWebImage/SDWebImage-prefix.pch @@ -0,0 +1,4 @@ +#ifdef __OBJC__ +#import +#endif + diff --git a/Pods/Target Support Files/SDWebImage/SDWebImage.xcconfig b/Pods/Target Support Files/SDWebImage/SDWebImage.xcconfig new file mode 100644 index 0000000..6ac563d --- /dev/null +++ b/Pods/Target Support Files/SDWebImage/SDWebImage.xcconfig @@ -0,0 +1 @@ +SDWEBIMAGE_OTHER_LDFLAGS = -framework "ImageIO" \ No newline at end of file diff --git a/TalkinToTheNet.xcworkspace/contents.xcworkspacedata b/TalkinToTheNet.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..52f312c --- /dev/null +++ b/TalkinToTheNet.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/TalkinToTheNet/.DS_Store b/TalkinToTheNet/.DS_Store new file mode 100644 index 0000000..696afa8 Binary files /dev/null and b/TalkinToTheNet/.DS_Store differ diff --git a/TalkinToTheNet/TalkinToTheNet.xcodeproj/project.pbxproj b/TalkinToTheNet/TalkinToTheNet.xcodeproj/project.pbxproj index ee35a70..80247b6 100644 --- a/TalkinToTheNet/TalkinToTheNet.xcodeproj/project.pbxproj +++ b/TalkinToTheNet/TalkinToTheNet.xcodeproj/project.pbxproj @@ -7,6 +7,21 @@ objects = { /* Begin PBXBuildFile section */ + 509932C5B9B1FD538D9567D5 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ABF744DCE272EA982436BCDF /* libPods.a */; }; + 8458847D1BB488C10073CA5D /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8458847C1BB488C10073CA5D /* CoreLocation.framework */; }; + 845884F61BB4EDBA0073CA5D /* searchViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 845884F51BB4EDBA0073CA5D /* searchViewController.m */; settings = {ASSET_TAGS = (); }; }; + 845884FB1BB4F0B30073CA5D /* APIManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 845884FA1BB4F0B30073CA5D /* APIManager.m */; settings = {ASSET_TAGS = (); }; }; + 845885001BB4F29E0073CA5D /* searchResults.m in Sources */ = {isa = PBXBuildFile; fileRef = 845884FF1BB4F29E0073CA5D /* searchResults.m */; settings = {ASSET_TAGS = (); }; }; + 845885031BB58DB50073CA5D /* detailsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 845885021BB58DB50073CA5D /* detailsViewController.m */; settings = {ASSET_TAGS = (); }; }; + 845885071BB628460073CA5D /* CustomTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 845885061BB628460073CA5D /* CustomTableViewCell.m */; settings = {ASSET_TAGS = (); }; }; + 8458850A1BB641100073CA5D /* InstaPostsTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 845885091BB641100073CA5D /* InstaPostsTableViewCell.m */; settings = {ASSET_TAGS = (); }; }; + 8458850D1BB666C60073CA5D /* InstaPost.m in Sources */ = {isa = PBXBuildFile; fileRef = 8458850C1BB666C60073CA5D /* InstaPost.m */; settings = {ASSET_TAGS = (); }; }; + 84D7518A1BB772C1009C6FA7 /* DetailsTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D751891BB772C1009C6FA7 /* DetailsTableViewController.m */; settings = {ASSET_TAGS = (); }; }; + 84D7518D1BB7788D009C6FA7 /* InstagramPost.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D7518C1BB7788D009C6FA7 /* InstagramPost.m */; settings = {ASSET_TAGS = (); }; }; + 84D7518F1BB77A03009C6FA7 /* InstagramPostTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 84D7518E1BB77A03009C6FA7 /* InstagramPostTableViewCell.xib */; settings = {ASSET_TAGS = (); }; }; + 84D751921BB77C39009C6FA7 /* InstagramPostTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D751911BB77C39009C6FA7 /* InstagramPostTableViewCell.m */; settings = {ASSET_TAGS = (); }; }; + 84D751951BB78278009C6FA7 /* InstagramPostHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D751941BB78278009C6FA7 /* InstagramPostHeaderView.m */; settings = {ASSET_TAGS = (); }; }; + 84D751981BB78387009C6FA7 /* InstagramPostHeaderView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 84D751971BB78387009C6FA7 /* InstagramPostHeaderView.xib */; settings = {ASSET_TAGS = (); }; }; 8D7DCD4B1BAF859400A92AD2 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 8D7DCD4A1BAF859400A92AD2 /* main.m */; }; 8D7DCD4E1BAF859400A92AD2 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8D7DCD4D1BAF859400A92AD2 /* AppDelegate.m */; }; 8D7DCD511BAF859400A92AD2 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8D7DCD501BAF859400A92AD2 /* ViewController.m */; }; @@ -16,6 +31,32 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 7915190BAF4CA5358469805C /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "../Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; + 8458847C1BB488C10073CA5D /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; + 845884F41BB4EDBA0073CA5D /* searchViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = searchViewController.h; sourceTree = ""; }; + 845884F51BB4EDBA0073CA5D /* searchViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = searchViewController.m; sourceTree = ""; }; + 845884F91BB4F0B30073CA5D /* APIManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIManager.h; sourceTree = ""; }; + 845884FA1BB4F0B30073CA5D /* APIManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APIManager.m; sourceTree = ""; }; + 845884FE1BB4F29E0073CA5D /* searchResults.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = searchResults.h; sourceTree = ""; }; + 845884FF1BB4F29E0073CA5D /* searchResults.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = searchResults.m; sourceTree = ""; }; + 845885011BB58DB50073CA5D /* detailsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = detailsViewController.h; sourceTree = ""; }; + 845885021BB58DB50073CA5D /* detailsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = detailsViewController.m; sourceTree = ""; }; + 845885051BB628460073CA5D /* CustomTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomTableViewCell.h; sourceTree = ""; }; + 845885061BB628460073CA5D /* CustomTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomTableViewCell.m; sourceTree = ""; }; + 845885081BB641100073CA5D /* InstaPostsTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InstaPostsTableViewCell.h; sourceTree = ""; }; + 845885091BB641100073CA5D /* InstaPostsTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InstaPostsTableViewCell.m; sourceTree = ""; }; + 8458850B1BB666C60073CA5D /* InstaPost.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InstaPost.h; sourceTree = ""; }; + 8458850C1BB666C60073CA5D /* InstaPost.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InstaPost.m; sourceTree = ""; }; + 84D751881BB772C1009C6FA7 /* DetailsTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetailsTableViewController.h; sourceTree = ""; }; + 84D751891BB772C1009C6FA7 /* DetailsTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DetailsTableViewController.m; sourceTree = ""; }; + 84D7518B1BB7788D009C6FA7 /* InstagramPost.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InstagramPost.h; sourceTree = ""; }; + 84D7518C1BB7788D009C6FA7 /* InstagramPost.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InstagramPost.m; sourceTree = ""; }; + 84D7518E1BB77A03009C6FA7 /* InstagramPostTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = InstagramPostTableViewCell.xib; sourceTree = ""; }; + 84D751901BB77C39009C6FA7 /* InstagramPostTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InstagramPostTableViewCell.h; sourceTree = ""; }; + 84D751911BB77C39009C6FA7 /* InstagramPostTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InstagramPostTableViewCell.m; sourceTree = ""; }; + 84D751931BB78278009C6FA7 /* InstagramPostHeaderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InstagramPostHeaderView.h; sourceTree = ""; }; + 84D751941BB78278009C6FA7 /* InstagramPostHeaderView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InstagramPostHeaderView.m; sourceTree = ""; }; + 84D751971BB78387009C6FA7 /* InstagramPostHeaderView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = InstagramPostHeaderView.xib; sourceTree = ""; }; 8D7DCD461BAF859400A92AD2 /* TalkinToTheNet.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TalkinToTheNet.app; sourceTree = BUILT_PRODUCTS_DIR; }; 8D7DCD4A1BAF859400A92AD2 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 8D7DCD4C1BAF859400A92AD2 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; @@ -26,6 +67,8 @@ 8D7DCD551BAF859400A92AD2 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 8D7DCD581BAF859400A92AD2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 8D7DCD5A1BAF859400A92AD2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + ABF744DCE272EA982436BCDF /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; + B22637E40372F2F5C2946219 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "../Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -33,17 +76,101 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 8458847D1BB488C10073CA5D /* CoreLocation.framework in Frameworks */, + 509932C5B9B1FD538D9567D5 /* libPods.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 58BC67C00665E583D59AEBF4 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 8458847C1BB488C10073CA5D /* CoreLocation.framework */, + ABF744DCE272EA982436BCDF /* libPods.a */, + ); + name = Frameworks; + sourceTree = ""; + }; + 845884F81BB4EDD60073CA5D /* searchViewController */ = { + isa = PBXGroup; + children = ( + 845884F41BB4EDBA0073CA5D /* searchViewController.h */, + 845884F51BB4EDBA0073CA5D /* searchViewController.m */, + 845884FE1BB4F29E0073CA5D /* searchResults.h */, + 845884FF1BB4F29E0073CA5D /* searchResults.m */, + 845885051BB628460073CA5D /* CustomTableViewCell.h */, + 845885061BB628460073CA5D /* CustomTableViewCell.m */, + ); + name = searchViewController; + sourceTree = ""; + }; + 845884FC1BB4F0BA0073CA5D /* APIManager */ = { + isa = PBXGroup; + children = ( + 845884F91BB4F0B30073CA5D /* APIManager.h */, + 845884FA1BB4F0B30073CA5D /* APIManager.m */, + ); + name = APIManager; + sourceTree = ""; + }; + 845884FD1BB4F2470073CA5D /* MapViewController */ = { + isa = PBXGroup; + children = ( + 8D7DCD4F1BAF859400A92AD2 /* ViewController.h */, + 8D7DCD501BAF859400A92AD2 /* ViewController.m */, + ); + name = MapViewController; + sourceTree = ""; + }; + 845885041BB58DBB0073CA5D /* DetailsViewController */ = { + isa = PBXGroup; + children = ( + 84D751881BB772C1009C6FA7 /* DetailsTableViewController.h */, + 84D751891BB772C1009C6FA7 /* DetailsTableViewController.m */, + 84D7518B1BB7788D009C6FA7 /* InstagramPost.h */, + 84D7518C1BB7788D009C6FA7 /* InstagramPost.m */, + 84D7518E1BB77A03009C6FA7 /* InstagramPostTableViewCell.xib */, + 84D751901BB77C39009C6FA7 /* InstagramPostTableViewCell.h */, + 84D751911BB77C39009C6FA7 /* InstagramPostTableViewCell.m */, + 84D751931BB78278009C6FA7 /* InstagramPostHeaderView.h */, + 84D751941BB78278009C6FA7 /* InstagramPostHeaderView.m */, + 84D751971BB78387009C6FA7 /* InstagramPostHeaderView.xib */, + 84D751961BB782C5009C6FA7 /* UIViewTable */, + ); + name = DetailsViewController; + sourceTree = ""; + }; + 84D751961BB782C5009C6FA7 /* UIViewTable */ = { + isa = PBXGroup; + children = ( + 845885011BB58DB50073CA5D /* detailsViewController.h */, + 845885021BB58DB50073CA5D /* detailsViewController.m */, + 845885081BB641100073CA5D /* InstaPostsTableViewCell.h */, + 845885091BB641100073CA5D /* InstaPostsTableViewCell.m */, + 8458850B1BB666C60073CA5D /* InstaPost.h */, + 8458850C1BB666C60073CA5D /* InstaPost.m */, + ); + name = UIViewTable; + sourceTree = ""; + }; + 8B97313010F2F2DD6E2B99FB /* Pods */ = { + isa = PBXGroup; + children = ( + B22637E40372F2F5C2946219 /* Pods.debug.xcconfig */, + 7915190BAF4CA5358469805C /* Pods.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; 8D7DCD3D1BAF859400A92AD2 = { isa = PBXGroup; children = ( 8D7DCD481BAF859400A92AD2 /* TalkinToTheNet */, 8D7DCD471BAF859400A92AD2 /* Products */, + 8B97313010F2F2DD6E2B99FB /* Pods */, + 58BC67C00665E583D59AEBF4 /* Frameworks */, ); sourceTree = ""; }; @@ -60,8 +187,10 @@ children = ( 8D7DCD4C1BAF859400A92AD2 /* AppDelegate.h */, 8D7DCD4D1BAF859400A92AD2 /* AppDelegate.m */, - 8D7DCD4F1BAF859400A92AD2 /* ViewController.h */, - 8D7DCD501BAF859400A92AD2 /* ViewController.m */, + 845884FC1BB4F0BA0073CA5D /* APIManager */, + 845884FD1BB4F2470073CA5D /* MapViewController */, + 845884F81BB4EDD60073CA5D /* searchViewController */, + 845885041BB58DBB0073CA5D /* DetailsViewController */, 8D7DCD521BAF859400A92AD2 /* Main.storyboard */, 8D7DCD551BAF859400A92AD2 /* Assets.xcassets */, 8D7DCD571BAF859400A92AD2 /* LaunchScreen.storyboard */, @@ -86,9 +215,11 @@ isa = PBXNativeTarget; buildConfigurationList = 8D7DCD5D1BAF859400A92AD2 /* Build configuration list for PBXNativeTarget "TalkinToTheNet" */; buildPhases = ( + 0D46968868A2459A59DA0F8D /* Check Pods Manifest.lock */, 8D7DCD421BAF859400A92AD2 /* Sources */, 8D7DCD431BAF859400A92AD2 /* Frameworks */, 8D7DCD441BAF859400A92AD2 /* Resources */, + 90CE72A0A0F246FC1783CEA2 /* Copy Pods Resources */, ); buildRules = ( ); @@ -137,21 +268,67 @@ buildActionMask = 2147483647; files = ( 8D7DCD591BAF859400A92AD2 /* LaunchScreen.storyboard in Resources */, + 84D751981BB78387009C6FA7 /* InstagramPostHeaderView.xib in Resources */, 8D7DCD561BAF859400A92AD2 /* Assets.xcassets in Resources */, + 84D7518F1BB77A03009C6FA7 /* InstagramPostTableViewCell.xib in Resources */, 8D7DCD541BAF859400A92AD2 /* Main.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + 0D46968868A2459A59DA0F8D /* Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + 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; + }; + 90CE72A0A0F246FC1783CEA2 /* Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/../Pods/Target Support Files/Pods/Pods-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ 8D7DCD421BAF859400A92AD2 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 84D751951BB78278009C6FA7 /* InstagramPostHeaderView.m in Sources */, + 8458850A1BB641100073CA5D /* InstaPostsTableViewCell.m in Sources */, + 845885031BB58DB50073CA5D /* detailsViewController.m in Sources */, + 84D751921BB77C39009C6FA7 /* InstagramPostTableViewCell.m in Sources */, + 845885001BB4F29E0073CA5D /* searchResults.m in Sources */, + 84D7518A1BB772C1009C6FA7 /* DetailsTableViewController.m in Sources */, 8D7DCD511BAF859400A92AD2 /* ViewController.m in Sources */, + 845884F61BB4EDBA0073CA5D /* searchViewController.m in Sources */, 8D7DCD4E1BAF859400A92AD2 /* AppDelegate.m in Sources */, 8D7DCD4B1BAF859400A92AD2 /* main.m in Sources */, + 8458850D1BB666C60073CA5D /* InstaPost.m in Sources */, + 845885071BB628460073CA5D /* CustomTableViewCell.m in Sources */, + 84D7518D1BB7788D009C6FA7 /* InstagramPost.m in Sources */, + 845884FB1BB4F0B30073CA5D /* APIManager.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -259,6 +436,7 @@ }; 8D7DCD5E1BAF859400A92AD2 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = B22637E40372F2F5C2946219 /* Pods.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = TalkinToTheNet/Info.plist; @@ -271,6 +449,7 @@ }; 8D7DCD5F1BAF859400A92AD2 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 7915190BAF4CA5358469805C /* Pods.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = TalkinToTheNet/Info.plist; @@ -300,6 +479,7 @@ 8D7DCD5F1BAF859400A92AD2 /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; diff --git a/TalkinToTheNet/TalkinToTheNet/APIManager.h b/TalkinToTheNet/TalkinToTheNet/APIManager.h new file mode 100644 index 0000000..f024ffc --- /dev/null +++ b/TalkinToTheNet/TalkinToTheNet/APIManager.h @@ -0,0 +1,17 @@ +// +// APIManager.h +// learnAPI +// +// Created by Diana Elezaj on 9/20/15. +// Copyright © 2015 Diana Elezaj. All rights reserved. +// + +#import + +@interface APIManager : NSObject + ++(void) GETRequestWithURL:(NSURL *)URL + completionHandler:(void(^)(NSData *, NSURLResponse *, NSError *)) + completionBlock; + +@end diff --git a/TalkinToTheNet/TalkinToTheNet/APIManager.m b/TalkinToTheNet/TalkinToTheNet/APIManager.m new file mode 100644 index 0000000..4cbad2c --- /dev/null +++ b/TalkinToTheNet/TalkinToTheNet/APIManager.m @@ -0,0 +1,29 @@ +// +// APIManager.m +// learnAPI +// +// Created by Diana Elezaj on 9/20/15. +// Copyright © 2015 Diana Elezaj. All rights reserved. +// + +#import "APIManager.h" + + +@implementation APIManager + ++(void) GETRequestWithURL:(NSURL *)URL + completionHandler:(void(^)(NSData *, NSURLResponse *, NSError *)) +completionBlock { + + NSURLSession *session = [NSURLSession sharedSession]; + + NSURLSessionDataTask *task = [session dataTaskWithURL:URL completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) { + + dispatch_async(dispatch_get_main_queue(), ^ { + completionBlock(data, response, error); + }); + }]; + [task resume]; +} + +@end diff --git a/TalkinToTheNet/TalkinToTheNet/AppDelegate.m b/TalkinToTheNet/TalkinToTheNet/AppDelegate.m index d99b336..d3e4356 100644 --- a/TalkinToTheNet/TalkinToTheNet/AppDelegate.m +++ b/TalkinToTheNet/TalkinToTheNet/AppDelegate.m @@ -7,6 +7,7 @@ // #import "AppDelegate.h" +@import GoogleMaps; @interface AppDelegate () @@ -17,6 +18,7 @@ @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. + [GMSServices provideAPIKey:@"AIzaSyCyDgjEiwNvBzT6RwXrjkMtg7vCV5uyON8"]; return YES; } diff --git a/TalkinToTheNet/TalkinToTheNet/Assets.xcassets/Contents.json b/TalkinToTheNet/TalkinToTheNet/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/TalkinToTheNet/TalkinToTheNet/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TalkinToTheNet/TalkinToTheNet/Assets.xcassets/insta.imageset/Contents.json b/TalkinToTheNet/TalkinToTheNet/Assets.xcassets/insta.imageset/Contents.json new file mode 100644 index 0000000..2174bdf --- /dev/null +++ b/TalkinToTheNet/TalkinToTheNet/Assets.xcassets/insta.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ins.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TalkinToTheNet/TalkinToTheNet/Assets.xcassets/insta.imageset/ins.png b/TalkinToTheNet/TalkinToTheNet/Assets.xcassets/insta.imageset/ins.png new file mode 100644 index 0000000..95dcea9 Binary files /dev/null and b/TalkinToTheNet/TalkinToTheNet/Assets.xcassets/insta.imageset/ins.png differ diff --git a/TalkinToTheNet/TalkinToTheNet/Base.lproj/LaunchScreen.storyboard b/TalkinToTheNet/TalkinToTheNet/Base.lproj/LaunchScreen.storyboard index 2e721e1..aa08113 100644 --- a/TalkinToTheNet/TalkinToTheNet/Base.lproj/LaunchScreen.storyboard +++ b/TalkinToTheNet/TalkinToTheNet/Base.lproj/LaunchScreen.storyboard @@ -1,7 +1,8 @@ - + - + + diff --git a/TalkinToTheNet/TalkinToTheNet/Base.lproj/Main.storyboard b/TalkinToTheNet/TalkinToTheNet/Base.lproj/Main.storyboard index f56d2f3..ab888b7 100644 --- a/TalkinToTheNet/TalkinToTheNet/Base.lproj/Main.storyboard +++ b/TalkinToTheNet/TalkinToTheNet/Base.lproj/Main.storyboard @@ -1,13 +1,31 @@ - + - + + + + + + + + + + + + + + + + + + + - + @@ -17,9 +35,311 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TalkinToTheNet/TalkinToTheNet/CustomTableViewCell.h b/TalkinToTheNet/TalkinToTheNet/CustomTableViewCell.h new file mode 100644 index 0000000..7289c52 --- /dev/null +++ b/TalkinToTheNet/TalkinToTheNet/CustomTableViewCell.h @@ -0,0 +1,17 @@ +// +// CustomTableViewCell.h +// TalkinToTheNet +// +// Created by Diana Elezaj on 9/25/15. +// Copyright © 2015 Mike Kavouras. All rights reserved. +// + +#import + +@interface CustomTableViewCell : UITableViewCell +@property (weak, nonatomic) IBOutlet UILabel *nameLabel; +@property (weak, nonatomic) IBOutlet UILabel *phoneLabel; +@property (weak, nonatomic) IBOutlet UILabel *addressLabel; +@property (weak, nonatomic) IBOutlet UILabel *urlLabel; + +@end diff --git a/TalkinToTheNet/TalkinToTheNet/CustomTableViewCell.m b/TalkinToTheNet/TalkinToTheNet/CustomTableViewCell.m new file mode 100644 index 0000000..d48a203 --- /dev/null +++ b/TalkinToTheNet/TalkinToTheNet/CustomTableViewCell.m @@ -0,0 +1,23 @@ +// +// CustomTableViewCell.m +// TalkinToTheNet +// +// Created by Diana Elezaj on 9/25/15. +// Copyright © 2015 Mike Kavouras. All rights reserved. +// + +#import "CustomTableViewCell.h" + +@implementation CustomTableViewCell + +- (void)awakeFromNib { + // Initialization code +} + +- (void)setSelected:(BOOL)selected animated:(BOOL)animated { + [super setSelected:selected animated:animated]; + + // Configure the view for the selected state +} + +@end diff --git a/TalkinToTheNet/TalkinToTheNet/DetailsTableViewController.h b/TalkinToTheNet/TalkinToTheNet/DetailsTableViewController.h new file mode 100644 index 0000000..bacc5f9 --- /dev/null +++ b/TalkinToTheNet/TalkinToTheNet/DetailsTableViewController.h @@ -0,0 +1,15 @@ +// +// DetailsTableViewController.h +// TalkinToTheNet +// +// Created by Diana Elezaj on 9/26/15. +// Copyright © 2015 Mike Kavouras. All rights reserved. +// + +#import + +@interface DetailsTableViewController : UITableViewController +@property (nonatomic) NSMutableArray *searchResults; +@property (nonatomic) NSString *placeName; + +@end diff --git a/TalkinToTheNet/TalkinToTheNet/DetailsTableViewController.m b/TalkinToTheNet/TalkinToTheNet/DetailsTableViewController.m new file mode 100644 index 0000000..e4f5cd7 --- /dev/null +++ b/TalkinToTheNet/TalkinToTheNet/DetailsTableViewController.m @@ -0,0 +1,189 @@ +// +// DetailsTableViewController.m +// TalkinToTheNet +// +// Created by Diana Elezaj on 9/26/15. +// Copyright © 2015 Mike Kavouras. All rights reserved. +// + +#import "DetailsTableViewController.h" +#import +#import +#import "APIManager.h" +#import "InstagramPost.h" +#import "InstagramPostTableViewCell.h" +#import "InstagramPostHeaderView.h" +#import "searchViewController.h" + + +@interface DetailsTableViewController () +@property (nonatomic) NSMutableArray *detailsResults; + +@end + +@implementation DetailsTableViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + UIImageView* img = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"insta"]]; + self.navigationItem.titleView = img; + + + [self fetchInstagramData]; + NSLog(@"detailsss"); + + // set up pull to refresh + self.refreshControl = [[UIRefreshControl alloc] init]; + [self.refreshControl addTarget:self action:@selector(pulledToRefresh:) forControlEvents:UIControlEventValueChanged]; + + // tell the table view to auto adjust the height of each cell + self.tableView.rowHeight = UITableViewAutomaticDimension; + self.tableView.estimatedRowHeight = 12.0; + + // grab the nib from the main bundle + UINib *nib = [UINib nibWithNibName:@"InstagramPostTableViewCell" bundle:nil]; + + // register the nib for the cell identifer + [self.tableView registerNib:nib forCellReuseIdentifier:@"InstagramCellIdentifier"]; + + // grab the header nib from the main bundle + UINib *headerNib = [UINib nibWithNibName:@"InstagramPostHeaderView" bundle:nil]; + + // register the header nib for the header identifier + [self.tableView registerNib:headerNib forHeaderFooterViewReuseIdentifier:@"InstagramHeaderIdentifier"]; + + +} +- (IBAction)refreshTapped:(id)sender { + [self fetchInstagramData]; +} + + +- (void)fetchInstagramData { + + + // create an instagram url + NSString *urlString = [NSString stringWithFormat:@"https://api.instagram.com/v1/tags/%@/media/recent?client_id=a2c55d5958864f32a2b1af4f8b01c8db", self.placeName]; + + AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; + + [manager GET:urlString + parameters:nil + success:^(AFHTTPRequestOperation * _Nonnull operation, id _Nonnull responseObject) { + NSArray *results = responseObject[@"data"]; + + // reset my array + self.detailsResults = [[NSMutableArray alloc] init]; + + // loop through all json posts + for (NSDictionary *result in results) { + + // create new post from json + InstagramPost *post = [[InstagramPost alloc] initWithJSON:result]; + + // add post to array + [self.detailsResults addObject:post]; + } + + [self.tableView reloadData]; + + } failure:^(AFHTTPRequestOperation * _Nonnull operation, NSError * _Nonnull error) { + NSLog(@"%@", error); + + }]; + +} + + +- (void)pulledToRefresh:(UIRefreshControl *)sender { + [self fetchInstagramData]; + [sender endRefreshing]; + + // sender == self.refreshControl +} + + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + } + +#pragma mark - Table view data source + + +- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { + + // dequeue the header view from the table view with InstagramHeaderIdentifier + InstagramPostHeaderView *headerView = [tableView dequeueReusableHeaderFooterViewWithIdentifier:@"InstagramHeaderIdentifier"]; + + // grabbing the post from our search results that corresponds + // with the section + InstagramPost *post = self.detailsResults[section]; + + // set the backgroundView and make it white + headerView.backgroundView = [[UIView alloc] initWithFrame:headerView.bounds]; + headerView.backgroundView.backgroundColor = [UIColor whiteColor]; + + // set the usernameLabel.text to the posts username; + headerView.usernameLabel.text = post.username; + + // make the avatar a circle + headerView.avatarImageView.layer.cornerRadius = headerView.avatarImageView.frame.size.width/2; + headerView.avatarImageView.layer.masksToBounds = YES; + + // create a url from the post avatartImageURL (originally a string) + NSURL *avatarURL = [NSURL URLWithString:post.avatarImageURL]; + + // using SDWebImage, load the avatar image into headerView.avatarImageView + [headerView.avatarImageView sd_setImageWithURL:avatarURL completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { + headerView.avatarImageView.image = image; + }]; + + // return the header view + return headerView; +} + +- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { + return 50.0; +} + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return self.detailsResults.count; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return 1; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + + InstagramPostTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"InstagramCellIdentifier" forIndexPath:indexPath]; + + InstagramPost *post = self.detailsResults[indexPath.section]; + + cell.likeCountLabel.text = [NSString stringWithFormat:@"%ld likes", post.likeCount]; + + cell.tagCountLabel.text = [NSString stringWithFormat:@"Tags: %ld", post.tags.count]; + + cell.captionLabel.text = post.caption[@"text"]; + + // NSData *data = [NSData dataWithContentsOfURL:url]; + // UIImage *image = [UIImage imageWithData:data]; + // + // cell.userMediaImageView.image = image; + + NSURL *url = [NSURL URLWithString:post.imageURL]; + + [cell.userMediaImageView sd_setImageWithURL:url completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { + cell.userMediaImageView.image = image; + }]; + + return cell; +} + + + + + + +@end diff --git a/TalkinToTheNet/TalkinToTheNet/Info.plist b/TalkinToTheNet/TalkinToTheNet/Info.plist index 6905cc6..1fa5889 100644 --- a/TalkinToTheNet/TalkinToTheNet/Info.plist +++ b/TalkinToTheNet/TalkinToTheNet/Info.plist @@ -2,12 +2,19 @@ + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + NSLocationWhenInUseUsageDescription + I want to finish this assignment CFBundleDevelopmentRegion en CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) + diana.GoogleMaps CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/TalkinToTheNet/TalkinToTheNet/InstaPost.h b/TalkinToTheNet/TalkinToTheNet/InstaPost.h new file mode 100644 index 0000000..f054a17 --- /dev/null +++ b/TalkinToTheNet/TalkinToTheNet/InstaPost.h @@ -0,0 +1,24 @@ +// +// InstaPost.h +// TalkinToTheNet +// +// Created by Diana Elezaj on 9/26/15. +// Copyright © 2015 Mike Kavouras. All rights reserved. +// + +#import +#import + +@interface InstaPost : NSObject + +@property (nonatomic) NSArray *tags; +@property (nonatomic) NSInteger commentCount; +@property (nonatomic) NSInteger likeCount; +@property (nonatomic) NSString *username; +@property (nonatomic) NSString *fullName; +@property (nonatomic) NSDictionary *caption; +@property (nonatomic) UIImage *instaImage; + +-(instancetype)initWithJSON: (NSDictionary *)json; + +@end diff --git a/TalkinToTheNet/TalkinToTheNet/InstaPost.m b/TalkinToTheNet/TalkinToTheNet/InstaPost.m new file mode 100644 index 0000000..ca6b075 --- /dev/null +++ b/TalkinToTheNet/TalkinToTheNet/InstaPost.m @@ -0,0 +1,50 @@ +// +// InstaPost.m +// TalkinToTheNet +// +// Created by Diana Elezaj on 9/26/15. +// Copyright © 2015 Mike Kavouras. All rights reserved. +// + +#import "InstaPost.h" + + +@implementation InstaPost +-(instancetype)initWithJSON: (NSDictionary *)json{ + + //call super init, return self + + if (self = [super init]){ + + self.tags = [json objectForKey:@"tags"]; + self.commentCount = [json[@"comments"][@"count"]integerValue]; + self.likeCount = [json[@"likes"][@"count"]integerValue]; + + self.username = json[@"user"][@"username"]; + self.fullName = json[@"user"][@"full_name"]; + self.caption = json[@"caption"]; + + NSString *imageURLString = json[@"images"][@"low_resolution"][@"url"]; + + NSURL *url = [NSURL URLWithString:imageURLString]; + + NSData *imageData = [NSData dataWithContentsOfURL:url]; + + UIImage *image = [UIImage imageWithData:imageData]; + + + + + + +// UIImage *image = [self createImageFromString:imageURLString]; + self.instaImage = image; + + return self; + + } + + return nil; + +} +@end diff --git a/TalkinToTheNet/TalkinToTheNet/InstaPostsTableViewCell.h b/TalkinToTheNet/TalkinToTheNet/InstaPostsTableViewCell.h new file mode 100644 index 0000000..ccc3a4b --- /dev/null +++ b/TalkinToTheNet/TalkinToTheNet/InstaPostsTableViewCell.h @@ -0,0 +1,19 @@ +// +// InstaPostsTableViewCell.h +// TalkinToTheNet +// +// Created by Diana Elezaj on 9/25/15. +// Copyright © 2015 Mike Kavouras. All rights reserved. +// + +#import + +@interface InstaPostsTableViewCell : UITableViewCell +@property (weak, nonatomic) IBOutlet UILabel *userLabel; +@property (weak, nonatomic) IBOutlet UIView *imageV; +@property (weak, nonatomic) IBOutlet UILabel *likesLabel; +@property (weak, nonatomic) IBOutlet UILabel *textCaptionLabel; + + + +@end diff --git a/TalkinToTheNet/TalkinToTheNet/InstaPostsTableViewCell.m b/TalkinToTheNet/TalkinToTheNet/InstaPostsTableViewCell.m new file mode 100644 index 0000000..0e58302 --- /dev/null +++ b/TalkinToTheNet/TalkinToTheNet/InstaPostsTableViewCell.m @@ -0,0 +1,23 @@ +// +// InstaPostsTableViewCell.m +// TalkinToTheNet +// +// Created by Diana Elezaj on 9/25/15. +// Copyright © 2015 Mike Kavouras. All rights reserved. +// + +#import "InstaPostsTableViewCell.h" + +@implementation InstaPostsTableViewCell + +- (void)awakeFromNib { + // Initialization code +} + +- (void)setSelected:(BOOL)selected animated:(BOOL)animated { + [super setSelected:selected animated:animated]; + + // Configure the view for the selected state +} + +@end diff --git a/TalkinToTheNet/TalkinToTheNet/InstagramPost.h b/TalkinToTheNet/TalkinToTheNet/InstagramPost.h new file mode 100644 index 0000000..2ba7832 --- /dev/null +++ b/TalkinToTheNet/TalkinToTheNet/InstagramPost.h @@ -0,0 +1,25 @@ +// +// InstagramPost.h +// TalkinToTheNet +// +// Created by Diana Elezaj on 9/26/15. +// Copyright © 2015 Mike Kavouras. All rights reserved. +// + +#import + +@interface InstagramPost : NSObject + +@property (nonatomic) NSArray *tags; +@property (nonatomic) NSInteger commentCount; +@property (nonatomic) NSInteger likeCount; +@property (nonatomic) NSString *username; +@property (nonatomic) NSString *fullName; +@property (nonatomic) NSDictionary *caption; +@property (nonatomic) NSString *imageURL; +@property (nonatomic) NSString *avatarImageURL; + +- (instancetype)initWithJSON:(NSDictionary *)json; + + +@end diff --git a/TalkinToTheNet/TalkinToTheNet/InstagramPost.m b/TalkinToTheNet/TalkinToTheNet/InstagramPost.m new file mode 100644 index 0000000..4c03412 --- /dev/null +++ b/TalkinToTheNet/TalkinToTheNet/InstagramPost.m @@ -0,0 +1,31 @@ +// +// InstagramPost.m +// TalkinToTheNet +// +// Created by Diana Elezaj on 9/26/15. +// Copyright © 2015 Mike Kavouras. All rights reserved. +// + +#import "InstagramPost.h" + +@implementation InstagramPost + +- (instancetype)initWithJSON:(NSDictionary *)json { + + if (self = [super init]) { + + self.tags = json[@"tags"]; + self.commentCount = [json[@"comments"][@"count"] integerValue]; + self.likeCount = [json[@"likes"][@"count"] integerValue]; + self.caption = json[@"caption"]; + self.username = json[@"user"][@"username"]; + self.fullName = json[@"user"][@"full_name"]; + self.imageURL = json[@"images"][@"standard_resolution"][@"url"]; + + self.avatarImageURL = json[@"user"][@"profile_picture"]; + + return self; + } + return nil; +} +@end diff --git a/TalkinToTheNet/TalkinToTheNet/InstagramPostHeaderView.h b/TalkinToTheNet/TalkinToTheNet/InstagramPostHeaderView.h new file mode 100644 index 0000000..c61a66e --- /dev/null +++ b/TalkinToTheNet/TalkinToTheNet/InstagramPostHeaderView.h @@ -0,0 +1,17 @@ +// +// InstagramPostHeaderView.h +// TalkinToTheNet +// +// Created by Diana Elezaj on 9/26/15. +// Copyright © 2015 Mike Kavouras. All rights reserved. +// + +#import + +@interface InstagramPostHeaderView : UITableViewHeaderFooterView + +@property (weak, nonatomic) IBOutlet UILabel *timestampLabel; +@property (weak, nonatomic) IBOutlet UILabel *usernameLabel; +@property (weak, nonatomic) IBOutlet UIImageView *avatarImageView; + +@end diff --git a/TalkinToTheNet/TalkinToTheNet/InstagramPostHeaderView.m b/TalkinToTheNet/TalkinToTheNet/InstagramPostHeaderView.m new file mode 100644 index 0000000..f821bda --- /dev/null +++ b/TalkinToTheNet/TalkinToTheNet/InstagramPostHeaderView.m @@ -0,0 +1,21 @@ +// +// InstagramPostHeaderView.m +// TalkinToTheNet +// +// Created by Diana Elezaj on 9/26/15. +// Copyright © 2015 Mike Kavouras. All rights reserved. +// + +#import "InstagramPostHeaderView.h" + +@implementation InstagramPostHeaderView + +/* +// Only override drawRect: if you perform custom drawing. +// An empty implementation adversely affects performance during animation. +- (void)drawRect:(CGRect)rect { + // Drawing code +} +*/ + +@end diff --git a/TalkinToTheNet/TalkinToTheNet/InstagramPostHeaderView.xib b/TalkinToTheNet/TalkinToTheNet/InstagramPostHeaderView.xib new file mode 100644 index 0000000..8a20178 --- /dev/null +++ b/TalkinToTheNet/TalkinToTheNet/InstagramPostHeaderView.xib @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TalkinToTheNet/TalkinToTheNet/InstagramPostTableViewCell.h b/TalkinToTheNet/TalkinToTheNet/InstagramPostTableViewCell.h new file mode 100644 index 0000000..ec9f93f --- /dev/null +++ b/TalkinToTheNet/TalkinToTheNet/InstagramPostTableViewCell.h @@ -0,0 +1,21 @@ +// +// InstagramPostTableViewCell.h +// TalkinToTheNet +// +// Created by Diana Elezaj on 9/26/15. +// Copyright © 2015 Mike Kavouras. All rights reserved. +// + +#import + +@interface InstagramPostTableViewCell : UITableViewCell + +@property (weak, nonatomic) IBOutlet UILabel *captionLabel; + +@property (weak, nonatomic) IBOutlet UILabel *usernameLabel; +@property (weak, nonatomic) IBOutlet UILabel *likeCountLabel; +@property (weak, nonatomic) IBOutlet UILabel *tagCountLabel; +@property (weak, nonatomic) IBOutlet UIImageView *userMediaImageView; + + +@end diff --git a/TalkinToTheNet/TalkinToTheNet/InstagramPostTableViewCell.m b/TalkinToTheNet/TalkinToTheNet/InstagramPostTableViewCell.m new file mode 100644 index 0000000..0e6420e --- /dev/null +++ b/TalkinToTheNet/TalkinToTheNet/InstagramPostTableViewCell.m @@ -0,0 +1,23 @@ +// +// InstagramPostTableViewCell.m +// TalkinToTheNet +// +// Created by Diana Elezaj on 9/26/15. +// Copyright © 2015 Mike Kavouras. All rights reserved. +// + +#import "InstagramPostTableViewCell.h" + +@implementation InstagramPostTableViewCell + +- (void)awakeFromNib { + // Initialization code +} + +- (void)setSelected:(BOOL)selected animated:(BOOL)animated { + [super setSelected:selected animated:animated]; + + // Configure the view for the selected state +} + +@end diff --git a/TalkinToTheNet/TalkinToTheNet/InstagramPostTableViewCell.xib b/TalkinToTheNet/TalkinToTheNet/InstagramPostTableViewCell.xib new file mode 100644 index 0000000..1a686d8 --- /dev/null +++ b/TalkinToTheNet/TalkinToTheNet/InstagramPostTableViewCell.xib @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TalkinToTheNet/TalkinToTheNet/ViewController.h b/TalkinToTheNet/TalkinToTheNet/ViewController.h index 8113a85..f389536 100644 --- a/TalkinToTheNet/TalkinToTheNet/ViewController.h +++ b/TalkinToTheNet/TalkinToTheNet/ViewController.h @@ -7,9 +7,9 @@ // #import +#import -@interface ViewController : UIViewController - +@interface ViewController : UIViewController @end diff --git a/TalkinToTheNet/TalkinToTheNet/ViewController.m b/TalkinToTheNet/TalkinToTheNet/ViewController.m index cbefa29..e37fd93 100644 --- a/TalkinToTheNet/TalkinToTheNet/ViewController.m +++ b/TalkinToTheNet/TalkinToTheNet/ViewController.m @@ -7,21 +7,96 @@ // #import "ViewController.h" +@import GoogleMaps; @interface ViewController () @end -@implementation ViewController +@implementation ViewController { + CLLocationManager *locationManager; + + GMSMapView *mapView_; + BOOL firstLocationUpdate_; +} - (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view, typically from a nib. + + //instantiate the CLLocationManager object + locationManager = [[CLLocationManager alloc] init]; + + locationManager.delegate = self; + locationManager.desiredAccuracy = kCLLocationAccuracyBest; + + [locationManager requestWhenInUseAuthorization]; + + [locationManager startUpdatingLocation]; + + mapView_.myLocationEnabled = YES; + + // Create a GMSCameraPosition that tells the map to display the + // coordinate -33.86,151.20 at zoom level 6. + GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:40.7141667 + longitude:-74.0063889 + zoom:6]; + mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera]; + mapView_.settings.compassButton = YES; + mapView_.myLocationEnabled = YES; + mapView_.settings.myLocationButton = YES; + self.view = mapView_; + + // Creates a marker in the center of the map. + GMSMarker *marker = [[GMSMarker alloc] init]; + marker.position = CLLocationCoordinate2DMake(40.7141667, -74.0063889); + marker.title = @"New York"; + marker.snippet = @"NY"; + marker.map = mapView_; + + // Listen to the myLocation property of GMSMapView. + [mapView_ addObserver:self + forKeyPath:@"myLocation" + options:NSKeyValueObservingOptionNew + context:NULL]; + + self.view = mapView_; + + // Ask for My Location data after the map has already been added to the UI. + dispatch_async(dispatch_get_main_queue(), ^{ + mapView_.myLocationEnabled = YES; + }); } -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. +- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { + if ([keyPath isEqualToString:@"myLocation"]) { + NSLog(@"lat %f", mapView_.myLocation.coordinate.latitude); + NSLog(@"long %f", mapView_.myLocation.coordinate.longitude); + NSLog(@"keyPath %@", keyPath); + // GMSMarker *marker = [[GMSMarker alloc] init]; +// marker.position = CLLocationCoordinate2DMake(mapView_.myLocation.coordinate.latitude, mapView_.myLocation.coordinate.longitude); +// +// marker.title = @"New York"; +// marker.snippet = @"NY"; +// marker.map = mapView_; + + } else { + + NSLog(@"Else statement"); + [super observeValueForKeyPath:keyPath ofObject:object change:change context:context]; + } } +#pragma mark - CLLocationManagerDelegate + +- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error +{ + NSLog(@"didFailWithError: %@", error); + UIAlertView *errorAlert = [[UIAlertView alloc] + initWithTitle:@"Error" message:@"Failed to Get Your Location" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; + [errorAlert show]; +} + +- (BOOL)didTapMyLocationButtonForMapView:(GMSMapView *)mapView { + return YES; +} + @end diff --git a/TalkinToTheNet/TalkinToTheNet/detailsViewController.h b/TalkinToTheNet/TalkinToTheNet/detailsViewController.h new file mode 100644 index 0000000..0d73cec --- /dev/null +++ b/TalkinToTheNet/TalkinToTheNet/detailsViewController.h @@ -0,0 +1,17 @@ +// +// detailsViewController.h +// TalkinToTheNet +// +// Created by Diana Elezaj on 9/25/15. +// Copyright © 2015 Mike Kavouras. All rights reserved. +// + +#import +#import "APIManager.h" +#import "searchResults.h" + + +@interface detailsViewController : UIViewController +@property (nonatomic) NSString *placeName; + +@end diff --git a/TalkinToTheNet/TalkinToTheNet/detailsViewController.m b/TalkinToTheNet/TalkinToTheNet/detailsViewController.m new file mode 100644 index 0000000..fb836db --- /dev/null +++ b/TalkinToTheNet/TalkinToTheNet/detailsViewController.m @@ -0,0 +1,120 @@ +// +// detailsViewController.m +// TalkinToTheNet +// +// Created by Diana Elezaj on 9/25/15. +// Copyright © 2015 Mike Kavouras. All rights reserved. +// + +#import "detailsViewController.h" +#import "APIManager.h" +#import "InstaPost.h" +#import "InstaPostsTableViewCell.h" + +@interface detailsViewController () +< +UITableViewDataSource, +UITableViewDelegate +> + +@property (weak, nonatomic) IBOutlet UITableView *tableView; +@property (nonatomic) NSMutableArray *searchResults; + +@end + +@implementation detailsViewController + +- (void)viewDidLoad { + [super viewDidLoad]; +// self.view.backgroundColor = [UIColor colorWithRed:0.91 green:0.95 blue:0.98 alpha:1.0]; + UIImageView* img = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"ins"]]; + + self.navigationItem.titleView = img; + + + self.tableView.delegate = self; + self.tableView.dataSource = self; + [self fetchInstagramData]; +} + +-(void)fetchInstagramData{ + + NSString *placeNameUrl = [NSString stringWithFormat:@"https://api.instagram.com/v1/tags/%@/media/recent?client_id=a2c55d5958864f32a2b1af4f8b01c8db", self.placeName]; + + NSURL *instagramURL = [NSURL URLWithString:placeNameUrl]; + + [APIManager GETRequestWithURL:instagramURL completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { + + + NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil]; + + NSArray *results = json[@"data"]; + + self.searchResults = [[NSMutableArray alloc] init]; + + for (NSDictionary *result in results){ + + InstaPost *post = [[InstaPost alloc] initWithJSON:result]; + + [self.searchResults addObject:post]; + } + + [self.tableView reloadData]; + }]; +} + +#pragma mark - Table view data source + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return 1; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + + return self.searchResults.count; +} + + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + + InstaPostsTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"InstaIdentifier" forIndexPath:indexPath]; + +// [cell setBackgroundColor:[UIColor lightGrayColor]]; + + InstaPost *post = self.searchResults[indexPath.row]; + + cell.userLabel.text = [NSString stringWithFormat:@"@%@", post.username]; + cell.likesLabel.text = [NSString stringWithFormat:@"%ld likes",post.likeCount]; + +// cell.likesLabel.text = @"kot"; + + cell.textCaptionLabel.text = post.caption[@"text"]; + + cell.imageView.image = post.instaImage; + + return cell; +} + + + + + + + + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/TalkinToTheNet/TalkinToTheNet/searchResults.h b/TalkinToTheNet/TalkinToTheNet/searchResults.h new file mode 100644 index 0000000..5e78da7 --- /dev/null +++ b/TalkinToTheNet/TalkinToTheNet/searchResults.h @@ -0,0 +1,19 @@ +// +// searchResults.h +// TalkinToTheNet +// +// Created by Diana Elezaj on 9/24/15. +// Copyright © 2015 Mike Kavouras. All rights reserved. +// + +#import + +@interface searchResults : NSObject + +@property (nonatomic) NSString *name; +@property (nonatomic) NSString * formattedPhone; +@property (nonatomic) NSString *fullAddress; +@property (nonatomic) NSString * checkIns; +@property (nonatomic) NSString * url; + +@end diff --git a/TalkinToTheNet/TalkinToTheNet/searchResults.m b/TalkinToTheNet/TalkinToTheNet/searchResults.m new file mode 100644 index 0000000..4a15de1 --- /dev/null +++ b/TalkinToTheNet/TalkinToTheNet/searchResults.m @@ -0,0 +1,13 @@ +// +// searchResults.m +// TalkinToTheNet +// +// Created by Diana Elezaj on 9/24/15. +// Copyright © 2015 Mike Kavouras. All rights reserved. +// + +#import "searchResults.h" + +@implementation searchResults + +@end diff --git a/TalkinToTheNet/TalkinToTheNet/searchViewController.h b/TalkinToTheNet/TalkinToTheNet/searchViewController.h new file mode 100644 index 0000000..dc34fd3 --- /dev/null +++ b/TalkinToTheNet/TalkinToTheNet/searchViewController.h @@ -0,0 +1,13 @@ +// +// searchViewController.h +// TalkinToTheNet +// +// Created by Diana Elezaj on 9/24/15. +// Copyright © 2015 Mike Kavouras. All rights reserved. +// + +#import + +@interface searchViewController : UIViewController + +@end diff --git a/TalkinToTheNet/TalkinToTheNet/searchViewController.m b/TalkinToTheNet/TalkinToTheNet/searchViewController.m new file mode 100644 index 0000000..124787b --- /dev/null +++ b/TalkinToTheNet/TalkinToTheNet/searchViewController.m @@ -0,0 +1,193 @@ +// +// searchViewController.m +// TalkinToTheNet +// +// Created by Diana Elezaj on 9/24/15. +// Copyright © 2015 Mike Kavouras. All rights reserved. +// + +#import "searchViewController.h" +#import "APIManager.h" +#import "searchResults.h" +#import "DetailsTableViewController.h" +#import "ViewController.h" +#import "CustomTableViewCell.h" + +@interface searchViewController () +< +UITableViewDataSource, +UITableViewDelegate, +UITextFieldDelegate +> +@property (weak, nonatomic) IBOutlet UITextField *searchTextField; +@property (weak, nonatomic) IBOutlet UITextField *locationTextField; +@property (weak, nonatomic) IBOutlet UITableView *tableView; +@property (nonatomic) NSMutableArray *searchResults; + +@end + +@implementation searchViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + self.tableView.dataSource = self; + self.tableView.delegate = self; + self.searchTextField.delegate = self; + self.locationTextField.delegate = self; + self.view.backgroundColor = [UIColor colorWithRed:0.91 green:0.95 blue:0.98 alpha:1.0]; +} + +-(void) makeNewAPIRequestWithSearchTerm:(NSString *)searchTerm + andLocation:(NSString*) searchLocation + callBackBlock:(void(^)())block { + + if ([searchLocation isEqualToString:@""] || [searchTerm isEqualToString:@""]) { + + + + + UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"No results!" message:@"Please fill out the textfields" preferredStyle:UIAlertControllerStyleAlert]; + + UIAlertAction* ok = [UIAlertAction + actionWithTitle:@"OK" + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) + { + [alertController dismissViewControllerAnimated:YES completion:nil]; + + }]; + [alertController addAction:ok]; + + [self presentViewController:alertController animated:YES + completion:nil]; + NSLog(@"both empty"); + } + else { + if ([searchLocation isEqualToString:@""]) { + searchLocation = @"New York"; + NSLog(@"location is empty"); + } + NSString *urlString = [NSString stringWithFormat:@"https://api.foursquare.com/v2/venues/search?near=%@&query=%@&client_id=HFUCKJHNO0CLHVKGCCVDZXSLNAERSCXTMAJY35DQOHYRVWXV&client_secret=OACRH5SEMEHGRHE2PKPJY0DLR5NLKLBM202DEHL3HFKNWCDU&v=20150924",searchLocation, searchTerm]; + + //encoded url + NSString *encodedString = [urlString stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]]; + + NSLog(@"encodedString %@",encodedString); + + //convert urlString to url + NSURL *url = [NSURL URLWithString:encodedString]; + + [APIManager GETRequestWithURL:url completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { + + if (data != nil) { + NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil]; + NSArray *results = [[json objectForKey:@"response"] objectForKey:@"venues"]; + + self.searchResults = [[NSMutableArray alloc] init]; + + for (NSDictionary *result in results) { + + NSString *placeName = [result objectForKey:@"name"]; + NSString *address = [[result objectForKey:@"location"] objectForKey:@"address"]; + NSString *city = [[result objectForKey:@"location"] objectForKey:@"city"]; + NSString *state = [[result objectForKey:@"location"] objectForKey:@"state"]; + NSString *postalCode = [[result objectForKey:@"location"] objectForKey:@"postalCode"]; + NSString *phoneNumber = [[result objectForKey:@"contact"] objectForKey:@"formattedPhone"]; + NSString *urlDone = [result objectForKey:@"url"]; + + searchResults *newObject = [[searchResults alloc] init]; + newObject.name = placeName; + newObject.formattedPhone = phoneNumber; + newObject.fullAddress = [NSString stringWithFormat:@"%@ %@, %@ %@", address, city, state, postalCode]; + newObject.url = urlDone; + newObject.checkIns = [[[result objectForKey:@"stats"] objectForKey:@"checkinsCount"] stringValue]; + + [self.searchResults addObject:newObject]; + } + block(); + } + }]; + } +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; +} + +# pragma mark -tableView delegate methods + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{ + return 1; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ + return self.searchResults.count; +} + +-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ + CustomTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"CellIdentifier" forIndexPath:indexPath]; + + searchResults * result = [self.searchResults objectAtIndex:indexPath.row]; + + cell.nameLabel.text = result.name; + cell.phoneLabel.text = [NSString stringWithFormat:@"Phone: %@", result.formattedPhone]; + cell.addressLabel.text = [NSString stringWithFormat:@"Address: %@",result.fullAddress]; + cell.urlLabel.text = [NSString stringWithFormat:@"Website: %@",result.url]; + + return cell; +} + +# pragma mark - text field delegate methods +-(BOOL) textFieldShouldReturn:(UITextField *)textField { + + [self.view endEditing:YES]; + NSString * query = self.searchTextField.text; + + [self makeNewAPIRequestWithSearchTerm:query andLocation:textField.text callBackBlock:^{ + [self.tableView reloadData]; + }]; + return YES; +} + +#pragma mark Cells color +- (void)tableView: (UITableView*)tableView + willDisplayCell: (UITableViewCell*)cell +forRowAtIndexPath: (NSIndexPath*)indexPath +{ + cell.backgroundColor = indexPath.row % 2 + ? [UIColor colorWithRed:0.91 green:0.95 blue:0.98 alpha:1.0] + : [UIColor whiteColor]; + +} + +#pragma mark Convert Name to tag + +- (NSString *)convertNameToTag: (NSString *)name{ + + NSString *removeApostrophe = [name stringByReplacingOccurrencesOfString:@"'" withString:@""]; + NSString *removeAmpersand = [removeApostrophe stringByReplacingOccurrencesOfString:@"&" withString:@"and"]; + NSString *removeDash = [removeAmpersand stringByReplacingOccurrencesOfString:@"-" withString:@""]; + NSString *fixE = [removeDash stringByReplacingOccurrencesOfString:@"é" withString:@"e"]; + NSString *removeSpaces = [fixE stringByReplacingOccurrencesOfString:@" " withString:@""]; + NSString *tagName = [removeSpaces lowercaseString]; + + return tagName; +} + +#pragma mark - Navigation + +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + + NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow]; + + searchResults *userSelection = self.searchResults [indexPath.row]; + + NSString *currentResultTagName = [self convertNameToTag:userSelection.name]; + + DetailsTableViewController *vc = segue.destinationViewController; + + vc.placeName = currentResultTagName; + +} + +@end