diff --git a/.gitignore b/.gitignore
index 2d4bcee..3bd0022 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,3 +18,4 @@ sparkle/release
sparkle/release/*
sparkle/config/dsa_priv.pem
*.dat*
+vendor
\ No newline at end of file
diff --git a/Rakefile b/Rakefile
index aae995d..4c9a016 100644
--- a/Rakefile
+++ b/Rakefile
@@ -27,7 +27,7 @@ Motion::Project::App.setup do |app|
app.sparkle do
release :base_url, 'https://raw.github.com/kyan/kyan_bar/master'
release :package_base_url, 'https://github.com/kyan/kyan_bar/releases/download'
- release :version, '1.3.3'
+ release :version, '1.3.2'
# Optional settings
release :feed_filename, 'releases.xml'
diff --git a/release_notes.html b/release_notes.html
index 57e17c8..3b7628a 100644
--- a/release_notes.html
+++ b/release_notes.html
@@ -1,12 +1,12 @@
-KyanBar - version 1.3.1
+KyanBar - version 1.3.2
-----------------------
NOTE:
-This update will blitz your preferences as the app identifier on OSX
-was incorrect. Sorry, but this will be the only time this is required.
+Tweaks for Yosemite.
Updates:
-* Use correct app identifier
-* layout fix and optimisations
\ No newline at end of file
+* Fix the choose hotkeys mapped to voting
+* Layout and padding changes
+* Don't show focus ring on vote buttons
\ No newline at end of file
diff --git a/releases.xml b/releases.xml
index 19c7355..a60376a 100644
--- a/releases.xml
+++ b/releases.xml
@@ -14,23 +14,23 @@
en
- Fri, 14 Feb 2014 08:54:40 +0000
+ Wed, 28 Jan 2015 13:48:34 +0000
-
- KyanBar 1.3.1
+ KyanBar 1.3.2
- Fri, 14 Feb 2014 08:54:40 +0000
+ Wed, 28 Jan 2015 13:48:34 +0000
- KyanBar-1.3.1
+ KyanBar-1.3.2
https://raw.github.com/kyan/kyan_bar/master/release_notes.html
-
+
diff --git a/vendor/Podfile.lock b/vendor/Podfile.lock
deleted file mode 100644
index 0d2e2bb..0000000
--- a/vendor/Podfile.lock
+++ /dev/null
@@ -1,33 +0,0 @@
-PODS:
- - AFNetworking (2.5.0):
- - AFNetworking/NSURLConnection (= 2.5.0)
- - AFNetworking/NSURLSession (= 2.5.0)
- - AFNetworking/Reachability (= 2.5.0)
- - AFNetworking/Security (= 2.5.0)
- - AFNetworking/Serialization (= 2.5.0)
- - AFNetworking/UIKit (= 2.5.0)
- - AFNetworking/NSURLConnection (2.5.0):
- - AFNetworking/Reachability
- - AFNetworking/Security
- - AFNetworking/Serialization
- - AFNetworking/NSURLSession (2.5.0):
- - AFNetworking/Reachability
- - AFNetworking/Security
- - AFNetworking/Serialization
- - AFNetworking/Reachability (2.5.0)
- - AFNetworking/Security (2.5.0)
- - AFNetworking/Serialization (2.5.0)
- - MASShortcut (2.1.1)
- - SocketRocket (0.2.0)
-
-DEPENDENCIES:
- - AFNetworking (~> 2.0)
- - MASShortcut
- - SocketRocket
-
-SPEC CHECKSUMS:
- AFNetworking: 0f54cb5d16ce38c1b76948faffb8d5fb705021c7
- MASShortcut: eaf6fc60ae9742d21312b2463c4ac25bcdb27f24
- SocketRocket: 6c9cfd1592bea82262b4283dcda3a7de166af3b6
-
-COCOAPODS: 0.35.0
diff --git a/vendor/Pods/.build/libPods-AFNetworking.a b/vendor/Pods/.build/libPods-AFNetworking.a
deleted file mode 100644
index c92d889..0000000
Binary files a/vendor/Pods/.build/libPods-AFNetworking.a and /dev/null differ
diff --git a/vendor/Pods/.build/libPods-MASShortcut.a b/vendor/Pods/.build/libPods-MASShortcut.a
deleted file mode 100644
index 395ff1e..0000000
Binary files a/vendor/Pods/.build/libPods-MASShortcut.a and /dev/null differ
diff --git a/vendor/Pods/.build/libPods-SocketRocket.a b/vendor/Pods/.build/libPods-SocketRocket.a
deleted file mode 100644
index 4724d6f..0000000
Binary files a/vendor/Pods/.build/libPods-SocketRocket.a and /dev/null differ
diff --git a/vendor/Pods/.build/libPods.a b/vendor/Pods/.build/libPods.a
deleted file mode 100644
index 70798dd..0000000
Binary files a/vendor/Pods/.build/libPods.a and /dev/null differ
diff --git a/vendor/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.h b/vendor/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.h
deleted file mode 100644
index dfa82f6..0000000
--- a/vendor/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.h
+++ /dev/null
@@ -1,67 +0,0 @@
-// AFHTTPRequestOperation.h
-//
-// Copyright (c) 2013-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 "AFURLConnectionOperation.h"
-
-/**
- `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) 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) 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:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
- failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;
-
-@end
diff --git a/vendor/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.m b/vendor/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.m
deleted file mode 100644
index 1de5812..0000000
--- a/vendor/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.m
+++ /dev/null
@@ -1,206 +0,0 @@
-// AFHTTPRequestOperation.m
-//
-// Copyright (c) 2013-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 "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 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/vendor/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.h b/vendor/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.h
deleted file mode 100644
index 9f39029..0000000
--- a/vendor/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.h
+++ /dev/null
@@ -1,308 +0,0 @@
-// AFHTTPRequestOperationManager.h
-//
-// Copyright (c) 2013-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
-#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"
-
-/**
- `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) 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) 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.
- */
-@property (nonatomic, strong) dispatch_queue_t completionQueue;
-
-/**
- The dispatch group for the `completionBlock` of request operations. If `NULL` (default), a private dispatch group is used.
- */
-@property (nonatomic, strong) dispatch_group_t completionGroup;
-
-///---------------------------------------------
-/// @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:(NSURL *)url;
-
-///---------------------------------------
-/// @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:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
- failure:(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:
- */
-- (AFHTTPRequestOperation *)GET:(NSString *)URLString
- parameters:(id)parameters
- success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
- failure:(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:
- */
-- (AFHTTPRequestOperation *)HEAD:(NSString *)URLString
- parameters:(id)parameters
- success:(void (^)(AFHTTPRequestOperation *operation))success
- failure:(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:
- */
-- (AFHTTPRequestOperation *)POST:(NSString *)URLString
- parameters:(id)parameters
- success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
- failure:(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:
- */
-- (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;
-
-/**
- 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:
- */
-- (AFHTTPRequestOperation *)PUT:(NSString *)URLString
- parameters:(id)parameters
- success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
- failure:(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:
- */
-- (AFHTTPRequestOperation *)PATCH:(NSString *)URLString
- parameters:(id)parameters
- success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
- failure:(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:
- */
-- (AFHTTPRequestOperation *)DELETE:(NSString *)URLString
- parameters:(id)parameters
- success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
- failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;
-
-@end
-
diff --git a/vendor/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.m b/vendor/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.m
deleted file mode 100644
index 4ae7275..0000000
--- a/vendor/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.m
+++ /dev/null
@@ -1,253 +0,0 @@
-// AFHTTPRequestOperationManager.m
-//
-// Copyright (c) 2013-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 "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 *)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
-{
- NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:@"GET" URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters error:nil];
- AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithRequest:request 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
-{
- NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:@"HEAD" URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters error:nil];
- AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithRequest:request 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
-{
- NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:@"POST" URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters error:nil];
- AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithRequest:request 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
-{
- NSMutableURLRequest *request = [self.requestSerializer multipartFormRequestWithMethod:@"POST" URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters constructingBodyWithBlock:block error: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
-{
- NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:@"PUT" URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters error:nil];
- AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithRequest:request 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
-{
- NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:@"PATCH" URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters error:nil];
- AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithRequest:request 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
-{
- NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:@"DELETE" URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters error:nil];
- AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithRequest:request 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/vendor/Pods/AFNetworking/AFNetworking/AFHTTPSessionManager.h b/vendor/Pods/AFNetworking/AFNetworking/AFHTTPSessionManager.h
deleted file mode 100644
index 8fed5a6..0000000
--- a/vendor/Pods/AFNetworking/AFNetworking/AFHTTPSessionManager.h
+++ /dev/null
@@ -1,240 +0,0 @@
-// AFHTTPSessionManager.h
-//
-// Copyright (c) 2013-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
-#import
-
-#if __IPHONE_OS_VERSION_MIN_REQUIRED
-#import
-#else
-#import
-#endif
-
-#import "AFURLSessionManager.h"
-
-/**
- `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)
-
-@interface AFHTTPSessionManager : AFURLSessionManager
-
-/**
- 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) 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:(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:(NSURL *)url
- sessionConfiguration:(NSURLSessionConfiguration *)configuration;
-
-///---------------------------
-/// @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:
- */
-- (NSURLSessionDataTask *)GET:(NSString *)URLString
- parameters:(id)parameters
- success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
- failure:(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:
- */
-- (NSURLSessionDataTask *)HEAD:(NSString *)URLString
- parameters:(id)parameters
- success:(void (^)(NSURLSessionDataTask *task))success
- failure:(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:
- */
-- (NSURLSessionDataTask *)POST:(NSString *)URLString
- parameters:(id)parameters
- success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
- failure:(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:
- */
-- (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;
-
-/**
- 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:
- */
-- (NSURLSessionDataTask *)PUT:(NSString *)URLString
- parameters:(id)parameters
- success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
- failure:(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:
- */
-- (NSURLSessionDataTask *)PATCH:(NSString *)URLString
- parameters:(id)parameters
- success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
- failure:(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:
- */
-- (NSURLSessionDataTask *)DELETE:(NSString *)URLString
- parameters:(id)parameters
- success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
- failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;
-
-@end
-
-#endif
diff --git a/vendor/Pods/AFNetworking/AFNetworking/AFHTTPSessionManager.m b/vendor/Pods/AFNetworking/AFNetworking/AFHTTPSessionManager.m
deleted file mode 100644
index 6413297..0000000
--- a/vendor/Pods/AFNetworking/AFNetworking/AFHTTPSessionManager.m
+++ /dev/null
@@ -1,321 +0,0 @@
-// AFHTTPSessionManager.m
-//
-// Copyright (c) 2013-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 "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)
-
-#import "AFURLRequestSerialization.h"
-#import "AFURLResponseSerialization.h"
-
-#import
-#import
-
-#ifdef _SYSTEMCONFIGURATION_H
-#import
-#import
-#import
-#import
-#import
-#endif
-
-#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
-#import
-#endif
-
-@interface AFHTTPSessionManager ()
-@property (readwrite, nonatomic, strong) NSURL *baseURL;
-@end
-
-@implementation AFHTTPSessionManager
-
-+ (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/vendor/Pods/AFNetworking/AFNetworking/AFNetworkReachabilityManager.h b/vendor/Pods/AFNetworking/AFNetworking/AFNetworkReachabilityManager.h
deleted file mode 100644
index 5e610d8..0000000
--- a/vendor/Pods/AFNetworking/AFNetworking/AFNetworkReachabilityManager.h
+++ /dev/null
@@ -1,193 +0,0 @@
-// AFNetworkReachabilityManager.h
-//
-// Copyright (c) 2013-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
-
-typedef NS_ENUM(NSInteger, AFNetworkReachabilityStatus) {
- AFNetworkReachabilityStatusUnknown = -1,
- AFNetworkReachabilityStatusNotReachable = 0,
- AFNetworkReachabilityStatusReachableViaWWAN = 1,
- AFNetworkReachabilityStatusReachableViaWiFi = 2,
-};
-
-/**
- `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;
-
-///--------------------------------------------------
-/// @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:(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);
diff --git a/vendor/Pods/AFNetworking/AFNetworking/AFNetworkReachabilityManager.m b/vendor/Pods/AFNetworking/AFNetworking/AFNetworkReachabilityManager.m
deleted file mode 100644
index 1da1482..0000000
--- a/vendor/Pods/AFNetworking/AFNetworking/AFNetworkReachabilityManager.m
+++ /dev/null
@@ -1,259 +0,0 @@
-// AFNetworkReachabilityManager.m
-//
-// Copyright (c) 2013-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 "AFNetworkReachabilityManager.h"
-
-#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];
- [notificationCenter postNotificationName:AFNetworkingReachabilityDidChangeNotification object:nil userInfo:@{ AFNetworkingReachabilityNotificationStatusItem: @(status) }];
- });
-
-}
-
-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, assign) SCNetworkReachabilityRef 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 = reachability;
- self.networkReachabilityStatus = AFNetworkReachabilityStatusUnknown;
-
- return self;
-}
-
-- (void)dealloc {
- [self stopMonitoring];
-
- if (_networkReachability) {
- CFRelease(_networkReachability);
- _networkReachability = NULL;
- }
-}
-
-#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);
- }
-
- };
-
- SCNetworkReachabilityContext context = {0, (__bridge void *)callback, AFNetworkReachabilityRetainCallback, AFNetworkReachabilityReleaseCallback, NULL};
- SCNetworkReachabilitySetCallback(self.networkReachability, AFNetworkReachabilityCallback, &context);
- SCNetworkReachabilityScheduleWithRunLoop(self.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(self.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(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
diff --git a/vendor/Pods/AFNetworking/AFNetworking/AFNetworking.h b/vendor/Pods/AFNetworking/AFNetworking/AFNetworking.h
deleted file mode 100644
index 68273da..0000000
--- a/vendor/Pods/AFNetworking/AFNetworking/AFNetworking.h
+++ /dev/null
@@ -1,44 +0,0 @@
-// 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"
- #import "AFNetworkReachabilityManager.h"
-
- #import "AFURLConnectionOperation.h"
- #import "AFHTTPRequestOperation.h"
- #import "AFHTTPRequestOperationManager.h"
-
-#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 ) )
- #import "AFURLSessionManager.h"
- #import "AFHTTPSessionManager.h"
-#endif
-
-#endif /* _AFNETWORKING_ */
diff --git a/vendor/Pods/AFNetworking/AFNetworking/AFSecurityPolicy.h b/vendor/Pods/AFNetworking/AFNetworking/AFSecurityPolicy.h
deleted file mode 100644
index a880d75..0000000
--- a/vendor/Pods/AFNetworking/AFNetworking/AFSecurityPolicy.h
+++ /dev/null
@@ -1,143 +0,0 @@
-// AFSecurity.h
-//
-// Copyright (c) 2013-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
-
-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.
- */
-@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;
-
-/**
- Whether to evaluate an entire SSL certificate chain, or just the leaf certificate. Defaults to `YES`.
- */
-@property (nonatomic, assign) BOOL validatesCertificateChain;
-
-/**
- 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.
- */
-@property (nonatomic, strong) 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` for `AFSSLPinningModePublicKey` or `AFSSLPinningModeCertificate`, otherwise `NO`.
- */
-@property (nonatomic, assign) BOOL validatesDomainName;
-
-///-----------------------------------------
-/// @name Getting Specific Security Policies
-///-----------------------------------------
-
-/**
- Returns the shared default security policy, which does not allow invalid certificates, does not validate 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:(NSString *)domain;
-
-@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/vendor/Pods/AFNetworking/AFNetworking/AFSecurityPolicy.m b/vendor/Pods/AFNetworking/AFNetworking/AFSecurityPolicy.m
deleted file mode 100644
index 1f97f91..0000000
--- a/vendor/Pods/AFNetworking/AFNetworking/AFSecurityPolicy.m
+++ /dev/null
@@ -1,335 +0,0 @@
-// AFSecurity.m
-//
-// Copyright (c) 2013-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 "AFSecurityPolicy.h"
-
-// Equivalent of macro in , without causing compiler warning:
-// "'DebugAssert' is deprecated: first deprecated in OS X 10.8"
-#ifndef AF_Require
- #define AF_Require(assertion, exceptionLabel) \
- do { \
- if (__builtin_expect(!(assertion), 0)) { \
- goto exceptionLabel; \
- } \
- } while (0)
-#endif
-
-#ifndef AF_Require_noErr
- #define AF_Require_noErr(errorCode, exceptionLabel) \
- do { \
- if (__builtin_expect(0 != (errorCode), 0)) { \
- goto exceptionLabel; \
- } \
- } while (0)
-#endif
-
-#if !defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
-static NSData * AFSecKeyGetData(SecKeyRef key) {
- CFDataRef data = NULL;
-
- AF_Require_noErr(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 defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
- 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);
- AF_Require(allowedCertificate != NULL, _out);
-
- allowedCertificates[0] = allowedCertificate;
- tempCertificates = CFArrayCreate(NULL, (const void **)allowedCertificates, 1, NULL);
-
- policy = SecPolicyCreateBasicX509();
- AF_Require_noErr(SecTrustCreateWithCertificates(tempCertificates, policy, &allowedTrust), _out);
- AF_Require_noErr(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;
- AF_Require_noErr(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;
- AF_Require_noErr(SecTrustCreateWithCertificates(certificates, policy, &trust), _out);
-
- SecTrustResultType result;
- AF_Require_noErr(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.validatesCertificateChain = YES;
-
- return self;
-}
-
-#pragma mark -
-
-- (void)setSSLPinningMode:(AFSSLPinningMode)SSLPinningMode {
- _SSLPinningMode = SSLPinningMode;
-
- switch (self.SSLPinningMode) {
- case AFSSLPinningModePublicKey:
- case AFSSLPinningModeCertificate:
- self.validatesDomainName = YES;
- break;
- default:
- self.validatesDomainName = NO;
- break;
- }
-}
-
-- (void)setPinnedCertificates:(NSArray *)pinnedCertificates {
- _pinnedCertificates = pinnedCertificates;
-
- 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
-{
- 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 (!AFServerTrustIsValid(serverTrust) && !self.allowInvalidCertificates) {
- return NO;
- }
-
- NSArray *serverCertificates = AFCertificateTrustChainForServerTrust(serverTrust);
- switch (self.SSLPinningMode) {
- case AFSSLPinningModeNone:
- return YES;
- 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;
- }
-
- if (!self.validatesCertificateChain) {
- return YES;
- }
-
- NSUInteger trustedCertificateCount = 0;
- for (NSData *trustChainCertificate in serverCertificates) {
- if ([self.pinnedCertificates containsObject:trustChainCertificate]) {
- trustedCertificateCount++;
- }
- }
-
- return trustedCertificateCount == [serverCertificates count];
- }
- case AFSSLPinningModePublicKey: {
- NSUInteger trustedPublicKeyCount = 0;
- NSArray *publicKeys = AFPublicKeyTrustChainForServerTrust(serverTrust);
- if (!self.validatesCertificateChain && [publicKeys count] > 0) {
- publicKeys = @[[publicKeys firstObject]];
- }
-
- for (id trustChainPublicKey in publicKeys) {
- for (id pinnedPublicKey in self.pinnedPublicKeys) {
- if (AFSecKeyIsEqualToKey((__bridge SecKeyRef)trustChainPublicKey, (__bridge SecKeyRef)pinnedPublicKey)) {
- trustedPublicKeyCount += 1;
- }
- }
- }
-
- return trustedPublicKeyCount > 0 && ((self.validatesCertificateChain && trustedPublicKeyCount == [serverCertificates count]) || (!self.validatesCertificateChain && trustedPublicKeyCount >= 1));
- }
- }
-
- return NO;
-}
-
-#pragma mark - NSKeyValueObserving
-
-+ (NSSet *)keyPathsForValuesAffectingPinnedPublicKeys {
- return [NSSet setWithObject:@"pinnedCertificates"];
-}
-
-@end
diff --git a/vendor/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.h b/vendor/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.h
deleted file mode 100644
index 8543556..0000000
--- a/vendor/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.h
+++ /dev/null
@@ -1,328 +0,0 @@
-// AFURLConnectionOperation.h
-//
-// Copyright (c) 2013-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
-#import "AFURLRequestSerialization.h"
-#import "AFURLResponseSerialization.h"
-#import "AFSecurityPolicy.h"
-
-/**
- `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.
-
- ## App Extensions
-
- When using AFNetworking in an App Extension, `#define AF_APP_EXTENSIONS` to avoid using unavailable APIs.
-
- ## 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.
- */
-
-@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) NSURLResponse *response;
-
-/**
- The error, if any, that occurred in the lifecycle of the request.
- */
-@property (readonly, nonatomic, strong) NSError *error;
-
-///----------------------------
-/// @name Getting Response Data
-///----------------------------
-
-/**
- The data received during the request.
- */
-@property (readonly, nonatomic, strong) NSData *responseData;
-
-/**
- The string representation of the response data.
- */
-@property (readonly, nonatomic, copy) 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) 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) NSOutputStream *outputStream;
-
-///---------------------------------
-/// @name Managing Callback Queues
-///---------------------------------
-
-/**
- The dispatch queue for `completionBlock`. If `NULL` (default), the main queue is used.
- */
-@property (nonatomic, strong) dispatch_queue_t completionQueue;
-
-/**
- The dispatch group for `completionBlock`. If `NULL` (default), a private dispatch group is used.
- */
-@property (nonatomic, strong) dispatch_group_t completionGroup;
-
-///---------------------------------------------
-/// @name Managing Request Operation Information
-///---------------------------------------------
-
-/**
- The user info dictionary for the receiver.
- */
-@property (nonatomic, strong) NSDictionary *userInfo;
-
-///------------------------------------------------------
-/// @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;
-
-///----------------------------------
-/// @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) && !defined(AF_APP_EXTENSIONS)
-- (void)setShouldExecuteAsBackgroundTaskWithExpirationHandler:(void (^)(void))handler;
-#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:(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:(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:(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:(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:(NSCachedURLResponse * (^)(NSURLConnection *connection, NSCachedURLResponse *cachedResponse))block;
-
-///
-
-/**
-
- */
-+ (NSArray *)batchOfRequestOperations:(NSArray *)operations
- progressBlock:(void (^)(NSUInteger numberOfFinishedOperations, NSUInteger totalNumberOfOperations))progressBlock
- completionBlock:(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;
diff --git a/vendor/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.m b/vendor/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.m
deleted file mode 100644
index cfe609a..0000000
--- a/vendor/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.m
+++ /dev/null
@@ -1,789 +0,0 @@
-// AFURLConnectionOperation.m
-//
-// Copyright (c) 2013-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 "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,
-};
-
-#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && !defined(AF_APP_EXTENSIONS)
-typedef UIBackgroundTaskIdentifier AFBackgroundTaskIdentifier;
-#else
-typedef id AFBackgroundTaskIdentifier;
-#endif
-
-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);
-
-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, assign) AFBackgroundTaskIdentifier backgroundTaskIdentifier;
-@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;
-}
-
-- (void)dealloc {
- if (_outputStream) {
- [_outputStream close];
- _outputStream = nil;
- }
-
-#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && !defined(AF_APP_EXTENSIONS)
- if (_backgroundTaskIdentifier) {
- [[UIApplication sharedApplication] endBackgroundTask:_backgroundTaskIdentifier];
- _backgroundTaskIdentifier = UIBackgroundTaskInvalid;
- }
-#endif
-}
-
-#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) && !defined(AF_APP_EXTENSIONS)
-- (void)setShouldExecuteAsBackgroundTaskWithExpirationHandler:(void (^)(void))handler {
- [self.lock lock];
- if (!self.backgroundTaskIdentifier) {
- UIApplication *application = [UIApplication sharedApplication];
- __weak __typeof(self)weakSelf = self;
- self.backgroundTaskIdentifier = [application beginBackgroundTaskWithExpirationHandler:^{
- __strong __typeof(weakSelf)strongSelf = weakSelf;
-
- if (handler) {
- handler();
- }
-
- if (strongSelf) {
- [strongSelf cancel];
-
- [application endBackgroundTask:strongSelf.backgroundTaskIdentifier];
- strongSelf.backgroundTaskIdentifier = UIBackgroundTaskInvalid;
- }
- }];
- }
- [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 = [NSDictionary dictionaryWithObject:[self.request URL] forKey:NSURLErrorFailingURLErrorKey];
- }
- 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 {
- // Accomodate 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/vendor/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h b/vendor/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h
deleted file mode 100644
index aed4549..0000000
--- a/vendor/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h
+++ /dev/null
@@ -1,463 +0,0 @@
-// AFSerialization.h
-//
-// Copyright (c) 2013-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
-#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
-#import
-#endif
-
-/**
- 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.
- */
-- (NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request
- withParameters:(id)parameters
- error:(NSError * __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.
- */
-@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:(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`
- */
-- (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:(NSString * (^)(NSURLRequest *request, NSDictionary *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 occured while constructing the request.
-
- @return An `NSMutableURLRequest` object.
- */
-- (NSMutableURLRequest *)requestWithMethod:(NSString *)method
- URLString:(NSString *)URLString
- parameters:(id)parameters
- error:(NSError * __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 occured while constructing the request.
-
- @return An `NSMutableURLRequest` object
- */
-- (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method
- URLString:(NSString *)URLString
- parameters:(NSDictionary *)parameters
- constructingBodyWithBlock:(void (^)(id formData))block
- error:(NSError * __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.
- @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:(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 * __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 * __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:(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:(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;
diff --git a/vendor/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.m b/vendor/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.m
deleted file mode 100644
index a56e854..0000000
--- a/vendor/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.m
+++ /dev/null
@@ -1,1339 +0,0 @@
-// AFSerialization.h
-//
-// Copyright (c) 2013-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 "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, NSDictionary *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];
-}
-
-static NSString * const kAFCharactersToBeEscapedInQueryString = @":/?&=;+!@#$()',*";
-
-static NSString * AFPercentEscapedQueryStringKeyFromStringWithEncoding(NSString *string, NSStringEncoding encoding) {
- static NSString * const kAFCharactersToLeaveUnescapedInQueryStringPairKey = @"[].";
-
- return (__bridge_transfer NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (__bridge CFStringRef)string, (__bridge CFStringRef)kAFCharactersToLeaveUnescapedInQueryStringPairKey, (__bridge CFStringRef)kAFCharactersToBeEscapedInQueryString, CFStringConvertNSStringEncodingToEncoding(encoding));
-}
-
-static NSString * AFPercentEscapedQueryStringValueFromStringWithEncoding(NSString *string, NSStringEncoding encoding) {
- return (__bridge_transfer NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (__bridge CFStringRef)string, NULL, (__bridge CFStringRef)kAFCharactersToBeEscapedInQueryString, CFStringConvertNSStringEncodingToEncoding(encoding));
-}
-
-#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 *)URLEncodedStringValueWithEncoding:(NSStringEncoding)stringEncoding;
-@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 *)URLEncodedStringValueWithEncoding:(NSStringEncoding)stringEncoding {
- if (!self.value || [self.value isEqual:[NSNull null]]) {
- return AFPercentEscapedQueryStringKeyFromStringWithEncoding([self.field description], stringEncoding);
- } else {
- return [NSString stringWithFormat:@"%@=%@", AFPercentEscapedQueryStringKeyFromStringWithEncoding([self.field description], stringEncoding), AFPercentEscapedQueryStringValueFromStringWithEncoding([self.value description], stringEncoding)];
- }
-}
-
-@end
-
-#pragma mark -
-
-extern NSArray * AFQueryStringPairsFromDictionary(NSDictionary *dictionary);
-extern NSArray * AFQueryStringPairsFromKeyAndValue(NSString *key, id value);
-
-static NSString * AFQueryStringFromParametersWithEncoding(NSDictionary *parameters, NSStringEncoding stringEncoding) {
- NSMutableArray *mutablePairs = [NSMutableArray array];
- for (AFQueryStringPair *pair in AFQueryStringPairsFromDictionary(parameters)) {
- [mutablePairs addObject:[pair URLEncodedStringValueWithEncoding:stringEncoding]];
- }
-
- 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 objectForKey: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 defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
- // 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] objectForKey:(__bridge NSString *)kCFBundleExecutableKey] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleIdentifierKey], [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleVersionKey], [[UIDevice currentDevice] model], [[UIDevice currentDevice] systemVersion], [[UIScreen mainScreen] scale]];
-#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
- userAgent = [NSString stringWithFormat:@"%@/%@ (Mac OS X %@)", [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleExecutableKey] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleIdentifierKey], [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__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 -
-
-- (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 *, NSDictionary *, 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
-{
- if (!request.HTTPBodyStream) {
- return [request mutableCopy];
- }
-
- 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 = AFQueryStringFromParametersWithEncoding(parameters, self.stringEncoding);
- 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
-
-- (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 objectForKey: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 objectAtIndex:0] 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/vendor/Pods/AFNetworking/AFNetworking/AFURLResponseSerialization.h b/vendor/Pods/AFNetworking/AFNetworking/AFURLResponseSerialization.h
deleted file mode 100644
index 030e8fa..0000000
--- a/vendor/Pods/AFNetworking/AFNetworking/AFURLResponseSerialization.h
+++ /dev/null
@@ -1,310 +0,0 @@
-// AFSerialization.h
-//
-// Copyright (c) 2013-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
-
-/**
- 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.
- */
-- (id)responseObjectForResponse:(NSURLResponse *)response
- data:(NSData *)data
- error:(NSError *__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 parameters.
- */
-@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) 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) 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:(NSHTTPURLResponse *)response
- data:(NSData *)data
- error:(NSError *__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;
-
-
diff --git a/vendor/Pods/AFNetworking/AFNetworking/AFURLResponseSerialization.m b/vendor/Pods/AFNetworking/AFNetworking/AFURLResponseSerialization.m
deleted file mode 100644
index 083d30c..0000000
--- a/vendor/Pods/AFNetworking/AFNetworking/AFURLResponseSerialization.m
+++ /dev/null
@@ -1,793 +0,0 @@
-// AFSerialization.h
-//
-// Copyright (c) 2013-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 "AFURLResponseSerialization.h"
-
-#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
-#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 objectForKey:key];
- if (!value || [value isEqual:[NSNull null]]) {
- [mutableDictionary removeObjectForKey:key];
- } else if ([value isKindOfClass:[NSArray class]] || [value isKindOfClass:[NSDictionary class]]) {
- [mutableDictionary setObject:AFJSONObjectByRemovingKeysWithNullValues(value, readingOptions) forKey:key];
- }
- }
-
- 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
-
-static UIImage * AFImageWithDataAtScale(NSData *data, CGFloat scale) {
- UIImage *image = [[UIImage alloc] initWithData:data];
-
- 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);
-
- // CGImageCreateWithJPEGDataProvider does not properly handle CMKY, so if so, fall back to AFImageWithDataAtScale
- if (imageRef) {
- CGColorSpaceRef imageColorSpace = CGImageGetColorSpace(imageRef);
- CGColorSpaceModel imageColorSpaceModel = CGColorSpaceGetModel(imageColorSpace);
- 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;
- }
-
- size_t bytesPerRow = 0; // CGImageGetBytesPerRow() calculates incorrectly in iOS 5.0, so defer to CGBitmapContextCreate
- 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 defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
- self.imageScale = [[UIScreen mainScreen] scale];
- 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/vendor/Pods/AFNetworking/AFNetworking/AFURLSessionManager.h b/vendor/Pods/AFNetworking/AFNetworking/AFURLSessionManager.h
deleted file mode 100644
index f475773..0000000
--- a/vendor/Pods/AFNetworking/AFNetworking/AFURLSessionManager.h
+++ /dev/null
@@ -1,531 +0,0 @@
-// AFURLSessionManager.h
-//
-// Copyright (c) 2013-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 "AFURLResponseSerialization.h"
-#import "AFURLRequestSerialization.h"
-#import "AFSecurityPolicy.h"
-#import "AFNetworkReachabilityManager.h"
-
-/**
- `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.
- */
-
-#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)
-
-@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;
-
-///--------------------------------------
-/// @name Monitoring Network Reachability
-///--------------------------------------
-
-/**
- The network reachability manager. `AFURLSessionManager` uses the `sharedManager` by default.
- */
-@property (readwrite, nonatomic, strong) AFNetworkReachabilityManager *reachabilityManager;
-
-///----------------------------
-/// @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.
- */
-@property (nonatomic, strong) dispatch_queue_t completionQueue;
-
-/**
- The dispatch group for `completionBlock`. If `NULL` (default), a private dispatch group is used.
- */
-@property (nonatomic, strong) dispatch_group_t completionGroup;
-
-///---------------------------------
-/// @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:(NSURLSessionConfiguration *)configuration;
-
-/**
- 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:(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 * __autoreleasing *)progress
- completionHandler:(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:(NSData *)bodyData
- progress:(NSProgress * __autoreleasing *)progress
- completionHandler:(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 * __autoreleasing *)progress
- completionHandler:(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 * __autoreleasing *)progress
- destination:(NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination
- completionHandler:(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 * __autoreleasing *)progress
- destination:(NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination
- completionHandler:(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.
- */
-- (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.
- */
-- (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:(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:(NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *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:(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:(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:(NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLSessionTask *task, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *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:(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:(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:(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:(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:(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:(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:(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:(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:(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:(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;
diff --git a/vendor/Pods/AFNetworking/AFNetworking/AFURLSessionManager.m b/vendor/Pods/AFNetworking/AFNetworking/AFURLSessionManager.m
deleted file mode 100644
index d53e6ec..0000000
--- a/vendor/Pods/AFNetworking/AFNetworking/AFURLSessionManager.m
+++ /dev/null
@@ -1,1079 +0,0 @@
-// AFURLSessionManager.m
-//
-// Copyright (c) 2013-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 "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;
-
- if (self.downloadFileURL) {
- userInfo[AFNetworkingTaskDidCompleteAssetPathKey] = self.downloadFileURL;
- } else if (self.mutableData) {
- userInfo[AFNetworkingTaskDidCompleteResponseDataKey] = [NSData dataWithData:self.mutableData];
- }
-
- 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:[NSData dataWithData:self.mutableData] 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
- */
-
-static inline void af_swizzleSelector(Class class, SEL originalSelector, SEL swizzledSelector) {
- Method originalMethod = class_getInstanceMethod(class, originalSelector);
- Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector);
- if (class_addMethod(class, originalSelector, method_getImplementation(swizzledMethod), method_getTypeEncoding(swizzledMethod))) {
- class_replaceMethod(class, swizzledSelector, method_getImplementation(originalMethod), method_getTypeEncoding(originalMethod));
- } else {
- method_exchangeImplementations(originalMethod, swizzledMethod);
- }
-}
-
-static NSString * const AFNSURLSessionTaskDidResumeNotification = @"com.alamofire.networking.nsurlsessiontask.resume";
-static NSString * const AFNSURLSessionTaskDidSuspendNotification = @"com.alamofire.networking.nsurlsessiontask.suspend";
-
-@interface NSURLSessionTask (_AFStateObserving)
-@end
-
-@implementation NSURLSessionTask (_AFStateObserving)
-
-+ (void)load {
- static dispatch_once_t onceToken;
- dispatch_once(&onceToken, ^{
- af_swizzleSelector([self class], @selector(resume), @selector(af_resume));
- af_swizzleSelector([self class], @selector(suspend), @selector(af_suspend));
- });
-}
-
-#pragma mark -
-
-- (void)af_resume {
- NSURLSessionTaskState state = self.state;
- [self af_resume];
-
- if (state != NSURLSessionTaskStateRunning) {
- [[NSNotificationCenter defaultCenter] postNotificationName:AFNSURLSessionTaskDidResumeNotification object:self];
- }
-}
-
-- (void)af_suspend {
- 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 (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];
-
- self.reachabilityManager = [AFNetworkReachabilityManager sharedManager];
-
- 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];
-}
-
-- (void)taskDidResume:(NSNotification *)notification {
- NSURLSessionTask *task = notification.object;
- if ([task isKindOfClass:[NSURLSessionTask class]]) {
- AFURLSessionManager *manager = [self delegateForTask:task].manager;
- if ([manager isEqual:self]) {
- dispatch_async(dispatch_get_main_queue(), ^{
- [[NSNotificationCenter defaultCenter] postNotificationName:AFNetworkingTaskDidResumeNotification object:task];
- });
- }
- }
-}
-
-- (void)taskDidSuspend:(NSNotification *)notification {
- NSURLSessionTask *task = notification.object;
- if ([task isKindOfClass:[NSURLSessionTask class]]) {
- AFURLSessionManager *manager = [self delegateForTask:task].manager;
- if ([manager isEqual:self]) {
- 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;
-
- [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];
- }
- }
-
- delegate.progress = [NSProgress progressWithTotalUnitCount:totalUnitCount];
- delegate.progress.pausingHandler = ^{
- [uploadTask suspend];
- };
- delegate.progress.cancellationHandler = ^{
- [uploadTask cancel];
- };
-
- if (progress) {
- *progress = delegate.progress;
- }
-
- [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;
- }
-
- [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/vendor/Pods/AFNetworking/LICENSE b/vendor/Pods/AFNetworking/LICENSE
deleted file mode 100644
index 0616192..0000000
--- a/vendor/Pods/AFNetworking/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2013-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.
diff --git a/vendor/Pods/AFNetworking/README.md b/vendor/Pods/AFNetworking/README.md
deleted file mode 100644
index 13e080c..0000000
--- a/vendor/Pods/AFNetworking/README.md
+++ /dev/null
@@ -1,383 +0,0 @@
-
-
-
-
-[![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. `AFHTTPSessionManager` 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)).
-
-## 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.
-
-#### Shared Network Reachability
-
-```objective-c
-[[AFNetworkReachabilityManager sharedManager] setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) {
- NSLog(@"Reachability: %@", AFStringFromNetworkReachabilityStatus(status));
-}];
-```
-
-#### 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 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).
-
-## Contact
-
-Follow AFNetworking on Twitter ([@AFNetworking](https://twitter.com/AFNetworking))
-
-### Maintainers
-
-- [Mattt Thompson](http://github.com/mattt) ([@mattt](https://twitter.com/mattt))
-
-## License
-
-AFNetworking is available under the MIT license. See the LICENSE file for more info.
diff --git a/vendor/Pods/Headers/Public/AFNetworking/AFHTTPRequestOperation.h b/vendor/Pods/Headers/Public/AFNetworking/AFHTTPRequestOperation.h
deleted file mode 120000
index ac762c8..0000000
--- a/vendor/Pods/Headers/Public/AFNetworking/AFHTTPRequestOperation.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../AFNetworking/AFNetworking/AFHTTPRequestOperation.h
\ No newline at end of file
diff --git a/vendor/Pods/Headers/Public/AFNetworking/AFHTTPRequestOperationManager.h b/vendor/Pods/Headers/Public/AFNetworking/AFHTTPRequestOperationManager.h
deleted file mode 120000
index 9dcc623..0000000
--- a/vendor/Pods/Headers/Public/AFNetworking/AFHTTPRequestOperationManager.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../AFNetworking/AFNetworking/AFHTTPRequestOperationManager.h
\ No newline at end of file
diff --git a/vendor/Pods/Headers/Public/AFNetworking/AFHTTPSessionManager.h b/vendor/Pods/Headers/Public/AFNetworking/AFHTTPSessionManager.h
deleted file mode 120000
index 56feb9f..0000000
--- a/vendor/Pods/Headers/Public/AFNetworking/AFHTTPSessionManager.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../AFNetworking/AFNetworking/AFHTTPSessionManager.h
\ No newline at end of file
diff --git a/vendor/Pods/Headers/Public/AFNetworking/AFNetworkReachabilityManager.h b/vendor/Pods/Headers/Public/AFNetworking/AFNetworkReachabilityManager.h
deleted file mode 120000
index 68fc774..0000000
--- a/vendor/Pods/Headers/Public/AFNetworking/AFNetworkReachabilityManager.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../AFNetworking/AFNetworking/AFNetworkReachabilityManager.h
\ No newline at end of file
diff --git a/vendor/Pods/Headers/Public/AFNetworking/AFNetworking.h b/vendor/Pods/Headers/Public/AFNetworking/AFNetworking.h
deleted file mode 120000
index a5a38da..0000000
--- a/vendor/Pods/Headers/Public/AFNetworking/AFNetworking.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../AFNetworking/AFNetworking/AFNetworking.h
\ No newline at end of file
diff --git a/vendor/Pods/Headers/Public/AFNetworking/AFSecurityPolicy.h b/vendor/Pods/Headers/Public/AFNetworking/AFSecurityPolicy.h
deleted file mode 120000
index fd1322d..0000000
--- a/vendor/Pods/Headers/Public/AFNetworking/AFSecurityPolicy.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../AFNetworking/AFNetworking/AFSecurityPolicy.h
\ No newline at end of file
diff --git a/vendor/Pods/Headers/Public/AFNetworking/AFURLConnectionOperation.h b/vendor/Pods/Headers/Public/AFNetworking/AFURLConnectionOperation.h
deleted file mode 120000
index d9b35fb..0000000
--- a/vendor/Pods/Headers/Public/AFNetworking/AFURLConnectionOperation.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../AFNetworking/AFNetworking/AFURLConnectionOperation.h
\ No newline at end of file
diff --git a/vendor/Pods/Headers/Public/AFNetworking/AFURLRequestSerialization.h b/vendor/Pods/Headers/Public/AFNetworking/AFURLRequestSerialization.h
deleted file mode 120000
index ca8209b..0000000
--- a/vendor/Pods/Headers/Public/AFNetworking/AFURLRequestSerialization.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../AFNetworking/AFNetworking/AFURLRequestSerialization.h
\ No newline at end of file
diff --git a/vendor/Pods/Headers/Public/AFNetworking/AFURLResponseSerialization.h b/vendor/Pods/Headers/Public/AFNetworking/AFURLResponseSerialization.h
deleted file mode 120000
index e36a765..0000000
--- a/vendor/Pods/Headers/Public/AFNetworking/AFURLResponseSerialization.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../AFNetworking/AFNetworking/AFURLResponseSerialization.h
\ No newline at end of file
diff --git a/vendor/Pods/Headers/Public/AFNetworking/AFURLSessionManager.h b/vendor/Pods/Headers/Public/AFNetworking/AFURLSessionManager.h
deleted file mode 120000
index 835101d..0000000
--- a/vendor/Pods/Headers/Public/AFNetworking/AFURLSessionManager.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../AFNetworking/AFNetworking/AFURLSessionManager.h
\ No newline at end of file
diff --git a/vendor/Pods/Headers/Public/MASShortcut/MASDictionaryTransformer.h b/vendor/Pods/Headers/Public/MASShortcut/MASDictionaryTransformer.h
deleted file mode 120000
index 164f2c7..0000000
--- a/vendor/Pods/Headers/Public/MASShortcut/MASDictionaryTransformer.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../MASShortcut/Framework/MASDictionaryTransformer.h
\ No newline at end of file
diff --git a/vendor/Pods/Headers/Public/MASShortcut/MASHotKey.h b/vendor/Pods/Headers/Public/MASShortcut/MASHotKey.h
deleted file mode 120000
index 2318610..0000000
--- a/vendor/Pods/Headers/Public/MASShortcut/MASHotKey.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../MASShortcut/Framework/MASHotKey.h
\ No newline at end of file
diff --git a/vendor/Pods/Headers/Public/MASShortcut/MASKeyCodes.h b/vendor/Pods/Headers/Public/MASShortcut/MASKeyCodes.h
deleted file mode 120000
index f79ee7f..0000000
--- a/vendor/Pods/Headers/Public/MASShortcut/MASKeyCodes.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../MASShortcut/Framework/MASKeyCodes.h
\ No newline at end of file
diff --git a/vendor/Pods/Headers/Public/MASShortcut/MASShortcut.h b/vendor/Pods/Headers/Public/MASShortcut/MASShortcut.h
deleted file mode 120000
index 1d4ee64..0000000
--- a/vendor/Pods/Headers/Public/MASShortcut/MASShortcut.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../MASShortcut/Framework/MASShortcut.h
\ No newline at end of file
diff --git a/vendor/Pods/Headers/Public/MASShortcut/MASShortcutBinder.h b/vendor/Pods/Headers/Public/MASShortcut/MASShortcutBinder.h
deleted file mode 120000
index 385133c..0000000
--- a/vendor/Pods/Headers/Public/MASShortcut/MASShortcutBinder.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../MASShortcut/Framework/MASShortcutBinder.h
\ No newline at end of file
diff --git a/vendor/Pods/Headers/Public/MASShortcut/MASShortcutMonitor.h b/vendor/Pods/Headers/Public/MASShortcut/MASShortcutMonitor.h
deleted file mode 120000
index 9e112f9..0000000
--- a/vendor/Pods/Headers/Public/MASShortcut/MASShortcutMonitor.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../MASShortcut/Framework/MASShortcutMonitor.h
\ No newline at end of file
diff --git a/vendor/Pods/Headers/Public/MASShortcut/MASShortcutValidator.h b/vendor/Pods/Headers/Public/MASShortcut/MASShortcutValidator.h
deleted file mode 120000
index fa2b046..0000000
--- a/vendor/Pods/Headers/Public/MASShortcut/MASShortcutValidator.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../MASShortcut/Framework/MASShortcutValidator.h
\ No newline at end of file
diff --git a/vendor/Pods/Headers/Public/MASShortcut/MASShortcutView+Bindings.h b/vendor/Pods/Headers/Public/MASShortcut/MASShortcutView+Bindings.h
deleted file mode 120000
index 221ed8e..0000000
--- a/vendor/Pods/Headers/Public/MASShortcut/MASShortcutView+Bindings.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../MASShortcut/Framework/MASShortcutView+Bindings.h
\ No newline at end of file
diff --git a/vendor/Pods/Headers/Public/MASShortcut/MASShortcutView.h b/vendor/Pods/Headers/Public/MASShortcut/MASShortcutView.h
deleted file mode 120000
index 6b1d366..0000000
--- a/vendor/Pods/Headers/Public/MASShortcut/MASShortcutView.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../MASShortcut/Framework/MASShortcutView.h
\ No newline at end of file
diff --git a/vendor/Pods/Headers/Public/MASShortcut/Shortcut.h b/vendor/Pods/Headers/Public/MASShortcut/Shortcut.h
deleted file mode 120000
index 534e351..0000000
--- a/vendor/Pods/Headers/Public/MASShortcut/Shortcut.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../MASShortcut/Framework/Shortcut.h
\ No newline at end of file
diff --git a/vendor/Pods/Headers/Public/SocketRocket/NSData+SRB64Additions.h b/vendor/Pods/Headers/Public/SocketRocket/NSData+SRB64Additions.h
deleted file mode 120000
index e33307a..0000000
--- a/vendor/Pods/Headers/Public/SocketRocket/NSData+SRB64Additions.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../SocketRocket/SocketRocket/NSData+SRB64Additions.h
\ No newline at end of file
diff --git a/vendor/Pods/Headers/Public/SocketRocket/SRWebSocket.h b/vendor/Pods/Headers/Public/SocketRocket/SRWebSocket.h
deleted file mode 120000
index b41c867..0000000
--- a/vendor/Pods/Headers/Public/SocketRocket/SRWebSocket.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../SocketRocket/SocketRocket/SRWebSocket.h
\ No newline at end of file
diff --git a/vendor/Pods/Headers/Public/SocketRocket/base64.h b/vendor/Pods/Headers/Public/SocketRocket/base64.h
deleted file mode 120000
index df09eae..0000000
--- a/vendor/Pods/Headers/Public/SocketRocket/base64.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../SocketRocket/SocketRocket/base64.h
\ No newline at end of file
diff --git a/vendor/Pods/Headers/Public/____Pods-AFNetworking-prefix.h b/vendor/Pods/Headers/Public/____Pods-AFNetworking-prefix.h
deleted file mode 100644
index 2e9257c..0000000
--- a/vendor/Pods/Headers/Public/____Pods-AFNetworking-prefix.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#ifdef __OBJC__
-#import
-#endif
-
-#import "Pods-environment.h"
diff --git a/vendor/Pods/Headers/Public/____Pods-MASShortcut-prefix.h b/vendor/Pods/Headers/Public/____Pods-MASShortcut-prefix.h
deleted file mode 100644
index 2e9257c..0000000
--- a/vendor/Pods/Headers/Public/____Pods-MASShortcut-prefix.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#ifdef __OBJC__
-#import
-#endif
-
-#import "Pods-environment.h"
diff --git a/vendor/Pods/Headers/Public/____Pods-SocketRocket-prefix.h b/vendor/Pods/Headers/Public/____Pods-SocketRocket-prefix.h
deleted file mode 100644
index 2e9257c..0000000
--- a/vendor/Pods/Headers/Public/____Pods-SocketRocket-prefix.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#ifdef __OBJC__
-#import
-#endif
-
-#import "Pods-environment.h"
diff --git a/vendor/Pods/Headers/Public/____Pods-environment.h b/vendor/Pods/Headers/Public/____Pods-environment.h
deleted file mode 100644
index 432df3a..0000000
--- a/vendor/Pods/Headers/Public/____Pods-environment.h
+++ /dev/null
@@ -1,8 +0,0 @@
-
-// To check if a library is compiled with CocoaPods you
-// can use the `COCOAPODS` macro definition which is
-// defined in the xcconfigs so it is available in
-// headers also when they are imported in the client
-// project.
-
-
diff --git a/vendor/Pods/MASShortcut/Framework/MASDictionaryTransformer.h b/vendor/Pods/MASShortcut/Framework/MASDictionaryTransformer.h
deleted file mode 100644
index 6e53fd8..0000000
--- a/vendor/Pods/MASShortcut/Framework/MASDictionaryTransformer.h
+++ /dev/null
@@ -1,19 +0,0 @@
-extern NSString *const MASDictionaryTransformerName;
-
-/**
- Converts shortcuts for storage in user defaults.
-
- User defaults can’t stored custom types directly, they have to
- be serialized to `NSData` or some other supported type like an
- `NSDictionary`. In Cocoa Bindings, the conversion can be done
- using value transformers like this one.
-
- There’s a built-in transformer (`NSKeyedUnarchiveFromDataTransformerName`)
- that converts any `NSCoding` types to `NSData`, but with shortcuts
- it makes sense to use a dictionary instead – the defaults look better
- when inspected with the `defaults` command-line utility and the
- format is compatible with an older sortcut library called Shortcut
- Recorder.
-*/
-@interface MASDictionaryTransformer : NSValueTransformer
-@end
diff --git a/vendor/Pods/MASShortcut/Framework/MASDictionaryTransformer.m b/vendor/Pods/MASShortcut/Framework/MASDictionaryTransformer.m
deleted file mode 100644
index 9e4c82b..0000000
--- a/vendor/Pods/MASShortcut/Framework/MASDictionaryTransformer.m
+++ /dev/null
@@ -1,51 +0,0 @@
-#import "MASDictionaryTransformer.h"
-#import "MASShortcut.h"
-
-NSString *const MASDictionaryTransformerName = @"MASDictionaryTransformer";
-
-static NSString *const MASKeyCodeKey = @"keyCode";
-static NSString *const MASModifierFlagsKey = @"modifierFlags";
-
-@implementation MASDictionaryTransformer
-
-+ (BOOL) allowsReverseTransformation
-{
- return YES;
-}
-
-// Storing nil values as an empty dictionary lets us differ between
-// “not available, use default value” and “explicitly set to none”.
-// See http://stackoverflow.com/questions/5540760 for details.
-- (NSDictionary*) reverseTransformedValue: (MASShortcut*) shortcut
-{
- if (shortcut == nil) {
- return [NSDictionary dictionary];
- } else {
- return @{
- MASKeyCodeKey: @([shortcut keyCode]),
- MASModifierFlagsKey: @([shortcut modifierFlags])
- };
- }
-}
-
-- (MASShortcut*) transformedValue: (NSDictionary*) dictionary
-{
- // We have to be defensive here as the value may come from user defaults.
- if (![dictionary isKindOfClass:[NSDictionary class]]) {
- return nil;
- }
-
- id keyCodeBox = [dictionary objectForKey:MASKeyCodeKey];
- id modifierFlagsBox = [dictionary objectForKey:MASModifierFlagsKey];
-
- SEL integerValue = @selector(integerValue);
- if (![keyCodeBox respondsToSelector:integerValue] || ![modifierFlagsBox respondsToSelector:integerValue]) {
- return nil;
- }
-
- return [MASShortcut
- shortcutWithKeyCode:[keyCodeBox integerValue]
- modifierFlags:[modifierFlagsBox integerValue]];
-}
-
-@end
diff --git a/vendor/Pods/MASShortcut/Framework/MASHotKey.h b/vendor/Pods/MASShortcut/Framework/MASHotKey.h
deleted file mode 100644
index 1d267e4..0000000
--- a/vendor/Pods/MASShortcut/Framework/MASHotKey.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#import "MASShortcut.h"
-
-extern FourCharCode const MASHotKeySignature;
-
-@interface MASHotKey : NSObject
-
-@property(readonly) UInt32 carbonID;
-@property(copy) dispatch_block_t action;
-
-+ (instancetype) registeredHotKeyWithShortcut: (MASShortcut*) shortcut;
-
-@end
diff --git a/vendor/Pods/MASShortcut/Framework/MASHotKey.m b/vendor/Pods/MASShortcut/Framework/MASHotKey.m
deleted file mode 100644
index c5ab744..0000000
--- a/vendor/Pods/MASShortcut/Framework/MASHotKey.m
+++ /dev/null
@@ -1,44 +0,0 @@
-#import "MASHotKey.h"
-
-FourCharCode const MASHotKeySignature = 'MASS';
-
-@interface MASHotKey ()
-@property(assign) EventHotKeyRef hotKeyRef;
-@property(assign) UInt32 carbonID;
-@end
-
-@implementation MASHotKey
-
-- (instancetype) initWithShortcut: (MASShortcut*) shortcut
-{
- self = [super init];
-
- static UInt32 CarbonHotKeyID = 0;
-
- _carbonID = ++CarbonHotKeyID;
- EventHotKeyID hotKeyID = { .signature = MASHotKeySignature, .id = _carbonID };
-
- OSStatus status = RegisterEventHotKey([shortcut carbonKeyCode], [shortcut carbonFlags],
- hotKeyID, GetEventDispatcherTarget(), 0, &_hotKeyRef);
-
- if (status != noErr) {
- return nil;
- }
-
- return self;
-}
-
-+ (instancetype) registeredHotKeyWithShortcut: (MASShortcut*) shortcut
-{
- return [[self alloc] initWithShortcut:shortcut];
-}
-
-- (void) dealloc
-{
- if (_hotKeyRef) {
- UnregisterEventHotKey(_hotKeyRef);
- _hotKeyRef = NULL;
- }
-}
-
-@end
diff --git a/vendor/Pods/MASShortcut/Framework/MASKeyCodes.h b/vendor/Pods/MASShortcut/Framework/MASKeyCodes.h
deleted file mode 100644
index 8c1ce06..0000000
--- a/vendor/Pods/MASShortcut/Framework/MASKeyCodes.h
+++ /dev/null
@@ -1,42 +0,0 @@
-#import
-
-// These glyphs are missed in Carbon.h
-enum {
- kMASShortcutGlyphEject = 0x23CF,
- kMASShortcutGlyphClear = 0x2715,
- kMASShortcutGlyphDeleteLeft = 0x232B,
- kMASShortcutGlyphDeleteRight = 0x2326,
- kMASShortcutGlyphLeftArrow = 0x2190,
- kMASShortcutGlyphRightArrow = 0x2192,
- kMASShortcutGlyphUpArrow = 0x2191,
- kMASShortcutGlyphDownArrow = 0x2193,
- kMASShortcutGlyphEscape = 0x238B,
- kMASShortcutGlyphHelp = 0x003F,
- kMASShortcutGlyphPageDown = 0x21DF,
- kMASShortcutGlyphPageUp = 0x21DE,
- kMASShortcutGlyphTabRight = 0x21E5,
- kMASShortcutGlyphReturn = 0x2305,
- kMASShortcutGlyphReturnR2L = 0x21A9,
- kMASShortcutGlyphPadClear = 0x2327,
- kMASShortcutGlyphNorthwestArrow = 0x2196,
- kMASShortcutGlyphSoutheastArrow = 0x2198,
-} MASShortcutGlyph;
-
-NS_INLINE NSString* NSStringFromMASKeyCode(unsigned short ch)
-{
- return [NSString stringWithFormat:@"%C", ch];
-}
-
-NS_INLINE NSUInteger MASPickCocoaModifiers(NSUInteger flags)
-{
- return (flags & (NSControlKeyMask | NSShiftKeyMask | NSAlternateKeyMask | NSCommandKeyMask));
-}
-
-NS_INLINE UInt32 MASCarbonModifiersFromCocoaModifiers(NSUInteger cocoaFlags)
-{
- return
- (cocoaFlags & NSCommandKeyMask ? cmdKey : 0)
- | (cocoaFlags & NSAlternateKeyMask ? optionKey : 0)
- | (cocoaFlags & NSControlKeyMask ? controlKey : 0)
- | (cocoaFlags & NSShiftKeyMask ? shiftKey : 0);
-}
diff --git a/vendor/Pods/MASShortcut/Framework/MASShortcut.h b/vendor/Pods/MASShortcut/Framework/MASShortcut.h
deleted file mode 100644
index e175317..0000000
--- a/vendor/Pods/MASShortcut/Framework/MASShortcut.h
+++ /dev/null
@@ -1,70 +0,0 @@
-#import "MASKeyCodes.h"
-
-/**
- A model class to hold a key combination.
-
- This class just represents a combination of keys. It does not care if
- the combination is valid or can be used as a hotkey, it doesn’t watch
- the input system for the shortcut appearance, nor it does access user
- defaults.
-*/
-@interface MASShortcut : NSObject
-
-/**
- The virtual key code for the keyboard key.
-
- Hardware independent, same as in `NSEvent`. See `Events.h` in the HIToolbox
- framework for a complete list, or Command-click this symbol: `kVK_ANSI_A`.
-*/
-@property (nonatomic, readonly) NSUInteger keyCode;
-
-/**
- Cocoa keyboard modifier flags.
-
- Same as in `NSEvent`: `NSCommandKeyMask`, `NSAlternateKeyMask`, etc.
-*/
-@property (nonatomic, readonly) NSUInteger modifierFlags;
-
-/**
- Same as `keyCode`, just a different type.
-*/
-@property (nonatomic, readonly) UInt32 carbonKeyCode;
-
-/**
- Carbon modifier flags.
-
- A bit sum of `cmdKey`, `optionKey`, etc.
-*/
-@property (nonatomic, readonly) UInt32 carbonFlags;
-
-/**
- A string representing the “key” part of a shortcut, like the `5` in `⌘5`.
-*/
-@property (nonatomic, readonly) NSString *keyCodeString;
-
-/**
- A key-code string used in key equivalent matching.
-
- For precise meaning of “key equivalents” see the `keyEquivalent`
- property of `NSMenuItem`. Here the string is used to support shortcut
- validation (“is the shortcut already taken in this menu?”) and
- for display in `NSMenu`.
-*/
-@property (nonatomic, readonly) NSString *keyCodeStringForKeyEquivalent;
-
-/**
- A string representing the shortcut modifiers, like the `⌘` in `⌘5`.
-*/
-@property (nonatomic, readonly) NSString *modifierFlagsString;
-
-- (instancetype)initWithKeyCode:(NSUInteger)code modifierFlags:(NSUInteger)flags;
-+ (instancetype)shortcutWithKeyCode:(NSUInteger)code modifierFlags:(NSUInteger)flags;
-
-/**
- Creates a new shortcut from an `NSEvent` object.
-
- This is just a convenience initializer that reads the key code and modifiers from an `NSEvent`.
-*/
-+ (instancetype)shortcutWithEvent:(NSEvent *)anEvent;
-
-@end
diff --git a/vendor/Pods/MASShortcut/Framework/MASShortcut.m b/vendor/Pods/MASShortcut/Framework/MASShortcut.m
deleted file mode 100644
index e6fa63d..0000000
--- a/vendor/Pods/MASShortcut/Framework/MASShortcut.m
+++ /dev/null
@@ -1,241 +0,0 @@
-#import "MASShortcut.h"
-
-static NSString *const MASShortcutKeyCode = @"KeyCode";
-static NSString *const MASShortcutModifierFlags = @"ModifierFlags";
-
-@implementation MASShortcut
-
-#pragma mark Initialization
-
-- (instancetype)initWithKeyCode:(NSUInteger)code modifierFlags:(NSUInteger)flags
-{
- self = [super init];
- if (self) {
- _keyCode = code;
- _modifierFlags = MASPickCocoaModifiers(flags);
- }
- return self;
-}
-
-+ (instancetype)shortcutWithKeyCode:(NSUInteger)code modifierFlags:(NSUInteger)flags
-{
- return [[self alloc] initWithKeyCode:code modifierFlags:flags];
-}
-
-+ (instancetype)shortcutWithEvent:(NSEvent *)event
-{
- return [[self alloc] initWithKeyCode:event.keyCode modifierFlags:event.modifierFlags];
-}
-
-#pragma mark Shortcut Accessors
-
-- (UInt32)carbonKeyCode
-{
- return (self.keyCode == NSNotFound ? 0 : (UInt32)self.keyCode);
-}
-
-- (UInt32)carbonFlags
-{
- return MASCarbonModifiersFromCocoaModifiers(self.modifierFlags);
-}
-
-- (NSString *)description
-{
- return [NSString stringWithFormat:@"%@%@", self.modifierFlagsString, self.keyCodeString];
-}
-
-- (NSString *)keyCodeStringForKeyEquivalent
-{
- NSString *keyCodeString = self.keyCodeString;
- if (keyCodeString.length > 1) {
- switch (self.keyCode) {
- case kVK_F1: return NSStringFromMASKeyCode(0xF704);
- case kVK_F2: return NSStringFromMASKeyCode(0xF705);
- case kVK_F3: return NSStringFromMASKeyCode(0xF706);
- case kVK_F4: return NSStringFromMASKeyCode(0xF707);
- case kVK_F5: return NSStringFromMASKeyCode(0xF708);
- case kVK_F6: return NSStringFromMASKeyCode(0xF709);
- case kVK_F7: return NSStringFromMASKeyCode(0xF70a);
- case kVK_F8: return NSStringFromMASKeyCode(0xF70b);
- case kVK_F9: return NSStringFromMASKeyCode(0xF70c);
- case kVK_F10: return NSStringFromMASKeyCode(0xF70d);
- case kVK_F11: return NSStringFromMASKeyCode(0xF70e);
- case kVK_F12: return NSStringFromMASKeyCode(0xF70f);
- // From this point down I am guessing F13 etc come sequentially, I don't have a keyboard to test.
- case kVK_F13: return NSStringFromMASKeyCode(0xF710);
- case kVK_F14: return NSStringFromMASKeyCode(0xF711);
- case kVK_F15: return NSStringFromMASKeyCode(0xF712);
- case kVK_F16: return NSStringFromMASKeyCode(0xF713);
- case kVK_F17: return NSStringFromMASKeyCode(0xF714);
- case kVK_F18: return NSStringFromMASKeyCode(0xF715);
- case kVK_F19: return NSStringFromMASKeyCode(0xF716);
- case kVK_Space: return NSStringFromMASKeyCode(0x20);
- default: return @"";
- }
- }
- return keyCodeString.lowercaseString;
-}
-
-- (NSString *)keyCodeString
-{
- // Some key codes don't have an equivalent
- switch (self.keyCode) {
- case NSNotFound: return @"";
- case kVK_F1: return @"F1";
- case kVK_F2: return @"F2";
- case kVK_F3: return @"F3";
- case kVK_F4: return @"F4";
- case kVK_F5: return @"F5";
- case kVK_F6: return @"F6";
- case kVK_F7: return @"F7";
- case kVK_F8: return @"F8";
- case kVK_F9: return @"F9";
- case kVK_F10: return @"F10";
- case kVK_F11: return @"F11";
- case kVK_F12: return @"F12";
- case kVK_F13: return @"F13";
- case kVK_F14: return @"F14";
- case kVK_F15: return @"F15";
- case kVK_F16: return @"F16";
- case kVK_F17: return @"F17";
- case kVK_F18: return @"F18";
- case kVK_F19: return @"F19";
- case kVK_Space: return NSLocalizedString(@"Space", @"Shortcut glyph name for SPACE key");
- case kVK_Escape: return NSStringFromMASKeyCode(kMASShortcutGlyphEscape);
- case kVK_Delete: return NSStringFromMASKeyCode(kMASShortcutGlyphDeleteLeft);
- case kVK_ForwardDelete: return NSStringFromMASKeyCode(kMASShortcutGlyphDeleteRight);
- case kVK_LeftArrow: return NSStringFromMASKeyCode(kMASShortcutGlyphLeftArrow);
- case kVK_RightArrow: return NSStringFromMASKeyCode(kMASShortcutGlyphRightArrow);
- case kVK_UpArrow: return NSStringFromMASKeyCode(kMASShortcutGlyphUpArrow);
- case kVK_DownArrow: return NSStringFromMASKeyCode(kMASShortcutGlyphDownArrow);
- case kVK_Help: return NSStringFromMASKeyCode(kMASShortcutGlyphHelp);
- case kVK_PageUp: return NSStringFromMASKeyCode(kMASShortcutGlyphPageUp);
- case kVK_PageDown: return NSStringFromMASKeyCode(kMASShortcutGlyphPageDown);
- case kVK_Tab: return NSStringFromMASKeyCode(kMASShortcutGlyphTabRight);
- case kVK_Return: return NSStringFromMASKeyCode(kMASShortcutGlyphReturnR2L);
-
- // Keypad
- case kVK_ANSI_Keypad0: return @"0";
- case kVK_ANSI_Keypad1: return @"1";
- case kVK_ANSI_Keypad2: return @"2";
- case kVK_ANSI_Keypad3: return @"3";
- case kVK_ANSI_Keypad4: return @"4";
- case kVK_ANSI_Keypad5: return @"5";
- case kVK_ANSI_Keypad6: return @"6";
- case kVK_ANSI_Keypad7: return @"7";
- case kVK_ANSI_Keypad8: return @"8";
- case kVK_ANSI_Keypad9: return @"9";
- case kVK_ANSI_KeypadDecimal: return @".";
- case kVK_ANSI_KeypadMultiply: return @"*";
- case kVK_ANSI_KeypadPlus: return @"+";
- case kVK_ANSI_KeypadClear: return NSStringFromMASKeyCode(kMASShortcutGlyphPadClear);
- case kVK_ANSI_KeypadDivide: return @"/";
- case kVK_ANSI_KeypadEnter: return NSStringFromMASKeyCode(kMASShortcutGlyphReturn);
- case kVK_ANSI_KeypadMinus: return @"–";
- case kVK_ANSI_KeypadEquals: return @"=";
-
- // Hardcode
- case 119: return NSStringFromMASKeyCode(kMASShortcutGlyphSoutheastArrow);
- case 115: return NSStringFromMASKeyCode(kMASShortcutGlyphNorthwestArrow);
- }
-
- // Everything else should be printable so look it up in the current keyboard
- OSStatus error = noErr;
- NSString *keystroke = nil;
- TISInputSourceRef inputSource = TISCopyCurrentKeyboardLayoutInputSource();
- if (inputSource) {
- CFDataRef layoutDataRef = TISGetInputSourceProperty(inputSource, kTISPropertyUnicodeKeyLayoutData);
- if (layoutDataRef) {
- UCKeyboardLayout *layoutData = (UCKeyboardLayout *)CFDataGetBytePtr(layoutDataRef);
- UniCharCount length = 0;
- UniChar chars[256] = { 0 };
- UInt32 deadKeyState = 0;
- error = UCKeyTranslate(layoutData, (UInt16)self.keyCode, kUCKeyActionDisplay, 0, // No modifiers
- LMGetKbdType(), kUCKeyTranslateNoDeadKeysMask, &deadKeyState,
- sizeof(chars) / sizeof(UniChar), &length, chars);
- keystroke = ((error == noErr) && length ? [NSString stringWithCharacters:chars length:length] : @"");
- }
- CFRelease(inputSource);
- }
-
- // Validate keystroke
- if (keystroke.length) {
- static NSMutableCharacterSet *validChars = nil;
- if (validChars == nil) {
- validChars = [[NSMutableCharacterSet alloc] init];
- [validChars formUnionWithCharacterSet:[NSCharacterSet alphanumericCharacterSet]];
- [validChars formUnionWithCharacterSet:[NSCharacterSet punctuationCharacterSet]];
- [validChars formUnionWithCharacterSet:[NSCharacterSet symbolCharacterSet]];
- }
- for (NSUInteger i = 0, length = keystroke.length; i < length; i++) {
- if (![validChars characterIsMember:[keystroke characterAtIndex:i]]) {
- keystroke = @"";
- break;
- }
- }
- }
-
- // Finally, we've got a shortcut!
- return keystroke.uppercaseString;
-}
-
-- (NSString *)modifierFlagsString
-{
- unichar chars[4];
- NSUInteger count = 0;
- // These are in the same order as the menu manager shows them
- if (self.modifierFlags & NSControlKeyMask) chars[count++] = kControlUnicode;
- if (self.modifierFlags & NSAlternateKeyMask) chars[count++] = kOptionUnicode;
- if (self.modifierFlags & NSShiftKeyMask) chars[count++] = kShiftUnicode;
- if (self.modifierFlags & NSCommandKeyMask) chars[count++] = kCommandUnicode;
- return (count ? [NSString stringWithCharacters:chars length:count] : @"");
-}
-
-#pragma mark NSObject
-
-- (BOOL) isEqual: (MASShortcut*) object
-{
- return [object isKindOfClass:[self class]]
- && (object.keyCode == self.keyCode)
- && (object.modifierFlags == self.modifierFlags);
-}
-
-- (NSUInteger) hash
-{
- return self.keyCode + self.modifierFlags;
-}
-
-#pragma mark NSCoding
-
-- (void)encodeWithCoder:(NSCoder *)coder
-{
- [coder encodeInteger:(self.keyCode != NSNotFound ? (NSInteger)self.keyCode : - 1) forKey:MASShortcutKeyCode];
- [coder encodeInteger:(NSInteger)self.modifierFlags forKey:MASShortcutModifierFlags];
-}
-
-- (instancetype)initWithCoder:(NSCoder *)decoder
-{
- self = [super init];
- if (self) {
- NSInteger code = [decoder decodeIntegerForKey:MASShortcutKeyCode];
- _keyCode = (code < 0 ? NSNotFound : (NSUInteger)code);
- _modifierFlags = [decoder decodeIntegerForKey:MASShortcutModifierFlags];
- }
- return self;
-}
-
-#pragma mark NSSecureCoding
-
-+ (BOOL)supportsSecureCoding
-{
- return YES;
-}
-
-#pragma mark NSCopying
-
-- (instancetype) copyWithZone:(NSZone *)zone
-{
- return [[self class] shortcutWithKeyCode:_keyCode modifierFlags:_modifierFlags];
-}
-
-@end
diff --git a/vendor/Pods/MASShortcut/Framework/MASShortcutBinder.h b/vendor/Pods/MASShortcut/Framework/MASShortcutBinder.h
deleted file mode 100644
index e7406de..0000000
--- a/vendor/Pods/MASShortcut/Framework/MASShortcutBinder.h
+++ /dev/null
@@ -1,67 +0,0 @@
-#import "MASShortcutMonitor.h"
-
-/**
- Binds actions to user defaults keys.
-
- If you store shortcuts in user defaults (for example by binding
- a `MASShortcutView` to user defaults), you can use this class to
- connect an action directly to a user defaults key. If the shortcut
- stored under the key changes, the action will get automatically
- updated to the new one.
-
- This class is mostly a wrapper around a `MASShortcutMonitor`. It
- watches the changes in user defaults and updates the shortcut monitor
- accordingly with the new shortcuts.
-*/
-@interface MASShortcutBinder : NSObject
-
-/**
- A convenience shared instance.
-
- You may use it so that you don’t have to manage an instance by hand,
- but it’s perfectly fine to allocate and use a separate instance instead.
-*/
-+ (instancetype) sharedBinder;
-
-/**
- The underlying shortcut monitor.
-*/
-@property(strong) MASShortcutMonitor *shortcutMonitor;
-
-/**
- Binding options customizing the access to user defaults.
-
- As an example, you can use `NSValueTransformerNameBindingOption` to customize
- the storage format used for the shortcuts. By default the shortcuts are converted
- from `NSData` (`NSKeyedUnarchiveFromDataTransformerName`). Note that if the
- binder is to work with `MASShortcutView`, both object have to use the same storage
- format.
-*/
-@property(copy) NSDictionary *bindingOptions;
-
-/**
- Binds given action to a shortcut stored under the given defaults key.
-
- In other words, no matter what shortcut you store under the given key,
- pressing it will always trigger the given action.
-*/
-- (void) bindShortcutWithDefaultsKey: (NSString*) defaultsKeyName toAction: (dispatch_block_t) action;
-
-/**
- Disconnect the binding between user defaults and action.
-
- In other words, the shortcut stored under the given key will no longer trigger an action.
-*/
-- (void) breakBindingWithDefaultsKey: (NSString*) defaultsKeyName;
-
-/**
- Register default shortcuts in user defaults.
-
- This is a convenience frontent to `[NSUserDefaults registerDefaults]`.
- The dictionary should contain a map of user defaults’ keys to appropriate
- keyboard shortcuts. The shortcuts will be transformed according to
- `bindingOptions` and registered using `registerDefaults`.
-*/
-- (void) registerDefaultShortcuts: (NSDictionary*) defaultShortcuts;
-
-@end
diff --git a/vendor/Pods/MASShortcut/Framework/MASShortcutBinder.m b/vendor/Pods/MASShortcut/Framework/MASShortcutBinder.m
deleted file mode 100644
index bf85c41..0000000
--- a/vendor/Pods/MASShortcut/Framework/MASShortcutBinder.m
+++ /dev/null
@@ -1,114 +0,0 @@
-#import "MASShortcutBinder.h"
-#import "MASShortcut.h"
-
-@interface MASShortcutBinder ()
-@property(strong) NSMutableDictionary *actions;
-@property(strong) NSMutableDictionary *shortcuts;
-@end
-
-@implementation MASShortcutBinder
-
-#pragma mark Initialization
-
-- (id) init
-{
- self = [super init];
- [self setActions:[NSMutableDictionary dictionary]];
- [self setShortcuts:[NSMutableDictionary dictionary]];
- [self setShortcutMonitor:[MASShortcutMonitor sharedMonitor]];
- [self setBindingOptions:@{NSValueTransformerNameBindingOption: NSKeyedUnarchiveFromDataTransformerName}];
- return self;
-}
-
-- (void) dealloc
-{
- for (NSString *bindingName in [_actions allKeys]) {
- [self unbind:bindingName];
- }
-}
-
-+ (instancetype) sharedBinder
-{
- static dispatch_once_t once;
- static MASShortcutBinder *sharedInstance;
- dispatch_once(&once, ^{
- sharedInstance = [[self alloc] init];
- });
- return sharedInstance;
-}
-
-#pragma mark Registration
-
-- (void) bindShortcutWithDefaultsKey: (NSString*) defaultsKeyName toAction: (dispatch_block_t) action
-{
- [_actions setObject:[action copy] forKey:defaultsKeyName];
- [self bind:defaultsKeyName toObject:[NSUserDefaultsController sharedUserDefaultsController]
- withKeyPath:[@"values." stringByAppendingString:defaultsKeyName] options:_bindingOptions];
-}
-
-- (void) breakBindingWithDefaultsKey: (NSString*) defaultsKeyName
-{
- [_shortcutMonitor unregisterShortcut:[_shortcuts objectForKey:defaultsKeyName]];
- [_shortcuts removeObjectForKey:defaultsKeyName];
- [_actions removeObjectForKey:defaultsKeyName];
- [self unbind:defaultsKeyName];
-}
-
-- (void) registerDefaultShortcuts: (NSDictionary*) defaultShortcuts
-{
- NSValueTransformer *transformer = [_bindingOptions valueForKey:NSValueTransformerBindingOption];
- if (transformer == nil) {
- NSString *transformerName = [_bindingOptions valueForKey:NSValueTransformerNameBindingOption];
- if (transformerName) {
- transformer = [NSValueTransformer valueTransformerForName:transformerName];
- }
- }
-
- NSAssert(transformer != nil, @"Can’t register default shortcuts without a transformer.");
-
- [defaultShortcuts enumerateKeysAndObjectsUsingBlock:^(NSString *defaultsKey, MASShortcut *shortcut, BOOL *stop) {
- id value = [transformer reverseTransformedValue:shortcut];
- [[NSUserDefaults standardUserDefaults] registerDefaults:@{defaultsKey:value}];
- }];
-}
-
-#pragma mark Bindings
-
-- (BOOL) isRegisteredAction: (NSString*) name
-{
- return !![_actions objectForKey:name];
-}
-
-- (id) valueForUndefinedKey: (NSString*) key
-{
- return [self isRegisteredAction:key] ?
- [_shortcuts objectForKey:key] :
- [super valueForUndefinedKey:key];
-}
-
-- (void) setValue: (id) value forUndefinedKey: (NSString*) key
-{
- if (![self isRegisteredAction:key]) {
- [super setValue:value forUndefinedKey:key];
- return;
- }
-
- MASShortcut *newShortcut = value;
- MASShortcut *currentShortcut = [_shortcuts objectForKey:key];
-
- // Unbind previous shortcut if any
- if (currentShortcut != nil) {
- [_shortcutMonitor unregisterShortcut:currentShortcut];
- }
-
- // Just deleting the old shortcut
- if (newShortcut == nil) {
- return;
- }
-
- // Bind new shortcut
- [_shortcuts setObject:newShortcut forKey:key];
- [_shortcutMonitor registerShortcut:newShortcut withAction:[_actions objectForKey:key]];
-}
-
-@end
diff --git a/vendor/Pods/MASShortcut/Framework/MASShortcutMonitor.h b/vendor/Pods/MASShortcut/Framework/MASShortcutMonitor.h
deleted file mode 100644
index dc3d458..0000000
--- a/vendor/Pods/MASShortcut/Framework/MASShortcutMonitor.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#import "MASShortcut.h"
-
-/**
- Executes action when a shortcut is pressed.
-
- There can only be one instance of this class, otherwise things
- will probably not work. (There’s a Carbon event handler inside
- and there can only be one Carbon event handler of a given type.)
-*/
-@interface MASShortcutMonitor : NSObject
-
-- (instancetype) init __unavailable;
-+ (instancetype) sharedMonitor;
-
-/**
- Register a shortcut along with an action.
-
- Attempting to insert an already registered shortcut probably won’t work.
- It may burn your house or cut your fingers. You have been warned.
-*/
-- (BOOL) registerShortcut: (MASShortcut*) shortcut withAction: (dispatch_block_t) action;
-- (BOOL) isShortcutRegistered: (MASShortcut*) shortcut;
-
-- (void) unregisterShortcut: (MASShortcut*) shortcut;
-- (void) unregisterAllShortcuts;
-
-@end
diff --git a/vendor/Pods/MASShortcut/Framework/MASShortcutMonitor.m b/vendor/Pods/MASShortcut/Framework/MASShortcutMonitor.m
deleted file mode 100644
index fce8022..0000000
--- a/vendor/Pods/MASShortcut/Framework/MASShortcutMonitor.m
+++ /dev/null
@@ -1,108 +0,0 @@
-#import "MASShortcutMonitor.h"
-#import "MASHotKey.h"
-
-@interface MASShortcutMonitor ()
-@property(assign) EventHandlerRef eventHandlerRef;
-@property(strong) NSMutableDictionary *hotKeys;
-@end
-
-static OSStatus MASCarbonEventCallback(EventHandlerCallRef, EventRef, void*);
-
-@implementation MASShortcutMonitor
-
-#pragma mark Initialization
-
-- (instancetype) init
-{
- self = [super init];
- [self setHotKeys:[NSMutableDictionary dictionary]];
- EventTypeSpec hotKeyPressedSpec = { .eventClass = kEventClassKeyboard, .eventKind = kEventHotKeyPressed };
- OSStatus status = InstallEventHandler(GetEventDispatcherTarget(), MASCarbonEventCallback,
- 1, &hotKeyPressedSpec, (__bridge void*)self, &_eventHandlerRef);
- if (status != noErr) {
- return nil;
- }
- return self;
-}
-
-- (void) dealloc
-{
- if (_eventHandlerRef) {
- RemoveEventHandler(_eventHandlerRef);
- _eventHandlerRef = NULL;
- }
-}
-
-+ (instancetype) sharedMonitor
-{
- static dispatch_once_t once;
- static MASShortcutMonitor *sharedInstance;
- dispatch_once(&once, ^{
- sharedInstance = [[self alloc] init];
- });
- return sharedInstance;
-}
-
-#pragma mark Registration
-
-- (BOOL) registerShortcut: (MASShortcut*) shortcut withAction: (dispatch_block_t) action
-{
- MASHotKey *hotKey = [MASHotKey registeredHotKeyWithShortcut:shortcut];
- if (hotKey) {
- [hotKey setAction:action];
- [_hotKeys setObject:hotKey forKey:shortcut];
- return YES;
- } else {
- return NO;
- }
-}
-
-- (void) unregisterShortcut: (MASShortcut*) shortcut
-{
- if (shortcut) {
- [_hotKeys removeObjectForKey:shortcut];
- }
-}
-
-- (void) unregisterAllShortcuts
-{
- [_hotKeys removeAllObjects];
-}
-
-- (BOOL) isShortcutRegistered: (MASShortcut*) shortcut
-{
- return !![_hotKeys objectForKey:shortcut];
-}
-
-#pragma mark Event Handling
-
-- (void) handleEvent: (EventRef) event
-{
- if (GetEventClass(event) != kEventClassKeyboard) {
- return;
- }
-
- EventHotKeyID hotKeyID;
- OSStatus status = GetEventParameter(event, kEventParamDirectObject, typeEventHotKeyID, NULL, sizeof(hotKeyID), NULL, &hotKeyID);
- if (status != noErr || hotKeyID.signature != MASHotKeySignature) {
- return;
- }
-
- [_hotKeys enumerateKeysAndObjectsUsingBlock:^(MASShortcut *shortcut, MASHotKey *hotKey, BOOL *stop) {
- if (hotKeyID.id == [hotKey carbonID]) {
- if ([hotKey action]) {
- dispatch_async(dispatch_get_main_queue(), [hotKey action]);
- }
- *stop = YES;
- }
- }];
-}
-
-@end
-
-static OSStatus MASCarbonEventCallback(EventHandlerCallRef _, EventRef event, void *context)
-{
- MASShortcutMonitor *dispatcher = (__bridge id)context;
- [dispatcher handleEvent:event];
- return noErr;
-}
diff --git a/vendor/Pods/MASShortcut/Framework/MASShortcutValidator.h b/vendor/Pods/MASShortcut/Framework/MASShortcutValidator.h
deleted file mode 100644
index cc5f816..0000000
--- a/vendor/Pods/MASShortcut/Framework/MASShortcutValidator.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#import "MASShortcut.h"
-
-@interface MASShortcutValidator : NSObject
-
-// The following API enable hotkeys with the Option key as the only modifier
-// For example, Option-G will not generate © and Option-R will not paste ®
-@property(assign) BOOL allowAnyShortcutWithOptionModifier;
-
-+ (instancetype) sharedValidator;
-
-- (BOOL) isShortcutValid: (MASShortcut*) shortcut;
-- (BOOL) isShortcut: (MASShortcut*) shortcut alreadyTakenInMenu: (NSMenu*) menu explanation: (NSString**) explanation;
-- (BOOL) isShortcutAlreadyTakenBySystem: (MASShortcut*) shortcut explanation: (NSString**) explanation;
-
-@end
diff --git a/vendor/Pods/MASShortcut/Framework/MASShortcutValidator.m b/vendor/Pods/MASShortcut/Framework/MASShortcutValidator.m
deleted file mode 100644
index 47dd700..0000000
--- a/vendor/Pods/MASShortcut/Framework/MASShortcutValidator.m
+++ /dev/null
@@ -1,111 +0,0 @@
-#import "MASShortcutValidator.h"
-
-@implementation MASShortcutValidator
-
-+ (instancetype) sharedValidator
-{
- static dispatch_once_t once;
- static MASShortcutValidator *sharedInstance;
- dispatch_once(&once, ^{
- sharedInstance = [[self alloc] init];
- });
- return sharedInstance;
-}
-
-- (BOOL) isShortcutValid: (MASShortcut*) shortcut
-{
- NSUInteger keyCode = [shortcut keyCode];
- NSUInteger modifiers = [shortcut modifierFlags];
-
- // Allow any function key with any combination of modifiers
- BOOL includesFunctionKey = ((keyCode == kVK_F1) || (keyCode == kVK_F2) || (keyCode == kVK_F3) || (keyCode == kVK_F4) ||
- (keyCode == kVK_F5) || (keyCode == kVK_F6) || (keyCode == kVK_F7) || (keyCode == kVK_F8) ||
- (keyCode == kVK_F9) || (keyCode == kVK_F10) || (keyCode == kVK_F11) || (keyCode == kVK_F12) ||
- (keyCode == kVK_F13) || (keyCode == kVK_F14) || (keyCode == kVK_F15) || (keyCode == kVK_F16) ||
- (keyCode == kVK_F17) || (keyCode == kVK_F18) || (keyCode == kVK_F19) || (keyCode == kVK_F20));
- if (includesFunctionKey) return YES;
-
- // Do not allow any other key without modifiers
- BOOL hasModifierFlags = (modifiers > 0);
- if (!hasModifierFlags) return NO;
-
- // Allow any hotkey containing Control or Command modifier
- BOOL includesCommand = ((modifiers & NSCommandKeyMask) > 0);
- BOOL includesControl = ((modifiers & NSControlKeyMask) > 0);
- if (includesCommand || includesControl) return YES;
-
- // Allow Option key only in selected cases
- BOOL includesOption = ((modifiers & NSAlternateKeyMask) > 0);
- if (includesOption) {
-
- // Always allow Option-Space and Option-Escape because they do not have any bind system commands
- if ((keyCode == kVK_Space) || (keyCode == kVK_Escape)) return YES;
-
- // Allow Option modifier with any key even if it will break the system binding
- if (_allowAnyShortcutWithOptionModifier) return YES;
- }
-
- // The hotkey does not have any modifiers or violates system bindings
- return NO;
-}
-
-- (BOOL) isShortcut: (MASShortcut*) shortcut alreadyTakenInMenu: (NSMenu*) menu explanation: (NSString**) explanation
-{
- NSString *keyEquivalent = [shortcut keyCodeStringForKeyEquivalent];
- NSUInteger flags = [shortcut modifierFlags];
-
- for (NSMenuItem *menuItem in menu.itemArray) {
- if (menuItem.hasSubmenu && [self isShortcut:shortcut alreadyTakenInMenu:[menuItem submenu] explanation:explanation]) return YES;
-
- BOOL equalFlags = (MASPickCocoaModifiers(menuItem.keyEquivalentModifierMask) == flags);
- BOOL equalHotkeyLowercase = [menuItem.keyEquivalent.lowercaseString isEqualToString:keyEquivalent];
-
- // Check if the cases are different, we know ours is lower and that shift is included in our modifiers
- // If theirs is capitol, we need to add shift to their modifiers
- if (equalHotkeyLowercase && ![menuItem.keyEquivalent isEqualToString:keyEquivalent]) {
- equalFlags = (MASPickCocoaModifiers(menuItem.keyEquivalentModifierMask | NSShiftKeyMask) == flags);
- }
-
- if (equalFlags && equalHotkeyLowercase) {
- if (explanation) {
- *explanation = NSLocalizedString(@"This shortcut cannot be used because it is already used by the menu item ‘%@’.",
- @"Message for alert when shortcut is already used");
- *explanation = [NSString stringWithFormat:*explanation, menuItem.title];
- }
- return YES;
- }
- }
- return NO;
-}
-
-- (BOOL) isShortcutAlreadyTakenBySystem: (MASShortcut*) shortcut explanation: (NSString**) explanation
-{
- CFArrayRef globalHotKeys;
- if (CopySymbolicHotKeys(&globalHotKeys) == noErr) {
-
- // Enumerate all global hotkeys and check if any of them matches current shortcut
- for (CFIndex i = 0, count = CFArrayGetCount(globalHotKeys); i < count; i++) {
- CFDictionaryRef hotKeyInfo = CFArrayGetValueAtIndex(globalHotKeys, i);
- CFNumberRef code = CFDictionaryGetValue(hotKeyInfo, kHISymbolicHotKeyCode);
- CFNumberRef flags = CFDictionaryGetValue(hotKeyInfo, kHISymbolicHotKeyModifiers);
- CFNumberRef enabled = CFDictionaryGetValue(hotKeyInfo, kHISymbolicHotKeyEnabled);
-
- if (([(__bridge NSNumber *)code unsignedIntegerValue] == [shortcut keyCode]) &&
- ([(__bridge NSNumber *)flags unsignedIntegerValue] == [shortcut carbonFlags]) &&
- ([(__bridge NSNumber *)enabled boolValue])) {
-
- if (explanation) {
- *explanation = NSLocalizedString(@"This combination cannot be used because it is already used by a system-wide "
- @"keyboard shortcut.\nIf you really want to use this key combination, most shortcuts "
- @"can be changed in the Keyboard & Mouse panel in System Preferences.",
- @"Message for alert when shortcut is already used by the system");
- }
- return YES;
- }
- }
- CFRelease(globalHotKeys);
- }
- return [self isShortcut:shortcut alreadyTakenInMenu:[NSApp mainMenu] explanation:explanation];
-}
-
-@end
diff --git a/vendor/Pods/MASShortcut/Framework/MASShortcutView+Bindings.h b/vendor/Pods/MASShortcut/Framework/MASShortcutView+Bindings.h
deleted file mode 100644
index 01b2246..0000000
--- a/vendor/Pods/MASShortcut/Framework/MASShortcutView+Bindings.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#import "MASShortcutView.h"
-
-/**
- A simplified interface to bind the recorder value to user defaults.
-
- You can bind the `shortcutValue` to user defaults using the standard
- `bind:toObject:withKeyPath:options:` call, but since that’s a lot to type
- and read, here’s a simpler option.
-
- Setting the `associatedUserDefaultsKey` binds the view’s shortcut value
- to the given user defaults key. You can supply a value transformer to convert
- values between user defaults and `MASShortcut`. If you don’t supply
- a transformer, the `NSUnarchiveFromDataTransformerName` will be used
- automatically.
-
- Set `associatedUserDefaultsKey` to `nil` to disconnect the binding.
-*/
-@interface MASShortcutView (Bindings)
-
-@property(copy) NSString *associatedUserDefaultsKey;
-
-- (void) setAssociatedUserDefaultsKey: (NSString*) newKey withTransformer: (NSValueTransformer*) transformer;
-- (void) setAssociatedUserDefaultsKey: (NSString*) newKey withTransformerName: (NSString*) transformerName;
-
-@end
diff --git a/vendor/Pods/MASShortcut/Framework/MASShortcutView+Bindings.m b/vendor/Pods/MASShortcut/Framework/MASShortcutView+Bindings.m
deleted file mode 100644
index 54c5111..0000000
--- a/vendor/Pods/MASShortcut/Framework/MASShortcutView+Bindings.m
+++ /dev/null
@@ -1,50 +0,0 @@
-#import "MASShortcutView+Bindings.h"
-
-@implementation MASShortcutView (Bindings)
-
-- (NSString*) associatedUserDefaultsKey
-{
- NSDictionary* bindingInfo = [self infoForBinding:MASShortcutBinding];
- if (bindingInfo != nil) {
- NSString *keyPath = [bindingInfo objectForKey:NSObservedKeyPathKey];
- NSString *key = [keyPath stringByReplacingOccurrencesOfString:@"values." withString:@""];
- return key;
- } else {
- return nil;
- }
-}
-
-- (void) setAssociatedUserDefaultsKey: (NSString*) newKey withTransformer: (NSValueTransformer*) transformer
-{
- // Break previous binding if any
- NSString *currentKey = [self associatedUserDefaultsKey];
- if (currentKey != nil) {
- [self unbind:currentKey];
- }
-
- // Stop if the new binding is nil
- if (newKey == nil) {
- return;
- }
-
- NSDictionary *options = transformer ?
- @{NSValueTransformerBindingOption:transformer} :
- nil;
-
- [self bind:MASShortcutBinding
- toObject:[NSUserDefaultsController sharedUserDefaultsController]
- withKeyPath:[@"values." stringByAppendingString:newKey]
- options:options];
-}
-
-- (void) setAssociatedUserDefaultsKey: (NSString*) newKey withTransformerName: (NSString*) transformerName
-{
- [self setAssociatedUserDefaultsKey:newKey withTransformer:[NSValueTransformer valueTransformerForName:transformerName]];
-}
-
-- (void) setAssociatedUserDefaultsKey: (NSString*) newKey
-{
- [self setAssociatedUserDefaultsKey:newKey withTransformerName:NSKeyedUnarchiveFromDataTransformerName];
-}
-
-@end
diff --git a/vendor/Pods/MASShortcut/Framework/MASShortcutView.h b/vendor/Pods/MASShortcut/Framework/MASShortcutView.h
deleted file mode 100644
index 166be44..0000000
--- a/vendor/Pods/MASShortcut/Framework/MASShortcutView.h
+++ /dev/null
@@ -1,24 +0,0 @@
-@class MASShortcut, MASShortcutValidator;
-
-extern NSString *const MASShortcutBinding;
-
-typedef enum {
- MASShortcutViewStyleDefault = 0, // Height = 19 px
- MASShortcutViewStyleTexturedRect, // Height = 25 px
- MASShortcutViewStyleRounded, // Height = 43 px
- MASShortcutViewStyleFlat
-} MASShortcutViewStyle;
-
-@interface MASShortcutView : NSView
-
-@property (nonatomic, strong) MASShortcut *shortcutValue;
-@property (nonatomic, strong) MASShortcutValidator *shortcutValidator;
-@property (nonatomic, getter = isRecording) BOOL recording;
-@property (nonatomic, getter = isEnabled) BOOL enabled;
-@property (nonatomic, copy) void (^shortcutValueChange)(MASShortcutView *sender);
-@property (nonatomic, assign) MASShortcutViewStyle style;
-
-/// Returns custom class for drawing control.
-+ (Class)shortcutCellClass;
-
-@end
diff --git a/vendor/Pods/MASShortcut/Framework/MASShortcutView.m b/vendor/Pods/MASShortcut/Framework/MASShortcutView.m
deleted file mode 100644
index d521880..0000000
--- a/vendor/Pods/MASShortcut/Framework/MASShortcutView.m
+++ /dev/null
@@ -1,511 +0,0 @@
-#import "MASShortcutView.h"
-#import "MASShortcutValidator.h"
-
-NSString *const MASShortcutBinding = @"shortcutValue";
-
-#define HINT_BUTTON_WIDTH 23.0
-#define BUTTON_FONT_SIZE 11.0
-#define SEGMENT_CHROME_WIDTH 6.0
-
-#pragma mark -
-
-@interface MASShortcutView () // Private accessors
-
-@property (nonatomic, getter = isHinting) BOOL hinting;
-@property (nonatomic, copy) NSString *shortcutPlaceholder;
-
-@end
-
-#pragma mark -
-
-@implementation MASShortcutView {
- NSButtonCell *_shortcutCell;
- NSInteger _shortcutToolTipTag;
- NSInteger _hintToolTipTag;
- NSTrackingArea *_hintArea;
-}
-
-#pragma mark -
-
-+ (Class)shortcutCellClass
-{
- return [NSButtonCell class];
-}
-
-- (id)initWithFrame:(CGRect)frameRect
-{
- self = [super initWithFrame:frameRect];
- if (self) {
- [self commonInit];
- }
- return self;
-}
-
-- (id)initWithCoder:(NSCoder *)coder
-{
- self = [super initWithCoder:coder];
- if (self) {
- [self commonInit];
- }
- return self;
-}
-
-- (void)commonInit
-{
- _shortcutCell = [[[self.class shortcutCellClass] alloc] init];
- _shortcutCell.buttonType = NSPushOnPushOffButton;
- _shortcutCell.font = [[NSFontManager sharedFontManager] convertFont:_shortcutCell.font toSize:BUTTON_FONT_SIZE];
- _shortcutValidator = [MASShortcutValidator sharedValidator];
- _enabled = YES;
- [self resetShortcutCellStyle];
-}
-
-- (void)dealloc
-{
- [self activateEventMonitoring:NO];
- [self activateResignObserver:NO];
-}
-
-#pragma mark - Public accessors
-
-- (void)setEnabled:(BOOL)flag
-{
- if (_enabled != flag) {
- _enabled = flag;
- [self updateTrackingAreas];
- self.recording = NO;
- [self setNeedsDisplay:YES];
- }
-}
-
-- (void)setStyle:(MASShortcutViewStyle)newStyle
-{
- if (_style != newStyle) {
- _style = newStyle;
- [self resetShortcutCellStyle];
- [self setNeedsDisplay:YES];
- }
-}
-
-- (void)resetShortcutCellStyle
-{
- switch (_style) {
- case MASShortcutViewStyleDefault: {
- _shortcutCell.bezelStyle = NSRoundRectBezelStyle;
- break;
- }
- case MASShortcutViewStyleTexturedRect: {
- _shortcutCell.bezelStyle = NSTexturedRoundedBezelStyle;
- break;
- }
- case MASShortcutViewStyleRounded: {
- _shortcutCell.bezelStyle = NSRoundedBezelStyle;
- break;
- }
- case MASShortcutViewStyleFlat: {
- self.wantsLayer = YES;
- _shortcutCell.backgroundColor = [NSColor clearColor];
- _shortcutCell.bordered = NO;
- break;
- }
- }
-}
-
-- (void)setRecording:(BOOL)flag
-{
- // Only one recorder can be active at the moment
- static MASShortcutView *currentRecorder = nil;
- if (flag && (currentRecorder != self)) {
- currentRecorder.recording = NO;
- currentRecorder = flag ? self : nil;
- }
-
- // Only enabled view supports recording
- if (flag && !self.enabled) return;
-
- if (_recording != flag) {
- _recording = flag;
- self.shortcutPlaceholder = nil;
- [self resetToolTips];
- [self activateEventMonitoring:_recording];
- [self activateResignObserver:_recording];
- [self setNeedsDisplay:YES];
- }
-}
-
-- (void)setShortcutValue:(MASShortcut *)shortcutValue
-{
- _shortcutValue = shortcutValue;
- [self resetToolTips];
- [self setNeedsDisplay:YES];
- [self propagateValue:shortcutValue forBinding:@"shortcutValue"];
-
- if (self.shortcutValueChange) {
- self.shortcutValueChange(self);
- }
-}
-
-- (void)setShortcutPlaceholder:(NSString *)shortcutPlaceholder
-{
- _shortcutPlaceholder = shortcutPlaceholder.copy;
- [self setNeedsDisplay:YES];
-}
-
-#pragma mark - Drawing
-
-- (BOOL)isFlipped
-{
- return YES;
-}
-
-- (void)drawInRect:(CGRect)frame withTitle:(NSString *)title alignment:(NSTextAlignment)alignment state:(NSInteger)state
-{
- _shortcutCell.title = title;
- _shortcutCell.alignment = alignment;
- _shortcutCell.state = state;
- _shortcutCell.enabled = self.enabled;
-
- switch (_style) {
- case MASShortcutViewStyleDefault: {
- [_shortcutCell drawWithFrame:frame inView:self];
- break;
- }
- case MASShortcutViewStyleTexturedRect: {
- [_shortcutCell drawWithFrame:CGRectOffset(frame, 0.0, 1.0) inView:self];
- break;
- }
- case MASShortcutViewStyleRounded: {
- [_shortcutCell drawWithFrame:CGRectOffset(frame, 0.0, 1.0) inView:self];
- break;
- }
- case MASShortcutViewStyleFlat: {
- [_shortcutCell drawWithFrame:frame inView:self];
- break;
- }
- }
-}
-
-- (void)drawRect:(CGRect)dirtyRect
-{
- if (self.shortcutValue) {
- [self drawInRect:self.bounds withTitle:NSStringFromMASKeyCode(self.recording ? kMASShortcutGlyphEscape : kMASShortcutGlyphClear)
- alignment:NSRightTextAlignment state:NSOffState];
-
- CGRect shortcutRect;
- [self getShortcutRect:&shortcutRect hintRect:NULL];
- NSString *title = (self.recording
- ? (_hinting
- ? NSLocalizedString(@"Use Old Shortcut", @"Cancel action button for non-empty shortcut in recording state")
- : (self.shortcutPlaceholder.length > 0
- ? self.shortcutPlaceholder
- : NSLocalizedString(@"Type New Shortcut", @"Non-empty shortcut button in recording state")))
- : _shortcutValue ? _shortcutValue.description : @"");
- [self drawInRect:shortcutRect withTitle:title alignment:NSCenterTextAlignment state:self.isRecording ? NSOnState : NSOffState];
- }
- else {
- if (self.recording)
- {
- [self drawInRect:self.bounds withTitle:NSStringFromMASKeyCode(kMASShortcutGlyphEscape) alignment:NSRightTextAlignment state:NSOffState];
-
- CGRect shortcutRect;
- [self getShortcutRect:&shortcutRect hintRect:NULL];
- NSString *title = (_hinting
- ? NSLocalizedString(@"Cancel", @"Cancel action button in recording state")
- : (self.shortcutPlaceholder.length > 0
- ? self.shortcutPlaceholder
- : NSLocalizedString(@"Type Shortcut", @"Empty shortcut button in recording state")));
- [self drawInRect:shortcutRect withTitle:title alignment:NSCenterTextAlignment state:NSOnState];
- }
- else
- {
- [self drawInRect:self.bounds withTitle:NSLocalizedString(@"Record Shortcut", @"Empty shortcut button in normal state")
- alignment:NSCenterTextAlignment state:NSOffState];
- }
- }
-}
-
-#pragma mark - Mouse handling
-
-- (void)getShortcutRect:(CGRect *)shortcutRectRef hintRect:(CGRect *)hintRectRef
-{
- CGRect shortcutRect, hintRect;
- CGFloat hintButtonWidth = HINT_BUTTON_WIDTH;
- switch (self.style) {
- case MASShortcutViewStyleTexturedRect: hintButtonWidth += 2.0; break;
- case MASShortcutViewStyleRounded: hintButtonWidth += 3.0; break;
- case MASShortcutViewStyleFlat: hintButtonWidth -= 8.0 - (_shortcutCell.font.pointSize - BUTTON_FONT_SIZE); break;
- default: break;
- }
- CGRectDivide(self.bounds, &hintRect, &shortcutRect, hintButtonWidth, CGRectMaxXEdge);
- if (shortcutRectRef) *shortcutRectRef = shortcutRect;
- if (hintRectRef) *hintRectRef = hintRect;
-}
-
-- (BOOL)locationInShortcutRect:(CGPoint)location
-{
- CGRect shortcutRect;
- [self getShortcutRect:&shortcutRect hintRect:NULL];
- return CGRectContainsPoint(shortcutRect, [self convertPoint:location fromView:nil]);
-}
-
-- (BOOL)locationInHintRect:(CGPoint)location
-{
- CGRect hintRect;
- [self getShortcutRect:NULL hintRect:&hintRect];
- return CGRectContainsPoint(hintRect, [self convertPoint:location fromView:nil]);
-}
-
-- (void)mouseDown:(NSEvent *)event
-{
- if (self.enabled) {
- if (self.shortcutValue) {
- if (self.recording) {
- if ([self locationInHintRect:event.locationInWindow]) {
- self.recording = NO;
- }
- }
- else {
- if ([self locationInShortcutRect:event.locationInWindow]) {
- self.recording = YES;
- }
- else {
- self.shortcutValue = nil;
- }
- }
- }
- else {
- if (self.recording) {
- if ([self locationInHintRect:event.locationInWindow]) {
- self.recording = NO;
- }
- }
- else {
- self.recording = YES;
- }
- }
- }
- else {
- [super mouseDown:event];
- }
-}
-
-#pragma mark - Handling mouse over
-
-- (void)updateTrackingAreas
-{
- [super updateTrackingAreas];
-
- if (_hintArea) {
- [self removeTrackingArea:_hintArea];
- _hintArea = nil;
- }
-
- // Forbid hinting if view is disabled
- if (!self.enabled) return;
-
- CGRect hintRect;
- [self getShortcutRect:NULL hintRect:&hintRect];
- NSTrackingAreaOptions options = (NSTrackingMouseEnteredAndExited | NSTrackingActiveAlways | NSTrackingAssumeInside);
- _hintArea = [[NSTrackingArea alloc] initWithRect:hintRect options:options owner:self userInfo:nil];
- [self addTrackingArea:_hintArea];
-}
-
-- (void)setHinting:(BOOL)flag
-{
- if (_hinting != flag) {
- _hinting = flag;
- [self setNeedsDisplay:YES];
- }
-}
-
-- (void)mouseEntered:(NSEvent *)event
-{
- self.hinting = YES;
-}
-
-- (void)mouseExited:(NSEvent *)event
-{
- self.hinting = NO;
-}
-
-void *kUserDataShortcut = &kUserDataShortcut;
-void *kUserDataHint = &kUserDataHint;
-
-- (void)resetToolTips
-{
- if (_shortcutToolTipTag) {
- [self removeToolTip:_shortcutToolTipTag], _shortcutToolTipTag = 0;
- }
- if (_hintToolTipTag) {
- [self removeToolTip:_hintToolTipTag], _hintToolTipTag = 0;
- }
-
- if ((self.shortcutValue == nil) || self.recording || !self.enabled) return;
-
- CGRect shortcutRect, hintRect;
- [self getShortcutRect:&shortcutRect hintRect:&hintRect];
- _shortcutToolTipTag = [self addToolTipRect:shortcutRect owner:self userData:kUserDataShortcut];
- _hintToolTipTag = [self addToolTipRect:hintRect owner:self userData:kUserDataHint];
-}
-
-- (NSString *)view:(NSView *)view stringForToolTip:(NSToolTipTag)tag point:(CGPoint)point userData:(void *)data
-{
- if (data == kUserDataShortcut) {
- return NSLocalizedString(@"Click to record new shortcut", @"Tooltip for non-empty shortcut button");
- }
- else if (data == kUserDataHint) {
- return NSLocalizedString(@"Delete shortcut", @"Tooltip for hint button near the non-empty shortcut");
- }
- return nil;
-}
-
-#pragma mark - Event monitoring
-
-- (void)activateEventMonitoring:(BOOL)shouldActivate
-{
- static BOOL isActive = NO;
- if (isActive == shouldActivate) return;
- isActive = shouldActivate;
-
- static id eventMonitor = nil;
- if (shouldActivate) {
- __unsafe_unretained MASShortcutView *weakSelf = self;
- NSEventMask eventMask = (NSKeyDownMask | NSFlagsChangedMask);
- eventMonitor = [NSEvent addLocalMonitorForEventsMatchingMask:eventMask handler:^(NSEvent *event) {
-
- // Create a shortcut from the event
- MASShortcut *shortcut = [MASShortcut shortcutWithEvent:event];
-
- // If the shortcut is a plain Delete or Backspace, clear the current shortcut and cancel recording
- if (!shortcut.modifierFlags && ((shortcut.keyCode == kVK_Delete) || (shortcut.keyCode == kVK_ForwardDelete))) {
- weakSelf.shortcutValue = nil;
- weakSelf.recording = NO;
- event = nil;
- }
-
- // If the shortcut is a plain Esc, cancel recording
- else if (!shortcut.modifierFlags && shortcut.keyCode == kVK_Escape) {
- weakSelf.recording = NO;
- event = nil;
- }
-
- // If the shortcut is Cmd-W or Cmd-Q, cancel recording and pass the event through
- else if ((shortcut.modifierFlags == NSCommandKeyMask) && (shortcut.keyCode == kVK_ANSI_W || shortcut.keyCode == kVK_ANSI_Q)) {
- weakSelf.recording = NO;
- }
-
- else {
- // Verify possible shortcut
- if (shortcut.keyCodeString.length > 0) {
- if ([_shortcutValidator isShortcutValid:shortcut]) {
- // Verify that shortcut is not used
- NSString *explanation = nil;
- if ([_shortcutValidator isShortcutAlreadyTakenBySystem:shortcut explanation:&explanation]) {
- // Prevent cancel of recording when Alert window is key
- [weakSelf activateResignObserver:NO];
- [weakSelf activateEventMonitoring:NO];
- NSString *format = NSLocalizedString(@"The key combination %@ cannot be used",
- @"Title for alert when shortcut is already used");
- NSAlert* alert = [[NSAlert alloc]init];
- alert.alertStyle = NSCriticalAlertStyle;
- alert.informativeText = explanation;
- alert.messageText = [NSString stringWithFormat:format, shortcut];
- [alert addButtonWithTitle:NSLocalizedString(@"OK", @"Alert button when shortcut is already used")];
-
- [alert runModal];
- weakSelf.shortcutPlaceholder = nil;
- [weakSelf activateResignObserver:YES];
- [weakSelf activateEventMonitoring:YES];
- }
- else {
- weakSelf.shortcutValue = shortcut;
- weakSelf.recording = NO;
- }
- }
- else {
- // Key press with or without SHIFT is not valid input
- NSBeep();
- }
- }
- else {
- // User is playing with modifier keys
- weakSelf.shortcutPlaceholder = shortcut.modifierFlagsString;
- }
- event = nil;
- }
- return event;
- }];
- }
- else {
- [NSEvent removeMonitor:eventMonitor];
- }
-}
-
-- (void)activateResignObserver:(BOOL)shouldActivate
-{
- static BOOL isActive = NO;
- if (isActive == shouldActivate) return;
- isActive = shouldActivate;
-
- static id observer = nil;
- NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter];
- if (shouldActivate) {
- __unsafe_unretained MASShortcutView *weakSelf = self;
- observer = [notificationCenter addObserverForName:NSWindowDidResignKeyNotification object:self.window
- queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notification) {
- weakSelf.recording = NO;
- }];
- }
- else {
- [notificationCenter removeObserver:observer];
- }
-}
-
-#pragma mark Bindings
-
-// http://tomdalling.com/blog/cocoa/implementing-your-own-cocoa-bindings/
--(void) propagateValue:(id)value forBinding:(NSString*)binding;
-{
- NSParameterAssert(binding != nil);
-
- //WARNING: bindingInfo contains NSNull, so it must be accounted for
- NSDictionary* bindingInfo = [self infoForBinding:binding];
- if(!bindingInfo)
- return; //there is no binding
-
- //apply the value transformer, if one has been set
- NSDictionary* bindingOptions = [bindingInfo objectForKey:NSOptionsKey];
- if(bindingOptions){
- NSValueTransformer* transformer = [bindingOptions valueForKey:NSValueTransformerBindingOption];
- if(!transformer || (id)transformer == [NSNull null]){
- NSString* transformerName = [bindingOptions valueForKey:NSValueTransformerNameBindingOption];
- if(transformerName && (id)transformerName != [NSNull null]){
- transformer = [NSValueTransformer valueTransformerForName:transformerName];
- }
- }
-
- if(transformer && (id)transformer != [NSNull null]){
- if([[transformer class] allowsReverseTransformation]){
- value = [transformer reverseTransformedValue:value];
- } else {
- NSLog(@"WARNING: binding \"%@\" has value transformer, but it doesn't allow reverse transformations in %s", binding, __PRETTY_FUNCTION__);
- }
- }
- }
-
- id boundObject = [bindingInfo objectForKey:NSObservedObjectKey];
- if(!boundObject || boundObject == [NSNull null]){
- NSLog(@"ERROR: NSObservedObjectKey was nil for binding \"%@\" in %s", binding, __PRETTY_FUNCTION__);
- return;
- }
-
- NSString* boundKeyPath = [bindingInfo objectForKey:NSObservedKeyPathKey];
- if(!boundKeyPath || (id)boundKeyPath == [NSNull null]){
- NSLog(@"ERROR: NSObservedKeyPathKey was nil for binding \"%@\" in %s", binding, __PRETTY_FUNCTION__);
- return;
- }
-
- [boundObject setValue:value forKeyPath:boundKeyPath];
-}
-
-@end
diff --git a/vendor/Pods/MASShortcut/Framework/Shortcut.h b/vendor/Pods/MASShortcut/Framework/Shortcut.h
deleted file mode 100644
index e131395..0000000
--- a/vendor/Pods/MASShortcut/Framework/Shortcut.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#import "MASShortcut.h"
-#import "MASShortcutValidator.h"
-#import "MASShortcutMonitor.h"
-#import "MASShortcutBinder.h"
-#import "MASDictionaryTransformer.h"
-#import "MASShortcutView.h"
-#import "MASShortcutView+Bindings.h"
\ No newline at end of file
diff --git a/vendor/Pods/MASShortcut/LICENSE b/vendor/Pods/MASShortcut/LICENSE
deleted file mode 100644
index e768631..0000000
--- a/vendor/Pods/MASShortcut/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright (c) 2012-2013, Vadim Shpakovski
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/Pods/MASShortcut/README.md b/vendor/Pods/MASShortcut/README.md
deleted file mode 100644
index c79dbee..0000000
--- a/vendor/Pods/MASShortcut/README.md
+++ /dev/null
@@ -1,111 +0,0 @@
-[![Build Status](https://travis-ci.org/shpakovski/MASShortcut.svg?branch=master)](https://travis-ci.org/shpakovski/MASShortcut)
-
-# Intro
-
-Some time ago Cocoa developers used a brilliant framework [ShortcutRecorder](http://wafflesoftware.net/shortcut/) for managing keyboard shortcuts in application preferences. However, it became incompatible with the new plugin architecture of Xcode 4.
-
-The MASShortcut project introduces a modern API and user interface for recording, storing and using system-wide keyboard shortcuts. All code is compatible with recent Xcode & OS X versions and the sandboxed environment.
-
-# Installation
-
-You can use [CocoaPods](http://cocoapods.org/), adding the following line to your Podfile:
-
- pod 'MASShortcut'
-
-If you want to stick to the 1.x branch, you can use the version smart match operator:
-
- pod 'MASShortcut', '~> 1'
-
-# Usage
-
-I hope, it is really easy:
-
-```objective-c
-#import
-
-// Drop a custom view into XIB, set its class to MASShortcutView
-// and its height to 19. If you select another appearance style,
-// look up the correct height values in MASShortcutView.h.
-@property (nonatomic, weak) IBOutlet MASShortcutView *shortcutView;
-
-// Pick a preference key to store the shortcut between launches
-static NSString *const kPreferenceGlobalShortcut = @"GlobalShortcut";
-
-// Associate the shortcut view with user defaults
-self.shortcutView.associatedUserDefaultsKey = kPreferenceGlobalShortcut;
-
-// Associate the preference key with an action
-[[MASShortcutBinder sharedBinder]
- bindShortcutWithDefaultsKey:kPreferenceGlobalShortcut
- toAction:^{
- // Let me know if you find a better or a more convenient API.
-}];
-```
-
-You can see a real usage example in the Demo target. Enjoy!
-
-# Shortcut Recorder Compatibility
-
-By default, MASShortcut uses a different User Defaults storage format incompatible with Shortcut Recorder. But it’s easily possible to change that, so that you can replace Shortcut Recorder with MASShortcut without having to migrate the shortcuts previously stored by your apps. There are two parts of the story:
-
-If you bind the recorder control (`MASShortcutView`) to User defaults, set the Value Transformer field in the Interface Builder to `MASDictionaryTransformer`. This makes sure the shortcuts are written in the Shortcut Recorder format.
-
-If you use `MASShortcutBinder` to automatically load shortcuts from User Defaults, set the `bindingOptions` accordingly:
-
-```objective-c
-[[MASShortcutBinder sharedBinder] setBindingOptions:@{NSValueTransformerNameBindingOption:MASDictionaryTransformerName}];
-```
-
-This makes sure that the shortcuts in the Shortcut Recorder format are loaded correctly.
-
-# Notifications
-
-By registering for KVO notifications from `NSUserDefaultsController`, you can get a callback whenever a user changes the shortcut, allowing you to perform any UI updates, or other code handling tasks.
-
-This is just as easy to implement:
-
-```objective-c
-// Declare an ivar for key path in the user defaults controller
-NSString *_observableKeyPath;
-
-// Make a global context reference
-void *kGlobalShortcutContext = &kGlobalShortcutContext;
-
-// Implement when loading view
-_observableKeyPath = [@"values." stringByAppendingString:kPreferenceGlobalShortcut];
-[[NSUserDefaultsController sharedUserDefaultsController] addObserver:self forKeyPath:_observableKeyPath
- options:NSKeyValueObservingOptionInitial
- context:kGlobalShortcutContext];
-
-// Capture the KVO change and do something
-- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)obj
- change:(NSDictionary *)change context:(void *)ctx
-{
- if (ctx == kGlobalShortcutContext) {
- NSLog(@"Shortcut has changed");
- }
- else {
- [super observeValueForKeyPath:keyPath ofObject:obj change:change context:ctx];
- }
-}
-
-// Do not forget to remove the observer
-[[NSUserDefaultsController sharedUserDefaultsController] removeObserver:self
- forKeyPath:_observableKeyPath
- context:kGlobalShortcutContext];
-```
-
-# Using in Swift projects
-
- 1. Install as a Pod using the latest CocoaPods with Swift support.
- 2. Create a bridging header file [using the instructions here](http://swiftalicio.us/2014/11/using-cocoapods-from-swift/)
- 3. Your bridging header file should contain the following [two](https://github.com/shpakovski/MASShortcut/issues/36) imports:
-
-```objective-c
-#import
-#import
-```
-
-# Copyright
-
-MASShortcut is licensed under the 2-clause BSD license.
diff --git a/vendor/Pods/Manifest.lock b/vendor/Pods/Manifest.lock
deleted file mode 100644
index 0d2e2bb..0000000
--- a/vendor/Pods/Manifest.lock
+++ /dev/null
@@ -1,33 +0,0 @@
-PODS:
- - AFNetworking (2.5.0):
- - AFNetworking/NSURLConnection (= 2.5.0)
- - AFNetworking/NSURLSession (= 2.5.0)
- - AFNetworking/Reachability (= 2.5.0)
- - AFNetworking/Security (= 2.5.0)
- - AFNetworking/Serialization (= 2.5.0)
- - AFNetworking/UIKit (= 2.5.0)
- - AFNetworking/NSURLConnection (2.5.0):
- - AFNetworking/Reachability
- - AFNetworking/Security
- - AFNetworking/Serialization
- - AFNetworking/NSURLSession (2.5.0):
- - AFNetworking/Reachability
- - AFNetworking/Security
- - AFNetworking/Serialization
- - AFNetworking/Reachability (2.5.0)
- - AFNetworking/Security (2.5.0)
- - AFNetworking/Serialization (2.5.0)
- - MASShortcut (2.1.1)
- - SocketRocket (0.2.0)
-
-DEPENDENCIES:
- - AFNetworking (~> 2.0)
- - MASShortcut
- - SocketRocket
-
-SPEC CHECKSUMS:
- AFNetworking: 0f54cb5d16ce38c1b76948faffb8d5fb705021c7
- MASShortcut: eaf6fc60ae9742d21312b2463c4ac25bcdb27f24
- SocketRocket: 6c9cfd1592bea82262b4283dcda3a7de166af3b6
-
-COCOAPODS: 0.35.0
diff --git a/vendor/Pods/Pods.xcodeproj/project.pbxproj b/vendor/Pods/Pods.xcodeproj/project.pbxproj
deleted file mode 100644
index 2fb1828..0000000
--- a/vendor/Pods/Pods.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,2858 +0,0 @@
-
-
-
-
- archiveVersion
- 1
- classes
-
- objectVersion
- 46
- objects
-
- 0089DD40658511F2C68D5441
-
- buildConfigurationList
- 8B531D307B6C41CC01E5F43E
- buildPhases
-
- 3630CD0CB861703BC5966AAF
- 7996D1F4B68E4F238FD457C7
- F57E5F8329878AD44B101BA1
-
- buildRules
-
- dependencies
-
- isa
- PBXNativeTarget
- name
- Pods-MASShortcut
- productName
- Pods-MASShortcut
- productReference
- 838F6142BF37BF556C11F454
- productType
- com.apple.product-type.library.static
-
- 049308269D242EBC48273514
-
- fileRef
- 90280D34A96E8520686586AB
- isa
- PBXBuildFile
- settings
-
- COMPILER_FLAGS
- -DOS_OBJECT_USE_OBJC=0
-
-
- 069FCCCE8D25B9D38774A2B1
-
- buildActionMask
- 2147483647
- files
-
- A443DE3DA6A946ED34CA0D9B
-
- isa
- PBXSourcesBuildPhase
- runOnlyForDeploymentPostprocessing
- 0
-
- 07ABE605310690E4F30996E2
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.h
- name
- AFHTTPRequestOperationManager.h
- path
- AFNetworking/AFHTTPRequestOperationManager.h
- sourceTree
- <group>
-
- 08C4D0059A603C5CC722190A
-
- buildActionMask
- 2147483647
- files
-
- C675DA9C092A11E98AB975B9
- 1F5FA4BA4CE4FAD1A77BBF6C
- 99CB3DF62DB1AA68187AE308
-
- isa
- PBXFrameworksBuildPhase
- runOnlyForDeploymentPostprocessing
- 0
-
- 090A34383DCC113ADE2BFDBC
-
- fileRef
- CE3250763B9346E46A764214
- isa
- PBXBuildFile
-
- 0C2EF97ACEE76A071487CF14
-
- fileRef
- 3D8759D02073E31EBAD26857
- isa
- PBXBuildFile
-
- 0CA0C4D365D576E0C5218A66
-
- fileRef
- 225288A18A1F9D90309B5C09
- isa
- PBXBuildFile
-
- 0EE1F4CF5CF11894F3E935C5
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.h
- name
- MASHotKey.h
- path
- Framework/MASHotKey.h
- sourceTree
- <group>
-
- 0F152C6337CF3415E7D19F67
-
- fileRef
- 455E4DD4EC90D46BEB55CBE7
- isa
- PBXBuildFile
-
- 0F40D51E432D7E226B2DDF2F
-
- buildConfigurationList
- 34CB2EF93D493DFEF3B00C10
- buildPhases
-
- 9B366904CDE9B4BCE13830C4
- FD40EC174BC339958657D7E7
- EFA41ED7CCC1BA6CCBB030E4
-
- buildRules
-
- dependencies
-
- isa
- PBXNativeTarget
- name
- Pods-AFNetworking
- productName
- Pods-AFNetworking
- productReference
- EF22A89320848BC05463F4A3
- productType
- com.apple.product-type.library.static
-
- 1129C9B62B72AE6828F4EB1F
-
- 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
- COPY_PHASE_STRIP
- YES
- 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
- MACOSX_DEPLOYMENT_TARGET
- 10.8
- ONLY_ACTIVE_ARCH
- YES
- STRIP_INSTALLED_PRODUCT
- NO
-
- isa
- XCBuildConfiguration
- name
- Debug
-
- 133057AF82EACBC481FE9983
-
- children
-
- 976DEF42578884FCD507CA95
- EF22A89320848BC05463F4A3
- 838F6142BF37BF556C11F454
- F1B2D2DC7E031CF249B25BC1
-
- isa
- PBXGroup
- name
- Products
- sourceTree
- <group>
-
- 141AA15F5753B38BF666ECF7
-
- fileRef
- D23B559BC654D3B27DAC9DC0
- isa
- PBXBuildFile
-
- 1A3444D2B78E863B4B99FE5C
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.h
- path
- Pods-MASShortcut-prefix.pch
- sourceTree
- <group>
-
- 1CB7418B8FA2AEB1A7ACAB3D
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- text.xcconfig
- path
- Pods-AFNetworking-Private.xcconfig
- sourceTree
- <group>
-
- 1DA5A047182D9CA95D4B6A1F
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- text
- path
- Pods-acknowledgements.markdown
- sourceTree
- <group>
-
- 1F2687545C131592B068C24B
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.h
- name
- SRWebSocket.h
- path
- SocketRocket/SRWebSocket.h
- sourceTree
- <group>
-
- 1F498CE74B75328E2F3AC128
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- text.xcconfig
- path
- Pods.debug.xcconfig
- sourceTree
- <group>
-
- 1F5FA4BA4CE4FAD1A77BBF6C
-
- fileRef
- 6521592AB534D100EA6630C0
- isa
- PBXBuildFile
-
- 1FDC10D1BB0BACAF523B9DF8
-
- children
-
- 9A70740C1D0CBA9114202261
-
- isa
- PBXGroup
- name
- Targets Support Files
- sourceTree
- <group>
-
- 1FEA81A48CEFC5D40B38021A
-
- children
-
- 2CE53CCF080574252CE2DAD6
- 1CB7418B8FA2AEB1A7ACAB3D
- 21D8DCAB26735485893B5155
- CEF2788FC4AB4868B1CD07B9
-
- isa
- PBXGroup
- name
- Support Files
- path
- ../Target Support Files/Pods-AFNetworking
- sourceTree
- <group>
-
- 2018C4EEA6BD9268C94FDE31
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.h
- name
- MASShortcutView.h
- path
- Framework/MASShortcutView.h
- sourceTree
- <group>
-
- 210B28B1E63DD33AB7571E94
-
- baseConfigurationReference
- 30F86373A49B0580F4DE1A13
- buildSettings
-
- ALWAYS_SEARCH_USER_PATHS
- NO
- ARCHS
- $(ARCHS_STANDARD_64_BIT)
- COMBINE_HIDPI_IMAGES
- YES
- COPY_PHASE_STRIP
- YES
- DEBUG_INFORMATION_FORMAT
- dwarf-with-dsym
- DSTROOT
- /tmp/xcodeproj.dst
- GCC_ENABLE_OBJC_EXCEPTIONS
- YES
- GCC_PRECOMPILE_PREFIX_HEADER
- YES
- GCC_VERSION
- com.apple.compilers.llvm.clang.1_0
- INSTALL_PATH
- $(BUILT_PRODUCTS_DIR)
- MACOSX_DEPLOYMENT_TARGET
- 10.8
- OTHER_CFLAGS
-
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
-
- OTHER_CPLUSPLUSFLAGS
-
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
-
- OTHER_LDFLAGS
-
- OTHER_LIBTOOLFLAGS
-
- PRODUCT_NAME
- $(TARGET_NAME)
- SDKROOT
- macosx
- SKIP_INSTALL
- YES
-
- isa
- XCBuildConfiguration
- name
- Release
-
- 21D8DCAB26735485893B5155
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.objc
- path
- Pods-AFNetworking-dummy.m
- sourceTree
- <group>
-
- 225288A18A1F9D90309B5C09
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.h
- name
- base64.h
- path
- SocketRocket/base64.h
- sourceTree
- <group>
-
- 26892C4EE4E57D5400F90871
-
- fileRef
- CAC4F4C4B47AA8189CC37108
- isa
- PBXBuildFile
- settings
-
- COMPILER_FLAGS
- -DOS_OBJECT_USE_OBJC=0
-
-
- 279FC7B1A626599A39AC9F3F
-
- fileRef
- 5D0C46008E8986B0D6FE7B3E
- isa
- PBXBuildFile
-
- 2CE53CCF080574252CE2DAD6
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- text.xcconfig
- path
- Pods-AFNetworking.xcconfig
- sourceTree
- <group>
-
- 2D115316728D1BD16D98EEEF
-
- fileRef
- 8AB5EB9A4B1ED7C4BCF910EF
- isa
- PBXBuildFile
-
- 2E96CEBE0F63120D7CD6184A
-
- fileRef
- 5D866178A310F60C0B18847E
- isa
- PBXBuildFile
-
- 2ED67259152D93AF9A2C09E4
-
- fileRef
- B70C8FA4CF04CD8A424248EF
- isa
- PBXBuildFile
-
- 30F86373A49B0580F4DE1A13
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- text.xcconfig
- path
- Pods.release.xcconfig
- sourceTree
- <group>
-
- 32220FC4502FF715AB7BE25A
-
- fileRef
- 8731277ACC741CFC8E3F961E
- isa
- PBXBuildFile
-
- 32C73158F90975601E0B2629
-
- fileRef
- 96F6E29C6212687390F7AD76
- isa
- PBXBuildFile
- settings
-
- COMPILER_FLAGS
- -DOS_OBJECT_USE_OBJC=0
-
-
- 32FC02166DFE48FB3879CF49
-
- isa
- PBXTargetDependency
- name
- Pods-SocketRocket
- target
- 3C3CC8B320510DD261C2B145
- targetProxy
- EB2DE1111901FEE19088EBE1
-
- 33F1C21AE2C3532A2CE8B177
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.objc
- name
- AFNetworkReachabilityManager.m
- path
- AFNetworking/AFNetworkReachabilityManager.m
- sourceTree
- <group>
-
- 34CB2EF93D493DFEF3B00C10
-
- buildConfigurations
-
- CD82EC24C311F1CA4472DAD1
- EDC6E4A24CBECABCD5E68915
-
- defaultConfigurationIsVisible
- 0
- defaultConfigurationName
- Release
- isa
- XCConfigurationList
-
- 350A2E85F1B3F45E4FF28A5E
-
- fileRef
- 6410E53E5DAD9D205D30B59C
- isa
- PBXBuildFile
- settings
-
- COMPILER_FLAGS
- -DOS_OBJECT_USE_OBJC=0
-
-
- 356F577B89948852E5ACA42C
-
- fileRef
- 3B3E43346A66F782AADF36F7
- isa
- PBXBuildFile
-
- 35A5DF67263BED3DEDFC735F
-
- fileRef
- 07ABE605310690E4F30996E2
- isa
- PBXBuildFile
-
- 3630CD0CB861703BC5966AAF
-
- buildActionMask
- 2147483647
- files
-
- 26892C4EE4E57D5400F90871
- 32C73158F90975601E0B2629
- 049308269D242EBC48273514
- B46ADF10CDEA193639DCF637
- 368BC8A770202143937C49A3
- 60C93CB3ADDD453B584A700E
- BD7A9D17C866685887EF5955
- 6C76055812FB02FA492B5FB2
- 0C2EF97ACEE76A071487CF14
-
- isa
- PBXSourcesBuildPhase
- runOnlyForDeploymentPostprocessing
- 0
-
- 368BC8A770202143937C49A3
-
- fileRef
- EBBE9626ED9FE968AD19B788
- isa
- PBXBuildFile
- settings
-
- COMPILER_FLAGS
- -DOS_OBJECT_USE_OBJC=0
-
-
- 37C72163976E1E194A280CAB
-
- children
-
- 558DAA0E40341831DE5F1F51
- 6294203A87829A690C4EBD59
- 3D8759D02073E31EBAD26857
- 1A3444D2B78E863B4B99FE5C
-
- isa
- PBXGroup
- name
- Support Files
- path
- ../Target Support Files/Pods-MASShortcut
- sourceTree
- <group>
-
- 3AFE0AE8545CA00791858A02
-
- fileRef
- 33F1C21AE2C3532A2CE8B177
- isa
- PBXBuildFile
-
- 3B3E43346A66F782AADF36F7
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.h
- name
- AFSecurityPolicy.h
- path
- AFNetworking/AFSecurityPolicy.h
- sourceTree
- <group>
-
- 3B7B456DBC42C08FB825B327
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.h
- name
- AFHTTPRequestOperation.h
- path
- AFNetworking/AFHTTPRequestOperation.h
- sourceTree
- <group>
-
- 3C3CC8B320510DD261C2B145
-
- buildConfigurationList
- B1A2C145D1AE6906AB785AC3
- buildPhases
-
- CFDD3892BC0A27350F1F4BD4
- 08C4D0059A603C5CC722190A
- B2EC8AE43BE1D1D2661E0D13
-
- buildRules
-
- dependencies
-
- isa
- PBXNativeTarget
- name
- Pods-SocketRocket
- productName
- Pods-SocketRocket
- productReference
- F1B2D2DC7E031CF249B25BC1
- productType
- com.apple.product-type.library.static
-
- 3C9EAEA1B70A64643C08CEF2
-
- children
-
- 6859FD10D8DCB55C0E834977
- 33F1C21AE2C3532A2CE8B177
-
- isa
- PBXGroup
- name
- Reachability
- sourceTree
- <group>
-
- 3CB980EF73542D6D4B2A0371
-
- children
-
- B70C8FA4CF04CD8A424248EF
- A87AB2F4C80345F28E6968A7
- 1F2687545C131592B068C24B
- 6410E53E5DAD9D205D30B59C
- 8A5664D49F1243587E09666A
- 225288A18A1F9D90309B5C09
- 5C076965D72887436429E04A
-
- isa
- PBXGroup
- name
- SocketRocket
- path
- SocketRocket
- sourceTree
- <group>
-
- 3D8759D02073E31EBAD26857
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.objc
- path
- Pods-MASShortcut-dummy.m
- sourceTree
- <group>
-
- 3DCD509F2E242A7087CBBF9D
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- text.xcconfig
- path
- Pods-SocketRocket-Private.xcconfig
- sourceTree
- <group>
-
- 3E6D8408B0648E2A2B779F96
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.h
- name
- AFNetworking.h
- path
- AFNetworking/AFNetworking.h
- sourceTree
- <group>
-
- 41CD9C6F6E79D12267678F25
-
- children
-
- CE3250763B9346E46A764214
- 859951AE86BEE3F952400F3E
- AA717EFA3A7D87E92C41DFBB
- 6521592AB534D100EA6630C0
- F42872FD6DF4CE8BE89C4AC6
- 7CC6A62356F712860A83645A
-
- isa
- PBXGroup
- name
- OS X
- sourceTree
- <group>
-
- 43EA72092035037EA38B9DC9
-
- baseConfigurationReference
- 3DCD509F2E242A7087CBBF9D
- buildSettings
-
- ALWAYS_SEARCH_USER_PATHS
- NO
- ARCHS
- $(ARCHS_STANDARD_64_BIT)
- COMBINE_HIDPI_IMAGES
- YES
- COPY_PHASE_STRIP
- NO
- DSTROOT
- /tmp/xcodeproj.dst
- GCC_DYNAMIC_NO_PIC
- NO
- GCC_ENABLE_OBJC_EXCEPTIONS
- YES
- GCC_OPTIMIZATION_LEVEL
- 0
- GCC_PRECOMPILE_PREFIX_HEADER
- YES
- GCC_PREFIX_HEADER
- Target Support Files/Pods-SocketRocket/Pods-SocketRocket-prefix.pch
- GCC_PREPROCESSOR_DEFINITIONS
-
- DEBUG=1
- $(inherited)
-
- GCC_SYMBOLS_PRIVATE_EXTERN
- NO
- GCC_VERSION
- com.apple.compilers.llvm.clang.1_0
- INSTALL_PATH
- $(BUILT_PRODUCTS_DIR)
- MACOSX_DEPLOYMENT_TARGET
- 10.8
- OTHER_LDFLAGS
-
- OTHER_LIBTOOLFLAGS
-
- PRODUCT_NAME
- $(TARGET_NAME)
- SDKROOT
- macosx
- SKIP_INSTALL
- YES
-
- isa
- XCBuildConfiguration
- name
- Debug
-
- 446F81E58F55BC1155C74F14
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.h
- name
- MASShortcutBinder.h
- path
- Framework/MASShortcutBinder.h
- sourceTree
- <group>
-
- 44DFE0F7E10683CA198906F6
-
- buildConfigurationList
- 5C6BE5DDC930A8BFBD51100E
- buildPhases
-
- 069FCCCE8D25B9D38774A2B1
- 755E466ED8E1C8BF0D5D2687
-
- buildRules
-
- dependencies
-
- E75E59D1196D669270B7798E
- 67F238A9D9E965FDE9AAADD5
- 32FC02166DFE48FB3879CF49
-
- isa
- PBXNativeTarget
- name
- Pods
- productName
- Pods
- productReference
- 976DEF42578884FCD507CA95
- productType
- com.apple.product-type.library.static
-
- 455E4DD4EC90D46BEB55CBE7
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.objc
- name
- AFSecurityPolicy.m
- path
- AFNetworking/AFSecurityPolicy.m
- sourceTree
- <group>
-
- 45B1AC4BA1FB1853E12E0555
-
- fileRef
- 8A5664D49F1243587E09666A
- isa
- PBXBuildFile
- settings
-
- COMPILER_FLAGS
- -DOS_OBJECT_USE_OBJC=0
-
-
- 45CD4D3C883901D270C6FF43
-
- attributes
-
- LastUpgradeCheck
- 0510
-
- buildConfigurationList
- 51CD82CB4C27E883501FCBAE
- compatibilityVersion
- Xcode 3.2
- developmentRegion
- English
- hasScannedForEncodings
- 0
- isa
- PBXProject
- knownRegions
-
- en
-
- mainGroup
- AEF743F9568F5F83368C49DC
- productRefGroup
- 133057AF82EACBC481FE9983
- projectDirPath
-
- projectReferences
-
- projectRoot
-
- targets
-
- 44DFE0F7E10683CA198906F6
- 0F40D51E432D7E226B2DDF2F
- 0089DD40658511F2C68D5441
- 3C3CC8B320510DD261C2B145
-
-
- 4F59C346221EE132566D9B0D
-
- fileRef
- 8350BA24D3852537D82617FC
- isa
- PBXBuildFile
-
- 4FE14DB0B4E78C22019E255A
-
- fileRef
- 446F81E58F55BC1155C74F14
- isa
- PBXBuildFile
-
- 4FF3C954F7AADC5A58EC8DEB
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.h
- path
- Pods-SocketRocket-prefix.pch
- sourceTree
- <group>
-
- 51CD82CB4C27E883501FCBAE
-
- buildConfigurations
-
- 1129C9B62B72AE6828F4EB1F
- 77B4E53EEA0C30BB7894FA06
-
- defaultConfigurationIsVisible
- 0
- defaultConfigurationName
- Release
- isa
- XCConfigurationList
-
- 52F9DD000F2884866FC319C6
-
- fileRef
- 95315624722C94232CD00EFE
- isa
- PBXBuildFile
-
- 558DAA0E40341831DE5F1F51
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- text.xcconfig
- path
- Pods-MASShortcut.xcconfig
- sourceTree
- <group>
-
- 56C1D08DB4D6B945B40754A0
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.objc
- path
- Pods-dummy.m
- sourceTree
- <group>
-
- 58EEF5780FEB7F278CC894D0
-
- fileRef
- 73FC8B0BE2E829A7DFA1D3AF
- isa
- PBXBuildFile
-
- 598618FF853C755C9483322D
-
- children
-
- 3B7B456DBC42C08FB825B327
- F5CBB13A080CD6B66398D31B
- 07ABE605310690E4F30996E2
- 5D0C46008E8986B0D6FE7B3E
- D23B559BC654D3B27DAC9DC0
- B47447B5B1000FAD7FCBAA65
-
- isa
- PBXGroup
- name
- NSURLConnection
- sourceTree
- <group>
-
- 5B61F8B08AB31EBD8E169B1A
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- text.script.sh
- path
- Pods-resources.sh
- sourceTree
- <group>
-
- 5C076965D72887436429E04A
-
- children
-
- B4398985227AEF90E5A36DE0
- 3DCD509F2E242A7087CBBF9D
- 95315624722C94232CD00EFE
- 4FF3C954F7AADC5A58EC8DEB
-
- isa
- PBXGroup
- name
- Support Files
- path
- ../Target Support Files/Pods-SocketRocket
- sourceTree
- <group>
-
- 5C6BE5DDC930A8BFBD51100E
-
- buildConfigurations
-
- CFFD034D48D8E40859B1760A
- 210B28B1E63DD33AB7571E94
-
- defaultConfigurationIsVisible
- 0
- defaultConfigurationName
- Release
- isa
- XCConfigurationList
-
- 5C98A90DC872F708AD6211DD
-
- fileRef
- AA717EFA3A7D87E92C41DFBB
- isa
- PBXBuildFile
-
- 5D0C46008E8986B0D6FE7B3E
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.objc
- name
- AFHTTPRequestOperationManager.m
- path
- AFNetworking/AFHTTPRequestOperationManager.m
- sourceTree
- <group>
-
- 5D866178A310F60C0B18847E
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.h
- name
- MASKeyCodes.h
- path
- Framework/MASKeyCodes.h
- sourceTree
- <group>
-
- 60C93CB3ADDD453B584A700E
-
- fileRef
- C557E09D55875091522BBD26
- isa
- PBXBuildFile
- settings
-
- COMPILER_FLAGS
- -DOS_OBJECT_USE_OBJC=0
-
-
- 6294203A87829A690C4EBD59
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- text.xcconfig
- path
- Pods-MASShortcut-Private.xcconfig
- sourceTree
- <group>
-
- 63C57121D27447305EA32A1D
-
- fileRef
- 9334DA37930E74A085F9E7C4
- isa
- PBXBuildFile
-
- 63CF08C574AD4F3B83D13E3E
-
- fileRef
- 3E6D8408B0648E2A2B779F96
- isa
- PBXBuildFile
-
- 63EA81A331BB2DD47FAE2FFE
-
- fileRef
- 21D8DCAB26735485893B5155
- isa
- PBXBuildFile
-
- 6410E53E5DAD9D205D30B59C
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.objc
- name
- SRWebSocket.m
- path
- SocketRocket/SRWebSocket.m
- sourceTree
- <group>
-
- 6521592AB534D100EA6630C0
-
- isa
- PBXFileReference
- lastKnownFileType
- wrapper.framework
- name
- CoreServices.framework
- path
- Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/CoreServices.framework
- sourceTree
- DEVELOPER_DIR
-
- 66C8F8B682EE24852858B273
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.h
- name
- AFURLRequestSerialization.h
- path
- AFNetworking/AFURLRequestSerialization.h
- sourceTree
- <group>
-
- 6754C143FA3CA66C8971069A
-
- containerPortal
- 45CD4D3C883901D270C6FF43
- isa
- PBXContainerItemProxy
- proxyType
- 1
- remoteGlobalIDString
- 0089DD40658511F2C68D5441
- remoteInfo
- Pods-MASShortcut
-
- 675D41B14F38679544A34919
-
- children
-
- 8AB5EB9A4B1ED7C4BCF910EF
- C5A5A2F63905CCD4D939A76E
- 9334DA37930E74A085F9E7C4
- F56DD32A1209CF7A2AA284E8
-
- isa
- PBXGroup
- name
- NSURLSession
- sourceTree
- <group>
-
- 67F238A9D9E965FDE9AAADD5
-
- isa
- PBXTargetDependency
- name
- Pods-MASShortcut
- target
- 0089DD40658511F2C68D5441
- targetProxy
- 6754C143FA3CA66C8971069A
-
- 6859FD10D8DCB55C0E834977
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.h
- name
- AFNetworkReachabilityManager.h
- path
- AFNetworking/AFNetworkReachabilityManager.h
- sourceTree
- <group>
-
- 68A93585CE67991AEDD920BF
-
- fileRef
- F56DD32A1209CF7A2AA284E8
- isa
- PBXBuildFile
-
- 6C76055812FB02FA492B5FB2
-
- fileRef
- FEB5DDEA35BB8EB7C89389B2
- isa
- PBXBuildFile
- settings
-
- COMPILER_FLAGS
- -DOS_OBJECT_USE_OBJC=0
-
-
- 6DC28C2A7A1762CE0069B404
-
- fileRef
- 6521592AB534D100EA6630C0
- isa
- PBXBuildFile
-
- 71ED18CA46AE8D1DE7FEDD04
-
- containerPortal
- 45CD4D3C883901D270C6FF43
- isa
- PBXContainerItemProxy
- proxyType
- 1
- remoteGlobalIDString
- 0F40D51E432D7E226B2DDF2F
- remoteInfo
- Pods-AFNetworking
-
- 73FC8B0BE2E829A7DFA1D3AF
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.h
- name
- MASShortcut.h
- path
- Framework/MASShortcut.h
- sourceTree
- <group>
-
- 755E466ED8E1C8BF0D5D2687
-
- buildActionMask
- 2147483647
- files
-
- D4D2CA2F0DEC94BA2E27C7A6
-
- isa
- PBXFrameworksBuildPhase
- runOnlyForDeploymentPostprocessing
- 0
-
- 77B4E53EEA0C30BB7894FA06
-
- 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
- COPY_PHASE_STRIP
- NO
- 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
- MACOSX_DEPLOYMENT_TARGET
- 10.8
- STRIP_INSTALLED_PRODUCT
- NO
- VALIDATE_PRODUCT
- YES
-
- isa
- XCBuildConfiguration
- name
- Release
-
- 77F83B2ADD0808355BFC7C68
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.h
- name
- MASShortcutValidator.h
- path
- Framework/MASShortcutValidator.h
- sourceTree
- <group>
-
- 789554EE8C9ED7F775A7B90F
-
- fileRef
- F42872FD6DF4CE8BE89C4AC6
- isa
- PBXBuildFile
-
- 7996D1F4B68E4F238FD457C7
-
- buildActionMask
- 2147483647
- files
-
- 090A34383DCC113ADE2BFDBC
- F8D644A2C51EC2AB7D5BAAB0
- 91FFBFBBECDFFA585DCAF00D
-
- isa
- PBXFrameworksBuildPhase
- runOnlyForDeploymentPostprocessing
- 0
-
- 7A8BD776BB5A544CCEDFA005
-
- fileRef
- AC96F3646D94D164C6956ADF
- isa
- PBXBuildFile
-
- 7CC6A62356F712860A83645A
-
- isa
- PBXFileReference
- lastKnownFileType
- wrapper.framework
- name
- SystemConfiguration.framework
- path
- Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/SystemConfiguration.framework
- sourceTree
- DEVELOPER_DIR
-
- 8350BA24D3852537D82617FC
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.objc
- name
- AFURLResponseSerialization.m
- path
- AFNetworking/AFURLResponseSerialization.m
- sourceTree
- <group>
-
- 838F6142BF37BF556C11F454
-
- explicitFileType
- archive.ar
- includeInIndex
- 0
- isa
- PBXFileReference
- path
- libPods-MASShortcut.a
- sourceTree
- BUILT_PRODUCTS_DIR
-
- 83BE15F6D12B39088F1763D0
-
- fileRef
- C5A5A2F63905CCD4D939A76E
- isa
- PBXBuildFile
-
- 852004CC0AE2DCE040A3FEC0
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.objc
- name
- MASShortcutView+Bindings.m
- path
- Framework/MASShortcutView+Bindings.m
- sourceTree
- <group>
-
- 859951AE86BEE3F952400F3E
-
- isa
- PBXFileReference
- lastKnownFileType
- wrapper.framework
- name
- Carbon.framework
- path
- Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Carbon.framework
- sourceTree
- DEVELOPER_DIR
-
- 85ACC9E07FDA4F65EA277590
-
- children
-
- 66C8F8B682EE24852858B273
- A17DD57462CB25861290873E
- ABB6153507EEA47FC544429E
- 8350BA24D3852537D82617FC
-
- isa
- PBXGroup
- name
- Serialization
- sourceTree
- <group>
-
- 8731277ACC741CFC8E3F961E
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.h
- name
- MASShortcutMonitor.h
- path
- Framework/MASShortcutMonitor.h
- sourceTree
- <group>
-
- 87DE16BB0C269FD655ABB3EC
-
- fileRef
- 3B7B456DBC42C08FB825B327
- isa
- PBXBuildFile
-
- 8A5664D49F1243587E09666A
-
- includeInIndex
- 1
- isa
- PBXFileReference
- name
- base64.c
- path
- SocketRocket/base64.c
- sourceTree
- <group>
-
- 8AB5EB9A4B1ED7C4BCF910EF
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.h
- name
- AFHTTPSessionManager.h
- path
- AFNetworking/AFHTTPSessionManager.h
- sourceTree
- <group>
-
- 8B531D307B6C41CC01E5F43E
-
- buildConfigurations
-
- A3F4CF08CE20D690349CA353
- C5CF91D5A2C9A7D3D65359E4
-
- defaultConfigurationIsVisible
- 0
- defaultConfigurationName
- Release
- isa
- XCConfigurationList
-
- 90280D34A96E8520686586AB
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.objc
- name
- MASShortcut.m
- path
- Framework/MASShortcut.m
- sourceTree
- <group>
-
- 90D29D8055F76385F84389CE
-
- children
-
- 41CD9C6F6E79D12267678F25
-
- isa
- PBXGroup
- name
- Frameworks
- sourceTree
- <group>
-
- 911BF526CA75F14D597ED4D2
-
- children
-
- A1F39FD360A51DAD0F78843D
- CAC4F4C4B47AA8189CC37108
- 0EE1F4CF5CF11894F3E935C5
- 96F6E29C6212687390F7AD76
- 5D866178A310F60C0B18847E
- 73FC8B0BE2E829A7DFA1D3AF
- 90280D34A96E8520686586AB
- 446F81E58F55BC1155C74F14
- FC13E3108DD3418B09902341
- 8731277ACC741CFC8E3F961E
- EBBE9626ED9FE968AD19B788
- 77F83B2ADD0808355BFC7C68
- C557E09D55875091522BBD26
- 2018C4EEA6BD9268C94FDE31
- FEB5DDEA35BB8EB7C89389B2
- AC96F3646D94D164C6956ADF
- 852004CC0AE2DCE040A3FEC0
- 95D66E5BF7BF9D669C8F7DAA
- 37C72163976E1E194A280CAB
-
- isa
- PBXGroup
- name
- MASShortcut
- path
- MASShortcut
- sourceTree
- <group>
-
- 91FFBFBBECDFFA585DCAF00D
-
- fileRef
- AA717EFA3A7D87E92C41DFBB
- isa
- PBXBuildFile
-
- 929F064F7A9AE290E11918AC
-
- fileRef
- 66C8F8B682EE24852858B273
- isa
- PBXBuildFile
-
- 9334DA37930E74A085F9E7C4
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.h
- name
- AFURLSessionManager.h
- path
- AFNetworking/AFURLSessionManager.h
- sourceTree
- <group>
-
- 95315624722C94232CD00EFE
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.objc
- path
- Pods-SocketRocket-dummy.m
- sourceTree
- <group>
-
- 9561DBF7E29F2104E6F30A02
-
- fileRef
- 77F83B2ADD0808355BFC7C68
- isa
- PBXBuildFile
-
- 95D66E5BF7BF9D669C8F7DAA
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.h
- name
- Shortcut.h
- path
- Framework/Shortcut.h
- sourceTree
- <group>
-
- 96F6E29C6212687390F7AD76
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.objc
- name
- MASHotKey.m
- path
- Framework/MASHotKey.m
- sourceTree
- <group>
-
- 976DEF42578884FCD507CA95
-
- explicitFileType
- archive.ar
- includeInIndex
- 0
- isa
- PBXFileReference
- path
- libPods.a
- sourceTree
- BUILT_PRODUCTS_DIR
-
- 99CB3DF62DB1AA68187AE308
-
- fileRef
- F42872FD6DF4CE8BE89C4AC6
- isa
- PBXBuildFile
-
- 9A70740C1D0CBA9114202261
-
- children
-
- 1DA5A047182D9CA95D4B6A1F
- D6BE5FF9A3CC35D98BEB1CA3
- 56C1D08DB4D6B945B40754A0
- F31B278A19D334ED57BE2AB3
- 5B61F8B08AB31EBD8E169B1A
- 1F498CE74B75328E2F3AC128
- 30F86373A49B0580F4DE1A13
-
- isa
- PBXGroup
- name
- Pods
- path
- Target Support Files/Pods
- sourceTree
- <group>
-
- 9B366904CDE9B4BCE13830C4
-
- buildActionMask
- 2147483647
- files
-
- A62ADD4DE5F9C184C0B11310
- 279FC7B1A626599A39AC9F3F
- 83BE15F6D12B39088F1763D0
- 3AFE0AE8545CA00791858A02
- 0F152C6337CF3415E7D19F67
- C7C6B0F783C1ED3464892312
- AD44BEF4DE96033320201081
- 4F59C346221EE132566D9B0D
- 68A93585CE67991AEDD920BF
- 63EA81A331BB2DD47FAE2FFE
-
- isa
- PBXSourcesBuildPhase
- runOnlyForDeploymentPostprocessing
- 0
-
- A03F728ED0C64CB5D638004F
-
- children
-
- C79BEA36F26FE24AC98F3F5D
- 911BF526CA75F14D597ED4D2
- 3CB980EF73542D6D4B2A0371
-
- isa
- PBXGroup
- name
- Pods
- sourceTree
- <group>
-
- A0AD1DBA7DD19A3451CAB9E3
-
- fileRef
- A87AB2F4C80345F28E6968A7
- isa
- PBXBuildFile
- settings
-
- COMPILER_FLAGS
- -DOS_OBJECT_USE_OBJC=0
-
-
- A17DD57462CB25861290873E
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.objc
- name
- AFURLRequestSerialization.m
- path
- AFNetworking/AFURLRequestSerialization.m
- sourceTree
- <group>
-
- A1F39FD360A51DAD0F78843D
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.h
- name
- MASDictionaryTransformer.h
- path
- Framework/MASDictionaryTransformer.h
- sourceTree
- <group>
-
- A3F4CF08CE20D690349CA353
-
- baseConfigurationReference
- 6294203A87829A690C4EBD59
- buildSettings
-
- ALWAYS_SEARCH_USER_PATHS
- NO
- ARCHS
- $(ARCHS_STANDARD_64_BIT)
- COMBINE_HIDPI_IMAGES
- YES
- COPY_PHASE_STRIP
- NO
- DSTROOT
- /tmp/xcodeproj.dst
- GCC_DYNAMIC_NO_PIC
- NO
- GCC_ENABLE_OBJC_EXCEPTIONS
- YES
- GCC_OPTIMIZATION_LEVEL
- 0
- GCC_PRECOMPILE_PREFIX_HEADER
- YES
- GCC_PREFIX_HEADER
- Target Support Files/Pods-MASShortcut/Pods-MASShortcut-prefix.pch
- GCC_PREPROCESSOR_DEFINITIONS
-
- DEBUG=1
- $(inherited)
-
- GCC_SYMBOLS_PRIVATE_EXTERN
- NO
- GCC_VERSION
- com.apple.compilers.llvm.clang.1_0
- INSTALL_PATH
- $(BUILT_PRODUCTS_DIR)
- MACOSX_DEPLOYMENT_TARGET
- 10.8
- OTHER_LDFLAGS
-
- OTHER_LIBTOOLFLAGS
-
- PRODUCT_NAME
- $(TARGET_NAME)
- SDKROOT
- macosx
- SKIP_INSTALL
- YES
-
- isa
- XCBuildConfiguration
- name
- Debug
-
- A443DE3DA6A946ED34CA0D9B
-
- fileRef
- 56C1D08DB4D6B945B40754A0
- isa
- PBXBuildFile
-
- A44F4517224E2DF313304318
-
- children
-
- 3B3E43346A66F782AADF36F7
- 455E4DD4EC90D46BEB55CBE7
-
- isa
- PBXGroup
- name
- Security
- sourceTree
- <group>
-
- A62ADD4DE5F9C184C0B11310
-
- fileRef
- F5CBB13A080CD6B66398D31B
- isa
- PBXBuildFile
-
- A87AB2F4C80345F28E6968A7
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.objc
- name
- NSData+SRB64Additions.m
- path
- SocketRocket/NSData+SRB64Additions.m
- sourceTree
- <group>
-
- AA717EFA3A7D87E92C41DFBB
-
- isa
- PBXFileReference
- lastKnownFileType
- wrapper.framework
- name
- Cocoa.framework
- path
- Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Cocoa.framework
- sourceTree
- DEVELOPER_DIR
-
- ABB6153507EEA47FC544429E
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.h
- name
- AFURLResponseSerialization.h
- path
- AFNetworking/AFURLResponseSerialization.h
- sourceTree
- <group>
-
- AC96F3646D94D164C6956ADF
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.h
- name
- MASShortcutView+Bindings.h
- path
- Framework/MASShortcutView+Bindings.h
- sourceTree
- <group>
-
- AD44BEF4DE96033320201081
-
- fileRef
- A17DD57462CB25861290873E
- isa
- PBXBuildFile
-
- AEF743F9568F5F83368C49DC
-
- children
-
- 90D29D8055F76385F84389CE
- A03F728ED0C64CB5D638004F
- 133057AF82EACBC481FE9983
- 1FDC10D1BB0BACAF523B9DF8
-
- isa
- PBXGroup
- sourceTree
- <group>
-
- AF4E47973F9F54CFB3277BCD
-
- fileRef
- 6859FD10D8DCB55C0E834977
- isa
- PBXBuildFile
-
- B1A2C145D1AE6906AB785AC3
-
- buildConfigurations
-
- 43EA72092035037EA38B9DC9
- C4213BF9A717C76DA09EE772
-
- defaultConfigurationIsVisible
- 0
- defaultConfigurationName
- Release
- isa
- XCConfigurationList
-
- B2EC8AE43BE1D1D2661E0D13
-
- buildActionMask
- 2147483647
- files
-
- 2ED67259152D93AF9A2C09E4
- F25C77C168CF89FE5EA5CFC6
- 0CA0C4D365D576E0C5218A66
-
- isa
- PBXHeadersBuildPhase
- runOnlyForDeploymentPostprocessing
- 0
-
- B4398985227AEF90E5A36DE0
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- text.xcconfig
- path
- Pods-SocketRocket.xcconfig
- sourceTree
- <group>
-
- B46ADF10CDEA193639DCF637
-
- fileRef
- FC13E3108DD3418B09902341
- isa
- PBXBuildFile
- settings
-
- COMPILER_FLAGS
- -DOS_OBJECT_USE_OBJC=0
-
-
- B47447B5B1000FAD7FCBAA65
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.objc
- name
- AFURLConnectionOperation.m
- path
- AFNetworking/AFURLConnectionOperation.m
- sourceTree
- <group>
-
- B70C8FA4CF04CD8A424248EF
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.h
- name
- NSData+SRB64Additions.h
- path
- SocketRocket/NSData+SRB64Additions.h
- sourceTree
- <group>
-
- BCFC8F28DF65AB9D5D6441FD
-
- fileRef
- 7CC6A62356F712860A83645A
- isa
- PBXBuildFile
-
- BD7A9D17C866685887EF5955
-
- fileRef
- 852004CC0AE2DCE040A3FEC0
- isa
- PBXBuildFile
- settings
-
- COMPILER_FLAGS
- -DOS_OBJECT_USE_OBJC=0
-
-
- C4213BF9A717C76DA09EE772
-
- baseConfigurationReference
- 3DCD509F2E242A7087CBBF9D
- buildSettings
-
- ALWAYS_SEARCH_USER_PATHS
- NO
- ARCHS
- $(ARCHS_STANDARD_64_BIT)
- COMBINE_HIDPI_IMAGES
- YES
- COPY_PHASE_STRIP
- YES
- DEBUG_INFORMATION_FORMAT
- dwarf-with-dsym
- DSTROOT
- /tmp/xcodeproj.dst
- GCC_ENABLE_OBJC_EXCEPTIONS
- YES
- GCC_PRECOMPILE_PREFIX_HEADER
- YES
- GCC_PREFIX_HEADER
- Target Support Files/Pods-SocketRocket/Pods-SocketRocket-prefix.pch
- GCC_VERSION
- com.apple.compilers.llvm.clang.1_0
- INSTALL_PATH
- $(BUILT_PRODUCTS_DIR)
- MACOSX_DEPLOYMENT_TARGET
- 10.8
- OTHER_CFLAGS
-
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
-
- OTHER_CPLUSPLUSFLAGS
-
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
-
- OTHER_LDFLAGS
-
- OTHER_LIBTOOLFLAGS
-
- PRODUCT_NAME
- $(TARGET_NAME)
- SDKROOT
- macosx
- SKIP_INSTALL
- YES
-
- isa
- XCBuildConfiguration
- name
- Release
-
- C557E09D55875091522BBD26
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.objc
- name
- MASShortcutValidator.m
- path
- Framework/MASShortcutValidator.m
- sourceTree
- <group>
-
- C5A5A2F63905CCD4D939A76E
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.objc
- name
- AFHTTPSessionManager.m
- path
- AFNetworking/AFHTTPSessionManager.m
- sourceTree
- <group>
-
- C5CF91D5A2C9A7D3D65359E4
-
- baseConfigurationReference
- 6294203A87829A690C4EBD59
- buildSettings
-
- ALWAYS_SEARCH_USER_PATHS
- NO
- ARCHS
- $(ARCHS_STANDARD_64_BIT)
- COMBINE_HIDPI_IMAGES
- YES
- COPY_PHASE_STRIP
- YES
- DEBUG_INFORMATION_FORMAT
- dwarf-with-dsym
- DSTROOT
- /tmp/xcodeproj.dst
- GCC_ENABLE_OBJC_EXCEPTIONS
- YES
- GCC_PRECOMPILE_PREFIX_HEADER
- YES
- GCC_PREFIX_HEADER
- Target Support Files/Pods-MASShortcut/Pods-MASShortcut-prefix.pch
- GCC_VERSION
- com.apple.compilers.llvm.clang.1_0
- INSTALL_PATH
- $(BUILT_PRODUCTS_DIR)
- MACOSX_DEPLOYMENT_TARGET
- 10.8
- OTHER_CFLAGS
-
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
-
- OTHER_CPLUSPLUSFLAGS
-
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
-
- OTHER_LDFLAGS
-
- OTHER_LIBTOOLFLAGS
-
- PRODUCT_NAME
- $(TARGET_NAME)
- SDKROOT
- macosx
- SKIP_INSTALL
- YES
-
- isa
- XCBuildConfiguration
- name
- Release
-
- C61F1F1D536FC245B3025FC0
-
- fileRef
- ABB6153507EEA47FC544429E
- isa
- PBXBuildFile
-
- C675DA9C092A11E98AB975B9
-
- fileRef
- AA717EFA3A7D87E92C41DFBB
- isa
- PBXBuildFile
-
- C79BEA36F26FE24AC98F3F5D
-
- children
-
- 3E6D8408B0648E2A2B779F96
- 598618FF853C755C9483322D
- 675D41B14F38679544A34919
- 3C9EAEA1B70A64643C08CEF2
- A44F4517224E2DF313304318
- 85ACC9E07FDA4F65EA277590
- 1FEA81A48CEFC5D40B38021A
-
- isa
- PBXGroup
- name
- AFNetworking
- path
- AFNetworking
- sourceTree
- <group>
-
- C7C6B0F783C1ED3464892312
-
- fileRef
- B47447B5B1000FAD7FCBAA65
- isa
- PBXBuildFile
-
- CAC4F4C4B47AA8189CC37108
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.objc
- name
- MASDictionaryTransformer.m
- path
- Framework/MASDictionaryTransformer.m
- sourceTree
- <group>
-
- CAD84EF0A5F6A251129D4E62
-
- fileRef
- 95D66E5BF7BF9D669C8F7DAA
- isa
- PBXBuildFile
-
- CD82EC24C311F1CA4472DAD1
-
- baseConfigurationReference
- 1CB7418B8FA2AEB1A7ACAB3D
- buildSettings
-
- ALWAYS_SEARCH_USER_PATHS
- NO
- ARCHS
- $(ARCHS_STANDARD_64_BIT)
- COMBINE_HIDPI_IMAGES
- YES
- COPY_PHASE_STRIP
- NO
- DSTROOT
- /tmp/xcodeproj.dst
- GCC_DYNAMIC_NO_PIC
- NO
- GCC_ENABLE_OBJC_EXCEPTIONS
- YES
- GCC_OPTIMIZATION_LEVEL
- 0
- GCC_PRECOMPILE_PREFIX_HEADER
- YES
- GCC_PREFIX_HEADER
- Target Support Files/Pods-AFNetworking/Pods-AFNetworking-prefix.pch
- GCC_PREPROCESSOR_DEFINITIONS
-
- DEBUG=1
- $(inherited)
-
- GCC_SYMBOLS_PRIVATE_EXTERN
- NO
- GCC_VERSION
- com.apple.compilers.llvm.clang.1_0
- INSTALL_PATH
- $(BUILT_PRODUCTS_DIR)
- MACOSX_DEPLOYMENT_TARGET
- 10.8
- OTHER_LDFLAGS
-
- OTHER_LIBTOOLFLAGS
-
- PRODUCT_NAME
- $(TARGET_NAME)
- SDKROOT
- macosx
- SKIP_INSTALL
- YES
-
- isa
- XCBuildConfiguration
- name
- Debug
-
- CE3250763B9346E46A764214
-
- isa
- PBXFileReference
- lastKnownFileType
- wrapper.framework
- name
- AppKit.framework
- path
- Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/AppKit.framework
- sourceTree
- DEVELOPER_DIR
-
- CEF2788FC4AB4868B1CD07B9
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.h
- path
- Pods-AFNetworking-prefix.pch
- sourceTree
- <group>
-
- CFDD3892BC0A27350F1F4BD4
-
- buildActionMask
- 2147483647
- files
-
- A0AD1DBA7DD19A3451CAB9E3
- 52F9DD000F2884866FC319C6
- 350A2E85F1B3F45E4FF28A5E
- 45B1AC4BA1FB1853E12E0555
-
- isa
- PBXSourcesBuildPhase
- runOnlyForDeploymentPostprocessing
- 0
-
- CFFD034D48D8E40859B1760A
-
- baseConfigurationReference
- 1F498CE74B75328E2F3AC128
- buildSettings
-
- ALWAYS_SEARCH_USER_PATHS
- NO
- ARCHS
- $(ARCHS_STANDARD_64_BIT)
- COMBINE_HIDPI_IMAGES
- YES
- COPY_PHASE_STRIP
- NO
- DSTROOT
- /tmp/xcodeproj.dst
- GCC_DYNAMIC_NO_PIC
- NO
- GCC_ENABLE_OBJC_EXCEPTIONS
- YES
- GCC_OPTIMIZATION_LEVEL
- 0
- GCC_PRECOMPILE_PREFIX_HEADER
- YES
- GCC_PREPROCESSOR_DEFINITIONS
-
- DEBUG=1
- $(inherited)
-
- GCC_SYMBOLS_PRIVATE_EXTERN
- NO
- GCC_VERSION
- com.apple.compilers.llvm.clang.1_0
- INSTALL_PATH
- $(BUILT_PRODUCTS_DIR)
- MACOSX_DEPLOYMENT_TARGET
- 10.8
- OTHER_LDFLAGS
-
- OTHER_LIBTOOLFLAGS
-
- PRODUCT_NAME
- $(TARGET_NAME)
- SDKROOT
- macosx
- SKIP_INSTALL
- YES
-
- isa
- XCBuildConfiguration
- name
- Debug
-
- D23B559BC654D3B27DAC9DC0
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.h
- name
- AFURLConnectionOperation.h
- path
- AFNetworking/AFURLConnectionOperation.h
- sourceTree
- <group>
-
- D4D2CA2F0DEC94BA2E27C7A6
-
- fileRef
- AA717EFA3A7D87E92C41DFBB
- isa
- PBXBuildFile
-
- D6BE5FF9A3CC35D98BEB1CA3
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- text.plist.xml
- path
- Pods-acknowledgements.plist
- sourceTree
- <group>
-
- DCC7D3D313B6849C4B9DA512
-
- fileRef
- A1F39FD360A51DAD0F78843D
- isa
- PBXBuildFile
-
- E75E59D1196D669270B7798E
-
- isa
- PBXTargetDependency
- name
- Pods-AFNetworking
- target
- 0F40D51E432D7E226B2DDF2F
- targetProxy
- 71ED18CA46AE8D1DE7FEDD04
-
- EA0D9F3BC450D819E3310ADF
-
- fileRef
- 2018C4EEA6BD9268C94FDE31
- isa
- PBXBuildFile
-
- EAB85557CC83C2D7364ADF8E
-
- fileRef
- 0EE1F4CF5CF11894F3E935C5
- isa
- PBXBuildFile
-
- EB2DE1111901FEE19088EBE1
-
- containerPortal
- 45CD4D3C883901D270C6FF43
- isa
- PBXContainerItemProxy
- proxyType
- 1
- remoteGlobalIDString
- 3C3CC8B320510DD261C2B145
- remoteInfo
- Pods-SocketRocket
-
- EBBE9626ED9FE968AD19B788
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.objc
- name
- MASShortcutMonitor.m
- path
- Framework/MASShortcutMonitor.m
- sourceTree
- <group>
-
- EDC6E4A24CBECABCD5E68915
-
- baseConfigurationReference
- 1CB7418B8FA2AEB1A7ACAB3D
- buildSettings
-
- ALWAYS_SEARCH_USER_PATHS
- NO
- ARCHS
- $(ARCHS_STANDARD_64_BIT)
- COMBINE_HIDPI_IMAGES
- YES
- COPY_PHASE_STRIP
- YES
- DEBUG_INFORMATION_FORMAT
- dwarf-with-dsym
- DSTROOT
- /tmp/xcodeproj.dst
- GCC_ENABLE_OBJC_EXCEPTIONS
- YES
- GCC_PRECOMPILE_PREFIX_HEADER
- YES
- GCC_PREFIX_HEADER
- Target Support Files/Pods-AFNetworking/Pods-AFNetworking-prefix.pch
- GCC_VERSION
- com.apple.compilers.llvm.clang.1_0
- INSTALL_PATH
- $(BUILT_PRODUCTS_DIR)
- MACOSX_DEPLOYMENT_TARGET
- 10.8
- OTHER_CFLAGS
-
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
-
- OTHER_CPLUSPLUSFLAGS
-
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
-
- OTHER_LDFLAGS
-
- OTHER_LIBTOOLFLAGS
-
- PRODUCT_NAME
- $(TARGET_NAME)
- SDKROOT
- macosx
- SKIP_INSTALL
- YES
-
- isa
- XCBuildConfiguration
- name
- Release
-
- EF22A89320848BC05463F4A3
-
- explicitFileType
- archive.ar
- includeInIndex
- 0
- isa
- PBXFileReference
- path
- libPods-AFNetworking.a
- sourceTree
- BUILT_PRODUCTS_DIR
-
- EFA41ED7CCC1BA6CCBB030E4
-
- buildActionMask
- 2147483647
- files
-
- 87DE16BB0C269FD655ABB3EC
- 35A5DF67263BED3DEDFC735F
- 2D115316728D1BD16D98EEEF
- AF4E47973F9F54CFB3277BCD
- 63CF08C574AD4F3B83D13E3E
- 356F577B89948852E5ACA42C
- 141AA15F5753B38BF666ECF7
- 929F064F7A9AE290E11918AC
- C61F1F1D536FC245B3025FC0
- 63C57121D27447305EA32A1D
-
- isa
- PBXHeadersBuildPhase
- runOnlyForDeploymentPostprocessing
- 0
-
- F1B2D2DC7E031CF249B25BC1
-
- explicitFileType
- archive.ar
- includeInIndex
- 0
- isa
- PBXFileReference
- path
- libPods-SocketRocket.a
- sourceTree
- BUILT_PRODUCTS_DIR
-
- F25C77C168CF89FE5EA5CFC6
-
- fileRef
- 1F2687545C131592B068C24B
- isa
- PBXBuildFile
-
- F31B278A19D334ED57BE2AB3
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.h
- path
- Pods-environment.h
- sourceTree
- <group>
-
- F42872FD6DF4CE8BE89C4AC6
-
- isa
- PBXFileReference
- lastKnownFileType
- wrapper.framework
- name
- Security.framework
- path
- Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Security.framework
- sourceTree
- DEVELOPER_DIR
-
- F56DD32A1209CF7A2AA284E8
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.objc
- name
- AFURLSessionManager.m
- path
- AFNetworking/AFURLSessionManager.m
- sourceTree
- <group>
-
- F57E5F8329878AD44B101BA1
-
- buildActionMask
- 2147483647
- files
-
- DCC7D3D313B6849C4B9DA512
- EAB85557CC83C2D7364ADF8E
- 2E96CEBE0F63120D7CD6184A
- 58EEF5780FEB7F278CC894D0
- 4FE14DB0B4E78C22019E255A
- 32220FC4502FF715AB7BE25A
- 9561DBF7E29F2104E6F30A02
- 7A8BD776BB5A544CCEDFA005
- EA0D9F3BC450D819E3310ADF
- CAD84EF0A5F6A251129D4E62
-
- isa
- PBXHeadersBuildPhase
- runOnlyForDeploymentPostprocessing
- 0
-
- F5CBB13A080CD6B66398D31B
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.objc
- name
- AFHTTPRequestOperation.m
- path
- AFNetworking/AFHTTPRequestOperation.m
- sourceTree
- <group>
-
- F8D644A2C51EC2AB7D5BAAB0
-
- fileRef
- 859951AE86BEE3F952400F3E
- isa
- PBXBuildFile
-
- FC13E3108DD3418B09902341
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.objc
- name
- MASShortcutBinder.m
- path
- Framework/MASShortcutBinder.m
- sourceTree
- <group>
-
- FD40EC174BC339958657D7E7
-
- buildActionMask
- 2147483647
- files
-
- 5C98A90DC872F708AD6211DD
- 6DC28C2A7A1762CE0069B404
- 789554EE8C9ED7F775A7B90F
- BCFC8F28DF65AB9D5D6441FD
-
- isa
- PBXFrameworksBuildPhase
- runOnlyForDeploymentPostprocessing
- 0
-
- FEB5DDEA35BB8EB7C89389B2
-
- includeInIndex
- 1
- isa
- PBXFileReference
- lastKnownFileType
- sourcecode.c.objc
- name
- MASShortcutView.m
- path
- Framework/MASShortcutView.m
- sourceTree
- <group>
-
-
- rootObject
- 45CD4D3C883901D270C6FF43
-
-
diff --git a/vendor/Pods/Pods.xcodeproj/xcuserdata/duncan.xcuserdatad/xcschemes/Pods-AFNetworking.xcscheme b/vendor/Pods/Pods.xcodeproj/xcuserdata/duncan.xcuserdatad/xcschemes/Pods-AFNetworking.xcscheme
deleted file mode 100644
index 497b051..0000000
--- a/vendor/Pods/Pods.xcodeproj/xcuserdata/duncan.xcuserdatad/xcschemes/Pods-AFNetworking.xcscheme
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/vendor/Pods/Pods.xcodeproj/xcuserdata/duncan.xcuserdatad/xcschemes/Pods-MASShortcut.xcscheme b/vendor/Pods/Pods.xcodeproj/xcuserdata/duncan.xcuserdatad/xcschemes/Pods-MASShortcut.xcscheme
deleted file mode 100644
index 665bbe6..0000000
--- a/vendor/Pods/Pods.xcodeproj/xcuserdata/duncan.xcuserdatad/xcschemes/Pods-MASShortcut.xcscheme
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/vendor/Pods/Pods.xcodeproj/xcuserdata/duncan.xcuserdatad/xcschemes/Pods-SocketRocket.xcscheme b/vendor/Pods/Pods.xcodeproj/xcuserdata/duncan.xcuserdatad/xcschemes/Pods-SocketRocket.xcscheme
deleted file mode 100644
index 20f928b..0000000
--- a/vendor/Pods/Pods.xcodeproj/xcuserdata/duncan.xcuserdatad/xcschemes/Pods-SocketRocket.xcscheme
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/vendor/Pods/Pods.xcodeproj/xcuserdata/duncan.xcuserdatad/xcschemes/Pods.xcscheme b/vendor/Pods/Pods.xcodeproj/xcuserdata/duncan.xcuserdatad/xcschemes/Pods.xcscheme
deleted file mode 100644
index 3d029a2..0000000
--- a/vendor/Pods/Pods.xcodeproj/xcuserdata/duncan.xcuserdatad/xcschemes/Pods.xcscheme
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/vendor/Pods/Pods.xcodeproj/xcuserdata/duncan.xcuserdatad/xcschemes/xcschememanagement.plist b/vendor/Pods/Pods.xcodeproj/xcuserdata/duncan.xcuserdatad/xcschemes/xcschememanagement.plist
deleted file mode 100644
index e0d3550..0000000
--- a/vendor/Pods/Pods.xcodeproj/xcuserdata/duncan.xcuserdatad/xcschemes/xcschememanagement.plist
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
- SchemeUserState
-
- Pods-AFNetworking.xcscheme
-
- isShown
-
-
- Pods-MASShortcut.xcscheme
-
- isShown
-
-
- Pods-SocketRocket.xcscheme
-
- isShown
-
-
- Pods.xcscheme
-
- isShown
-
-
-
- SuppressBuildableAutocreation
-
-
-
diff --git a/vendor/Pods/SocketRocket/LICENSE b/vendor/Pods/SocketRocket/LICENSE
deleted file mode 100644
index c01a79c..0000000
--- a/vendor/Pods/SocketRocket/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-
- Copyright 2012 Square Inc.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
diff --git a/vendor/Pods/SocketRocket/README.rst b/vendor/Pods/SocketRocket/README.rst
deleted file mode 100644
index 2221810..0000000
--- a/vendor/Pods/SocketRocket/README.rst
+++ /dev/null
@@ -1,238 +0,0 @@
-SocketRocket Objective-C WebSocket Client (beta)
-================================================
-A conforming WebSocket (`RFC 6455 `_)
-client library.
-
-`Test results for SocketRocket here `_.
-You can compare to what `modern browsers look like here
-`_.
-
-SocketRocket currently conforms to all ~300 of `Autobahn
-`_'s fuzzing tests (aside from
-two UTF-8 ones where it is merely *non-strict*. tests 6.4.2 and 6.4.4)
-
-Features/Design
----------------
-- TLS (wss) support. It uses CFStream so we get this for *free*
-- Uses NSStream/CFNetworking. Earlier implementations used ``dispatch_io``,
- however, this proved to be make TLS nearly impossible. Also I wanted this to
- work in iOS 4.x.
-- Uses ARC. It uses the 4.0 compatible subset (no weak refs).
-- Seems to perform quite well
-- Parallel architecture. Most of the work is done in background worker queues.
-- Delegate-based. Had older versions that could use blocks too, but I felt it
- didn't blend well with retain cycles and just objective C in general.
-
-Installing (iOS)
-----------------
-There's a few options. Choose one, or just figure it out
-
-- You can copy all the files in the SocketRocket group into your app.
-- Include SocketRocket as a subproject and use libSocketRocket
-
- If you do this, you must add -ObjC to your "other linker flags" option
-
-- For OS X you will have to repackage make a .framework target. I will take
- contributions. Message me if you are interested.
-
-
-Depending on how you configure your project you may need to ``#import`` either
-```` or ``"SRSocketRocket.h"``
-
-Framework Dependencies
-``````````````````````
-Your .app must be linked against the following frameworks/dylibs
-
-- libicucore.dylib
-- CFNetwork.framework
-- Security.framework
-- Foundation.framework
-
-Installing (OS X)
------------------
-SocketRocket now has (64-bit only) OS X support. ``SocketRocket.framework``
-inside Xcode project is for OS X only. It should be identical in function aside
-from the unicode validation. ICU isn't shipped with OS X which is what the
-original implementation used for unicode validation. The workaround is much
-more rhudimentary and less robust.
-
-1. Add SocketRocket.xcodeproj as either a subproject of your app or in your workspace.
-2. Add ``SocketRocket.framework`` to the link libraries
-3. If you don't have a "copy files" step for ``Framework``, create one
-4. Add ``SocketRocket.framework`` to the "copy files" step.
-
-API
----
-The classes
-
-``SRWebSocket``
-```````````````
-The Web Socket.
-
-.. note:: ``SRWebSocket`` will retain itself between ``-(void)open`` and when it
- closes, errors, or fails. This is similar to how ``NSURLConnection`` behaves.
- (unlike ``NSURLConnection``, ``SRWebSocket`` won't retain the delegate)
-
-What you need to know
-
-.. code-block:: objective-c
-
- @interface SRWebSocket : NSObject
-
- // Make it with this
- - (id)initWithURLRequest:(NSURLRequest *)request;
-
- // Set this before opening
- @property (nonatomic, assign) id delegate;
-
- - (void)open;
-
- // Close it with this
- - (void)close;
-
- // Send a UTF8 String or Data
- - (void)send:(id)data;
-
- @end
-
-``SRWebSocketDelegate``
-```````````````````````
-You implement this
-
-.. code-block:: objective-c
-
- @protocol SRWebSocketDelegate
-
- - (void)webSocket:(SRWebSocket *)webSocket didReceiveMessage:(id)message;
-
- @optional
-
- - (void)webSocketDidOpen:(SRWebSocket *)webSocket;
- - (void)webSocket:(SRWebSocket *)webSocket didFailWithError:(NSError *)error;
- - (void)webSocket:(SRWebSocket *)webSocket didCloseWithCode:(NSInteger)code reason:(NSString *)reason wasClean:(BOOL)wasClean;
-
- @end
-
-Known Issues/Server Todo's
---------------------------
-- Needs auth delegates (like in NSURLConnection)
-- Move the streams off the main runloop (most of the work is backgrounded uses
- GCD, but I just haven't gotten around to moving it off the main loop since I
- converted it from dispatch_io)
-- Re-implement server. I removed an existing implementation as well because it
- wasn't being used and I wasn't super happy with the interface. Will revisit
- this.
-- Separate framer and client logic. This will make it nicer when having a
- server.
-
-Testing
--------
-Included are setup scripts for the python testing environment. It comes
-packaged with vitualenv so all the dependencies are installed in userland.
-
-To run the short test from the command line, run::
-
- make test
-
-To run all the tests, run::
-
- make test_all
-
-The short tests don't include the performance tests. (the test harness is
-actually the bottleneck, not SocketRocket).
-
-The first time this is run, it may take a while to install the dependencies. It
-will be smooth sailing after that. After the test runs the makefile will open
-the results page in your browser. If nothing comes up, you failed. Working on
-making this interface a bit nicer.
-
-To run from the app, choose the ``SocketRocket`` target and run the test action
-(``cmd+u``). It runs the same thing, but makes it easier to debug. There is
-some serious pre/post hooks in the Test action. You can edit it to customize
-behavior.
-
-.. note:: Xcode only up to version 4.4 is currently supported for the test
- harness
-
-TestChat Demo Application
--------------------------
-SocketRocket includes a demo app, TestChat. It will "chat" with a listening
-websocket on port 9900.
-
-It's a simple project. Uses storyboard. Storyboard is sweet.
-
-
-TestChat Server
-```````````````
-We've included a small server for the chat app. It has a simple function.
-It will take a message and broadcast it to all other connected clients.
-
-We have to get some dependencies. We also want to reuse the virtualenv we made
-when we ran the tests. If you haven't run the tests yet, go into the
-SocketRocket root directory and type::
-
- make test
-
-This will set up your `virtualenv `_.
-Now, in your terminal::
-
- source .env/bin/activate
- pip install git+https://github.com/facebook/tornado.git
-
-In the same terminal session, start the chatroom server::
-
- python TestChatServer/py/chatroom.py
-
-There's also a Go implementation (with the latest weekly) where you can::
-
- cd TestChatServer/go
- go run chatroom.go
-
-Chatting
-````````
-Now, start TestChat.app (just run the target in the XCode project). If you had
-it started already you can hit the refresh button to reconnect. It should say
-"Connected!" on top.
-
-To talk with the app, open up your browser to `http://localhost:9000 `_ and
-start chatting.
-
-
-WebSocket Server Implementation Recommendations
------------------------------------------------
-SocketRocket has been used with the following libraries:
-
-- `Tornado `_
-- Go's `weekly build `_ (the official release has an
- outdated protocol, so you may have to use weekly until `Go 1
- `_ is released)
-- `Autobahn `_ (using its fuzzing
- client)
-
-The Tornado one is dirt simple and works like a charm. (`IPython notebook
-`_ uses it
-too). It's much easier to configure handlers and routes than in
-Autobahn/twisted.
-
-As far as Go's goes, it works in my limited testing. I much prefer go's
-concurrency model as well. Try it! You may like it.
-It could use some more control over things such as pings, etc., but I
-am sure it will come in time.
-
-Autobahn is a great test suite. The Python server code is good, and conforms
-well (obviously). Hovever, for me, twisted would be a deal-breaker for writing
-something new. I find it a bit too complex and heavy for a simple service. If
-you are already using twisted though, Autobahn is probably for you.
-
-Contributing
-------------
-Any contributors to the master SocketRocket repository must sign the `Individual
-Contributor License Agreement
-(CLA)
-`_.
-It's a short form that covers our bases and makes sure you're eligible to
-contribute.
-
-When you have a change you'd like to see in the master repository, `send a pull
-request `_. Before we merge your
-request, we'll make sure you're in the list of people who have signed a CLA.
diff --git a/vendor/Pods/SocketRocket/SocketRocket/NSData+SRB64Additions.h b/vendor/Pods/SocketRocket/SocketRocket/NSData+SRB64Additions.h
deleted file mode 100644
index 115108d..0000000
--- a/vendor/Pods/SocketRocket/SocketRocket/NSData+SRB64Additions.h
+++ /dev/null
@@ -1,23 +0,0 @@
-//
-// Copyright 2012 Square Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-
-#import
-
-@interface NSData (SRB64Additions)
-
-- (NSString *)SR_stringByBase64Encoding;
-
-@end
diff --git a/vendor/Pods/SocketRocket/SocketRocket/NSData+SRB64Additions.m b/vendor/Pods/SocketRocket/SocketRocket/NSData+SRB64Additions.m
deleted file mode 100644
index 71bae3b..0000000
--- a/vendor/Pods/SocketRocket/SocketRocket/NSData+SRB64Additions.m
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-// Copyright 2012 Square Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-
-#import "NSData+SRB64Additions.h"
-#import "base64.h"
-
-@implementation NSData (SRB64Additions)
-
-- (NSString *)SR_stringByBase64Encoding;
-{
- size_t buffer_size = (([self length] * 3 + 2) / 2);
-
- char *buffer = (char *)malloc(buffer_size);
-
- int len = b64_ntop([self bytes], [self length], buffer, buffer_size);
-
- if (len == -1) {
- free(buffer);
- return nil;
- } else{
- return [[NSString alloc] initWithBytesNoCopy:buffer length:len encoding:NSUTF8StringEncoding freeWhenDone:YES];
- }
-}
-
-@end
diff --git a/vendor/Pods/SocketRocket/SocketRocket/SRWebSocket.h b/vendor/Pods/SocketRocket/SocketRocket/SRWebSocket.h
deleted file mode 100644
index a7e1851..0000000
--- a/vendor/Pods/SocketRocket/SocketRocket/SRWebSocket.h
+++ /dev/null
@@ -1,90 +0,0 @@
-//
-// Copyright 2012 Square Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-
-#import
-#import
-
-typedef enum {
- SR_CONNECTING = 0,
- SR_OPEN = 1,
- SR_CLOSING = 2,
- SR_CLOSED = 3,
-
-} SRReadyState;
-
-@class SRWebSocket;
-
-extern NSString *const SRWebSocketErrorDomain;
-
-@protocol SRWebSocketDelegate;
-
-@interface SRWebSocket : NSObject
-
-@property (nonatomic, assign) id delegate;
-
-@property (nonatomic, readonly) SRReadyState readyState;
-@property (nonatomic, readonly, retain) NSURL *url;
-
-// This returns the negotiated protocol.
-// It will be niluntil after the handshake completes.
-@property (nonatomic, readonly, copy) NSString *protocol;
-
-// Protocols should be an array of strings that turn into Sec-WebSocket-Protocol
-- (id)initWithURLRequest:(NSURLRequest *)request protocols:(NSArray *)protocols;
-- (id)initWithURLRequest:(NSURLRequest *)request;
-
-// Some helper constructors
-- (id)initWithURL:(NSURL *)url protocols:(NSArray *)protocols;
-- (id)initWithURL:(NSURL *)url;
-
-// SRWebSockets are intended one-time-use only. Open should be called once and only once
-- (void)open;
-
-- (void)close;
-- (void)closeWithCode:(NSInteger)code reason:(NSString *)reason;
-
-// Send a UTF8 String or Data
-- (void)send:(id)data;
-
-@end
-
-@protocol SRWebSocketDelegate
-
-// message will either be an NSString if the server is using text
-// or NSData if the server is using binary
-- (void)webSocket:(SRWebSocket *)webSocket didReceiveMessage:(id)message;
-
-@optional
-
-- (void)webSocketDidOpen:(SRWebSocket *)webSocket;
-- (void)webSocket:(SRWebSocket *)webSocket didFailWithError:(NSError *)error;
-- (void)webSocket:(SRWebSocket *)webSocket didCloseWithCode:(NSInteger)code reason:(NSString *)reason wasClean:(BOOL)wasClean;
-
-@end
-
-
-@interface NSURLRequest (CertificateAdditions)
-
-@property (nonatomic, retain, readonly) NSArray *SR_SSLPinnedCertificates;
-
-@end
-
-
-@interface NSMutableURLRequest (CertificateAdditions)
-
-@property (nonatomic, retain) NSArray *SR_SSLPinnedCertificates;
-
-@end
diff --git a/vendor/Pods/SocketRocket/SocketRocket/SRWebSocket.m b/vendor/Pods/SocketRocket/SocketRocket/SRWebSocket.m
deleted file mode 100644
index ef7c65c..0000000
--- a/vendor/Pods/SocketRocket/SocketRocket/SRWebSocket.m
+++ /dev/null
@@ -1,1553 +0,0 @@
-//
-// Copyright 2012 Square Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-
-
-#import "SRWebSocket.h"
-
-#if TARGET_OS_IPHONE
-#define HAS_ICU
-#endif
-
-#ifdef HAS_ICU
-#import
-#endif
-
-#if TARGET_OS_IPHONE
-#import
-#else
-#import
-#endif
-
-#import
-#import
-#import "base64.h"
-#import "NSData+SRB64Additions.h"
-
-typedef enum {
- SROpCodeTextFrame = 0x1,
- SROpCodeBinaryFrame = 0x2,
- //3-7Reserved
- SROpCodeConnectionClose = 0x8,
- SROpCodePing = 0x9,
- SROpCodePong = 0xA,
- //B-F reserved
-} SROpCode;
-
-typedef enum {
- SRStatusCodeNormal = 1000,
- SRStatusCodeGoingAway = 1001,
- SRStatusCodeProtocolError = 1002,
- SRStatusCodeUnhandledType = 1003,
- // 1004 reserved
- SRStatusNoStatusReceived = 1005,
- // 1004-1006 reserved
- SRStatusCodeInvalidUTF8 = 1007,
- SRStatusCodePolicyViolated = 1008,
- SRStatusCodeMessageTooBig = 1009,
-} SRStatusCode;
-
-typedef struct {
- BOOL fin;
-// BOOL rsv1;
-// BOOL rsv2;
-// BOOL rsv3;
- uint8_t opcode;
- BOOL masked;
- uint64_t payload_length;
-} frame_header;
-
-static NSString *const SRWebSocketAppendToSecKeyString = @"258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
-
-static inline int32_t validate_dispatch_data_partial_string(NSData *data);
-static inline dispatch_queue_t log_queue();
-static inline void SRFastLog(NSString *format, ...);
-
-@interface NSData (SRWebSocket)
-
-- (NSString *)stringBySHA1ThenBase64Encoding;
-
-@end
-
-
-@interface NSString (SRWebSocket)
-
-- (NSString *)stringBySHA1ThenBase64Encoding;
-
-@end
-
-
-@interface NSURL (SRWebSocket)
-
-// The origin isn't really applicable for a native application
-// So instead, just map ws -> http and wss -> https
-- (NSString *)SR_origin;
-
-@end
-
-
-static NSString *newSHA1String(const char *bytes, size_t length) {
- uint8_t md[CC_SHA1_DIGEST_LENGTH];
-
- CC_SHA1(bytes, length, md);
-
- size_t buffer_size = ((sizeof(md) * 3 + 2) / 2);
-
- char *buffer = (char *)malloc(buffer_size);
-
- int len = b64_ntop(md, CC_SHA1_DIGEST_LENGTH, buffer, buffer_size);
- if (len == -1) {
- free(buffer);
- return nil;
- } else{
- return [[NSString alloc] initWithBytesNoCopy:buffer length:len encoding:NSASCIIStringEncoding freeWhenDone:YES];
- }
-}
-
-@implementation NSData (SRWebSocket)
-
-- (NSString *)stringBySHA1ThenBase64Encoding;
-{
- return newSHA1String(self.bytes, self.length);
-}
-
-@end
-
-
-@implementation NSString (SRWebSocket)
-
-- (NSString *)stringBySHA1ThenBase64Encoding;
-{
- return newSHA1String(self.UTF8String, self.length);
-}
-
-@end
-
-NSString *const SRWebSocketErrorDomain = @"SRWebSocketErrorDomain";
-
-// Returns number of bytes consumed. returning 0 means you didn't match.
-// Sends bytes to callback handler;
-typedef size_t (^stream_scanner)(NSData *collected_data);
-
-typedef void (^data_callback)(SRWebSocket *webSocket, NSData *data);
-
-@interface SRIOConsumer : NSObject {
- stream_scanner _scanner;
- data_callback _handler;
- size_t _bytesNeeded;
- BOOL _readToCurrentFrame;
- BOOL _unmaskBytes;
-}
-
-- (id)initWithScanner:(stream_scanner)scanner handler:(data_callback)handler bytesNeeded:(size_t)bytesNeeded readToCurrentFrame:(BOOL)readToCurrentFrame unmaskBytes:(BOOL)unmaskBytes;
-
-@property (nonatomic, copy, readonly) stream_scanner consumer;
-@property (nonatomic, copy, readonly) data_callback handler;
-@property (nonatomic, assign) size_t bytesNeeded;
-@property (nonatomic, assign, readonly) BOOL readToCurrentFrame;
-@property (nonatomic, assign, readonly) BOOL unmaskBytes;
-
-@end
-
-
-@interface SRWebSocket ()
-
-- (void)_writeData:(NSData *)data;
-- (void)_closeWithProtocolError:(NSString *)message;
-- (void)_failWithError:(NSError *)error;
-
-- (void)_disconnect;
-
-- (void)_readFrameNew;
-- (void)_readFrameContinue;
-
-- (void)_pumpScanner;
-
-- (void)_pumpWriting;
-
-- (void)_addConsumerWithScanner:(stream_scanner)consumer callback:(data_callback)callback;
-- (void)_addConsumerWithDataLength:(size_t)dataLength callback:(data_callback)callback readToCurrentFrame:(BOOL)readToCurrentFrame unmaskBytes:(BOOL)unmaskBytes;
-- (void)_addConsumerWithScanner:(stream_scanner)consumer callback:(data_callback)callback dataLength:(size_t)dataLength;
-- (void)_readUntilBytes:(const void *)bytes length:(size_t)length callback:(data_callback)dataHandler;
-- (void)_readUntilHeaderCompleteWithCallback:(data_callback)dataHandler;
-
-- (void)_sendFrameWithOpcode:(SROpCode)opcode data:(id)data;
-
-- (BOOL)_checkHandshake:(CFHTTPMessageRef)httpMessage;
-- (void)_SR_commonInit;
-
-- (void)_connectToHost:(NSString *)host port:(NSInteger)port;
-
-@property (nonatomic) SRReadyState readyState;
-
-@end
-
-
-@implementation SRWebSocket {
- NSInteger _webSocketVersion;
- dispatch_queue_t _callbackQueue;
- dispatch_queue_t _workQueue;
- NSMutableArray *_consumers;
-
- NSInputStream *_inputStream;
- NSOutputStream *_outputStream;
-
- NSMutableData *_readBuffer;
- NSInteger _readBufferOffset;
-
- NSMutableData *_outputBuffer;
- NSInteger _outputBufferOffset;
-
- uint8_t _currentFrameOpcode;
- size_t _currentFrameCount;
- size_t _readOpCount;
- uint32_t _currentStringScanPosition;
- NSMutableData *_currentFrameData;
-
- NSString *_closeReason;
-
- NSString *_secKey;
-
- BOOL _pinnedCertFound;
-
- uint8_t _currentReadMaskKey[4];
- size_t _currentReadMaskOffset;
-
- BOOL _consumerStopped;
-
- BOOL _closeWhenFinishedWriting;
- BOOL _failed;
-
- BOOL _secure;
- NSURLRequest *_urlRequest;
-
- CFHTTPMessageRef _receivedHTTPHeaders;
-
- BOOL _sentClose;
- BOOL _didFail;
- int _closeCode;
-
- BOOL _isPumping;
-
- // We use this to retain ourselves.
- __strong SRWebSocket *_selfRetain;
-
- NSArray *_requestedProtocols;
-}
-
-@synthesize delegate = _delegate;
-@synthesize url = _url;
-@synthesize readyState = _readyState;
-@synthesize protocol = _protocol;
-
-static __strong NSData *CRLFCRLF;
-
-+ (void)initialize;
-{
- CRLFCRLF = [[NSData alloc] initWithBytes:"\r\n\r\n" length:4];
-}
-
-- (id)initWithURLRequest:(NSURLRequest *)request protocols:(NSArray *)protocols;
-{
- self = [super init];
- if (self) {
- assert(request.URL);
- _url = request.URL;
- NSString *scheme = [_url scheme];
-
- _requestedProtocols = [protocols copy];
-
- assert([scheme isEqualToString:@"ws"] || [scheme isEqualToString:@"http"] || [scheme isEqualToString:@"wss"] || [scheme isEqualToString:@"https"]);
- _urlRequest = request;
-
- if ([scheme isEqualToString:@"wss"] || [scheme isEqualToString:@"https"]) {
- _secure = YES;
- }
-
- [self _SR_commonInit];
- }
-
- return self;
-}
-
-- (id)initWithURLRequest:(NSURLRequest *)request;
-{
- return [self initWithURLRequest:request protocols:nil];
-}
-
-- (id)initWithURL:(NSURL *)url;
-{
- return [self initWithURL:url protocols:nil];
-}
-
-- (id)initWithURL:(NSURL *)url protocols:(NSArray *)protocols;
-{
- NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:url];
- return [self initWithURLRequest:request protocols:protocols];
-}
-
-- (void)_SR_commonInit;
-{
- _readyState = SR_CONNECTING;
-
- _consumerStopped = YES;
-
- _webSocketVersion = 13;
-
- _workQueue = dispatch_queue_create(NULL, DISPATCH_QUEUE_SERIAL);
-
- _callbackQueue = dispatch_get_main_queue();
- dispatch_retain(_callbackQueue);
-
- _readBuffer = [[NSMutableData alloc] init];
- _outputBuffer = [[NSMutableData alloc] init];
-
- _currentFrameData = [[NSMutableData alloc] init];
-
- _consumers = [[NSMutableArray alloc] init];
-
- // default handlers
-}
-
-- (void)dealloc
-{
- _inputStream.delegate = nil;
- _outputStream.delegate = nil;
-
- [_inputStream close];
- [_outputStream close];
-
- dispatch_release(_callbackQueue);
- dispatch_release(_workQueue);
-
- if (_receivedHTTPHeaders) {
- CFRelease(_receivedHTTPHeaders);
- _receivedHTTPHeaders = NULL;
- }
-}
-
-#ifndef NDEBUG
-
-- (void)setReadyState:(SRReadyState)aReadyState;
-{
- [self willChangeValueForKey:@"readyState"];
- assert(aReadyState > _readyState);
- _readyState = aReadyState;
- [self didChangeValueForKey:@"readyState"];
-}
-
-#endif
-
-- (void)open;
-{
- assert(_url);
- NSAssert(_readyState == SR_CONNECTING && _inputStream == nil && _outputStream == nil, @"Cannot call -(void)open on SRWebSocket more than once");
-
- _selfRetain = self;
-
- NSInteger port = _url.port.integerValue;
- if (port == 0) {
- if (!_secure) {
- port = 80;
- } else {
- port = 443;
- }
- }
-
- [self _connectToHost:_url.host port:port];
-}
-
-
-
-- (BOOL)_checkHandshake:(CFHTTPMessageRef)httpMessage;
-{
- NSString *acceptHeader = CFBridgingRelease(CFHTTPMessageCopyHeaderFieldValue(httpMessage, CFSTR("Sec-WebSocket-Accept")));
-
- if (acceptHeader == nil) {
- return NO;
- }
-
- NSString *concattedString = [_secKey stringByAppendingString:SRWebSocketAppendToSecKeyString];
- NSString *expectedAccept = [concattedString stringBySHA1ThenBase64Encoding];
-
- return [acceptHeader isEqualToString:expectedAccept];
-}
-
-- (void)_HTTPHeadersDidFinish;
-{
- NSInteger responseCode = CFHTTPMessageGetResponseStatusCode(_receivedHTTPHeaders);
-
- if (responseCode >= 400) {
- SRFastLog(@"Request failed with response code %d", responseCode);
- [self _failWithError:[NSError errorWithDomain:@"org.lolrus.SocketRocket" code:2132 userInfo:[NSDictionary dictionaryWithObject:[NSString stringWithFormat:@"received bad response code from server %d", responseCode] forKey:NSLocalizedDescriptionKey]]];
- return;
-
- }
-
- if(![self _checkHandshake:_receivedHTTPHeaders]) {
- [self _failWithError:[NSError errorWithDomain:SRWebSocketErrorDomain code:2133 userInfo:[NSDictionary dictionaryWithObject:[NSString stringWithFormat:@"Invalid Sec-WebSocket-Accept response"] forKey:NSLocalizedDescriptionKey]]];
- return;
- }
-
- NSString *negotiatedProtocol = CFBridgingRelease(CFHTTPMessageCopyHeaderFieldValue(_receivedHTTPHeaders, CFSTR("Sec-WebSocket-Protocol")));
- if (negotiatedProtocol) {
- // Make sure we requested the protocol
- if ([_requestedProtocols indexOfObject:negotiatedProtocol] == NSNotFound) {
- [self _failWithError:[NSError errorWithDomain:SRWebSocketErrorDomain code:2133 userInfo:[NSDictionary dictionaryWithObject:[NSString stringWithFormat:@"Server specified Sec-WebSocket-Protocol that wasn't requested"] forKey:NSLocalizedDescriptionKey]]];
- return;
- }
-
- _protocol = negotiatedProtocol;
- }
-
- self.readyState = SR_OPEN;
-
- if (!_didFail) {
- [self _readFrameNew];
- }
-
- dispatch_async(_callbackQueue, ^{
- if ([self.delegate respondsToSelector:@selector(webSocketDidOpen:)]) {
- [self.delegate webSocketDidOpen:self];
- }
- });
-}
-
-
-- (void)_readHTTPHeader;
-{
- if (_receivedHTTPHeaders == NULL) {
- _receivedHTTPHeaders = CFHTTPMessageCreateEmpty(NULL, NO);
- }
-
- [self _readUntilHeaderCompleteWithCallback:^(SRWebSocket *self, NSData *data) {
- CFHTTPMessageAppendBytes(_receivedHTTPHeaders, (const UInt8 *)data.bytes, data.length);
-
- if (CFHTTPMessageIsHeaderComplete(_receivedHTTPHeaders)) {
- SRFastLog(@"Finished reading headers %@", CFBridgingRelease(CFHTTPMessageCopyAllHeaderFields(_receivedHTTPHeaders)));
- [self _HTTPHeadersDidFinish];
- } else {
- [self _readHTTPHeader];
- }
- }];
-}
-
-- (void)didConnect
-{
- SRFastLog(@"Connected");
- CFHTTPMessageRef request = CFHTTPMessageCreateRequest(NULL, CFSTR("GET"), (__bridge CFURLRef)_url, kCFHTTPVersion1_1);
-
- // Set host first so it defaults
- CFHTTPMessageSetHeaderFieldValue(request, CFSTR("Host"), (__bridge CFStringRef)(_url.port ? [NSString stringWithFormat:@"%@:%@", _url.host, _url.port] : _url.host));
-
- NSMutableData *keyBytes = [[NSMutableData alloc] initWithLength:16];
- SecRandomCopyBytes(kSecRandomDefault, keyBytes.length, keyBytes.mutableBytes);
- _secKey = [keyBytes SR_stringByBase64Encoding];
- assert([_secKey length] == 24);
-
- CFHTTPMessageSetHeaderFieldValue(request, CFSTR("Upgrade"), CFSTR("websocket"));
- CFHTTPMessageSetHeaderFieldValue(request, CFSTR("Connection"), CFSTR("Upgrade"));
- CFHTTPMessageSetHeaderFieldValue(request, CFSTR("Sec-WebSocket-Key"), (__bridge CFStringRef)_secKey);
- CFHTTPMessageSetHeaderFieldValue(request, CFSTR("Sec-WebSocket-Version"), (__bridge CFStringRef)[NSString stringWithFormat:@"%d", _webSocketVersion]);
-
- CFHTTPMessageSetHeaderFieldValue(request, CFSTR("Origin"), (__bridge CFStringRef)_url.SR_origin);
-
- if (_requestedProtocols) {
- CFHTTPMessageSetHeaderFieldValue(request, CFSTR("Sec-WebSocket-Protocol"), (__bridge CFStringRef)[_requestedProtocols componentsJoinedByString:@", "]);
- }
-
- [_urlRequest.allHTTPHeaderFields enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {
- CFHTTPMessageSetHeaderFieldValue(request, (__bridge CFStringRef)key, (__bridge CFStringRef)obj);
- }];
-
- NSData *message = CFBridgingRelease(CFHTTPMessageCopySerializedMessage(request));
-
- CFRelease(request);
-
- [self _writeData:message];
- [self _readHTTPHeader];
-}
-
-- (void)_connectToHost:(NSString *)host port:(NSInteger)port;
-{
- CFReadStreamRef readStream = NULL;
- CFWriteStreamRef writeStream = NULL;
-
- CFStreamCreatePairWithSocketToHost(NULL, (__bridge CFStringRef)host, port, &readStream, &writeStream);
-
- _outputStream = CFBridgingRelease(writeStream);
- _inputStream = CFBridgingRelease(readStream);
-
-
- if (_secure) {
- NSMutableDictionary *SSLOptions = [[NSMutableDictionary alloc] init];
-
- [_outputStream setProperty:(__bridge id)kCFStreamSocketSecurityLevelNegotiatedSSL forKey:(__bridge id)kCFStreamPropertySocketSecurityLevel];
-
- // If we're using pinned certs, don't validate the certificate chain
- if ([_urlRequest SR_SSLPinnedCertificates].count) {
- [SSLOptions setValue:[NSNumber numberWithBool:NO] forKey:(__bridge id)kCFStreamSSLValidatesCertificateChain];
- }
-
- #if DEBUG
- [SSLOptions setValue:[NSNumber numberWithBool:NO] forKey:(__bridge id)kCFStreamSSLValidatesCertificateChain];
- NSLog(@"SocketRocket: In debug mode. Allowing connection to any root cert");
- #endif
-
- [_outputStream setProperty:SSLOptions
- forKey:(__bridge id)kCFStreamPropertySSLSettings];
- }
-
- _inputStream.delegate = self;
- _outputStream.delegate = self;
-
- // TODO schedule in a better run loop
- [_outputStream scheduleInRunLoop:[NSRunLoop mainRunLoop] forMode:NSDefaultRunLoopMode];
- [_inputStream scheduleInRunLoop:[NSRunLoop mainRunLoop] forMode:NSDefaultRunLoopMode];
-
-
- [_outputStream open];
- [_inputStream open];
-}
-
-- (void)close;
-{
- [self closeWithCode:-1 reason:nil];
-}
-
-- (void)closeWithCode:(NSInteger)code reason:(NSString *)reason;
-{
- assert(code);
- if (self.readyState == SR_CLOSING || self.readyState == SR_CLOSED) {
- return;
- }
-
- BOOL wasConnecting = self.readyState == SR_CONNECTING;
-
- self.readyState = SR_CLOSING;
-
- SRFastLog(@"Closing with code %d reason %@", code, reason);
- dispatch_async(_workQueue, ^{
- if (wasConnecting) {
- [self _disconnect];
- return;
- }
-
- size_t maxMsgSize = [reason maximumLengthOfBytesUsingEncoding:NSUTF8StringEncoding];
- NSMutableData *mutablePayload = [[NSMutableData alloc] initWithLength:sizeof(uint16_t) + maxMsgSize];
- NSData *payload = mutablePayload;
-
- ((uint16_t *)mutablePayload.mutableBytes)[0] = EndianU16_BtoN(code);
-
- if (reason) {
- NSRange remainingRange = {0};
-
- NSUInteger usedLength = 0;
-
- BOOL success = [reason getBytes:(char *)mutablePayload.mutableBytes + sizeof(uint16_t) maxLength:payload.length - sizeof(uint16_t) usedLength:&usedLength encoding:NSUTF8StringEncoding options:NSStringEncodingConversionExternalRepresentation range:NSMakeRange(0, reason.length) remainingRange:&remainingRange];
-
- assert(success);
- assert(remainingRange.length == 0);
-
- if (usedLength != maxMsgSize) {
- payload = [payload subdataWithRange:NSMakeRange(0, usedLength + sizeof(uint16_t))];
- }
- }
-
-
- [self _sendFrameWithOpcode:SROpCodeConnectionClose data:payload];
- });
-}
-
-- (void)_closeWithProtocolError:(NSString *)message;
-{
- // Need to shunt this on the _callbackQueue first to see if they received any messages
- dispatch_async(_callbackQueue, ^{
- [self closeWithCode:SRStatusCodeProtocolError reason:message];
- dispatch_async(_workQueue, ^{
- [self _disconnect];
- });
- });
-}
-
-- (void)_failWithError:(NSError *)error;
-{
- dispatch_async(_workQueue, ^{
- if (self.readyState != SR_CLOSED) {
- _failed = YES;
- dispatch_async(_callbackQueue, ^{
- if ([self.delegate respondsToSelector:@selector(webSocket:didFailWithError:)]) {
- [self.delegate webSocket:self didFailWithError:error];
- }
- });
-
- self.readyState = SR_CLOSED;
- _selfRetain = nil;
-
- SRFastLog(@"Failing with error %@", error.localizedDescription);
-
- [self _disconnect];
- }
- });
-}
-
-- (void)_writeData:(NSData *)data;
-{
- assert(dispatch_get_current_queue() == _workQueue);
-
- if (_closeWhenFinishedWriting) {
- return;
- }
- [_outputBuffer appendData:data];
- [self _pumpWriting];
-}
-- (void)send:(id)data;
-{
- NSAssert(self.readyState != SR_CONNECTING, @"Invalid State: Cannot call send: until connection is open");
- // TODO: maybe not copy this for performance
- data = [data copy];
- dispatch_async(_workQueue, ^{
- if ([data isKindOfClass:[NSString class]]) {
- [self _sendFrameWithOpcode:SROpCodeTextFrame data:[(NSString *)data dataUsingEncoding:NSUTF8StringEncoding]];
- } else if ([data isKindOfClass:[NSData class]]) {
- [self _sendFrameWithOpcode:SROpCodeBinaryFrame data:data];
- } else if (data == nil) {
- [self _sendFrameWithOpcode:SROpCodeTextFrame data:data];
- } else {
- assert(NO);
- }
- });
-}
-
-- (void)handlePing:(NSData *)pingData;
-{
- // Need to pingpong this off _callbackQueue first to make sure messages happen in order
- dispatch_async(_callbackQueue, ^{
- dispatch_async(_workQueue, ^{
- [self _sendFrameWithOpcode:SROpCodePong data:pingData];
- });
- });
-}
-
-- (void)handlePong;
-{
- // NOOP
-}
-
-- (void)_handleMessage:(id)message
-{
- SRFastLog(@"Received message");
- dispatch_async(_callbackQueue, ^{
- [self.delegate webSocket:self didReceiveMessage:message];
- });
-}
-
-
-static inline BOOL closeCodeIsValid(int closeCode) {
- if (closeCode < 1000) {
- return NO;
- }
-
- if (closeCode >= 1000 && closeCode <= 1011) {
- if (closeCode == 1004 ||
- closeCode == 1005 ||
- closeCode == 1006) {
- return NO;
- }
- return YES;
- }
-
- if (closeCode >= 3000 && closeCode <= 3999) {
- return YES;
- }
-
- if (closeCode >= 4000 && closeCode <= 4999) {
- return YES;
- }
-
- return NO;
-}
-
-// Note from RFC:
-//
-// If there is a body, the first two
-// bytes of the body MUST be a 2-byte unsigned integer (in network byte
-// order) representing a status code with value /code/ defined in
-// Section 7.4. Following the 2-byte integer the body MAY contain UTF-8
-// encoded data with value /reason/, the interpretation of which is not
-// defined by this specification.
-
-- (void)handleCloseWithData:(NSData *)data;
-{
- size_t dataSize = data.length;
- __block uint16_t closeCode = 0;
-
- SRFastLog(@"Received close frame");
-
- if (dataSize == 1) {
- // TODO handle error
- [self _closeWithProtocolError:@"Payload for close must be larger than 2 bytes"];
- return;
- } else if (dataSize >= 2) {
- [data getBytes:&closeCode length:sizeof(closeCode)];
- _closeCode = EndianU16_BtoN(closeCode);
- if (!closeCodeIsValid(_closeCode)) {
- [self _closeWithProtocolError:[NSString stringWithFormat:@"Cannot have close code of %d", _closeCode]];
- return;
- }
- if (dataSize > 2) {
- _closeReason = [[NSString alloc] initWithData:[data subdataWithRange:NSMakeRange(2, dataSize - 2)] encoding:NSUTF8StringEncoding];
- if (!_closeReason) {
- [self _closeWithProtocolError:@"Close reason MUST be valid UTF-8"];
- return;
- }
- }
- } else {
- _closeCode = SRStatusNoStatusReceived;
- }
-
- assert(dispatch_get_current_queue() == _workQueue);
-
- if (self.readyState == SR_OPEN) {
- [self closeWithCode:1000 reason:nil];
- }
- dispatch_async(_workQueue, ^{
- [self _disconnect];
- });
-}
-
-- (void)_disconnect;
-{
- assert(dispatch_get_current_queue() == _workQueue);
- SRFastLog(@"Trying to disconnect");
- _closeWhenFinishedWriting = YES;
- [self _pumpWriting];
-}
-
-- (void)_handleFrameWithData:(NSData *)frameData opCode:(NSInteger)opcode;
-{
- // Check that the current data is valid UTF8
-
- BOOL isControlFrame = (opcode == SROpCodePing || opcode == SROpCodePong || opcode == SROpCodeConnectionClose);
- if (!isControlFrame) {
- [self _readFrameNew];
- } else {
- dispatch_async(_workQueue, ^{
- [self _readFrameContinue];
- });
- }
-
- switch (opcode) {
- case SROpCodeTextFrame: {
- NSString *str = [[NSString alloc] initWithData:frameData encoding:NSUTF8StringEncoding];
- if (str == nil && frameData) {
- [self closeWithCode:SRStatusCodeInvalidUTF8 reason:@"Text frames must be valid UTF-8"];
- dispatch_async(_workQueue, ^{
- [self _disconnect];
- });
-
- return;
- }
- [self _handleMessage:str];
- break;
- }
- case SROpCodeBinaryFrame:
- [self _handleMessage:[frameData copy]];
- break;
- case SROpCodeConnectionClose:
- [self handleCloseWithData:frameData];
- break;
- case SROpCodePing:
- [self handlePing:frameData];
- break;
- case SROpCodePong:
- [self handlePong];
- break;
- default:
- [self _closeWithProtocolError:[NSString stringWithFormat:@"Unknown opcode %d", opcode]];
- // TODO: Handle invalid opcode
- break;
- }
-}
-
-- (void)_handleFrameHeader:(frame_header)frame_header curData:(NSData *)curData;
-{
- assert(frame_header.opcode != 0);
-
- if (self.readyState != SR_OPEN) {
- return;
- }
-
-
- BOOL isControlFrame = (frame_header.opcode == SROpCodePing || frame_header.opcode == SROpCodePong || frame_header.opcode == SROpCodeConnectionClose);
-
- if (isControlFrame && !frame_header.fin) {
- [self _closeWithProtocolError:@"Fragmented control frames not allowed"];
- return;
- }
-
- if (isControlFrame && frame_header.payload_length >= 126) {
- [self _closeWithProtocolError:@"Control frames cannot have payloads larger than 126 bytes"];
- return;
- }
-
- if (!isControlFrame) {
- _currentFrameOpcode = frame_header.opcode;
- _currentFrameCount += 1;
- }
-
- if (frame_header.payload_length == 0) {
- if (isControlFrame) {
- [self _handleFrameWithData:curData opCode:frame_header.opcode];
- } else {
- if (frame_header.fin) {
- [self _handleFrameWithData:_currentFrameData opCode:frame_header.opcode];
- } else {
- // TODO add assert that opcode is not a control;
- [self _readFrameContinue];
- }
- }
- } else {
- [self _addConsumerWithDataLength:frame_header.payload_length callback:^(SRWebSocket *self, NSData *newData) {
- if (isControlFrame) {
- [self _handleFrameWithData:newData opCode:frame_header.opcode];
- } else {
- if (frame_header.fin) {
- [self _handleFrameWithData:self->_currentFrameData opCode:frame_header.opcode];
- } else {
- // TODO add assert that opcode is not a control;
- [self _readFrameContinue];
- }
-
- }
- } readToCurrentFrame:!isControlFrame unmaskBytes:frame_header.masked];
- }
-}
-
-/* From RFC:
-
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-------+-+-------------+-------------------------------+
- |F|R|R|R| opcode|M| Payload len | Extended payload length |
- |I|S|S|S| (4) |A| (7) | (16/64) |
- |N|V|V|V| |S| | (if payload len==126/127) |
- | |1|2|3| |K| | |
- +-+-+-+-+-------+-+-------------+ - - - - - - - - - - - - - - - +
- | Extended payload length continued, if payload len == 127 |
- + - - - - - - - - - - - - - - - +-------------------------------+
- | |Masking-key, if MASK set to 1 |
- +-------------------------------+-------------------------------+
- | Masking-key (continued) | Payload Data |
- +-------------------------------- - - - - - - - - - - - - - - - +
- : Payload Data continued ... :
- + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
- | Payload Data continued ... |
- +---------------------------------------------------------------+
- */
-
-static const uint8_t SRFinMask = 0x80;
-static const uint8_t SROpCodeMask = 0x0F;
-static const uint8_t SRRsvMask = 0x70;
-static const uint8_t SRMaskMask = 0x80;
-static const uint8_t SRPayloadLenMask = 0x7F;
-
-
-- (void)_readFrameContinue;
-{
- assert((_currentFrameCount == 0 && _currentFrameOpcode == 0) || (_currentFrameCount > 0 && _currentFrameOpcode > 0));
-
- [self _addConsumerWithDataLength:2 callback:^(SRWebSocket *self, NSData *data) {
- __block frame_header header = {0};
-
- const uint8_t *headerBuffer = data.bytes;
- assert(data.length >= 2);
-
- if (headerBuffer[0] & SRRsvMask) {
- [self _closeWithProtocolError:@"Server used RSV bits"];
- return;
- }
-
- uint8_t receivedOpcode = (SROpCodeMask & headerBuffer[0]);
-
- BOOL isControlFrame = (receivedOpcode == SROpCodePing || receivedOpcode == SROpCodePong || receivedOpcode == SROpCodeConnectionClose);
-
- if (!isControlFrame && receivedOpcode != 0 && self->_currentFrameCount > 0) {
- [self _closeWithProtocolError:@"all data frames after the initial data frame must have opcode 0"];
- return;
- }
-
- if (receivedOpcode == 0 && self->_currentFrameCount == 0) {
- [self _closeWithProtocolError:@"cannot continue a message"];
- return;
- }
-
- header.opcode = receivedOpcode == 0 ? self->_currentFrameOpcode : receivedOpcode;
-
- header.fin = !!(SRFinMask & headerBuffer[0]);
-
-
- header.masked = !!(SRMaskMask & headerBuffer[1]);
- header.payload_length = SRPayloadLenMask & headerBuffer[1];
-
- headerBuffer = NULL;
-
- if (header.masked) {
- [self _closeWithProtocolError:@"Client must receive unmasked data"];
- }
-
- size_t extra_bytes_needed = header.masked ? sizeof(_currentReadMaskKey) : 0;
-
- if (header.payload_length == 126) {
- extra_bytes_needed += sizeof(uint16_t);
- } else if (header.payload_length == 127) {
- extra_bytes_needed += sizeof(uint64_t);
- }
-
- if (extra_bytes_needed == 0) {
- [self _handleFrameHeader:header curData:self->_currentFrameData];
- } else {
- [self _addConsumerWithDataLength:extra_bytes_needed callback:^(SRWebSocket *self, NSData *data) {
- size_t mapped_size = data.length;
- const void *mapped_buffer = data.bytes;
- size_t offset = 0;
-
- if (header.payload_length == 126) {
- assert(mapped_size >= sizeof(uint16_t));
- uint16_t newLen = EndianU16_BtoN(*(uint16_t *)(mapped_buffer));
- header.payload_length = newLen;
- offset += sizeof(uint16_t);
- } else if (header.payload_length == 127) {
- assert(mapped_size >= sizeof(uint64_t));
- header.payload_length = EndianU64_BtoN(*(uint64_t *)(mapped_buffer));
- offset += sizeof(uint64_t);
- } else {
- assert(header.payload_length < 126 && header.payload_length >= 0);
- }
-
-
- if (header.masked) {
- assert(mapped_size >= sizeof(_currentReadMaskOffset) + offset);
- memcpy(self->_currentReadMaskKey, ((uint8_t *)mapped_buffer) + offset, sizeof(self->_currentReadMaskKey));
- }
-
- [self _handleFrameHeader:header curData:self->_currentFrameData];
- } readToCurrentFrame:NO unmaskBytes:NO];
- }
- } readToCurrentFrame:NO unmaskBytes:NO];
-}
-
-- (void)_readFrameNew;
-{
- dispatch_async(_workQueue, ^{
- [_currentFrameData setLength:0];
-
- _currentFrameOpcode = 0;
- _currentFrameCount = 0;
- _readOpCount = 0;
- _currentStringScanPosition = 0;
-
- [self _readFrameContinue];
- });
-}
-
-- (void)_pumpWriting;
-{
- assert(dispatch_get_current_queue() == _workQueue);
-
- NSUInteger dataLength = _outputBuffer.length;
- if (dataLength - _outputBufferOffset > 0 && _outputStream.hasSpaceAvailable) {
- NSUInteger bytesWritten = [_outputStream write:_outputBuffer.bytes + _outputBufferOffset maxLength:dataLength - _outputBufferOffset];
- if (bytesWritten == -1) {
- [self _failWithError:[NSError errorWithDomain:@"org.lolrus.SocketRocket" code:2145 userInfo:[NSDictionary dictionaryWithObject:@"Error writing to stream" forKey:NSLocalizedDescriptionKey]]];
- return;
- }
-
- _outputBufferOffset += bytesWritten;
-
- if (_outputBufferOffset > 4096 && _outputBufferOffset > (_outputBuffer.length >> 1)) {
- _outputBuffer = [[NSMutableData alloc] initWithBytes:(char *)_outputBuffer.bytes + _outputBufferOffset length:_outputBuffer.length - _outputBufferOffset];
- _outputBufferOffset = 0;
- }
- }
-
- if (_closeWhenFinishedWriting &&
- _outputBuffer.length - _outputBufferOffset == 0 &&
- (_inputStream.streamStatus != NSStreamStatusNotOpen &&
- _inputStream.streamStatus != NSStreamStatusClosed) &&
- !_sentClose) {
- _sentClose = YES;
-
- [_outputStream close];
- [_inputStream close];
-
- if (!_failed) {
- dispatch_async(_callbackQueue, ^{
- if ([self.delegate respondsToSelector:@selector(webSocket:didCloseWithCode:reason:wasClean:)]) {
- [self.delegate webSocket:self didCloseWithCode:_closeCode reason:_closeReason wasClean:YES];
- }
- });
- }
-
- _selfRetain = nil;
- }
-}
-
-- (void)_addConsumerWithScanner:(stream_scanner)consumer callback:(data_callback)callback;
-{
- assert(dispatch_get_current_queue() == _workQueue);
- [self _addConsumerWithScanner:consumer callback:callback dataLength:0];
-}
-
-- (void)_addConsumerWithDataLength:(size_t)dataLength callback:(data_callback)callback readToCurrentFrame:(BOOL)readToCurrentFrame unmaskBytes:(BOOL)unmaskBytes;
-{
- assert(dispatch_get_current_queue() == _workQueue);
- assert(dataLength);
-
- [_consumers addObject:[[SRIOConsumer alloc] initWithScanner:nil handler:callback bytesNeeded:dataLength readToCurrentFrame:readToCurrentFrame unmaskBytes:unmaskBytes]];
- [self _pumpScanner];
-}
-
-- (void)_addConsumerWithScanner:(stream_scanner)consumer callback:(data_callback)callback dataLength:(size_t)dataLength;
-{
- assert(dispatch_get_current_queue() == _workQueue);
- [_consumers addObject:[[SRIOConsumer alloc] initWithScanner:consumer handler:callback bytesNeeded:dataLength readToCurrentFrame:NO unmaskBytes:NO]];
- [self _pumpScanner];
-}
-
-
-static const char CRLFCRLFBytes[] = {'\r', '\n', '\r', '\n'};
-
-- (void)_readUntilHeaderCompleteWithCallback:(data_callback)dataHandler;
-{
- [self _readUntilBytes:CRLFCRLFBytes length:sizeof(CRLFCRLFBytes) callback:dataHandler];
-}
-
-- (void)_readUntilBytes:(const void *)bytes length:(size_t)length callback:(data_callback)dataHandler;
-{
- // TODO optimize so this can continue from where we last searched
- stream_scanner consumer = ^size_t(NSData *data) {
- __block size_t found_size = 0;
- __block size_t match_count = 0;
-
- size_t size = data.length;
- const unsigned char *buffer = data.bytes;
- for (int i = 0; i < size; i++ ) {
- if (((const unsigned char *)buffer)[i] == ((const unsigned char *)bytes)[match_count]) {
- match_count += 1;
- if (match_count == length) {
- found_size = i + 1;
- break;
- }
- } else {
- match_count = 0;
- }
- }
- return found_size;
- };
- [self _addConsumerWithScanner:consumer callback:dataHandler];
-}
-
-
-// Returns true if did work
-- (BOOL)_innerPumpScanner {
-
- BOOL didWork = NO;
-
- if (self.readyState >= SR_CLOSING) {
- return didWork;
- }
-
- if (!_consumers.count) {
- return didWork;
- }
-
- size_t curSize = _readBuffer.length - _readBufferOffset;
- if (!curSize) {
- return didWork;
- }
-
- SRIOConsumer *consumer = [_consumers objectAtIndex:0];
-
- size_t bytesNeeded = consumer.bytesNeeded;
-
- size_t foundSize = 0;
- if (consumer.consumer) {
- NSData *tempView = [NSData dataWithBytesNoCopy:(char *)_readBuffer.bytes + _readBufferOffset length:_readBuffer.length - _readBufferOffset freeWhenDone:NO];
- foundSize = consumer.consumer(tempView);
- } else {
- assert(consumer.bytesNeeded);
- if (curSize >= bytesNeeded) {
- foundSize = bytesNeeded;
- } else if (consumer.readToCurrentFrame) {
- foundSize = curSize;
- }
- }
-
- NSData *slice = nil;
- if (consumer.readToCurrentFrame || foundSize) {
- NSRange sliceRange = NSMakeRange(_readBufferOffset, foundSize);
- slice = [_readBuffer subdataWithRange:sliceRange];
-
- _readBufferOffset += foundSize;
-
- if (_readBufferOffset > 4096 && _readBufferOffset > (_readBuffer.length >> 1)) {
- _readBuffer = [[NSMutableData alloc] initWithBytes:(char *)_readBuffer.bytes + _readBufferOffset length:_readBuffer.length - _readBufferOffset]; _readBufferOffset = 0;
- }
-
- if (consumer.unmaskBytes) {
- NSMutableData *mutableSlice = [slice mutableCopy];
-
- NSUInteger len = mutableSlice.length;
- uint8_t *bytes = mutableSlice.mutableBytes;
-
- for (int i = 0; i < len; i++) {
- bytes[i] = bytes[i] ^ _currentReadMaskKey[_currentReadMaskOffset % sizeof(_currentReadMaskKey)];
- _currentReadMaskOffset += 1;
- }
-
- slice = mutableSlice;
- }
-
- if (consumer.readToCurrentFrame) {
- [_currentFrameData appendData:slice];
-
- _readOpCount += 1;
-
- if (_currentFrameOpcode == SROpCodeTextFrame) {
- // Validate UTF8 stuff.
- size_t currentDataSize = _currentFrameData.length;
- if (_currentFrameOpcode == SROpCodeTextFrame && currentDataSize > 0) {
- // TODO: Optimize the crap out of this. Don't really have to copy all the data each time
-
- size_t scanSize = currentDataSize - _currentStringScanPosition;
-
- NSData *scan_data = [_currentFrameData subdataWithRange:NSMakeRange(_currentStringScanPosition, scanSize)];
- int32_t valid_utf8_size = validate_dispatch_data_partial_string(scan_data);
-
- if (valid_utf8_size == -1) {
- [self closeWithCode:SRStatusCodeInvalidUTF8 reason:@"Text frames must be valid UTF-8"];
- dispatch_async(_workQueue, ^{
- [self _disconnect];
- });
- return didWork;
- } else {
- _currentStringScanPosition += valid_utf8_size;
- }
- }
-
- }
-
- consumer.bytesNeeded -= foundSize;
-
- if (consumer.bytesNeeded == 0) {
- [_consumers removeObjectAtIndex:0];
- consumer.handler(self, nil);
- didWork = YES;
- }
- } else if (foundSize) {
- [_consumers removeObjectAtIndex:0];
- consumer.handler(self, slice);
- didWork = YES;
- }
- }
- return didWork;
-}
-
--(void)_pumpScanner;
-{
- assert(dispatch_get_current_queue() == _workQueue);
-
- if (!_isPumping) {
- _isPumping = YES;
- } else {
- return;
- }
-
- while ([self _innerPumpScanner]) {
-
- }
-
- _isPumping = NO;
-}
-
-//#define NOMASK
-
-static const size_t SRFrameHeaderOverhead = 32;
-
-- (void)_sendFrameWithOpcode:(SROpCode)opcode data:(id)data;
-{
- assert(dispatch_get_current_queue() == _workQueue);
-
- NSAssert(data == nil || [data isKindOfClass:[NSData class]] || [data isKindOfClass:[NSString class]], @"Function expects nil, NSString or NSData");
-
- size_t payloadLength = [data isKindOfClass:[NSString class]] ? [(NSString *)data lengthOfBytesUsingEncoding:NSUTF8StringEncoding] : [data length];
-
- NSMutableData *frame = [[NSMutableData alloc] initWithLength:payloadLength + SRFrameHeaderOverhead];
- if (!frame) {
- [self closeWithCode:SRStatusCodeMessageTooBig reason:@"Message too big"];
- return;
- }
- uint8_t *frame_buffer = (uint8_t *)[frame mutableBytes];
-
- // set fin
- frame_buffer[0] = SRFinMask | opcode;
-
- BOOL useMask = YES;
-#ifdef NOMASK
- useMask = NO;
-#endif
-
- if (useMask) {
- // set the mask and header
- frame_buffer[1] |= SRMaskMask;
- }
-
- size_t frame_buffer_size = 2;
-
- const uint8_t *unmasked_payload = NULL;
- if ([data isKindOfClass:[NSData class]]) {
- unmasked_payload = (uint8_t *)[data bytes];
- } else if ([data isKindOfClass:[NSString class]]) {
- unmasked_payload = (const uint8_t *)[data UTF8String];
- } else {
- assert(NO);
- }
-
- if (payloadLength < 126) {
- frame_buffer[1] |= payloadLength;
- } else if (payloadLength <= UINT16_MAX) {
- frame_buffer[1] |= 126;
- *((uint16_t *)(frame_buffer + frame_buffer_size)) = EndianU16_BtoN((uint16_t)payloadLength);
- frame_buffer_size += sizeof(uint16_t);
- } else {
- frame_buffer[1] |= 127;
- *((uint64_t *)(frame_buffer + frame_buffer_size)) = EndianU64_BtoN((uint64_t)payloadLength);
- frame_buffer_size += sizeof(uint64_t);
- }
-
- if (!useMask) {
- for (int i = 0; i < payloadLength; i++) {
- frame_buffer[frame_buffer_size] = unmasked_payload[i];
- frame_buffer_size += 1;
- }
- } else {
- uint8_t *mask_key = frame_buffer + frame_buffer_size;
- SecRandomCopyBytes(kSecRandomDefault, sizeof(uint32_t), (uint8_t *)mask_key);
- frame_buffer_size += sizeof(uint32_t);
-
- // TODO: could probably optimize this with SIMD
- for (int i = 0; i < payloadLength; i++) {
- frame_buffer[frame_buffer_size] = unmasked_payload[i] ^ mask_key[i % sizeof(uint32_t)];
- frame_buffer_size += 1;
- }
- }
-
- assert(frame_buffer_size <= [frame length]);
- frame.length = frame_buffer_size;
-
- [self _writeData:frame];
-}
-
-- (void)stream:(NSStream *)aStream handleEvent:(NSStreamEvent)eventCode;
-{
- if (_secure && !_pinnedCertFound && (eventCode == NSStreamEventHasBytesAvailable || eventCode == NSStreamEventHasSpaceAvailable)) {
-
- NSArray *sslCerts = [_urlRequest SR_SSLPinnedCertificates];
- if (sslCerts) {
- SecTrustRef secTrust = (__bridge SecTrustRef)[aStream propertyForKey:(__bridge id)kCFStreamPropertySSLPeerTrust];
- if (secTrust) {
- NSInteger numCerts = SecTrustGetCertificateCount(secTrust);
- for (NSInteger i = 0; i < numCerts && !_pinnedCertFound; i++) {
- SecCertificateRef cert = SecTrustGetCertificateAtIndex(secTrust, i);
- NSData *certData = CFBridgingRelease(SecCertificateCopyData(cert));
-
- for (id ref in sslCerts) {
- SecCertificateRef trustedCert = (__bridge SecCertificateRef)ref;
- NSData *trustedCertData = CFBridgingRelease(SecCertificateCopyData(trustedCert));
-
- if ([trustedCertData isEqualToData:certData]) {
- _pinnedCertFound = YES;
- break;
- }
- }
- }
- }
-
- if (!_pinnedCertFound) {
- dispatch_async(_workQueue, ^{
- [self _failWithError:[NSError errorWithDomain:@"org.lolrus.SocketRocket" code:23556 userInfo:[NSDictionary dictionaryWithObject:[NSString stringWithFormat:@"Invalid server cert"] forKey:NSLocalizedDescriptionKey]]];
- });
- return;
- }
- }
- }
-
- // SRFastLog(@"%@ Got stream event %d", aStream, eventCode);
- dispatch_async(_workQueue, ^{
- switch (eventCode) {
- case NSStreamEventOpenCompleted: {
- SRFastLog(@"NSStreamEventOpenCompleted %@", aStream);
- if (self.readyState >= SR_CLOSING) {
- return;
- }
-
-
- assert(_readBuffer);
-
- if (self.readyState == SR_CONNECTING && aStream == _inputStream) {
- [self didConnect];
- }
- [self _pumpWriting];
- [self _pumpScanner];
- break;
- }
-
- case NSStreamEventErrorOccurred: {
- SRFastLog(@"NSStreamEventErrorOccurred %@ %@", aStream, [[aStream streamError] copy]);
- /// TODO specify error better!
- [self _failWithError:aStream.streamError];
- _readBufferOffset = 0;
- [_readBuffer setLength:0];
- break;
-
- }
-
- case NSStreamEventEndEncountered: {
- [self _pumpScanner];
- SRFastLog(@"NSStreamEventEndEncountered %@", aStream);
- if (aStream.streamError) {
- [self _failWithError:aStream.streamError];
- } else {
- if (self.readyState != SR_CLOSED) {
- self.readyState = SR_CLOSED;
- _selfRetain = nil;
- }
-
- if (!_sentClose && !_failed) {
- _sentClose = YES;
- // If we get closed in this state it's probably not clean because we should be sending this when we send messages
- dispatch_async(_callbackQueue, ^{
- if ([self.delegate respondsToSelector:@selector(webSocket:didCloseWithCode:reason:wasClean:)]) {
- [self.delegate webSocket:self didCloseWithCode:0 reason:@"Stream end encountered" wasClean:NO];
- }
- });
- }
- }
-
- break;
- }
-
- case NSStreamEventHasBytesAvailable: {
- SRFastLog(@"NSStreamEventHasBytesAvailable %@", aStream);
- const int bufferSize = 2048;
- uint8_t buffer[bufferSize];
-
- while (_inputStream.hasBytesAvailable) {
- int bytes_read = [_inputStream read:buffer maxLength:bufferSize];
-
- if (bytes_read > 0) {
- [_readBuffer appendBytes:buffer length:bytes_read];
- } else if (bytes_read < 0) {
- [self _failWithError:_inputStream.streamError];
- }
-
- if (bytes_read != bufferSize) {
- break;
- }
- };
- [self _pumpScanner];
- break;
- }
-
- case NSStreamEventHasSpaceAvailable: {
- SRFastLog(@"NSStreamEventHasSpaceAvailable %@", aStream);
- [self _pumpWriting];
- break;
- }
-
- default:
- SRFastLog(@"(default) %@", aStream);
- break;
- }
- });
-
-}
-
-@end
-
-
-@implementation SRIOConsumer
-
-@synthesize bytesNeeded = _bytesNeeded;
-@synthesize consumer = _scanner;
-@synthesize handler = _handler;
-@synthesize readToCurrentFrame = _readToCurrentFrame;
-@synthesize unmaskBytes = _unmaskBytes;
-
-- (id)initWithScanner:(stream_scanner)scanner handler:(data_callback)handler bytesNeeded:(size_t)bytesNeeded readToCurrentFrame:(BOOL)readToCurrentFrame unmaskBytes:(BOOL)unmaskBytes;
-{
- self = [super init];
- if (self) {
- _scanner = [scanner copy];
- _handler = [handler copy];
- _bytesNeeded = bytesNeeded;
- _readToCurrentFrame = readToCurrentFrame;
- _unmaskBytes = unmaskBytes;
- assert(_scanner || _bytesNeeded);
- }
- return self;
-}
-
-@end
-
-
-@implementation NSURLRequest (CertificateAdditions)
-
-- (NSArray *)SR_SSLPinnedCertificates;
-{
- return [NSURLProtocol propertyForKey:@"SR_SSLPinnedCertificates" inRequest:self];
-}
-
-@end
-
-@implementation NSMutableURLRequest (CertificateAdditions)
-
-- (NSArray *)SR_SSLPinnedCertificates;
-{
- return [NSURLProtocol propertyForKey:@"SR_SSLPinnedCertificates" inRequest:self];
-}
-
-- (void)setSR_SSLPinnedCertificates:(NSArray *)SR_SSLPinnedCertificates;
-{
- [NSURLProtocol setProperty:SR_SSLPinnedCertificates forKey:@"SR_SSLPinnedCertificates" inRequest:self];
-}
-
-@end
-
-@implementation NSURL (SRWebSocket)
-
-- (NSString *)SR_origin;
-{
- NSString *scheme = [self.scheme lowercaseString];
-
- if ([scheme isEqualToString:@"wss"]) {
- scheme = @"https";
- } else if ([scheme isEqualToString:@"ws"]) {
- scheme = @"http";
- }
-
- if (self.port) {
- return [NSString stringWithFormat:@"%@://%@:%@/", scheme, self.host, self.port];
- } else {
- return [NSString stringWithFormat:@"%@://%@/", scheme, self.host];
- }
-}
-
-@end
-
-static inline dispatch_queue_t log_queue() {
-
- static dispatch_queue_t queue = 0;
- static dispatch_once_t onceToken;
- dispatch_once(&onceToken, ^{
- queue = dispatch_queue_create("fast log queue", DISPATCH_QUEUE_SERIAL);
- });
-
- return queue;
-}
-
-//#define SR_ENABLE_LOG
-
-static inline void SRFastLog(NSString *format, ...) {
-#ifdef SR_ENABLE_LOG
- __block va_list arg_list;
- va_start (arg_list, format);
-
- NSString *formattedString = [[NSString alloc] initWithFormat:format arguments:arg_list];
-
- va_end(arg_list);
-
- NSLog(@"[SR] %@", formattedString);
-#endif
-}
-
-
-#ifdef HAS_ICU
-
-static inline int32_t validate_dispatch_data_partial_string(NSData *data) {
-
- const void * contents = [data bytes];
- long size = [data length];
-
- const uint8_t *str = (const uint8_t *)contents;
-
-
- UChar32 codepoint = 1;
- int32_t offset = 0;
- int32_t lastOffset = 0;
- while(offset < size && codepoint > 0) {
- lastOffset = offset;
- U8_NEXT(str, offset, size, codepoint);
- }
-
- if (codepoint == -1) {
- // Check to see if the last byte is valid or whether it was just continuing
- if (!U8_IS_LEAD(str[lastOffset]) || U8_COUNT_TRAIL_BYTES(str[lastOffset]) + lastOffset < (int32_t)size) {
-
- size = -1;
- } else {
- uint8_t leadByte = str[lastOffset];
- U8_MASK_LEAD_BYTE(leadByte, U8_COUNT_TRAIL_BYTES(leadByte));
-
- for (int i = lastOffset + 1; i < offset; i++) {
-
- if (U8_IS_SINGLE(str[i]) || U8_IS_LEAD(str[i]) || !U8_IS_TRAIL(str[i])) {
- size = -1;
- }
- }
-
- if (size != -1) {
- size = lastOffset;
- }
- }
- }
-
- if (size != -1 && ![[NSString alloc] initWithBytesNoCopy:(char *)[data bytes] length:size encoding:NSUTF8StringEncoding freeWhenDone:NO]) {
- size = -1;
- }
-
- return size;
-}
-
-#else
-
-// This is a hack, and probably not optimal
-static inline int32_t validate_dispatch_data_partial_string(NSData *data) {
- static const int maxCodepointSize = 3;
-
- for (int i = 0; i < maxCodepointSize; i++) {
- NSString *str = [[NSString alloc] initWithBytesNoCopy:(char *)data.bytes length:data.length - i encoding:NSUTF8StringEncoding freeWhenDone:NO];
- if (str) {
- return data.length - i;
- }
- }
-
- return -1;
-}
-
-#endif
-
-
diff --git a/vendor/Pods/SocketRocket/SocketRocket/base64.c b/vendor/Pods/SocketRocket/SocketRocket/base64.c
deleted file mode 100644
index 7647385..0000000
--- a/vendor/Pods/SocketRocket/SocketRocket/base64.c
+++ /dev/null
@@ -1,314 +0,0 @@
-/* $OpenBSD: base64.c,v 1.5 2006/10/21 09:55:03 otto Exp $ */
-
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * Portions Copyright (c) 1995 by International Business Machines, Inc.
- *
- * International Business Machines, Inc. (hereinafter called IBM) grants
- * permission under its copyrights to use, copy, modify, and distribute this
- * Software with or without fee, provided that the above copyright notice and
- * all paragraphs of this notice appear in all copies, and that the name of IBM
- * not be used in connection with the marketing of any product incorporating
- * the Software or modifications thereof, without specific, written prior
- * permission.
- *
- * To the extent it has a right to do so, IBM grants an immunity from suit
- * under its patents, if any, for the use, sale or manufacture of products to
- * the extent that such products are used for performing Domain Name System
- * dynamic updates in TCP/IP networks by means of the Software. No immunity is
- * granted for any product per se or for any other function of any product.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
- * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
- * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
- */
-
-/* OPENBSD ORIGINAL: lib/libc/net/base64.c */
-
-
-#if (!defined(HAVE_B64_NTOP) && !defined(HAVE___B64_NTOP)) || (!defined(HAVE_B64_PTON) && !defined(HAVE___B64_PTON))
-
-#include
-#include
-#include
-#include
-#include
-
-#include
-#include
-
-#include
-#include
-
-#include "base64.h"
-
-static const char Base64[] =
-"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-static const char Pad64 = '=';
-
-/* (From RFC1521 and draft-ietf-dnssec-secext-03.txt)
- The following encoding technique is taken from RFC 1521 by Borenstein
- and Freed. It is reproduced here in a slightly edited form for
- convenience.
-
- A 65-character subset of US-ASCII is used, enabling 6 bits to be
- represented per printable character. (The extra 65th character, "=",
- is used to signify a special processing function.)
-
- The encoding process represents 24-bit groups of input bits as output
- strings of 4 encoded characters. Proceeding from left to right, a
- 24-bit input group is formed by concatenating 3 8-bit input groups.
- These 24 bits are then treated as 4 concatenated 6-bit groups, each
- of which is translated into a single digit in the base64 alphabet.
-
- Each 6-bit group is used as an index into an array of 64 printable
- characters. The character referenced by the index is placed in the
- output string.
-
- Table 1: The Base64 Alphabet
-
- Value Encoding Value Encoding Value Encoding Value Encoding
- 0 A 17 R 34 i 51 z
- 1 B 18 S 35 j 52 0
- 2 C 19 T 36 k 53 1
- 3 D 20 U 37 l 54 2
- 4 E 21 V 38 m 55 3
- 5 F 22 W 39 n 56 4
- 6 G 23 X 40 o 57 5
- 7 H 24 Y 41 p 58 6
- 8 I 25 Z 42 q 59 7
- 9 J 26 a 43 r 60 8
- 10 K 27 b 44 s 61 9
- 11 L 28 c 45 t 62 +
- 12 M 29 d 46 u 63 /
- 13 N 30 e 47 v
- 14 O 31 f 48 w (pad) =
- 15 P 32 g 49 x
- 16 Q 33 h 50 y
-
- Special processing is performed if fewer than 24 bits are available
- at the end of the data being encoded. A full encoding quantum is
- always completed at the end of a quantity. When fewer than 24 input
- bits are available in an input group, zero bits are added (on the
- right) to form an integral number of 6-bit groups. Padding at the
- end of the data is performed using the '=' character.
-
- Since all base64 input is an integral number of octets, only the
- -------------------------------------------------
- following cases can arise:
-
- (1) the final quantum of encoding input is an integral
- multiple of 24 bits; here, the final unit of encoded
- output will be an integral multiple of 4 characters
- with no "=" padding,
- (2) the final quantum of encoding input is exactly 8 bits;
- here, the final unit of encoded output will be two
- characters followed by two "=" padding characters, or
- (3) the final quantum of encoding input is exactly 16 bits;
- here, the final unit of encoded output will be three
- characters followed by one "=" padding character.
- */
-
-#if !defined(HAVE_B64_NTOP) && !defined(HAVE___B64_NTOP)
-int
-b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize)
-{
- size_t datalength = 0;
- u_char input[3];
- u_char output[4];
- u_int i;
-
- while (2 < srclength) {
- input[0] = *src++;
- input[1] = *src++;
- input[2] = *src++;
- srclength -= 3;
-
- output[0] = input[0] >> 2;
- output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
- output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
- output[3] = input[2] & 0x3f;
-
- if (datalength + 4 > targsize)
- return (-1);
- target[datalength++] = Base64[output[0]];
- target[datalength++] = Base64[output[1]];
- target[datalength++] = Base64[output[2]];
- target[datalength++] = Base64[output[3]];
- }
-
- /* Now we worry about padding. */
- if (0 != srclength) {
- /* Get what's left. */
- input[0] = input[1] = input[2] = '\0';
- for (i = 0; i < srclength; i++)
- input[i] = *src++;
-
- output[0] = input[0] >> 2;
- output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
- output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
-
- if (datalength + 4 > targsize)
- return (-1);
- target[datalength++] = Base64[output[0]];
- target[datalength++] = Base64[output[1]];
- if (srclength == 1)
- target[datalength++] = Pad64;
- else
- target[datalength++] = Base64[output[2]];
- target[datalength++] = Pad64;
- }
- if (datalength >= targsize)
- return (-1);
- target[datalength] = '\0'; /* Returned value doesn't count \0. */
- return (datalength);
-}
-#endif /* !defined(HAVE_B64_NTOP) && !defined(HAVE___B64_NTOP) */
-
-#if !defined(HAVE_B64_PTON) && !defined(HAVE___B64_PTON)
-
-/* skips all whitespace anywhere.
- converts characters, four at a time, starting at (or after)
- src from base - 64 numbers into three 8 bit bytes in the target area.
- it returns the number of data bytes stored at the target, or -1 on error.
- */
-
-int
-b64_pton(char const *src, u_char *target, size_t targsize)
-{
- u_int tarindex, state;
- int ch;
- char *pos;
-
- state = 0;
- tarindex = 0;
-
- while ((ch = *src++) != '\0') {
- if (isspace(ch)) /* Skip whitespace anywhere. */
- continue;
-
- if (ch == Pad64)
- break;
-
- pos = strchr(Base64, ch);
- if (pos == 0) /* A non-base64 character. */
- return (-1);
-
- switch (state) {
- case 0:
- if (target) {
- if (tarindex >= targsize)
- return (-1);
- target[tarindex] = (pos - Base64) << 2;
- }
- state = 1;
- break;
- case 1:
- if (target) {
- if (tarindex + 1 >= targsize)
- return (-1);
- target[tarindex] |= (pos - Base64) >> 4;
- target[tarindex+1] = ((pos - Base64) & 0x0f)
- << 4 ;
- }
- tarindex++;
- state = 2;
- break;
- case 2:
- if (target) {
- if (tarindex + 1 >= targsize)
- return (-1);
- target[tarindex] |= (pos - Base64) >> 2;
- target[tarindex+1] = ((pos - Base64) & 0x03)
- << 6;
- }
- tarindex++;
- state = 3;
- break;
- case 3:
- if (target) {
- if (tarindex >= targsize)
- return (-1);
- target[tarindex] |= (pos - Base64);
- }
- tarindex++;
- state = 0;
- break;
- }
- }
-
- /*
- * We are done decoding Base-64 chars. Let's see if we ended
- * on a byte boundary, and/or with erroneous trailing characters.
- */
-
- if (ch == Pad64) { /* We got a pad char. */
- ch = *src++; /* Skip it, get next. */
- switch (state) {
- case 0: /* Invalid = in first position */
- case 1: /* Invalid = in second position */
- return (-1);
-
- case 2: /* Valid, means one byte of info */
- /* Skip any number of spaces. */
- for (; ch != '\0'; ch = *src++)
- if (!isspace(ch))
- break;
- /* Make sure there is another trailing = sign. */
- if (ch != Pad64)
- return (-1);
- ch = *src++; /* Skip the = */
- /* Fall through to "single trailing =" case. */
- /* FALLTHROUGH */
-
- case 3: /* Valid, means two bytes of info */
- /*
- * We know this char is an =. Is there anything but
- * whitespace after it?
- */
- for (; ch != '\0'; ch = *src++)
- if (!isspace(ch))
- return (-1);
-
- /*
- * Now make sure for cases 2 and 3 that the "extra"
- * bits that slopped past the last full byte were
- * zeros. If we don't check them, they become a
- * subliminal channel.
- */
- if (target && target[tarindex] != 0)
- return (-1);
- }
- } else {
- /*
- * We ended by seeing the end of the string. Make sure we
- * have no partial bytes lying around.
- */
- if (state != 0)
- return (-1);
- }
-
- return (tarindex);
-}
-
-#endif /* !defined(HAVE_B64_PTON) && !defined(HAVE___B64_PTON) */
-#endif
\ No newline at end of file
diff --git a/vendor/Pods/SocketRocket/SocketRocket/base64.h b/vendor/Pods/SocketRocket/SocketRocket/base64.h
deleted file mode 100644
index c345e2e..0000000
--- a/vendor/Pods/SocketRocket/SocketRocket/base64.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2012 Square Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-
-
-#ifndef SocketRocket_base64_h
-#define SocketRocket_base64_h
-
-#include
-
-extern int
-b64_ntop(u_char const *src,
- size_t srclength,
- char *target,
- size_t targsize);
-
-extern int
-b64_pton(char const *src,
- u_char *target,
- size_t targsize);
-
-
-#endif
diff --git a/vendor/Pods/Target Support Files/Pods-AFNetworking/Pods-AFNetworking-Private.xcconfig b/vendor/Pods/Target Support Files/Pods-AFNetworking/Pods-AFNetworking-Private.xcconfig
deleted file mode 100644
index 1fe7e4c..0000000
--- a/vendor/Pods/Target Support Files/Pods-AFNetworking/Pods-AFNetworking-Private.xcconfig
+++ /dev/null
@@ -1,5 +0,0 @@
-#include "Pods-AFNetworking.xcconfig"
-GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
-HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Build" "${PODS_ROOT}/Headers/Build/AFNetworking" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/MASShortcut" "${PODS_ROOT}/Headers/Public/SocketRocket"
-OTHER_LDFLAGS = ${PODS_AFNETWORKING_OTHER_LDFLAGS} -ObjC
-PODS_ROOT = ${SRCROOT}
\ No newline at end of file
diff --git a/vendor/Pods/Target Support Files/Pods-AFNetworking/Pods-AFNetworking-dummy.m b/vendor/Pods/Target Support Files/Pods-AFNetworking/Pods-AFNetworking-dummy.m
deleted file mode 100644
index c50a8c6..0000000
--- a/vendor/Pods/Target Support Files/Pods-AFNetworking/Pods-AFNetworking-dummy.m
+++ /dev/null
@@ -1,5 +0,0 @@
-#import
-@interface PodsDummy_Pods_AFNetworking : NSObject
-@end
-@implementation PodsDummy_Pods_AFNetworking
-@end
diff --git a/vendor/Pods/Target Support Files/Pods-AFNetworking/Pods-AFNetworking-prefix.pch b/vendor/Pods/Target Support Files/Pods-AFNetworking/Pods-AFNetworking-prefix.pch
deleted file mode 100644
index 2e9257c..0000000
--- a/vendor/Pods/Target Support Files/Pods-AFNetworking/Pods-AFNetworking-prefix.pch
+++ /dev/null
@@ -1,5 +0,0 @@
-#ifdef __OBJC__
-#import
-#endif
-
-#import "Pods-environment.h"
diff --git a/vendor/Pods/Target Support Files/Pods-AFNetworking/Pods-AFNetworking.xcconfig b/vendor/Pods/Target Support Files/Pods-AFNetworking/Pods-AFNetworking.xcconfig
deleted file mode 100644
index 2011017..0000000
--- a/vendor/Pods/Target Support Files/Pods-AFNetworking/Pods-AFNetworking.xcconfig
+++ /dev/null
@@ -1 +0,0 @@
-PODS_AFNETWORKING_OTHER_LDFLAGS = -framework "CoreServices" -framework "Security" -framework "SystemConfiguration"
\ No newline at end of file
diff --git a/vendor/Pods/Target Support Files/Pods-MASShortcut/Pods-MASShortcut-Private.xcconfig b/vendor/Pods/Target Support Files/Pods-MASShortcut/Pods-MASShortcut-Private.xcconfig
deleted file mode 100644
index ede20af..0000000
--- a/vendor/Pods/Target Support Files/Pods-MASShortcut/Pods-MASShortcut-Private.xcconfig
+++ /dev/null
@@ -1,5 +0,0 @@
-#include "Pods-MASShortcut.xcconfig"
-GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
-HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Build" "${PODS_ROOT}/Headers/Build/MASShortcut" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/MASShortcut" "${PODS_ROOT}/Headers/Public/SocketRocket"
-OTHER_LDFLAGS = ${PODS_MASSHORTCUT_OTHER_LDFLAGS} -ObjC
-PODS_ROOT = ${SRCROOT}
\ No newline at end of file
diff --git a/vendor/Pods/Target Support Files/Pods-MASShortcut/Pods-MASShortcut-dummy.m b/vendor/Pods/Target Support Files/Pods-MASShortcut/Pods-MASShortcut-dummy.m
deleted file mode 100644
index d28b54d..0000000
--- a/vendor/Pods/Target Support Files/Pods-MASShortcut/Pods-MASShortcut-dummy.m
+++ /dev/null
@@ -1,5 +0,0 @@
-#import
-@interface PodsDummy_Pods_MASShortcut : NSObject
-@end
-@implementation PodsDummy_Pods_MASShortcut
-@end
diff --git a/vendor/Pods/Target Support Files/Pods-MASShortcut/Pods-MASShortcut-prefix.pch b/vendor/Pods/Target Support Files/Pods-MASShortcut/Pods-MASShortcut-prefix.pch
deleted file mode 100644
index 2e9257c..0000000
--- a/vendor/Pods/Target Support Files/Pods-MASShortcut/Pods-MASShortcut-prefix.pch
+++ /dev/null
@@ -1,5 +0,0 @@
-#ifdef __OBJC__
-#import
-#endif
-
-#import "Pods-environment.h"
diff --git a/vendor/Pods/Target Support Files/Pods-MASShortcut/Pods-MASShortcut.xcconfig b/vendor/Pods/Target Support Files/Pods-MASShortcut/Pods-MASShortcut.xcconfig
deleted file mode 100644
index ae05631..0000000
--- a/vendor/Pods/Target Support Files/Pods-MASShortcut/Pods-MASShortcut.xcconfig
+++ /dev/null
@@ -1 +0,0 @@
-PODS_MASSHORTCUT_OTHER_LDFLAGS = -framework "AppKit" -framework "Carbon"
\ No newline at end of file
diff --git a/vendor/Pods/Target Support Files/Pods-SocketRocket/Pods-SocketRocket-Private.xcconfig b/vendor/Pods/Target Support Files/Pods-SocketRocket/Pods-SocketRocket-Private.xcconfig
deleted file mode 100644
index 281b791..0000000
--- a/vendor/Pods/Target Support Files/Pods-SocketRocket/Pods-SocketRocket-Private.xcconfig
+++ /dev/null
@@ -1,5 +0,0 @@
-#include "Pods-SocketRocket.xcconfig"
-GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
-HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Build" "${PODS_ROOT}/Headers/Build/SocketRocket" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/MASShortcut" "${PODS_ROOT}/Headers/Public/SocketRocket"
-OTHER_LDFLAGS = ${PODS_SOCKETROCKET_OTHER_LDFLAGS} -ObjC
-PODS_ROOT = ${SRCROOT}
\ No newline at end of file
diff --git a/vendor/Pods/Target Support Files/Pods-SocketRocket/Pods-SocketRocket-dummy.m b/vendor/Pods/Target Support Files/Pods-SocketRocket/Pods-SocketRocket-dummy.m
deleted file mode 100644
index cc5d2c1..0000000
--- a/vendor/Pods/Target Support Files/Pods-SocketRocket/Pods-SocketRocket-dummy.m
+++ /dev/null
@@ -1,5 +0,0 @@
-#import
-@interface PodsDummy_Pods_SocketRocket : NSObject
-@end
-@implementation PodsDummy_Pods_SocketRocket
-@end
diff --git a/vendor/Pods/Target Support Files/Pods-SocketRocket/Pods-SocketRocket-prefix.pch b/vendor/Pods/Target Support Files/Pods-SocketRocket/Pods-SocketRocket-prefix.pch
deleted file mode 100644
index 2e9257c..0000000
--- a/vendor/Pods/Target Support Files/Pods-SocketRocket/Pods-SocketRocket-prefix.pch
+++ /dev/null
@@ -1,5 +0,0 @@
-#ifdef __OBJC__
-#import
-#endif
-
-#import "Pods-environment.h"
diff --git a/vendor/Pods/Target Support Files/Pods-SocketRocket/Pods-SocketRocket.xcconfig b/vendor/Pods/Target Support Files/Pods-SocketRocket/Pods-SocketRocket.xcconfig
deleted file mode 100644
index b2f49ac..0000000
--- a/vendor/Pods/Target Support Files/Pods-SocketRocket/Pods-SocketRocket.xcconfig
+++ /dev/null
@@ -1 +0,0 @@
-PODS_SOCKETROCKET_OTHER_LDFLAGS = -l"icucore" -framework "CoreServices" -framework "Security"
\ No newline at end of file
diff --git a/vendor/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown b/vendor/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown
deleted file mode 100644
index 78f6bc2..0000000
--- a/vendor/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown
+++ /dev/null
@@ -1,71 +0,0 @@
-# Acknowledgements
-This application makes use of the following third party libraries:
-
-## AFNetworking
-
-Copyright (c) 2013-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.
-
-
-## MASShortcut
-
-Copyright (c) 2012-2013, Vadim Shpakovski
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-## SocketRocket
-
-
- Copyright 2012 Square Inc.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-
-Generated by CocoaPods - http://cocoapods.org
diff --git a/vendor/Pods/Target Support Files/Pods/Pods-acknowledgements.plist b/vendor/Pods/Target Support Files/Pods/Pods-acknowledgements.plist
deleted file mode 100644
index 3d08721..0000000
--- a/vendor/Pods/Target Support Files/Pods/Pods-acknowledgements.plist
+++ /dev/null
@@ -1,109 +0,0 @@
-
-
-
-
- PreferenceSpecifiers
-
-
- FooterText
- This application makes use of the following third party libraries:
- Title
- Acknowledgements
- Type
- PSGroupSpecifier
-
-
- FooterText
- Copyright (c) 2013-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.
-
- Title
- AFNetworking
- Type
- PSGroupSpecifier
-
-
- FooterText
- Copyright (c) 2012-2013, Vadim Shpakovski
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- Title
- MASShortcut
- Type
- PSGroupSpecifier
-
-
- FooterText
-
- Copyright 2012 Square Inc.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-
- Title
- SocketRocket
- Type
- PSGroupSpecifier
-
-
- FooterText
- Generated by CocoaPods - http://cocoapods.org
- Title
-
- Type
- PSGroupSpecifier
-
-
- StringsTable
- Acknowledgements
- Title
- Acknowledgements
-
-
diff --git a/vendor/Pods/Target Support Files/Pods/Pods-dummy.m b/vendor/Pods/Target Support Files/Pods/Pods-dummy.m
deleted file mode 100644
index ade64bd..0000000
--- a/vendor/Pods/Target Support Files/Pods/Pods-dummy.m
+++ /dev/null
@@ -1,5 +0,0 @@
-#import
-@interface PodsDummy_Pods : NSObject
-@end
-@implementation PodsDummy_Pods
-@end
diff --git a/vendor/Pods/Target Support Files/Pods/Pods-environment.h b/vendor/Pods/Target Support Files/Pods/Pods-environment.h
deleted file mode 100644
index 432df3a..0000000
--- a/vendor/Pods/Target Support Files/Pods/Pods-environment.h
+++ /dev/null
@@ -1,8 +0,0 @@
-
-// To check if a library is compiled with CocoaPods you
-// can use the `COCOAPODS` macro definition which is
-// defined in the xcconfigs so it is available in
-// headers also when they are imported in the client
-// project.
-
-
diff --git a/vendor/Pods/Target Support Files/Pods/Pods-resources.sh b/vendor/Pods/Target Support Files/Pods/Pods-resources.sh
deleted file mode 100755
index e149064..0000000
--- a/vendor/Pods/Target Support Files/Pods/Pods-resources.sh
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/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"
-
-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)
- ;;
- /*)
- echo "$1"
- echo "$1" >> "$RESOURCES_TO_COPY"
- ;;
- *)
- echo "${PODS_ROOT}/$1"
- echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY"
- ;;
- esac
-}
-
-rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
-if [[ "${ACTION}" == "install" ]]; then
- 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`" ] && [ `find . -name '*.xcassets' | wc -l` -ne 0 ]
-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 "${PWD}" -name "*.xcassets" -print0 | xargs -0 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/vendor/Pods/Target Support Files/Pods/Pods.debug.xcconfig b/vendor/Pods/Target Support Files/Pods/Pods.debug.xcconfig
deleted file mode 100644
index 17cd83c..0000000
--- a/vendor/Pods/Target Support Files/Pods/Pods.debug.xcconfig
+++ /dev/null
@@ -1,6 +0,0 @@
-GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
-HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/MASShortcut" "${PODS_ROOT}/Headers/Public/SocketRocket"
-OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/MASShortcut" -isystem "${PODS_ROOT}/Headers/Public/SocketRocket"
-OTHER_LDFLAGS = -ObjC -l"Pods-AFNetworking" -l"Pods-MASShortcut" -l"Pods-SocketRocket" -l"icucore" -framework "AppKit" -framework "Carbon" -framework "CoreServices" -framework "Security" -framework "SystemConfiguration"
-OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS)
-PODS_ROOT = ${SRCROOT}/Pods
\ No newline at end of file
diff --git a/vendor/Pods/Target Support Files/Pods/Pods.release.xcconfig b/vendor/Pods/Target Support Files/Pods/Pods.release.xcconfig
deleted file mode 100644
index 17cd83c..0000000
--- a/vendor/Pods/Target Support Files/Pods/Pods.release.xcconfig
+++ /dev/null
@@ -1,6 +0,0 @@
-GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
-HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/MASShortcut" "${PODS_ROOT}/Headers/Public/SocketRocket"
-OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/MASShortcut" -isystem "${PODS_ROOT}/Headers/Public/SocketRocket"
-OTHER_LDFLAGS = -ObjC -l"Pods-AFNetworking" -l"Pods-MASShortcut" -l"Pods-SocketRocket" -l"icucore" -framework "AppKit" -framework "Carbon" -framework "CoreServices" -framework "Security" -framework "SystemConfiguration"
-OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS)
-PODS_ROOT = ${SRCROOT}/Pods
\ No newline at end of file
diff --git a/vendor/Pods/build-MacOSX/Pods.bridgesupport b/vendor/Pods/build-MacOSX/Pods.bridgesupport
deleted file mode 100644
index 99d701c..0000000
--- a/vendor/Pods/build-MacOSX/Pods.bridgesupport
+++ /dev/null
@@ -1,1729 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/vendor/Pods/build-MacOSX/libPods-AFNetworking.a b/vendor/Pods/build-MacOSX/libPods-AFNetworking.a
deleted file mode 100644
index c92d889..0000000
Binary files a/vendor/Pods/build-MacOSX/libPods-AFNetworking.a and /dev/null differ
diff --git a/vendor/Pods/build-MacOSX/libPods-MASShortcut.a b/vendor/Pods/build-MacOSX/libPods-MASShortcut.a
deleted file mode 100644
index 395ff1e..0000000
Binary files a/vendor/Pods/build-MacOSX/libPods-MASShortcut.a and /dev/null differ
diff --git a/vendor/Pods/build-MacOSX/libPods-SocketRocket.a b/vendor/Pods/build-MacOSX/libPods-SocketRocket.a
deleted file mode 100644
index 4724d6f..0000000
Binary files a/vendor/Pods/build-MacOSX/libPods-SocketRocket.a and /dev/null differ